:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --alt: #eef2f6;
  --text: #0f1b2a;
  --muted: #55657a;
  --border: #d8e0e9;
  --accent: #0b7a5f;
  --accent-text: #ffffff;
  --tile: #dff3ec;
  --tile-text: #0b7a5f;
  --masthead: #0b1018;
  --masthead-text: #f3f6fa;
  --masthead-muted: #a8b6c6;
  --mint: #55d6b0;
  --red: #c92f3b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1621;
    --surface: #18222f;
    --alt: #0b1018;
    --text: #f3f6fa;
    --muted: #9ba9b9;
    --border: #2b3a4c;
    --accent: #55d6b0;
    --accent-text: #10201c;
    --tile: #1d3a33;
    --tile-text: #55d6b0;
    --red: #ff7a85;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.wrap { margin: 0 auto; max-width: 860px; padding: 0 16px; }

.masthead { background: var(--masthead); color: var(--masthead-text); padding: 14px 0 20px; }
.top-row { align-items: center; display: flex; justify-content: space-between; }
.brand { font-size: 13px; font-weight: 800; letter-spacing: 2.2px; }
.total { color: var(--masthead-muted); font-size: 14px; }
.total strong { color: var(--mint); font-size: 16px; font-variant-numeric: tabular-nums; }
h1 { font-size: clamp(24px, 5vw, 32px); letter-spacing: -0.3px; line-height: 1.2; margin: 16px 0 0; }
.device-hint { color: var(--masthead-muted); margin: 6px 0 0; }

.downloads { padding: 18px 0 30px; }
.group + .group { margin-top: 22px; }
.group-title { align-items: baseline; display: flex; font-size: 17px; gap: 10px; justify-content: space-between; margin: 0 0 10px; }
.group-note { color: var(--muted); font-size: 13px; font-weight: 400; }

.files { display: grid; gap: 10px; }
.file {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  gap: 4px 12px;
  grid-template-columns: 46px 1fr;
  padding: 14px;
}
.tile {
  align-items: center;
  background: var(--tile);
  border-radius: 11px;
  color: var(--tile-text);
  display: flex;
  font-size: 21px;
  font-weight: 800;
  height: 46px;
  justify-content: center;
  width: 46px;
}
.file h3 { font-size: 18px; line-height: 1.25; margin: 0; }
.audience { color: var(--accent); font-size: 14px; font-weight: 600; margin: 1px 0 0; }
.file-meta { color: var(--muted); font-size: 13px; grid-column: 1 / -1; margin: 6px 0 0; overflow-wrap: anywhere; }
.file-name { color: var(--text); font-family: Consolas, Menlo, monospace; font-size: 13px; }
.download {
  background: var(--accent);
  border-radius: 10px;
  color: var(--accent-text);
  display: block;
  font-size: 16px;
  font-weight: 700;
  grid-column: 1 / -1;
  margin-top: 8px;
  min-height: 48px;
  padding: 12px 22px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.download:hover { filter: brightness(1.08); }

.unavailable { list-style: none; margin: 0; padding: 0; }
.unavailable li { border-bottom: 1px solid var(--border); display: flex; font-size: 15px; gap: 12px; justify-content: space-between; padding: 10px 2px; }
.unavailable li:last-child { border-bottom: 0; }
.unavailable-note { color: var(--muted); font-size: 14px; text-align: right; }

.guide-link { color: var(--accent); display: inline-block; font-weight: 600; margin-top: 12px; padding: 6px 0; }

.section { padding: 40px 0; }
.section.alt { background: var(--alt); }
h2 { font-size: 24px; line-height: 1.25; margin: 0 0 18px; }

.two-col { display: grid; gap: 28px; grid-template-columns: 1fr; }
.steps { margin: 0; padding-left: 22px; }
.steps li { margin-bottom: 10px; padding-left: 4px; }
.steps code { font-family: Consolas, Menlo, monospace; font-size: 14px; overflow-wrap: anywhere; }
.notes { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.notes h3 { font-size: 18px; margin: 0 0 10px; }
.notes p { color: var(--muted); margin: 0 0 12px; }
.notes p:last-child { margin-bottom: 0; }
.notes strong { color: var(--red); }

.table-scroll { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; }
table { border-collapse: collapse; min-width: 720px; width: 100%; }
th, td { border-bottom: 1px solid var(--border); font-size: 14px; padding: 12px 14px; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td.number { font-variant-numeric: tabular-nums; }
.hash { color: var(--muted); font-family: Consolas, Menlo, monospace; font-size: 12px; }
.copy {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  margin-left: 8px;
  padding: 3px 8px;
}

.error { color: var(--red); font-weight: 600; }
.footer { color: var(--muted); font-size: 14px; padding-bottom: 26px; padding-top: 26px; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }

@media (min-width: 640px) {
  .masthead { padding-bottom: 26px; }
  .downloads { padding-top: 24px; }
  .file { grid-template-columns: 46px 1fr auto; }
  .file-meta { grid-column: 2 / 3; margin-top: 2px; }
  .download { grid-column: 3; grid-row: 1 / span 2; margin-top: 0; }
  .two-col { grid-template-columns: 3fr 2fr; }
}

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