@font-face {
  font-family: "Source Serif 4";
  src: url(fonts/source-serif-4.woff2) format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url(fonts/source-serif-4-italic.woff2) format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url(fonts/plex-mono-400.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url(fonts/plex-mono-500.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #fafaf8;
  --paper: #ffffff;
  --ink: #17171a;
  --grey: #6e6e73;
  --grey-2: #9d9da2;
  --rule: #e2e2de;
  --rule-strong: #c9c9c4;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --measure: 1160px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  font-optical-sizing: auto;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

header.site, main, footer.site {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  padding-bottom: 28px;
}
.brand {
  color: var(--ink);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
header.site nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 13px;
}
header.site nav a { color: var(--grey); }
header.site nav a[aria-current="page"] { color: var(--ink); }

main { padding-top: 48px; padding-bottom: 72px; }
html { scroll-behavior: smooth; }
section { padding-top: 24px; scroll-margin-top: 16px; }
section.first { padding-top: 0; }
section h2 { margin-top: 40px; }
.facts:first-of-type { margin-top: 20px; }

footer.site { padding-bottom: 40px; }
footer.site .foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey);
}

h1 {
  font-weight: 500;
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}
h2 {
  font-weight: 500;
  font-size: 24px;
  line-height: 1.3;
  margin: 56px 0 12px;
}
h3 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey);
  margin: 40px 0 10px;
}
p { margin: 0 0 16px; }
.lede { font-size: 23px; line-height: 1.45; color: var(--ink); margin-bottom: 48px; }
.label, .mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--grey); }

/* ---------- Leaderboard ---------- */

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey);
}
.placeholder-flag {
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.controls { display: inline-flex; gap: 28px; flex-wrap: wrap; }
.switch { display: inline-flex; gap: 14px; }
.switch button {
  font: inherit;
  color: var(--grey-2);
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
}
.switch button:hover { color: var(--grey); }
.switch button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


/* bar view */
.bars-wrap { padding-top: 8px; }
.bars text { font-family: var(--mono); font-size: 12px; fill: var(--grey); }
.bars text.name { font-family: var(--serif); font-size: 15px; fill: var(--ink); }
.bars text.val { fill: var(--ink); }
.bars .whisker { stroke: var(--ink); stroke-width: 1; opacity: 0.55; }
.bars .grid { stroke: var(--rule); stroke-width: 1; }
.bars .axis { stroke: var(--rule-strong); stroke-width: 1; }
.bars .pass { stroke: #e0a12a; stroke-width: 1.5; stroke-dasharray: 2 4; stroke-linecap: round; }
.bars text.pass-label { fill: #e0a12a; }
:root[data-theme="dark"] .bars .pass { stroke: #ffc857; }
:root[data-theme="dark"] .bars text.pass-label { fill: #ffc857; }
.bars-tip { position: absolute; pointer-events: none; font-family: var(--mono); font-size: 12px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 6px; padding: 4px 8px; white-space: nowrap; }
@media (max-width: 560px) { .bars text.name { font-size: 12px; } .bars text { font-size: 10px; } }
.chart-foot { margin: 8px 0 20px; font-family: var(--mono); font-size: 12px; color: var(--grey); }

.facts { list-style: none; padding: 0; margin: 40px 0 28px; border-top: 1px solid var(--rule); }
.facts li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.facts b { font-weight: 600; }
.small { font-size: 15px; }

/* ---------- Method ---------- */

table.excerpt { width: 100%; border-collapse: collapse; margin: 28px 0 8px; font-size: 15px; }
table.excerpt caption { text-align: left; font-family: var(--mono); font-size: 12px; color: var(--grey);
  text-transform: uppercase; letter-spacing: 0.05em; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
table.excerpt th, table.excerpt td { text-align: left; vertical-align: top; padding: 8px 0; border-bottom: 1px solid var(--rule); }
table.excerpt th { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--grey); width: 150px; padding-right: 16px; padding-top: 10px; }
table.excerpt .mono { font-size: 14px; }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  body { font-size: 17px; }
  header.site, main, footer.site { padding-left: 16px; padding-right: 16px; }
  header.site { padding-top: 20px; padding-bottom: 12px; }
  header.site nav { gap: 14px; }
  main { padding-top: 28px; }
  h1 { font-size: 30px; }
  .lede { font-size: 18px; margin-bottom: 32px; }
  table.excerpt th { width: 96px; }
}

/* ---------- Contact page: one form, and a Book a call button beside the heading ---------- */

.contact-page { max-width: 720px; }
.cf-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.cf-or { font-family: var(--mono); font-size: 13px; color: var(--grey); }
.contact-page .lede { margin-bottom: 36px; }
.cta-outline {
  font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.2;
  border: 1px solid var(--ink); border-radius: 10px; padding: 12px 20px; transition: background .15s, color .15s;
}
.cta-outline:hover { background: var(--ink); color: var(--bg); text-decoration: none; }
.contact-form { display: grid; gap: 14px; margin-top: 4px; }
.contact-form[hidden] { display: none; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .cf-row { grid-template-columns: 1fr; } }
.contact-form label { display: grid; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--grey); }
.contact-form .opt { color: var(--grey-2); }
.contact-form input, .contact-form textarea {
  font: inherit; font-family: var(--serif); font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--rule-strong); border-radius: 10px; padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--grey-2); }
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.contact-form button[type=submit] {
  justify-self: start; font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--bg); background: var(--ink);
  border: 1px solid var(--ink); border-radius: 10px; padding: 12px 22px; cursor: pointer; line-height: 1.2;
}
.contact-form button[type=submit]:hover { opacity: .88; }
.contact-form button:focus-visible, .cc-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.contact-form .small { margin: 0; font-size: 14px; }
.contact-form.sent label, .contact-form.sent .cf-row { opacity: .5; }

/* ---------- Example ---------- */

.sheet { border-top: 1px solid var(--ink); margin-top: 8px; }
.sheet-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12px; color: var(--grey); text-transform: uppercase; letter-spacing: 0.05em;
}
.sheet-head span:first-child { color: var(--ink); }
.sheet h3 { margin-top: 36px; }
.sheet-cond { font-size: 17px; }
.table-scroll { overflow-x: auto; }
table.spec { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 0; }
table.spec th {
  text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--grey);
  text-transform: uppercase; letter-spacing: 0.05em; padding: 0 12px 8px 0; border-bottom: 1px solid var(--ink);
}
table.spec td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.spec td[rowspan] { padding-right: 20px; }
table.spec th.num { text-align: right; }
table.spec td.num { text-align: right; font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
table.spec tr.hl td:not([rowspan]) { color: var(--accent); }
table.spec td:last-child, table.spec th:last-child { padding-left: 8px; color: var(--grey); }

figure.wave { margin: 32px 0 0; }
.wave-svg { display: block; }
.wave-svg text { font-family: var(--mono); font-size: 11px; fill: var(--grey); }
.wave-svg .grid { stroke: var(--rule); stroke-width: 1; }
.wave-svg .axis { stroke: var(--ink); stroke-width: 1; }
.wave-svg .band { fill: var(--accent); opacity: 0.07; }
.wave-svg .thresh { stroke: var(--grey-2); stroke-width: 1; stroke-dasharray: 3 4; }
.wave-svg .thresh-label { fill: var(--grey); }
.wave-svg .trace { fill: none; stroke-width: 1.75; }
.wave-svg .drop { stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.7; }
.wave-svg .cold { stroke: #8a93a6; fill: #6b7385; }
.wave-svg .room { stroke: var(--accent); fill: var(--accent); }
.wave-svg .hot { stroke: #c4775a; fill: #b0664b; }
.wave-svg .trace.cold, .wave-svg .trace.room, .wave-svg .trace.hot { fill: none; }
.wave-svg .edge-time { fill: var(--ink); }
figure.wave figcaption { margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--grey); }

dl.spec-list { display: grid; grid-template-columns: 150px 1fr; margin: 8px 0 0; border-top: 1px solid var(--ink); }
dl.spec-list dt, dl.spec-list dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--rule); }
dl.spec-list dt { font-family: var(--mono); font-size: 12px; color: var(--grey); padding-top: 13px; }

ol.steps { padding: 0; margin: 20px 0 24px; list-style: none; counter-reset: step; border-top: 1px solid var(--rule); }
ol.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; padding: 10px 0; border-bottom: 1px solid var(--rule); }
ol.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 4px; }

@media (max-width: 640px) {
  dl.spec-list { grid-template-columns: 1fr; }
  dl.spec-list dt { border-bottom: none; padding-bottom: 0; }
  .wave-svg text { font-size: 10px; }
  table.spec { font-size: 14px; }
}
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form button:disabled { opacity: 0.6; cursor: default; }
.contact-form.sent #form-note { color: var(--ink); }

/* dark theme: the toggle in the header sets data-theme on <html> */
:root[data-theme="dark"] {
  --bg: #0f1214;
  --paper: #161a1d;
  --ink: #e6eae8;
  --grey: #9aa3a0;
  --grey-2: #6f7774;
  --rule: #252b2e;
  --rule-strong: #353c40;
  --accent: #7fb2ff;
  --dots: #7fd1b0;
  --dotbg: rgba(230, 234, 232, 0.07);
  color-scheme: dark;
}
:root { --dots: #2f7a5c; --dotbg: rgba(23, 23, 26, 0.07); }
.theme-toggle {
  font: inherit; color: var(--grey); background: none; border: none; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .15s;
}
.theme-toggle:hover { color: var(--ink); text-decoration-thickness: 2px; }

/* hero board (board.js) */
.boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin: 16px 0 24px; }
.board-art { position: relative; width: 100%; margin: 0; }
.board-art figcaption { text-align: center; font-family: var(--mono); font-size: 13px; color: var(--grey); margin-top: 4px; }
.board-art figcaption b { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) { .boards { grid-template-columns: 1fr; } }
.board-art canvas { display: block; width: 100%; aspect-ratio: 25 / 18; cursor: crosshair; touch-action: pan-y; }

/* what one task looks like: text and metrics */
.episode { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 32px 0; margin-bottom: 64px; }
.episode-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.episode-text { margin: 0; font-size: 21px; line-height: 1.55; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.metric { padding: 14px 0; }
.metric .mv { font-family: var(--mono); font-weight: 500; font-size: 30px; letter-spacing: -0.02em; white-space: nowrap; line-height: 1.2; color: var(--ink); }
.metric .ml { font-family: var(--mono); font-size: 12px; color: var(--grey); margin-top: 6px; line-height: 1.4; }
@media (max-width: 900px) {
  .episode-grid { grid-template-columns: 1fr; gap: 28px; }
  .metric .mv { font-size: 20px; }
}

/* wider page (1160px): keep running text to a readable line length */
main > p, main section > p { max-width: 820px; }


/* hero: the intro is as wide as the headline; the Talk to us button sits on the right, level with it */
.hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.hero-text { display: grid; width: fit-content; }
.hero-text .lede { width: 0; min-width: 100%; }
.hero-cta {
  flex: none; margin-top: 2px; font-family: var(--mono); font-size: 15px; font-weight: 500;
  color: var(--bg); background: var(--ink); border-radius: 10px; padding: 14px 22px; transition: opacity .15s, transform .15s;
}
.hero-cta:hover { text-decoration: none; opacity: .88; transform: translateY(-1px); }
@media (max-width: 760px) { .hero { flex-direction: column; } .hero-text .lede { width: auto; } }
main section > p.wide { max-width: none; }

/* three columns at the bottom, then one wide call to action */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; border-top: 1px solid var(--rule); padding-top: 36px; margin-top: 40px; }
.pillar h3 { font-size: 21px; font-weight: 500; margin: 0 0 10px; }
.pillar p { margin: 0; color: var(--grey); font-size: 17px; line-height: 1.55; max-width: none; }
@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; gap: 28px; } }
.cta-wide {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  margin: 64px 0 8px; padding: 18px 26px; border-radius: 12px; background: var(--ink); color: var(--bg);
  transition: transform .15s, opacity .15s;
}
.cta-wide:hover { text-decoration: none; opacity: .92; transform: translateY(-2px); }
.cta-wide-text { font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.cta-wide-go { font-family: var(--mono); font-size: 14px; font-weight: 500; white-space: nowrap; }
@media (max-width: 600px) { .cta-wide { padding: 16px 20px; } .cta-wide-text { font-size: 17px; } }

/* SEO additions: kicker over the headline, results table, question pages */
.kicker { font-family: var(--mono); font-size: 13px; color: var(--grey); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; }
.results-wrap { margin: 4px 0 24px; font-family: var(--mono); font-size: 12px; color: var(--grey); }
.results-wrap summary { cursor: pointer; }
table.results { border-collapse: collapse; margin-top: 12px; font-size: 13px; color: var(--ink); }
table.results caption { text-align: left; color: var(--grey); padding-bottom: 8px; }
table.results th, table.results td { text-align: left; padding: 6px 18px 6px 0; border-bottom: 1px solid var(--rule); }
table.results th { color: var(--grey); font-weight: 400; }
.more-q { margin-top: 40px; font-family: var(--mono); font-size: 14px; }
.qa { max-width: 760px; }
.qa-kicker { font-family: var(--mono); font-size: 13px; margin: 0 0 10px; }
.qa h2 { font-size: 22px; margin-top: 36px; }
.qa p, .qa li { font-size: 18px; line-height: 1.6; }
.qa-related { padding-left: 18px; }
.qa .cta-wide { margin-top: 48px; }
.qa-list { max-width: 820px; }
.qa-list dt { font-size: 20px; margin-top: 26px; }
.qa-list dd { margin: 6px 0 0; color: var(--grey); font-size: 17px; line-height: 1.55; }
.foot { display: flex; justify-content: space-between; align-items: center; }
.foot a { font-family: var(--mono); font-size: 12px; color: var(--grey); }
.table-scroll { overflow-x: auto; }
table.compare td, table.compare th { vertical-align: top; min-width: 140px; }
