  /* ============================================================
   CompoundInterestCalc.cc — styles
   Three themes via [data-theme]: sage (light) · bold (light, heavier)
   · midnight (dark). Color tokens are green-anchored (growth).
   ============================================================ */

  :root {
      --font-sans: "Schibsted Grotesk", system-ui, -apple-system, sans-serif;
      --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
      --font-display: var(--font-sans);

      --maxw: 1120px;
      --radius: 16px;
      --radius-sm: 10px;
      --radius-lg: 24px;

      /* accent hue is tweakable; default emerald */
      --brand-h: 158;
  }

  /* ---------- SAGE (default, light) ---------- */
  :root,
  [data-theme="sage"] {
      --bg: #f4f6f1;
      --bg-tint: #eaf0e9;
      --panel: #ffffff;
      --panel-2: #fbfcfa;
      --ink: #0f1f18;
      --ink-soft: #34463d;
      --muted: #61736a;
      --line: #e3e8e0;
      --line-strong: #d2dacf;

      --brand: oklch(0.55 0.11 var(--brand-h));
      --brand-strong: oklch(0.42 0.10 var(--brand-h));
      --brand-bright: oklch(0.66 0.14 var(--brand-h));
      --brand-ink: oklch(0.30 0.07 var(--brand-h));
      --brand-wash: oklch(0.95 0.03 var(--brand-h));
      --on-brand: #ffffff;

      --chart-contrib: #c4d2c7;
      --chart-interest: var(--brand);
      --chart-grid: #e7ece4;

      --hero-bg: transparent;
      --hero-ink: var(--ink);
      --shadow: 0 1px 2px rgba(16, 31, 24, 0.04), 0 10px 30px rgba(16, 31, 24, 0.06);
      --shadow-sm: 0 1px 2px rgba(16, 31, 24, 0.05);
  }

  /* ---------- BOLD (light, bigger display, green hero block) ---------- */
  [data-theme="bold"] {
      --font-display: "Bricolage Grotesque", var(--font-sans);
      --bg: #f6f4ea;
      --bg-tint: #efeede;
      --panel: #ffffff;
      --panel-2: #fcfbf4;
      --ink: #16261d;
      --ink-soft: #38483f;
      --muted: #6a7268;
      --line: #e7e3d4;
      --line-strong: #d8d3c0;

      --brand: oklch(0.50 0.13 var(--brand-h));
      --brand-strong: oklch(0.38 0.11 var(--brand-h));
      --brand-bright: oklch(0.64 0.16 var(--brand-h));
      --brand-ink: oklch(0.26 0.08 var(--brand-h));
      --brand-wash: oklch(0.93 0.04 var(--brand-h));
      --on-brand: #ffffff;

      --chart-contrib: #cdd6bf;
      --chart-interest: var(--brand);
      --chart-grid: #ece8d8;

      --hero-bg: var(--brand-ink);
      --hero-ink: #f3f7ef;
      --shadow: 0 2px 4px rgba(22, 38, 29, 0.05), 0 18px 44px rgba(22, 38, 29, 0.10);
      --shadow-sm: 0 1px 2px rgba(22, 38, 29, 0.06);
  }

  /* ---------- MIDNIGHT (dark) ---------- */
  [data-theme="midnight"] {
      --bg: #0a130f;
      --bg-tint: #0e1a14;
      --panel: #111e18;
      --panel-2: #0e1a14;
      --ink: #e9f3ed;
      --ink-soft: #c2d2c9;
      --muted: #8aa093;
      --line: #1d2c25;
      --line-strong: #28392f;

      --brand: oklch(0.74 0.15 var(--brand-h));
      --brand-strong: oklch(0.66 0.15 var(--brand-h));
      --brand-bright: oklch(0.80 0.16 var(--brand-h));
      --brand-ink: oklch(0.88 0.10 var(--brand-h));
      --brand-wash: oklch(0.26 0.05 var(--brand-h));
      --on-brand: #06140d;

      --chart-contrib: #2f4339;
      --chart-interest: var(--brand);
      --chart-grid: #1a2922;

      --hero-bg: transparent;
      --hero-ink: var(--ink);
      --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.45);
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  }

  /* ============================================================ */
  * {
      box-sizing: border-box;
  }

  html {
      scroll-behavior: smooth;
  }

  body {
      margin: 0;
      font-family: var(--font-sans);
      background: var(--bg);
      color: var(--ink);
      -webkit-font-smoothing: antialiased;
      line-height: 1.5;
      font-size: 17px;
  }

  h1,
  h2,
  h3,
  h4 {
      font-family: var(--font-display);
      margin: 0;
      line-height: 1.08;
      letter-spacing: -0.02em;
      font-weight: 700;
  }

  p {
      margin: 0;
  }

  a {
      color: inherit;
  }

  .wrap {
      max-width: var(--maxw);
      margin: 0 auto;
      padding: 0 24px;
  }

  .eyebrow {
      font-family: var(--font-mono);
      font-size: 12px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--brand-strong);
      font-weight: 500;
  }

  .section-lead {
      color: var(--muted);
      font-size: 19px;
      max-width: 60ch;
      text-wrap: pretty;
  }

  /* ---------- Nav ---------- */
  .nav {
      position: sticky;
      top: 0;
      z-index: 50;
      background: color-mix(in srgb, var(--bg) 82%, transparent);
      backdrop-filter: saturate(1.2) blur(12px);
      border-bottom: 1px solid var(--line);
  }

  .nav-inner {
      display: flex;
      align-items: center;
      gap: 28px;
      height: 64px;
  }

  .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 17px;
      letter-spacing: -0.01em;
      text-decoration: none;
  }

  .brand .mark {
      width: 26px;
      height: 26px;
      border-radius: 8px;
      background: var(--brand);
      position: relative;
      display: grid;
      place-items: center;
      flex: none;
      box-shadow: var(--shadow-sm);
  }

  .brand .mark::before {
      content: "";
      width: 11px;
      height: 11px;
      border: 2.5px solid var(--on-brand);
      border-radius: 3px;
      transform: rotate(45deg);
  }

  .brand b {
      color: var(--brand-strong);
      font-weight: 700;
  }

  .nav-links {
      display: flex;
      gap: 26px;
      margin-left: auto;
  }

  .nav-links a {
      text-decoration: none;
      color: var(--ink-soft);
      font-size: 15px;
      font-weight: 500;
      transition: color .15s;
  }

  .nav-links a:hover {
      color: var(--brand-strong);
  }

  .nav-cta {
      text-decoration: none;
      font-size: 14px;
      font-weight: 600;
      padding: 9px 16px;
      white-space: nowrap;
      border-radius: 999px;
      background: var(--brand);
      color: var(--on-brand);
      box-shadow: var(--shadow-sm);
  }

  @media (max-width: 860px) {
      .nav-links {
          display: none;
      }
  }

  /* ---------- Hero ---------- */
  .hero {
      padding: 56px 0 12px;
  }

  [data-theme="bold"] .hero {
      background: var(--hero-bg);
      color: var(--hero-ink);
      padding: 64px 0 88px;
      margin-bottom: -64px;
  }

  [data-theme="bold"] .hero .eyebrow {
      color: var(--brand-bright);
  }

  [data-theme="bold"] .hero .hero-sub {
      color: color-mix(in srgb, var(--hero-ink) 80%, transparent);
  }

  .hero h1 {
      font-size: clamp(34px, 5.2vw, 62px);
      max-width: 16ch;
      margin-top: 14px;
  }

  [data-theme="bold"] .hero h1 {
      font-size: clamp(36px, 5.6vw, 70px);
  }

  .hero-sub {
      font-size: 20px;
      color: var(--muted);
      max-width: 52ch;
      margin-top: 18px;
      text-wrap: pretty;
  }

  .hero-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 22px;
  }

  .hero-chips span {
      font-size: 13px;
      font-weight: 500;
      color: var(--ink-soft);
      background: var(--panel);
      border: 1px solid var(--line);
      padding: 7px 13px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      gap: 7px;
  }

  [data-theme="bold"] .hero-chips span {
      background: color-mix(in srgb, var(--hero-ink) 10%, transparent);
      border-color: color-mix(in srgb, var(--hero-ink) 22%, transparent);
      color: var(--hero-ink);
  }

  .hero-chips .dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--brand-bright);
  }

  /* ---------- Calculator ---------- */
  .calc-shell {
      padding: 22px 0 8px;
      position: relative;
      z-index: 2;
  }

  .calc {
      display: grid;
      grid-template-columns: 1.02fr 1.18fr;
      gap: 0;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      overflow: hidden;
  }

  .calc-inputs {
      padding: 30px 30px 34px;
      border-right: 1px solid var(--line);
  }

  .calc-results {
      padding: 30px 30px 32px;
      background: var(--panel-2);
  }

  .calc-title {
      font-size: 13px;
      font-family: var(--font-mono);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 22px;
      display: flex;
      align-items: center;
      gap: 8px;
  }

  .calc-title::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 2px;
      background: var(--brand);
      transform: rotate(45deg);
  }

  .field {
      margin-bottom: 20px;
  }

  .field>label {
      display: block;
      font-size: 14px;
      font-weight: 600;
      color: var(--ink-soft);
      margin-bottom: 8px;
  }

  .field .hint {
      font-weight: 400;
      color: var(--muted);
      font-size: 12.5px;
  }

  .input-money {
      position: relative;
      display: flex;
      align-items: center;
  }

  .input-money .pre {
      position: absolute;
      left: 14px;
      color: var(--muted);
      font-weight: 600;
      font-size: 16px;
      pointer-events: none;
  }

  .input-money .post {
      position: absolute;
      right: 14px;
      color: var(--muted);
      font-weight: 600;
      font-size: 15px;
      pointer-events: none;
  }

  input[type="text"],
  input[type="number"] {
      width: 100%;
      font-family: var(--font-sans);
      font-size: 17px;
      font-weight: 600;
      color: var(--ink);
      background: var(--panel);
      border: 1.5px solid var(--line-strong);
      border-radius: var(--radius-sm);
      padding: 12px 14px 12px 28px;
      outline: none;
      transition: border-color .15s, box-shadow .15s;
      font-variant-numeric: tabular-nums;
  }

  .input-money input {
      padding-left: 28px;
  }

  .field.pct input {
      padding-left: 14px;
      padding-right: 34px;
  }

  input:focus {
      border-color: var(--brand);
      box-shadow: 0 0 0 3px var(--brand-wash);
  }

  .seg {
      display: inline-flex;
      background: var(--bg-tint);
      border-radius: 999px;
      padding: 3px;
      gap: 2px;
  }

  .seg button {
      font-family: var(--font-sans);
      font-size: 13.5px;
      font-weight: 600;
      color: var(--muted);
      border: none;
      background: transparent;
      padding: 7px 14px;
      border-radius: 999px;
      cursor: pointer;
      transition: all .15s;
  }

  .seg button[aria-pressed="true"] {
      background: var(--panel);
      color: var(--brand-strong);
      box-shadow: var(--shadow-sm);
  }

  .field-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
  }

  /* slider */
  .slider-wrap {
      margin-top: 4px;
  }

  .slider-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      margin-bottom: 6px;
  }

  .slider-val {
      font-family: var(--font-mono);
      font-weight: 600;
      font-size: 15px;
      color: var(--brand-strong);
  }

  input[type="range"] {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      height: 6px;
      border-radius: 999px;
      background: linear-gradient(to right, var(--brand) var(--p, 40%), var(--line-strong) var(--p, 40%));
      outline: none;
      cursor: pointer;
  }

  input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: var(--panel);
      border: 2.5px solid var(--brand);
      box-shadow: var(--shadow-sm);
      cursor: pointer;
      transition: transform .1s;
  }

  input[type="range"]::-webkit-slider-thumb:active {
      transform: scale(1.12);
  }

  input[type="range"]::-moz-range-thumb {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: var(--panel);
      border: 2.5px solid var(--brand);
      cursor: pointer;
  }

  /* advanced */
  .advanced {
      margin-top: 6px;
      border-top: 1px solid var(--line);
      padding-top: 14px;
  }

  .advanced summary {
      list-style: none;
      cursor: pointer;
      font-size: 13.5px;
      font-weight: 600;
      color: var(--brand-strong);
      display: flex;
      align-items: center;
      gap: 7px;
      user-select: none;
  }

  .advanced summary::-webkit-details-marker {
      display: none;
  }

  .advanced summary .chev {
      transition: transform .2s;
      font-size: 11px;
  }

  .advanced[open] summary .chev {
      transform: rotate(90deg);
  }

  .advanced-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-top: 16px;
  }

  /* results */
  .result-main {
      margin-bottom: 4px;
  }

  .result-label {
      font-size: 13.5px;
      font-weight: 600;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 7px;
  }

  .result-value {
      font-family: var(--font-display);
      font-size: clamp(38px, 5vw, 52px);
      font-weight: 700;
      letter-spacing: -0.03em;
      color: var(--ink);
      margin-top: 4px;
      font-variant-numeric: tabular-nums;
      line-height: 1;
  }

  .result-value .cents {
      color: var(--muted);
      font-size: 0.5em;
      font-weight: 600;
  }

  .result-sub {
      font-size: 14px;
      color: var(--muted);
      margin-top: 8px;
  }

  .result-sub b {
      color: var(--brand-strong);
      font-weight: 600;
  }

  .stats {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1px;
      background: var(--line);
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      overflow: hidden;
      margin: 20px 0;
  }

  .stat {
      background: var(--panel);
      padding: 14px 16px;
  }

  .stat .k {
      font-size: 12px;
      color: var(--muted);
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 6px;
  }

  .stat .k .swatch {
      width: 9px;
      height: 9px;
      border-radius: 3px;
      flex: none;
  }

  .stat .v {
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 700;
      margin-top: 4px;
      letter-spacing: -0.02em;
      font-variant-numeric: tabular-nums;
  }

  /* chart */
  .chart-card {
      margin-top: 4px;
  }

  .chart-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
  }

  .chart-head .t {
      font-size: 13px;
      font-weight: 600;
      color: var(--ink-soft);
      white-space: nowrap;
  }

  .legend {
      display: flex;
      gap: 14px;
  }

  .legend span {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: var(--muted);
      font-weight: 500;
  }

  .legend i {
      width: 11px;
      height: 11px;
      border-radius: 3px;
  }

  .chart-box {
      position: relative;
      width: 100%;
  }

  .chart-box svg {
      width: 100%;
      height: auto;
      display: block;
      overflow: visible;
  }

  .tip {
      position: absolute;
      pointer-events: none;
      opacity: 0;
      transform: translate(-50%, -100%);
      transition: opacity .12s;
      background: var(--ink);
      color: var(--bg);
      padding: 9px 11px;
      border-radius: 10px;
      font-size: 12px;
      white-space: nowrap;
      box-shadow: var(--shadow);
      z-index: 5;
  }

  .tip .ty {
      font-family: var(--font-mono);
      font-size: 10px;
      opacity: .7;
      text-transform: uppercase;
      letter-spacing: .08em;
  }

  .tip .tv {
      font-weight: 700;
      font-size: 14px;
      margin-top: 2px;
      font-variant-numeric: tabular-nums;
  }

  .tip .tr {
      font-size: 11px;
      margin-top: 3px;
      display: flex;
      align-items: center;
      gap: 5px;
  }

  .tip .tr i {
      width: 8px;
      height: 8px;
      border-radius: 2px;
  }

  /* table */
  .table-toggle {
      margin-top: 18px;
  }

  .table-toggle summary {
      list-style: none;
      cursor: pointer;
      font-size: 13.5px;
      font-weight: 600;
      color: var(--brand-strong);
      display: inline-flex;
      align-items: center;
      gap: 7px;
  }

  .table-toggle summary::-webkit-details-marker {
      display: none;
  }

  .year-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 14px;
      font-size: 13.5px;
      font-variant-numeric: tabular-nums;
  }

  .year-table th {
      text-align: right;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: .06em;
      color: var(--muted);
      font-weight: 600;
      padding: 8px 10px;
      border-bottom: 1.5px solid var(--line-strong);
  }

  .year-table th:first-child,
  .year-table td:first-child {
      text-align: left;
  }

  .year-table td {
      padding: 9px 10px;
      border-bottom: 1px solid var(--line);
      color: var(--ink-soft);
  }

  .year-table tbody tr:hover {
      background: var(--bg-tint);
  }

  .year-table td.bal {
      font-weight: 700;
      color: var(--ink);
  }

  @media (max-width: 880px) {
      .calc {
          grid-template-columns: 1fr;
      }

      .calc-inputs {
          border-right: none;
          border-bottom: 1px solid var(--line);
      }
  }

  /* ---------- generic section ---------- */
  section.block {
      padding: 76px 0;
  }

  .block-head {
      max-width: 64ch;
      margin-bottom: 40px;
  }

  .block-head h2 {
      font-size: clamp(28px, 3.6vw, 42px);
      margin-top: 12px;
  }

  .block-head p {
      margin-top: 16px;
  }

  .alt {
      background: var(--bg-tint);
  }

  /* feature cards */
  .cards {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 18px;
  }

  .card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 26px;
      box-shadow: var(--shadow-sm);
  }

  .card .ic {
      width: 40px;
      height: 40px;
      border-radius: 11px;
      background: var(--brand-wash);
      display: grid;
      place-items: center;
      margin-bottom: 16px;
  }

  .card .ic .g {
      width: 16px;
      height: 16px;
      border-radius: 4px;
      background: var(--brand);
  }

  .card h3 {
      font-size: 19px;
      margin-bottom: 8px;
  }

  .card p {
      color: var(--muted);
      font-size: 15px;
  }

  @media (max-width: 760px) {
      .cards {
          grid-template-columns: 1fr;
      }
  }

  /* formula */
  .formula-box {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 40px;
      box-shadow: var(--shadow-sm);
      text-align: center;
  }

  .formula {
      font-family: var(--font-mono);
      font-size: clamp(26px, 4vw, 40px);
      font-weight: 500;
      color: var(--ink);
      letter-spacing: -0.01em;
  }

  .formula .v {
      color: var(--brand-strong);
  }

  .legend-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 14px 40px;
      margin-top: 34px;
      text-align: left;
      max-width: 720px;
      margin-left: auto;
      margin-right: auto;
  }

  .legend-grid .li {
      display: flex;
      gap: 14px;
      align-items: baseline;
  }

  .legend-grid .sym {
      font-family: var(--font-mono);
      font-size: 20px;
      font-weight: 700;
      color: var(--brand-strong);
      width: 28px;
      flex: none;
  }

  .legend-grid .def b {
      font-weight: 600;
  }

  .legend-grid .def span {
      color: var(--muted);
      font-size: 14.5px;
      display: block;
  }

  @media (max-width: 680px) {
      .legend-grid {
          grid-template-columns: 1fr;
      }
  }

  /* compare two col */
  .two-col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 18px;
  }

  .compare-card {
      border-radius: var(--radius);
      padding: 28px;
      border: 1px solid var(--line);
  }

  .compare-card.simple {
      background: var(--panel);
  }

  .compare-card.compound {
      background: var(--brand-ink);
      color: var(--on-brand);
      border-color: transparent;
  }

  .compare-card h3 {
      font-size: 17px;
      opacity: .9;
  }

  .compare-card .big {
      font-family: var(--font-display);
      font-size: clamp(30px, 4.4vw, 46px);
      font-weight: 700;
      letter-spacing: -0.03em;
      margin: 10px 0 4px;
      font-variant-numeric: tabular-nums;
  }

  .compare-card.compound .big {
      color: var(--brand-bright);
  }

  .compare-card .meta {
      font-size: 14px;
      opacity: .75;
  }

  .compare-card ul {
      list-style: none;
      padding: 0;
      margin: 18px 0 0;
  }

  .compare-card li {
      font-size: 14.5px;
      padding: 7px 0;
      border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
      display: flex;
      justify-content: space-between;
  }

  @media (max-width: 680px) {
      .two-col {
          grid-template-columns: 1fr;
      }
  }

  /* early start */
  .early {
      display: grid;
      grid-template-columns: 1.1fr 1fr;
      gap: 40px;
      align-items: center;
  }

  .early-vis {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 28px;
      box-shadow: var(--shadow-sm);
  }

  .bar-row {
      display: flex;
      align-items: center;
      gap: 14px;
      margin: 18px 0;
  }

  .bar-row .nm {
      width: 96px;
      flex: none;
      font-size: 13.5px;
      font-weight: 600;
  }

  .bar-row .nm span {
      display: block;
      color: var(--muted);
      font-weight: 400;
      font-size: 12px;
  }

  .bar-track {
      flex: 1;
      height: 30px;
      background: var(--bg-tint);
      border-radius: 8px;
      overflow: hidden;
      position: relative;
  }

  .bar-fill {
      height: 100%;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding-right: 10px;
      font-family: var(--font-mono);
      font-size: 12.5px;
      font-weight: 600;
      color: var(--on-brand);
  }

  .bar-fill.a {
      background: var(--brand);
  }

  .bar-fill.b {
      background: var(--chart-contrib);
      color: var(--ink);
  }

  @media (max-width: 820px) {
      .early {
          grid-template-columns: 1fr;
          gap: 28px;
      }
  }

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

  .ex-card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
      display: flex;
      flex-direction: column;
  }

  .ex-top {
      padding: 22px 22px 18px;
      border-bottom: 1px solid var(--line);
  }

  .ex-tag {
      font-family: var(--font-mono);
      font-size: 11px;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: var(--brand-strong);
  }

  .ex-card h3 {
      font-size: 18px;
      margin: 8px 0 6px;
  }

  .ex-card .params {
      font-size: 13px;
      color: var(--muted);
  }

  .ex-bot {
      padding: 20px 22px 22px;
      margin-top: auto;
  }

  .ex-bot .res-k {
      font-size: 12px;
      color: var(--muted);
      font-weight: 500;
  }

  .ex-bot .res-v {
      font-family: var(--font-display);
      font-size: 30px;
      font-weight: 700;
      letter-spacing: -0.02em;
      margin: 2px 0 4px;
      color: var(--ink);
      font-variant-numeric: tabular-nums;
  }

  .ex-bot .res-v .pls {
      color: var(--brand-strong);
  }

  .try-btn {
      margin-top: 14px;
      width: 100%;
      font-family: var(--font-sans);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      background: var(--brand-wash);
      color: var(--brand-strong);
      border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
      padding: 10px;
      border-radius: var(--radius-sm);
      transition: all .15s;
  }

  .try-btn:hover {
      background: var(--brand);
      color: var(--on-brand);
  }

  @media (max-width: 820px) {
      .examples {
          grid-template-columns: 1fr;
      }
  }

  /* SEO content blocks (shared across calculator pages) */
  .formula {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 26px 28px;
      margin: 8px 0 6px;
      box-shadow: var(--shadow-sm);
  }

  .formula .eq {
      font-family: var(--font-mono);
      font-size: clamp(16px, 2.3vw, 22px);
      font-weight: 500;
      color: var(--ink);
      text-align: center;
      letter-spacing: -0.01em;
      line-height: 1.6;
  }

  .formula .eq b {
      color: var(--brand-strong);
      font-weight: 700;
  }

  .formula .eq .op {
      color: var(--muted);
  }

  .formula .note {
      font-size: 14px;
      color: var(--muted);
      text-align: center;
      margin-top: 12px;
      line-height: 1.6;
  }

  .formula+.formula {
      margin-top: 16px;
  }

  .two-col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 22px;
      margin-top: 10px;
  }

  .mini-card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 22px 24px;
      box-shadow: var(--shadow-sm);
  }

  .mini-card h3 {
      font-size: 17px;
      margin: 0 0 12px;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
  }

  .mini-card h3 .tag {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 999px;
  }

  .mini-card h3 .tag.pos {
      background: var(--brand-wash);
      color: var(--brand-strong);
  }

  .mini-card h3 .tag.neg {
      background: #fbe9e7;
      color: #c0392b;
  }

  .mini-card ul {
      list-style: none;
      padding: 0;
      margin: 0;
  }

  .mini-card li {
      font-size: 14.5px;
      color: var(--ink-soft);
      padding: 7px 0 7px 22px;
      position: relative;
      line-height: 1.5;
      border-top: 1px solid var(--line);
  }

  .mini-card li:first-child {
      border-top: none;
  }

  .mini-card li::before {
      content: "";
      position: absolute;
      left: 4px;
      top: 15px;
      width: 7px;
      height: 7px;
      border-radius: 2px;
      transform: rotate(45deg);
      background: var(--brand);
  }

  .mini-card.neg li::before {
      background: #c0392b;
  }

  .worked {
      background: var(--bg-tint);
      border-radius: var(--radius-sm);
      padding: 18px 20px;
      margin-top: 18px;
      font-size: 14.5px;
      color: var(--ink-soft);
      line-height: 1.7;
  }

  .worked b {
      color: var(--ink);
      font-weight: 700;
  }

  .worked .res {
      color: var(--brand-strong);
  }

  @media (max-width: 720px) {
      .two-col {
          grid-template-columns: 1fr;
      }
  }

  /* faq */
  .faq {
      max-width: 800px;
  }

  .faq details {
      border-bottom: 1px solid var(--line);
  }

  .faq summary {
      list-style: none;
      cursor: pointer;
      padding: 22px 0;
      font-size: 18px;
      font-weight: 600;
      color: var(--ink);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
  }

  .faq summary::-webkit-details-marker {
      display: none;
  }

  .faq summary .pm {
      width: 22px;
      height: 22px;
      flex: none;
      position: relative;
  }

  .faq summary .pm::before,
  .faq summary .pm::after {
      content: "";
      position: absolute;
      background: var(--brand-strong);
      border-radius: 2px;
      transition: transform .2s;
  }

  .faq summary .pm::before {
      width: 14px;
      height: 2.2px;
      top: 10px;
      left: 4px;
  }

  .faq summary .pm::after {
      width: 2.2px;
      height: 14px;
      top: 4px;
      left: 10px;
  }

  .faq details[open] summary .pm::after {
      transform: rotate(90deg);
      opacity: 0;
  }

  .faq .ans {
      padding: 0 0 24px;
      color: var(--muted);
      font-size: 16px;
      max-width: 68ch;
      text-wrap: pretty;
  }

  /* footer */
  footer {
      background: var(--brand-ink);
      color: color-mix(in srgb, var(--on-brand) 78%, transparent);
      padding: 56px 0 36px;
  }

  [data-theme="midnight"] footer {
      background: var(--panel-2);
      border-top: 1px solid var(--line);
  }

  .foot-top {
      display: flex;
      justify-content: space-between;
      gap: 40px;
      flex-wrap: wrap;
      align-items: flex-start;
  }

  .foot-brand {
      max-width: 34ch;
  }

  .foot-brand .brand {
      color: var(--on-brand);
      margin-bottom: 12px;
  }

  [data-theme="midnight"] .foot-brand .brand {
      color: var(--ink);
  }

  .foot-brand .brand b {
      color: var(--brand-bright);
  }

  .foot-brand p {
      font-size: 14px;
      line-height: 1.6;
  }

  .foot-cols {
      display: flex;
      gap: 56px;
  }

  .foot-col h4 {
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: .1em;
      opacity: .6;
      margin-bottom: 14px;
      font-family: var(--font-mono);
      font-weight: 500;
  }

  .foot-col a {
      display: block;
      text-decoration: none;
      font-size: 14.5px;
      padding: 5px 0;
      opacity: .85;
  }

  .foot-col a:hover {
      opacity: 1;
      color: var(--brand-bright);
  }

  .foot-bottom {
      margin-top: 44px;
      padding-top: 24px;
      border-top: 1px solid color-mix(in srgb, var(--on-brand) 16%, transparent);
      display: flex;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
      font-size: 13px;
      opacity: .7;
  }

  [data-theme="midnight"] .foot-bottom {
      border-color: var(--line);
  }

  .disclaimer {
      font-size: 12.5px;
      opacity: .65;
      margin-top: 14px;
      max-width: 70ch;
      line-height: 1.55;
  }

  @media (max-width: 680px) {
      body {
          font-size: 16px;
      }

      .foot-cols {
          gap: 32px;
      }

      section.block {
          padding: 56px 0;
      }
  }

  .article-wrap {
      max-width: 720px;
      margin: 0 auto;
      padding: 0 24px;
  }

  .article-head {
      padding: 52px 0 0;
  }

  .back-link {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      text-decoration: none;
      color: var(--muted);
      font-size: 14px;
      font-weight: 500;
      margin-bottom: 28px;
      transition: color .15s;
  }

  .back-link:hover {
      color: var(--brand-strong);
  }

  .article-meta {
      display: flex;
      align-items: center;
      gap: 14px;
      font-size: 13.5px;
      color: var(--muted);
      margin-bottom: 18px;
  }

  .article-meta .tag {
      font-family: var(--font-mono);
      font-size: 11px;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: var(--brand-strong);
      background: var(--brand-wash);
      padding: 5px 10px;
      border-radius: 999px;
  }

  .article-meta .dot {
      width: 3px;
      height: 3px;
      border-radius: 50%;
      background: var(--line-strong);
  }

  .article-head h1 {
      font-size: clamp(32px, 4.6vw, 50px);
      line-height: 1.1;
      margin-bottom: 20px;
      text-wrap: balance;
  }

  .article-standfirst {
      font-size: 20px;
      color: var(--muted);
      line-height: 1.55;
      text-wrap: pretty;
  }

  .byline {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 28px 0 0;
      padding: 20px 0;
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
  }

  .byline .av {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: var(--brand);
      color: var(--on-brand);
      display: grid;
      place-items: center;
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 17px;
      flex: none;
  }

  .byline .who b {
      display: block;
      font-size: 14.5px;
  }

  .byline .who span {
      font-size: 13px;
      color: var(--muted);
  }

  .article-body {
      padding: 38px 0 20px;
  }

  .article-body p {
      font-size: 18.5px;
      line-height: 1.7;
      color: var(--ink-soft);
      margin-bottom: 24px;
      text-wrap: pretty;
  }

  .article-body h2 {
      font-size: 28px;
      margin: 44px 0 18px;
      letter-spacing: -0.02em;
  }

  .article-body h3 {
      font-size: 21px;
      margin: 32px 0 12px;
  }

  .article-body b,
  .article-body strong {
      color: var(--ink);
      font-weight: 600;
  }

  .article-body a {
      color: var(--brand-strong);
      text-underline-offset: 3px;
  }

  .article-body ul {
      margin: 0 0 24px;
      padding-left: 24px;
  }

  .article-body li {
      font-size: 18.5px;
      line-height: 1.65;
      color: var(--ink-soft);
      margin-bottom: 10px;
  }

  .article-body li::marker {
      color: var(--brand);
  }

  .pull {
      font-family: var(--font-display);
      font-size: clamp(24px, 3.2vw, 30px);
      line-height: 1.3;
      font-weight: 600;
      color: var(--ink);
      border-left: 3px solid var(--brand);
      padding: 6px 0 6px 24px;
      margin: 36px 0;
      letter-spacing: -0.01em;
  }

  .note-box {
      background: var(--bg-tint);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 26px 28px;
      margin: 32px 0;
  }

  .note-box h4 {
      font-size: 16px;
      margin-bottom: 8px;
  }

  .note-box p {
      font-size: 16px;
      margin: 0;
      color: var(--muted);
  }

  .article-cta {
      background: var(--brand-ink);
      color: var(--on-brand);
      border-radius: var(--radius-lg);
      padding: 40px;
      text-align: center;
      margin: 44px 0 12px;
  }

  .article-cta h3 {
      color: var(--on-brand);
      font-size: 24px;
      margin-bottom: 10px;
  }

  .article-cta p {
      color: color-mix(in srgb, var(--on-brand) 80%, transparent);
      font-size: 16px;
      margin: 0 auto 22px;
      max-width: 44ch;
  }

  .article-cta .btn {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      text-decoration: none;
      background: var(--brand-bright);
      color: var(--brand-ink);
      font-weight: 700;
      font-size: 16px;
      padding: 13px 26px;
      border-radius: 999px;
      transition: transform .12s;
  }

  .article-cta .btn:hover {
      transform: translateY(-2px);
  }

  .article-foot-note {
      font-size: 13.5px;
      color: var(--muted);
      font-style: italic;
      padding: 24px 0 8px;
      border-top: 1px solid var(--line);
  }