/* Prototype styles. Values mirror frontend/src/design/tokens.ts. Keep in sync. */

/* ---------------- Tokens: light ---------------- */
:root {
  --bg: #F6F6F8;
  --bg-elevated: #FFFFFF;
  --bg-sunken: #EDEDF0;
  --bg-overlay: rgba(255, 255, 255, 0.72);
  --scrim: rgba(10, 10, 12, 0.32);
  --fg: #0B0B0F;
  --fg-secondary: #5B5B66;
  --fg-tertiary: #6B6B76;
  --fg-on-accent: #FFFFFF;
  --border: #E2E2E7;
  --border-strong: #C9C9D0;
  --focus-ring: #3550DC;
  --accent: #3550DC;
  --accent-hover: #2A40B4;
  --accent-soft: #EEF1FD;
  --accent-soft-fg: #2A40B4;
  --accent-grad-a: #4B65E4;
  --accent-grad-b: #2A40B4;
  --current: #11753A;
  --current-bg: #E8F6EE;
  --expiring: #8A5300;
  --expiring-bg: #FFF3D6;
  --expired: #B42318;
  --expired-bg: #FDECEA;
  --redact-bar: #0B0B0F;
  --paper: #FFFFFF;
  --paper-line: #E2E2E7;
  --shadow-card: 0 1px 2px rgba(16, 16, 24, 0.04), 0 4px 16px rgba(16, 16, 24, 0.05);
  --shadow-raised: 0 2px 4px rgba(16, 16, 24, 0.04), 0 12px 32px rgba(16, 16, 24, 0.08);
  --shadow-overlay: 0 8px 24px rgba(16, 16, 24, 0.1), 0 32px 64px rgba(16, 16, 24, 0.14);
  --shadow-focus: 0 0 0 3px rgba(53, 80, 220, 0.35);
  --shadow-glow: 0 0 0 2px rgba(217, 138, 0, 0.55), 0 0 0 6px rgba(217, 138, 0, 0.18);
  --shadow-glow-strong: 0 0 0 2px rgba(217, 138, 0, 0.75), 0 0 0 9px rgba(217, 138, 0, 0.12);

  --font: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-xs: 6px; --r-sm: 10px; --r-md: 16px; --r-lg: 20px; --r-xl: 24px; --r-pill: 999px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-ring: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.36, 0.64, 1); /* CSS approximation of tokens.spring.gentle */
  --gutter: 16px;
  color-scheme: light;
}

/* ---------------- Tokens: dark ---------------- */
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-elevated: #1C1C1E;
  --bg-sunken: #111113;
  --bg-overlay: rgba(18, 18, 20, 0.72);
  --scrim: rgba(0, 0, 0, 0.56);
  --fg: #F5F5F7;
  --fg-secondary: #A1A1AA;
  --fg-tertiary: #8E8E96;
  --fg-on-accent: #0A0B14;
  --border: #2C2C2E;
  --border-strong: #3A3A3D;
  --focus-ring: #8EA2FF;
  --accent: #8EA2FF;
  --accent-hover: #AAB9FF;
  --accent-soft: rgba(142, 162, 255, 0.14);
  --accent-soft-fg: #AAB9FF;
  --accent-grad-a: #AAB9FF;
  --accent-grad-b: #6A80EE;
  --current: #4ADE80;
  --current-bg: #0F2A1A;
  --expiring: #FBBF24;
  --expiring-bg: #2E2208;
  --expired: #FF8A80;
  --expired-bg: #2E1210;
  --redact-bar: #000000;
  --paper: #F4F4F6;
  --paper-line: #DCDCE2;
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-raised: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-overlay: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 32px 64px rgba(0, 0, 0, 0.6);
  --shadow-focus: 0 0 0 3px rgba(142, 162, 255, 0.45);
  --shadow-glow: 0 0 0 2px rgba(251, 191, 36, 0.6), 0 0 0 6px rgba(251, 191, 36, 0.18);
  --shadow-glow-strong: 0 0 0 2px rgba(251, 191, 36, 0.8), 0 0 0 9px rgba(251, 191, 36, 0.14);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-elevated: #1C1C1E;
    --bg-sunken: #111113;
    --bg-overlay: rgba(18, 18, 20, 0.72);
    --scrim: rgba(0, 0, 0, 0.56);
    --fg: #F5F5F7;
    --fg-secondary: #A1A1AA;
    --fg-tertiary: #8E8E96;
    --fg-on-accent: #0A0B14;
    --border: #2C2C2E;
    --border-strong: #3A3A3D;
    --focus-ring: #8EA2FF;
    --accent: #8EA2FF;
    --accent-hover: #AAB9FF;
    --accent-soft: rgba(142, 162, 255, 0.14);
    --accent-soft-fg: #AAB9FF;
    --accent-grad-a: #AAB9FF;
    --accent-grad-b: #6A80EE;
    --current: #4ADE80;
    --current-bg: #0F2A1A;
    --expiring: #FBBF24;
    --expiring-bg: #2E2208;
    --expired: #FF8A80;
    --expired-bg: #2E1210;
    --redact-bar: #000000;
    --paper: #F4F4F6;
    --paper-line: #DCDCE2;
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-raised: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-overlay: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 32px 64px rgba(0, 0, 0, 0.6);
    --shadow-focus: 0 0 0 3px rgba(142, 162, 255, 0.45);
    --shadow-glow: 0 0 0 2px rgba(251, 191, 36, 0.6), 0 0 0 6px rgba(251, 191, 36, 0.18);
    --shadow-glow-strong: 0 0 0 2px rgba(251, 191, 36, 0.8), 0 0 0 9px rgba(251, 191, 36, 0.14);
    color-scheme: dark;
  }
}

/* ---------------- Base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
p, h1, h2, h3, h4, ol, ul { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 6px; }
.mob-only { display: none; }
@media (max-width: 767px) { .desk-only { display: none !important; } .mob-only { display: inline; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: 8px; z-index: 100; background: var(--bg-elevated); padding: 8px 16px; border-radius: var(--r-sm); transform: translateY(-200%); }
.skip:focus { transform: none; box-shadow: var(--shadow-raised); }
.tnum { font-variant-numeric: tabular-nums lining-nums; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.stack > * + * { margin-top: 16px; }
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* ---------------- Type ---------------- */
.t-display { font-size: 40px; line-height: 44px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.t-title1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.015em; margin: 0; }
.t-title2 { font-size: 22px; line-height: 28px; font-weight: 650; letter-spacing: -0.01em; margin: 0; }
.t-title3 { font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -0.005em; margin: 0; }
.t-body { font-size: 16px; line-height: 24px; margin: 0; }
.t-callout { font-size: 15px; line-height: 22px; margin: 0; }
.t-sub { font-size: 14px; line-height: 20px; font-weight: 500; margin: 0; }
.t-foot { font-size: 13px; line-height: 18px; margin: 0; }
.t-cap { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.01em; margin: 0; }
.t-over { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-secondary); margin: 0; }
.t-stat { font-size: 48px; line-height: 52px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.muted { color: var(--fg-secondary); }
.faint { color: var(--fg-tertiary); }
@media (min-width: 768px) {
  .t-display { font-size: 64px; line-height: 68px; }
  .t-title1 { font-size: 34px; line-height: 40px; }
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  font-size: 16px; font-weight: 600; line-height: 1; letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer; text-decoration: none !important;
  transition: transform 150ms var(--ease), background-color 150ms var(--ease), box-shadow 150ms var(--ease), opacity 150ms var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--fg-on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-elevated); color: var(--fg); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg-sunken); }
.btn-ghost { background: transparent; color: var(--accent); padding: 0 12px; }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 17px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: var(--r-pill);
  border: 0; background: transparent; color: var(--fg-secondary); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-sunken); color: var(--fg); }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg-overlay);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar { height: 64px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--fg); text-decoration: none !important; font-weight: 650; font-size: 17px; letter-spacing: -0.01em; min-height: 44px; }
.brand .mark { color: var(--accent); }
.nav-links { display: none; gap: 4px; margin-left: 16px; }
.nav-links a { color: var(--fg-secondary); font-size: 15px; font-weight: 500; padding: 10px 12px; border-radius: var(--r-pill); }
.nav-links a:hover { color: var(--fg); background: var(--bg-sunken); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--fg); background: var(--bg-sunken); }
.bar .spacer { flex: 1; }
@media (max-width: 479px) { .bar .hide-xs { display: none; } .site-header .brand { font-size: 16px; } }
.bar .hide-sm { display: none; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .bar .hide-sm { display: inline-flex; }
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-soft-fg); font-weight: 650; font-size: 14px; flex: none;
}
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }

/* Bottom tab bar (mobile app screens) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--bg-overlay);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
}
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; min-height: 48px; color: var(--fg-secondary); font-size: 11px; font-weight: 600; text-decoration: none; border-radius: 12px; }
.tabbar a[aria-current="page"] { color: var(--accent); }
.has-tabbar { padding-bottom: 88px; }
@media (min-width: 900px) { .tabbar { display: none; } .has-tabbar { padding-bottom: 0; } }

/* ---------------- Cards ---------------- */
.card {
  background: var(--bg-elevated); border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  padding: 24px; position: relative;
}
.card.flat { box-shadow: none; border: 1px solid var(--border); }
.card.tight { padding: 16px; }
a.card { display: block; color: inherit; text-decoration: none; transition: transform 200ms var(--spring), box-shadow 200ms var(--ease); }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-raised); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 40px 0 16px; }
.section-label:first-child { margin-top: 0; }

/* ---------------- StatusPill ---------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap;
  background: var(--current-bg); color: var(--current);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.expiring { background: var(--expiring-bg); color: var(--expiring); }
.pill.expired { background: var(--expired-bg); color: var(--expired); }
.pill.neutral { background: var(--bg-sunken); color: var(--fg-secondary); }
.pill.neutral::before { display: none; }

/* ---------------- SourceChip ---------------- */
.source-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px 0 8px;
  border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--bg-elevated);
  font-size: 12px; line-height: 16px; font-weight: 500; color: var(--fg-secondary); cursor: pointer;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}
.source-chip svg { flex: none; width: 14px; height: 14px; }
.source-chip span { overflow: hidden; text-overflow: ellipsis; }
.source-chip:hover, .source-chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* Confidence chip */
.conf {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  border-radius: var(--r-pill); background: var(--bg-sunken); color: var(--fg-secondary);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.conf .bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; }
.conf .bars i { width: 3px; border-radius: 1px; background: currentColor; opacity: 0.25; }
.conf .bars i:nth-child(1) { height: 4px; } .conf .bars i:nth-child(2) { height: 7px; } .conf .bars i:nth-child(3) { height: 10px; }
.conf.hi .bars i { opacity: 1; }
.conf.med .bars i:nth-child(-n+2) { opacity: 1; }
.conf.low .bars i:nth-child(1) { opacity: 1; }
.conf.med, .conf.low { background: var(--expiring-bg); color: var(--expiring); }

/* ---------------- ReadinessRing ---------------- */
.ring { position: relative; width: 160px; height: 160px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .ring-track { stroke: var(--bg-sunken); }
.ring .ring-arc { stroke: url(#ringGrad); transition: stroke-dashoffset 1200ms var(--ease-ring); }
.ring .ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .ring-num { font-size: 40px; line-height: 44px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring .ring-num small { font-size: 22px; font-weight: 650; letter-spacing: 0; margin-left: 1px; }
.ring .ring-label { font-size: 13px; line-height: 16px; font-weight: 600; color: var(--fg-secondary); }
@media (max-width: 479px) { .readiness .ring { width: 128px; height: 128px; } .readiness .ring .ring-num { font-size: 34px; line-height: 38px; } }
.ring.sm { width: 96px; height: 96px; }
.ring.sm .ring-num { font-size: 26px; line-height: 28px; }
.ring.sm .ring-num small { font-size: 15px; }
.ring.sm .ring-label { font-size: 11px; }

.missing-list { list-style: none; margin: 0; padding: 0; }
.missing-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.missing-list li:first-child { border-top: 0; }
.missing-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--expiring-bg); color: var(--expiring); flex: none; }
.missing-list .grow { flex: 1; min-width: 0; }

/* ---------------- CredentialCard ---------------- */
.cred-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cred-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .cred-grid.three { grid-template-columns: 1fr 1fr 1fr; } }
.cred { display: grid; gap: 12px; padding: 20px; }
.cred .cred-kind { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-secondary); font-size: 13px; font-weight: 500; }
.state-badge { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-sunken); color: var(--fg); font-weight: 700; font-size: 12px; letter-spacing: 0.02em; flex: none; }
.cred .cred-title { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -0.01em; }
.cred .cred-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--fg-secondary); font-size: 14px; }
.cred .count { font-variant-numeric: tabular-nums; color: var(--fg); font-weight: 600; }
.cred .cred-foot .t-cap { white-space: nowrap; }
.cred .cred-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); min-width: 0; }
.cred.is-expiring { box-shadow: var(--shadow-card), inset 0 0 0 1px color-mix(in srgb, var(--expiring) 28%, transparent); }
.masked { font-family: var(--mono); font-size: 14px; letter-spacing: 0.04em; color: var(--fg); }

/* ---------------- RedactionNotice ---------------- */
.redaction {
  display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start;
  padding: 16px; border-radius: var(--r-md); background: var(--bg-elevated);
  border: 1px solid var(--border); box-shadow: var(--shadow-card);
}
.redaction .thumb {
  width: 64px; height: 84px; border-radius: 8px; background: var(--paper); border: 1px solid var(--paper-line);
  padding: 8px 7px; display: grid; gap: 4px; align-content: start; position: relative; overflow: hidden;
}
.redaction .thumb i { display: block; height: 3px; border-radius: 2px; background: #D4D4DB; }
.redaction .thumb i.w60 { width: 60%; } .redaction .thumb i.w80 { width: 80%; } .redaction .thumb i.w45 { width: 45%; }
.redaction .thumb b { display: block; height: 8px; width: 70%; border-radius: 2px; background: var(--redact-bar); margin: 2px 0; }
.redaction .thumb .pg { position: absolute; right: 4px; bottom: 3px; font-size: 8px; line-height: 10px; color: #6B6B76; font-weight: 600; }
.redaction .title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; line-height: 20px; }
.redaction .title svg { color: var(--current); flex: none; }

/* ---------------- VerificationTimeline ---------------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 20px 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--border); border-radius: 1px; }
.timeline li:last-child::before { display: none; }
.timeline .node { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--current-bg); color: var(--current); }
.timeline .node.next { background: var(--bg-sunken); color: var(--fg-secondary); }
.timeline .node.warn { background: var(--expiring-bg); color: var(--expiring); }
.timeline .node svg { width: 14px; height: 14px; stroke-width: 2.25; }
.timeline .what { font-weight: 600; font-size: 15px; line-height: 20px; }
.timeline .detail { color: var(--fg-secondary); font-size: 14px; line-height: 20px; margin-top: 2px; }
.timeline .when { color: var(--fg-tertiary); font-size: 12px; line-height: 16px; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--fg); color: var(--bg); padding: 12px 16px; border-radius: var(--r-md); box-shadow: var(--shadow-overlay);
  font-size: 14px; line-height: 20px; max-width: min(92vw, 420px); z-index: 60;
  transition: opacity 200ms var(--ease), transform 250ms var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 32px; } }

/* ---------------- Landing ---------------- */
.hero { padding: 40px 0 72px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-soft-fg); font-size: 13px; font-weight: 600; }
.hero h1 { margin-top: 16px; }
.hero .sub { font-size: 18px; line-height: 28px; color: var(--fg-secondary); margin: 16px 0 0; max-width: 34ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .reassure { margin-top: 16px; color: var(--fg-tertiary); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.hero .reassure span { display: inline-flex; align-items: center; gap: 6px; }
@media (min-width: 900px) {
  .hero { padding: 80px 0 96px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 64px; }
  .hero .sub { font-size: 20px; line-height: 30px; }
}

.device {
  border-radius: 36px; padding: 12px; background: var(--bg-elevated); box-shadow: var(--shadow-raised);
  max-width: 380px; margin: 0 auto; width: 100%;
}
.device-screen { border-radius: 26px; background: var(--bg); padding: 20px 16px; display: grid; gap: 12px; overflow: hidden; }
.device .ring-card { display: flex; align-items: center; gap: 16px; }

.band { padding: 64px 0; }
.band.alt { background: var(--bg-elevated); }
@media (min-width: 900px) { .band { padding: 96px 0; } }
.band-head { max-width: 640px; margin-bottom: 40px; }
.band-head p { margin-top: 12px; }

.stats { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .stats { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat-card { display: grid; gap: 8px; align-content: start; }
.band.alt .card { background: var(--bg); box-shadow: none; }
.stat-card .src { font-size: 12px; line-height: 16px; color: var(--fg-tertiary); margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }

.steps { display: grid; gap: 16px; counter-reset: s; }
@media (min-width: 768px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { display: grid; gap: 12px; align-content: start; }
.step .n { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-soft-fg); font-weight: 700; font-variant-numeric: tabular-nums; }

.agents { display: grid; gap: 16px; }
@media (min-width: 640px) { .agents { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .agents { grid-template-columns: repeat(3, 1fr); } }
.agent { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start; }
.agent .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-sunken); color: var(--accent); }

.trust-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .trust-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.trust-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 18px; line-height: 26px; font-weight: 500; padding: 12px 0; border-top: 1px solid var(--border); }
.trust-list li:first-child { border-top: 0; }
.trust-list svg { color: var(--accent); flex: none; margin-top: 3px; }

.team { display: grid; gap: 16px; }
@media (min-width: 768px) { .team { grid-template-columns: 1fr 1fr; } }
.person { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; }
.photo-ph { width: 72px; height: 72px; border-radius: 50%; background: var(--bg-sunken); border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--fg-tertiary); }

.hire {
  border-radius: var(--r-xl); padding: 40px 24px; background: var(--accent-soft);
  display: grid; gap: 24px; align-items: center;
}
@media (min-width: 900px) { .hire { grid-template-columns: 1fr auto; padding: 48px; } }

.final-cta { text-align: center; padding: 80px 0; }
.final-cta .ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.site-footer { border-top: 1px solid var(--border); padding: 32px 0 48px; color: var(--fg-secondary); font-size: 14px; }
.site-footer .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { color: var(--fg-secondary); padding: 10px 0; display: inline-block; }
.draft-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 6px; background: var(--bg-sunken); color: var(--fg-secondary); margin-left: 4px; }

/* ---------------- App pages ---------------- */
.page { padding: 24px 0 64px; }
@media (min-width: 900px) { .page { padding: 40px 0 96px; } }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--fg-secondary); margin-bottom: 16px; min-height: 44px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; }

/* Onboarding */
.progress-steps { display: flex; gap: 6px; margin: 8px 0 0; }
.progress-steps i { height: 4px; flex: 1; border-radius: 2px; background: var(--bg-sunken); }
.progress-steps i.done { background: var(--accent); }
.onb-head { max-width: 640px; margin: 0 0 32px; }
.choices { display: grid; gap: 16px; }
@media (min-width: 900px) { .choices { grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; } .choices .dropzone { grid-row: span 2; } }
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--r-xl); background: var(--bg-elevated);
  display: grid; place-items: center; text-align: center; padding: 40px 24px; min-height: 260px;
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease), transform 200ms var(--spring);
}
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
.dropzone .big-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin: 0 auto 16px; }
a.card.choice, .choice { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; }
.choice .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-sunken); color: var(--accent); }
.choice .chev { color: var(--fg-tertiary); }
.trust-line { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; color: var(--fg-secondary); font-size: 14px; }
.trust-line span { display: inline-flex; align-items: center; gap: 8px; }
.trust-line svg { color: var(--accent); }

.intake { display: none; }
body.is-intake .intake { display: block; }
body.is-intake .choose { display: none; }
.intake-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.counter { display: flex; align-items: baseline; gap: 8px; }
.counter .t-stat { color: var(--accent); }
.intake-grid { display: grid; gap: 24px; }
@media (min-width: 1024px) { .intake-grid { grid-template-columns: 300px 1fr; } }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; font-size: 14px; line-height: 20px; color: var(--fg-secondary); transition: opacity 300ms var(--ease), background-color 200ms var(--ease); min-width: 0; }
.file-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .st { flex: none; width: 18px; height: 18px; display: grid; place-items: center; }
.file-row.reading { background: var(--accent-soft); color: var(--fg); }
.file-row.done { color: var(--fg-secondary); }
.file-row.done .st { color: var(--current); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bins { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 1023px) {
  .files-card .file-row:not(.reading) { display: none; }
  .files-card .t-over { display: none; }
  body.intake-finished .files-card { display: none; }
}
@media (min-width: 1280px) { .bins { grid-template-columns: 1fr 1fr 1fr; } }
.bin { padding: 16px; display: grid; gap: 12px; align-content: start; min-height: 112px; transition: box-shadow 200ms var(--ease), transform 250ms var(--spring); }
.bin.bump { transform: scale(1.02); box-shadow: var(--shadow-raised); }
.bin .bin-head { display: grid; gap: 2px; }
.bin .bin-title { font-weight: 600; font-size: 15px; display: inline-flex; gap: 8px; align-items: center; }
.bin .bin-title svg { color: var(--accent); }
.bin .fields { font-size: 13px; color: var(--fg-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bin .chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; }
.bin .empty { font-size: 13px; color: var(--fg-tertiary); }
.file-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: var(--r-pill); background: var(--bg-sunken); font-size: 12px; font-weight: 500; color: var(--fg); max-width: 100%; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip svg { width: 14px; height: 14px; color: var(--fg-secondary); flex: none; }
.ghost { position: fixed; z-index: 50; pointer-events: none; box-shadow: var(--shadow-raised); background: var(--bg-elevated); }
.done-card { display: none; margin-top: 24px; }
body.intake-finished .done-card { display: flex; }
.done-card { align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.notice-slot:empty { display: none; }
.notice-slot { margin-bottom: 16px; }
.appear { animation: appear 300ms var(--spring) both; }
@keyframes appear { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* Profile */
.profile-grid { display: grid; gap: 24px; }
@media (min-width: 1024px) { .profile-grid { grid-template-columns: 360px 1fr; align-items: start; } .profile-grid .side { position: sticky; top: 88px; } }
.who { display: flex; gap: 16px; align-items: center; }
.who .meta { min-width: 0; }
.readiness { display: grid; gap: 20px; }
.readiness .top { display: flex; align-items: center; gap: 20px; }
.headline-ready { font-size: 17px; line-height: 24px; font-weight: 600; }
.page-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }

/* JobCardStack */
.deck { position: relative; padding-bottom: 20px; }
.deck .job { position: relative; z-index: 3; }
.deck .behind { position: absolute; left: 12px; right: 12px; bottom: 10px; height: 40px; border-radius: var(--r-lg); background: var(--bg-elevated); box-shadow: var(--shadow-card); z-index: 2; opacity: 0.9; }
.deck .behind.b2 { left: 24px; right: 24px; bottom: 0; z-index: 1; opacity: 0.7; }
.deck.open .behind { display: none; }
.job { display: grid; gap: 12px; }
.rates { display: grid; gap: 8px; }
.rate-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-sunken); font-size: 14px; }
.rate-row .r { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--fg); white-space: nowrap; }
.rate-row.best { background: var(--accent-soft); }
.rate-row.best .r { color: var(--accent-soft-fg); }

/* Credential detail */
.detail-grid { display: grid; gap: 16px; grid-template-areas: "sum" "fields" "peek" "checks"; }
.detail-grid > * { min-width: 0; }
.a-sum { grid-area: sum; } .a-fields { grid-area: fields; } .a-peek { grid-area: peek; } .a-checks { grid-area: checks; }
@media (min-width: 1024px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr) 420px; grid-template-areas: "sum peek" "fields peek" "checks peek"; grid-template-rows: auto auto 1fr; column-gap: 24px; align-items: start; }
  .detail-grid .a-peek { position: sticky; top: 88px; }
}
.countdown { display: flex; align-items: baseline; gap: 8px; }
.countdown .big { font-size: 56px; line-height: 56px; font-weight: 700; letter-spacing: -0.03em; color: var(--expiring); font-variant-numeric: tabular-nums; }
.fields { list-style: none; margin: 0; padding: 0; }
.fields li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--border); align-items: center; }
.fields li:first-child { border-top: 0; padding-top: 0; }
.fields .k { font-size: 13px; color: var(--fg-secondary); grid-column: 1; }
.fields .v { font-size: 16px; font-weight: 500; grid-column: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fields .src { grid-column: 2; grid-row: 1 / span 2; }
.reveal-btn { border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 8px; min-height: 32px; display: inline-flex; align-items: center; gap: 4px; }
.reveal-btn:hover { background: var(--accent-soft); }

.peek { padding: 0; overflow: hidden; }
.peek-head { padding: 20px 20px 0; }
.page-thumb {
  margin: 16px 20px 0; border-radius: 12px; background: var(--paper); border: 1px solid var(--paper-line);
  padding: 20px 18px; position: relative; color: #3A3A42; font-size: 11px; line-height: 15px;
  aspect-ratio: 8.5 / 7; overflow: hidden;
}
.page-thumb .doc-title { font-weight: 700; font-size: 12px; color: #1A1A22; text-align: center; margin-bottom: 4px; }
.page-thumb .doc-sub { text-align: center; color: #5B5B66; font-size: 10px; margin-bottom: 14px; }
.page-thumb .ln { height: 5px; border-radius: 3px; background: #E2E2E7; margin: 7px 0; }
.page-thumb .kv { display: flex; justify-content: space-between; gap: 8px; padding: 5px 6px; margin: 2px -6px; border-radius: 6px; font-size: 11px; color: #3A3A42; }
.page-thumb .kv b { color: #1A1A22; font-weight: 600; font-family: var(--mono); font-size: 10.5px; }
.page-thumb .kv.hl { background: rgba(53, 80, 220, 0.12); box-shadow: inset 0 0 0 1.5px #3550DC; }
.page-thumb .pageno { position: absolute; right: 12px; bottom: 10px; font-size: 10px; color: #6B6B76; }
.page-thumb .seal { position: absolute; right: 16px; bottom: 26px; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid #C9C9D0; }
.snippet { margin: 16px 20px 0; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--bg-sunken); border-radius: 0 10px 10px 0; font-size: 14px; line-height: 20px; }
.peek-meta { list-style: none; margin: 16px 0 0; padding: 0 20px 20px; display: grid; gap: 10px; font-size: 14px; }
.peek-meta li { display: flex; justify-content: space-between; gap: 12px; }
.peek-meta .k { color: var(--fg-secondary); }
.peek-meta .v { font-weight: 500; text-align: right; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Apply review */
.apply-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--bg-sunken); margin-bottom: 16px; }
.seg button { border: 0; background: transparent; min-height: 36px; padding: 0 18px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; color: var(--fg-secondary); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--bg-elevated); color: var(--fg); box-shadow: var(--shadow-card); }
@media (min-width: 1024px) { .seg { display: none; } }
.apply-grid { display: grid; gap: 24px; }
@media (min-width: 1024px) {
  .apply-grid { grid-template-columns: minmax(0, 1fr) 440px; align-items: start; }
  .apply-grid .pane { display: block !important; }
}
.paper {
  background: var(--paper); color: #1A1A22; border-radius: 12px; box-shadow: var(--shadow-raised);
  padding: 28px 24px; font-size: 13px; line-height: 18px; color-scheme: light;
}
@media (min-width: 768px) { .paper { padding: 40px 44px; } }
.paper h3 { font-size: 15px; line-height: 20px; margin: 0; color: #1A1A22; text-align: center; letter-spacing: 0; }
.paper .ph-sub { text-align: center; color: #5B5B66; font-size: 12px; margin: 2px 0 20px; }
.paper .sec { margin-top: 20px; }
.paper .sec-t { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #3A3A42; padding-bottom: 6px; border-bottom: 1.5px solid #1A1A22; margin-bottom: 10px; }
.paper .row2 { display: grid; gap: 10px 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .paper .row2 { grid-template-columns: 1fr 1fr; } .paper .row3 { grid-template-columns: 1fr 1fr 1fr; } }
.pf { display: grid; gap: 3px; border-radius: 8px; padding: 4px 6px; margin: 0 -6px; transition: box-shadow 250ms var(--ease), background-color 250ms var(--ease); scroll-margin-top: 120px; }
.pf label, .pf .lbl { font-size: 11px; color: #5B5B66; font-weight: 500; }
.pf .val { min-height: 28px; display: flex; align-items: center; padding: 4px 8px; border-radius: 6px; background: #EEF1FD; color: #14183A; font-weight: 500; font-size: 13px; border: 1px solid #DDE3FB; }
.pf .val.mask { font-family: var(--mono); letter-spacing: 0.04em; }
.pf .val.blank { background: #FFFFFF; border: 1px dashed #A1A1AA; color: #5B5B66; font-style: normal; }
.pf.flag { box-shadow: var(--shadow-glow); background: rgba(255, 243, 214, 0.55); animation: glow 2.4s ease-in-out infinite; }
.pf.flag.focus { box-shadow: var(--shadow-glow-strong); }
.pf.ok .val { background: #E8F6EE; border-color: #CBEBD8; }
@keyframes glow { 0%, 100% { box-shadow: var(--shadow-glow); } 50% { box-shadow: var(--shadow-glow-strong); } }
.attest { margin-top: 24px; border: 1.5px solid #1A1A22; border-radius: 8px; padding: 12px 14px; }
.attest-note { display: flex; gap: 8px; align-items: flex-start; background: #F6F6F8; color: #3A3A42; border-radius: 8px; padding: 8px 10px; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.attest .q { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 8px 0; border-top: 1px solid #E2E2E7; align-items: center; }
.attest .q:first-of-type { border-top: 0; }
.attest .yn { display: inline-flex; gap: 12px; font-size: 12px; color: #3A3A42; }
.attest .yn span { display: inline-flex; align-items: center; gap: 4px; }
.attest .box { width: 14px; height: 14px; border: 1.5px solid #6B6B76; border-radius: 3px; background: #FFF; }
.sig { margin-top: 20px; display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.sig .line { border-bottom: 1.5px solid #1A1A22; height: 28px; }

.list-pane .card { padding: 0; }
.list-head { padding: 20px 20px 4px; background: var(--bg-elevated); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.meter { height: 6px; border-radius: 3px; background: var(--bg-sunken); overflow: hidden; margin-top: 12px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 300ms var(--ease); }
.group-t { padding: 16px 20px 8px; }
.frow { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 20px; border-top: 1px solid var(--border); align-items: center; transition: background-color 200ms var(--ease); }
.frow:hover { background: var(--bg-sunken); }
.frow .fname { font-size: 13px; color: var(--fg-secondary); }
.frow .fval { font-size: 15px; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.frow .fmeta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.frow .why { grid-column: 1 / -1; font-size: 13px; line-height: 18px; color: var(--fg-secondary); }
.frow .side-act { grid-column: 2; grid-row: 1; align-self: center; }
.frow.flagged { background: color-mix(in srgb, var(--expiring-bg) 55%, transparent); }
.frow.flagged.done { background: transparent; }
.frow .ok-tag { display: none; align-items: center; gap: 4px; color: var(--current); font-size: 13px; font-weight: 600; }
.frow.done .ok-tag { display: inline-flex; }
.frow.done .confirm { display: none; }
.frow.you .fval { color: var(--fg-secondary); font-style: italic; }
.list-foot { padding: 16px 20px; border-bottom: 1px solid var(--border); display: grid; gap: 8px; }
.never { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--fg-secondary); justify-content: center; }
.never svg { color: var(--accent); flex: none; }

/* Brand page */
.logo-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); }
.tile { padding: 20px 12px; display: flex; align-items: flex-end; justify-content: center; gap: 16px; }
.tile.l { background: #FFFFFF; color: #3550DC; }
.tile.d { background: #000000; color: #8EA2FF; }
.appicon { width: 72px; height: 72px; border-radius: 16px; background: linear-gradient(180deg, #4B65E4, #2A40B4); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-raised); }

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .pf.flag { animation: none; box-shadow: var(--shadow-glow); }
  a.card:hover, .bin.bump, .dropzone.over { transform: none; }
}

/* Credential summary on small phones: pill above the title so the title gets full width */
@media (max-width: 479px) { .a-sum > .card-head { flex-direction: column-reverse; align-items: flex-start; } }
