:root {
    --bg: #f6f4ef;
    --panel: #ffffff;
    --text: #23211d;
    --muted: #6b665c;
    --line: #e2ddd2;
    --accent: #b8551f;
    --accent-text: #ffffff;
    --code: #efebe2;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16140f;
        --panel: #1f1c16;
        --text: #ebe6dc;
        --muted: #a39d90;
        --line: #36322a;
        --accent: #e07a3c;
        --accent-text: #16140f;
        --code: #2a261f;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

header.site { border-bottom: 1px solid var(--line); background: var(--panel); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 20px; letter-spacing: 0.01em; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; }
nav a:first-child { margin-left: 0; }
nav a:hover, nav a.here { color: var(--text); }

.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 0 0 12px; }
.hero p { color: var(--muted); font-size: 18px; margin: 0; max-width: 640px; }

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px 22px;
    margin: 24px 0;
}
.download { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.download .what { min-width: 0; }
.download .what strong { display: block; font-size: 18px; }
.download .what small { color: var(--muted); }
.button {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-text);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    white-space: nowrap;
}
.buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.button.secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }

h2 { font-size: 22px; margin: 40px 0 8px; }
h3 { font-size: 17px; margin: 24px 0 6px; }
section p, section li { color: var(--text); }
ul { padding-left: 22px; }
li { margin: 4px 0; }
.muted { color: var(--muted); }
code { background: var(--code); padding: 1px 6px; border-radius: 4px; font-size: 0.92em; }
ol.steps li { margin: 8px 0; }

table.builds { width: 100%; border-collapse: collapse; }
table.builds td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.builds td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }

.release { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 28px; }
.release:first-of-type { border-top: 0; }
.release h2 { margin-top: 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.release h2 small { font-size: 14px; font-weight: 400; color: var(--muted); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent); border-radius: 999px; padding: 1px 9px; margin-left: 8px; vertical-align: middle; }

.slides { position: relative; width: 100%; max-width: 860px; margin: 8px auto 24px; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--line); aspect-ratio: 16 / 10; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 0.6s ease; }
.slide.on { opacity: 1; }
.slide img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; margin: 0 auto; }
.slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 16px 26px; color: #fff; font-size: 14px; text-align: center; background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); }
.slides .prev, .slides .next { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 26px; line-height: 38px; cursor: pointer; }
.slides .prev { left: 10px; }
.slides .next { right: 10px; }
.slides .prev:hover, .slides .next:hover { background: rgba(0, 0, 0, 0.7); }
.slides .dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; }
.slides .dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.45); cursor: pointer; }
.slides .dots button[aria-current] { background: #fff; }
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }

/* Before/after slider: the HD shot over the original, clipped from the left at --pos. */
.compare { margin: 8px 0 24px; }
.compare-box { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--line); touch-action: none; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
.compare-box.zoomed { cursor: grab; }
.compare-box.panning { cursor: grabbing; }
/* Both layers fill the box; their images share one zoom and pan (transform set by the script). */
.compare-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.compare-layer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: 0 0; }
.compare-after { clip-path: inset(0 0 0 var(--pos)); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, 0.6); cursor: ew-resize; }
.compare-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -14px; right: -14px; }
.compare-handle::after { content: "\2039\00a0\203A"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); border: 2px solid #fff; color: #fff; font-size: 20px; line-height: 34px; text-align: center; }
/* The range input: the keyboard's way to move the divide (focusable, not seen). */
.compare-range { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: 0; overflow: hidden; pointer-events: none; }
.compare-box:focus-within .compare-handle::after { outline: 2px solid var(--accent); outline-offset: 2px; }
.compare-tools { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.compare-tools button { min-width: 34px; height: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, 0.55); color: #fff; font: 600 16px/34px system-ui, sans-serif; cursor: pointer; }
.compare-tools button:hover { background: rgba(0, 0, 0, 0.8); }
.compare-label { position: absolute; top: 10px; padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 13px; pointer-events: none; }
.compare-label.left { left: 10px; }
.compare-label.right { right: 10px; top: 36px; }
.compare figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 8px; }

footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 20px 0 40px; color: var(--muted); font-size: 14px; }
