:root {
  --ink: #17222b;
  --muted: #56656f;
  --paper: #ffffff;
  --canvas: #f4f6f7;
  --line: #d4dce0;
  --line-dark: #aab7be;
  --accent: #075b64;
  --accent-dark: #05454c;
  --accent-pale: #e7f2f2;
  --positive: #1f6a45;
  --positive-pale: #e8f2ec;
  --negative: #8a2d2d;
  --negative-pale: #f8ecea;
  --neutral: #5d6670;
  --max: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-dark); }
a:focus-visible, summary:focus-visible, .table-scroll:focus-visible {
  outline: 3px solid #7a4300;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: -4rem;
  padding: 0.65rem 1rem;
  color: #fff;
  background: var(--ink);
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.header-inner {
  width: min(var(--max), calc(100% - 2rem));
  min-height: 4rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.report-name {
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -0.01em;
}

nav { display: flex; gap: 1.25rem; font-size: 0.9rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--ink); text-decoration: underline; }

main {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.title-block {
  padding: clamp(4.5rem, 8vw, 7rem) 0 3.5rem;
  border-bottom: 1px solid var(--line-dark);
}

.eyebrow, .section-kicker, .negative-label {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.2; text-wrap: balance; }

h1 {
  max-width: 920px;
  margin: 0.8rem 0 1.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.55rem, 6vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 830px;
  margin: 0;
  color: #354650;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.verdict {
  margin-top: 2.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-dark);
  background: var(--paper);
}

.verdict > div {
  min-height: 150px;
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.verdict > div + div { border-left: 1px solid var(--line); }
.verdict .verdict-caution { background: var(--negative-pale); }
.verdict-label { color: var(--muted); font-size: 0.82rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.06em; }
.verdict strong { margin: 0.22rem 0 0.1rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 500; }
.verdict span:last-child { color: var(--muted); font-size: 0.94rem; }

.report-section {
  padding: clamp(3.8rem, 7vw, 6rem) 0;
  border-bottom: 1px solid var(--line-dark);
}

.report-section > p, .report-section > ul, .report-section > ol { max-width: 860px; }

h2 {
  margin: 0.45rem 0 1.6rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.05rem, 4vw, 3.45rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}

h3 { font-size: 1.16rem; }
p { margin: 0 0 1.1rem; }

.finding-grid {
  margin-top: 2.3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  background: var(--paper);
}

.finding-grid article { padding: 1.35rem; }
.finding-grid article + article { border-left: 1px solid var(--line); }
.finding-grid .metric { display: block; color: var(--accent); font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
.finding-grid h3 { margin: 0.35rem 0; font-size: 0.98rem; }
.finding-grid p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin: 2rem 0 2.5rem; }
.two-column h3 { margin-top: 0; }
.two-column ul { margin: 0; padding-left: 1.2rem; }

table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  font-size: 0.9rem;
}

caption {
  padding: 0 0 0.75rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
  text-align: left;
}

th, td { padding: 0.75rem 0.8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { color: #33434d; background: #eef1f2; font-size: 0.78rem; letter-spacing: 0.025em; text-transform: uppercase; }
tbody th { font-weight: 750; }
tfoot th, tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 800; }

.compact-table { margin-top: 2rem; }
.status { display: inline-block; padding: 0.13rem 0.5rem; border-radius: 999px; font-size: 0.76rem; font-weight: 800; white-space: nowrap; }
.status.pass { color: var(--positive); background: var(--positive-pale); }
.status.fail { color: var(--negative); background: var(--negative-pale); }
.status.neutral { color: var(--neutral); background: #edf0f2; }

.method-steps { margin: 0; padding: 0; counter-reset: methods; list-style: none; }
.method-steps li { position: relative; padding: 1.25rem 0 1.25rem 4rem; border-top: 1px solid var(--line); }
.method-steps li:last-child { border-bottom: 1px solid var(--line); }
.method-steps li::before { counter-increment: methods; content: counter(methods, decimal-leading-zero); position: absolute; left: 0; top: 1.3rem; color: var(--accent); font-weight: 800; }

.coordinate-table-wrap { margin-top: 2.8rem; }

details { margin-top: 2.5rem; border: 1px solid var(--line-dark); background: var(--paper); }
summary { cursor: pointer; padding: 1rem 1.15rem; font-weight: 750; }
.details-body { padding: 0 1.15rem 1.15rem; }
code { overflow-wrap: anywhere; font-family: "Cascadia Mono", Consolas, monospace; font-size: 0.82em; }

.results-section { padding-top: clamp(4.5rem, 8vw, 7rem); }
.result-block, .negative-result { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1.2rem; margin: 3rem 0 1.5rem; }
.result-block h3, .negative-result h3 { margin: 0 0 0.55rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.45rem, 3vw, 2.15rem); font-weight: 500; }
.result-block p, .negative-result p { max-width: 850px; }
.result-number { color: var(--accent); font-size: 0.8rem; font-weight: 850; letter-spacing: 0.08em; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--paper); }
.results-table { min-width: 920px; border: 0; }
.results-table caption { padding: 0.9rem 0.8rem; }
.table-note { margin-top: 0.7rem; color: var(--muted); font-size: 0.84rem; }

.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--paper); }
.evidence-grid div { min-height: 110px; padding: 1.15rem; display: flex; flex-direction: column; justify-content: center; }
.evidence-grid div:nth-child(n+4) { border-top: 1px solid var(--line); }
.evidence-grid div:not(:nth-child(3n+1)) { border-left: 1px solid var(--line); }
.evidence-grid strong { color: var(--accent); font-family: Georgia, "Times New Roman", serif; font-size: 1.65rem; font-weight: 500; }
.evidence-grid span { color: var(--muted); font-size: 0.86rem; }

.negative-result { margin-top: 3.5rem; padding: 2rem; border-left: 5px solid var(--negative); background: var(--negative-pale); }
.negative-result .result-number, .negative-label { color: var(--negative); }
.negative-label { margin-bottom: 0.4rem; }

.tier-note { margin-top: 2.2rem; padding: 1.35rem 1.5rem; border: 1px solid #b9cdd0; background: var(--accent-pale); }
.tier-note h3 { margin: 0 0 0.4rem; }
.tier-note p { margin: 0; max-width: 900px; }

.conclusion-list { max-width: 900px; margin: 0; padding-left: 1.25rem; }
.conclusion-list li { padding: 0.7rem 0 0.7rem 0.35rem; border-bottom: 1px solid var(--line); }

.limitation-list { columns: 2; column-gap: 3.5rem; margin: 0; padding-left: 1.2rem; }
.limitation-list li { break-inside: avoid; margin: 0 0 1rem; padding-left: 0.3rem; }

.future-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.future-grid article { padding: 1.5rem; background: var(--paper); }
.future-grid article > span { color: var(--accent); font-size: 0.78rem; font-weight: 850; }
.future-grid h3 { margin: 0.45rem 0; }
.future-grid p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.download-panel { margin-top: 2rem; padding: 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border: 1px solid var(--line-dark); background: var(--paper); }
.download-panel h3 { margin: 0 0 0.25rem; }
.download-panel p { margin: 0 0 0.65rem; color: var(--muted); font-size: 0.9rem; }
.download-panel code { display: block; max-width: 620px; color: var(--muted); }
.download-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.button { display: inline-block; padding: 0.65rem 0.9rem; border: 1px solid var(--accent); color: var(--accent); font-size: 0.86rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.button.primary { color: #fff; background: var(--accent); }
.button:hover { color: #fff; background: var(--accent-dark); }

.file-links { margin-top: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.file-links a { padding: 1rem 1.1rem; display: flex; justify-content: space-between; color: var(--ink); background: var(--paper); text-decoration: none; }
.file-links a:hover strong { text-decoration: underline; }
.file-links span { color: var(--muted); font-size: 0.8rem; font-weight: 750; }

.software-links { margin-top: 2.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.software-links > div { padding-top: 1rem; border-top: 2px solid var(--ink); }
.software-links h3 { margin: 0 0 0.4rem; }
.software-links p { color: var(--muted); font-size: 0.92rem; }
.software-links a { font-weight: 750; }

.local-data-note { margin-top: 2.5rem; padding: 1.2rem 1.3rem; border: 1px solid var(--line-dark); background: #edf0f2; }

footer {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 3.5rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.82rem;
}
footer div { display: flex; flex-direction: column; }

@media (max-width: 900px) {
  nav { display: none; }
  .finding-grid { grid-template-columns: 1fr 1fr; }
  .finding-grid article:nth-child(3) { border-left: 0; }
  .finding-grid article:nth-child(n+3) { border-top: 1px solid var(--line); }
  .limitation-list { columns: 1; }
  .download-panel { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  main, .header-inner, footer { width: min(100% - 1.25rem, var(--max)); }
  .title-block { padding-top: 3.5rem; }
  h1 { font-size: clamp(2.35rem, 13vw, 3.3rem); }
  .verdict, .two-column, .future-grid, .file-links, .software-links { grid-template-columns: 1fr; }
  .verdict > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .finding-grid { grid-template-columns: 1fr; }
  .finding-grid article + article { border-left: 0; border-top: 1px solid var(--line); }
  .result-block, .negative-result { grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.4rem; }
  .negative-result { padding: 1.15rem 0.9rem; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
  .evidence-grid div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .evidence-grid div:not(:nth-child(3n+1)) { border-left: 0; }
  .evidence-grid div:nth-child(even) { border-left: 1px solid var(--line); }
  footer { flex-direction: column; }
}

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

@media print {
  :root { --canvas: #fff; }
  body { font-size: 10.5pt; background: #fff; }
  .site-header, .skip-link, .download-actions, footer a { display: none !important; }
  main, footer { width: 100%; }
  .title-block, .report-section { padding: 1.2rem 0; break-inside: auto; }
  h1 { font-size: 30pt; }
  h2 { font-size: 22pt; }
  .finding-grid, .evidence-grid, .verdict, table, .negative-result, details { break-inside: avoid; }
  .table-scroll { overflow: visible; border: 0; }
  .results-table { min-width: 0; font-size: 7.5pt; }
  a { color: inherit; text-decoration: none; }
  details .details-body { display: block !important; }
  details:not([open]) > *:not(summary) { display: block !important; }
}
