/* v112-auth.css — night build phase 3 (plan E). Tokens only.
   The account screens (pages/lauth.js · ui/states.js invitePage): a calm full page — the logo on top, one centred card, nothing else. Prefix au-.
   The billing banner on top of every page in the app (pages/lauth.js billingBanner): prefix bill-. A read-only write control: [data-ro] (main.js). */

/* ---------- the frame ---------- */
.au-app{height:100vh;height:100dvh;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;background:var(--canvas)}
.au-top{flex:none;display:flex;align-items:center;justify-content:center;padding:40px 16px 8px}
.au-logo{display:inline-flex;color:var(--dp-ink)}   /* identity v1.0 (Product 02-SignIn): the 48px mark alone, black on light, white on dark */
.au-main{flex:1 0 auto;display:flex;justify-content:center;padding:20px 16px 64px}
.au-page{width:100%;max-width:440px;display:flex;flex-direction:column;align-items:stretch;gap:16px}
.au-page:has(> .au-card.is-wide){max-width:560px}
.au-page > .sys-card,.au-page > .sys-crash{margin-top:0;max-width:none}

/* ---------- the prototype's strip: which screen, its states, the way back ---------- */
.au-pv{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border-radius:var(--r-12);background:var(--accent-tint);color:var(--text-2);font-size:var(--t-co);line-height:var(--lh-co)}
.au-pv-t{display:flex;align-items:flex-start;gap:6px;margin:0}
.au-pv-t svg{flex:none;margin-top:2px;color:var(--accent-text)}
.au-pv-t b{color:var(--text-1);font-weight:var(--w-semibold)}
.au-pv-s{display:flex;flex-wrap:wrap;gap:4px}
.au-pv-a{display:inline-flex;align-items:center;min-height:26px;padding:0 9px;border-radius:var(--r-full);background:var(--surface-1);color:var(--text-2);font-size:var(--t-meta);line-height:var(--lh-meta);font-weight:var(--w-medium);box-shadow:inset 0 0 0 1px var(--line);transition:var(--tr-ui)}
@media (hover:hover){.au-pv-a:hover{color:var(--text-1);box-shadow:inset 0 0 0 1px var(--line-strong)}}
.au-pv-a.is-on{background:var(--text-1);color:var(--surface-1);box-shadow:none}
.au-pv-x{align-self:flex-start;color:var(--accent-text);font-weight:var(--w-medium);text-decoration:underline;text-decoration-color:transparent;text-underline-offset:2px;transition:var(--tr-ui)}
.au-pv-l{display:flex;flex-wrap:wrap;gap:4px 16px}
@media (hover:hover){.au-pv-x:hover{text-decoration-color:currentColor}}

/* ---------- the card ---------- */
.au-card{display:flex;flex-direction:column;align-items:stretch;gap:16px;padding:28px;background:var(--surface-1);border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--sh-tiny)}
.au-tile{align-self:flex-start;display:grid;place-items:center;width:40px;height:40px;border-radius:var(--r-full);background:var(--fill-2);color:var(--text-2)}
.au-tile.is-green{background:var(--st-green-bg);color:var(--st-green-fg)}
.au-tile.is-blue{background:var(--st-blue-bg);color:var(--st-blue-fg)}
.au-tile.is-orange{background:var(--st-orange-bg);color:var(--st-orange-fg)}
.au-tile.is-gray{background:var(--st-gray-bg);color:var(--st-gray-fg)}
.au-tile + .au-h{margin-top:-4px}
.au-h{margin:0;font-size:var(--t-t1);line-height:var(--lh-t1);font-weight:var(--w-semibold);letter-spacing:var(--ls-t1);color:var(--text-1);text-wrap:pretty;overflow-wrap:break-word}   /* fixer r1: pretty, not balance — no early, uneven breaks */
.au-nw{white-space:nowrap}
.au-p{margin:-8px 0 0;font-size:var(--t-body);line-height:var(--lh-body);color:var(--text-2);text-wrap:pretty}
.au-p b{color:var(--text-1);font-weight:var(--w-medium);overflow-wrap:anywhere}
.au-acts{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.au-row{display:flex;flex-wrap:wrap;gap:8px}
.au-btn{text-decoration:none}
.au-btn.is-full{width:100%;height:var(--h-in)}
.au-acts .au-btn:not(.sm){height:var(--h-head)}
@media (max-width:520px){.au-acts .au-btn:not(.sm){white-space:normal;height:auto;min-height:var(--h-head);padding-top:6px;padding-bottom:6px;text-align:center}}   /* night fix (Oct 8): a long label wraps inside its button on a phone, never past the card */
/* fixer r1 (AUTH-13): Google's button colours — light #FFF / #747775 / #1F1F1F, dark #131314 / #8E918F / #E3E3E3 — with the four-colour G */
.au-google{--g-fill:#fff;--g-stroke:#747775;--g-ink:#1f1f1f;--g-hover:rgba(31,31,31,.08);background:var(--g-fill);border:1px solid var(--g-stroke);color:var(--g-ink);white-space:normal;min-height:var(--h-in);height:auto;text-align:center}
:root[data-theme="dark"] .au-google{--g-fill:#131314;--g-stroke:#8e918f;--g-ink:#e3e3e3;--g-hover:rgba(227,227,227,.08)}
@media (hover:hover){.au-google:hover{background:linear-gradient(var(--g-hover),var(--g-hover)),var(--g-fill);border-color:var(--g-stroke)}}
.au-g{flex:none;display:inline-grid;place-items:center;width:18px;height:18px}
.au-g svg{display:block;width:18px;height:18px}
.au-google .bl,.au-google .bl svg{flex:none;color:var(--bl,var(--text-1))}
.au-or{display:flex;align-items:center;gap:12px;color:var(--text-3);font-size:var(--t-meta);line-height:var(--lh-meta)}
.au-or::before,.au-or::after{content:"";flex:1;height:1px;background:var(--line)}

/* ---------- fields ---------- */
.au-form{display:flex;flex-direction:column;gap:14px}
.au-f{display:flex;flex-direction:column;gap:6px;min-width:0}
.au-lr{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.au-f.has-aside{position:relative}
.au-f.has-aside > .au-lr{padding-right:132px}
.au-aside{position:absolute;top:0;right:0;font-size:var(--t-co);line-height:var(--lh-co)}   /* after the field in the Tab order, beside the label on screen */
.au-l{font-size:var(--t-co);line-height:var(--lh-co);font-weight:var(--w-medium);color:var(--text-1)}
.au-in{width:100%;min-width:0;height:var(--h-in);padding:0 12px;border-radius:var(--r-ctl);border:1px solid var(--line-ctl);background:var(--surface-1);font-size:var(--t-body);line-height:var(--lh-body);color:var(--text-1);transition:var(--tr-ui)}
.au-in::placeholder{color:var(--fg-4)}
@media (hover:hover){.au-in:hover{border-color:var(--line-ctl-h)}}
.au-in:focus{border-color:var(--line-ctl-h)}
.au-in[readonly]{background:var(--fill-1);color:var(--text-2)}
.au-sel{padding-right:8px;cursor:pointer}
.au-hint{margin:0;font-size:var(--t-co);line-height:var(--lh-co);color:var(--text-3)}
.au-pwr{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;row-gap:6px}
.au-pwr .au-in{grid-column:1 / -1;grid-row:1;padding-right:46px}
.au-eye{grid-column:2;grid-row:1;z-index:1;display:grid;place-items:center;width:36px;height:36px;margin-right:1px;border-radius:var(--r-ctl);color:var(--text-3);transition:var(--tr-ui)}
@media (hover:hover){.au-eye:hover{background:var(--hover);color:var(--text-1)}}
.au-eye[aria-pressed="true"]{color:var(--text-1)}
.au-pwr > .fb-err{grid-column:1 / -1}
.au-two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.au-lk{display:inline-flex;align-items:center;gap:4px;color:var(--accent-text);font-size:var(--t-co);line-height:var(--lh-co);font-weight:var(--w-medium);text-decoration:underline;text-decoration-color:transparent;text-underline-offset:2px;transition:var(--tr-ui)}
@media (hover:hover){.au-lk:hover{text-decoration-color:currentColor}}
.au-alt{margin:-4px 0 0;font-size:var(--t-co);line-height:var(--lh-co);color:var(--text-2);text-align:center}

/* ---------- notes, alerts, facts, steps ---------- */
.au-note,.au-proto{display:flex;align-items:flex-start;gap:6px;margin:0;font-size:var(--t-co);line-height:var(--lh-co);color:var(--text-3);text-wrap:pretty}
.au-note svg,.au-proto svg{flex:none;margin-top:2px}
.au-proto{padding-top:12px;border-top:1px solid var(--line)}
.au-alert{display:flex;align-items:flex-start;gap:10px;padding:12px;border-radius:var(--r-12);font-size:var(--t-co);line-height:var(--lh-co);color:var(--text-1)}
.au-alert > svg{flex:none;margin-top:1px}
.au-alert b{font-weight:var(--w-semibold)}
.au-alert.is-bad{background:var(--st-red-bg)}
.au-alert.is-bad > svg{color:var(--st-red-fg)}
.au-alert.is-warn{background:var(--st-orange-bg)}
.au-alert.is-warn > svg{color:var(--st-orange-fg)}
.au-alert.is-info{background:var(--st-blue-bg)}
.au-alert.is-info > svg{color:var(--st-blue-fg)}
.au-alert-b{min-width:0;flex:1;text-wrap:pretty;overflow-wrap:anywhere}
.au-alert-a{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:6px}
.au-dl{display:flex;flex-direction:column;margin:0;border-top:1px solid var(--line)}
.au-dr{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;padding:10px 0;border-bottom:1px solid var(--line);font-size:var(--t-co);line-height:var(--lh-co)}
.au-dr dt{color:var(--text-3)}
.au-dr dd{margin:0;color:var(--text-1);overflow-wrap:anywhere}
.au-next{display:flex;flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;counter-reset:au}
.au-next > li{position:relative;display:flex;flex-direction:column;gap:2px;padding-left:32px;font-size:var(--t-co);line-height:var(--lh-co);color:var(--text-2);counter-increment:au}
.au-next > li::before{content:counter(au);position:absolute;left:0;top:-1px;display:grid;place-items:center;width:22px;height:22px;border-radius:var(--r-full);background:var(--fill-2);color:var(--text-2);font-size:var(--t-sh);line-height:var(--lh-sh);font-weight:var(--w-semibold);font-variant-numeric:tabular-nums}
.au-next.is-plain > li{padding-left:16px}
.au-next.is-plain > li::before{content:"";top:7px;width:6px;height:6px;background:var(--text-3)}
.au-next b{color:var(--text-1);font-weight:var(--w-medium);font-size:var(--t-body);line-height:var(--lh-body)}
.au-steps{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;font-size:var(--t-co);line-height:var(--lh-co);color:var(--text-3)}
.au-steps li{display:flex;align-items:center;gap:8px}
.au-steps li.is-done{color:var(--text-2)}
.au-steps li.is-done svg{color:var(--st-green-fg)}
.au-steps li.is-now{color:var(--text-1);font-weight:var(--w-medium)}
.au-steps li.is-now svg{color:var(--accent-text);animation:au-turn var(--dur-spin) linear infinite}
@keyframes au-turn{to{transform:rotate(1turn)}}
@media (prefers-reduced-motion:reduce){.au-steps li.is-now svg{animation:none}}
.au-lockn{display:flex;align-items:flex-start;gap:8px;padding:10px 12px;border-radius:var(--r-12);background:var(--fill-1);font-size:var(--t-co);line-height:var(--lh-co);color:var(--text-2)}
.au-lockn svg{flex:none;margin-top:2px;color:var(--text-3)}
.au-lockn b{color:var(--text-1);font-weight:var(--w-medium)}
.au-paddle{display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:var(--r-12);border:1px dashed var(--line-strong)}
.au-paddle-t{display:flex;align-items:flex-start;gap:6px;margin:0;font-size:var(--t-co);line-height:var(--lh-co);color:var(--text-2)}
.au-paddle-t svg{flex:none;margin-top:2px;color:var(--text-3)}
.au-paddle-t b{color:var(--text-1)}
.au-foot{margin:0;text-align:center;font-size:var(--t-co);line-height:var(--lh-co);color:var(--text-3);text-wrap:balance}
.au-foot-a{color:var(--link);font-weight:var(--w-medium);text-decoration:underline;text-underline-offset:2px;border-radius:var(--r-4)}   /* night C2: a new visitor's way in */

/* ---------- phones ---------- */
@media (max-width:520px){
  .au-top{padding-top:20px}
  .au-main{padding:12px 16px 48px}
  .au-card{padding:20px 18px;gap:14px}
  .au-two{grid-template-columns:minmax(0,1fr)}
  .au-dr{grid-template-columns:minmax(0,1fr);gap:2px}
  .au-acts > .au-btn{flex:1 1 auto}
}

/* ---------- in the app: the billing banner (payment failed · read-only) ---------- */
.bill-bar{display:flex;align-items:flex-start;gap:10px;margin:0 0 16px;padding:10px 12px;border-radius:var(--r-12);font-size:var(--t-co);line-height:var(--lh-co);color:var(--text-1)}
.bill-bar.is-due{background:var(--st-orange-bg)}
.bill-bar.is-ro{background:var(--st-gray-bg)}
.bill-ic{flex:none;display:grid;place-items:center;margin-top:1px}
.bill-bar.is-due .bill-ic{color:var(--st-orange-fg)}
.bill-bar.is-ro .bill-ic{color:var(--text-2)}
.bill-t{flex:1;min-width:0;margin:0;text-wrap:pretty}
.bill-t b{font-weight:var(--w-semibold)}
.bill-acts{display:flex;flex-wrap:wrap;gap:6px;flex:none}
.bill-a{flex:none;text-decoration:none}
.bill-pv{flex:none;align-self:center}
.bill-bar.is-ro .bill-pv{background:var(--surface-1);box-shadow:inset 0 0 0 1px var(--line-strong)}   /* fixer r1: the chip keeps its shape on the gray bar */
.bill-short{display:none}
@media (max-width:760px){
  .bill-bar{flex-wrap:wrap;align-items:center}
  .bill-t{flex-basis:calc(100% - 28px)}
  .bill-acts,.bill-bar > .bill-a,.bill-pv{margin-left:26px}
  .bill-pv + .bill-acts,.bill-pv + .bill-a{margin-left:0}
  .bill-long{display:none}
  .bill-short{display:inline}
}

/* ---------- a write control while the workspace is read-only (main.js marks it; a click says why) ---------- */
.btn[data-ro]{opacity:.5;cursor:not-allowed}
/* fixer r1 (C1): an account-screen button that is off looks off */
.au-btn[aria-disabled="true"]{opacity:.45;cursor:not-allowed}
@media (hover:hover){.au-btn.pri[aria-disabled="true"]:hover{background:var(--brand)}}
@media (hover:hover){.btn.pri[data-ro]:hover{background:var(--brand)}}

/* ---------- Plans & billing: the billing simulator (prototype) ---------- */
.pp-sim{margin-top:16px}
.pp-sim-b{display:flex;flex-direction:column;gap:2px}
.pp-sim-a{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.pp-sim .btn[aria-pressed="true"]{box-shadow:inset 0 0 0 1px var(--line-strong);color:var(--text-1)}

/* fixer r1 (§8 · A14): on a phone the account screens' main controls are 44px tall */
@media (max-width:480px){
  .au-in,.au-btn,.au-google,.au-btn.is-full{min-height:44px}
  .au-eye{width:44px;height:44px}
}
