:root {
  --ink: #1d2024;
  --muted: #5a6068;
  --paper: #ffffff;
  --panel: #f4f5f6;
  --line: #dde0e3;
  --slate: #4a4f55;
  --accent: #a35200;        /* the icon's orange, darkened for text contrast on white */
  --accent-fill: #f28c28;
  --accent-ink: #1d2024;
  --error: #b3261e;
  --radius: 10px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaed;
    --muted: #a9b0b8;
    --paper: #17191c;
    --panel: #212429;
    --line: #353a40;
    --accent: #f5a04f;
    --error: #ff8a80;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.wrap { max-width: 52rem; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent-fill);
  outline-offset: 2px;
}

code, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-size: 0.9em; }

/* Header */
.hero { background: var(--slate); color: #f4f5f6; padding: 2.5rem 0 2rem; }
.brand { display: flex; align-items: center; gap: 0.9rem; }
.brand img { border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15); }
.brand h1 { margin: 0; font-size: 2.25rem; letter-spacing: -0.01em; }
.tagline { font-size: 1.2rem; margin: 1rem 0 1.25rem; max-width: 40rem; }
.capabilities { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.capabilities li::marker { color: var(--accent-fill); }

main { padding: 2rem 1.25rem 3rem; }
main h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; }

/* Release cards */
.release {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.25rem 1.25rem 1rem;
}
.release-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.release-head h3 { margin: 0; font-size: 1.25rem; }
.release-date { color: var(--muted); }
.notes { margin: 0.75rem 0 1rem; }
.notes h3, .notes h4, .notes h5, .notes h6 { font-size: 1rem; margin: 1rem 0 0.25rem; }
.notes p, .notes ul, .notes ol { margin: 0.4rem 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1rem; margin: 0 0 1rem; font-size: 0.92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  background: var(--accent-fill);
  color: var(--accent-ink);
}
button:hover { filter: brightness(1.05); }
button:disabled { opacity: 0.6; cursor: progress; }
button.secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

/* Previous versions */
.previous details { border-top: 1px solid var(--line); }
.previous details:last-child { border-bottom: 1px solid var(--line); }
.previous summary { cursor: pointer; padding: 0.75rem 0.25rem; display: flex; justify-content: space-between; gap: 1rem; }
.previous summary .release-date { font-weight: normal; }
.previous summary strong { font-weight: 600; }
.previous details > .release { margin: 0 0 1rem; }
.empty { color: var(--muted); }

.install-note p { max-width: 44rem; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; padding: 1.5rem 0 2.5rem; }
footer p { margin: 0.25rem 0; }

/* Licence dialog */
dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: min(28rem, calc(100vw - 2rem));
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog h2 { margin: 0 0 1rem; font-size: 1.2rem; }
dialog label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
dialog input[type="text"] {
  width: 100%;
  font: inherit;
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}
dialog .remember { font-weight: normal; margin: 0.75rem 0 0; display: flex; gap: 0.5rem; align-items: center; }
.status { min-height: 1.5em; margin: 0.75rem 0; }
.status.error, .error { color: var(--error); }
.actions { display: flex; justify-content: flex-end; gap: 0.6rem; }

@media (max-width: 30rem) {
  .brand h1 { font-size: 1.9rem; }
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: 0.4rem; }
}

@media (prefers-reduced-motion: no-preference) {
  button { transition: filter 0.15s; }
}
