/* Standalone pages (login, reset-password, pending, pricing, account): the shared
   primitives from impeccable-preview/assets/css/oc-after.css, on the 10-10 role
   tokens (tokens.css). Page-specific layout lives in pricing.css / account.css.
   Type roles: meta 13 / label 14 / body 16 / card 20 / section 22-24 / title 40. */
* { box-sizing: border-box; }
html { scrollbar-color: var(--border-strong) var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Page shell: no body padding, so the beta banner (first body child) is full-bleed. */
.shell { padding: var(--s5) var(--gutter) 64px; }
.wrap { margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 44px; margin-bottom: var(--s6); }
.home { display: inline-flex; align-items: center; gap: 10px; color: var(--fg-2); text-decoration: none; font-size: 15px; }
.home img { width: 28px; height: 28px; }
.home:hover, .toplink:hover { color: var(--fg); }
.toplink { color: var(--fg-2); text-decoration: none; font-size: 15px; padding: 10px 4px; }
.lede { color: var(--fg-2); font-size: 17px; max-width: 62ch; }
.meta { color: var(--muted); font-size: 14px; }
.credit { color: var(--credit); font-weight: 600; }

/* Buttons: one filled action colour (--accent + --on-accent), one outline, one destructive. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-decoration: none; transition: background-color .15s ease-out, border-color .15s ease-out;
}
.btn:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--fg); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--muted); color: var(--fg); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--surface-2); color: var(--danger); }
.btn-danger-solid { background: var(--danger-solid); color: white; }
.btn-danger-solid:hover { background: var(--danger-solid); color: white; filter: brightness(1.1); }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.linkbtn:hover { color: var(--accent-strong); }

/* Fields: 44px, 16px text at every width (no iOS focus zoom). */
.field label { display: block; font-size: 14px; color: var(--fg-2); margin: 0 0 6px; font-weight: 500; }
.field + .field { margin-top: var(--s4); }
.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--field); color: var(--fg); font-size: 16px;
  transition: border-color .15s ease-out;
}
.input::placeholder { color: var(--faint); }
.input:hover { border-color: var(--muted); }
.input:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--fg-2); line-height: 1.5; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 18px; accent-color: var(--accent); cursor: pointer; }
.msg { font-size: 14px; min-height: 20px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }
.notice { padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--warn); background: var(--surface); color: var(--fg); font-size: 15px; }

/* Footer: operator identity + the page's legal links. */
.legal { margin-top: 64px; padding-top: var(--s5); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; color: var(--muted); }
.legal nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.legal a { color: var(--muted); }
.legal a:hover { color: var(--fg); }

/* Auth card pages (login, reset-password, pending): column body, so the beta
   banner and the footer stay in flow and never cover the card (390x667). */
body.auth-page { display: flex; flex-direction: column; }
.auth-main { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: var(--s7) var(--s4); }
.auth-card { width: 100%; max-width: 400px; padding: var(--s6); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: 0 16px 48px -16px rgba(0, 0, 0, .6); }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; }
.brand span { color: var(--accent); }
.auth-card h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.015em; font-weight: 650; margin-bottom: var(--s5); }
.auth-card .sub { color: var(--fg-2); font-size: 15px; margin: -16px 0 var(--s5); }
.auth-card form .btn { margin-top: var(--s5); width: 100%; min-height: 46px; font-size: 16px; }
.auth-card .msg { margin-top: var(--s4); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.label-row .linkbtn { font-size: 14px; text-decoration: none; padding: 4px 0; }
.label-row .linkbtn:hover { text-decoration: underline; }
.auth-alt { margin-top: var(--s5); padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); display: grid; gap: 8px; text-align: center; }
.page-foot { padding: 0 var(--s4) var(--s5); text-align: center; font-size: 13px; color: var(--muted); line-height: 1.7; }
.page-foot a { color: var(--muted); }
.page-foot a:hover { color: var(--fg); }

@media (max-width: 767px) {
  .shell { padding: var(--s4) var(--gutter) var(--s7); }
  .topbar { margin-bottom: var(--s5); }
  .btn { min-height: 44px; }
  .legal { flex-direction: column; }
  .auth-main { padding: var(--s5) var(--s4); align-items: flex-start; }
  .auth-card { padding: var(--s5) 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; } }
