@font-face {
  font-family: "Noto Sans SC Local";
  src: url("fonts/noto-sans-sc-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: light-dark(#f4f5f2, #121514);
  --surface: light-dark(#ffffff, #1b201e);
  --surface-2: light-dark(#e9ece7, #242b28);
  --text: light-dark(#17201c, #edf2ef);
  --muted: light-dark(#66706b, #a8b2ad);
  --line: light-dark(#d5dad6, #343d39);
  --green: light-dark(#087b5b, #49c69d);
  --green-soft: light-dark(#dceee7, #17372d);
  --coral: light-dark(#c95047, #ee8178);
  --ink: light-dark(#17201c, #f2f5f3);
  --header: light-dark(rgba(244, 245, 242, .92), rgba(18, 21, 20, .92));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC Local", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; }
.brand b { color: var(--green); font-weight: 500; }
.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
}
nav { display: flex; gap: 24px; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
nav a:hover { color: var(--text); }

main { max-width: 1440px; margin: 0 auto; padding: 0 28px 72px; }
.overview {
  min-height: min(680px, calc(100vh - 64px));
  padding: 56px 0 42px;
  display: grid;
  grid-template-columns: minmax(320px, .85fr) minmax(480px, 1.15fr);
  gap: 52px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.eyebrow, .section-index {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}
h1, h2, h3, p { letter-spacing: 0; }
h1 { margin: 0; max-width: 760px; font-size: clamp(42px, 6vw, 78px); line-height: 1.02; font-weight: 500; }
.lead { max-width: 680px; margin: 24px 0 0; color: var(--muted); font-size: 18px; }
.run-meta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 13px; }
.run-meta span { display: inline-flex; align-items: center; gap: 7px; }
.run-meta i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.overview-preview { margin: 0; min-width: 0; }
.overview-preview img { width: 100%; max-height: 560px; object-fit: contain; background: var(--surface); }
.overview-preview figcaption { padding-top: 10px; color: var(--muted); font-size: 13px; text-align: right; }

.metric-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.metric { padding: 28px 24px 28px 0; min-width: 0; }
.metric + .metric { padding-left: 24px; border-left: 1px solid var(--line); }
.metric span, .metric small { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin: 10px 0 5px; font-size: 30px; line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; }

.method, .sample-section, .metrics-section, .analysis-section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.method { display: grid; grid-template-columns: 220px 1fr; gap: 48px; }
h2 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 500; }
h3 { font-weight: 500; }
.pipeline { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); }
.pipeline li { position: relative; min-height: 112px; padding: 0 24px 0 0; border-top: 2px solid var(--line); }
.pipeline li::before { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; background: var(--green); border-radius: 50%; }
.pipeline span, .pipeline b, .pipeline small { display: block; }
.pipeline span { margin-top: 18px; color: var(--green); font-size: 11px; }
.pipeline b { margin-top: 12px; font-weight: 500; }
.pipeline small { color: var(--muted); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 32px; }
.sample-controls { display: flex; align-items: center; gap: 8px; }
.sample-controls select {
  width: min(440px, 45vw);
  height: 40px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}
.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}
.icon-button:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.icon-button:disabled { opacity: .35; }
.sample-identity { margin-bottom: 18px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.sample-identity div { display: flex; align-items: baseline; gap: 14px; }
.sample-identity span { color: var(--green); font-size: 13px; font-variant-numeric: tabular-nums; }
.sample-identity h3 { margin: 0; font-size: 22px; }
.sample-identity p { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.result-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.result-gallery figure { margin: 0; min-width: 0; background: var(--surface); border-radius: 4px; overflow: hidden; }
.result-gallery a { display: block; }
.result-gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: light-dark(#f8f9f7, #0e1110); }
.figure-label { height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); font-size: 13px; }
.figure-label span { color: var(--green); font-size: 11px; }
.sample-metrics { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 12px; background: var(--surface); border-radius: 4px; }
.sample-metrics div { padding: 14px; min-width: 0; }
.sample-metrics div + div { border-left: 1px solid var(--line); }
.sample-metrics span, .sample-metrics b { display: block; }
.sample-metrics span { color: var(--muted); font-size: 11px; }
.sample-metrics b { margin-top: 5px; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }

.data-link { color: var(--green); text-decoration: none; font-size: 13px; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
th { color: var(--muted); font-size: 11px; font-weight: 500; }
th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
tbody tr { transition: background-color 140ms ease; }
tbody tr:hover, tbody tr.is-active { background: var(--green-soft); }
tbody tr button { padding: 0; border: 0; background: transparent; color: var(--text); text-decoration: underline; text-decoration-color: var(--line); }

.analysis-section { display: grid; grid-template-columns: 220px 1fr; gap: 48px; }
.analysis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.analysis-grid article { border-top: 2px solid var(--line); }
.analysis-number { display: block; margin-top: 14px; color: var(--green); font-size: 12px; }
.analysis-grid h3 { margin: 22px 0 8px; font-size: 19px; }
.analysis-grid p { margin: 0; color: var(--muted); font-size: 14px; }
.notice { grid-column: 2; margin-top: 4px; padding: 15px 18px; border-left: 3px solid var(--coral); background: var(--surface); color: var(--muted); font-size: 13px; }
.notice b { color: var(--text); font-weight: 500; }

footer { max-width: 1440px; margin: 0 auto; padding: 26px 28px 42px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1080px) {
  .overview { grid-template-columns: 1fr; gap: 32px; min-height: auto; }
  .overview-copy { max-width: 850px; }
  .overview-preview img { max-height: 520px; }
  .result-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sample-metrics { grid-template-columns: repeat(3, 1fr); }
  .sample-metrics div:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); }
  .sample-metrics div:nth-child(5), .sample-metrics div:nth-child(6) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .header-inner, main, footer { padding-left: 18px; padding-right: 18px; }
  nav { display: none; }
  .overview { padding-top: 38px; }
  h1 { font-size: 42px; }
  .lead { font-size: 16px; }
  .metric-band { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .metric:nth-child(4) { border-top: 1px solid var(--line); }
  .method, .analysis-section { grid-template-columns: 1fr; gap: 30px; }
  .pipeline { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .sample-controls { width: 100%; }
  .sample-controls label { flex: 1; min-width: 0; }
  .sample-controls select { width: 100%; }
  .sample-identity { align-items: flex-start; flex-direction: column; }
  .result-gallery { grid-template-columns: 1fr; }
  .analysis-grid { grid-template-columns: 1fr; }
  .notice { grid-column: 1; }
}

@media (max-width: 430px) {
  h1 { font-size: 36px; }
  .metric { padding: 22px 12px 22px 0; }
  .metric + .metric { padding-left: 12px; }
  .metric strong { font-size: 24px; }
  .pipeline { grid-template-columns: 1fr; }
  .sample-metrics { grid-template-columns: repeat(2, 1fr); }
  .sample-metrics div:nth-child(3), .sample-metrics div:nth-child(5) { border-left: 0; }
  .sample-metrics div:nth-child(3) { border-top: 1px solid var(--line); }
  .sample-metrics div:nth-child(4) { border-left: 1px solid var(--line); }
  footer { flex-direction: column; }
}
