/* The sign in, sign up and password pages (accounts_app/auth_base.html), on
   the house tokens and ui.css: a navy brand panel in the public website's
   colours beside one white card. 4 November 2026. */

body.auth { min-height: 100vh; background: var(--bg); }
/* The grid is .auth-shell, never the body: an extension's element in the
   body (a password manager's, say) took the first cell and pushed the card
   under the panel (UAT, 4 November 2026). */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 44%) minmax(0, 1fr); }
.auth-shell > .auth-brand { grid-column: 1; grid-row: 1; }
.auth-shell > .auth-main { grid-column: 2; grid-row: 1; }

/* The brand panel */
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 40px; padding: 40px 48px;
              background: radial-gradient(120% 80% at 100% 0%, rgba(124, 58, 237, .38), transparent 60%),
                          radial-gradient(90% 70% at 0% 100%, rgba(233, 160, 10, .16), transparent 60%), #15233b;
              color: #e6e9f2; }
.auth-logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; }
.auth-logo:hover { color: #fff; }
.auth-logo svg { width: 34px; height: 34px; flex: none; }
.auth-logo i { font-style: normal; font-weight: 500; opacity: .72; }
.auth-logo { letter-spacing: -0.01em; }
.auth-pitch { margin: auto 0; max-width: 500px; }
.auth-pitch h2 { margin: 0 0 14px; font-size: 2rem; line-height: 1.2; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.auth-pitch p { margin: 0 0 8px; font-size: 1.02rem; color: #c7cddc; }
/* The panel's picture (_route_art.html): a tangled day in grey, the tidy
   loop drawn over it, a van going round. */
.auth-art { margin: 20px 0 0; }
.auth-art svg { display: block; width: 100%; max-width: 460px; height: auto; }
.art-run { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 2; stroke-dasharray: 5 6; stroke-linejoin: round; }
.art-plan { fill: none; stroke: #a78bfa; stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round;
            stroke-dasharray: 1; stroke-dashoffset: 1; animation: art-draw 9s ease-in-out infinite; }
.art-stops circle { fill: #fff; stroke: #15233b; stroke-width: 2; }
.art-home { fill: #e9a00a; }
.art-van { fill: #fff; stroke: #7c3aed; stroke-width: 3; offset-rotate: 0deg;
           offset-path: path("M60 200 L110 150 L150 90 L210 60 L280 80 L340 60 L380 120 L330 170 L250 150 L170 200 Z");
           animation: art-drive 9s ease-in-out infinite; }
.auth-art figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-size: 0.82rem; color: #aeb6c8; }
.art-key { display: inline-block; width: 18px; height: 0; border-top: 2px dashed rgba(255, 255, 255, .45); }
.art-key.plan { border-top: 3px solid #a78bfa; margin-left: 10px; }
@keyframes art-draw { 0% { stroke-dashoffset: 1; opacity: 1; } 45%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes art-drive { 0% { offset-distance: 0%; opacity: 0; } 5% { opacity: 1; } 45% { offset-distance: 100%; } 46%, 100% { offset-distance: 100%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .art-plan { animation: none; stroke-dashoffset: 0; }
  .art-van { display: none; }
}

/* The courier owl on sign in and sign up (_owl.html, _owl_panel.html,
   auth.js): large in the panel, small on the card on phones. It follows
   what is typed (auth.js moves its pupils and turns its head) and covers
   its eyes with its wings while a password box has the focus (.shy),
   peeking when the password is shown (.peek). */
.auth-mascot { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; width: 100%; }
.auth-mascot .bird { display: block; height: min(520px, calc(100vh - 300px)); min-height: 300px; width: auto; max-width: 100%; }
.bird-say { position: relative; margin: 0 0 6px; padding: 12px 18px; border-radius: 16px; background: #fff; color: var(--ink);
            font-size: 1rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); transition: transform .25s; }
.bird-say::after { content: ''; position: absolute; left: 50%; bottom: -8px; width: 16px; height: 16px; margin-left: -8px;
                   background: #fff; transform: rotate(45deg); border-radius: 3px; }
.bird-say.pop { transform: scale(1.05); }
.bird-note { margin: 14px 0 0; font-size: 1.05rem; font-weight: 500; letter-spacing: 0.005em; color: #c3cad9; }
.auth-perch { display: none; }
.bird .b-shadow { fill: rgba(0, 0, 0, .18); }
.bird .b-head { transform-origin: 150px 170px; transform: translateY(var(--dip, 0px)) rotate(var(--tilt, 0deg));
                transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.bird .b-pupil { transform: translate(var(--lx, 0px), var(--ly, 0px)); transition: transform .18s ease-out; }
.bird .b-eye { transform-box: fill-box; transform-origin: center; animation: bird-blink 5.5s infinite; }
.bird .b-wing { transition: transform .42s cubic-bezier(.34, 1.56, .64, 1); }
.bird .b-wing-l { transform: translate(84px, 172px) rotate(8deg); }
.bird .b-wing-r { transform: translate(216px, 172px) scale(-1, 1) rotate(8deg); }
.bird.shy .b-wing-l { transform: translate(84px, 172px) rotate(-156deg); }
.bird.shy .b-wing-r { transform: translate(216px, 172px) scale(-1, 1) rotate(-156deg); }
.bird.shy.peek .b-wing-l { transform: translate(84px, 172px) rotate(-112deg); }
.bird.shy { --dip: 5px; --tilt: 0deg !important; }
@keyframes bird-blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) {
  .bird .b-eye { animation: none; }
  .bird .b-head, .bird .b-pupil, .bird .b-wing { transition: none; }
}

/* How strong a new password is (_strength.html, auth.js): four bars and a
   word, red to green; whether the second box matches the first. */
.pw-meter { margin: -8px 0 14px; }
.pw-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-bars i { height: 5px; border-radius: 3px; background: var(--line); transition: background .2s; }
.pw-meter[data-score="0"] .pw-bars i:nth-child(-n+1),
.pw-meter[data-score="1"] .pw-bars i:nth-child(-n+1) { background: var(--poor); }
.pw-meter[data-score="2"] .pw-bars i:nth-child(-n+2) { background: var(--fair); }
.pw-meter[data-score="3"] .pw-bars i:nth-child(-n+3) { background: #65a30d; }
.pw-meter[data-score="4"] .pw-bars i { background: var(--good); }
.pw-words { margin: 6px 0 0; font-size: calc(0.78rem + 1px); color: var(--muted); }
.pw-meter[data-score="0"] .pw-label, .pw-meter[data-score="1"] .pw-label { color: var(--poor-ink); }
.pw-meter[data-score="2"] .pw-label { color: var(--fair-ink); }
.pw-meter[data-score="3"] .pw-label, .pw-meter[data-score="4"] .pw-label { color: var(--good-ink); }
.pw-match { margin: -8px 0 14px; font-size: calc(0.78rem + 1px); font-weight: 600; }
.pw-match.good { color: var(--good-ink); }
.pw-match.poor { color: var(--poor-ink); }

/* The form side */
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-logo.small { display: none; color: var(--ink); margin-bottom: 24px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
             padding: 36px 36px 30px; }
.auth-card.wide { max-width: 560px; }
.auth-card h1 { margin: 0 0 6px; font-size: calc(1.5rem + 1px); font-weight: 700; letter-spacing: -0.01em; }
.auth-lede { margin: 0 0 24px; color: var(--muted); font-size: calc(0.86rem + 1px); }
.auth-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
             background: var(--accent-soft); color: var(--accent); }
.auth-icon .ic { width: 24px; height: 24px; }
.auth-icon.good { background: var(--good-bg); color: var(--good-ink); }
.auth-icon.fair { background: var(--fair-bg); color: var(--fair-ink); }

.auth-card .field { margin-bottom: 16px; }
.auth-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-label label { font-size: calc(0.82rem + 1px); font-weight: 600; color: var(--ink-2); }
.auth-label a { font-size: calc(0.8rem + 1px); font-weight: 500; }
.auth-label small { font-size: 0.78rem; color: var(--muted); }
.auth-card .field input:not([type="checkbox"]):not([type="hidden"]) {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  background: var(--surface); font-size: calc(0.9rem + 1px); transition: border-color .15s, box-shadow .15s; }
.auth-card .field input:hover { border-color: #b8bdc7; }
.auth-card .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 58, 237, .18); }
.auth-card .field.bad input { border-color: var(--poor); }
.auth-card .field.bad input:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.auth-err { margin: 2px 0 0; font-size: calc(0.78rem + 1px); color: var(--poor-ink); }
.auth-help { margin-top: 2px; }
.auth-help ul { margin: 4px 0 0; padding-left: 18px; }
.auth-pass { position: relative; }
.auth-card .auth-pass input { padding-right: 64px !important; }
.auth-reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 30px; padding: 0 10px;
               border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.auth-reveal:hover { background: var(--surface-2); color: var(--ink); }
.auth-reveal:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.auth-card .btn.block { width: 100%; height: 44px; margin-top: 8px; font-size: calc(0.9rem + 1px); font-weight: 600; }
.auth-card .btn.block + .btn.block { margin-top: 10px; }
.auth-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 18px; padding: 10px 12px; border-radius: var(--radius-s);
             font-size: calc(0.82rem + 1px); }
.auth-note .ic { margin-top: 2px; flex: none; }
.auth-note.poor { background: var(--poor-bg); color: var(--poor-ink); }
.auth-note.good { background: var(--good-bg); color: var(--good-ink); }
.auth-note.info { background: var(--info-bg); color: var(--info-ink); }
.auth-card p { font-size: calc(0.86rem + 1px); color: var(--ink-2); }
.auth-foot { margin: 20px 0 0; font-size: calc(0.86rem + 1px); color: var(--muted); text-align: center; }
.auth-foot a { font-weight: 600; }
.auth-legal { margin: 28px 0 0; font-size: 0.78rem; color: var(--muted); }
.auth-legal a { color: var(--muted); }
.auth-legal a:hover { color: var(--ink); }

/* Narrower screens: the panel gives way to the logo above the card. */
@media (max-width: 960px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-shell > .auth-main { grid-column: 1; }
  .auth-brand { display: none; }
  .auth-logo.small { display: inline-flex; }
  .auth-perch { display: block; width: 150px; margin: -6px 0 -12px; position: relative; z-index: 1; }
  .auth-perch .bird { display: block; width: 100%; height: auto; }
}
@media (max-width: 480px) {
  .auth-main { justify-content: flex-start; padding: 28px 16px; }
  .auth-card { padding: 26px 20px 22px; border-radius: 14px; }
  .auth-row { grid-template-columns: minmax(0, 1fr); }
}

/* The two factor code page (two_factor.html): the code in wide mono type, then trusting the browser. */
.auth-card input[data-private] { font-family: var(--mono); font-size: 1.15rem; letter-spacing: 0.18em; }
.tf-or { margin: -6px 0 14px; }
.tf-trust { margin: 0 0 20px; }
.tf-trust span { display: grid; gap: 2px; color: var(--ink); font-weight: 500; }
.tf-trust small { color: var(--muted); font-weight: 400; font-size: calc(0.78rem + 1px); }
