/* Insurance Agent — Components */

/* ============ WORDMARK / FLAG ============ */
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.02em; white-space: nowrap;
  color: var(--ink); text-decoration: none;
}
.wordmark:hover { text-decoration: none; color: var(--ink); }
.flag-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--alert); color: #fff;
  font-size: 13px; line-height: 1;
  position: relative;
  font-size: 0;
}
.flag-mark::before {
  content: "";
  display: block;
  width: 58%; height: 68%;
  background-color: #fff;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 20'><path d='M3 1v18' stroke='black' stroke-width='2.2' stroke-linecap='round'/><path d='M3 3h9l-2.2 3L12 9H3z' fill='black'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 20'><path d='M3 1v18' stroke='black' stroke-width='2.2' stroke-linecap='round'/><path d='M3 3h9l-2.2 3L12 9H3z' fill='black'/></svg>") center/contain no-repeat;
}
.flag-mark.lg { width: 46px; height: 46px; border-radius: 10px; }
.flag-mark.md { width: 32px; height: 32px; border-radius: 8px; }

/* ============ NAV ============ */
.nav {
  background: var(--card);
  border-bottom: 1px solid var(--hairline);
  padding: 14px 48px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  position: sticky; top: 0; z-index: 5;
}
.nav-tabs { display: flex; gap: 4px; overflow-x: auto; }
.nav-tabs .tab {
  font-family: var(--sans);
  font-size: 13px; font-weight: 500; color: var(--ink-3);
  padding: 8px 12px; cursor: pointer; border-radius: 6px;
  white-space: nowrap; text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-tabs .tab:hover:not(.active) { color: var(--ink); background: var(--bg-2); }
.nav-tabs .tab.active { color: var(--ink); background: var(--bg-2); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-right .member {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}

/* ============ BUTTONS ============ */
.btn {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  letter-spacing: -0.005em; white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: #000; border-color: #000; color: #fff; text-decoration: none; }

.btn-accent  { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; text-decoration: none; }

.btn-ghost   { background: var(--card); color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }

.btn-danger  { background: var(--alert); color: #fff; border-color: var(--alert); }
.btn-danger:hover { background: var(--alert-2); border-color: var(--alert-2); color: #fff; text-decoration: none; }

.btn-link    { background: transparent; color: var(--accent); border: none; padding: 0 4px; height: auto; }
.btn-link:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }

.btn-sm { height: 32px; font-size: 13px; padding: 0 12px; }
.btn-full { display: flex; width: 100%; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ============ BADGES ============ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px; border: 1px solid;
  white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok      { color: var(--ok);    background: var(--ok-tint);    border-color: var(--ok-rule); }
.badge.watch   { color: var(--watch); background: var(--watch-tint); border-color: var(--watch-rule); }
.badge.alert   { color: var(--alert); background: var(--alert-tint); border-color: var(--alert-rule); }
.badge.neutral { color: var(--ink-3); background: var(--bg-2);       border-color: var(--rule); }

/* ============ CARD ============ */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-1);
}
.card.pad-sm { padding: 20px; }
.card.pad-lg { padding: 40px; }

.card-centered {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 40px 36px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-1);
  text-align: center;
}

/* ============ FORMS ============ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; text-align: left; }
.field label { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }

.input, .select, .textarea {
  font-family: var(--sans); font-size: 14px;
  height: 40px; padding: 0 12px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  color: var(--ink); width: 100%;
  letter-spacing: -0.005em;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.input::placeholder { color: var(--ink-4); }
.textarea { height: auto; padding: 12px; resize: vertical; min-height: 80px; }

/* ============ PAGE HEAD ============ */
.page-head {
  display: grid; grid-template-columns: 1fr auto; gap: 24px;
  align-items: end; margin-bottom: 32px;
}
.page-head .lbl {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 10px;
}
.page-head .title {
  font-size: 44px; line-height: 1.05; font-weight: 600;
  letter-spacing: -0.03em; margin: 0;
}
.page-head .title .flag { color: var(--alert); }
.page-head .sub { font-size: 15px; color: var(--ink-3); margin-top: 10px; max-width: 60ch; }

/* ============ CALLOUT ============ */
.callout {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--alert);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  display: grid; grid-template-columns: 1fr auto; gap: 32px;
  align-items: center; margin-bottom: 32px;
  box-shadow: var(--shadow-1);
}
.callout .head {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--alert);
  margin-bottom: 10px;
}
.callout .head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--alert); }
.callout h2 {
  font-size: 24px; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.2; margin: 0 0 8px;
}
.callout p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 58ch; line-height: 1.55; }
.callout .money-wrap { text-align: right; }
.callout .money {
  font-size: 64px; font-weight: 600; letter-spacing: -0.035em;
  line-height: 1; color: var(--alert); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.callout .money small { font-size: 32px; color: var(--ink-3); font-weight: 500; }
.callout .money-lbl {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 8px;
}
.callout .cta-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* ============ STAT BAR ============ */
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); margin-bottom: 24px; overflow: hidden;
}
.stat { padding: 20px 24px; border-right: 1px solid var(--hairline); }
.stat:last-child { border-right: 0; }
.stat .label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; white-space: nowrap;
}
.stat .val {
  font-size: 36px; font-weight: 600; letter-spacing: -0.025em;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.stat .sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; white-space: nowrap; }
.stat.ok .val    { color: var(--ok); }
.stat.watch .val { color: var(--watch); }
.stat.alert .val { color: var(--alert); }

/* ============ TOOLBAR ============ */
.toolbar {
  display: grid; grid-template-columns: 1fr auto auto auto;
  gap: 10px; margin-bottom: 20px; align-items: center;
}
.toolbar .clear {
  font-size: 12px; color: var(--ink-3); text-decoration: none;
  padding: 0 6px;
}
.toolbar .clear:hover { color: var(--ink); text-decoration: underline; }

/* ============ MONTH RULE ============ */
.month-rule {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
  margin: 28px 0 12px;
}
.month-rule span { white-space: nowrap; }
.month-rule::after { content: ''; height: 1px; background: var(--hairline); }

/* ============ CLAIM ROW ============ */
.claim {
  background: var(--card); border: 1px solid var(--hairline);
  border-left: 3px solid transparent; border-radius: var(--r-md);
  padding: 18px 22px; display: grid; grid-template-columns: 1fr auto;
  gap: 24px; align-items: center; margin-bottom: 8px;
  text-decoration: none; color: inherit;
  transition: border-color .15s, opacity .15s;
}
.claim:hover { border-color: var(--ink-4); text-decoration: none; color: inherit; }
.claim.ok    { border-left-color: var(--ok); }
.claim.watch { border-left-color: var(--watch); }
.claim.alert { border-left-color: var(--alert); }
.claim.none  { border-left-color: var(--ink-4); }
.claim.reviewed-ok { opacity: 0.55; }
.claim.reviewed-ok:hover { opacity: 0.85; }
.claim.flagged { border-left-color: var(--watch); }
.claim .provider { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.claim .meta {
  font-family: var(--mono); font-size: 12px; color: var(--ink-3);
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
.claim .meta .dx { color: var(--ink-2); }
.claim .amt {
  text-align: right; min-width: 220px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.claim .money {
  font-size: 24px; font-weight: 600; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; line-height: 1; color: var(--ink);
}
.claim.ok    .money { color: var(--ok); }
.claim.watch .money { color: var(--watch); }
.claim.alert .money { color: var(--alert); }
.claim .cost-grid { display: flex; gap: 16px; }
.claim .cost-item { text-align: right; }
.claim .cost-label {
  display: block; font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 2px;
}
.claim .cost-value {
  display: block; font-size: 13px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ============ ALERT PANEL (detail page centerpiece) ============ */
.alert-panel {
  background: var(--alert-tint);
  border: 1px solid var(--alert-rule);
  border-left: 3px solid var(--alert);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.alert-panel .head {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--alert);
  margin-bottom: 14px;
}
.alert-panel .head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--alert); }
.alert-panel h4 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.2; margin: 0 0 10px; color: var(--ink);
}
.alert-panel .body { font-size: 14px; line-height: 1.6; color: var(--ink-2); max-width: 68ch; }
.alert-panel .delta {
  display: inline-flex; gap: 20px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px;
  padding: 10px 14px; margin-top: 16px;
  background: #fff; border: 1px solid var(--alert-rule);
  border-radius: var(--r-sm);
}
.alert-panel .delta b { color: var(--alert); font-weight: 600; }

/* Semantic variants */
.alert-panel.ok {
  background: var(--ok-tint);
  border-color: var(--ok-rule);
  border-left-color: var(--ok);
}
.alert-panel.ok .head { color: var(--ok); }
.alert-panel.ok .head .dot { background: var(--ok); }
.alert-panel.ok .delta { border-color: var(--ok-rule); }
.alert-panel.ok .delta b { color: var(--ok); }

.alert-panel.watch {
  background: var(--watch-tint);
  border-color: var(--watch-rule);
  border-left-color: var(--watch);
}
.alert-panel.watch .head { color: var(--watch); }
.alert-panel.watch .head .dot { background: var(--watch); }
.alert-panel.watch .delta { border-color: var(--watch-rule); }
.alert-panel.watch .delta b { color: var(--watch); }

.alert-panel.neutral {
  background: var(--bg-2);
  border-color: var(--rule);
  border-left-color: var(--ink-4);
}
.alert-panel.neutral .head { color: var(--ink-3); }
.alert-panel.neutral .head .dot { background: var(--ink-3); }
.alert-panel.neutral .delta { border-color: var(--rule); }

/* Finding cards inside alert-panel (v3 per-line) */
.finding-card {
  background: #fff; border-radius: var(--r-md);
  padding: 14px 16px; margin: 12px 0;
  border-left: 3px solid var(--ink-4);
}
.finding-card.severity-likely_error { border-left-color: var(--watch); }
.finding-card.severity-probable_violation { border-left-color: var(--alert); }
.finding-card.severity-high_confidence_violation { border-left-color: var(--alert-2); }
.finding-card.regulatory { border-left-color: var(--alert); }
.finding-card.plan      { border-left-color: var(--watch); }
.finding-card.warning   { border-left-color: var(--watch); }
.finding-header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.finding-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 2px 8px; border-radius: var(--r-sm); color: #fff;
}
.finding-badge.domain-coding        { background: var(--accent); }
.finding-badge.domain-payer_conduct { background: #7c3aed; }
.finding-badge.domain-nsa           { background: var(--watch); }
.finding-badge.domain-state_law     { background: #0d9488; }
.finding-badge.domain-erisa         { background: #4338ca; }
.finding-badge.regulatory { background: var(--alert); }
.finding-badge.plan { background: var(--watch); }
.finding-badge.warning { background: var(--watch); }
.finding-severity {
  font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-sm);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.finding-severity.severity-likely_error { color: var(--watch); background: var(--watch-tint); }
.finding-severity.severity-probable_violation { color: var(--alert); background: var(--alert-tint); }
.finding-severity.severity-high_confidence_violation { color: var(--alert-2); background: var(--alert-tint); }
.finding-confidence { font-size: 11px; color: var(--ink-3); font-style: italic; }
.finding-description { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.finding-discrepancy {
  font-size: 13px; color: var(--alert); margin-bottom: 6px;
  padding: 8px 12px; background: var(--alert-tint); border-radius: var(--r-sm);
  font-family: var(--mono);
}
.finding-explanation { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin-bottom: 4px; }
.finding-citation { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.finding-remedy {
  font-size: 13px; color: var(--ink-2); margin-top: 8px;
  padding: 10px 12px; background: var(--accent-tint);
  border-radius: var(--r-sm);
}
.finding-remedy strong { color: var(--ink); }
.remedy-deadline { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.remedy-channel {
  font-size: 10px; background: #fff; color: var(--accent-2);
  padding: 2px 6px; border-radius: var(--r-sm);
  margin-left: 4px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}

.cost-share-check {
  margin: 12px 0; padding: 12px 14px;
  background: var(--ok-tint); border-radius: var(--r-sm);
  border-left: 3px solid var(--ok);
  font-size: 13px; color: var(--ink-2);
}
.cost-share-heading { font-weight: 600; font-size: 13px; margin-bottom: 4px; color: var(--ok); }

.unresolved-questions {
  margin: 12px 0; padding: 12px 14px;
  background: var(--watch-tint); border-radius: var(--r-sm);
  border-left: 3px solid var(--watch);
}
.unresolved-heading { font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--watch); }
.unresolved-item { margin-bottom: 8px; font-size: 13px; color: var(--ink-2); }
.unresolved-impact { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ============ GUIDED WALKTHROUGH (detail page #23) ============ */
/* Verdict → "What happened" → "What it means" → "What to do next".
   Reuses the semantic ok/watch/alert tokens; the status color is the single
   accent so the verdict and the call-to-action read instantly. */
.walkthrough { margin-bottom: 24px; }

/* Verdict banner — the one-glance answer */
.verdict {
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--ink-4);
  border-radius: var(--r-lg);
  padding: 28px 32px; margin-bottom: 28px;
  background: var(--card); box-shadow: var(--shadow-1);
}
.verdict.ok    { border-left-color: var(--ok);    background: var(--ok-tint); }
.verdict.watch { border-left-color: var(--watch); background: var(--watch-tint); }
.verdict.alert { border-left-color: var(--alert); background: var(--alert-tint); }
.verdict-caption {
  font-size: 12px; color: var(--ink-3); margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.verdict-line {
  font-size: 34px; font-weight: 600; letter-spacing: -0.025em;
  line-height: 1.1; margin: 0 0 8px; color: var(--ink);
}
.verdict.ok    .verdict-line { color: var(--ok); }
.verdict.watch .verdict-line { color: var(--watch); }
.verdict.alert .verdict-line { color: var(--alert-2); }
.verdict-sub { font-size: 16px; line-height: 1.5; color: var(--ink-2); margin: 0; max-width: 60ch; }
.verdict-sub strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Acts — numbered narrative steps */
.act {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px 28px; margin-bottom: 16px;
  box-shadow: var(--shadow-1);
}
.act-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.act-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.act-head h2 {
  font-size: 18px; font-weight: 600; letter-spacing: -0.015em;
  margin: 0; color: var(--ink);
}
.act-lead { font-size: 16px; line-height: 1.6; color: var(--ink); margin: 0 0 12px; max-width: 68ch; }
.act-body .cost-line { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin: 0 0 8px; }
.act-body .cost-highlight { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.act-aside { font-size: 13px; color: var(--ink-3); margin: 4px 0 0; }
.act-aside .t-mono { font-size: 12px; }
.lines-reviewed { margin-top: 12px; color: var(--ink-3); }

/* Act 3 — the call-to-action, visually distinct */
.act-cta { border-left: 4px solid var(--accent); }
.next-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.next-step {
  position: relative; padding: 14px 16px 14px 48px; margin-bottom: 10px;
  background: var(--accent-tint); border-radius: var(--r-md);
  border: 1px solid var(--accent-rule, var(--hairline));
}
.next-step:last-child { margin-bottom: 0; }
.next-step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 14px; top: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.next-step-text { font-size: 15px; line-height: 1.5; color: var(--ink); font-weight: 500; }
.next-step-meta { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.step-pill {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 999px;
  background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--rule);
}
.step-pill.watch { background: var(--watch-tint); color: var(--watch); border-color: var(--watch-rule); }
.step-pill.alert { background: var(--alert-tint); color: var(--alert); border-color: var(--alert-rule); }
.step-channel {
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--accent-2); background: #fff; border-radius: var(--r-sm); padding: 3px 8px;
}
.next-steps-empty { font-size: 15px; color: var(--ink-2); margin: 0; }

/* Act 1 — "what we examined" checklist (#125). A scannable pass/flag/n-a grid
   so the member sees instantly what was checked and where the problem is. */
.examined-checks { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.examined-heading {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px;
}
.examined-list { list-style: none; margin: 0; padding: 0; }
.examined-item {
  display: grid; grid-template-columns: 20px minmax(0, max-content) auto 1fr;
  align-items: baseline; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--bg-2);
  font-size: 14px; line-height: 1.4;
}
.examined-item:last-child { border-bottom: none; }
.examined-icon { font-weight: 700; text-align: center; }
.examined-item.status-pass .examined-icon { color: var(--ok); }
.examined-item.status-flag .examined-icon { color: var(--alert); }
.examined-item.status-not_applicable .examined-icon { color: var(--ink-4); }
.examined-label { color: var(--ink); font-weight: 500; }
.examined-status-text {
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: var(--bg-2); color: var(--ink-3);
}
.examined-item.status-pass .examined-status-text { background: var(--ok-tint); color: var(--ok); }
.examined-item.status-flag .examined-status-text { background: var(--alert-tint); color: var(--alert); }
.examined-note { color: var(--ink-3); font-size: 13px; }

/* Act 3 — the single primary action, the dominant element on the page (#125) */
.primary-action {
  border: 1px solid var(--accent-rule, var(--hairline));
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md); padding: 18px 20px; margin-bottom: 18px;
  background: var(--accent-tint);
}
.primary-action.alert { border-left-color: var(--alert); background: var(--alert-tint); }
.primary-action.watch { border-left-color: var(--watch); background: var(--watch-tint); }
.primary-action-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 6px;
}
.primary-action.alert .primary-action-label { color: var(--alert); }
.primary-action-headline {
  font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em;
  color: var(--ink); margin-bottom: 6px;
}
.primary-action-detail { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin: 0; max-width: 64ch; }
.primary-action-meta { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Act 3 — root-cause education keyed off the scenario */
.scenario-guidance {
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 16px 18px; margin-bottom: 18px; background: var(--bg-2);
}
.scenario-guidance-label {
  font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px;
}
.scenario-guidance-what { font-size: 14px; line-height: 1.55; color: var(--ink-2); margin: 0 0 8px; max-width: 66ch; }
.scenario-guidance-how { font-size: 14px; line-height: 1.55; color: var(--ink); margin: 0; max-width: 66ch; }
.scenario-guidance-how strong { color: var(--ink); }

/* Act 3 — supporting steps, de-emphasized beneath the primary action */
.supporting-steps-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px;
}

/* Orchestrated page-load reveal — one staggered entrance, nothing scattered */
@media (prefers-reduced-motion: no-preference) {
  .verdict, .walkthrough .act { animation: wt-rise .45s ease both; }
  .verdict { animation-delay: 0s; }
  .walkthrough .act:nth-of-type(1) { animation-delay: .08s; }
  .walkthrough .act:nth-of-type(2) { animation-delay: .16s; }
  .walkthrough .act:nth-of-type(3) { animation-delay: .24s; }
  @keyframes wt-rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ============ SECTIONS (detail page collapsibles) ============ */
.section {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.section h2 {
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  margin: 0 0 12px; color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 10px;
}
details.section { cursor: default; }
details.section > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::before {
  content: '\25B6'; font-size: 10px; color: var(--ink-4);
  transition: transform 0.15s;
}
details[open].section > summary::before { transform: rotate(90deg); }
details.section > summary h2 { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
details[open].section > summary h2 {
  margin-bottom: 12px; border-bottom: 1px solid var(--hairline); padding-bottom: 10px;
}
details.section .detail-content { margin-top: 4px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.detail-item label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--ink-3); text-transform: uppercase;
  display: block; margin-bottom: 2px;
}
.detail-item .value { font-size: 15px; font-weight: 500; color: var(--ink); }
.detail-item .value.money { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.detail-item .code-inline { font-size: 11px; color: var(--ink-3); display: block; margin-top: 2px; font-family: var(--mono); }

/* Help tip — the term itself is the trigger, styled as a link so users know it has a tooltip */
.help-tip {
  color: var(--accent); cursor: help; position: relative;
  text-decoration: underline dotted; text-decoration-color: var(--accent-rule);
  text-underline-offset: 3px;
}
.help-tip:hover { color: var(--accent-2); text-decoration-color: var(--accent-2); }
.help-tip::after {
  content: attr(data-tip);
  position: absolute; bottom: 100%; right: 0;
  background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: normal;
  text-transform: none; white-space: normal; width: 320px;
  opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 100;
}
.help-tip:hover::after { opacity: 1; }

/* ============ TABLE ============ */
table.std { width: 100%; border-collapse: collapse; font-size: 14px; }
table.std th {
  text-align: left; font-size: 11px; font-weight: 600;
  color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em;
  padding: 10px 12px; border-bottom: 1px solid var(--hairline);
}
table.std td {
  padding: 10px 12px; border-bottom: 1px solid var(--hairline);
  vertical-align: top; color: var(--ink-2);
}
table.std td.money { font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
table.std th.money-hdr { text-align: right; }
table.std tr.highlight-red td { background: var(--alert-tint); }
table.std tr.highlight-yellow td { background: var(--watch-tint); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.code-ref { font-size: 12px; color: var(--ink-3); font-family: var(--mono); }
.code-ref .code-num {
  color: var(--accent); font-weight: 500;
  cursor: help; position: relative;
  border-bottom: 1px dotted var(--accent-rule);
}
.code-ref .code-num::after {
  content: attr(data-tip);
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 6px 10px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 400; white-space: normal;
  max-width: 320px; min-width: 180px;
  opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 10;
  font-family: var(--sans);
}
.code-ref .code-num:hover::after { opacity: 1; }

.column-legend { margin-top: 12px; font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.column-legend-item { padding: 2px 0; }
.column-legend-item strong { color: var(--ink-2); }
.footnote { font-size: 12px; color: var(--ink-3); margin-top: 10px; font-style: italic; }
.row-legend { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }

/* ============ PROCESSING (SSE) ============ */
.proc-status {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; color: var(--ink-2);
  letter-spacing: 0;
}
.pulse-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-dot { animation: none; }
}
.progress-bar-bg {
  height: 6px; background: var(--bg-2);
  border-radius: 999px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; background: var(--ink);
  border-radius: 999px; transition: width .4s ease; width: 0%;
}
.progress-text { font-size: 13px; color: var(--ink-3); margin-top: 8px; text-align: center; font-family: var(--mono); }

/* Rotating plain-language narration during long parse/audit phases (#128). */
.proc-edu {
  font-family: var(--sans);
  font-size: 14px; line-height: 1.5; color: var(--ink-3);
  text-align: center; margin: 14px auto 0; max-width: 52ch;
  min-height: 21px; /* reserve a line so rotation never reflows the layout */
  transition: opacity .25s ease;
}
@media (prefers-reduced-motion: reduce) {
  .proc-edu { transition: none; }
}

.proc-steps { list-style: none; padding: 0; margin: 0; }
.proc-steps li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--hairline);
  font-size: 14px;
}
.proc-steps li:last-child { border-bottom: none; }
.proc-steps .step-icon { width: 20px; text-align: center; flex-shrink: 0; color: var(--ink-4); }
.proc-steps .step-active .step-icon { color: var(--accent); }
.proc-steps .step-done   .step-icon { color: var(--ok); font-weight: 700; }
.proc-steps .step-pending .step-label { color: var(--ink-4); }
.proc-steps .step-active  .step-label { color: var(--ink); font-weight: 500; }
.proc-steps .step-done    .step-label { color: var(--ink-2); }
.proc-steps .step-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--hairline); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.result-success {
  text-align: center; padding: 14px 16px;
  background: var(--ok-tint); color: var(--ok);
  border: 1px solid var(--ok-rule);
  border-radius: var(--r-md); font-size: 14px; font-weight: 500;
}
.result-error {
  text-align: center; padding: 14px 16px;
  background: var(--alert-tint); color: var(--alert-2);
  border: 1px solid var(--alert-rule);
  border-radius: var(--r-md); font-size: 14px;
}
.result-errors {
  text-align: center; padding: 14px 16px;
  background: var(--watch-tint); color: var(--watch);
  border: 1px solid var(--watch-rule);
  border-radius: var(--r-md); font-size: 14px;
}
.result-link {
  display: inline-block; margin-top: 12px;
  color: var(--accent); text-decoration: none; font-size: 14px;
}
.result-link:hover { color: var(--accent-2); text-decoration: underline; }

/* ============ DROP ZONE ============ */
.drop-zone {
  display: block;  /* the dropzone is a <label>; force block layout */
  border: 2px dashed var(--rule); border-radius: var(--r-lg);
  padding: 40px 20px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent); background: var(--accent-tint);
}
.drop-zone-icon { display: block; font-size: 36px; color: var(--ink-4); margin-bottom: 8px; }
.drop-zone-text { display: block; font-size: 15px; color: var(--ink-2); }
.drop-zone-text strong { color: var(--accent); }
.drop-zone-hint { display: block; font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.file-input { display: none; }
.file-list, .file-preview {
  margin-top: 16px; list-style: none; padding: 0;
}
.file-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--bg-2);
  border-radius: var(--r-sm); font-size: 13px; margin-bottom: 6px;
}
.file-item .name { color: var(--ink); font-weight: 500; word-break: break-all; }
.file-item .size { color: var(--ink-3); white-space: nowrap; margin-left: 12px; font-family: var(--mono); }
.file-item .file-status { width: 20px; text-align: center; flex-shrink: 0; color: var(--ink-4); }
.file-item .status-done { color: var(--ok); font-weight: 700; }
.file-item .status-error { color: var(--alert); font-weight: 700; }
.file-error { font-size: 12px; color: var(--alert); margin-top: 2px; }

/* ============ ADD-A-BILL PATHS (one-time upload vs. automatic KP sync) ============ */
.path-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px; align-items: stretch;
}
.path-card { display: flex; flex-direction: column; }
.path-card .label-eyebrow { margin-bottom: 10px; }
.path-title { font-size: 19px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.path-desc { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 0 0 20px; }
.path-feats { list-style: none; margin: 0 0 20px; padding: 0; }
.path-feats li {
  position: relative; padding-left: 24px; margin-bottom: 10px;
  font-size: 14px; line-height: 1.45; color: var(--ink-2);
}
.path-feats li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--ok); font-weight: 600;
}
.path-actions { margin-top: auto; }
@media (max-width: 640px) {
  .path-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Connect-account hub (#64): eyebrow + status badge on one row; connection meta. */
.integration-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 4px;
}
.integration-head .label-eyebrow { margin-bottom: 0; }
.integration-meta {
  margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--hairline);
  display: flex; gap: 32px;
}
.integration-meta dt { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.integration-meta dd { font-size: 14px; color: var(--ink); margin: 0; font-variant-numeric: tabular-nums; }

/* KP connected screen — Import is primary; Disconnect is deliberately quiet. */
.kp-import-lead { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 16px 0 20px; }
.kp-reassure { margin-top: 16px; color: var(--ink-3); }
.kp-disconnect-row {
  margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--hairline);
  text-align: center;
}
.btn-disconnect {
  background: none; border: none; cursor: pointer; padding: 4px;
  font-family: var(--sans); font-size: 13px; color: var(--ink-4);
  text-decoration: underline; text-underline-offset: 3px;
}
.btn-disconnect:hover { color: var(--alert); }

/* ============ PHOTO CAPTURE (mobile photo-a-bill) ============ */
.capture-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

/* `capture="environment"` only launches the camera on touch devices; on
   desktop the browser ignores it and the button just opens a file picker —
   pure duplication of the dropzone. Hide the camera affordance on devices
   whose primary input is a mouse. Works without JS. */
@media (hover: hover) and (pointer: fine) {
  #camera-label, #camera-input { display: none !important; }
}
.capture-btn { cursor: pointer; }
.preview-item { gap: 12px; }
.thumb {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: var(--r-sm);
  object-fit: cover; background: var(--bg-2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 22px;
}
.thumb-pdf { color: var(--ink-3); }
.preview-item .name { flex: 1; }
.preview-ctrls { display: inline-flex; gap: 4px; flex-shrink: 0; }
.preview-btn {
  width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: var(--bg); color: var(--ink-2); font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.preview-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.preview-btn:disabled { opacity: .35; cursor: default; }
.upload-progress {
  margin-top: 20px; text-align: center; color: var(--ink-2); font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
/* `display:flex` above would otherwise defeat the HTML `hidden` attribute,
   showing the spinner on page load before any file is selected. */
.upload-progress[hidden] { display: none; }
.upload-progress .spinner {
  width: 16px; height: 16px; border: 2px solid var(--rule); border-top-color: var(--accent);
  border-radius: 50%; display: inline-block; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ PLAN BENEFITS ============ */
.label-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
  margin: 24px 0 10px;
}
.benefit-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 3px solid transparent;
  border-radius: var(--r-md);
  margin-bottom: 6px;
}
.benefit-row.free { border-left-color: var(--ok); }
.benefit-row.copay { border-left-color: var(--accent); }
.benefit-row.deductible { border-left-color: var(--watch); }
.benefit-info { flex: 1; min-width: 0; }
.benefit-name { font-size: 14px; color: var(--ink); font-weight: 500; }
.benefit-details { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.benefit-cost {
  font-size: 16px; font-weight: 600; color: var(--ink);
  margin-left: 16px; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.benefit-cost.free { color: var(--ok); }

/* Plan-year jump nav — lets multi-plan users reach a lower plan without
   scrolling past the full benefits list of the ones above (#137). */
.plan-jumpnav {
  /* Sits UNDER the sticky primary <nav> (z-index 5, top: 0). Anchored at
     --primary-nav-h with a lower z-index so the primary nav always wins any
     residual overlap. */
  position: sticky; top: var(--primary-nav-h); z-index: 4;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 20px; padding: 12px 0;
  background: var(--bg);
  box-shadow: 0 1px 0 0 var(--hairline);
}
.plan-jumpnav a {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2); text-decoration: none;
  padding: 7px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--rule);
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.plan-jumpnav a:hover,
.plan-jumpnav a:focus-visible {
  color: var(--accent); background: var(--accent-tint); border-color: var(--accent-rule);
  outline: none;
}
.plan-jumpnav-top { color: var(--ink-3); }
#plan-top { scroll-margin-top: calc(var(--primary-nav-h) + 16px); }

/* Add-a-plan card on top of /plan (#165) — separates it from the loaded plans
   below the sticky nav. */
.plan-add-card { margin-bottom: 24px; }

/* Plan card header — lead with the coverage year as the scan anchor. The
   anchor must clear the sticky primary nav AND the sticky jumpnav (#167). */
.plan-card { scroll-margin-top: calc(var(--primary-nav-h) + 72px); }
.plan-header { margin-bottom: 4px; }
.plan-yearrow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan-year-big {
  font-size: 44px; font-weight: 600; line-height: 1;
  letter-spacing: -0.03em; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.plan-year-tag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-4);
}
.plan-type-chip {
  margin-left: auto; align-self: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); background: var(--bg-2);
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 5px 11px;
}
.plan-header .plan-name {
  font-size: 19px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink); margin-top: 10px;
}
.plan-header .plan-meta { font-size: 12px; color: var(--ink-3); margin-top: 4px; font-family: var(--mono); }
.fin-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline);
  border-radius: var(--r-md); overflow: hidden; margin-top: 20px;
}
.fin-item { background: var(--card); padding: 20px; text-align: left; }
.fin-item.full-width { grid-column: 1 / -1; }
.fin-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px;
}
.fin-value {
  font-size: 36px; font-weight: 600; letter-spacing: -0.025em;
  line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums;
}
.fin-value.accent { color: var(--accent); }
.fin-sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

.rx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rx-table th {
  text-align: left; padding: 10px 14px; background: var(--bg-2);
  color: var(--ink-3); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.rx-table td { padding: 10px 14px; border-top: 1px solid var(--hairline); }
.rx-tier-name { color: var(--ink); font-weight: 500; }
.rx-cost { font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

.cap-callout {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; background: var(--watch-tint);
  border-radius: var(--r-sm);
  border: 1px solid var(--watch-rule);
  border-left: 3px solid var(--watch);
  margin-bottom: 6px;
}
.cap-icon { font-size: 16px; flex-shrink: 0; line-height: 1.4; color: var(--watch); }
.cap-body { flex: 1; }
.cap-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.cap-detail { font-size: 13px; color: var(--ink-2); }
.cap-basis { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* Diff card (plan replacement) */
.diff-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-lg);
  padding: 24px 28px; margin-bottom: 20px;
  box-shadow: var(--shadow-1);
}
.diff-card.unchanged { border-left-color: var(--ok); }
.diff-title { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 6px; }
.diff-message { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; line-height: 1.55; }
.diff-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.diff-table th {
  text-align: left; padding: 8px 12px; background: var(--bg-2);
  color: var(--ink-3); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.diff-table td { padding: 8px 12px; border-top: 1px solid var(--hairline); color: var(--ink-2); }
.diff-table .field { color: var(--ink); font-weight: 500; }
.diff-table .old-val { color: var(--alert); text-decoration: line-through; font-family: var(--mono); }
.diff-table .new-val { color: var(--ok); font-weight: 500; font-family: var(--mono); }

/* Review buttons / note area on detail */
.review-area { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.review-buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-review {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  height: 32px; padding: 0 14px; border-radius: var(--r-md);
  background: var(--card); color: var(--ink);
  border: 1px solid var(--rule); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  white-space: nowrap;
}
.btn-review:hover { border-color: var(--ink); }
.btn-review.active-ok {
  background: var(--ok); color: #fff; border-color: var(--ok);
}
.btn-review.active-flagged {
  background: var(--watch); color: #fff; border-color: var(--watch);
}
.btn-review:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-clear-review {
  font-size: 12px; color: var(--ink-3); background: none; border: none;
  cursor: pointer; text-decoration: underline; padding: 4px 8px;
}
.btn-clear-review:hover { color: var(--ink-2); }
.review-help { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.review-timestamp { font-size: 12px; color: var(--ink-3); margin-top: 8px; font-family: var(--mono); }
.note-area { margin-top: 16px; }
.note-area label {
  display: block; font-size: 12px; font-weight: 500; color: var(--ink-2);
  margin-bottom: 6px;
}
.note-actions { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.note-status { font-size: 12px; color: var(--ok); }

/* Hero (landing) */
.hero-block {
  text-align: center; max-width: 560px; margin: 0 auto; padding: 40px 20px;
}
.hero-block h1 {
  font-size: 56px; font-weight: 600; letter-spacing: -0.035em;
  line-height: 1.05; margin: 0 0 18px;
  color: var(--ink);
}
.hero-block h1 .flag { color: var(--alert); }
.hero-block p {
  font-size: 16px; color: var(--ink-2); line-height: 1.55;
  margin: 0 auto 28px; max-width: 52ch;
}

/* Audit timestamp (detail) */
.audit-timestamp {
  font-size: 12px; color: var(--ink-3); margin-top: 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-family: var(--mono);
}
.btn-reaudit {
  font-family: var(--sans); font-size: 12px; padding: 4px 12px;
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink-2); cursor: pointer;
}
.btn-reaudit:hover { border-color: var(--ink); color: var(--ink); }
.btn-reaudit:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-reaudit.is-loading { display: inline-flex; align-items: center; gap: 6px; }
.btn-reaudit.is-loading .spinner { width: 12px; height: 12px; border-width: 2px; }

/* Claim-nav breadcrumb */
.claim-nav {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px; flex-wrap: wrap;
}

/* Diagnosis / visit overview card content */
.visit-overview {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.visit-overview .visit-field.full-width { grid-column: 1 / -1; }
.visit-overview .visit-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px;
}
.visit-overview .visit-value { font-size: 14px; color: var(--ink); line-height: 1.45; }
.visit-overview .visit-value.money { font-family: var(--mono); }
.visit-overview .cost-highlight { font-weight: 600; }

/* Footer / disclaimer */
.footer-bar {
  max-width: 1180px; margin: 60px auto 32px;
  padding: 16px 48px; border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em;
}
.footer-bar .footer-links { display: flex; gap: 16px; }
.footer-bar .footer-links a { color: var(--ink-3); }
.footer-bar .footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ============ LANDING / MARKETING ============ */
html { scroll-behavior: smooth; }

.landing { color: var(--ink); }
.landing a.text-link { color: var(--accent); text-decoration: none; }
.landing a.text-link:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }

.landing-nav {
  max-width: 1180px; margin: 0 auto;
  padding: 20px 48px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.landing-nav .nav-actions { display: flex; align-items: center; gap: 14px; }

.landing-section {
  max-width: 1180px; margin: 0 auto;
  padding: 80px 48px;
  border-top: 1px solid var(--hairline);
}
.landing-section:first-of-type { border-top: none; }
.landing-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 16px;
}
.landing-h2 {
  font-size: 40px; font-weight: 600; letter-spacing: -0.028em;
  line-height: 1.1; margin: 0 0 20px; color: var(--ink);
  max-width: 24ch;
}
.landing-lead {
  font-size: 17px; line-height: 1.55; color: var(--ink-2);
  max-width: 56ch; margin: 0 0 40px;
}

/* Hero */
.landing-hero {
  max-width: 1180px; margin: 0 auto;
  padding: 40px 48px 96px;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 64px; align-items: center;
}
.landing-hero h1 {
  font-size: 72px; font-weight: 600; letter-spacing: -0.035em;
  line-height: 1.02; margin: 0 0 24px; color: var(--ink);
}
.landing-hero h1 .flag { color: var(--alert); }
.landing-hero .sub {
  font-size: 19px; line-height: 1.5; color: var(--ink-2);
  margin: 0 0 20px; max-width: 46ch;
}
.landing-hero .support {
  font-size: 15px; color: var(--ink-3); line-height: 1.55;
  margin: 0 0 32px; max-width: 52ch;
}
.landing-hero .btn-row { margin-bottom: 24px; align-items: center; }

/* Primary hero CTA — top of the visual hierarchy */
.btn-hero {
  height: 56px; padding: 0 30px; font-size: 16px; font-weight: 600;
  border-radius: var(--r-lg);
  box-shadow: 0 8px 20px -10px rgba(14, 19, 32, 0.35);
  letter-spacing: -0.01em;
}
.btn-hero .arrow {
  display: inline-block; margin-left: 4px;
  transition: transform .15s ease;
}
.btn-hero:hover { box-shadow: 0 12px 24px -10px rgba(14, 19, 32, 0.45); }
.btn-hero:hover .arrow { transform: translateX(3px); }

/* Secondary hero action: plain text link with a caret. Keeps attention on the primary. */
.btn-link-strong {
  background: transparent; border: none; padding: 0 6px; height: auto;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  color: var(--ink-2); text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
}
.btn-link-strong:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.btn-link-strong::after { content: "\203A"; font-size: 18px; line-height: 1; color: var(--ink-3); }
.landing-hero .micro-trust {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-3);
}
.landing-hero .micro-trust span { display: inline-flex; align-items: center; gap: 6px; }
.landing-hero .micro-trust .mk {
  width: 5px; height: 5px; border-radius: 50%; background: var(--ok);
}

/* Early-access form (pre-launch landing CTA) */
.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;
}
.ea-block { margin-bottom: 24px; }
.ea-block-center { display: flex; flex-direction: column; align-items: center; }
.ea-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ea-block-center .ea-form { justify-content: center; }
.ea-input { min-width: 240px; flex: 1 1 240px; max-width: 340px; }
.ea-success {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--ok);
}
.ea-success .mk { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.ea-error { margin-top: 8px; font-size: 13px; color: var(--alert, #c0392b); }
@media (max-width: 599px) {
  .ea-form { flex-direction: column; align-items: stretch; }
  /* Column layout makes the vertical axis the flex main axis, so the
     row-layout `flex: 1 1 240px` would drive the input's HEIGHT (giant box).
     Reset to auto so height comes from `.input { height: 40px }`. */
  .ea-input { max-width: none; flex: 0 0 auto; }
}

/* Product preview (hero right column) */
.preview-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  padding: 28px;
  position: relative;
}
.preview-card .preview-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; margin-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}
.preview-card .preview-claim {
  font-family: var(--mono); font-size: 12px; color: var(--ink-3);
}
.preview-card .finding {
  background: var(--alert-tint);
  border: 1px solid var(--alert-rule);
  border-left: 3px solid var(--alert);
  border-radius: var(--r-md);
  padding: 20px;
}
.preview-card .finding .f-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--alert); margin-bottom: 10px;
}
.preview-card .finding .f-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--alert); }
.preview-card .finding h4 {
  font-size: 18px; font-weight: 600; letter-spacing: -0.015em;
  line-height: 1.3; margin: 0 0 12px; color: var(--ink);
}
.preview-card .finding .f-body { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin: 0; }
.preview-card .follow-up {
  margin-top: 16px; padding: 14px 16px;
  background: var(--bg); border-radius: var(--r-md);
  border: 1px solid var(--hairline);
}
.preview-card .follow-up .fu-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px;
}
.preview-card .follow-up .fu-text { font-size: 14px; color: var(--ink); line-height: 1.5; }

/* Errors section */
.error-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.error-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--alert);
  border-radius: var(--r-md);
  padding: 24px 28px;
}
.error-card .e-title {
  font-size: 16px; font-weight: 600; color: var(--ink);
  margin: 0 0 8px; letter-spacing: -0.01em;
}
.error-card .e-body {
  font-size: 14px; color: var(--ink-2); line-height: 1.55; margin: 0;
  max-width: 52ch;
}
.errors-closer {
  margin-top: 32px; font-size: 15px; color: var(--ink-3);
  max-width: 56ch;
}

/* Trust section */
.trust-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 32px;
}
.trust-item .t-head {
  font-size: 15px; font-weight: 600; color: var(--ink);
  margin: 0 0 6px; letter-spacing: -0.01em;
}
.trust-item .t-body {
  font-size: 14px; color: var(--ink-2); line-height: 1.55; margin: 0;
  max-width: 42ch;
}
.trust-note {
  font-size: 14px; color: var(--ink-3); line-height: 1.6;
  max-width: 68ch; margin: 0;
  padding-top: 24px; border-top: 1px solid var(--hairline);
}
.trust-reassure {
  font-size: 15px; color: var(--ink-2); font-weight: 500;
  max-width: 56ch; margin: 16px 0 0;
}

/* Founder section */
.founder-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 64px; align-items: start;
}
.founder-body {
  font-size: 17px; color: var(--ink-2); line-height: 1.65;
  max-width: 58ch; margin: 0;
}
.founder-body p { margin: 0 0 18px; }
.founder-body p:last-child { margin-bottom: 0; }
.pull-quote {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--alert);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  position: sticky; top: 40px;
}
.pull-quote blockquote {
  font-size: 20px; font-weight: 500; line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink); margin: 0 0 16px; font-style: normal;
}
.pull-quote cite {
  font-style: normal; font-size: 13px; color: var(--ink-3);
  font-family: var(--mono); letter-spacing: 0.04em;
}

/* Final CTA band */
.cta-band {
  max-width: 1180px; margin: 40px auto 0;
  padding: 64px 48px;
}
.cta-band-inner {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 64px 56px;
  box-shadow: var(--shadow-1);
  text-align: center;
}
.cta-band h2 {
  font-size: 48px; font-weight: 600; letter-spacing: -0.03em;
  line-height: 1.05; margin: 0 0 16px; color: var(--ink);
}
.cta-band p {
  font-size: 17px; color: var(--ink-2); line-height: 1.55;
  margin: 0 auto 32px; max-width: 48ch;
}
.cta-band .btn-hero {
  height: 60px; padding: 0 34px; font-size: 17px;
}
.cta-band .pricing-line {
  font-size: 13px; color: var(--ink-3); margin: 24px 0 0;
  max-width: none;
}

/* Landing footer */
.landing-footer {
  max-width: 1180px; margin: 80px auto 0;
  padding: 32px 48px 40px;
  border-top: 1px solid var(--hairline);
}
.landing-footer .lf-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-3);
}
.landing-footer .lf-links { display: flex; gap: 20px; }
.landing-footer .lf-links a { color: var(--ink-3); }
.landing-footer .lf-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.landing-footer .lf-disclaimer {
  margin-top: 20px; padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 12px; color: var(--ink-4); line-height: 1.55;
  max-width: 78ch;
}

/* Landing responsive */
@media (max-width: 960px) {
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 24px 32px 72px;
  }
  .landing-hero h1 { font-size: 56px; }
  .landing-section { padding: 64px 32px; }
  .founder-grid { grid-template-columns: 1fr; gap: 32px; }
  .pull-quote { position: static; }
  .cta-band { padding: 48px 32px; }
  .cta-band-inner { padding: 48px 32px; }
  .cta-band h2 { font-size: 36px; }
  .landing-nav { padding: 20px 32px; }
  .landing-footer { padding: 32px; }
}
@media (max-width: 640px) {
  .landing-nav { padding: 16px 20px; }
  .landing-hero { padding: 16px 20px 56px; gap: 36px; }
  .landing-hero h1 { font-size: 40px; letter-spacing: -0.025em; }
  .landing-hero .sub { font-size: 16px; }
  .landing-hero .btn-hero { height: 52px; padding: 0 24px; font-size: 15px; }
  .cta-band .btn-hero { height: 54px; padding: 0 24px; font-size: 15px; }
  .landing-section { padding: 48px 20px; }
  .landing-h2 { font-size: 28px; }
  .landing-lead { font-size: 15px; margin-bottom: 28px; }
  .error-grid { grid-template-columns: 1fr; }
  .error-card { padding: 20px 22px; }
  .trust-grid { grid-template-columns: 1fr; gap: 24px; }
  .founder-body { font-size: 16px; }
  .pull-quote { padding: 20px 22px; }
  .pull-quote blockquote { font-size: 17px; }
  .cta-band { padding: 32px 20px 0; }
  .cta-band-inner { padding: 36px 22px; }
  .cta-band h2 { font-size: 28px; }
  .cta-band p { font-size: 15px; }
  .cta-band .btn { height: 48px; padding: 0 22px; font-size: 15px; }
  .landing-footer { padding: 24px 20px 32px; margin-top: 48px; }
  .preview-card { padding: 22px; }
  .preview-card .finding { padding: 18px; }
  .preview-card .finding h4 { font-size: 16px; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .nav { padding: 12px 16px; grid-template-columns: auto auto; gap: 12px; }
  .nav-tabs {
    grid-column: 1 / -1; order: 3;
    border-top: 1px solid var(--hairline);
    padding-top: 10px; margin: 4px -16px -12px;
    padding-left: 16px; padding-right: 16px;
  }
  .nav-right .member { display: none; }

  .page-head { grid-template-columns: 1fr; gap: 16px; }
  .page-head .title { font-size: 32px; }

  .callout { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .callout .money-wrap { text-align: left; }
  .callout .money { font-size: 48px; }

  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--hairline); }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(odd) { border-right: 1px solid var(--hairline); }
  .stat:nth-last-child(-n+2) { border-bottom: none; }

  .toolbar { grid-template-columns: 1fr; }

  .claim { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px; }
  .claim .amt { align-items: flex-start; min-width: 0; text-align: left; }

  .card { padding: 20px; }
  .card-centered { padding: 28px 20px; }

  .detail-grid { grid-template-columns: 1fr; gap: 12px; }
  .visit-overview { grid-template-columns: 1fr; gap: 14px; }
  .fin-hero { grid-template-columns: 1fr; }
  .fin-value { font-size: 28px; }

  .hero-block h1 { font-size: 40px; }
  .hero-block { padding: 32px 16px; }

  .alert-panel { padding: 20px; }
  .alert-panel h4 { font-size: 19px; }

  /* Guided walkthrough (#23) — keep verdict + acts scannable on phones */
  .verdict { padding: 20px; }
  .verdict-line { font-size: 26px; }
  .verdict-sub { font-size: 15px; }
  .act { padding: 20px; }
  .act-lead { font-size: 16px; }
  .next-step-text { font-size: 16px; }
  .primary-action-headline { font-size: 18px; }

  /* Examined checklist: stack the note onto its own row so the label + status
     stay readable on a narrow screen (#125). */
  .examined-item {
    grid-template-columns: 20px 1fr auto;
    column-gap: 8px; row-gap: 2px;
  }
  .examined-note { grid-column: 2 / -1; }

  table.std { font-size: 13px; }
  table.std th, table.std td { padding: 8px 10px; }

  .help-tip::after { display: none; }
  .help-tip::before {
    content: " (" attr(data-tip) ")";
    display: inline; font-size: 10px; color: var(--ink-4); font-weight: 400;
    text-transform: none; letter-spacing: normal;
  }
  .code-ref .code-num::after { display: none; }
  .code-ref .code-num { cursor: default; border-bottom: none; }

  /* Slice 3 (#68) — mobile results readability. Bump the core reading content
     (the audit findings a phone user lands on) to >=16px, and grow interactive
     controls to a >=44px tap target (WCAG 2.5.5). */
  .finding-description,
  .finding-explanation { font-size: 16px; }
  .finding-remedy,
  .finding-discrepancy,
  .cost-share-check,
  .unresolved-item { font-size: 15px; }
  .detail-item .value { font-size: 16px; }
  /* 16px also stops iOS from auto-zooming when a field gains focus. */
  .input, .select, .textarea { font-size: 16px; }

  .btn:not(.btn-link):not(.btn-link-strong) { min-height: 44px; }
  .btn-sm { height: auto; min-height: 44px; padding: 0 16px; }
  .btn-review { height: auto; min-height: 44px; padding: 0 18px; font-size: 15px; }
  .btn-reaudit { min-height: 44px; padding: 10px 16px; }
  .btn-clear-review { min-height: 44px; padding: 10px 12px; }
  .review-buttons { gap: 10px; }

  .footer-bar { padding: 16px; margin: 40px 0 16px; }
}
