/* =============================================================
   Sign in (/signin), 2026-11-26.
   A.J.: "if we're going to have 'Sign in' in big letters at the top I suspect people will click it just to click it,
   so it needs to be clean." The box is the end of a toy box: white, a heavy navy edge, a red band with the name on a
   plate. Beside it (under it on phones) a teal panel tells a shopper the truth and gives them three ways on.
   Signed in on this browser (owner.js puts ttf-owner on <html> before paint), the box says so and the panel goes.
   ============================================================= */

.signin{background:var(--cream);padding-block:var(--sp-5) var(--sp-8)}
@media (min-width:900px){ .signin{padding-block:var(--sp-6) var(--sp-9)} }

.si-back{min-height:48px;padding:0 18px 0 12px;gap:8px;font-size:19px;border-width:3px;margin-bottom:var(--sp-5)}
.si-back svg{width:20px;height:20px}
/* the header's Sign in, on its own page: filled, so it reads as where you are */
.top .btn--signin[aria-current="page"]{background:rgba(251,246,230,.18)}

.si-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--sp-6);align-items:start}
/* tablets held upright: one column, but not a form stretched across the whole screen */
@media (min-width:600px) and (max-width:899px){ .si-grid{max-width:600px} }
@media (min-width:900px){
  .si-grid{grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:var(--sp-7);align-items:stretch}
  .si-shop{align-content:start}
}

/* ---------- the box ---------- */
.pg .si-box{padding:0}
.si-box{background:var(--white);border:5px solid var(--navy);box-shadow:8px 8px 0 var(--navy);min-width:0}
.si-band{display:flex;justify-content:center;padding:14px 12px;background:var(--red);border-bottom:5px solid var(--mustard)}
.si-plate{display:inline-flex;align-items:center;min-height:44px;padding:6px 18px 4px;background:var(--navy);color:var(--cream);
  font-family:var(--display);font-weight:800;font-size:clamp(18px,4.6vw,26px);line-height:1;letter-spacing:.04em;white-space:nowrap;text-transform:uppercase;
  outline:1.5px solid var(--cream);outline-offset:-6px;text-align:center}
.si-body{padding:var(--sp-5) var(--sp-4) var(--sp-6)}
@media (min-width:420px){ .si-body{padding:var(--sp-6) var(--sp-5) var(--sp-6)} }
@media (min-width:900px){ .si-body{padding:var(--sp-7) var(--sp-7) var(--sp-7)} }

.si-box h1{font-size:clamp(46px,9vw,68px);line-height:.95;text-wrap:balance;text-transform:uppercase;letter-spacing:.01em;
  color:var(--navy);text-shadow:.05em .05em 0 var(--mustard);margin:0 0 var(--sp-5)}

.si-form{display:flex;flex-direction:column;gap:var(--sp-5)}
.si-field{display:flex;flex-direction:column;gap:var(--sp-2)}
.si-field label{font-weight:700;font-size:19px;line-height:1.2}
/* the password: label, box, then Show password (that order for the keyboard), with Show password drawn on the label's row */
.si-field--pw{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--sp-3);row-gap:var(--sp-2);align-items:center}
.si-field--pw label{grid-column:1;grid-row:1}
.si-field--pw .si-show{grid-column:2;grid-row:1}
.si-field--pw input{grid-column:1 / -1;grid-row:2}
.si-field input{width:100%;min-height:58px;padding:0 var(--sp-4);font:500 20px/1.3 var(--body);color:var(--navy);
  background:var(--white);border:3px solid var(--navy);border-radius:6px;-webkit-appearance:none;appearance:none}
.si-field input:focus{outline:3px solid var(--mustard);outline-offset:2px}
.si-field input[aria-invalid="true"]{border-color:var(--red)}
.si-show{display:inline-flex;align-items:center;min-height:44px;padding:0 2px;margin:-8px 0;background:none;border:0;cursor:pointer;
  font-weight:700;font-size:18px;color:var(--navy);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.si-show:focus-visible{outline:3px solid var(--mustard);outline-offset:2px}

.si-err{margin:0;padding:var(--sp-2) 0 var(--sp-2) var(--sp-3);border-left:5px solid var(--red);
  font-weight:700;font-size:19px;line-height:1.35;color:#B32514}
.si-go{width:100%;min-height:60px;font-size:22px}
.si-go[aria-busy="true"]{opacity:.8;cursor:progress}

.si-who{font-size:20px;margin:0 0 var(--sp-5);overflow-wrap:anywhere}
.si-signout{display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;margin-top:var(--sp-4);padding:0 8px;
  background:none;border:0;cursor:pointer;font-weight:700;font-size:19px;color:var(--navy);
  text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.si-signout:focus-visible{outline:3px solid var(--mustard);outline-offset:2px}

/* ---------- the shopper's panel ---------- */
/* the heading and a cut-out piece share the top row; the line and the three buttons run the full width under them */
.si-shop{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--sp-4);align-items:end;background:var(--teal);color:var(--white);
  border:5px solid var(--navy);box-shadow:8px 8px 0 var(--navy);padding:var(--sp-5) var(--sp-4);min-width:0}
@media (min-width:420px){ .si-shop{padding:var(--sp-6) var(--sp-5)} }
.si-shop-words{display:contents}
.si-shop h2{grid-column:1;grid-row:1;align-self:center;color:var(--white);font-size:clamp(34px,5vw,46px);line-height:1;text-shadow:.05em .05em 0 var(--navy);margin:0}
.si-shop-pic{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;width:84px;height:120px;
  background:var(--mustard);border:4px solid var(--navy);padding:8px;transform:rotate(3deg);box-sizing:border-box}
.si-shop-pic img{display:block;width:auto;height:100%;max-height:100%;max-width:100%;filter:drop-shadow(0 4px 0 rgba(27,47,94,.25))}
.si-shop p{grid-column:1 / -1;font-size:20px;line-height:1.5;margin:var(--sp-4) 0 var(--sp-5)}
.si-shop p b{color:var(--white)}
.si-shop-btns{grid-column:1 / -1;display:flex;flex-direction:column;gap:var(--sp-3)}
.si-shop-btns .btn{width:100%;min-height:54px}
@media (min-width:600px){ .si-shop-pic{width:100px;height:160px} }
@media (min-width:600px) and (max-width:899px){
  .si-shop-btns{flex-direction:row;flex-wrap:wrap}
  .si-shop-btns .btn{width:auto;flex:1 1 auto}
}
@media (min-width:900px){ .si-shop{padding:var(--sp-6)} .si-shop-pic{width:112px;height:196px} }

/* ---------- which state ---------- */
.si-in-only{display:none}
html.ttf-owner .si-in-only{display:block}
html.ttf-owner .si-out-only,html.ttf-owner .si-shop{display:none}
/* signed in: one column in the middle, Back with it, the heading on one line from 768, no strip on top (the box is the strip) */
html.ttf-owner .si-wrap{max-width:calc(640px + 2 * var(--gutter))}
html.ttf-owner .si-grid{grid-template-columns:minmax(0,1fr)}
html.ttf-owner .pg-signin .owner-strip{display:none}
html.ttf-owner .si-box h1{font-size:clamp(34px,8.6vw,52px);text-wrap:balance}
.si-nojs{display:none;font-size:20px}
html:not(.js) .si-form{display:none}
html:not(.js) .si-nojs{display:block}

/* a short screen (a phone with its keyboard up): the header scrolls away, so the box and its button have the room */
@media (max-height:620px){ .pg-signin .top{position:relative} }
