:root {
  --ink: #14201E;
  --body: #3F4D4A;
  --muted: #4E5B58;
  --navy: #0E2A3F;
  --orange: #C9471A;
  --blue: #2D6E9E;
  --grey: #F1F5F7;
  --line: #D5DEE2;
  --chip-line: #B7C4CB;
  --display: 'Space Grotesk', Inter, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, Helvetica, Arial, sans-serif; color: var(--ink); background: #FFFFFF; line-height: 1.5; }
p, h1, h2, h3, h4, figure { margin: 0; }
a { color: #1F5C88; }
a:hover { color: var(--navy); }
img, svg, canvas { max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }
.stack-xl { display: flex; flex-direction: column; gap: 48px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row--gap-lg { gap: 16px 32px; }
.intro { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }

.hero { background: var(--navy); color: #FFFFFF; padding: 88px 24px 96px; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 8vw, 4.5rem); line-height: 1.02; letter-spacing: -0.02em; max-width: 900px; }
.lede { font-size: clamp(1.125rem, 2.4vw, 1.375rem); color: #D6E4EE; max-width: 760px; }
.hero .row { gap: 12px; margin-top: 8px; }
.pill { text-decoration: none; font-weight: 600; font-size: 16px; padding: 12px 20px; border-radius: 999px; }
.pill--solid { color: var(--navy); background: #FFFFFF; }
.pill--solid:hover { color: var(--navy); background: #DCEAF4; }
.pill--ghost { color: #FFFFFF; border: 1px solid #5F86A3; padding: 11px 19px; }
.pill--ghost:hover { color: #FFFFFF; background: #1B3F5A; }

.kicker { font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
.kicker--light { color: #9FC3DD; }
h2 { font-family: var(--display); font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.1; letter-spacing: -0.01em; }
.h2-sm { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h3 { font-size: 1.375rem; font-weight: 700; }
h4 { font-size: 1.0625rem; font-weight: 700; }
.big { font-size: 1.125rem; color: var(--body); }
.body { color: var(--body); }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.small { font-size: 14px; color: var(--muted); }
.note { font-size: 13px; color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stat { font-family: var(--display); font-weight: 700; font-size: clamp(2.25rem, 5vw, 3rem); line-height: 1; color: var(--navy); }
.stat--md { font-size: 2.5rem; }

.band { padding: 88px 24px; }
.band--grey { background: var(--grey); }

.map-figure { display: flex; flex-direction: column; gap: 12px; }
.map-figure img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--line); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 14px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 8px; }
.sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; flex: none; }
.ln { width: 18px; height: 0; display: inline-block; flex: none; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card { background: #FFFFFF; border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.card--soft { background: var(--grey); gap: 8px; }
.card--soft h3 { font-size: 1.25rem; }
.card--soft p { color: var(--body); }
.card--line { border: 1px solid var(--line); gap: 8px; }

.tool { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
#mix { gap: 24px; }
.tool-head { display: flex; flex-direction: column; gap: 4px; max-width: 760px; }
.tool-head p { color: var(--body); }
.tool-head--split { max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 16px; }
.tool-head--split > div { display: flex; flex-direction: column; gap: 4px; max-width: 620px; }

.chip { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer; border: 1px solid var(--chip-line); background: #FFFFFF; color: var(--ink); }
.chip--square { border-radius: 8px; padding: 0 14px; }
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); color: #FFFFFF; border-color: var(--navy); }
.chip:focus-visible, .toggle button:focus-visible, .zoom button:focus-visible { outline: 3px solid #E07B3C; outline-offset: 2px; }

/* Heat map */
.hm-body { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.hm-map { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.hm-canvas-wrap { position: relative; }
.hm-canvas-wrap canvas { width: 100%; height: auto; display: block; border-radius: 8px; background: #D7E6F0; touch-action: none; cursor: crosshair; }
.zoom { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; }
.zoom button { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--chip-line); background: #FFFFFF; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.legend.small { font-size: 13px; gap: 8px 16px; }
.ramp { flex: 1 1 220px; max-width: 360px; display: flex; flex-direction: column; gap: 4px; }
.ramp-bar { height: 12px; border-radius: 3px; background: linear-gradient(90deg, rgba(251,227,208,0.15), #F5B98C 33%, #E57C3D 66%, #B33A12 92%, #7A2508); }
.ramp-labels { display: flex; justify-content: space-between; }
.hm-readout { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; background: var(--grey); border-radius: 12px; padding: 20px; }
.hm-amount { font-size: 2.25rem; line-height: 1.05; }
.hm-field { color: var(--body); }

/* Compare */
.cmp-map { width: 100%; height: auto; display: block; background: #D7E6F0; border-radius: 8px; touch-action: none; cursor: grab; }
.cmp-map.dragging { cursor: grabbing; }

/* Growth */
.gr-chart { width: 100%; height: auto; display: block; }
.scroll-x { overflow-x: auto; }
.gr-table { border-collapse: collapse; font-size: 14px; min-width: 520px; width: 100%; font-variant-numeric: tabular-nums; }
.gr-table th { padding: 8px 12px; font-weight: 600; color: var(--muted); text-align: right; }
.gr-table td { padding: 8px 12px; text-align: right; border-top: 1px solid #E2E9ED; }
.gr-table th:first-child, .gr-table td:first-child { text-align: left; padding-left: 0; font-weight: 600; }
.gr-table th:last-child, .gr-table td:last-child { padding-right: 0; }
.gr-table tr.on td { background: #FBEDE4; }

/* Mix */
.toggle { display: flex; padding: 4px; gap: 4px; background: #E2E9ED; border-radius: 999px; }
.toggle button { font: inherit; font-size: 15px; font-weight: 600; min-height: 44px; min-width: 120px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer; background: transparent; color: var(--ink); }
.toggle button[aria-pressed="true"] { background: var(--navy); color: #FFFFFF; }
.mix-bar { display: flex; height: 64px; border-radius: 6px; overflow: hidden; gap: 2px; }
.mix-bar div { min-width: 3px; display: flex; align-items: center; font-weight: 600; overflow: hidden; white-space: nowrap; transition: width 0.4s ease; }
.mix-sizes { display: flex; flex-direction: column; gap: 12px; }
.sizerow { display: grid; grid-template-columns: 130px minmax(0, 1fr) 64px; align-items: center; gap: 12px; }
.sizerow .track { height: 26px; background: #EEF2F4; border-radius: 4px; }
.sizerow .fill { height: 26px; background: var(--navy); border-radius: 4px; min-width: 3px; transition: width 0.4s ease; }
.sizerow span:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.callout { background: var(--grey); border-radius: 10px; padding: 16px 20px; font-size: 1.0625rem; }

/* Language bars */
.bars { display: flex; flex-direction: column; gap: 10px; }
.barrow { display: grid; grid-template-columns: 84px minmax(0, 1fr) 44px; align-items: center; gap: 12px; }
.barrow .track { height: 22px; }
.barrow .fill { height: 22px; background: var(--blue); border-radius: 3px; }
.barrow span:last-child { text-align: right; }

.footer { padding: 48px 24px 64px; background: var(--navy); color: #C4D6E3; font-size: 14px; }
.footer a { color: #FFFFFF; }
.footer .strong { color: #FFFFFF; }

@media (max-width: 600px) {
  .hero, .band { padding-top: 56px; padding-bottom: 56px; }
  .hero, .band, .footer { padding-left: 16px; padding-right: 16px; }
  .tool { padding: 16px; }
  .card { padding: 20px; }
  .sizerow { grid-template-columns: 96px minmax(0, 1fr) 56px; gap: 8px; font-size: 14px; }
  .toggle button { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mix-bar div, .sizerow .fill { transition: none; }
}
