:root {
  --text: #0f172a;
  --text-700: #1f2937;
  --muted: #475569;
  --line: #cbd5e1;
  --soft: #f8fafc;
  --pill: #ffffff;
  --green: #10b981;
  --gold-bg: #fff7df;
  --gold-line: #f1c66d;
  --navy: #1e6091;
  --accent: #0e6e6b;
  --accent-dark: #0a4f4d;
  --accent-soft: #e6f1f0;
  --rose-soft: #fff1f2;
  --rose-line: #fda4af;
  --rose-text: #881337;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:target {
  scroll-margin-top: 84px;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.55;
  font-size: 14px;
  font-feature-settings: "ss01", "kern";
}

a {
  color: inherit;
}

.skiplink {
  position: absolute;
  left: -9999px;
}

.skiplink:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.topbar-inner,
main,
.footer-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 16px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.topbar a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.topbar a:hover {
  color: var(--accent-dark);
}

.topbar a.brand {
  margin-right: auto;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

main {
  padding: 0;
}

.hero {
  max-width: 760px;
  margin: 0;
  padding: 48px 0 64px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.6);
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 4px;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0;
}

h4 {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

p {
  margin-top: 0;
}

.hero p.lede {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid rgba(14, 110, 107, 0.25);
  border-radius: 6px;
  background: var(--pill);
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 32px 0 0;
}

.kpi {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.kpi .num {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 700;
}

.kpi .label {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

section.block {
  margin: 0;
  padding: 48px 0 56px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.6);
}

section.block:nth-of-type(3),
section.block:nth-of-type(6) {
  margin-right: -16px;
  margin-left: -16px;
  padding-right: 16px;
  padding-left: 16px;
  background: var(--soft);
  border-top: 1px solid rgba(203, 213, 225, 0.6);
}

section.block:nth-of-type(5) {
  margin-right: -16px;
  margin-left: -16px;
  padding-right: 16px;
  padding-left: 16px;
  background: rgba(230, 241, 240, 0.45);
  border-top: 1px solid rgba(14, 110, 107, 0.25);
  border-bottom: 1px solid rgba(14, 110, 107, 0.25);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: 0;
}

.section-head .meta,
.note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.prose {
  max-width: 78ch;
  color: var(--text-700);
  font-size: 14px;
  line-height: 1.6;
}

.prose p {
  margin: 10px 0;
}

.callout {
  margin: 14px 0;
  padding: 16px 18px;
  border: 1px solid rgba(14, 110, 107, 0.3);
  border-radius: 8px;
  background: rgba(230, 241, 240, 0.55);
  color: var(--text-700);
  font-size: 14px;
}

code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.92em;
}

.dist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.funnel-card,
.fail-card,
.voice-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.funnel-card {
  padding: 16px;
}

.funnel-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.funnel-card strong {
  display: block;
  margin: 5px 0 2px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  line-height: 1;
}

.funnel-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.search {
  display: grid;
  gap: 6px;
  min-width: min(420px, 100%);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.scholar-table {
  max-height: 720px;
  overflow: auto;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.scholar-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.scholar-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.scholar-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text-700);
  line-height: 1.35;
  vertical-align: top;
}

.scholar-table tr:hover td {
  background: var(--soft);
}

.bio-row td {
  padding-top: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.chip {
  display: inline-flex;
  margin: 0 5px 5px 0;
  padding: 3px 7px;
  border: 1px solid rgba(14, 110, 107, 0.28);
  border-radius: 999px;
  background: rgba(230, 241, 240, 0.65);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.fail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.fail-card {
  padding: 20px;
}

.fail-card .name {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.fail-card p {
  margin: 4px 0;
  color: var(--text-700);
  font-size: 13px;
  line-height: 1.5;
}

.fail-card .trap {
  color: var(--muted);
}

.authors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 18px;
}

.authors-grid h3 {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.about {
  max-width: 78ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.bar-chart {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 36px;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}

.bar-row > span:first-child {
  color: var(--text);
  font-weight: 600;
}

.track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.bar {
  display: block;
  height: 100%;
  background: var(--accent);
}

#signal-chart .bar {
  background: var(--navy);
}

.bar-row strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  text-align: right;
}

.voice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.voice-card {
  padding: 20px;
}

.voice-card.right {
  border-color: #86efac;
  background: #ecfdf5;
}

.voice-card.wrong {
  border-color: var(--rose-line);
  background: var(--rose-soft);
}

.voice-card.right h4 span {
  color: var(--green);
}

.voice-card.wrong h4 span {
  color: var(--rose-text);
}

.voice-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.voice-card li {
  margin: 6px 0;
  color: var(--text-700);
  font-size: 13px;
  line-height: 1.45;
}

.timeline-table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 13px;
}

.timeline-table th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.timeline-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text-700);
  line-height: 1.45;
  vertical-align: top;
}

.timeline-table td:first-child {
  width: 130px;
  color: var(--text);
  font-weight: 650;
  white-space: nowrap;
}

.timeline-table tr:nth-child(3) {
  border-left: 3px solid var(--gold-line);
  background: var(--gold-bg);
}

.source-list {
  max-width: 78ch;
  margin: 0;
  padding-left: 18px;
  color: var(--text-700);
}

.source-list li {
  margin: 6px 0;
}

.source-list a {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}

.source-list a:hover {
  text-decoration: underline;
}

footer {
  margin-top: 48px;
  padding: 36px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

footer p {
  margin: 4px 0;
}

@media (max-width: 900px) {
  .topbar-inner {
    gap: 14px;
    overflow-x: auto;
  }

  .kpi-row,
  .dist-grid,
  .authors-grid,
  .fail-grid,
  .voice-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .scholar-table {
    max-height: 680px;
  }

  .scholar-table th,
  .scholar-table td {
    min-width: 120px;
  }
}

@media (max-width: 640px) {
  .topbar-inner,
  main,
  .footer-inner {
    padding-right: 18px;
    padding-left: 18px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 23px;
  }
}
