:root {
  --bg: #fbfbfa; --surface: #ffffff; --text: #1b1d21; --muted: #5d636e; --border: #dfe1e5;
  --accent: #1f5fd1; --accent-text: #ffffff; --accent-soft: #e8effc;
  --code-bg: #f1f2f4; --warn: #9a3a00; --warn-bg: #fff3e8; --pre: #6b3fb5; --pre-bg: #f1eafc;
  --ok: #17703a; --ok-bg: #e6f5ec;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131417; --surface: #1b1d21; --text: #e7e8ea; --muted: #a0a5ae; --border: #30333a;
    --accent: #7aa7ff; --accent-text: #0d1220; --accent-soft: #1d2a45;
    --code-bg: #23262c; --warn: #ffb17a; --warn-bg: #3a2414; --pre: #c7a8ff; --pre-bg: #2c2240;
    --ok: #7fd9a0; --ok-bg: #16301f;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, pre, kbd { font-family: var(--mono); font-size: .9em; }
h1, h2, h3 { line-height: 1.25; }
h2 { font-size: 1.25rem; margin: 2.2rem 0 .8rem; }
.wrap { max-width: 56rem; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
[hidden] { display: none !important; }
.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; }

.top { border-bottom: 1px solid var(--border); background: var(--surface); }
.top .wrap { padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: inline-flex; gap: .5rem; align-items: center; font-weight: 650; color: var(--text); text-decoration: none; }
.foot { margin-top: 3rem; padding-top: 1rem; padding-bottom: 2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .875rem; }
.page-title { margin: 1.6rem 0 1rem; font-size: 1.6rem; }

/* Home cards */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: .4rem; height: 100%; padding: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); text-decoration: none;
}
.card:hover { border-color: var(--accent); }
.card-head { display: flex; gap: .7rem; align-items: center; }
.card-name { font-weight: 650; font-size: 1.1rem; }
.card-tagline { color: var(--muted); }
.card-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; font-size: .875rem; color: var(--muted); }
.icon { width: 40px; height: 40px; border-radius: 9px; flex: none; object-fit: cover; }
.icon-letter { display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 1.2rem; }
.ver { font-family: var(--mono); font-weight: 600; color: var(--text); }

/* Badges and notes */
.badge { display: inline-block; padding: .05rem .45rem; border-radius: 99px; font-size: .75rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.badge.pre { color: var(--pre); background: var(--pre-bg); }
.badge.warn { color: var(--warn); background: var(--warn-bg); }
.badge.latest { color: var(--ok); background: var(--ok-bg); }
.note, .warning { padding: .6rem .8rem; border-radius: 8px; }
.note { background: var(--pre-bg); color: var(--pre); }
.warning { background: var(--warn-bg); color: var(--warn); }

/* App page */
.hero { margin: 1.6rem 0 1rem; }
.hero-head { display: flex; gap: .9rem; align-items: center; }
.hero h1 { margin: 0; font-size: 1.9rem; }
.tagline { margin: .15rem 0 0; color: var(--muted); font-size: 1.1rem; }
.links { display: flex; flex-wrap: wrap; gap: 0 1rem; align-items: center; margin: .5rem 0 0; color: var(--muted); }
.links a:not(.badge), .foot a, #dl-alt a { display: inline-flex; align-items: center; min-height: 40px; }

.download { margin: 1.2rem 0; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.download > .note { margin-top: 0; }
.dl-main p { margin: .45rem 0 0; }
.btn {
  display: inline-block; padding: .55rem 1rem; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-text); font-weight: 600; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn-big { font-size: 1.1rem; padding: .75rem 1.4rem; max-width: 100%; }
.dl-choose { margin-top: .8rem; }
.dl-main:not([hidden]) + .dl-choose { margin-top: 1rem; }
.dl-choose summary { cursor: pointer; color: var(--muted); }
summary { padding: .55rem 0; }
.dl-note { margin: 0 0 .4rem; }
.dl-note + .dl-choose { margin-top: 0; }
.choices { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.choice { display: flex; flex-direction: column; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--text); }
.choice:hover, .choice.match { border-color: var(--accent); }
.choice-platform { font-weight: 600; }

.label { margin: 1rem 0 .35rem; font-size: .9rem; color: var(--muted); }
.cmd {
  display: flex; align-items: center; gap: .5rem; padding: .55rem .6rem .55rem .8rem;
  background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px;
}
.cmd + .cmd { margin-top: .5rem; }
/* Commands stay on one line and scroll inside their box (the Copy button stays outside the scroller). */
.cmd code { flex: 1; min-width: 0; white-space: pre; overflow-x: auto; overflow-wrap: normal; padding: .3rem 0; }
.fpr { letter-spacing: .02em; overflow-wrap: normal; }
.fpr-half, .fpr-g { white-space: nowrap; }
.fpr-half { display: inline-block; }
.cmd-fpr code { white-space: normal; overflow-x: visible; }
.expect { margin-top: 1rem; padding: .1rem .8rem; border-left: 3px solid var(--border); }
.expect p { margin: .5rem 0; }
.retired { margin: .3rem 0 0; padding-left: 1.2rem; }
.copy {
  display: none; flex: none; font: inherit; font-size: .8rem; padding: .2rem .7rem; min-height: 40px; min-width: 40px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text);
}
.js .copy { display: inline-block; }
.copy:hover { border-color: var(--accent); }
.copy.done { color: var(--ok); border-color: var(--ok); }
.copy-sm { padding: .05rem .5rem; font-size: .75rem; }

.prose { margin-top: 1.5rem; }
.prose pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: .7rem .8rem; overflow-x: auto; }
.prose :not(pre) > code { background: var(--code-bg); padding: .1em .3em; border-radius: 4px; }
.prose h1 { font-size: 1.4rem; } .prose h2 { font-size: 1.2rem; } .prose h3 { font-size: 1.05rem; }
.notes h1, .notes h2, .notes h3, .notes h4 { font-size: 1rem; margin: .8rem 0 .3rem; }
.notes > :first-child { margin-top: 0; }
.prose img { max-width: 100%; height: auto; }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: .3rem .6rem; }
.prose blockquote { margin-left: 0; padding-left: 1rem; border-left: 3px solid var(--border); color: var(--muted); }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.files { width: 100%; border-collapse: collapse; font-size: .9rem; }
.files th, .files td { padding: .45rem .6rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.files tr:last-child td { border-bottom: 0; }
.files th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.files .num { white-space: nowrap; }
.files .fname { white-space: nowrap; overflow-wrap: normal; }
.files a { display: inline-flex; align-items: center; min-height: 40px; }
.hash { display: inline-flex; gap: .4rem; align-items: center; white-space: nowrap; }

.release { padding: 1rem 0; border-top: 1px solid var(--border); }
.release header { display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: baseline; }
.release h3 { margin: 0; font-family: var(--mono); font-size: 1.05rem; }
.release time { color: var(--muted); font-size: .9rem; }
.release .notes { margin-top: .6rem; }
.release details { margin-top: .6rem; }
.release summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.release details .table-scroll { margin-top: .5rem; }
.release.withdrawn h3 { text-decoration: line-through; color: var(--muted); }

.error { text-align: center; padding: 3rem 0; }
.error .status { font-family: var(--mono); font-size: 3rem; margin: 0; color: var(--muted); }
.error h1 { margin: .2rem 0 .6rem; }

@media (max-width: 30rem) {
  .hero h1 { font-size: 1.5rem; }
  .btn-big { display: block; text-align: center; }
}
/* Narrow screens: one card per file. Line 1: name and platform; line 2: size, hash + Copy, .asc. */
@media (max-width: 35rem) {
  .table-scroll { overflow-x: visible; }
  .files, .files tbody { display: block; }
  .files thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .files tr { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .8rem; padding: .35rem .7rem; border-bottom: 1px solid var(--border); }
  .files tr:last-child { border-bottom: 0; }
  .files tr::after { content: ""; flex-basis: 100%; order: 2; }
  .files td { display: block; padding: 0; border: 0; }
  .files .fname { order: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
  .files .plat { order: 1; color: var(--muted); }
  .files .size, .files .sha, .files .sig { order: 3; }
}
