/* The account pages (layout/auth.html), after outer/site.css: the home hero's night, one white card, the real screens
   settling behind it. Every control 48px with --auth-radius corners. Design: docs/mocks/site/signup.html (study 5d). */

.auth {
  --auth-card: 428px;
  --auth-control: 48px;
  --auth-gap: 16px;
  --auth-text: var(--inv-strong);
  --auth-soft: color-mix(in srgb, var(--inv-strong) 90%, transparent);
  --auth-line: color-mix(in srgb, var(--inv-strong) 14%, transparent);
  --auth-glass: color-mix(in srgb, var(--auth-night-deep) 82%, transparent);
  /* the headline's mint to pale gold: the card's hairline, the lit words */
  --auth-lit: linear-gradient(100deg, var(--site-accent-inv), color-mix(in srgb, var(--hl) 76%, var(--bg-panel)));
  /* a field's edge at 3:1 on the card, and its petrol ring */
  --field-border: color-mix(in srgb, var(--sand-500) 90%, var(--bg-panel));
  --field-border-hover: var(--sand-600);
  --auth-ring: 0 0 0 4px color-mix(in srgb, var(--site-accent) 16%, transparent), 0 0 18px -4px color-mix(in srgb, var(--site-accent) 45%, transparent);
  --auth-radius: 12px;
}

/* ---------- the night: layered sky, the ledger fading out at its edges ---------- */
body.auth {
  --glow-at: 50% -14%; --dawn-at: 50% 62%; --bloom-at: 90% 30%;
  position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 100svh; color: var(--auth-soft);
  background:
    radial-gradient(56% 46% at var(--glow-at), color-mix(in srgb, var(--home-night-glow) 26%, transparent), transparent 72%),
    radial-gradient(52% 44% at var(--dawn-at), color-mix(in srgb, var(--home-dawn-2) 44%, transparent), color-mix(in srgb, var(--home-dawn-1) 22%, transparent) 46%, transparent 76%),
    radial-gradient(42% 42% at var(--bloom-at), color-mix(in srgb, var(--home-away-glow) 20%, transparent), transparent 72%),
    linear-gradient(180deg, var(--auth-night-deep) 0, color-mix(in srgb, var(--home-night-1) 80%, var(--auth-night-deep)) 40%, var(--home-night-1) 72%, var(--home-night-2) 100%);
  background-color: var(--auth-night-deep);
}
body.auth::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--hero-texture);
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 38%, var(--ink) 10%, transparent 82%); mask-image: radial-gradient(ellipse 70% 62% at 50% 38%, var(--ink) 10%, transparent 82%); }

/* ---------- the bar: the name, and the other way in (wide screens) ---------- */
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); width: 100%;
  max-width: calc(1000px + 2 * var(--site-gutter)); min-height: 44px; margin: 0 auto; padding: var(--space-4) var(--site-gutter) 0; }
.auth-top .brandmark { min-height: 44px; color: var(--auth-text); }
.auth-top .bg-wordmark { font-size: 26px; }
.auth-top form { margin: 0; }
.auth-top__action { min-height: var(--tap-min); padding: 0 var(--space-2); border: 0; background: none; font: inherit; font-size: var(--fs-sm);
  color: var(--auth-soft); cursor: pointer; }
.auth-top__action:hover { color: var(--auth-text); text-decoration: underline; text-underline-offset: 4px; }
.auth-switch { margin: 0; font-size: var(--fs-sm); color: var(--auth-soft); }
.auth-switch a { display: inline-flex; align-items: center; min-height: var(--tap-min); font-weight: 600; color: var(--auth-text);
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--inv-strong) 45%, transparent); text-underline-offset: 4px; }
.auth-switch a:hover { text-decoration-color: currentColor; }
/* the switch is said once (owner, 2026-11-11): in the bar on a wide screen, in the card under the buttons on a phone */
.auth-switch--card { display: none; margin-top: var(--space-4); text-align: center; color: var(--text-muted); }
.auth-switch--card a { color: var(--ink); text-decoration-color: var(--sand-400); }

/* ---------- the page: centered in the window when it fits, top-aligned when it doesn't ---------- */
/* the screens reach past the window's edges: clipped here, so the page never scrolls sideways */
.auth-main { flex: 1; display: flex; flex-direction: column; overflow-x: clip; }
.auth-stage { position: relative; display: flex; flex-direction: column; justify-content: safe center; min-height: calc(100svh - 64px);
  padding-bottom: 40px; }
/* the card, its promises and the reel behind them; the reel runs on under the card, then the night closes */
.auth-scene { position: relative; }
.auth-scene:has(> .auth-reel)::after { content: ""; display: block; height: var(--space-6); }

.auth-hero { position: relative; z-index: 2; display: grid; justify-items: center; padding: clamp(var(--space-2), 3vh, 36px) var(--site-gutter) 0; text-align: center; }
.auth-hero__title { font-family: var(--font-display); font-weight: var(--font-display-weight); font-size: clamp(50px, 5.6vw, 84px);
  letter-spacing: -.05em; line-height: .98; color: var(--auth-text); text-wrap: balance; }
.auth-hero__title .accent { padding-right: .06em; background: var(--auth-lit); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.auth-hero__lead { max-width: 46em; margin-top: var(--space-3); font-size: var(--fs-lead); line-height: 1.6;
  color: color-mix(in srgb, var(--inv-strong) 92%, transparent); text-wrap: balance; }
.auth-hero__lead b { font-weight: 600; color: var(--auth-text); overflow-wrap: anywhere; }

/* ---------- the card: the brightest thing on the page, a hairline along its top ---------- */
.auth-card { position: relative; z-index: 3; display: flex; flex-direction: column; width: min(100%, var(--auth-card));
  margin: clamp(18px, 3vh, var(--space-8)) auto 0; padding: var(--space-7) var(--space-8) 26px; border-radius: var(--r-2xl); background: var(--bg-panel);
  color: var(--text); scroll-margin-top: 24px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--inv-strong) 40%, transparent), 0 2px 0 var(--bg-panel) inset,
    0 40px 90px -34px color-mix(in srgb, var(--auth-night-deep) 80%, transparent), 0 0 120px -40px color-mix(in srgb, var(--site-accent-inv) 60%, transparent); }
.auth-card::before { content: ""; position: absolute; top: 0; left: 28px; right: 28px; height: 2px; border-radius: 0 0 2px 2px; background: var(--auth-lit); }
.auth-card > .alert:first-child { margin-top: 0; }
.auth-card > .alert { margin-bottom: var(--gap, var(--auth-gap)); }
.auth-card h1 { font-family: var(--font-display); font-weight: var(--font-display-weight); font-size: clamp(28px, 3vw, 34px); line-height: 1.12; color: var(--ink); }

/* one grid: every control 48px, one gap between fields, the divider's space equal above and below */
.auth-form { display: grid; gap: var(--auth-gap); margin: 0; }
.auth-or { display: flex; align-items: center; gap: 14px; margin: var(--auth-gap) 0; font-size: 13px; color: var(--text-muted); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; }
.auth-or::before { background: linear-gradient(90deg, transparent, var(--line) 35%); }
.auth-or::after { background: linear-gradient(270deg, transparent, var(--line) 35%); }

/* ---------- the field language: calm, exact, alive only where it helps ---------- */
.auth-card .field { gap: 6px; }
.auth-card .field > label, .auth-card .field__label { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--ink); }
.auth-card .field__label a { font-size: 13px; font-weight: 500; color: var(--site-accent); text-decoration: none; }
.auth-card .field__label a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-card .field input:not([type="checkbox"]) { height: var(--auth-control); padding: 0 14px; border: 1px solid var(--field-border); border-radius: var(--auth-radius);
  background: var(--bg-panel); font-size: max(16px, var(--fs-body)); color: var(--ink);
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal), background var(--duration-normal); }
.auth-card .field input:not([type="checkbox"]):hover { border-color: var(--field-border-hover); }
.auth-card .field input:not([type="checkbox"]):focus { outline: 2px solid transparent; border-color: var(--site-accent); box-shadow: var(--auth-ring); }
.auth-card .field input[aria-invalid="true"], .auth-card .field input[aria-invalid="true"]:focus { border-color: var(--overdue-fg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--overdue-fg) 12%, transparent); }
/* the browser paints its own fill over a saved email or password; an inset shadow covers it and keeps the rings */
.auth-card .field input:-webkit-autofill { -webkit-text-fill-color: var(--ink); caret-color: var(--ink); box-shadow: inset 0 0 0 100px var(--bg-panel); }
.auth-card .field input:-webkit-autofill:focus { box-shadow: inset 0 0 0 100px var(--bg-panel), var(--auth-ring); }

/* an email that looks right: a quiet check at its right edge (never a mark against it while typing) */
.field__input { position: relative; display: block; }
.auth-card .field__input input { width: 100%; padding-right: 40px; }
.field__valid { position: absolute; top: 50%; right: 14px; translate: 0 -50%; display: grid; color: var(--paid-fg); opacity: 0; scale: .6;
  transition: opacity var(--duration-normal), scale .3s var(--ease-out); pointer-events: none; }
.field__input[data-valid] .field__valid { opacity: 1; scale: 1; }
.field__input:has([aria-invalid="true"]) .field__valid { opacity: 0; }

/* the password: the eye inside it, and a hairline in its foot that fills toward the rule */
.auth-card .field__password input { padding-right: 52px; }
.auth-card .field__reveal { right: 6px; display: grid; place-items: center; width: 36px; height: 36px; min-width: 0; min-height: 0; padding: 0;
  border-radius: 9px; color: var(--text-muted); cursor: pointer; transition: background var(--duration-fast), color var(--duration-fast); }
.auth-card .field__reveal:hover { background: var(--bg-hover); color: var(--ink); }
.field__reveal .is-hidden, .field__reveal[aria-pressed="true"] .is-shown { display: none; }
.field__reveal[aria-pressed="true"] .is-hidden { display: block; }
.field__meter { position: absolute; left: 12px; right: 12px; bottom: 1px; height: 2px; overflow: hidden; border-radius: 2px; pointer-events: none; }
/* on white the pale mint and gold would vanish: the same two hues, deepened */
.field__meter i { display: block; width: 100%; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--site-accent-inv) 45%, var(--site-accent)), color-mix(in srgb, var(--hl) 70%, var(--m-proposal)));
  transform: scaleX(var(--meter, 0)); transform-origin: left; transition: transform .35s var(--ease-out); }
.field:has([aria-invalid="true"]) .field__meter { opacity: 0; }

/* its rule: a caption only while the field has focus (always described for screen readers); met, a check, then gone */
.field__rule { display: grid; max-height: 0; overflow: hidden; margin: 0; opacity: 0; font-size: 13px; line-height: 1.4; color: var(--text-muted);
  transition: max-height .25s var(--ease-out), opacity .25s var(--ease-out), margin .25s var(--ease-out); }
.field__rule > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: var(--icon-gap-xs); }
.field__rule-met { color: var(--paid-fg); opacity: 0; }
.field:focus-within:not([data-met]) .field__rule, .field.is-flash .field__rule { max-height: 22px; opacity: 1; margin-top: 2px; }
.field[data-met] .field__rule-text { opacity: 0; }
.field[data-met] .field__rule-met { opacity: 1; }
.field:has([aria-invalid="true"]) .field__rule { max-height: 0; opacity: 0; margin: 0; }
/* without scripts the rule is simply said */
html:not(.js) .field__rule { max-height: none; opacity: 1; margin-top: 2px; }
html:not(.js) .field__rule-met { display: none; }

/* what a field says back, under it, on leaving it: one short sentence */
.field__error, .field__notice { display: flex; align-items: flex-start; gap: var(--icon-gap-sm); margin: 2px 0 0; font-size: 13px; line-height: 1.45;
  animation: auth-say .25s var(--ease-out); }
.field__error { color: var(--overdue-fg); }
.field__notice { color: var(--text); }
.field__error > .bg-icon, .field__notice > .bg-icon { flex: none; margin-top: 1px; }
.field__notice > .bg-icon { color: var(--site-accent); }
.field__error a, .field__notice a { font-weight: 600; color: var(--site-accent); text-decoration: underline; text-underline-offset: 3px; }
.field__error a { color: inherit; }
@keyframes auth-say { from { opacity: 0; translate: 0 -3px; } }
.field__caps { display: inline-flex; align-items: center; gap: var(--icon-gap-xs); width: fit-content; margin: 2px 0 0; padding: 2px var(--space-2);
  border-radius: var(--r-pill); background: var(--partial-bg); font-size: 12px; font-weight: 500; color: color-mix(in srgb, var(--partial-fg) 60%, var(--ink)); }
.field__caps[hidden] { display: none; }

/* ---------- Google: the same height and corners as the fields; its last-used tag, quiet, inside it ---------- */
.auth-google { margin: 0; }
.btn-google { position: relative; display: flex; align-items: center; justify-content: center; gap: var(--icon-gap-md); width: 100%;
  min-height: var(--auth-control); padding: 0 var(--space-4); border: 1px solid var(--field-border); border-radius: var(--auth-radius); background: var(--bg-panel);
  font: inherit; font-size: var(--fs-body); font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast), transform .12s var(--ease-out); }
.btn-google:hover { background: var(--sand-50); border-color: var(--field-border-hover); }
.btn-google:active { transform: scale(.99); }
.btn-google img { flex: none; width: var(--icon-size-lg); height: var(--icon-size-lg); }
.btn-google[aria-busy="true"] img { display: none; }
/* "Last used": noticed, never loud (owner, 2026-11-11): a small tag at the button's right end, the label still centered
   and on one line; the caption ink on sand is 4.9:1 */
.btn-google > span:not(.auth-last) { white-space: nowrap; }
.auth-last { position: absolute; top: 50%; right: 8px; translate: 0 -50%; padding: 2px var(--space-2); border-radius: var(--r-pill);
  background: var(--sand-100); font-size: 11px; font-weight: 500; line-height: 1.4; color: var(--caption); white-space: nowrap; pointer-events: none; }
.auth-last[hidden] { display: none; }

/* ---------- the button, its loading state, and what is said right under it ---------- */
.auth-submit { position: relative; overflow: hidden; min-height: var(--auth-control); margin-top: var(--space-1); gap: var(--icon-gap-sm);
  border-radius: var(--auth-radius); background: var(--site-accent); color: var(--btn-primary-text);
  box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--site-accent) 90%, transparent);
  transition: background var(--duration-fast), transform .12s var(--ease-out); }
.auth-submit:hover { background: color-mix(in srgb, var(--site-accent) 82%, var(--ink)); }
.auth-submit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--bg-panel) 22%, transparent) 50%, transparent 65%);
  translate: -100% 0; pointer-events: none; }
.auth-submit:hover::after { translate: 100% 0; transition: translate .7s var(--ease-out); }
.auth-submit:active { transform: scale(.985); }
.auth-submit[aria-busy="true"] { cursor: progress; background: color-mix(in srgb, var(--site-accent) 86%, var(--bg-panel)); }
/* a real outline, so forced colors still show it; the petrol is 7:1 on the card */
.auth-card :is(.auth-submit, .btn-google, .field__reveal, .auth-link, .otp__resend-link, .auth-text-btn, .verify__inbox):focus-visible,
.auth-card :is(.auth-agreement, .carry):has(input:focus-visible) { outline: 2px solid var(--site-accent); outline-offset: 2px; }
.auth-card :is(.auth-agreement, .carry) input:focus-visible { outline: none; }
form[data-once] .once-spinner { display: none; }
form[data-once] [aria-busy="true"] .once-spinner { display: inline-block; animation: bg-spin .9s linear infinite; }

.auth-reassure { margin-top: -6px; font-size: 13px; text-align: center; color: var(--text); }
.auth-legal { margin-top: -8px; font-size: 13px; line-height: 1.5; text-align: center; color: var(--text); text-wrap: balance; }
.auth-legal a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--sand-400); text-underline-offset: 2px; }
.auth-aside { margin-top: var(--space-4); font-size: var(--fs-sm); text-align: center; color: var(--text-muted); }
.auth-aside a { font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--sand-400); text-underline-offset: 3px; }

/* the terms tick (while the agreement line is off): a full-height row directly above the button */
.auth-tick { display: grid; }
.auth-agreement { display: flex; align-items: center; gap: var(--space-2); min-height: var(--tap-min); font-size: var(--fs-sm); line-height: 1.5;
  color: var(--text); cursor: pointer; border-radius: var(--r-lg); }
.auth-agreement input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--site-accent); }
.auth-agreement a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--sand-400); text-underline-offset: 3px; }
.auth-agreement:has(input[aria-invalid="true"]) { color: var(--overdue-fg); }
.auth-tick .field__error { margin-top: 0; }

/* ---------- what came along from a free tool, shown as the thing itself ---------- */
/* In the card, a compact row: the miniature, what it is, what opens next, and the switch that keeps it. */
.carry { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: var(--auth-gap);
  padding: var(--space-3) 14px var(--space-3) var(--space-3); border-radius: var(--r-lg); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.carry__text { display: grid; gap: 1px; min-width: 0; font-size: 13px; line-height: 1.4; color: var(--text); }
.carry__text b { font-size: 14px; font-weight: 600; color: var(--ink); }
.carry__what { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.carry__next { color: var(--text-muted); }
.carry:has(.carry__switch:not(:checked)) .carry__mini { opacity: .45; filter: grayscale(1); }
/* the switch: a checkbox drawn as one, on in petrol */
.carry__switch { appearance: none; position: relative; flex: none; width: var(--switch-w); height: var(--switch-h); margin: 0;
  border-radius: var(--r-pill); background: var(--sand-400); cursor: pointer; transition: background var(--duration-normal); }
.carry__switch::after { content: ""; position: absolute; top: calc((var(--switch-h) - var(--switch-knob)) / 2);
  left: calc((var(--switch-h) - var(--switch-knob)) / 2); width: var(--switch-knob); height: var(--switch-knob); border-radius: 50%;
  background: var(--bg-panel); box-shadow: var(--shadow-raise); transition: translate var(--duration-normal) var(--ease-out); }
.carry__switch:checked { background: var(--site-accent); }
.carry__switch:checked::after { translate: calc(var(--switch-w) - var(--switch-h)) 0; }
/* the miniature: the thing itself, a paper mini (components/paper-mini.css), its top in a small sand frame */
.carry__mini { --paper-mini-scale: .17; --paper-mini-frame-h: 64px; --paper-mini-fade: 12px; flex: none; width: 66px; padding-top: 6px;
  transition: opacity var(--duration-normal), filter var(--duration-normal); }

/* Wide screens: the carry steps out beside the card, the miniature at full size, tilted a little as a paper laid down,
   on its own dark glass so its words read over the screens. The card keeps its height, so the button stays put. */
@media (min-width: 1100px) {
  .carry { position: absolute; top: 0; right: calc(100% + clamp(32px, 3.4vw, 56px)); width: 256px; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto; gap: 18px var(--space-3); margin: 0; padding: var(--space-5) 18px 18px; border-radius: var(--r-2xl); background: var(--auth-glass);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--inv-strong) 14%, transparent), 0 0 0 1px var(--auth-line); }
  /* the miniature says the number, client and total; the sentence stays for screen readers */
  .carry .carry__what { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .carry .carry__mini { --paper-mini-scale: .6; --paper-mini-frame-h: 196px; --paper-mini-fade: 40px; grid-column: 1 / -1; width: auto;
    border-color: transparent; box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--auth-night-deep) 85%, transparent),
      0 0 80px -20px color-mix(in srgb, var(--site-accent-inv) 55%, transparent); }
  .carry__text, .carry__text b { color: var(--auth-text); }
  .carry__text b { font-size: 15px; }
  .carry__next { color: var(--auth-soft); }
  .carry .carry__switch { align-self: start; background: color-mix(in srgb, var(--inv-strong) 30%, transparent); }
  .carry .carry__switch:checked { background: var(--site-accent-inv); }
  .carry .carry__switch:checked::after { background: var(--auth-night-deep); }
  .auth-card .carry:has(input:focus-visible) { outline-color: var(--site-accent-inv); }
  /* the stage makes room on the left, so the paper and the card read as one group, centered together */
  .auth-card:has(> .carry) { translate: calc((256px + clamp(32px, 3.4vw, 56px)) / 2) 0; }
}

/* ---------- the promises, and the real screens behind ---------- */
.auth-promises { position: relative; z-index: 3; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-4);
  width: fit-content; max-width: calc(100% - 32px); margin: var(--space-5) auto 0; padding: var(--space-2) var(--space-5); border-radius: var(--r-pill);
  list-style: none; font-size: var(--fs-sm); color: var(--auth-text); background: var(--auth-glass); box-shadow: inset 0 0 0 1px var(--auth-line); }
.auth-promises li { display: inline-flex; align-items: center; }
.auth-promises li + li::before { content: ""; width: 3px; height: 3px; margin-right: var(--space-4); border-radius: 50%; background: currentColor; opacity: .6; }

.auth-reel { position: absolute; z-index: 1; left: 50%; top: 150px; width: max-content; translate: -50% 0; rotate: -6deg; display: grid; justify-items: center; gap: 26px;
  pointer-events: none; -webkit-mask-image: linear-gradient(var(--ink) 45%, transparent 88%); mask-image: linear-gradient(var(--ink) 45%, transparent 88%); }
/* a short drift that settles within 5 seconds (WCAG 2.2.2), still at once when the form is entered (outer/auth.js) */
.auth-reel__row { display: flex; gap: 26px; width: max-content; margin: 0; padding: 0; list-style: none; animation: auth-drift 4.8s var(--ease-out) both; }
.auth-reel__row + .auth-reel__row { animation-direction: reverse; }
@keyframes auth-drift { from { translate: 0 0; } to { translate: -6% 0; } }
.auth-shot { flex: none; width: 400px; margin: 0; overflow: hidden; border-radius: var(--r-lg); background: var(--bg-panel);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--inv-strong) 22%, transparent), 0 24px 50px -24px color-mix(in srgb, var(--auth-night-deep) 80%, transparent); }
.auth-shot::before { content: ""; display: block; height: 18px; border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 12px 9px, var(--sand-300) 2.5px, transparent 3px), radial-gradient(circle at 22px 9px, var(--sand-300) 2.5px, transparent 3px),
    radial-gradient(circle at 32px 9px, var(--sand-300) 2.5px, transparent 3px), var(--sand-50); }
.auth-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.auth-reel.is-still .auth-reel__row { animation-play-state: paused; }
/* dimmed until the visitor scrolls or has filled the form: there, never competing */
.js .auth-reel { opacity: .55; transition: opacity 1s var(--ease-out); }
.js .is-clear .auth-reel { opacity: 1; }
.auth--login .auth-reel { top: 120px; }

/* ---------- the close and the foot ---------- */
.auth-close { position: relative; z-index: 2; display: grid; justify-items: center; gap: var(--space-4); padding: 72px var(--site-gutter) 56px; text-align: center; }
.auth-close h2 { font-family: var(--font-display); font-weight: var(--font-display-weight); font-size: clamp(40px, 4.2vw, 60px); letter-spacing: -.04em;
  line-height: 1.04; color: var(--auth-text); }
.auth-close h2 .accent { padding-right: .06em; background: var(--auth-lit); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.auth-close .btn { min-width: 240px; min-height: 52px; border-radius: var(--auth-radius); background: var(--bg-panel); color: var(--ink);
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--auth-night-deep) 80%, transparent); }
.auth-close .btn:hover { background: var(--site-accent-inv); }
.auth-close .btn:focus-visible { outline: 2px solid var(--site-accent-inv); outline-offset: 3px; }
.auth-close p { max-width: 40em; font-size: var(--fs-body); color: var(--auth-text); }
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-6); width: 100%; max-width: var(--site-max);
  margin: 0 auto; padding: var(--space-6) var(--site-gutter) var(--space-8); border-top: 1px solid var(--auth-line); font-size: var(--fs-sm); color: var(--auth-text); }
.auth-foot a { color: inherit; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- the code (components/otp.css), in the card's petrol ---------- */
.auth { --otp-ring: var(--auth-ring); --otp-accent: var(--site-accent); --otp-radius: var(--auth-radius); }
.verify__code { display: grid; }
.two-step .auth-agreement { margin-bottom: var(--space-3); }

/* a button that reads as a link (Not you?, Create account with Google), and the address change: quiet, one line each */
.auth-link { min-height: var(--tap-min); padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--site-accent);
  cursor: pointer; text-underline-offset: 3px; }
.auth-link:hover { text-decoration: underline; }
.verify__inbox { display: flex; justify-content: center; align-items: center; gap: var(--icon-gap-sm); width: fit-content; min-height: 40px;
  margin: var(--space-4) auto 0; padding: 0 14px; border: 1px solid var(--field-border); border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  color: var(--ink); text-decoration: none; }
.verify__inbox:hover { border-color: var(--ink); }
.verify__change { margin-top: var(--space-3); padding-top: 14px; border-top: 1px solid var(--border-soft); font-size: 13px; text-align: center; }
.verify__change summary { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--tap-min); color: var(--text-muted); cursor: pointer; list-style: none; }
.verify__change summary::-webkit-details-marker { display: none; }
.verify__change summary span { font-weight: 600; color: var(--site-accent); }
.verify__change summary:hover span { text-decoration: underline; text-underline-offset: 3px; }
.verify__change[open] summary { margin-bottom: 6px; }
.verify__change-form { display: grid; gap: var(--space-3); text-align: left; }
.verify__change-actions { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-3); }
.verify__change-actions .btn { min-height: 40px; padding: 0 var(--space-4); font-size: 14px; border-radius: var(--auth-radius); background: var(--site-accent); color: var(--btn-primary-text); }
.auth-text-btn { min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--r-md); background: none; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; }
.auth-text-btn:hover { background: var(--bg-hover); color: var(--ink); }

/* confirmed: a seal, and the card's hairline drawing across while it hands over */
.verify--done { display: grid; justify-items: center; gap: var(--space-4); padding: 6px 0 2px; text-align: center; }
.auth .otp__seal { animation: auth-pop .5s var(--ease-out) both; }
.otp__seal--hero { margin: 0 auto 18px; background: color-mix(in srgb, var(--site-accent-inv) 22%, transparent); color: var(--site-accent-inv);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--site-accent-inv) 40%, transparent); }
@keyframes auth-pop { from { scale: .6; opacity: 0; } 60% { scale: 1.06; } }
.verify__done-lead { font-size: 15px; color: var(--text); }
.auth-card:has(.verify--done)::before { left: 0; right: 0; height: 3px; border-radius: var(--r-2xl) var(--r-2xl) 0 0; transform-origin: left;
  animation: auth-draw 1.6s var(--ease-out) both; }
@keyframes auth-draw { from { transform: scaleX(0); } }

/* ---------- your business: the head of an invoice (a paper mini), their name on it as they type ---------- */
.welcome-paper { --paper-mini-scale: 1; --paper-mini-frame-h: 132px; --paper-mini-fade: 40px; margin: 0 0 var(--space-5); padding: var(--space-4) var(--space-3) 0; }
.welcome-paper .paper-mini { width: auto; max-width: var(--paper-mini-width); }
.is-named .pm-biz, .is-named .pm-logo { animation: auth-take .35s var(--ease-out); }
@keyframes auth-take { from { opacity: .4; } }
.auth--welcome .auth-form { gap: 18px; }

/* ---------- the other account pages, said inside the card ---------- */
.auth-lead { margin-top: var(--space-3); font-size: var(--fs-body); color: var(--text-muted); }
.auth-lead b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.auth-detail a { font-weight: 600; color: var(--ink); text-underline-offset: 3px; }
.auth-back { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-sm); color: var(--text-muted); text-decoration: none; }
.auth-back:hover { color: var(--ink); }
.auth-detail { margin-top: var(--space-5); font-size: var(--fs-sm); line-height: 1.6; color: var(--text-muted); }
.auth-sent { text-align: center; }
.auth-sent-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 16px; background: var(--trust-bg); color: var(--trust); }
.auth-card > .field__hint { margin-bottom: var(--space-3); }
.auth-card > .btn { margin-top: var(--space-4); }
.g-account { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--auth-gap); padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-panel); }
.g-account > span:nth-child(2) { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--text-muted); overflow-wrap: anywhere; }
.g-account b { display: block; font-size: var(--fs-body); color: var(--ink); }
.g-account img { flex: none; width: var(--icon-size-lg); height: var(--icon-size-lg); }
.mail-hint { margin: 0 0 var(--space-5); }
.mail-hint figcaption { margin-bottom: var(--space-2); font-size: var(--fs-sm); color: var(--text-muted); }
.mail-hint__row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--border);
  border-radius: var(--r-lg); background: var(--bg-panel); }
.mail-hint__mark { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--r-pill); background: var(--paid-bg); color: var(--paid-fg); }
.mail-hint__text { flex: 1; min-width: 0; font-size: var(--fs-sm); line-height: 1.4; color: var(--text); }
.mail-hint__text b { display: block; font-size: var(--fs-body); color: var(--ink); }

/* Connecting an app (pages/connect-app.html; design docs/mocks/app/connections.html#consent). */
.connect__marks { display: flex; align-items: center; gap: var(--space-3); margin-bottom: 22px; }
.connect__mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; font-family: var(--font-serif); font-size: 20px; font-weight: 700; }
.connect__mark--app { background: var(--sand-100); color: var(--ink); }
.connect__mark--ours { background: light-dark(var(--bg-panel), var(--ink)); forced-color-adjust: none; }
.connect__mark--ours img { display: block; width: 100%; height: 100%; object-fit: contain; }
.connect__who-out { margin: var(--space-1) 0 0; }
.connect__link { width: 24px; border-top: 2px dotted var(--line); }
.connect__domain { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--trust); }
.connect { display: grid; gap: 10px; margin-top: 22px; }
.connect__h { margin: 10px 0 0; font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--caption); }
.connect__list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); line-height: 1.45; color: var(--text); }
.connect__list li, .connect__list label { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start; }
.connect__list li:has(> label) { display: block; }
.connect__list label { cursor: pointer; }
.connect__list input[type=checkbox] { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--gold); }
.connect__list .bg-icon { margin-top: 2px; }
.connect__list--can .bg-icon { color: var(--paid-fg); }
.connect__list--cant .bg-icon { color: var(--caption); }
.connect__note { margin: var(--space-2) 0 6px; font-size: var(--fs-sm); line-height: 1.45; color: var(--caption); }
.connect__status { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--text); }
.connect__cancel { margin-top: 10px; }
.connect__unverified, .connect__refused { margin: 14px 0 0; }
.connect__target { overflow-wrap: anywhere; }
.connect__started { margin: 14px 0 0; font-size: var(--fs-sm); line-height: 1.45; color: var(--text); }

/* dark: the night stays a night; the card follows the theme's panel */
[data-theme="dark"] .auth { --paper: var(--bg-app); --caption: var(--text-muted); --site-accent: var(--site-accent-inv); }
[data-theme="dark"] .auth-submit { color: var(--auth-night-deep); }

/* ---------- short laptops: still 48px controls; the air between them gives a little ---------- */
@media (max-height: 800px) and (min-width: 861px) {
  .auth { --auth-gap: 12px; }
  .auth-hero { padding-top: 6px; }
  .auth-hero__title { font-size: clamp(44px, 4.4vw, 60px); }
  .auth-hero__lead { margin-top: var(--space-2); font-size: var(--fs-body); }
  .auth-card { margin-top: var(--space-4); padding: 22px var(--space-7) var(--space-5); }
  .auth-card .auth-agreement { min-height: 36px; }
}

/* ---------- a phone: the logo alone above, the form, then the screens, then the close ---------- */
@media (max-width: 860px) {
  .auth-top { padding: var(--space-3) var(--space-4) 0; }
  .auth-switch--top { display: none; }
  .auth-switch--card { display: block; }
  .auth-stage { display: block; min-height: 0; padding-bottom: 0; }
  .auth-hero { padding: var(--space-5) var(--space-4) 0; }
  .auth-hero__title { font-size: 46px; }
  .auth-hero__lead { font-size: var(--fs-body); }
  .auth-card { width: calc(100% - 32px); padding: var(--space-6) 18px 22px; }
  .auth-card::before { left: 18px; right: 18px; }
  .auth-promises { gap: var(--space-1) var(--space-5); }
  .auth-promises li + li::before { display: none; }
  .auth-reel { position: relative; top: auto; left: auto; width: max-content; translate: none; rotate: none; margin: var(--space-8) 0 0;
    -webkit-mask-image: none; mask-image: none; }
  .auth-shot { width: 280px; }
  .auth-close { padding: 56px var(--space-4) 40px; }
}
/* narrow phones: the last-used tag is its first word alone, no pill, so it never crowds the label */
@media (max-width: 420px) {
  .auth-last { right: 10px; padding: 0; background: none; }
  .auth-last__more { display: none; }
}

/* site.css stills every animation and transition; a press doesn't move either */
@media (prefers-reduced-motion: reduce) {
  .auth-submit:active, .btn-google:active { transform: none; }
}
