/* kveo ID — universal login and account surfaces.
   Follows kveo's graphic handbook 2.0 (kveo.no/phb, source: yirmi-panel public/phb/assets/profil.css),
   the same profile as the public kveo.no site (yirmi-panel public/css/warm.css, last layer):
   - Palette: cream #FBF6EF, paper #FFFDF9, ink #2A1C13. Terracotta #C4511F only where you can do
     something (buttons, links). The logo dot #FE7916 is the signature. Espresso in the dark theme.
   - Type: Fraunces 500 for headings, Nunito Sans for everything you read or fill in (self-hosted,
     SIL OFL, licences next to the files in /static/fonts).
   - Radii 10 / 14 / 22 / 32. The bow (a cut-out circle meeting the edge of the format) is the only
     decoration. No other colours, no pastels, no tilted cards.
   - Apple HIG layer: 44 px touch targets, no lift or zoom on hover, one emphasised button per
     section, motion only under prefers-reduced-motion: no-preference, glass falls back to solid
     under prefers-reduced-transparency.
   Contrast (computed, sRGB): light: ink 15.3:1 / muted 6.6:1 / link 6.5:1 on cream, button text
   4.6:1 on terracotta, control border 3.0:1; dark: ink 15.8:1 / muted 7.9:1 / link 8.8:1 on
   espresso, button text 6.8:1, control border 4.0:1. Status text >= 5.5:1 on its tint.
   No inline styles anywhere (CSP style-src 'self'). */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/fraunces-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/fraunces-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400 800; font-stretch: 100%; font-display: swap;
  src: url(/static/fonts/nunito-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400 800; font-stretch: 100%; font-display: swap;
  src: url(/static/fonts/nunito-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: light;
  --canvas:#fbf6ef; --sunk:#f4ece1; --surface:#fffdf9; --surface-2:#f6eee3; --surface-3:#f0e4d4;
  --ink:#2a1c13; --ink-2:#47342a; --muted:#6a5446; --faint:#78604f;
  --line:#e7d9c8; --line-strong:#a38a76;
  --accent:#c4511f; --accent-hover:#a8431a; --accent-ink:#983c15; --accent-soft:#fbe6d8; --accent-line:#eab89a; --on-accent:#ffffff;
  --ok:#2f6a3c; --ok-soft:#e8efe1; --danger:#9e2a2b; --danger-soft:#f9e5df; --danger-line:#e5b4aa;
  --shadow-sm: 0 1px 2px rgba(74,44,20,.06);
  --shadow: 0 1px 2px rgba(74,44,20,.05), 0 18px 40px -24px rgba(74,44,20,.28);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark;
    --canvas:#1a1410; --sunk:#15100d; --surface:#221a15; --surface-2:#271f19; --surface-3:#30261e;
    --ink:#f6ede3; --ink-2:#e2d3c4; --muted:#bba796; --faint:#ad9886;
    --line:#3d3128; --line-strong:#8c7664;
    --accent:#e8804a; --accent-hover:#f09a68; --accent-ink:#f2a173; --accent-soft:#3a2418; --accent-line:#7a4528; --on-accent:#1f0f06;
    --ok:#8fd0a0; --ok-soft:#1e2a20; --danger:#f29a8c; --danger-soft:#3a1d18; --danger-line:#74382e;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 18px 42px -24px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] { color-scheme: dark;
  --canvas:#1a1410; --sunk:#15100d; --surface:#221a15; --surface-2:#271f19; --surface-3:#30261e;
  --ink:#f6ede3; --ink-2:#e2d3c4; --muted:#bba796; --faint:#ad9886;
  --line:#3d3128; --line-strong:#8c7664;
  --accent:#e8804a; --accent-hover:#f09a68; --accent-ink:#f2a173; --accent-soft:#3a2418; --accent-line:#7a4528; --on-accent:#1f0f06;
  --ok:#8fd0a0; --ok-soft:#1e2a20; --danger:#f29a8c; --danger-soft:#3a1d18; --danger-line:#74382e;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 18px 42px -24px rgba(0,0,0,.7);
}
/* Shared by both themes. The logo dot and the bow are fixed brand values (handbook ch. 10, 14). */
:root {
  --logo-dot:#fe7916; --bow:#c4511f;
  /* Client brand colour (set by id.js from the app registration). Only the app's own mark uses
     it; kveo ID's primary action stays terracotta. */
  --brand: var(--ink);
  --font: "Nunito Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-xs: 10px; --r-sm: 14px; --r-md: 22px; --r-lg: 32px;
  --control-h: 48px;
  --ease: cubic-bezier(.28,.11,.32,1);
}
@media (pointer: coarse) { :root { --control-h: 52px; } }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--canvas); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--canvas); color: var(--ink); font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent-soft); color: var(--ink); }
a { color: inherit; }
img { max-width: 100%; }
code { font: 500 .875em/1 var(--font-mono); background: var(--surface-2); padding: .15em .4em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 10; background: var(--surface); color: var(--ink); padding: 10px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-xs); font-weight: 700; text-decoration: none; }
.skip:focus { top: 16px; }

/* ---------------------------------------------------------------- frame + bow */
.shell { position: relative; isolation: isolate; overflow: hidden; overflow: clip; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
/* The bow: an outer terracotta circle and the logo-dot circle, cut by the bottom-right edge of the
   page. Pure decoration (pseudo-elements); content always sits on a plain surface above it. */
.shell::before, .shell::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; aspect-ratio: 1; pointer-events: none; }
.shell::before { width: clamp(130px, 18vw, 280px); right: calc(clamp(130px, 18vw, 280px) * -.42); bottom: calc(clamp(130px, 18vw, 280px) * -.5); background: var(--bow); }
.shell::after { width: clamp(80px, 11vw, 176px); right: calc(clamp(80px, 11vw, 176px) * -.36); bottom: calc(clamp(80px, 11vw, 176px) * -.4); background: var(--logo-dot); }
/* Wide screens: the bow stays in the corner of the window, well clear of the centred card. */
@media (min-width: 960px) { .shell::before, .shell::after { position: fixed; } }
@media (max-width: 600px) {
  .shell::before { width: 132px; right: -64px; bottom: -72px; }
  .shell::after { width: 78px; right: -30px; bottom: -36px; }
}

/* Masthead: wordmark, a hairline and the product name (handbook mast). The SVG has air on the
   right; the negative margin keeps one dot diameter between the visible mark and the divider. */
.brandbar { display: flex; justify-content: center; padding: 20px 0 4px; }
.wordmark { display: inline-flex; align-items: center; gap: 0; text-decoration: none; color: var(--ink); border-radius: var(--r-xs); min-height: 44px; }
.wm-logo { display: block; width: 114px; height: 38px; margin: 0 -26px -2px -3px; }
.wm-dark { display: none; }
.wm-id { display: block; border-left: 1px solid var(--line-strong); padding-left: 14px; font: 700 19px/1 var(--font); letter-spacing: .01em; color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wm-light { display: none; }
  :root:not([data-theme="light"]) .wm-dark { display: block; }
}
:root[data-theme="dark"] .wm-light { display: none; }
:root[data-theme="dark"] .wm-dark { display: block; }

.stage { display: grid; place-items: start center; padding: 24px 0 48px; }
@media (min-height: 760px) and (min-width: 600px) { .stage { place-items: center; padding-bottom: 8vh; } }

/* ---------------------------------------------------------------- card */
.card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 28px 22px 20px; }
@media (min-width: 600px) { .card { padding: 40px 40px 28px; } }

.client { display: flex; justify-content: flex-start; margin: 0 0 20px; }
.client-logo, .client-mono { width: 56px; height: 56px; border-radius: var(--r-sm); }
.client-logo { object-fit: contain; background: var(--surface-2); border: 1px solid var(--line); }
.client-mono { display: grid; place-items: center; background: var(--brand); color: var(--canvas); font: 700 24px/1 var(--font);
  box-shadow: inset 0 0 0 1px rgba(42,28,19,.12); }
.client[data-brand] .client-mono { color: #fff; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; font-optical-sizing: auto; }
h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
@media (min-width: 600px) { h1 { font-size: 32px; } }
.lead { margin: 0 0 24px; color: var(--muted); font-size: 16.5px; line-height: 1.55; text-wrap: pretty; }
.card > h1 + .form, .card > h1 + .alert { margin-top: 24px; }

/* ---------------------------------------------------------------- forms */
.form { display: grid; gap: 18px; }
.pair { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 380px) { .pair { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
label { font-weight: 700; font-size: 14px; color: var(--ink-2); }
input[type="email"], input[type="password"], input[type="text"], input[type="tel"], input[type="url"], input[type="number"], input:not([type]), input[inputmode] {
  width: 100%; height: var(--control-h); padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-xs);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 17px; }
/* Focus on a field: a 2px terracotta edge (>= 3:1) plus a soft halo. */
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--accent-soft); }
input[aria-invalid="true"] { border-color: var(--danger); }
input::placeholder { color: var(--faint); }
input.code { font-size: 26px; letter-spacing: .3em; font-variant-numeric: tabular-nums; text-align: center; padding-left: calc(14px + .3em); }
.pw { position: relative; }
.pw input { padding-right: 96px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; translate: 0 -50%; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-xs);
  background: transparent; color: var(--accent-ink); font: 700 14px/1 var(--font); cursor: pointer; }
.pw-toggle:hover { background: var(--surface-2); }
.hint { margin: 0; font-size: 14px; color: var(--muted); }
.err { margin: 0; font-size: 14px; color: var(--danger); font-weight: 600; }
.err::before { content: "■ "; font-size: .7em; vertical-align: .15em; }
.legal { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--ink-2); cursor: pointer; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }

/* ---------------------------------------------------------------- buttons + links
   Primary: flat terracotta, the one emphasised action in a section. Secondary: paper with a
   3:1 border. No lift, zoom or press-scaling: colour is the feedback. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: var(--control-h); padding: 0 22px;
  border-radius: var(--r-md); border: 1px solid transparent; font: 700 16px/1.2 var(--font); cursor: pointer; text-decoration: none; text-align: center; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-auto { width: auto; justify-self: start; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn-link, .btn-quiet { background: none; border: 0; padding: 8px 10px; min-height: 44px; font: 700 15px/1.2 var(--font); cursor: pointer; border-radius: var(--r-xs); }
.btn-link { color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: .23em; }
.btn-quiet { color: var(--muted); }
.btn-link:hover { text-decoration-color: currentColor; }
.btn-quiet:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .23em; }

/* Links that do something: terracotta ink, always underlined (handbook: links in text are underlined). */
.link { color: var(--accent-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent-line); text-decoration-thickness: 1px;
  text-underline-offset: .23em; border-radius: 4px; }
.link:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }

.alt { margin: 22px 0 0; color: var(--muted); font-size: 15px; }
.alt + .alt { margin-top: 6px; }
.alt .btn-link, .alt .btn-quiet { margin-left: -10px; }
.cancel { display: flex; justify-content: flex-start; margin: 12px 0 0 -10px; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.actions form { display: contents; }
@media (max-width: 380px) { .actions { grid-template-columns: 1fr; } .actions form:last-child .btn { order: -1; } }

/* ---------------------------------------------------------------- status
   Never colour alone: error = square, notice = ring, ok = check (handbook ch. 16). */
.alert, .notice { border-radius: var(--r-sm); padding: 12px 16px; font-size: 15px; margin-bottom: 16px; }
.alert { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-line); font-weight: 600; }
.alert::before { content: "■ "; font-size: .7em; vertical-align: .15em; }
.notice { background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line); }
.notice::before { content: "○ "; font-weight: 700; color: var(--accent-ink); }

.scopes { list-style: none; margin: 0 0 20px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.scopes li { padding: 14px 16px 14px 44px; position: relative; color: var(--ink-2); }
.scopes li + li { border-top: 1px solid var(--line); }
.scopes li::before { content: ""; position: absolute; left: 18px; top: 22px; width: 9px; height: 9px; border-radius: 50%; background: var(--logo-dot); }
.card .hint + .hint { margin-top: 8px; }

.mark { width: 48px; height: 48px; border-radius: 50%; margin: 0 0 20px; display: grid; place-items: center; }
.mark-ok { background: var(--ok-soft); }
.mark-ok::after { content: ""; width: 14px; height: 8px; border: solid var(--ok); border-width: 0 0 3px 3px; transform: rotate(-45deg) translate(1px, -2px); }
.mark-err { background: var(--danger-soft); }
.mark-err::after { content: ""; width: 14px; height: 14px; background: var(--danger); border-radius: 3px; }

/* ---------------------------------------------------------------- home */
.hero { max-width: 640px; padding: 6vh 0; }
.display { font-size: clamp(42px, 8vw, 76px); line-height: 1.04; letter-spacing: -.035em; margin: 0 0 18px; text-align: left; }
.hero .lead { font-size: 19px; max-width: 34ch; }
.hero-cta { margin: 28px 0 0; display: flex; justify-content: flex-start; }
.points { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 0; max-width: 460px; border-top: 1px solid var(--line-strong); }
.points li { padding: 14px 0 14px 26px; position: relative; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.points li::before { content: ""; position: absolute; left: 2px; top: 50%; width: 9px; height: 9px; margin-top: -4px; border-radius: 50%; background: var(--logo-dot); }

/* ---------------------------------------------------------------- footer */
.foot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0; color: var(--muted); font-size: 14px; }
.foot-links { display: flex; gap: 4px 20px; flex-wrap: wrap; justify-content: center; }
.foot-links a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; border-radius: 4px; font-weight: 600; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .23em; }
.theme { display: inline-flex; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-md); padding: 3px; }
.theme[hidden] { display: none; }
.theme button { border: 0; background: none; color: var(--muted); font: 700 13px/1 var(--font); padding: 0 14px; border-radius: var(--r-md); cursor: pointer; min-height: 36px; }
.theme button:hover { color: var(--ink); }
.theme button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
@media (pointer: coarse) { .theme button { min-height: 44px; } }

/* ---------------------------------------------------------------- motion (opt-in only) */
@media (prefers-reduced-motion: no-preference) {
  .card, .hero { animation: rise .5s var(--ease) both; }
  @keyframes rise { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: none; } }
  .btn, .pw-toggle, .theme button, .choice { transition: background-color .15s, border-color .15s, color .15s; }
  input { transition: border-color .15s, box-shadow .15s; }
}
@media (forced-colors: active) {
  .btn, input { border: 1px solid CanvasText; }
  input:focus, select:focus, textarea:focus { outline: 2px solid Highlight; outline-offset: 1px; }
  .shell::before, .shell::after { display: none; }
}

/* ---------------------------------------------------------------- Stage 2: passkeys, second factor */
.btn-passkey { margin-top: 0; }
.btn-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.divider[hidden] { display: none; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.card [data-passkey-error] { margin-top: 8px; }
.choices { display: grid; gap: 12px; margin-top: 8px; }
.choice { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); background: var(--surface); }
.choice:hover { background: var(--surface-2); border-color: var(--accent); }
.choice-title { font-weight: 700; }
.choice-hint { font-size: 14px; color: var(--muted); }
.choice-form { margin: 0; }
button.choice { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.mark-key { background: var(--accent-soft); }
.mark-key::after { content: ""; width: 14px; height: 14px; border: 3px solid var(--accent-ink); border-radius: 50%; box-shadow: 9px 9px 0 -5px var(--accent-ink); }
input.code-wide { letter-spacing: .12em; padding-left: 14px; font-size: 20px; }
.steps { margin: 16px 0 0; padding-left: 22px; display: grid; gap: 20px; color: var(--ink-2); }
.steps li::marker { font: 500 1.05em var(--font-serif); color: var(--accent-ink); }
.steps p { margin: 0 0 8px; }
.qr { width: 184px; height: 184px; padding: 8px; background: #fff; border-radius: var(--r-sm); border: 1px solid var(--line); margin: 4px 0 12px; }
.qr svg { width: 100%; height: 100%; display: block; }
.secret code { display: inline-block; padding: 6px 10px; font-size: 15px; line-height: 1.5; letter-spacing: .06em; word-break: break-all; }
.codes { list-style: none; padding: 16px; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); }
.codes code { background: none; padding: 0; font-size: 16px; letter-spacing: .04em; }
.actions-tight { margin-top: 0; }
.actions-tight[hidden] { display: none; }
.form-gap { margin-top: 20px; }

.providers { display: grid; gap: 10px; margin-top: 12px; }
/* Sign in with Google / Microsoft / Apple, drawn to each provider's own button guidelines
   (colours, mark on the left, their typeface), not kveo's palette. */
.btn-provider { justify-content: center; gap: 12px; text-decoration: none; font-weight: 500; letter-spacing: .01em; }
.btn-provider .pmark { flex: none; }
.btn-provider--google { background: #fff; border-color: #747775; color: #1f1f1f; font-family: Roboto, "Segoe UI", Arial, sans-serif; font-size: 15px; }
.btn-provider--google:hover { background: #f8f8f8; }
.btn-provider--microsoft { background: #fff; border-color: #8c8c8c; color: #5e5e5e; font-family: "Segoe UI", -apple-system, Arial, sans-serif; font-size: 15px; font-weight: 600; }
.btn-provider--microsoft:hover { background: #f6f6f6; }
.btn-provider--apple { background: #000; border-color: #000; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 16px; }
.btn-provider--apple:hover { background: #1a1a1a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-provider--google { background: #131314; border-color: #8e918f; color: #e3e3e3; }
  :root:not([data-theme="light"]) .btn-provider--google:hover { background: #1f1f20; }
  :root:not([data-theme="light"]) .btn-provider--microsoft { background: #2f2f2f; border-color: #2f2f2f; color: #fff; }
  :root:not([data-theme="light"]) .btn-provider--microsoft:hover { background: #3a3a3a; }
  :root:not([data-theme="light"]) .btn-provider--apple { background: #fff; border-color: #fff; color: #000; }
}
:root[data-theme="dark"] .btn-provider--google { background: #131314; border-color: #8e918f; color: #e3e3e3; }
:root[data-theme="dark"] .btn-provider--google:hover { background: #1f1f20; }
:root[data-theme="dark"] .btn-provider--microsoft { background: #2f2f2f; border-color: #2f2f2f; color: #fff; }
:root[data-theme="dark"] .btn-provider--microsoft:hover { background: #3a3a3a; }
:root[data-theme="dark"] .btn-provider--apple { background: #fff; border-color: #fff; color: #000; }

/* ---------------------------------------------------------------- developer docs */
.docs { width: 100%; max-width: 820px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 32px 22px; }
@media (min-width: 700px) { .docs { padding: 48px 56px; } }
.docs-h1 { text-align: left; font-size: clamp(34px, 5vw, 48px); line-height: 1.06; letter-spacing: -.03em; }
.docs-lead { color: var(--muted); font-size: 18px; max-width: 64ch; }
.docs h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.15; margin: 48px 0 12px; letter-spacing: -.02em; padding-top: 20px; border-top: 1px solid var(--line); }
.docs-toc + section h2 { border-top: 0; padding-top: 0; margin-top: 36px; }
.docs p, .docs li { line-height: 1.65; color: var(--ink-2); max-width: 70ch; }
.docs a:not([class]) { color: var(--accent-ink); text-underline-offset: .23em; }
.docs pre { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.docs pre code { background: none; padding: 0; font-size: inherit; }
.docs-toc { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 20px 0 8px; font-size: 15px; padding: 14px 0; border-block: 1px solid var(--line-strong); }
.docs-toc a { color: var(--accent-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: .23em; min-height: 32px; display: inline-flex; align-items: center; }
.docs-toc a:hover { text-decoration-color: currentColor; }
@media (pointer: coarse) { .docs-toc a { min-height: 44px; } }
.docs-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.docs-table td, .docs-table th { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.docs-table th { font-size: 12px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--line-strong); }
.docs-checks li::marker { content: "✓  "; color: var(--ok); }

.row-provider { display: inline-flex; align-items: center; gap: 10px; }
.row-provider .pmark { flex: none; }

/* ---------- Identity Recovery: icons, steps, facts, method cards ---------- */
.ico { display: block; width: 22px; height: 22px; flex: none; }
.id-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.id-head-text { display: grid; gap: 6px; min-width: 0; }
.id-head-text > p { margin: 0; }
.id-badge { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.id-badge .ico { width: 26px; height: 26px; }
.id-badge-on { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.id-badge-warn { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-line); }
.panel-warn { border-color: var(--accent-line); }

.id-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 0; counter-reset: idstep; }
.id-steps li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 0 0 18px; }
.id-steps li:last-child { padding-bottom: 0; }
.id-steps li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 46px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--line); }
.id-step-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.id-step-text { display: grid; gap: 2px; padding-top: 2px; }
.id-step-text strong { font-size: 16px; color: var(--ink); }
.id-step-text span { font-size: 15px; color: var(--muted); }

.id-facts { display: grid; gap: 4px; }
.id-fact { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.id-fact:first-child { border-top: 0; padding-top: 4px; }
.id-fact h3 { margin: 0 0 4px; font-size: 16px; line-height: 1.3; }
.id-fact p { margin: 0 0 8px; }
.id-fact p:last-child { margin-bottom: 0; }
.id-fact-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-xs); background: var(--surface-2); color: var(--ink-2); }

.consent-box { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.consent-box-err { border-color: var(--danger-line); background: var(--danger-soft); }
.check-top { align-items: flex-start; }
.check-top input { margin-top: 2px; flex: none; }

fieldset.choices { border: 0; padding: 0; margin: 0; min-width: 0; }
.choices-legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.choice.choice-ico { grid-template-columns: 44px 1fr 20px; align-items: center; column-gap: 14px; padding: 14px 16px; }
.choice-badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-xs); background: var(--accent-soft); color: var(--accent-ink); }
.choice-text { display: grid; gap: 2px; min-width: 0; }
.choice-go { width: 20px; height: 20px; color: var(--faint); }
.choice.choice-ico:hover .choice-go { color: var(--accent); }

.powered { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--muted); }
.powered .ico { width: 16px; height: 16px; }
@media (prefers-reduced-motion: no-preference) { .choice-go { transition: color .15s, transform .15s; } .choice.choice-ico:hover .choice-go { transform: translateX(2px); } }
