:root {
  --bg: #0F0F0F;
  --surface: #1C1C1F;
  --surface-2: #252529;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #E6E6E6;
  --muted: #9C9CA3;
  --accent: #22D3EE;
  --accent-text: #061A1F;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  --gutter: 16px;
  --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

h1, h2, h3 { margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.015em; font-weight: 600; }
h1 { font-size: clamp(1.75rem, 1.1rem + 2.8vw, 2.75rem); max-width: 22ch; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}
pre {
  margin: 0.75em 0 1.25em;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: calc(var(--max) + 100px); }
.narrow { max-width: 760px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.brand img { display: block; border-radius: 7px; }
.site-nav { display: flex; align-items: center; gap: 20px; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--text); }
.site-nav a.btn { color: var(--accent-text); }
@media (max-width: 560px) {
  .site-nav { gap: 14px; }
  .site-nav a:not(.btn):not([href*="github"]) { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.btn-small { padding: 6px 12px; font-size: 0.9rem; }
.btn-large { padding: 13px 22px; font-size: 1.05rem; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: #4ADEF5; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.3); }

/* Hero */
.hero { padding: 72px 0 48px; }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin-top: 1.1rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.75rem; }
.cta-note { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }
.cta-note a { color: var(--muted); }
@media (max-width: 480px) {
  .cta-row .btn { width: 100%; white-space: normal; text-align: center; }
}

.shot { margin: 56px 0 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  background: var(--surface);
}
.shot figcaption { color: var(--muted); font-size: 0.9rem; text-align: center; margin-top: 14px; }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { margin-bottom: 1.25rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin-top: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 20px 8px;
  transition: border-color 120ms ease;
}
.card:hover { border-color: var(--border-strong); }
.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--muted); font-size: 0.97rem; }
.section-alt .card, .section-alt pre { background: var(--bg); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 24px; } }

ul.plain { padding-left: 1.2em; margin: 0 0 1em; }
ul.plain li { margin-bottom: 0.45em; }

.checklist { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.checklist li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-top: 1px solid var(--border);
}
.checklist li:last-child { border-bottom: 1px solid var(--border); }
.checklist li::before {
  content: "";
  position: absolute; left: 4px; top: 19px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}

#install h3 { margin-top: 1.5rem; }
#install .split h3 { margin-top: 0; }

/* Footer */
.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 18px; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.fineprint { max-width: 70ch; margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Changelog: a timeline, one node per release, entries tagged by kind. */
.changelog h1 { margin-bottom: 0.4rem; }
.changelog .lede { margin-bottom: 2.5rem; max-width: 62ch; }
.timeline { position: relative; }
.release { display: grid; grid-template-columns: 28px 180px minmax(0, 1fr); gap: 0 20px; padding: 0 0 2.75rem; }
.release-rail { position: relative; }
.release-rail::before { content: ""; position: absolute; left: 13px; top: 0; bottom: -2.75rem; width: 2px; background: var(--border-strong); }
.release:last-child .release-rail::before { bottom: 0; }
.node { position: relative; z-index: 1; display: block; width: 14px; height: 14px; margin: 0.45rem 0 0 7px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--muted); }
.release:first-child .node { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.release-meta h2 { font-size: 1.6rem; margin: 0; line-height: 1.2; }
.release-meta h2 a { color: inherit; text-decoration: none; }
.release-meta h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.release-meta p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9rem; }
.release-meta .badge { display: inline-block; margin-top: 0.5rem; }
.badge { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.2rem 0.55rem; border-radius: 999px; }
.badge-latest { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.release-body { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0.4rem 1.1rem; }
.release-intro { margin: 0.8rem 0; }
.entries { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 0.85rem 0; border-top: 1px solid var(--border); line-height: 1.55; }
.entry:first-child { border-top: 0; }
.entry-text strong { color: var(--text); }
.entry-text code { font-size: 0.9em; }
.chip { align-self: start; margin-top: 0.15rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; text-align: center; padding: 0.22rem 0; border-radius: 6px; }
.chip-added { color: #4ade80; background: rgba(74, 222, 128, 0.12); }
.chip-changed { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }
.chip-fixed { color: #60a5fa; background: rgba(96, 165, 250, 0.12); }
@media (max-width: 760px) {
  .release { grid-template-columns: 22px minmax(0, 1fr); gap: 0 14px; }
  .release-rail::before { left: 10px; }
  .node { margin-left: 4px; }
  .release-meta { grid-column: 2; }
  .release-body { grid-column: 2; margin-top: 0.9rem; }
  .entry { grid-template-columns: 1fr; gap: 6px; }
  .chip { justify-self: start; padding: 0.22rem 0.55rem; }
}

/* Comparison pages */
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
.compare h1 { max-width: 26ch; }
.compare .lede { font-size: 1.1rem; color: var(--muted); max-width: 66ch; margin: 1rem 0 0; }
.compare .cta-row { margin: 1.6rem 0 2.6rem; }
.compare h2 { margin: 2.4rem 0 1rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.compare-table th, .compare-table td { text-align: left; vertical-align: top; padding: 0.75rem 0.9rem; border-top: 1px solid var(--border); }
.compare-table thead th { border-top: 0; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.compare-table thead th:nth-child(2) { color: var(--accent); }
.compare-table tbody th { font-weight: 600; width: 24%; color: var(--text); }
.compare-table td:nth-child(2) { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.compare .split { margin-top: 1rem; }
.compare .card h2 { margin: 0 0 0.6rem; font-size: 1.15rem; }
.compare .card ul { margin: 0; padding-left: 1.1rem; }
.compare .card li { margin: 0.4rem 0; line-height: 1.5; }
.compare details { border-top: 1px solid var(--border); padding: 0.8rem 0; }
.compare details:last-of-type { border-bottom: 1px solid var(--border); }
.compare summary { cursor: pointer; font-weight: 600; }
.compare details p { margin: 0.6rem 0 0; color: var(--muted); }
.footer-compare { margin-top: 0.6rem; }
.footer-compare .muted { margin-right: 0.25rem; }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 1rem; }
.compare-grid a { display: block; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; }
.compare-grid a:hover { border-color: var(--border-strong); }
.compare-grid span { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }

.section-lede { max-width: 62ch; margin: -0.4rem 0 1.6rem; }
.diff-grid .card h3 { color: var(--accent); }

/* Comparison visuals */
.mark { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 0.8rem; font-weight: 700; vertical-align: middle; }
.mark.yes { color: #4ade80; background: rgba(74, 222, 128, 0.14); }
.mark.no { color: #f87171; background: rgba(248, 113, 113, 0.12); }
.mark.partial { color: #fbbf24; background: rgba(251, 191, 36, 0.14); }
.glance { margin: 0 0 2rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.glance-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px; align-items: center; padding: 0.6rem 1rem; border-top: 1px solid var(--border); }
.glance-row:first-child { border-top: 0; }
.glance-row .mark { justify-self: center; }
.glance-head { background: var(--surface-2); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.glance-head span:nth-child(2) { color: var(--accent); text-align: center; }
.glance-head span:nth-child(3) { text-align: center; }
.compare-shot { margin: 0 0 1rem; }
.compare-shot img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border-strong); }
.pick h2 { display: flex; align-items: center; gap: 0.5rem; }
.pick-icon { display: inline-flex; width: 28px; height: 28px; border-radius: 8px; align-items: center; justify-content: center; font-size: 0.95rem; }
.pick-other .pick-icon { background: var(--surface-2); color: var(--muted); }
.pick-omux { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.pick-omux .pick-icon { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
@media (max-width: 480px) { .glance-row { grid-template-columns: minmax(0, 1fr) 56px 56px; } }

/* Card icons */
.card .icon { display: block; width: 38px; height: 38px; padding: 8px; margin-bottom: 0.85rem; border-radius: 10px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card .icon use { stroke: inherit; }
