:root {
  --bg: #eef2f5;
  --surface: #ffffff;
  --ink: #1e252e;
  --muted: #65717f;
  --line: #d8e0ea;
  --blue: #24538f;
  --blue-dark: #183a65;
  --green: #24735f;
  --green-dark: #1a5a49;
  --gold: #9a6400;
  --red: #a33e52;
  --blue-soft: #e8f0fb;
  --green-soft: #e6f4ef;
  --gold-soft: #fff1d8;
  --red-soft: #fff0f3;
  --shadow: 0 14px 34px rgba(25, 33, 44, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

code {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

h1,
h2,
h3,
p {
  margin: 0;
  letter-spacing: 0;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 36px clamp(20px, 5vw, 64px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

h1 {
  margin-top: 6px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.lead {
  max-width: 820px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav a,
.button,
.download-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 9px 14px;
  text-decoration: none;
  font-weight: 750;
  font-size: 14px;
  background: var(--surface);
}

.nav a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 26px auto 44px;
}

.download-band,
.notice,
.panel,
.status-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.download-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  border-left: 6px solid var(--green);
}

.download-band h2,
.notice h2,
.panel h2 {
  margin-top: 6px;
  font-size: 24px;
  line-height: 1.25;
}

.download-band p,
.section-copy {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.download-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.download-button {
  min-height: 96px;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  color: var(--ink);
}

.download-button span {
  font-size: 18px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.download-button small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.download-button.primary {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.download-button.primary small {
  color: rgba(255, 255, 255, 0.82);
}

.download-button.secondary {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.download-button.secondary small {
  color: rgba(255, 255, 255, 0.82);
}

.download-button.quiet {
  background: var(--blue-soft);
  border-color: #bed2ec;
}

.download-button.script {
  background: var(--gold-soft);
  border-color: #f0d193;
}

.notice {
  display: grid;
  grid-template-columns: minmax(230px, 0.36fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 20px;
  padding: 24px;
  border-left: 6px solid var(--blue);
}

.notice ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.85;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 20px;
  background: var(--line);
}

.status-strip div {
  min-height: 96px;
  padding: 18px;
  background: var(--surface);
}

.label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-strip strong {
  display: block;
  margin-top: 8px;
  font-size: 21px;
  line-height: 1.25;
}

.panel {
  margin-top: 22px;
  padding: 24px;
}

.score-card {
  background: var(--gold-soft);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.updated {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 800;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.body-copy {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.65;
}

pre {
  margin: 16px 0 0;
  padding: 16px;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.formula {
  margin-top: 16px;
  padding: 18px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--gold);
  font-size: 18px;
  font-weight: 850;
}

.repo-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.route-grid article {
  min-height: 210px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.route-grid h3 {
  margin-top: 12px;
  font-size: 17px;
}

.route-grid p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.route-grid pre {
  margin-top: 12px;
  padding: 12px;
}

.step-no {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--green);
  font-weight: 850;
}

.path-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.path-box div {
  min-height: 70px;
  padding: 14px;
  background: var(--surface);
}

.path-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.path-box code {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.checklist ul {
  margin: 18px 0 0;
  padding-left: 20px;
  line-height: 1.85;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.rank {
  width: 42px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--gold);
  background: var(--gold-soft);
  font-weight: 850;
}

.score {
  font-weight: 850;
  color: var(--blue-dark);
}

.dataset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dataset-card {
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.dataset-id {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 8px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 12px;
  font-weight: 850;
}

.dataset-card h3 {
  margin-top: 12px;
  font-size: 22px;
}

.dataset-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

dl div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
}

dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.rule-grid article {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.rule-grid h3 {
  font-size: 17px;
}

.rule-grid p,
.faq dd {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.faq dl {
  margin-top: 18px;
}

.faq dl div {
  grid-template-columns: minmax(190px, 0.32fr) minmax(0, 1fr);
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

footer {
  width: min(1180px, calc(100% - 40px));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 920px) {
  .site-header,
  .download-band,
  .notice,
  .section-heading,
  footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .nav {
    justify-content: flex-start;
  }

  .download-actions,
  .status-strip,
  .grid.two,
  .dataset-grid,
  .route-grid,
  .path-box,
  .rule-grid {
    grid-template-columns: 1fr;
  }

  .faq dl div {
    grid-template-columns: 1fr;
  }

  main,
  footer {
    width: min(100% - 28px, 1180px);
  }
}
