:root {
  --ink: #17202a;
  --muted: #58636e;
  --paper: #f7f8f7;
  --white: #ffffff;
  --line: #ccd3d4;
  --teal: #087f83;
  --teal-dark: #075d61;
  --teal-pale: #e0f1ef;
  --coral: #e25f47;
  --coral-pale: #fbe8e3;
  --yellow: #e8b84f;
  --charcoal: #26343b;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { display: block; max-width: 100%; }
a { color: var(--teal-dark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #913b2c; }
a:focus-visible, summary:focus-visible, .table-wrap:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 20; padding: 10px 14px; background: var(--white); }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px max(24px, calc((100vw - var(--max)) / 2));
  color: var(--white);
  background: var(--charcoal);
  border-bottom: 4px solid var(--coral);
}
.brand { color: var(--white); font-weight: 800; text-decoration: none; white-space: nowrap; }
.site-header nav { display: flex; gap: 20px; }
.site-header nav a { color: #f8ffff; font-size: 0.88rem; font-weight: 700; text-decoration: none; }

main, article, section { min-width: 0; }
.first-screen {
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 24px 32px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 24px 34px;
  align-items: center;
}
.first-copy { min-width: 0; align-self: center; }
.eyebrow, .kicker { margin: 0 0 8px; color: var(--teal-dark); font-size: 0.76rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: 0; }
h1 { margin: 0 0 16px; font-size: clamp(2.35rem, 4.2vw, 4.6rem); max-width: 12ch; }
.lede { margin: 0 0 20px; color: #34424a; font-size: 1.13rem; max-width: 55ch; }
.primary-link { display: inline-block; padding: 10px 14px; color: var(--white); background: var(--teal-dark); border-radius: 4px; font-weight: 800; text-decoration: none; }
.primary-link:hover { color: var(--white); background: #913b2c; }
.hero-figure { min-width: 0; width: 100%; margin: 0; overflow: hidden; background: var(--white); border-bottom: 5px solid var(--teal); }
.hero-figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; }
figcaption { padding: 8px 12px; color: var(--muted); font-size: 0.76rem; line-height: 1.4; }
.first-notes { min-width: 0; grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px 28px; padding-top: 6px; }
.first-notes > p { margin: 0; }
[data-guide-evidence] { font-size: 0.94rem; color: #39454b; }
.start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; grid-row: span 2; }
.start-grid p { margin: 0; padding: 9px 10px; background: var(--white); border-left: 3px solid var(--teal); font-size: 0.87rem; line-height: 1.4; }
.warning, .verify { padding: 9px 12px; font-size: 0.91rem; }
.warning { background: var(--coral-pale); border-left: 4px solid var(--coral); }
.verify { background: var(--teal-pale); border-left: 4px solid var(--teal); }

.section { scroll-margin-top: 82px; padding: 70px max(24px, calc((100vw - var(--max)) / 2)); }
.section:nth-of-type(even) { background: var(--white); }
.section-heading { max-width: 820px; margin-bottom: 30px; }
.section-heading h2 { margin: 0 0 12px; font-size: clamp(1.85rem, 3vw, 3.15rem); }
.section-heading > p:last-child { margin: 0; color: var(--muted); }

.definition-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
details { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--teal); }
details[open] { border-top-color: var(--coral); }
summary { padding: 16px; cursor: pointer; font-weight: 800; line-height: 1.3; }
details p { margin: 0; padding: 0 16px 10px; color: #3c484e; font-size: 0.87rem; line-height: 1.5; }
details p:last-child { padding-bottom: 16px; }

.method { color: var(--white); background: var(--charcoal) !important; }
.method .kicker { color: #7ee0d7; }
.method .section-heading > p:last-child { color: #d6dfe0; }
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.method-grid p { margin: 0; }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); background: var(--white); }
table { width: 100%; min-width: 850px; border-collapse: collapse; font-size: 0.91rem; line-height: 1.45; }
caption { padding: 13px 16px; text-align: left; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
th, td { padding: 14px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
thead th { color: var(--white); background: var(--teal-dark); border-top: 0; }
tbody th { color: var(--teal-dark); }
tbody tr:nth-child(even) { background: #f0f5f4; }
.source-note { margin: 14px 0 0; color: var(--muted); font-size: 0.84rem; }

.recommendations { background: #edf2f1 !important; }
.pick { margin: 0 0 18px; padding: 26px; background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--teal); border-radius: 6px; }
.pick-brooks { border-left-color: var(--coral); }
.pick-topo { border-left-color: var(--yellow); }
.pick-nb { border-left-color: var(--charcoal); }
.pick-title { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; border-bottom: 1px solid var(--line); }
.pick-title p { margin: 0; color: var(--teal-dark); font-size: 0.78rem; font-weight: 850; text-transform: uppercase; }
.pick-title h3 { margin: 0 0 12px; font-size: 1.55rem; text-align: right; }
.pick > p { max-width: 870px; }
.pick-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.pick-points p, .pick-split p { margin: 8px 0; }
.pick-points [data-source-confidence] { grid-column: 1 / -1; padding: 10px 12px; background: var(--teal-pale); font-size: 0.88rem; }
.pick-split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 30px; }
.pick-split.reverse { grid-template-columns: 1fr 1fr; }
.pick-split [data-source-confidence] { padding: 10px 12px; background: #f2f4f3; font-size: 0.88rem; }

.load-check { background: var(--teal-dark) !important; color: var(--white); }
.load-check .kicker { color: #a8ebe5; }
.load-check .section-heading > p:last-child { color: #e1eeec; }
.load-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.check-state { position: relative; min-height: 220px; padding: 26px; color: var(--ink); background: var(--white); border-top: 6px solid var(--coral); }
.check-state span { display: block; width: 38px; height: 38px; padding-top: 4px; text-align: center; color: var(--white); background: var(--charcoal); border-radius: 50%; font-weight: 900; }
.check-state h3 { margin: 22px 0 8px; font-size: 1.4rem; }
.check-state p { margin: 0; }
.assumption { margin: 18px 0 0; padding: 14px 18px; color: var(--ink); background: #ffd98a; }
.load-check noscript p { margin-bottom: 0; }

.width-rehearsal { background: var(--white) !important; }
.width-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0; list-style-position: inside; }
.width-steps li { padding: 20px; background: #eef4f3; border-bottom: 4px solid var(--teal); }
.width-steps strong { display: block; margin-bottom: 8px; }
.proxy-script { margin-top: 22px; padding: 22px 24px; background: var(--coral-pale); border-left: 5px solid var(--coral); }
.proxy-script h3, .proxy-script p { margin: 0; }
.proxy-script h3 { margin-bottom: 6px; }

.tradeoff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tradeoff-grid article { padding: 22px; background: var(--white); border: 1px solid var(--line); }
.tradeoff-grid h3, .tradeoff-grid p { margin: 0; }
.tradeoff-grid h3 { margin-bottom: 8px; }

.change-log { background: #f3ead4 !important; }
.change-table { max-width: 900px; background: var(--white); border: 1px solid #c8b98f; }
.change-row { display: grid; grid-template-columns: 1.25fr 1fr 1fr; }
.change-row span { padding: 10px 14px; border-top: 1px solid #ddd2b2; }
.change-row span + span { border-left: 1px solid #ddd2b2; }
.change-head { color: var(--white); background: var(--charcoal); font-weight: 800; }
.change-head span { border-top: 0; }
.change-log > p { max-width: 900px; }

.details-wrap table { min-width: 1120px; font-size: 0.82rem; }
.details-wrap th, .details-wrap td { padding: 13px; }
.details-wrap tbody th { width: 155px; }

.sources { color: var(--white); background: var(--charcoal) !important; }
.sources .kicker { color: #81ddd5; }
.sources .section-heading > p:last-child { color: #d4dddf; }
.source-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.source-columns > div { padding: 20px; color: var(--ink); background: var(--white); border-top: 5px solid var(--coral); }
.source-columns h3 { margin: 0 0 8px; }
.source-columns ul { margin: 0; padding-left: 20px; }
.source-columns li { margin: 6px 0; overflow-wrap: anywhere; }
.closing-action { margin: 24px 0 0; padding: 18px; color: var(--ink); background: #ffd98a; }

footer { padding: 28px 24px; color: #e5ecec; background: #11191d; text-align: center; font-size: 0.82rem; }
footer p { margin: 0 auto; max-width: 900px; }

@media (max-width: 940px) {
  .definition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .width-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .site-header { min-height: 54px; padding: 8px 14px; gap: 12px; }
  .brand { font-size: 0.92rem; }
  .site-header nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 10px; }
  .site-header nav a { font-size: 0.72rem; line-height: 1.25; }
  .first-screen { grid-template-columns: 1fr; gap: 16px; padding: 24px 16px 26px; }
  .first-copy { display: contents; }
  .eyebrow { order: 1; }
  h1 { order: 2; max-width: none; margin-bottom: 0; font-size: 2.38rem; }
  .lede { order: 3; margin-bottom: 0; font-size: 1rem; line-height: 1.48; }
  .primary-link { display: none; }
  .hero-figure { order: 4; }
  .hero-figure img { height: 205px; aspect-ratio: auto; object-position: center 68%; }
  .first-notes { order: 5; grid-column: auto; grid-template-columns: 1fr; gap: 10px; }
  .start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-row: auto; }
  .start-grid p { padding: 8px; font-size: 0.78rem; }
  .section { scroll-margin-top: 110px; padding: 50px 16px; }
  .section-heading { margin-bottom: 22px; }
  .section-heading h2 { font-size: 2rem; }
  .definition-grid, .method-grid, .load-grid, .width-steps, .tradeoff-grid, .source-columns { grid-template-columns: 1fr; }
  .pick { padding: 19px 16px; }
  .pick-title { display: block; }
  .pick-title h3 { text-align: left; margin-top: 5px; }
  .pick-points, .pick-split, .pick-split.reverse { grid-template-columns: 1fr; gap: 0; }
  .pick-points [data-source-confidence] { grid-column: auto; }
  .check-state { min-height: 0; }
  .change-table { font-size: 0.78rem; line-height: 1.35; }
  .change-row { grid-template-columns: 1.05fr 1fr 1fr; }
  .change-row span { padding: 8px 7px; overflow-wrap: anywhere; }

  .details-wrap { overflow: visible; border: 0; background: transparent; }
  .details-wrap table, .details-wrap thead, .details-wrap tbody, .details-wrap tr, .details-wrap th, .details-wrap td { display: block; width: 100%; min-width: 0; }
  .details-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .details-wrap caption { display: block; padding: 0 0 10px; }
  .details-wrap tr { margin-bottom: 16px; background: var(--white) !important; border: 1px solid var(--line); border-top: 5px solid var(--teal); }
  .details-wrap tbody th { width: 100%; padding: 15px; color: var(--white); background: var(--charcoal); }
  .details-wrap td { display: grid; grid-template-columns: minmax(112px, 0.42fr) minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
  .details-wrap td::before { content: attr(data-label); color: var(--teal-dark); font-weight: 850; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
