/* ClaimLedge — additive production polish and landing-page system. */
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 600 var(--text-xs)/1 var(--sans); cursor: pointer; transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), transform var(--dur-instant) var(--ease-out); }
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle:active { background: var(--paper); transform: translateY(1px); }
.nav-toggle__label { letter-spacing: .04em; text-transform: uppercase; }
.site-nav { align-items: center; }
/* Must remain paired with the 1100px full-navigation breakpoint in main.css. */
@media (max-width: 1099px) {
  .site-header__inner { position: relative; }
  .site-nav { position: absolute; left: 20px; right: 20px; top: calc(var(--header-h) - 1px); display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-top: 0; box-shadow: 0 8px 20px rgba(15,17,21,.08); }
  .site-nav.site-nav--open { display: flex; }
  .site-nav a { padding: 13px 12px; text-decoration: none; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); }
  .site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { background: var(--paper); color: var(--ink); text-decoration: none; }
  .site-nav a:last-child { border-bottom: 0; }
}
@media (min-width: 1100px) { .nav-toggle { display: none; } }
.field label, .breakdown-label { overflow-wrap: anywhere; }

.data-table { max-width: 100%; overflow-x: auto; display: block; }
.data-table table { min-width: 620px; }

/* ==========================================================================
   Growth-phase additions (hero CTA, persona entry, card polish, sticky rail)
   ========================================================================== */

/* ---- Hero actions ---- */
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; max-width: 420px; }
@media (min-width: 600px) { .hero-actions { flex-direction: row; align-items: center; } }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 600 var(--text-base)/1 var(--sans); text-decoration: none; transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), transform var(--dur-instant) var(--ease-out); }
.btn-ghost:hover { border-color: var(--ink); box-shadow: var(--shadow-1); }
.btn-ghost:active { background: var(--paper); transform: translateY(1px); }
.hero a.btn-primary, .hero a.btn-ghost { display: inline-flex; align-items: center; justify-content: center; width: auto; flex: 1 1 0; text-decoration: none; }
.hero-meta { margin-top: 22px; }

/* ---- Persona (Start here) module ---- */
.persona-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .persona-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.persona-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: inherit; transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, transform var(--dur-fast) ease; }
.persona-card::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; background: var(--accent); border-radius: 2px; opacity: 0; transition: opacity var(--dur-fast) ease; }
.persona-card:hover, .persona-card:focus-visible { border-color: var(--ink); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.persona-card:hover::before, .persona-card:focus-visible::before { opacity: 1; }
.persona-card:active { box-shadow: var(--shadow-1); transform: translateY(0); }
.persona-card__kicker { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 9px; }
.persona-card__title { font-size: var(--text-lg); line-height: 1.25; margin-bottom: 10px; }
.persona-card__desc { font-size: var(--text-md); line-height: 1.6; color: var(--ink-2); flex: 1; }
.persona-card__link { margin-top: 14px; font-size: var(--text-sm); font-weight: 600; color: var(--accent); }

/* ---- Tool-card polish ----
   The left ::before accent is superseded by the OKLCH top-bar sweep defined in
   the color-mix layer below (transform-based, no conflicts). */
.tool-card:visited .tool-card__title { color: var(--ink-2); }
.tool-card:visited:hover .tool-card__title { color: var(--ink); }

/* ---- Sticky rail behavior lives in main.css (.tool-rail) ---- */

/* ---- Sidebar card polish ---- */
.sidebar-card { border-radius: var(--radius); background: var(--surface); }
.sidebar-card a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.sidebar-card a:hover { text-decoration-color: var(--ink); color: var(--ink); }

/* ---- Next steps timeline ---- */
.next-steps { margin: 36px 0 8px; }
.next-steps ol { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: ns; }
.next-steps li { counter-increment: ns; position: relative; padding: 12px 0 12px 42px; border-top: 1px solid var(--line); font-size: var(--text-base); line-height: 1.6; color: var(--ink-2); }
.next-steps li::before { content: counter(ns); position: absolute; left: 0; top: 14px; width: 26px; height: 26px; border: 1.5px solid var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: var(--text-sm); font-weight: 700; color: var(--accent-dark); background: var(--surface); }
.next-steps li:last-child { border-bottom: 1px solid var(--line); }

/* ---- Theme toggle ---- */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); cursor: pointer; flex: none; margin-left: 10px; transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), transform var(--dur-instant) var(--ease-out); }
.theme-toggle:hover { border-color: var(--ink); color: var(--ink); }
.theme-toggle:active { background: var(--paper); transform: translateY(1px); }
.theme-toggle svg { display: block; }

/* ---- Search palette trigger (assets/js/search.js owns the overlay) ---- */
.search-open { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); cursor: pointer; flex: none; margin-left: 10px; transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), transform var(--dur-instant) var(--ease-out); }
.search-open:hover { border-color: var(--ink); color: var(--ink); }
.search-open:active { background: var(--paper); transform: translateY(1px); }
.search-open svg { display: block; }
@media (max-width: 1099px) { .search-open { margin-left: auto; } }
/* Light mode = moon icon (switch-to-dark); dark mode = sun icon (switch-to-light).
   These selectors use compound specificity (.theme-toggle .x) that BEATS the
   generic `.theme-toggle svg { display: block }` above, otherwise both icons
   render in light mode. */
.theme-toggle .theme-toggle__sun { display: none; }
.theme-toggle .theme-toggle__moon { display: block; }
[data-theme="dark"] .theme-toggle .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle .theme-toggle__moon { display: none; }
@media (min-width: 1100px) { .site-nav { margin-left: auto; margin-right: 14px; } }
@media (max-width: 1099px) { .nav-toggle { margin-left: auto; } }

/* ---- Wizard steps ---- */
.wizard-step { display: contents; }
.wizard-step[hidden] { display: none; }
.wizard-progress { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
.wizard-progress__text { font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.wizard-progress__bar { flex: 1; height: 4px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.wizard-progress__bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width var(--dur-base) var(--ease-out); }
.wizard-nav { display: flex; gap: 12px; margin-top: 20px; }
.wizard-nav .wizard-back, .wizard-nav .wizard-next { flex: 1; min-height: 50px; border-radius: var(--radius); font: 600 var(--text-base)/1 var(--sans); cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-instant) var(--ease-out); }
.wizard-nav .wizard-next { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.wizard-nav .wizard-back:hover { border-color: var(--ink); }
.wizard-nav .wizard-next:hover { filter: brightness(1.08); }
.wizard-nav .wizard-back:active, .wizard-nav .wizard-next:active { transform: translateY(1px); }
.wizard-nav .wizard-back:disabled { opacity: 0.4; cursor: default; }
form.wizarding .btn-row { display: none; }
form.wizarding.wizard-last .btn-row { display: flex; }

/* ---- What-If scenario panel ---- */
.whatif { margin-top: 20px; border: 1px solid var(--line-soft); border-left: 3px solid var(--accent); background: var(--surface); border-radius: var(--radius); padding: 16px 18px 18px; }
.whatif__head { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.whatif__note { font-size: var(--text-sm); color: var(--ink-3); margin: 0 0 14px; }
.whatif__row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.whatif__row:first-of-type { border-top: 0; }
.whatif__label { font-size: var(--text-sm); font-weight: 600; color: var(--ink-2); min-width: 120px; }
.whatif__row input[type="range"] { flex: 1; }
.whatif__value { font-size: var(--text-md); font-weight: 700; color: var(--accent-dark); min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.whatif__row--pills { flex-direction: column; align-items: flex-start; gap: 8px; }
.whatif__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.whatif__pill { padding: 8px 14px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink-2); font: 600 var(--text-sm)/1.2 var(--sans); cursor: pointer; transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), transform var(--dur-instant) var(--ease-out); }
.whatif__pill:hover { border-color: var(--ink); color: var(--ink); }
.whatif__pill.is-active { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); }
.whatif__pill:active { transform: translateY(1px); }

/* ---- Compare tray ---- */
.compare-add { padding: 8px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); font: 600 var(--text-xs)/1 var(--sans); cursor: pointer; transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), transform var(--dur-instant) var(--ease-out); }
.compare-add:hover { border-color: var(--ink); color: var(--ink); }
.compare-add:active { background: var(--paper); transform: translateY(1px); }
.compare-tray { position: fixed; right: 16px; bottom: 16px; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-3); z-index: var(--z-overlay); padding: 14px 16px; max-height: 60vh; overflow: auto; }
.compare-tray__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.compare-tray__head strong { font-size: var(--text-sm); letter-spacing: 0.06em; text-transform: uppercase; }
.compare-tray__head button { margin-left: auto; }
.compare-tray__add { min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); font: 600 var(--text-xs)/1 var(--sans); cursor: pointer; transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), transform var(--dur-instant) var(--ease-out); }
.compare-tray__close { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--ink-3); font-size: var(--text-lg); cursor: pointer; line-height: 1; transition: color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out); }
.compare-tray__add:hover, .compare-tray__close:hover { color: var(--ink); }
.compare-tray ul { list-style: none; margin: 0; padding: 0; }
.compare-tray__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: var(--text-sm); }
.compare-tray__range { font-weight: 700; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.compare-tray__inputs { color: var(--ink-3); font-size: var(--text-sm); flex: 1 1 100%; }
.compare-tray__actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.compare-tray__actions a { color: var(--accent-dark); font-weight: 600; }
.compare-tray__actions button { min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--ink-3); font-size: var(--text-base); cursor: pointer; line-height: 1; transition: color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out); }
.compare-tray__actions button:hover { color: var(--ink); }
.compare-tray__note { font-size: var(--text-sm); color: var(--ink-3); margin: 10px 0 0; }

/* ---- Embed mode (?embed=1 strips site chrome for iframe widgets) ---- */
.embed .site-header, .embed .site-footer, .embed .noscript-nav, .embed .skip-link,
.embed .breadcrumbs, .embed .page-head, .embed .ad-slot, .embed .tool-rail,
.embed .compare-tray, .embed .state-rules-of, .embed .state-basis,
.embed .framework-rail, .embed .states-jumplist, .embed .result-next { display: none !important; }
.embed .container { max-width: none; padding: 0; }
.embed .tool-layout { grid-template-columns: 1fr; padding-bottom: 12px; }
.embed .prose { margin-top: 18px; }

/* ---- Small trust tick for footers / underlinks ---- */
.trust-strip { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; font-size: var(--text-sm); color: var(--ink-3); }

/* ---- Progressive motion layer (added by homepage polish) ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html *, html *::before, html *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
}
html { transition: background-color var(--dur-slow) var(--ease-out), color var(--dur-slow) var(--ease-out); }
html.js .tool-card, html.js .guide-card { transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out); }
html.js .tool-card:hover, html.js .tool-card:focus-visible, html.js .guide-card:hover, html.js .guide-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-3); }
html.js .tool-card:active, html.js .guide-card:active { transform: translateY(-1px); box-shadow: var(--shadow-1); }
html.js .btn-primary { transition: background var(--dur-base) var(--ease-out), transform var(--dur-instant) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
html.js .btn-primary:active { transform: translateY(1px); }
@keyframes cl-pulse { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: no-preference) { .cl-pulse { animation: cl-pulse 1.6s ease-in-out 1; } }

/* ---- Shimmer loading animation ---- */
@keyframes cl-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, var(--skeleton) 25%, color-mix(in oklch, var(--skeleton) 80%, var(--ink)) 50%, var(--skeleton) 75%);
  background-size: 200% 100%;
  animation: cl-shimmer 1.5s ease-in-out infinite;
}
/* ---- Scroll-reveal contract (home.js <-> enhancements.css, homepage only) ----
   home.js sets `cl-reveal-on` on <html> SYNCHRONOUSLY, right before arming the
   observer, so the hidden pre-state below only ever exists on pages where the
   reveal system is actually running - JS-off or JS-error users can never get
   stranded invisible cards. Deliberately NOT gated on html.js: site.js (which
   adds that class) is dynamically injected by header.js and loads async, so an
   html.js gate could start matching AFTER is-revealed is set and flip cards
   hidden->animated (FOUC). `cl-reveal-on` is set before any observer callback
   can fire, making the gate race-free. The entrance is a keyframe with
   `backwards` fill - not a transition - so the hover lift (transition on
   transform) is never delayed or overridden, and no cleanup JS is needed. */
@media (prefers-reduced-motion: no-preference) {
  .cl-reveal-on .tool-card:not(.is-revealed),
  .cl-reveal-on .guide-card:not(.is-revealed),
  .cl-reveal-on .hub-card:not(.is-revealed),
  .cl-reveal-on .start-card:not(.is-revealed) { opacity: 0; transform: translateY(22px); }
  .cl-reveal-on .tool-card.is-revealed,
  .cl-reveal-on .guide-card.is-revealed,
  .cl-reveal-on .hub-card.is-revealed,
  .cl-reveal-on .start-card.is-revealed { animation: cl-reveal-in 0.55s var(--ease-out) backwards; }
}
@keyframes cl-reveal-in { from { opacity: 0; transform: translateY(22px); } }
.scrolled { background: rgba(244,244,246,0.78) !important; backdrop-filter: blur(10px); }
[data-theme="dark"] .scrolled { background: rgba(14,17,22,0.72) !important; }


/* ---- Homepage legal suite: "Show all / Show less" toggle ----
   Cards stay DIRECT grid children (a wrapper <div> would break the grid and
   stack the extras in one column). .cap-6 on the grid collapses cards 7+ by
   zeroing their box + fading; removing .cap-6 expands with a staggered
   fade+slide. The toggle <button> sits AFTER the grid, centered full-width.
   JS-off -> all cards render, no button (graceful degradation). */
.tool-grid.cap-6 > .tool-card:nth-child(n+7) {
  opacity: 0;
  transform: translateY(14px) scale(.98);
  pointer-events: none;
  visibility: hidden;
  /* collapse the box so the grid shrinks to 6 cards */
  height: 0 !important;
  min-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-width: 0 !important;
  overflow: hidden;
}
html.js .tool-grid > .tool-card:nth-child(n+7) {
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
/* stagger the reveal when expanding */
.tool-grid:not(.cap-6) > .tool-card:nth-child(7)  { transition-delay: .00s; }
.tool-grid:not(.cap-6) > .tool-card:nth-child(8)  { transition-delay: .04s; }
.tool-grid:not(.cap-6) > .tool-card:nth-child(9)  { transition-delay: .08s; }
.tool-grid:not(.cap-6) > .tool-card:nth-child(10) { transition-delay: .12s; }
.tool-grid:not(.cap-6) > .tool-card:nth-child(11) { transition-delay: .16s; }
.tool-grid:not(.cap-6) > .tool-card:nth-child(12) { transition-delay: .20s; }

.tool-grid__toggle-wrap { text-align: center; margin: 30px 0 6px; }
/* Corporate pill toggle — overrides the plain .btn-text underline treatment. */
.tool-grid__toggle { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 12px 24px !important; border: 1px solid var(--line) !important; border-radius: var(--radius-pill); background: var(--surface) !important; font-size: var(--text-md); font-weight: 600; color: var(--ink-2) !important; text-decoration: none !important; box-shadow: var(--shadow-1); cursor: pointer; transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-instant) var(--ease-out); }
.tool-grid__toggle:hover { border-color: var(--accent) !important; color: var(--accent) !important; box-shadow: var(--shadow-2); }
.tool-grid__toggle:active { box-shadow: var(--shadow-1); transform: translateY(1px); }
/* chevron rotates to hint expand/collapse state */
.tool-grid__toggle .tool-grid__chev { transition: transform .35s ease; flex: none; }
.tool-grid__toggle[aria-expanded="true"] .tool-grid__chev { transform: rotate(180deg); }

/* ==========================================================================
   OKLCH color-blend visual layer  (progressive enhancement)
   --------------------------------------------------------------------------
   Cherry-picked technique: color-mix(in oklch, ...) for richer, saturated
   gradient ramps on UI CHROME only (hero band, buttons, badge, card accent,
   hairlines, focus). OKLCH keeps saturation high through the blend instead of
   collapsing to muddy mid-gray like sRGB mixing. We deliberately do NOT use
   mix-blend-mode:difference/exclusion on text — that would invert and garble
   content. All colors derive from existing tokens; no text string or text
   color is altered. Fallback: browsers without color-mix keep the flat token.
   ========================================================================== */

@supports (background: color-mix(in oklch, red 50%, blue)) {

  /* --- Primary button: rich OKLCH ramp instead of a flat fill --- */
  .btn-primary {
    background: linear-gradient(180deg,
      color-mix(in oklch, var(--accent) 82%, var(--accent-light)),
      color-mix(in oklch, var(--accent) 94%, var(--accent-dark)));
    border-color: color-mix(in oklch, var(--accent) 70%, var(--accent-dark));
  }
  .btn-primary:hover {
    background: linear-gradient(180deg,
      color-mix(in oklch, var(--accent-dark) 78%, var(--accent)),
      color-mix(in oklch, var(--accent-dark) 96%, var(--accent)));
    border-color: var(--accent-dark);
  }

  /* --- Eyebrow badge: saturated tinted chip (visual only) --- */
  .eyebrow {
    color: var(--accent);                 /* token accent, readable */
    background: color-mix(in oklch, var(--accent) 12%, var(--surface));
    border: 1px solid color-mix(in oklch, var(--accent) 26%, var(--surface));
    padding: 4px 10px; border-radius: var(--radius-pill);
    display: inline-block; margin-bottom: 14px;
  }

  /* --- Tool card: icon tile deepens on hover (visual only) --- */
  .tool-card__icon {
    transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
  }
  .tool-card:hover .tool-card__icon {
    background: linear-gradient(135deg,
      color-mix(in oklch, var(--cat-accent, var(--accent)) 22%, var(--surface)),
      color-mix(in oklch, var(--cat-accent, var(--accent)) 10%, var(--surface)));
  }

}

/* --- Dark-mode tuning: lift chrome so blends stay vivid on dark surfaces --- */
[data-theme="dark"] .eyebrow {
  background: color-mix(in oklch, var(--accent) 22%, var(--surface));
  border-color: color-mix(in oklch, var(--accent) 40%, var(--surface));
}

/* ---------- Search palette recent searches ---------- */
.cl-palette__recent-head {
  padding: 10px 12px 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cl-palette__item--recent {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.cl-palette__item--recent:hover {
  background: var(--info-light);
}
.cl-palette__recent-icon {
  flex: none;
  font-size: var(--text-md);
  color: var(--ink-3);
  margin-top: 2px;
}
.cl-palette__clear-recent {
  display: block;
  margin: 8px auto;
  padding: 6px 14px;
  font-size: var(--text-sm);
  color: var(--ink-3);
  background: none;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 44px;
  transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.cl-palette__clear-recent:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Save-data / slow-connection mode ---------- */


/* ---------- Focus trap for mobile nav ---------- */
.site-nav:focus-within {
  display: flex;
}

/* ==========================================================================
   Editorial utility layer — calculators, articles, state dashboards, hubs
   ========================================================================== */

/* Compact, task-first interior mastheads. */
.page-head { max-width: 900px; padding-block: 28px 24px; }
.page-head h1 { line-height: 1.02; }
.page-head .standfirst { max-width: 54ch; }
@media (min-width: 768px) { .page-head { padding-block: 40px 34px; } }

/* A calculator reads like a numbered case worksheet, not a generic form. */
.calculator { border-top: 4px solid var(--ink); }
.calculator__header { align-items: center; background: color-mix(in oklch, var(--paper) 72%, var(--surface)); }
.calculator__badge { border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px 9px; background: var(--surface); }
.wizard-step { counter-reset: field; }
.wizard-step > .field { counter-increment: field; position: relative; }
.wizard-step > .field > label:first-child::before {
  content: counter(field, decimal-leading-zero) " ";
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: .06em;
}
.wizard-progress { align-items: flex-start; }
.wizard-progress__text { white-space: normal; line-height: 1.35; max-width: 48%; }
.wizard-progress__bar { margin-top: 6px; }
.wizard-step[role="group"] { padding-top: 4px; }
.wizard-nav { padding-top: 4px; border-top: 1px solid var(--line-soft); }
.privacy-note { padding-left: 18px; position: relative; }
.privacy-note::before { content: ""; position: absolute; left: 0; top: .35em; width: 10px; height: 10px; border: 1.5px solid var(--success); border-radius: 50%; }

/* Model note sits between inputs and output as the interpretation boundary. */
.model-review.callout {
  max-width: none;
  margin: 22px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: color-mix(in oklch, var(--info-light) 45%, var(--surface));
  box-shadow: none;
}
.model-review p { max-width: 82ch; }
.model-review strong { color: var(--ink); }

/* Results are decision sheets: status and actions stay legible on narrow screens. */
.results__header { align-items: center; }
.results__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 1 1 100%; gap: 8px; }
.results__actions .btn-mini { min-height: 42px; white-space: normal; line-height: 1.2; }
.results--empty .results__actions { opacity: .55; }
@media (min-width: 620px) {
  .results__actions { display: flex; flex: 0 1 auto; margin-left: auto; }
}

/* Generated article wayfinding. */
.article-toc {
  max-width: 74ch;
  margin: 4px 0 26px;
  padding: 18px 20px;
  border-block: 1px solid var(--line);
  background: color-mix(in oklch, var(--paper) 78%, var(--surface));
}
.article-toc > strong { display: block; margin-bottom: 10px; font: 700 var(--text-xs)/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.article-toc ol { columns: 1; margin: 0; padding-left: 20px; }
.article-toc li { break-inside: avoid; margin: 5px 0; color: var(--ink-3); }
.article-toc a { color: var(--ink-2); text-underline-offset: 3px; }
@media (min-width: 720px) { .article-toc ol { columns: 2; column-gap: 36px; } }

.article-nav {
  max-width: 74ch;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 26px;
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
}
.article-nav a { display: flex; flex-direction: column; gap: 4px; min-height: 92px; padding: 16px 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.article-nav a:last-child { text-align: right; }
.article-nav a span { font-size: var(--text-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.article-nav a strong { font-family: var(--serif); line-height: 1.25; }
.article-nav a:hover { border-color: var(--accent); box-shadow: var(--shadow-1); }
@media (min-width: 640px) { .article-nav { grid-template-columns: 1fr 1fr; } }

/* State dashboard switcher: explicit current state and touch-friendly targets. */
.state-switcher { margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.state-switcher > span { display: block; margin-bottom: 9px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.state-switcher > div { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
.state-switcher a { min-height: 40px; display: inline-flex; align-items: center; padding: 7px 13px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink-2); text-decoration: none; white-space: nowrap; font-size: var(--text-sm); font-weight: 600; }
.state-switcher a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Searchable collection headers for guides, states, and vertical hubs. */
.hub-filter { max-width: 620px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.hub-filter > label { display: block; margin-bottom: 7px; font-size: var(--text-sm); font-weight: 700; color: var(--ink); }
.hub-filter__control { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1); }
.hub-filter__control:focus-within { border-color: var(--accent); box-shadow: var(--shadow-focus); }
.hub-filter input[type="search"] { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; padding: 0 14px; color: var(--ink); background: transparent; font-size: 16px; }
.hub-filter button { min-width: 64px; border: 0; border-left: 1px solid var(--line-soft); background: var(--paper); color: var(--ink-2); font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.hub-filter__status { min-height: 22px; margin-top: 7px; font-size: var(--text-sm); color: var(--ink-3); }
.tool-card[hidden], .hub-card[hidden], .section[hidden] { display: none !important; }

/* Better phone tables: preserve semantic table layout but allow deliberate pan. */
.prose .data-table { border: 1px solid var(--line); border-collapse: separate; border-spacing: 0; overflow-x: auto; scrollbar-width: thin; }
.prose .data-table th, .prose .data-table td { min-width: 150px; border-width: 0 1px 1px 0; }

@media (max-width: 520px) {
  .calculator__header { align-items: flex-start; padding-inline: 18px; }
  .calculator__title { font-size: var(--text-lg); }
  .calculator__badge { font-size: var(--text-2xs); }
  .calculator__body { padding-inline: 18px; }
  .wizard-progress { flex-direction: column; gap: 8px; }
  .wizard-progress__text { max-width: none; }
  .wizard-progress__bar { width: 100%; }
    .result-figure { overflow-wrap: anywhere; }
}

/* ---- Header: keep the longer wordmark tag from overflowing at the tight
   breakpoint (1100–1180px) without weakening the compact-nav contract. ---- */
@media (min-width: 1100px) and (max-width: 1180px) {
  .wordmark__tag {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}


/* ---- Homepage: "Find your calculator" type-ahead (comprehension + task-first) ---- */
.find-tool { position: relative; max-width: 640px; margin: 26px 0 0; }
.find-tool__label {
  display: block; font-family: var(--mono); font-size: var(--text-2xs);
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 8px;
}
.find-tool__box { position: relative; }
.find-tool__input {
  width: 100%; min-height: 56px;
  padding: 14px 18px;
  font-size: var(--text-lg);
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.find-tool__input::placeholder { color: var(--ink-3); }
.find-tool__input:hover { border-color: var(--line-strong, var(--accent)); }
.find-tool__input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.find-tool__hint { display: block; margin-top: 7px; font-size: var(--text-xs); color: var(--ink-3); }
.find-tool__results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  z-index: 30; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-3);
  max-height: 320px; overflow-y: auto;
}
.find-tool__results[hidden] { display: none; }
.find-tool__result {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
}
.find-tool__result:hover, .find-tool__result:focus-visible,
.find-tool__result[aria-selected="true"] { background: var(--paper); outline: none; }
.find-tool__result span:first-child { font-weight: 600; font-size: var(--text-md); }
.find-tool__result span:last-child { font-size: var(--text-xs); color: var(--ink-3); }
.find-tool__empty { padding: 10px 12px; font-size: var(--text-sm); color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) {
  .find-tool__results { scroll-behavior: auto; }
}

