:root {
  --bg: #fafaf7;
  --ink: #26241d;
  --muted: #7a7468;
  --faint: #a8a294;
  --line: #e4e0d5;
  --card: #ffffff;
  --accent: #a6691e;
  --accent-ink: #ffffff;
  --code-bg: #f1efe7;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171512;
    --ink: #e8e4da;
    --muted: #9a9384;
    --faint: #6b6558;
    --line: #2c2921;
    --card: #1e1b16;
    --accent: #d9a24c;
    --accent-ink: #171512;
    --code-bg: #211e18;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* header */
header { margin-bottom: 3.5rem; }
.mark {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
}
.mark .tld { color: var(--accent); }
.tagline {
  margin: 0.4rem 0 0;
  color: var(--muted);
  max-width: 38rem;
}
.buildline {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.version {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 0.1rem 0.6rem;
  border-radius: 3px;
}
.buildmeta { color: var(--muted); }

/* sections */
section { margin-top: 3.2rem; }
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  margin: 0 0 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.eyebrow small {
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--faint);
}

/* firmware cards */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }
.fw {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 4px;
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.fw-head { display: flex; justify-content: space-between; align-items: baseline; }
.fw-model { font-weight: 700; font-size: 15px; }
.fw-chip { color: var(--muted); font-size: 12px; letter-spacing: 0.06em; }
.fw-file {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.fw-hash {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.fw-hash code { color: var(--muted); }
.copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 0.45rem;
  cursor: pointer;
  line-height: 1.6;
}
.copy:hover { color: var(--accent); border-color: var(--accent); }
.dl {
  margin-top: 0.3rem;
  display: inline-block;
  align-self: flex-start;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 0.32rem 0.9rem;
  border-radius: 3px;
}
.dl:hover { text-decoration: none; filter: brightness(1.08); }
.dl::after { content: " \2193"; }

/* flash instructions */
details {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  margin-bottom: 0.6rem;
}
summary {
  cursor: pointer;
  padding: 0.55rem 1rem;
  font-weight: 700;
  list-style: none;
}
summary::before { content: "\25B8 "; color: var(--accent); }
details[open] summary::before { content: "\25BE "; }
.flash-body { padding: 0 1rem 0.9rem; color: var(--muted); }
pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.7rem 0.9rem;
  overflow-x: auto;
  margin: 0.5rem 0;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.6;
}
.flash-note { font-size: 12px; }

/* manifests + archive */
.filelist { list-style: none; margin: 0; padding: 0; }
.filelist li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--line);
}
.filelist li:last-child { border-bottom: none; }
.filelist .desc { color: var(--faint); font-size: 12px; text-align: right; }
.years {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.years a {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 3px;
  padding: 0.25rem 0.8rem;
}
.years a:hover { border-color: var(--accent); text-decoration: none; }
.years a.now { border-color: var(--accent); font-weight: 700; }
.archive-note { color: var(--faint); font-size: 12px; margin-top: 0.8rem; }

footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.err { color: #b3452e; }
