/* ============================================================
   Equilon · Component Library v1 · stylesheet
   Inherits tokens.json v0.3 (color + type) · extends → v0.4 (component-level)
   ============================================================ */

/* --- DOCTRINE NOTE · v0.4.4 · clinical attribution -----------------
   The receipt-v primitive (defined page-locally in Landing.html and
   Pricing.html; candidate for promotion to cl-styles.css in a later
   phase) renders an "Attested" line on every sample receipt. Until
   Equilon's clinical network partner is selected, that line MUST pull
   from clinicians.illustrative.defaultSigner in tokens.json — role
   attribution ("Prescribing practitioner · Licensed MD") plus
   illustrative NPI, never a named clinician.

   Sample receipts MUST carry the watermark language specified in
   clinicians.illustrative.defaultSigner.$watermarkTreatment:
   "Sample record · patient identifier redacted · illustrative signer
   pending clinical network lock."

   When the partner locks, surfaces automatically render a specific
   signer's name and NPI on each receipt, pulled from the partner's
   roster API. The primitive's markup does not change — only the token
   layer does. Do not hardcode a named clinician on any surface.
   ------------------------------------------------------------- */

:root {
  /* ramps — from tokens.json v0.3 */
  --navy-100:#D9DFE6; --navy-300:#7F94A8; --navy-500:#3B5269; --navy-600:#132C44; --navy-700:#0E2439; --navy-900:#061321;
  --sage-100:#E0E7E1; --sage-300:#ADBEB2; --sage-500:#748E7B; --sage-700:#4C6654; --sage-900:#2D4234;
  --cream-100:#FBF7ED; --cream-300:#F4EDE0; --cream-500:#E3D8BE; --cream-700:#BBA97E; --cream-900:#6E6240;
  --gold-100:#F1E6CA; --gold-300:#DEC38F; --gold-500:#C6A052; --gold-700:#947635; --gold-900:#574320;
  --graphite-100:#D5D5D4; --graphite-300:#8A8A89; --graphite-500:#555554; --graphite-700:#2A2A2A; --graphite-900:#0F0F0F;

  /* semantic */
  --success-100:#DFE8E1; --success-300:#9EB6A4; --success-500:#5E8768; --success-700:#3C5F44; --success-900:#2D4234;
  --warning-100:#F4E8CC; --warning-300:#DCBE80; --warning-500:#B58936; --warning-700:#7C5C1F; --warning-900:#574320;
  --danger-100:#ECD8CC;  --danger-300:#CFA08A;  --danger-500:#A85A3E;  --danger-700:#6E3823;  --danger-900:#4A2517;

  /* brand primitive */
  --vellum:#E8D9A4; --vellum-border:var(--gold-700);

  /* semantic surface indirection — light/dark is a token swap */
  --surface-primary: var(--cream-300);
  --surface-raised:  var(--cream-100);
  --surface-sunk:    var(--cream-500);
  --ink-primary:     var(--navy-700);
  --ink-body:        var(--graphite-700);
  --ink-muted:       var(--graphite-500);
  --rule:          rgba(14,36,57,0.18);
  --rule-soft:     rgba(14,36,57,0.10);
  --rule-softest:  rgba(14,36,57,0.06);

  --r: 4px;
  --r-pill: 999px;
  --focus-ring: 0 0 0 3px rgba(14,36,57,0.18);
}
/* Dark-surface semantic token swap — v0.4.7 PROMOTED from page-local CSS.
   All three surfaces (Landing, Pricing, Intake) used identical values.
   Future surfaces loading cl-styles.css inherit dark behaviour for free.
   Page-local CSS may still override individual tokens (e.g. Landing.html
   uses rule-soft: 0.12 instead of 0.10 — that override stays page-local).
   Bound to: $contractEnforcement.v0.4.7 surface-token sweep. */
body[data-surface="dark"] {
  --surface-primary: var(--navy-700);
  --surface-raised:  var(--navy-600);
  --surface-sunk:    var(--navy-900);
  --ink-primary:     var(--cream-100);
  --ink-body:        rgba(244,237,224,0.88);
  --ink-muted:       rgba(244,237,224,0.62);
  --rule:          rgba(244,237,224,0.16);
  --rule-soft:     rgba(244,237,224,0.10);
  --rule-softest:  rgba(244,237,224,0.06);
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--surface-primary); color: var(--ink-body);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
code, .mono { font-family: 'JetBrains Mono', monospace; font-feature-settings:"tnum","zero"; }
.italic { font-style: italic; }

/* ============ PAGE SHELL ============ */
.page { max-width: 1400px; margin: 0 auto; padding: 64px 56px 120px; }
.masthead {
  display: grid; grid-template-columns: 1fr auto;
  align-items: end; gap: 40px;
  padding-bottom: 28px; border-bottom: 1px solid var(--rule);
  margin-bottom: 48px;
}
.masthead .phase-tag {
  font-family:'JetBrains Mono',monospace; font-size:11px;
  letter-spacing:0.22em; text-transform:uppercase;
  color:var(--sage-700); margin-bottom:12px;
}
.masthead h1 {
  font-family:'Fraunces',serif; font-weight:400;
  font-variation-settings:"opsz" 144,"SOFT" 45;
  font-size: 56px; line-height: 1; letter-spacing:-0.022em;
  color: var(--ink-primary);
}
.masthead h1 em { font-style: italic; font-weight:400; color: var(--sage-700); }
.masthead .meta {
  font-family:'JetBrains Mono',monospace; font-size:11px;
  letter-spacing:0.14em; text-transform:uppercase;
  color: var(--ink-primary); opacity:0.65;
  text-align:right; line-height:1.8;
}
.masthead .meta span { display:block; }

.intro { display:grid; grid-template-columns: 1fr 1.4fr; gap: 56px; margin-bottom: 72px; }
.intro .eyebrow {
  font-family:'JetBrains Mono',monospace; font-size:11px;
  letter-spacing:0.22em; text-transform:uppercase;
  color: var(--sage-700); margin-bottom: 14px;
}
.intro h2 {
  font-family:'Fraunces',serif; font-weight:500; font-size: 32px;
  line-height:1.2; letter-spacing:-0.012em; color: var(--ink-primary);
  font-variation-settings:"opsz" 72,"SOFT" 55;
}
.intro h2 em { font-style: italic; font-weight:400; color: var(--sage-700); }
.intro .body p { font-size: 15px; line-height: 1.7; max-width: 58ch; margin-bottom: 12px; color: var(--ink-body); }
.intro .body p em { font-style: italic; color: var(--ink-primary); }

section { margin-bottom: 96px; scroll-margin-top: 32px; }
.sec-head {
  display:grid; grid-template-columns: auto 1fr auto;
  gap: 24px; align-items: baseline;
  padding-bottom: 18px; border-bottom: 1px solid var(--rule);
  margin-bottom: 36px;
}
.sec-num { font-family:'JetBrains Mono',monospace; font-size:11px; letter-spacing:0.2em; color: var(--sage-700); }
.sec-title {
  font-family:'Fraunces',serif; font-weight:500;
  font-size: 28px; letter-spacing:-0.012em;
  color: var(--ink-primary);
  font-variation-settings:"opsz" 72,"SOFT" 55;
}
.sec-title em { font-style: italic; font-weight:400; color: var(--sage-700); }
.sec-caption {
  font-family:'JetBrains Mono',monospace; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-primary); opacity: 0.55;
}
.brief { max-width: 64ch; font-size: 15px; line-height: 1.7; color: var(--ink-body); margin-bottom: 28px; }
.brief em { font-style: italic; color: var(--ink-primary); }
.brief strong { color: var(--ink-primary); font-weight: 500; }
.subhead {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sage-700); margin-bottom: 14px; margin-top: 8px;
}

.toc {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 24px;
  padding: 20px 24px; background: var(--surface-raised) /* surface-token */;
  border: 1px solid var(--rule-soft); border-radius: var(--r);
  margin-bottom: 72px;
}
.toc a {
  font-family:'JetBrains Mono',monospace; font-size: 11px;
  letter-spacing: 0.08em; color: var(--ink-primary); text-decoration: none;
  padding: 4px 0; display: block; opacity: 0.8;
}
.toc a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.toc a .n { color: var(--sage-700); margin-right: 8px; }

/* ============ WORDMARK CONSTRUCTION (from Logo Suite v1) ============ */
.wm {
  font-family:'Fraunces',serif; font-weight:500;
  font-variation-settings:"opsz" 60,"SOFT" 60;
  letter-spacing: 0.02em; color: var(--ink-primary);
  position: relative; display:inline-block; line-height: 1;
}
.wm .wm-o { position: relative; display:inline-block; }
.wm .wm-o::before {
  content:''; position:absolute;
  left: 14%; right: 14%; top: 58%; height: 0.075em;
  background: currentColor;
}
.wm.wm-on-dark { color: var(--cream-100); }

/* ============ SUBMARK-IN-CIRCLE (cheapest-for-you primitive) ============ */
.sm-circle {
  display:inline-flex; align-items:center; justify-content:center;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--navy-700); color: var(--cream-100); /* intentional literal — brand-constant regardless of surface */
  font-family:'Fraunces',serif; font-weight:600;
  font-variation-settings:"opsz" 36,"SOFT" 55;
  font-size: 22px; line-height: 1;
  letter-spacing: 0; padding-bottom: 2px;
  flex-shrink: 0;
}
.sm-circle.sm-sm { width:24px; height:24px; font-size:15px; padding-bottom:1px; }
.sm-circle.sm-lg { width:48px; height:48px; font-size:30px; padding-bottom:3px; }

/* ============ WARNING TRIANGLE GLYPH ============ */
.tri-glyph {
  width: 20px; height: 20px; display:inline-block; flex-shrink:0;
  position: relative; vertical-align: middle;
}
.tri-glyph::before {
  content:''; position:absolute; inset:0; background: currentColor;
  clip-path: polygon(50% 6%, 100% 94%, 0 94%);
}
.tri-glyph::after {
  content:''; position:absolute; left:50%; transform:translateX(-50%);
  top: 34%; width: 2px; height: 28%;
  background: var(--warning-100); /* intentional literal — brand-constant regardless of surface */
  box-shadow: 0 calc(100% + 3px) 0 var(--warning-100);
}
.tri-glyph.tri-danger::after { background: var(--danger-100); box-shadow: 0 calc(100% + 3px) 0 var(--danger-100); } /* intentional literal — brand-constant regardless of surface */

/* ============ WATERMARK ============ */
.wm-watermark { position: relative; }
.wm-watermark::after {
  content: 'Illustrative · not cleared for patient use';
  position:absolute; right: 20px; bottom: 12px;
  font-family:'JetBrains Mono',monospace; font-size: 9px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-primary); opacity: 0.32;
  pointer-events: none;
}
.wm-watermark.wm-dark::after { color: var(--cream-300); opacity: 0.42; }

/* ============ 01 · BUTTONS ============ */
.btn {
  --btn-pad-y: 13px; --btn-pad-x: 22px; --btn-font: 14px; --btn-lh:18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-family: 'Inter', sans-serif; font-weight: 500; font-size: var(--btn-font); line-height: var(--btn-lh);
  letter-spacing: -0.003em;
  border-radius: var(--r); border: 1px solid transparent;
  cursor: pointer; background: transparent; color: inherit;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
  user-select: none; text-decoration: none; white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn.btn-sm { --btn-pad-y: 9px;  --btn-pad-x: 16px; --btn-font: 13px; --btn-lh:16px; }
.btn.btn-md { --btn-pad-y: 13px; --btn-pad-x: 22px; --btn-font: 14px; --btn-lh:18px; }
.btn.btn-lg { --btn-pad-y: 17px; --btn-pad-x: 28px; --btn-font: 15px; --btn-lh:20px; }

.btn-primary { background: var(--navy-700); color: var(--cream-100); border-color: var(--navy-700); } /* intentional literal — brand-constant regardless of surface */
.btn-primary.is-hover, .btn-primary:hover { background: var(--navy-900); border-color: var(--navy-900); } /* intentional literal — brand-constant regardless of surface */
.btn-primary.is-pressed { background: var(--navy-900); border-color: var(--navy-900); box-shadow: inset 0 1px 2px rgba(0,0,0,0.2); } /* intentional literal — brand-constant regardless of surface */
.btn-primary.is-focus { box-shadow: 0 0 0 3px rgba(14,36,57,0.25); }
.btn-primary.is-disabled, .btn-primary:disabled { background: var(--cream-500); border-color: var(--cream-500); color: var(--graphite-500); cursor: not-allowed; } /* intentional literal — brand-constant regardless of surface */
.btn-primary.is-loading { background: var(--navy-500); border-color: var(--navy-500); cursor: progress; } /* intentional literal — brand-constant regardless of surface */

.btn-secondary { background: transparent; color: var(--navy-700); border-color: var(--navy-700); } /* intentional literal — brand-constant regardless of surface */
.btn-secondary.is-hover, .btn-secondary:hover { background: var(--navy-700); color: var(--cream-100); } /* intentional literal — brand-constant regardless of surface */
.btn-secondary.is-pressed { background: var(--navy-900); color: var(--cream-100); border-color: var(--navy-900); } /* intentional literal — brand-constant regardless of surface */
.btn-secondary.is-focus { box-shadow: var(--focus-ring); }
.btn-secondary.is-disabled, .btn-secondary:disabled { color: var(--graphite-300); border-color: var(--graphite-300); cursor: not-allowed; }
.btn-secondary.is-loading { color: var(--navy-500); border-color: var(--navy-500); cursor: progress; }

.btn-tertiary { background: transparent; color: var(--navy-700); border-color: transparent; padding-left: 6px; padding-right: 6px; } /* intentional literal — brand-constant regardless of surface */
.btn-tertiary.is-hover, .btn-tertiary:hover { color: var(--navy-900); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.btn-tertiary.is-pressed { color: var(--navy-900); }
.btn-tertiary.is-focus { box-shadow: var(--focus-ring); border-radius: 2px; }
.btn-tertiary.is-disabled, .btn-tertiary:disabled { color: var(--graphite-300); cursor: not-allowed; }
.btn-tertiary.is-loading { color: var(--navy-500); cursor: progress; }

.btn-destructive { background: var(--danger-500); color: var(--cream-100); border-color: var(--danger-500); } /* intentional literal — brand-constant regardless of surface */
.btn-destructive.is-hover, .btn-destructive:hover { background: var(--danger-700); border-color: var(--danger-700); } /* intentional literal — brand-constant regardless of surface */
.btn-destructive.is-pressed { background: var(--danger-700); border-color: var(--danger-700); box-shadow: inset 0 1px 2px rgba(0,0,0,0.25); } /* intentional literal — brand-constant regardless of surface */
.btn-destructive.is-focus { box-shadow: 0 0 0 3px rgba(168,90,62,0.28); }
.btn-destructive.is-disabled, .btn-destructive:disabled { background: var(--danger-100); border-color: var(--danger-100); color: var(--graphite-500); cursor: not-allowed; } /* intentional literal — brand-constant regardless of surface */
.btn-destructive.is-loading { background: var(--danger-300); border-color: var(--danger-300); cursor: progress; } /* intentional literal — brand-constant regardless of surface */

/* Authorize — money-and-medicine action (Rx auth, insurance switch,
   intake review). Sage-as-action; reserved for consent verbs bound
   to voice.canonical.actions.{authorizeSwitch,authorizeReview,signAndSend}.
   Never Navy — Navy is everyday primary. Token: components.button.authorize. */
.btn-authorize { background: var(--sage-700); color: var(--cream-100); border-color: var(--sage-700); } /* intentional literal — brand-constant regardless of surface */
.btn-authorize.is-hover, .btn-authorize:hover { background: var(--sage-900); border-color: var(--sage-900); } /* intentional literal — brand-constant regardless of surface */
.btn-authorize.is-pressed { background: var(--sage-900); border-color: var(--sage-900); box-shadow: inset 0 1px 2px rgba(0,0,0,0.2); } /* intentional literal — brand-constant regardless of surface */
.btn-authorize.is-focus, .btn-authorize:focus-visible { box-shadow: 0 0 0 3px rgba(94,124,83,0.28); outline: none; }
.btn-authorize.is-disabled, .btn-authorize:disabled { background: var(--cream-500); border-color: var(--cream-500); color: var(--graphite-500); cursor: not-allowed; } /* intentional literal — brand-constant regardless of surface */
.btn-authorize.is-loading { background: var(--sage-500); border-color: var(--sage-500); cursor: progress; } /* intentional literal — brand-constant regardless of surface */
body[data-surface="dark"] .btn-authorize { background: var(--sage-500); border-color: var(--sage-500); color: var(--navy-900); } /* intentional literal — brand-constant regardless of surface */
body[data-surface="dark"] .btn-authorize:hover { background: var(--sage-700); border-color: var(--sage-700); color: var(--cream-100); } /* intentional literal — brand-constant regardless of surface */

/* Cheapest-for-you — SIGNATURE */
.btn-cfy {
  background: var(--vellum); color: var(--navy-900); /* intentional literal — brand-constant regardless of surface */
  border-color: var(--gold-700); border-left-width: 3px;
  padding-left: 10px; padding-right: 20px; gap: 12px;
}
.btn-cfy .sm-circle { width: 26px; height: 26px; font-size: 16px; padding-bottom: 1px; }
.btn-cfy.btn-lg .sm-circle { width: 32px; height: 32px; font-size: 19px; padding-bottom: 1px; }
.btn-cfy.btn-sm .sm-circle { width: 20px; height: 20px; font-size: 13px; padding-bottom: 1px; }
.btn-cfy .cfy-label {
  font-family:'JetBrains Mono',monospace; font-size: 9px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold-900); font-weight: 500;
}
.btn-cfy.is-hover, .btn-cfy:hover { background: #DECC96; }
.btn-cfy.is-pressed { background: #D2BF84; }
.btn-cfy.is-focus { box-shadow: 0 0 0 3px rgba(148,118,53,0.28); }
.btn-cfy.is-disabled, .btn-cfy:disabled { background: var(--cream-500); border-color: var(--cream-700); color: var(--graphite-500); cursor: not-allowed; } /* intentional literal — brand-constant regardless of surface */
.btn-cfy.is-disabled .sm-circle, .btn-cfy:disabled .sm-circle { background: var(--graphite-300); } /* intentional literal — brand-constant regardless of surface */
.btn-cfy.is-loading { background: #F1E6CA; cursor: progress; }

.shim {
  display:inline-block; width: 6px; height: 6px; border-radius: 999px;
  background: currentColor; opacity: 0.5;
  animation: shim 1.2s infinite ease-in-out;
}
.shim + .shim { margin-left: 4px; animation-delay: .18s; }
.shim + .shim + .shim { animation-delay: .36s; }
@keyframes shim {
  0%,80%,100%{ opacity: 0.2; transform: translateY(0); }
  40%{ opacity: 1; transform: translateY(-2px); }
}

.btn-matrix {
  display:grid; grid-template-columns: 160px repeat(6, 1fr); gap: 14px;
  align-items: center; margin-bottom: 20px;
}
.btn-matrix .row-label {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-primary); opacity: 0.75;
}
.btn-matrix .col-head {
  font-family:'JetBrains Mono',monospace; font-size: 9.5px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sage-700); text-align: center;
}
.btn-matrix .cell {
  display:flex; align-items:center; justify-content:center; min-height: 54px;
}

.surface-card {
  background: var(--surface-raised);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
  padding: 28px 32px; margin-bottom: 18px;
}
.surface-card.is-navy {
  background: var(--navy-700); border-color: rgba(244,237,224,0.14); /* intentional literal — brand-constant regardless of surface */
}
.surface-card.is-navy .row-label { color: var(--cream-300); }
.surface-card.is-navy .col-head { color: var(--gold-300); }
.surface-card .sc-label {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sage-700); margin-bottom: 18px;
}
.surface-card.is-navy .sc-label { color: var(--gold-300); }

.btn-sizes { display:flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* ============ 02 · FORM INPUTS ============ */
.input {
  display:block; width: 100%;
  padding: 12px 14px;
  font-family:'Inter',sans-serif; font-size: 15px; line-height: 22px; font-weight: 400;
  color: var(--ink-body);
  background: var(--surface-raised); /* surface-token */
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.input::placeholder { color: var(--graphite-300); }
.input:focus, .input.is-focus { outline: none; border-color: var(--navy-700); border-width: 1.5px; padding: 11.5px 13.5px; box-shadow: var(--focus-ring); }
.input.is-filled { border-color: var(--rule); }
.input.is-disabled, .input:disabled { background: var(--surface-sunk); /* surface-token */ color: var(--graphite-300); cursor: not-allowed; }
.input.is-error { border-color: var(--danger-500); border-width: 1.5px; padding: 11.5px 13.5px; background: var(--danger-100); color: var(--danger-700); } /* intentional literal — brand-constant regardless of surface */
.input.is-validating, .input.is-validated { padding-right: 40px; }

.field { position: relative; margin-bottom: 6px; }
.field .label {
  display:block; font-family:'Inter',sans-serif; font-size: 13px; font-weight: 500;
  color: var(--ink-primary); margin-bottom: 6px; letter-spacing: -0.002em;
}
.field .help {
  font-family:'Inter',sans-serif; font-size: 12.5px; line-height: 1.5;
  color: var(--ink-muted); margin-top: 6px;
}
.field .err-msg {
  font-family:'Inter',sans-serif; font-size: 12.5px; line-height: 1.5;
  color: var(--danger-700); margin-top: 6px;
  display: flex; align-items: flex-start; gap: 6px;
}
.field .err-msg .tri-glyph { color: var(--danger-500); width: 12px; height: 12px; margin-top: 2px; }

.field .suffix {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; pointer-events: none;
}
.field .suffix.has-label { top: calc(50% + 10px); }

.check-glyph { width: 18px; height: 18px; color: var(--success-700); display:inline-block; position:relative; }
.check-glyph::before {
  content:''; position:absolute; left: 2px; top: -1px;
  width: 6px; height: 12px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(42deg);
}
.spin-dot {
  width: 14px; height: 14px; border-radius: 999px;
  border: 2px solid var(--sage-300); border-top-color: var(--sage-700);
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cb-row { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.cb {
  width: 18px; height: 18px; border-radius: 3px; border: 1.5px solid var(--navy-700);
  background: var(--surface-raised); /* surface-token */ flex-shrink: 0; margin-top: 2px;
  display:inline-block; position: relative; cursor: pointer;
}
.cb.is-checked { background: var(--navy-700); } /* intentional literal — brand-constant regardless of surface */
.cb.is-checked::after {
  content:''; position: absolute; left: 4px; top: 0px;
  width: 5px; height: 10px;
  border-right: 2px solid var(--cream-100); border-bottom: 2px solid var(--cream-100);
  transform: rotate(42deg);
}
.cb.is-disabled { border-color: var(--graphite-300); background: var(--surface-sunk); /* surface-token */ }
.cb.is-error { border-color: var(--danger-500); }
.rd {
  width: 18px; height: 18px; border-radius: 999px; border: 1.5px solid var(--navy-700);
  background: var(--surface-raised); /* surface-token */ flex-shrink: 0; margin-top: 2px;
  display:inline-block; position: relative;
}
.rd.is-checked::after {
  content:''; position: absolute; inset: 3px; border-radius: 999px; background: var(--navy-700); /* intentional literal — brand-constant regardless of surface */
}
.tog {
  width: 38px; height: 22px; border-radius: 999px;
  background: var(--graphite-300); position: relative; flex-shrink:0; margin-top: 2px; /* intentional literal — brand-constant regardless of surface */
  transition: background-color 150ms ease;
}
.tog::after {
  content:''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 999px;
  background: var(--cream-100); /* intentional literal — brand-constant regardless of surface */
  transition: left 150ms ease;
}
.tog.is-on { background: var(--sage-700); } /* intentional literal — brand-constant regardless of surface */
.tog.is-on::after { left: 18px; }
.tog.is-disabled { background: var(--cream-500); } /* intentional literal — brand-constant regardless of surface */

.cb-row .cb-label { font-size: 14px; color: var(--ink-body); line-height: 1.45; }
.cb-row .cb-label em { color: var(--ink-primary); font-style: italic; }

.input-states { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.input-states .state-cell { display: flex; flex-direction: column; gap: 0; }
.input-states .state-label {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sage-700); margin-bottom: 8px;
}

.ctrl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 18px; }
.ctrl-group .cg-label {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sage-700); margin-bottom: 8px;
}

.ins-lookup {
  background: var(--surface-raised); /* surface-token */ border: 1px solid var(--rule-soft); border-radius: var(--r);
  padding: 36px 40px; max-width: 640px;
}
.ins-lookup .tag {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sage-700); margin-bottom: 14px;
}
.ins-lookup h3 {
  font-family:'Fraunces',serif; font-weight:500; font-size: 26px;
  line-height: 1.2; letter-spacing:-0.012em; color: var(--ink-primary);
  font-variation-settings:"opsz" 48,"SOFT" 55;
  margin-bottom: 8px;
}
.ins-lookup h3 em { font-style: italic; color: var(--sage-700); }
.ins-lookup .sub {
  font-size: 14.5px; line-height: 1.55; color: var(--ink-body);
  margin-bottom: 24px; max-width: 52ch;
}
.ins-lookup .row-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 14px; }
.ins-lookup .live-verify {
  margin-top: 16px; padding: 14px 16px;
  background: var(--sage-100); border: 1px solid var(--sage-300); /* intentional literal — brand-constant regardless of surface */
  border-radius: var(--r);
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px; color: var(--sage-900);
}
.ins-lookup .live-verify .sm-circle { background: var(--sage-700); width: 28px; height: 28px; font-size: 17px; padding-bottom: 1px; } /* intentional literal — brand-constant regardless of surface */
.ins-lookup .foot {
  display:flex; justify-content: space-between; align-items: center; margin-top: 22px;
}
.ins-lookup .foot .meta {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.12em; color: var(--ink-primary); opacity: 0.6;
}

/* ============ 03 · ALERTS ============ */
.alert {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 14px; align-items: flex-start;
  padding: 16px 18px; border-radius: var(--r);
  border-left: 3px solid; background: var(--surface-raised); /* surface-token */
}
.alert .a-glyph {
  display:inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px;
  flex-shrink: 0; color: var(--cream-100);
  font-family:'JetBrains Mono',monospace; font-weight: 600; font-size: 14px;
  margin-top: 2px;
}
.alert .a-title {
  font-family:'Inter',sans-serif; font-weight: 500; font-size: 14.5px;
  color: var(--ink-primary); margin-bottom: 3px;
}
.alert .a-body { font-size: 13.5px; line-height: 1.55; color: var(--ink-body); }
.alert .a-body em { font-style: italic; color: var(--ink-primary); }
.alert .a-close {
  font-family:'JetBrains Mono',monospace; font-size: 11px;
  letter-spacing: 0.12em; color: var(--ink-primary); opacity: 0.5;
  background: none; border: none; cursor: pointer; padding: 2px 6px;
}
.alert-info { border-left-color: var(--navy-700); background: var(--navy-100); } /* intentional literal — brand-constant regardless of surface */
.alert-info .a-glyph { background: var(--navy-700); } /* intentional literal — brand-constant regardless of surface */
.alert-success { border-left-color: var(--sage-700); background: var(--success-100); } /* intentional literal — brand-constant regardless of surface */
.alert-success .a-glyph { background: var(--sage-700); } /* intentional literal — brand-constant regardless of surface */
.alert-warning { border-left-color: var(--warning-500); background: var(--warning-100); } /* intentional literal — brand-constant regardless of surface */
.alert-warning .a-glyph { background: var(--warning-500); } /* intentional literal — brand-constant regardless of surface */
.alert-warning .a-glyph .tri-glyph { color: var(--warning-100); width: 14px; height: 14px; }
.alert-danger { border-left-color: var(--danger-500); background: var(--danger-100); } /* intentional literal — brand-constant regardless of surface */
.alert-danger .a-glyph { background: var(--danger-500); } /* intentional literal — brand-constant regardless of surface */
.alert-danger .a-glyph .tri-glyph { color: var(--danger-100); width: 14px; height: 14px; }

.alert-cfy { border-left-color: var(--gold-700); background: var(--vellum); } /* intentional literal — brand-constant regardless of surface */
.alert-cfy .a-title {
  font-family:'Fraunces',serif; font-style: italic; font-weight: 400;
  font-size: 17px; color: var(--sage-900);
  font-variation-settings:"opsz" 36,"SOFT" 55;
}
.alert-cfy .a-title em { font-style: italic; color: var(--sage-700); }
.alert-cfy .a-body { color: var(--navy-900); }
.alert-cfy .a-label {
  font-family:'JetBrains Mono',monospace; font-size: 9px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-900); margin-bottom: 4px; font-weight: 500;
}

.alert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 14px; }

/* ============ 04 · PRICING-COMPARISON TABLE ============ */
.pricing-table {
  background: var(--surface-raised); /* surface-token — v0.4.7 fix; was cream-100 literal, broke on dark surface */
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
  overflow: hidden;
}
.pricing-table .pt-head {
  display: grid; grid-template-columns: 52px 1.9fr 1.4fr 1fr 1fr 1.3fr;
  gap: 14px; padding: 14px 24px;
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sage-700);
  border-bottom: 1px solid var(--rule-soft);
  background: var(--surface-sunk); /* surface-token */
}
.pricing-table .pt-head .pt-price-col { text-align: right; }

.pricing-table .pt-row {
  display: grid; grid-template-columns: 52px 1.9fr 1.4fr 1fr 1fr 1.3fr;
  gap: 14px; padding: 22px 24px;
  align-items: center;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
}
.pricing-table .pt-row:last-child { border-bottom: none; }

.pricing-table .pt-rank {
  font-family:'JetBrains Mono',monospace; font-size: 22px; font-weight: 500;
  color: var(--ink-primary); opacity: 0.25; letter-spacing: -0.01em;
}
.pricing-table .pt-path {
  font-family:'Fraunces',serif; font-weight: 500; font-size: 22px;
  line-height: 1.15; letter-spacing: -0.01em;
  color: var(--ink-primary);
  font-variation-settings:"opsz" 48,"SOFT" 55;
}
.pricing-table .pt-path-sub {
  font-family:'Inter',sans-serif; font-size: 13px; color: var(--ink-muted);
  margin-top: 4px;
}
.pricing-table .pt-from {
  font-family:'Inter',sans-serif; font-size: 13.5px; color: var(--ink-body); line-height: 1.5;
}
.pricing-table .pt-from .mono { font-size: 12.5px; color: var(--ink-primary); opacity: 0.7; }
.pricing-table .pt-price {
  font-family:'JetBrains Mono',monospace; font-weight: 500;
  font-size: 28px; line-height: 1; color: var(--ink-primary);
  letter-spacing: -0.01em; font-feature-settings:"tnum","zero";
  text-align: right;
}
.pricing-table .pt-price .slash {
  font-family:'JetBrains Mono',monospace; font-style: normal; font-weight: 500;
  font-size: 13px; color: var(--ink-primary); opacity: 0.6; margin-left: 4px; letter-spacing: 0;
}
.pricing-table .pt-cadence {
  font-family:'Inter',sans-serif; font-size: 13px; color: var(--ink-body); line-height: 1.45;
}
.pricing-table .pt-rec {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--sage-700); line-height: 1.5;
}
.pricing-table .pt-row.is-cfy {
  background: var(--vellum);
  border-left: 3px solid var(--gold-700);
  padding-left: 21px;
}
.pricing-table .pt-row.is-cfy .pt-rank { color: var(--gold-900); opacity: 0.5; }
.pricing-table .pt-row.is-cfy .pt-path { color: var(--navy-900); }
.pricing-table .pt-row.is-cfy .pt-price { color: var(--navy-900); }
.pricing-table .pt-row.is-cfy .pt-badge {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.pricing-table .pt-row.is-cfy .pt-badge-label {
  font-family:'JetBrains Mono',monospace; font-size: 9px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-900); font-weight: 500;
}
.pricing-table .pt-row.is-cfy .pt-badge .sm-circle { width: 28px; height: 28px; font-size: 17px; padding-bottom:1px; }
.pricing-table .pt-row.is-cfy .pt-rec { color: var(--sage-900); }
.pricing-table .pt-row.is-cfy .pt-rec em {
  font-family:'Fraunces',serif; font-style: italic; font-weight: 400;
  font-size: 14px; letter-spacing: -0.005em; color: var(--sage-700);
  text-transform: none; font-variation-settings:"opsz" 36,"SOFT" 55;
  display: block; margin-top: 4px;
}

.pricing-table.pt-dark {
  background: var(--navy-700); border-color: rgba(244,237,224,0.14); /* intentional literal — brand-constant regardless of surface */
}
.pricing-table.pt-dark .pt-head {
  background: var(--navy-900); color: var(--gold-300); /* intentional literal — brand-constant regardless of surface */
  border-color: rgba(244,237,224,0.14);
}
.pricing-table.pt-dark .pt-row { border-color: rgba(244,237,224,0.12); }
.pricing-table.pt-dark .pt-rank { color: var(--cream-300); opacity: 0.35; }
.pricing-table.pt-dark .pt-path { color: var(--cream-100); font-variation-settings:"opsz" 48,"SOFT" 60; }
.pricing-table.pt-dark .pt-path-sub { color: rgba(244,237,224,0.65); }
.pricing-table.pt-dark .pt-from { color: rgba(244,237,224,0.85); }
.pricing-table.pt-dark .pt-from .mono { color: var(--gold-300); opacity: 0.8; }
.pricing-table.pt-dark .pt-price { color: var(--cream-100); }
.pricing-table.pt-dark .pt-price .slash { color: rgba(244,237,224,0.6); }
.pricing-table.pt-dark .pt-cadence { color: rgba(244,237,224,0.85); }
.pricing-table.pt-dark .pt-rec { color: var(--gold-300); }
.pricing-table.pt-dark .pt-row.is-cfy { background: var(--vellum); border-left-color: var(--gold-700); } /* intentional literal — brand-constant regardless of surface */
.pricing-table.pt-dark .pt-row.is-cfy .pt-path,
.pricing-table.pt-dark .pt-row.is-cfy .pt-price,
.pricing-table.pt-dark .pt-row.is-cfy .pt-from,
.pricing-table.pt-dark .pt-row.is-cfy .pt-cadence { color: var(--navy-900); }
.pricing-table.pt-dark .pt-row.is-cfy .pt-from .mono { color: var(--navy-900); opacity: 0.6; }
.pricing-table.pt-dark .pt-row.is-cfy .pt-rank { color: var(--gold-900); opacity: 0.55; }
.pricing-table.pt-dark .pt-row.is-cfy .pt-rec { color: var(--sage-900); }
.pricing-table.pt-dark .pt-row.is-cfy .pt-rec em { color: var(--sage-700); }

/* ---- pt-ranked variant — PROMOTED v0.4.6 from Pricing.html page-local.
   LIBRARY DOCTRINE NOTE (Component Library II §03 · pricing table).
   Full treatment — including the 6-column .pt-ranked grid, .pt-why
   caption column-span, .pt-receipt-link, .pt-footnote, and the
   .is-cfy accent — lives here in cl-styles.css. Downstream surfaces
   (Landing.html, Pricing.html, Intake.html, and any future composition)
   MUST NOT redefine these rules in page-local CSS. Page-local CSS may
   only ADD wrapping (section spacing, dark-surface overrides that do
   not already exist here). Any redefinition breaks every other
   surface that loads the library but not the page-local stylesheet.
   Bound to: components.pricingTable.$stabilityContract (tokens.json v0.4.6).
   ---- */
.pricing-table.pt-ranked .pt-head,
.pricing-table.pt-ranked .pt-row {
  grid-template-columns: 52px 1.8fr 1.2fr 1fr 0.9fr 1fr;
}
.pricing-table.pt-ranked .pt-fill {
  font-family:'Inter',sans-serif; font-size: 13px; color: var(--ink-body); line-height: 1.5;
}
.pricing-table.pt-ranked .pt-receipt-link {
  font-family:'Inter',sans-serif; font-size: 13px; font-weight: 500;
  color: var(--ink-primary); text-decoration: underline;
  text-decoration-color: var(--rule-soft); text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  background: none; border: none; padding: 0; cursor: pointer;
  text-align: left; line-height: 1.5;
}
.pricing-table.pt-ranked .pt-receipt-link:hover {
  text-decoration-color: var(--ink-primary); color: var(--navy-900);
}
body[data-surface="dark"] .pricing-table.pt-ranked .pt-receipt-link { color: var(--cream-100); }
.pricing-table.pt-ranked .pt-row.is-cfy .pt-receipt-link { color: var(--navy-900); }
.pt-footnote {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  color: var(--sage-700); text-decoration: none;
  margin-left: 2px; vertical-align: super; opacity: 0.9;
}
.pt-footnote:hover { opacity: 1; text-decoration: underline; }
body[data-surface="dark"] .pt-footnote { color: var(--gold-300); }
.pricing-table.pt-ranked .pt-why {
  grid-column: 2 / -1;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--rule-soft);
  font-family:'Inter',sans-serif; font-size: 12.5px; line-height: 1.55;
  color: var(--ink-body); opacity: 0.85; max-width: 72ch;
}
.pricing-table.pt-ranked .pt-row { grid-template-rows: auto auto; row-gap: 0; }
.pricing-table.pt-ranked .pt-row.is-cfy .pt-why {
  border-top-color: rgba(148,118,53,0.32);
  color: var(--navy-900); opacity: 0.82;
}

/* ---- Scenario-uniqueness base architecture (PROMOTED v0.4.6).
   Default-hide + show-one pattern for surfaces that swap between
   pricing-table scenarios (e.g. Pricing.html insurance toggle,
   Intake.html preference branching). The :has() rules that decide
   WHICH scenario to show remain per-surface page-local — they key
   off per-surface input values. Architectural pattern is library. */
.scenario-tables > .pricing-table { display: none; }
@supports not selector(:has(a)) {
  .scenario-tables > .pricing-table:first-of-type { display: block; }
}

/* ---- Signature line — PROMOTED v0.4.6 from Pricing.html + Intake.html
   page-local. Two visual variants, one primitive.

   Default (.signature-line) — quieter: flush top border, 15px,
   horizontal k/v on one baseline. Used under ranking tables that
   already carry their own frame (Intake Screen 7, future dashboards).

   .is-boxed modifier — opt-in bordered card with sage left-rule,
   20px Fraunces italic. Used as a standalone block on marketing
   pages where the signature needs its own weight (Pricing §03).

   Voice: voice.canonical.impartial.003 — "Equilon signs this
   recommendation." Treatment ships with the primitive; copy stays
   in tokens.json. ---- */
.signature-line {
  margin-top: 18px; padding: 16px 0 0;
  border-top: 1px solid var(--rule-soft);
  font-family:'Fraunces',serif; font-size: 15px;
  font-style: italic; color: var(--ink-primary); font-weight: 400;
  font-variation-settings:"opsz" 24,"SOFT" 55;
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  text-wrap: pretty; letter-spacing: -0.005em;
}
.signature-line .sig-meta {
  font-family:'JetBrains Mono',monospace; font-size: 10.5px;
  font-style: normal; color: var(--ink-muted);
  letter-spacing: 0.1em; text-transform: uppercase;
}
body[data-surface="dark"] .signature-line { color: var(--cream-100); }
body[data-surface="dark"] .signature-line .sig-meta { color: var(--cream-300); opacity: 0.65; }

.signature-line.is-boxed {
  margin-top: 22px; padding: 18px 24px;
  background: var(--surface-raised); border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--sage-700); border-radius: var(--r);
  font-size: 20px; line-height: 1.4; color: var(--sage-700);
  font-variation-settings:"opsz" 48,"SOFT" 55;
  display: block;
}
.signature-line.is-boxed .sig-meta {
  display: block; margin-top: 6px;
  font-weight: 500; font-size: 10px; letter-spacing: 0.18em;
  color: var(--ink-primary); opacity: 0.55;
}
body[data-surface="dark"] .signature-line.is-boxed {
  color: var(--gold-300); border-left-color: var(--gold-300);
  background: var(--navy-600);
}
body[data-surface="dark"] .signature-line.is-boxed .sig-meta { color: var(--cream-300); opacity: 0.65; }

/* ============ 05 · CARDS ============ */
.card {
  background: var(--surface-raised); /* surface-token */
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
  padding: 26px 28px;
}
.card .c-eyebrow {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sage-700); margin-bottom: 10px;
}
.card .c-title {
  font-family:'Fraunces',serif; font-weight: 500; font-size: 22px;
  line-height: 1.2; letter-spacing: -0.01em; color: var(--ink-primary);
  font-variation-settings:"opsz" 48,"SOFT" 55;
  margin-bottom: 8px;
}
.card .c-title em { font-style: italic; color: var(--sage-700); }
.card .c-body { font-size: 14px; line-height: 1.55; color: var(--ink-body); }
.card .c-body em { font-style: italic; color: var(--ink-primary); }
.card .c-meta {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule-soft);
  font-family:'JetBrains Mono',monospace; font-size: 10.5px;
  letter-spacing: 0.1em; color: var(--ink-primary); opacity: 0.6;
  display: flex; justify-content: space-between;
}
.card.is-dark {
  background: var(--navy-700); border-color: rgba(244,237,224,0.14); color: var(--cream-300); /* intentional literal — brand-constant regardless of surface */
}
.card.is-dark .c-title { color: var(--cream-100); font-variation-settings:"opsz" 48,"SOFT" 60; }
.card.is-dark .c-body { color: rgba(244,237,224,0.9); }
.card.is-dark .c-eyebrow { color: var(--gold-300); }
.card.is-dark .c-meta { color: rgba(244,237,224,0.6); border-top-color: rgba(244,237,224,0.15); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.card.is-pricing .c-row {
  display: flex; align-items: baseline; justify-content: space-between; margin-top: 14px;
}
.card.is-pricing .price-big {
  font-family:'JetBrains Mono',monospace; font-weight: 500; font-size: 36px;
  color: var(--ink-primary); letter-spacing: -0.01em; font-feature-settings:"tnum";
}
.card.is-pricing .price-big .slash-hero {
  font-family:'Fraunces',serif; font-style: italic; font-weight: 400;
  font-size: 17px; color: var(--sage-700); margin-left: 4px;
  font-variation-settings:"opsz" 36;
}

.card.is-refill .r-date {
  font-family:'Fraunces',serif; font-weight: 500; font-size: 28px;
  color: var(--ink-primary); letter-spacing: -0.015em;
  font-variation-settings:"opsz" 72,"SOFT" 55;
  margin: 4px 0 6px;
}
.card.is-refill .r-date em { font-style: italic; color: var(--sage-700); }
.card.is-refill .r-dose {
  font-family:'JetBrains Mono',monospace; font-size: 13px; color: var(--ink-primary);
  padding: 4px 0;
}

.card.is-lab .lab-hero {
  display: flex; align-items: baseline; gap: 10px; margin: 8px 0 2px;
}
.card.is-lab .lab-value {
  font-family:'JetBrains Mono',monospace; font-weight: 500; font-size: 42px;
  line-height: 1; color: var(--ink-primary); letter-spacing: -0.015em;
  font-feature-settings:"tnum";
}
.card.is-lab .lab-unit {
  font-family:'JetBrains Mono',monospace; font-size: 13px; color: var(--ink-muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.card.is-lab .lab-band {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px;
  margin: 14px 0 6px; height: 8px; border-radius: 2px; overflow: hidden;
}
.card.is-lab .lab-band .seg-low { background: var(--warning-300); } /* intentional literal — brand-constant regardless of surface */
.card.is-lab .lab-band .seg-ok  { background: var(--sage-300); position: relative; } /* intentional literal — brand-constant regardless of surface */
.card.is-lab .lab-band .seg-hi  { background: var(--warning-500); } /* intentional literal — brand-constant regardless of surface */
.card.is-lab .lab-band .seg-ok::after {
  content:''; position: absolute; top: -6px; bottom: -6px; left: 85%; width: 2px;
  background: var(--ink-primary);
}
.card.is-lab .lab-axis {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.06em; color: var(--ink-muted);
}
.card.is-lab .lab-axis span:last-child { text-align: right; }

.card.is-clinician { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.card.is-clinician .clinician-avatar {
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--sage-700); color: var(--cream-100); /* intentional literal — brand-constant regardless of surface */
  display: inline-flex; align-items: center; justify-content: center;
  font-family:'Fraunces',serif; font-weight: 500; font-size: 18px;
  font-variation-settings:"opsz" 36,"SOFT" 55;
  flex-shrink: 0;
}
.card.is-clinician .clinician-quote {
  font-family:'Fraunces',serif; font-style: italic; font-weight: 400;
  font-size: 16px; line-height: 1.5; color: var(--ink-primary);
  font-variation-settings:"opsz" 48,"SOFT" 55;
  margin-bottom: 12px;
}
.card.is-clinician .clinician-sig {
  font-family:'Inter',sans-serif; font-size: 13px; font-weight: 500; color: var(--ink-primary);
}
.card.is-clinician .clinician-role {
  font-family:'JetBrains Mono',monospace; font-size: 10.5px;
  letter-spacing: 0.14em; color: var(--ink-primary); opacity: 0.6;
}

.card.is-alert {
  background: var(--vellum); border-color: var(--gold-700); border-left-width: 3px; /* intentional literal — brand-constant regardless of surface */
  padding-left: 25px;
}
.card.is-alert .c-eyebrow { color: var(--gold-900); }
.card.is-alert .c-title { font-style: italic; font-weight: 400; color: var(--sage-900); }
.card.is-alert .c-title em { color: var(--sage-700); }

/* ============ 06 · DATA PRIMITIVES ============ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--surface-sunk); /* surface-token */ color: var(--ink-primary);
  border: 1px solid var(--rule-softest);
}
.chip .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.chip.chip-success { background: var(--success-100); color: var(--success-700); } /* intentional literal — brand-constant regardless of surface */
.chip.chip-warning { background: var(--warning-100); color: var(--warning-700); } /* intentional literal — brand-constant regardless of surface */
.chip.chip-danger  { background: var(--danger-100);  color: var(--danger-700); } /* intentional literal — brand-constant regardless of surface */
.chip.chip-info    { background: var(--navy-100);    color: var(--navy-700); } /* intentional literal — brand-constant regardless of surface */

.tag {
  display: inline-flex; align-items: center; padding: 3px 8px;
  border-radius: 2px; font-family:'Inter',sans-serif; font-size: 12px; font-weight: 500;
  background: var(--surface-sunk); /* surface-token */ color: var(--ink-primary);
}
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--navy-700); color: var(--cream-100); /* intentional literal — brand-constant regardless of surface */
  font-family:'JetBrains Mono',monospace; font-size: 11px; font-weight: 500;
}

.progress { height: 6px; border-radius: 3px; background: var(--surface-sunk); /* surface-token */ overflow: hidden; }
.progress .bar { height: 100%; background: var(--sage-700); border-radius: 3px; } /* intentional literal — brand-constant regardless of surface */
.progress.is-cfy .bar { background: var(--gold-700); } /* intentional literal — brand-constant regardless of surface */

.kpi { background: var(--surface-raised); /* surface-token */ border: 1px solid var(--rule-soft); border-radius: var(--r); padding: 22px 24px; }
.kpi .k-label {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sage-700); margin-bottom: 8px;
}
.kpi .k-value {
  font-family:'JetBrains Mono',monospace; font-weight: 500; font-size: 34px;
  line-height: 1; color: var(--ink-primary); letter-spacing: -0.01em;
  font-feature-settings:"tnum";
}
.kpi .k-value .slash {
  font-family:'JetBrains Mono',monospace; font-weight: 500; font-size: 13px;
  color: var(--ink-primary); opacity: 0.6; margin-left: 2px;
}
.kpi .k-delta { margin-top: 6px; font-family:'JetBrains Mono',monospace; font-size: 11px; color: var(--success-700); }
.kpi .k-delta.is-down { color: var(--sage-700); }

.data-row {
  display: grid; grid-template-columns: 1fr auto;
  padding: 10px 0; border-bottom: 1px solid var(--rule-softest); align-items: baseline;
}
.data-row:last-child { border-bottom: none; }
.data-row .d-label { font-size: 14px; color: var(--ink-body); }
.data-row .d-value { font-family:'JetBrains Mono',monospace; font-size: 14px; color: var(--ink-primary); font-feature-settings:"tnum"; }

.lab-band-row {
  background: var(--surface-raised); /* surface-token */ border: 1px solid var(--rule-soft);
  border-radius: var(--r); padding: 14px 18px;
  display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center;
}
.lab-band-row .lbr-name { font-family:'Inter',sans-serif; font-size: 13.5px; color: var(--ink-primary); font-weight: 500; }
.lab-band-row .lbr-val {
  font-family:'JetBrains Mono',monospace; font-size: 18px; color: var(--ink-primary); font-weight: 500;
  font-feature-settings:"tnum"; text-align: right;
}
.lab-band-row .lbr-band {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px; height: 6px; border-radius: 2px; overflow: hidden;
}
.lab-band-row .lbr-band span { background: var(--sage-300); } /* intentional literal — brand-constant regardless of surface */
.lab-band-row .lbr-band span.seg-warn { background: var(--warning-300); } /* intentional literal — brand-constant regardless of surface */
.lab-band-row .lbr-band span.seg-ok   { background: var(--sage-300); position: relative; } /* intentional literal — brand-constant regardless of surface */
.lab-band-row .lbr-band span.seg-ok::after {
  content:''; position: absolute; top: -4px; bottom: -4px; left: 70%; width: 2px; background: var(--ink-primary);
}
.lab-band-row .lbr-meta {
  grid-column: 1 / -1;
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.08em; color: var(--ink-muted);
  display: grid; grid-template-columns: 1fr 1fr 1fr;
}
.lab-band-row .lbr-meta span:last-child { text-align: right; }

/* ============ 07 · NAV ============ */
.top-nav {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 32px; align-items: center;
  padding: 18px 28px;
  background: var(--cream-100); border: 1px solid var(--rule-soft); border-radius: var(--r); /* intentional literal — brand-constant regardless of surface */
}
.top-nav .nav-mark { display: flex; align-items: center; gap: 10px; }
.top-nav .nav-mark .wm { font-size: 22px; }
.top-nav .nav-menu { display: flex; gap: 24px; align-items: center; }
.top-nav .nav-link {
  font-family:'Inter',sans-serif; font-weight: 500; font-size: 14px;
  color: var(--ink-primary); text-decoration: none;
  padding: 8px 2px; position: relative;
}
.top-nav .nav-link.is-active::after {
  content:''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px; background: var(--sage-700); /* intentional literal — brand-constant regardless of surface */
}
.top-nav .nav-link:hover { color: var(--navy-900); }
.top-nav .nav-right { display: flex; gap: 10px; align-items: center; }
.top-nav.is-dark { background: var(--navy-700); border-color: rgba(244,237,224,0.14); } /* intentional literal — brand-constant regardless of surface */
.top-nav.is-dark .wm { color: var(--cream-100); }
.top-nav.is-dark .nav-link { color: var(--cream-100); }
.top-nav.is-dark .nav-link.is-active::after { background: var(--gold-500); } /* intentional literal — brand-constant regardless of surface */

.sub-nav {
  display: inline-flex; gap: 4px; align-items: center;
  background: var(--surface-raised); /* surface-token */ border: 1px solid var(--rule-soft);
  border-radius: var(--r); padding: 4px;
}
.sub-nav .sub-link {
  padding: 7px 14px; border-radius: 3px;
  font-family:'Inter',sans-serif; font-size: 13px; font-weight: 500;
  color: var(--ink-primary); text-decoration: none;
}
.sub-nav .sub-link.is-active { background: var(--navy-700); color: var(--cream-100); } /* intentional literal — brand-constant regardless of surface */

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule-soft); }
.tabs .tab {
  padding: 12px 18px; border-bottom: 2px solid transparent;
  font-family:'Inter',sans-serif; font-size: 14px; font-weight: 500;
  color: var(--ink-muted); text-decoration: none; margin-bottom: -1px;
}
.tabs .tab.is-active { color: var(--ink-primary); border-bottom-color: var(--navy-700); }

.crumbs {
  display: flex; gap: 8px; align-items: center;
  font-family:'JetBrains Mono',monospace; font-size: 11px;
  letter-spacing: 0.08em; color: var(--ink-muted);
}
.crumbs .sep { opacity: 0.5; }
.crumbs a { color: var(--ink-primary); text-decoration: none; opacity: 0.75; }
.crumbs .current { color: var(--ink-primary); }

/* ============ 08 · MODALS ============ */
.modal-stage {
  background: var(--navy-900); /* intentional literal — brand-constant regardless of surface */
  border: 1px solid rgba(244,237,224,0.1);
  border-radius: var(--r);
  padding: 60px 48px; min-height: 440px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.modal-stage.is-wide { padding: 72px 56px; }
.modal-stage::before {
  content:''; position:absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 24px, rgba(244,237,224,0.04) 24px 25px),
    rgba(6,19,33,0.25);
  pointer-events: none;
}
.modal {
  position: relative; z-index: 1;
  background: var(--surface-raised); /* surface-token */ border: 1px solid var(--rule-soft);
  border-radius: var(--r);
  padding: 34px 38px 28px;
  width: 100%; max-width: 520px;
  box-shadow: 0 20px 60px rgba(6,19,33,0.35);
}
.modal.is-auth { max-width: 560px; }
.modal .m-eyebrow {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sage-700); margin-bottom: 10px;
}
.modal .m-title {
  font-family:'Fraunces',serif; font-weight: 500; font-size: 26px;
  line-height: 1.2; letter-spacing: -0.012em; color: var(--ink-primary);
  font-variation-settings:"opsz" 48,"SOFT" 55;
  margin-bottom: 12px;
}
.modal .m-title em { font-style: italic; color: var(--sage-700); }
.modal .m-body { font-size: 14.5px; line-height: 1.6; color: var(--ink-body); margin-bottom: 20px; }
.modal .m-body em { font-style: italic; color: var(--ink-primary); }

.modal .m-receipt {
  background: var(--surface-sunk); /* surface-token */ border-radius: 3px;
  padding: 14px 18px; margin-bottom: 18px;
  display: grid; grid-template-columns: 1fr auto; gap: 6px;
  font-family:'JetBrains Mono',monospace; font-size: 12.5px;
  color: var(--ink-primary); font-feature-settings:"tnum";
}
.modal .m-receipt .rcp-label { opacity: 0.65; }
.modal .m-receipt .rcp-val   { text-align: right; }
.modal .m-receipt .rcp-big   { padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--rule-softest); }
.modal .m-receipt .rcp-big .rcp-val { font-size: 18px; font-weight: 500; }
.modal .m-actions {
  display: flex; gap: 10px; justify-content: flex-end; padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
}
.modal .m-meta {
  margin-top: 14px; font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.14em; color: var(--ink-primary); opacity: 0.5; text-align: center;
}

/* ============ 09 · SIGNALS ============ */
.toast {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--navy-700); color: var(--cream-100); /* intentional literal — brand-constant regardless of surface */
  border-radius: var(--r); font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(6,19,33,0.25);
}
.toast .sm-circle { background: var(--sage-700); width: 24px; height: 24px; font-size: 14px; padding-bottom:1px; } /* intentional literal — brand-constant regardless of surface */
.toast.is-cfy { background: var(--vellum); color: var(--navy-900); border-left: 3px solid var(--gold-700); padding-left: 13px; } /* intentional literal — brand-constant regardless of surface */
.toast.is-cfy .sm-circle { background: var(--navy-700); color: var(--cream-100); } /* intentional literal — brand-constant regardless of surface */

.inline-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 3px;
  background: var(--sage-100); color: var(--sage-900); /* intentional literal — brand-constant regardless of surface */
  font-size: 13px; line-height: 1.5;
  border-left: 2px solid var(--sage-700);
}

/* --- .honesty-banner · voice-beat inset primitive ---------------
   Promoted from Pricing.html §03 to the library (v0.4.3).
   Scope: honesty-when-we-lose moments only. Accepts canonical voice
   lines (voice.canonical.impartial.* / transparent.*) or paraphrases
   that have cleared brand review. NOT a general italic-Sage inset —
   copy that doesn't carry the honesty voice beat sits in body text.
   One per scroll landmark; max two per page.
   Treatment spec: components.honestyBanner (tokens.json v0.4.3).
   ------------------------------------------------------------- */
.honesty-banner {
  padding: 18px 22px; border-radius: var(--r);
  background: var(--sage-100); /* intentional literal — brand-constant regardless of surface */
  border-left: 3px solid var(--sage-700);
  font-family:'Fraunces',serif; font-weight: 400;
  font-variation-settings:"opsz" 72,"SOFT" 55;
  font-size: 20px; line-height: 1.4; letter-spacing: -0.005em;
  color: var(--sage-900); text-wrap: pretty;
}
.honesty-banner em {
  font-style: italic; font-weight: 400;
  color: var(--sage-700);
}
body[data-surface="dark"] .honesty-banner {
  background: rgba(116,142,123,0.18);
  border-left-color: var(--gold-300);
  color: var(--cream-100);
}
body[data-surface="dark"] .honesty-banner em {
  color: var(--gold-300);
}

.empty {
  text-align: center; padding: 40px 24px;
  background: var(--surface-raised); /* surface-token */ border: 1px dashed var(--rule); border-radius: var(--r);
}
.empty .e-mark {
  width: 48px; height: 48px; border-radius: 999px;
  background: var(--surface-sunk); /* surface-token */ margin: 0 auto 14px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--sage-700);
  font-family:'Fraunces',serif; font-weight: 500; font-size: 22px;
  font-variation-settings:"opsz" 36,"SOFT" 55;
}
.empty h5 {
  font-family:'Fraunces',serif; font-weight: 500; font-size: 18px;
  color: var(--ink-primary); margin-bottom: 6px;
  font-variation-settings:"opsz" 36,"SOFT" 55;
}
.empty p { font-size: 13.5px; color: var(--ink-body); max-width: 42ch; margin: 0 auto; }

.loader-dots { display: inline-flex; align-items: center; gap: 6px; color: var(--sage-700); }
.loader-dots .shim { background: currentColor; }

.skel {
  height: 14px;
  background: linear-gradient(90deg, var(--surface-sunk) 0%, var(--surface-raised) 50%, var(--surface-sunk) 100%); /* surface-token */
  background-size: 200% 100%;
  animation: skel 1.4s infinite ease-in-out;
  border-radius: 2px;
}
@keyframes skel { 0%{ background-position: 200% 0; } 100%{ background-position: -200% 0; } }
.skel.skel-title { height: 24px; width: 60%; }
.skel.skel-line  { margin-top: 8px; width: 90%; }
.skel.skel-line.short { width: 70%; }

/* ============ 10 · GENERIC TABLES + PILLS ============ */
.gtable {
  width: 100%; border-collapse: collapse;
  background: var(--surface-raised); /* surface-token */ border: 1px solid var(--rule-soft);
  border-radius: var(--r); overflow: hidden;
}
.gtable thead th {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--sage-700);
  text-align: left; padding: 14px 16px;
  background: var(--surface-sunk); /* surface-token */ border-bottom: 1px solid var(--rule-soft);
  white-space: nowrap;
}
.gtable thead th.is-num { text-align: right; }
.gtable thead th.is-sort-asc::after { content: ' ↑'; color: var(--navy-700); opacity: 0.7; }
.gtable thead th.is-sort-desc::after { content: ' ↓'; color: var(--navy-700); opacity: 0.7; }
.gtable tbody td {
  padding: 14px 16px; font-size: 14px; color: var(--ink-body);
  border-bottom: 1px solid var(--rule-softest); vertical-align: top;
}
.gtable tbody tr:last-child td { border-bottom: none; }
.gtable tbody td.is-num {
  font-family:'JetBrains Mono',monospace; color: var(--ink-primary);
  text-align: right; font-feature-settings:"tnum";
}
.gtable tbody tr:hover { background: var(--surface-sunk); /* surface-token */ }

.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.fpill {
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--surface-raised); /* surface-token */ border: 1px solid var(--rule-soft);
  font-family:'Inter',sans-serif; font-size: 12.5px; font-weight: 500;
  color: var(--ink-primary); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.fpill.is-active { background: var(--navy-700); color: var(--cream-100); border-color: var(--navy-700); } /* intentional literal — brand-constant regardless of surface */
.fpill .fp-count {
  font-family:'JetBrains Mono',monospace; font-size: 11px; opacity: 0.7; margin-left: 2px;
}

/* ============ 11 · DO / DON'T ============ */
.dd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.dd-card {
  background: var(--surface-raised); /* surface-token */ border: 1px solid var(--rule-soft);
  border-radius: var(--r); padding: 20px 22px;
}
.dd-card .dd-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500;
  margin-bottom: 12px;
}
.dd-card.is-do .dd-tag { color: var(--sage-700); }
.dd-card.is-dont .dd-tag { color: var(--danger-700); }
.dd-card .dd-title {
  font-family:'Fraunces',serif; font-weight: 500; font-size: 18px;
  color: var(--ink-primary); margin-bottom: 6px;
  font-variation-settings:"opsz" 36,"SOFT" 55;
}
.dd-card .dd-why { font-size: 13px; color: var(--ink-body); margin-bottom: 14px; line-height: 1.55; }
.dd-card .dd-example {
  background: var(--surface-sunk); /* surface-token */ border: 1px solid var(--rule-soft);
  border-radius: 3px; padding: 16px; position: relative;
}
.dd-card.is-dont .dd-example { border-color: var(--danger-300); background: #F7E9DE; } /* intentional literal — brand-constant regardless of surface */
.dd-card .dd-strike { position: relative; }
.dd-card .dd-strike::after {
  content:''; position:absolute; left: -4px; right: -4px; top: 50%; height: 1.5px;
  background: var(--danger-700); transform: rotate(-1.2deg); opacity: 0.65; /* intentional literal — brand-constant regardless of surface */
  pointer-events: none;
}

/* ============ 12 · TOKENS BLOCK ============ */
.tokens-block {
  background: var(--navy-900); color: var(--cream-300); /* intentional literal — brand-constant regardless of surface */
  border-radius: var(--r); padding: 32px 36px;
  font-family:'JetBrains Mono',monospace; font-size: 12.5px;
  line-height: 1.75; overflow-x: auto;
}
.tokens-block .tk-com { color: var(--sage-300); }
.tokens-block .tk-key { color: var(--gold-300); }
.tokens-block .tk-str { color: var(--cream-100); }
.tokens-block .tk-num { color: var(--cream-500); }
.tokens-block pre { white-space: pre; }

/* ============ 13 · SNIFF SURFACE ============ */
.sniff {
  background: var(--surface-sunk); /* surface-token */ border: 1px solid var(--rule); border-radius: var(--r);
  padding: 0; position: relative; overflow: hidden;
}
.sniff .sniff-top-nav { margin: 0; border-radius: 0; border-left: none; border-right: none; border-top: none; }
.sniff .sniff-body {
  display: grid; grid-template-columns: 1.55fr 1fr;
  gap: 28px; padding: 28px 32px 36px;
}
.sniff-col { display: flex; flex-direction: column; gap: 18px; }
.sniff .sniff-heading {
  font-family:'Fraunces',serif; font-weight: 500; font-size: 24px;
  color: var(--ink-primary); letter-spacing: -0.01em; line-height: 1.2;
  font-variation-settings:"opsz" 48,"SOFT" 55;
  margin-bottom: 6px;
}
.sniff .sniff-heading em { font-style: italic; color: var(--sage-700); }
.sniff .sniff-sub { font-size: 14px; color: var(--ink-body); line-height: 1.55; margin-bottom: 14px; max-width: 54ch; }

/* ============ HANDOFF CALLOUT ============ */
.handoff {
  background: var(--navy-700); color: var(--cream-300); /* intentional literal — brand-constant regardless of surface */
  border-radius: var(--r); padding: 40px 48px;
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px;
}
.handoff .h-eyebrow {
  font-family:'JetBrains Mono',monospace; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-300);
  margin-bottom: 12px;
}
.handoff h3 {
  font-family:'Fraunces',serif; font-weight: 500; font-size: 28px;
  line-height: 1.2; letter-spacing: -0.012em; color: var(--cream-100);
  font-variation-settings:"opsz" 72,"SOFT" 60;
}
.handoff h3 em { font-style: italic; color: var(--gold-300); font-weight: 400; }
.handoff p { font-size: 14px; line-height: 1.65; color: rgba(244,237,224,0.9); margin-bottom: 10px; }
.handoff p strong { color: var(--cream-100); font-weight: 500; }
.handoff ul { list-style: none; }
.handoff li {
  font-family:'JetBrains Mono',monospace; font-size: 11.5px;
  letter-spacing: 0.04em; color: rgba(244,237,224,0.85);
  padding: 8px 0; border-bottom: 1px solid rgba(244,237,224,0.12);
  display: grid; grid-template-columns: 150px 1fr; gap: 14px; line-height: 1.55;
}
.handoff li:last-child { border-bottom: none; }
.handoff li .k { color: var(--gold-300); }

/* ============ FOOTER ============ */
.foot {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  padding: 32px 0 0; border-top: 1px solid var(--rule); margin-top: 48px;
  font-family:'JetBrains Mono',monospace; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-primary); opacity: 0.55;
}
