/* ==========================================================================
   BenefitDial design system
   Built for a 65+ audience: large type, high contrast, big targets, calm layout.
   Single authoritative stylesheet — no framework, no runtime dependencies.
   ========================================================================== */

/* ----- Design tokens ---------------------------------------------------- */
:root {
  /* Brand */
  --bc-teal-900: #0b3b3f;
  --bc-teal-800: #0f4b50;
  --bc-teal-700: #146066;
  --bc-teal-600: #1a7a80;
  --bc-teal-500: #2a9199;
  --bc-teal-050: #e9f5f5;
  --bc-amber-600: #b45309;
  --bc-amber-500: #d97706;
  --bc-amber-100: #fef3c7;
  --bc-green-700: #15803d;
  --bc-green-100: #dcfce7;
  --bc-red-700: #b91c1c;
  --bc-red-100: #fee2e2;
  --bc-blue-700: #1d4ed8;

  /* Neutrals */
  --bc-ink: #16211f;          /* body text — near-black with a warm cast */
  --bc-ink-soft: #3f4d4a;     /* secondary text */
  --bc-ink-faint: #5c6b67;    /* captions, meta */
  --bc-line: #d5ddda;         /* borders */
  --bc-line-soft: #e7ecea;
  --bc-surface: #ffffff;
  --bc-surface-2: #f4f7f6;    /* section wash */
  --bc-surface-3: #eef2f1;
  --bc-bg: #fbfcfc;

  /* Semantic */
  --bc-primary: var(--bc-teal-700);
  --bc-primary-strong: var(--bc-teal-800);
  --bc-focus: #0a6cff;

  /* Type scale — generous for readability */
  --bc-font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --bc-font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
  --bc-fs-base: 1.1875rem;    /* 19px */
  --bc-lh-base: 1.65;

  /* Spacing */
  --bc-radius: 12px;
  --bc-radius-lg: 18px;
  --bc-shadow-sm: 0 1px 2px rgba(11, 59, 63, 0.06), 0 1px 3px rgba(11, 59, 63, 0.08);
  --bc-shadow-md: 0 4px 14px rgba(11, 59, 63, 0.10);
  --bc-maxw: 68rem;
  --bc-maxw-prose: 44rem;

  /* Illustration / duotone — enabling layer for all inline-SVG art */
  --bc-gold: #f5c451;
  --bc-ill-line: var(--bc-teal-700);
  --bc-ill-fill: var(--bc-teal-050);
  --bc-ill-fill-2: #d3e9ea;
  --bc-ill-accent: var(--bc-amber-500);
  --bc-ill-gold: var(--bc-gold);
  --bc-ill-paper: var(--bc-surface);

  /* Depth */
  --bc-shadow-lg: 0 12px 30px -8px rgba(11, 59, 63, 0.18), 0 4px 10px rgba(11, 59, 63, 0.08);
  --bc-line-onteal: rgba(255, 255, 255, 0.14);
  --bc-amber-glow: rgba(245, 196, 81, 0.28);
  --bc-hero-mesh:
    radial-gradient(120% 80% at 85% -10%, rgba(245, 196, 81, 0.16), transparent 55%),
    radial-gradient(90% 70% at 8% 115%, rgba(42, 145, 153, 0.38), transparent 60%),
    linear-gradient(160deg, var(--bc-teal-800), var(--bc-teal-900));

  /* Motion + display rhythm */
  --bc-reveal-dur: 560ms;
  --bc-reveal-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --bc-lh-tight: 1.12;
}

/* User-controlled text size (see enhance/textsize JS). Scales the rem system. */
:root[data-textsize="l"]  { --bc-fs-base: 1.3125rem; }
:root[data-textsize="xl"] { --bc-fs-base: 1.4375rem; }

/* ----- Reset-ish -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--bc-font-sans);
  font-size: var(--bc-fs-base);
  line-height: var(--bc-lh-base);
  color: var(--bc-ink);
  background: var(--bc-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--bc-teal-900); margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.15rem); letter-spacing: -0.01em; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
a { color: var(--bc-teal-700); text-underline-offset: 0.16em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--bc-teal-800); }
strong { font-weight: 700; }
ul, ol { padding-left: 1.35em; }
li { margin-bottom: 0.4em; }
hr { border: 0; border-top: 1px solid var(--bc-line); margin: 2.5rem 0; }
code, kbd, samp { font-family: var(--bc-font-mono); font-size: 0.95em; }

/* ----- Accessibility helpers ------------------------------------------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--bc-focus);
  outline-offset: 2px;
  border-radius: 4px;
}
/* On dark teal grounds the blue ring falls under 3:1 (WCAG 1.4.11) — use white there. */
.section--teal :focus-visible, .site-footer :focus-visible, .trust-bar :focus-visible { outline-color: #fff; }
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 200;
  background: var(--bc-teal-800);
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: 0 0 var(--bc-radius) var(--bc-radius);
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
  /* Auto table layout sizes to content and ignores width:1px, which lets a
     hidden data table (see svgcharts.mjs) silently widen the page's scrollable
     area even though it paints nothing. Fixed layout makes width authoritative. */
  table-layout: fixed;
}
/* white-space:nowrap above is right for the general sr-only case, but on a
   TABLE it inflates every cell's min-content width to its full unwrappable
   line length — CSS tables can never shrink below that floor (GRIDMIN),
   regardless of table-layout:fixed or width:1px. Nothing is visible either
   way (still clipped by overflow:hidden above), so let hidden-table cells
   wrap; that collapses GRIDMIN to the widest single word and keeps the
   table from forcing the whole page to scroll horizontally on narrow
   viewports. */
table.visually-hidden { white-space: normal; }

/* ----- Layout primitives ----------------------------------------------- */
.wrap { width: 100%; max-width: var(--bc-maxw); margin-inline: auto; padding-inline: 1.25rem; }
.prose { max-width: var(--bc-maxw-prose); }
.section { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.section--wash { background: var(--bc-surface-2); border-block: 1px solid var(--bc-line-soft); }
.section--teal {
  background: linear-gradient(160deg, var(--bc-teal-800), var(--bc-teal-900));
  color: #eaf6f6;
}
.section--teal h1, .section--teal h2, .section--teal h3 { color: #ffffff; }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: 1.5rem; }
@media (min-width: 46rem) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--bc-teal-600);
  margin: 0 0 0.6rem;
}
.section--teal .eyebrow { color: #a5e3e6; }
.lead { font-size: 1.28rem; color: var(--bc-ink-soft); }
.section--teal .lead { color: #e3f4f4; }
.muted { color: var(--bc-ink-faint); }
.center { text-align: center; }

/* ----- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;         /* large tap target */
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--bc-amber-500); color: #2a1704; }
.btn--primary:hover { background: var(--bc-amber-600); color: #fff; }
.btn--solid { background: var(--bc-teal-700); color: #fff; }
.btn--solid:hover { background: var(--bc-teal-800); color: #fff; }
.btn--ghost { background: transparent; color: var(--bc-teal-800); border-color: var(--bc-line); }
.btn--ghost:hover { background: var(--bc-teal-050); }
.btn--onteal { background: #ffffff; color: var(--bc-teal-900); }
.btn--onteal:hover { background: var(--bc-teal-050); color: var(--bc-teal-900); }
.btn--lg { min-height: 3.75rem; font-size: 1.2rem; padding: 0.9rem 2rem; }
.btn--block { display: flex; width: 100%; }

/* ----- Cards ------------------------------------------------------------ */
.card {
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-lg);
  padding: 1.6rem;
  box-shadow: var(--bc-shadow-sm);
}
.card h3 { margin-top: 0; }
.card--link { display: block; text-decoration: none; color: inherit; transition: box-shadow 0.15s ease, transform 0.1s ease, border-color 0.15s ease; }
.card--link:hover { box-shadow: var(--bc-shadow-md); transform: translateY(-2px); border-color: var(--bc-teal-500); color: inherit; }
.card__icon {
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--bc-teal-050);
  color: var(--bc-teal-700);
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

/* ----- Badges / pills --------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}
.badge--good { background: var(--bc-green-100); color: var(--bc-green-700); }
.badge--warn { background: var(--bc-amber-100); color: var(--bc-amber-600); }
.badge--bad  { background: var(--bc-red-100); color: var(--bc-red-700); }
.badge--info { background: var(--bc-teal-050); color: var(--bc-teal-700); }
.badge--neutral { background: var(--bc-surface-3); color: var(--bc-ink-soft); }

/* ----- Header / nav ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 252, 252, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--bc-line);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  min-height: 4.25rem;
}
.site-header__end { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.6rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--bc-teal-900); font-weight: 800; font-size: 1.28rem; padding-block: 0.3rem; margin-block: -0.3rem; }
.brand:hover { color: var(--bc-teal-900); }
.brand__mark {
  width: 2.25rem; height: 2.25rem;
  border-radius: 9px;
  background: var(--bc-teal-700);
  color: #fff;
  display: grid; place-items: center;
  flex: none;
}
.brand__mark svg { width: 1.5rem; height: 1.5rem; }
.brand small { display: block; font-size: 0.72rem; font-weight: 600; color: var(--bc-ink-faint); letter-spacing: 0.02em; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 2px solid var(--bc-line);
  border-radius: 10px;
  min-height: 3rem;
  padding: 0 0.9rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--bc-teal-900);
  cursor: pointer;
}
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.35rem; align-items: center; }
.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  color: var(--bc-ink);
}
.primary-nav a:hover { background: var(--bc-teal-050); color: var(--bc-teal-900); }
.primary-nav a[aria-current="page"] { color: var(--bc-teal-800); background: var(--bc-teal-050); box-shadow: inset 0 -3px 0 var(--bc-teal-600); }

@media (max-width: 52rem) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--bc-surface);
    border-bottom: 1px solid var(--bc-line);
    box-shadow: var(--bc-shadow-md);
    padding: 0.75rem 1.25rem 1.25rem;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .primary-nav a { min-height: 3.25rem; font-size: 1.1rem; padding: 0.6rem 0.85rem; }
}
@media (min-width: 52.01rem) {
  .nav-toggle { display: none; }
  .primary-nav { display: block !important; position: static; }
}

/* ----- Trust bar -------------------------------------------------------- */
.trust-bar {
  background: var(--bc-teal-900);
  color: #e6f5f5;
  font-size: 0.98rem;
}
.trust-bar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  justify-content: center;
  padding-block: 0.6rem;
  text-align: center;
}
.trust-bar strong { color: #fff; }
.trust-bar .tick { color: #7fe0c8; font-weight: 800; }

/* ----- Hero ------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero__inner { padding-block: clamp(2.75rem, 1.5rem + 6vw, 5rem); }
.hero h1 { max-width: 18ch; }
.hero .lead { max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }
.hero__promise {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
}
.hero__promise li {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin: 0;
}
.hero__promise .tick {
  color: #8bf0d6;
  font-weight: 900;
  font-size: 1.2rem;
}

/* ----- Tool / form styling --------------------------------------------- */
.tool {
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-lg);
  box-shadow: var(--bc-shadow-sm);
  overflow: hidden;
}
.tool__head { padding: 1.4rem 1.6rem; border-bottom: 1px solid var(--bc-line-soft); background: var(--bc-surface-2); }
.tool__head h2 { margin: 0; }
.tool__body { padding: 1.6rem; }
.field { margin-bottom: 1.35rem; }
.field > label, .field > .field__label {
  display: block;
  font-weight: 700;
  color: var(--bc-teal-900);
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}
.field .hint { display: block; color: var(--bc-ink-faint); font-size: 0.95rem; font-weight: 400; margin-top: 0.15rem; }
.input, select.input, textarea.input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.7rem 0.9rem;
  font-size: 1.15rem;
  font-family: inherit;
  color: var(--bc-ink);
  background: var(--bc-surface);
  border: 2px solid var(--bc-line);
  border-radius: 10px;
}
.input:focus, select.input:focus { border-color: var(--bc-teal-600); }
.input-group { display: flex; align-items: stretch; }
.input-group__addon {
  display: inline-flex;
  align-items: center;
  padding: 0 0.9rem;
  background: var(--bc-surface-3);
  border: 2px solid var(--bc-line);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  font-weight: 700;
  color: var(--bc-ink-soft);
  font-size: 1.15rem;
}
.input-group .input { border-radius: 0 10px 10px 0; }
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23146066' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.6rem;
}
.field-row { display: grid; gap: 1.35rem; }
@media (min-width: 40rem) { .field-row--2 { grid-template-columns: 1fr 1fr; } }
.error-text { color: var(--bc-red-700); font-weight: 700; margin-top: 0.35rem; }
.input[aria-invalid="true"] { border-color: var(--bc-red-700); }

/* ----- Result panels ---------------------------------------------------- */
.result {
  margin-top: 1.5rem;
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  overflow: hidden;
}
.result[hidden] { display: none; }
.result__head { background: var(--bc-teal-800); color: #fff; padding: 1rem 1.3rem; font-weight: 700; font-size: 1.15rem; }
.result__body { padding: 1.3rem; }
.figure-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
}
.figure {
  background: var(--bc-surface-2);
  border: 1px solid var(--bc-line-soft);
  border-radius: var(--bc-radius);
  padding: 1.1rem;
  text-align: center;
}
.figure__label { font-size: 0.92rem; color: var(--bc-ink-faint); font-weight: 600; }
.figure__value { font-size: 1.9rem; font-weight: 800; color: var(--bc-teal-900); font-variant-numeric: tabular-nums; margin-top: 0.15rem; }
.figure__value--good { color: var(--bc-green-700); }
.figure__value--bad { color: var(--bc-red-700); }
.figure__sub { font-size: 0.9rem; color: var(--bc-ink-faint); }
.pd-planname { font-weight: 700; color: var(--bc-teal-900); font-size: 1.1rem; }

/* ----- Tables ----------------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.02rem;
}
table.data caption { text-align: left; font-weight: 700; color: var(--bc-teal-900); margin-bottom: 0.6rem; }
table.data th, table.data td {
  text-align: left;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--bc-line-soft);
  vertical-align: top;
}
table.data thead th { background: var(--bc-surface-2); color: var(--bc-teal-900); border-bottom: 2px solid var(--bc-line); white-space: nowrap; }
table.data tbody tr:hover { background: var(--bc-surface-2); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-change { font-weight: 700; }
.cell-change--up { color: var(--bc-red-700); }
.cell-change--down { color: var(--bc-green-700); }
.cell-change--flat { color: var(--bc-ink-faint); }

/* ----- Callouts --------------------------------------------------------- */
.callout {
  border: 1px solid var(--bc-line);
  border-left: 6px solid var(--bc-teal-600);
  background: var(--bc-surface);
  border-radius: var(--bc-radius);
  padding: 1.1rem 1.3rem;
}
.callout > :last-child { margin-bottom: 0; }
.callout--warn { border-left-color: var(--bc-amber-500); background: #fffbf2; }
.callout--info { border-left-color: var(--bc-teal-600); background: var(--bc-teal-050); }
.callout__title { font-weight: 800; color: var(--bc-teal-900); margin-bottom: 0.35rem; }

/* ----- Ad slots (the honest business model, labelled clearly) ----------- */
.ad-slot {
  margin-inline: auto;
  max-width: var(--bc-maxw);
  padding-inline: 1.25rem;
}
.ad-slot__frame {
  display: grid;
  place-items: center;
  border: 1px dashed var(--bc-line);
  border-radius: var(--bc-radius);
  background: repeating-linear-gradient(45deg, #f6f8f8, #f6f8f8 12px, #f1f4f4 12px, #f1f4f4 24px);
  color: var(--bc-ink-faint);
  text-align: center;
  min-height: 6.5rem;
  padding: 1rem;
}
.ad-slot__label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--bc-ink-faint);
  margin-bottom: 0.25rem;
}
.ad-slot--in-article { margin-block: 2.25rem; }

/* ----- Timeline --------------------------------------------------------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 0.7rem; top: 0.4rem; bottom: 0.4rem;
  width: 2px; background: var(--bc-line);
}
.timeline li { position: relative; padding-left: 2.25rem; margin-bottom: 1.4rem; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 0.2rem; top: 0.3rem;
  width: 1rem; height: 1rem;
  border-radius: 50%;
  background: var(--bc-teal-600);
  box-shadow: 0 0 0 4px var(--bc-teal-050);
}
.timeline .date { font-weight: 800; color: var(--bc-teal-800); display: block; }

/* ----- FAQ / details ---------------------------------------------------- */
details.faq {
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  background: var(--bc-surface);
  margin-bottom: 0.85rem;
  overflow: hidden;
}
details.faq > summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 1.3rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--bc-teal-900);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after { content: "+"; font-size: 1.5rem; color: var(--bc-teal-600); font-weight: 400; line-height: 1; }
details.faq[open] > summary::after { content: "\2013"; }
details.faq .faq__body { padding: 0 1.3rem 1.2rem; }
details.faq .faq__body > :last-child { margin-bottom: 0; }

/* ----- Footer ----------------------------------------------------------- */
.site-footer {
  background: var(--bc-teal-900);
  color: #d3ecec;
  padding-block: 3rem 2rem;
  margin-top: 3rem;
}
/* .muted (--bc-ink-faint) is tuned for light page surfaces; the footer is
   always dark regardless of theme, so it needs its own light-on-dark muted
   tone rather than inheriting the light-surface one (was ~2.2:1, below AA). */
.site-footer .muted { color: #a9d4d3; }
.site-footer a { color: #d7f0f0; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 42rem) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.footer-disclaimer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.92rem;
  color: #b8d8d8;
}
.footer-disclaimer p { margin-bottom: 0.75rem; }

/* ----- Misc utilities --------------------------------------------------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.dl-clean { margin: 0; }
.dl-clean div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--bc-line-soft); }
.dl-clean dt { color: var(--bc-ink-soft); }
.dl-clean dd { margin: 0; font-weight: 700; color: var(--bc-teal-900); text-align: right; }
.print-hint { display: none; }

/* ----- Charts (inline SVG, dependency-free, accessible) ----------------- */
.bc-chart { margin: 1.75rem 0; max-width: 42rem; }
.bc-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.bc-chart figcaption { font-size: 0.95rem; color: var(--bc-ink-faint); margin-top: 0.75rem; }
.bc-gridline { stroke: var(--bc-line-soft); stroke-width: 1; }
.bc-axis { stroke: var(--bc-line); stroke-width: 1.5; }
.bc-bar { fill: var(--bc-teal-600); }
.bc-bar--prev { fill: var(--bc-teal-800); }
.bc-bar--accent { fill: var(--bc-amber-500); }
.bc-bar--est { fill: var(--bc-teal-500); opacity: 0.5; }
.bc-bar-value { fill: var(--bc-teal-900); font-weight: 800; font-size: 19px; font-family: var(--bc-font-sans); }
.bc-bar-label { fill: var(--bc-ink-soft); font-weight: 700; font-size: 17px; font-family: var(--bc-font-sans); }
.bc-bar-sub { fill: var(--bc-amber-600); font-weight: 700; font-size: 14px; font-family: var(--bc-font-sans); }
@media (prefers-reduced-motion: no-preference) {
  .bc-bar, .bc-flow-seg--keep, .bc-flow-seg--partb { transition: y 0.5s ease, height 0.5s ease, x 0.5s ease, width 0.5s ease; }
}

/* Live COLA "where your raise goes" flow chart */
.bc-flow-track { fill: var(--bc-surface-3); }
.bc-flow-seg--keep { fill: var(--bc-green-700); }
.bc-flow-seg--partb { fill: var(--bc-amber-600); }
.bc-flow-tick { stroke: var(--bc-ink-soft); stroke-width: 2; stroke-dasharray: 3 3; }
.bc-flow-rowlabel { fill: var(--bc-ink-soft); font-weight: 700; font-size: 15px; font-family: var(--bc-font-sans); }
.bc-flow-value { fill: #ffffff; font-weight: 800; font-size: 15px; font-family: var(--bc-font-sans); }
.bc-flow-cap { fill: var(--bc-ink-faint); font-size: 13px; font-family: var(--bc-font-sans); }
.bc-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 0.85rem; font-size: 0.95rem; color: var(--bc-ink-soft); }
.bc-legend span { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; }
.bc-legend i { width: 0.95rem; height: 0.95rem; border-radius: 3px; display: inline-block; flex: none; }
.bc-legend i.keep { background: var(--bc-green-700); }
.bc-legend i.partb { background: var(--bc-amber-600); }

/* ----- Dark mode (opt-in via prefers-color-scheme; light stays primary) - */
/* ======================================================================
   Visual enhancements — icons, hero art, provenance, depth, steps, motion
   Colors route through tokens; dark overrides live in the dark-mode block.
   ====================================================================== */

/* Inline-SVG icon system */
.icon { width: 1.5rem; height: 1.5rem; flex: none; display: inline-block; vertical-align: -0.18em; fill: none; stroke: currentColor; }
.card__icon .icon { width: 1.75rem; height: 1.75rem; }
.btn .icon { width: 1.2rem; height: 1.2rem; }
.card__icon { box-shadow: inset 0 0 0 1px var(--bc-teal-050); }

/* Hero: mesh bg, two-column, focal art, reassurance line */
.hero.section--teal { background: var(--bc-hero-mesh); }
.hero__inner { position: relative; z-index: 1; }
.hero__grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 56rem) { .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: 2.75rem; } }
.hero__art { display: none; }
@media (min-width: 56rem) {
  .hero__art { display: block; }
  .hero__art-svg { width: 100%; height: auto; max-width: 30rem; margin-inline: auto; filter: drop-shadow(0 20px 44px rgba(4, 24, 26, 0.42)); }
}
.cta-reassure { margin: 1rem 0 0; font-weight: 600; color: #e6f5f5; display: inline-flex; align-items: center; gap: 0.5rem; }
.cta-reassure .icon { width: 1.15rem; height: 1.15rem; color: var(--bc-gold); }

/* Result outcome headline (plain-language bottom line before the figures) */
.result__headline { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.65rem); line-height: 1.25; color: var(--bc-teal-900); font-weight: 800; font-variant-numeric: tabular-nums; margin: 0 0 0.9rem; }

/* Data provenance — full band + compact strip */
.provenance { border: 1px solid var(--bc-line); background: var(--bc-surface); border-radius: var(--bc-radius-lg); padding: 1.4rem 1.6rem; box-shadow: var(--bc-shadow-sm); }
.provenance__chips { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin-bottom: 0.9rem; }
.provenance__chip { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--bc-teal-900); font-size: 1rem; }
.provenance__mono { display: inline-grid; place-items: center; min-width: 2.7rem; height: 2.1rem; padding: 0 0.5rem; border-radius: 9px; background: var(--bc-ill-fill); color: var(--bc-teal-800); border: 1px solid var(--bc-teal-050); font-weight: 800; letter-spacing: 0.02em; font-size: 0.92rem; }
.provenance__note { margin: 0; color: var(--bc-ink-soft); }
.datasource { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.85rem; margin: 0 0 1.1rem; font-size: 0.95rem; }
.datasource__fresh { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; color: var(--bc-ink-soft); }
.datasource__fresh .icon { width: 1.05rem; height: 1.05rem; color: var(--bc-teal-600); }

/* Card depth + hover accent bar */
.card--link { position: relative; overflow: hidden; }
.card--link:hover { box-shadow: var(--bc-shadow-lg); }
.card--link::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: linear-gradient(90deg, var(--bc-teal-500), var(--bc-amber-500)); transform: scaleX(0); transform-origin: left; }
@media (prefers-reduced-motion: no-preference) {
  .card--link::before { transition: transform 0.32s var(--bc-reveal-ease); }
  .card--link:hover::before, .card--link:focus-within::before { transform: scaleX(1); }
}

/* Section arc dividers — set color to the NEIGHBOR section's background */
svg.section-divider { display: block; width: 100%; height: 52px; color: var(--bc-surface); }
.section-divider path { fill: currentColor; }

/* Decorative clock-ripple on teal panels */
.section--teal { position: relative; }
.section--teal > .wrap { position: relative; z-index: 1; }
.bc-ripple { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; color: #a5e3e6; overflow: hidden; }
.bc-ripple svg { position: absolute; top: -12%; right: -8%; width: min(70%, 34rem); height: auto; }

/* Numbered steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.steps li { margin: 0; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.step__num { width: 2.75rem; height: 2.75rem; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bc-teal-700); color: #fff; font-weight: 800; font-size: 1.2rem; box-shadow: 0 0 0 4px var(--bc-teal-050); }
.step__title { font-weight: 800; color: var(--bc-teal-900); margin: 0.15rem 0 0.15rem; font-size: 1.12rem; }
.step p { margin: 0; }

/* Scroll-reveal — base fully visible; only JS arms the hidden state */
.reveal--armed { opacity: 0; transform: translateY(14px); }
@media (prefers-reduced-motion: no-preference) {
  .reveal--armed { transition: opacity var(--bc-reveal-dur) var(--bc-reveal-ease), transform var(--bc-reveal-dur) var(--bc-reveal-ease); }
}
.reveal--armed.is-visible { opacity: 1; transform: none; }

/* Header text-size control */
.textsize { display: inline-flex; align-items: center; gap: 0.2rem; }
.textsize__label { font-size: 0.8rem; font-weight: 700; color: var(--bc-ink-faint); margin-right: 0.15rem; }
.textsize__btn { min-width: 2.75rem; min-height: 2.75rem; display: grid; place-items: center; border: 2px solid var(--bc-line); background: var(--bc-surface); color: var(--bc-teal-800); border-radius: 9px; font-weight: 800; cursor: pointer; line-height: 1; }
.textsize__btn:hover { border-color: var(--bc-teal-600); }
.textsize__btn[aria-pressed="true"] { background: var(--bc-teal-700); color: #fff; border-color: var(--bc-teal-700); }
.textsize__btn.s1 { font-size: 0.82rem; } .textsize__btn.s2 { font-size: 1rem; } .textsize__btn.s3 { font-size: 1.18rem; }
@media (max-width: 30rem) { .textsize__label { display: none; } }

@media (prefers-color-scheme: dark) {
  :root {
    --bc-ink: #e9f1ef;
    --bc-ink-soft: #b8c7c4;
    --bc-ink-faint: #90a29e;
    --bc-line: #2b3b39;
    --bc-line-soft: #223230;
    --bc-surface: #14201e;
    --bc-surface-2: #182524;
    --bc-surface-3: #1e2d2b;
    --bc-teal-050: #10302f;
    --bc-bg: #0d1615;
    /* Illustration + depth tokens, dark theme */
    --bc-ill-line: #8fe0e2;
    --bc-ill-fill: #10302f;
    --bc-ill-fill-2: #16403f;
    --bc-ill-accent: #f5c451;
    --bc-ill-paper: #182524;
    --bc-hero-mesh:
      radial-gradient(100% 80% at 85% -10%, rgba(245, 196, 81, 0.10), transparent 55%),
      radial-gradient(90% 70% at 8% 115%, rgba(42, 145, 153, 0.22), transparent 60%),
      linear-gradient(160deg, #0f4b50, #0a2f32);
  }
  body { color: var(--bc-ink); background: var(--bc-bg); }
  h1, h2, h3, h4 { color: #eefaf9; }
  .site-header { background: rgba(13, 22, 21, 0.9); }
  .card, .tool, .callout { background: var(--bc-surface); }
  .btn--primary { background: var(--bc-amber-500); color: #241402; }
  .ad-slot__frame { background: repeating-linear-gradient(45deg, #16211f, #16211f 12px, #1a2725 12px, #1a2725 24px); }
  .callout--warn { background: #241d0f; }

  /* Text that hard-codes dark teal tokens as its COLOR must lighten in dark mode
     (the tokens stay dark where they're used as opaque BACKGROUNDS). WCAG 1.4.3. */
  h1, h2, h3, h4,
  .field > label, .field > .field__label,
  .figure__value,
  .callout__title,
  table.data caption, table.data thead th,
  .timeline .date,
  .dl-clean dd,
  .brand, .brand:hover,
  details.faq > summary,
  .pd-planname { color: #eefaf9; }
  .eyebrow { color: #7fd3d6; }
  .figure__value--good { color: #6ee7a8; }
  .figure__value--bad { color: #fca5a5; }
  .cell-change--up { color: #fca5a5; }
  .cell-change--down { color: #6ee7a8; }
  .badge--info { background: #10302f; color: #8fe0e2; }
  .badge--neutral { background: #1e2d2b; color: #cbd5d1; }
  .primary-nav a[aria-current="page"] { color: #8fe0e2; }
  .card__icon { color: #8fe0e2; }
  .btn--ghost { color: #d7efef; }
  a { color: #7ecbd0; }
  .callout--info a, .card--link .badge { color: #8fe0e2; }
  .bc-bar-value { fill: #eefaf9; }
  .bc-bar-label { fill: #cbd5d1; }
  .bc-bar-sub { fill: #f5c451; }
  .bc-bar { fill: #2a9199; }
  .bc-bar--prev { fill: #1a7a80; }
  .bc-flow-track { fill: #1e2d2b; }
  .bc-flow-seg--keep { fill: #15803d; }
  .bc-flow-rowlabel { fill: #cbd5d1; }
  .bc-flow-cap { fill: #90a29e; }
  .bc-legend { color: #cbd5d1; }
  .bc-legend i.keep { background: #15803d; }
  /* Visual-enhancement components — light foreground on dark surfaces */
  .provenance__chip, .step__title, .result__headline { color: #eefaf9; }
  .provenance__mono { background: #10302f; color: #8fe0e2; border-color: #234a49; }
  .cta-reassure { color: #e6f5f5; }
  .textsize__btn { background: var(--bc-surface); color: #cfeaea; border-color: var(--bc-line); }
  .textsize__btn[aria-pressed="true"] { background: var(--bc-teal-600); color: #fff; border-color: var(--bc-teal-600); }
}

/* ----- Print ------------------------------------------------------------ */
@media print {
  .site-header, .site-footer, .trust-bar, .ad-slot, .hero__cta, .nav-toggle, .btn { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  .print-hint { display: block; }
  .result, .card, .tool { break-inside: avoid; border-color: #999; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #444; }
}
