:root {
  color-scheme: light;
  --ink: #182321;
  --muted: #65716e;
  --paper: #f4f2ea;
  --surface: #fffdf7;
  --line: #d7d4c9;
  --critical-strong: #a91d2d;
  --critical: #e24a4a;
  --neutral: #2187c7;
  --supportive: #35c96f;
  --supportive-strong: #009b4d;
  --accent: #236b66;
  --mono: "IBM Plex Mono", monospace;
  --sans: "IBM Plex Sans", sans-serif;
  --serif: "Newsreader", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); letter-spacing: 0; }
a { color: inherit; }
button, select { font: inherit; letter-spacing: 0; }
.site-bar { position: sticky; top: 0; z-index: 20; min-height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 10px max(24px, 3vw); background: rgba(255, 253, 247, .95); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.author { display: flex; align-items: center; gap: 10px; width: max-content; text-decoration: none; }
.author img { border-radius: 50%; object-fit: cover; }
.author span { display: grid; }
.author strong { font: 600 17px/1.1 var(--serif); }
.author small, .site-bar__label { color: var(--muted); font: 11px/1.4 var(--mono); }
.site-bar__back { justify-self: end; font-size: 13px; font-weight: 600; text-underline-offset: 4px; }
main { max-width: 1440px; margin: 0 auto; background: var(--surface); border-inline: 1px solid var(--line); }
.hero { min-height: calc(100vh - 68px); display: grid; align-content: center; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 36px 70px; padding: clamp(64px, 9vw, 130px) clamp(28px, 7vw, 104px); border-bottom: 1px solid var(--ink); background-image: linear-gradient(rgba(24, 35, 33, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(24, 35, 33, .035) 1px, transparent 1px); background-size: 34px 34px; }
.eyebrow { margin: 0 0 16px; color: var(--accent); font: 500 11px/1.3 var(--mono); text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: 0; }
h1 { grid-column: 1 / -1; max-width: 1100px; font-size: clamp(50px, 7vw, 96px); line-height: .94; text-wrap: balance; }
.hero__lede { max-width: 760px; margin: 0; font: 500 clamp(20px, 2.2vw, 29px)/1.45 var(--serif); }
.hero__answer { align-self: start; padding-top: 4px; border-top: 3px solid var(--accent); }
.hero__answer span { display: block; margin: 14px 0 8px; color: var(--muted); font: 10px/1.3 var(--mono); text-transform: uppercase; }
.hero__answer strong { font: 600 24px/1.12 var(--serif); }
.hero__answer p { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.band { padding: clamp(58px, 7vw, 100px) clamp(28px, 7vw, 104px); border-bottom: 1px solid var(--line); }
.finding { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 70px; background: var(--ink); color: #f5f5ef; }
h2 { max-width: 850px; font-size: clamp(38px, 5vw, 66px); line-height: 1; text-wrap: balance; }
.finding .eyebrow { color: #8ed0c5; }
.finding__copy { max-width: 720px; color: #c5cfcc; font-size: 16px; line-height: 1.7; }
.finding__copy p { margin: 0 0 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-heading label { display: grid; min-width: min(300px, 100%); gap: 7px; }
.section-heading label span { color: var(--muted); font: 10px/1 var(--mono); text-transform: uppercase; }
.section-heading select { width: 100%; height: 44px; padding: 0 38px 0 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--ink); border-radius: 4px; }
.section-intro { max-width: 800px; margin: 28px 0 36px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 24px; color: var(--muted); font: 10px/1.3 var(--mono); }
.legend span::before { display: inline-block; width: 9px; height: 9px; margin-right: 6px; content: ""; background: var(--color); }
.legend__strong-critical { --color: var(--critical-strong); }
.legend__critical { --color: var(--critical); }
.legend__neutral { --color: var(--neutral); }
.legend__supportive { --color: var(--supportive); }
.legend__strong-supportive { --color: var(--supportive-strong); }
.score-scale { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 9px; color: var(--muted); font: 10px/1.3 var(--mono); }
.score-scale span:nth-child(2) { text-align: center; }
.score-scale span:last-child { text-align: right; }
.score-scale strong { color: var(--ink); font-weight: 500; }
.tone-chart { border-top: 1px solid var(--ink); }
.tone-row { display: grid; grid-template-columns: minmax(190px, .55fr) minmax(280px, 1.45fr) 132px; gap: 18px; align-items: center; min-height: 82px; border-bottom: 1px solid var(--line); }
.tone-row__label strong { display: block; font: 600 16px/1.25 var(--serif); }
.tone-row__label span { color: var(--muted); font: 10px/1.4 var(--mono); }
.tone-row__plot { position: relative; padding-block: 17px; }
.tone-bar { display: flex; height: 22px; overflow: hidden; background: var(--neutral); }
.tone-bar span { min-width: 0; height: 100%; background: var(--color); }
.tone-bar span[tabindex] { cursor: help; }
.tone-bar span[tabindex]:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--ink); outline-offset: -2px; }
.tone-bar__strong-critical { --color: var(--critical-strong); }
.tone-bar__critical { --color: var(--critical); }
.tone-bar__neutral { --color: var(--neutral); }
.tone-bar__supportive { --color: var(--supportive); }
.tone-bar__strong-supportive { --color: var(--supportive-strong); }
.mean-axis { position: relative; height: 13px; margin-top: 7px; border-top: 1px solid #a8afac; }
.mean-axis::before { position: absolute; top: -4px; left: 50%; width: 1px; height: 7px; content: ""; background: var(--ink); }
.mean-axis i { position: absolute; top: -5px; left: var(--position); width: 9px; height: 9px; margin-left: -4px; border: 2px solid var(--surface); border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.tone-row__score { text-align: right; font: 500 13px/1.35 var(--mono); }
.tone-row__score strong { display: block; font-size: 15px; font-weight: 500; }
.tone-row__score span { display: block; color: var(--muted); font-size: 9px; }
.small-sample .tone-bar { opacity: .4; outline: 1px dashed var(--muted); outline-offset: 2px; }
.chart-note { margin: 18px 0 0; color: var(--muted); font: 11px/1.55 var(--mono); }
.matrix-section { background: #eeece4; }
.matrix-wrap { max-width: 100%; overflow-x: auto; }
.matrix { width: 100%; min-width: 1000px; border-collapse: collapse; table-layout: fixed; }
.matrix th, .matrix td { border: 1px solid var(--line); }
.matrix thead th { height: 120px; padding: 8px; vertical-align: bottom; color: var(--muted); font: 9px/1.25 var(--mono); }
.matrix thead th:first-child { width: 170px; }
.matrix tbody th { padding: 10px 12px; background: var(--surface); text-align: left; font: 500 12px/1.25 var(--sans); }
.matrix td { height: 54px; padding: 6px; text-align: center; background: var(--cell-color); font: 500 11px/1.2 var(--mono); }
.matrix td small { display: block; margin-top: 3px; opacity: .65; font-size: 8px; }
.matrix td.low-sample { color: #4f5957; outline: 1px dashed var(--muted); outline-offset: -4px; }
.matrix td.empty { background: transparent; color: var(--muted); }
.matrix td[tabindex] { cursor: help; }
.matrix td[tabindex]:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.analysis-tooltip { position: fixed; z-index: 50; width: min(420px, calc(100vw - 24px)); max-height: min(520px, calc(100vh - 24px)); padding: 15px 17px; overflow: auto; color: #f4f7f5; background: #182321; border: 1px solid #4e615d; box-shadow: 0 12px 32px rgba(17, 28, 26, .24); white-space: pre-line; pointer-events: none; font: 11px/1.55 var(--mono); }
.evidence-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; margin-top: 38px; }
.evidence-columns h3 { margin-bottom: 14px; font-size: 25px; }
.evidence-item { display: grid; gap: 8px; padding: 18px 0; border-top: 1px solid var(--line); }
.evidence-item a { font: 600 17px/1.25 var(--serif); text-underline-offset: 3px; }
.evidence-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.evidence-item span { color: var(--accent); font: 10px/1.4 var(--mono); }
.method { background: #faf8f0; }
.method__lead { max-width: 900px; margin: 30px 0 52px; font: 500 clamp(21px, 2.3vw, 29px)/1.45 var(--serif); }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--line); }
.method-grid section { min-height: 260px; padding: 25px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.method-grid span { color: var(--accent); font: 10px/1 var(--mono); }
.method-grid h3 { margin: 24px 0 14px; font-size: 24px; }
.method-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.method__repro { display: grid; grid-template-columns: .4fr 1.6fr; gap: 30px; margin-top: 35px; padding-top: 25px; border-top: 1px solid var(--ink); }
.method__repro p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.method__repro code { padding: 2px 5px; background: #e8e5db; font-family: var(--mono); }
footer { max-width: 1440px; min-height: 90px; display: flex; align-items: center; gap: 26px; margin: 0 auto; padding: 20px max(28px, 7vw); border: 1px solid var(--line); border-top: 0; background: var(--ink); color: #eef1ee; font-size: 12px; }
footer span { margin-right: auto; color: #aeb9b6; font-family: var(--mono); }

@media (max-width: 850px) {
  .site-bar { grid-template-columns: 1fr auto; }
  .site-bar__label { display: none; }
  main { border-inline: 0; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 75px; }
  h1 { grid-column: 1; }
  .finding { grid-template-columns: 1fr; gap: 30px; }
  .section-heading { align-items: start; flex-direction: column; }
  .tone-row { grid-template-columns: 150px minmax(240px, 1fr) 120px; overflow-x: auto; }
  .evidence-columns { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .author small { display: none; }
  .site-bar__back { font-size: 11px; }
  h1 { font-size: 48px; }
  .band { padding-inline: 20px; }
  .tone-row { display: block; padding: 16px 0; }
  .tone-row__plot { padding: 12px 0 4px; }
  .tone-row__score { text-align: left; }
  .tone-row__score span { display: inline-block; margin-right: 8px; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid section { min-height: 0; }
  .method__repro { grid-template-columns: 1fr; gap: 10px; }
  footer { align-items: flex-start; flex-wrap: wrap; }
  footer span { width: 100%; }
}
