:root {
    color-scheme: dark;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --page: #1b2531;
    --surface: #243140;
    --raised: #2b3a4b;
    --text: #f1f3f5;
    --muted: #b9c7d6;
    --line: #45566a;
    --accent: #edbd73;
    --badge: #ff737b;
    --radius: 8px;
    --content-width: 1120px;
    background: var(--page);
    color: var(--text);
    font-synthesis: none;
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.65; overflow-wrap: break-word; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: #ffe0ae; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
button { font: inherit; }
.wrap { width: min(var(--content-width), calc(100% - 64px)); margin-inline: auto; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.15; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.035em; }
h3 { font-size: 1.55rem; letter-spacing: -.025em; }
p { color: var(--muted); }
strong { color: var(--text); font-weight: 650; }
.small, .note { font-size: .875rem; line-height: 1.65; }
.note { color: var(--muted); margin: 20px 0 0; }
.eyebrow { color: var(--accent); font-size: .8rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 20px; }
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 10; padding: 12px 20px; background: var(--text); color: var(--page); }
.skip-link:focus { top: 12px; color: var(--page); }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 28px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-size: 1.05rem; font-weight: 750; text-decoration: none; }
.flag { flex: none; display: inline-block; width: 24px; height: 24px; background: conic-gradient(var(--accent) 25%, transparent 0 50%, var(--accent) 0 75%, transparent 0) 0 0 / 12px 12px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 26px; }
.site-header nav a { font-size: .875rem; color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; gap: 72px; padding-block: 76px 84px; }
h1 { font-size: clamp(3.5rem, 6.5vw, 5.4rem); letter-spacing: -.055em; line-height: 1; margin-bottom: 24px; overflow-wrap: anywhere; }
h1 span { color: var(--accent); }
.intro { font-size: 1.15rem; margin-bottom: 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: .9375rem; font-weight: 650; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--raised); color: var(--text); border-color: var(--muted); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #21272e; }
.button.primary:hover { background: #f6cd8e; border-color: #f6cd8e; }
.compatibility { padding: 32px; border: 1px solid var(--line); border-top: 4px solid var(--accent); background: var(--surface); border-radius: var(--radius); }
.compatibility .eyebrow { margin-bottom: 8px; }
.compatibility-number { font-size: 5.5rem; color: var(--accent); font-weight: 800; letter-spacing: -.06em; line-height: 1.1; margin: 0 0 14px; }
.compatibility-number span { font-size: 3rem; }
.compatibility h2 { font-size: 1.5rem; margin-bottom: 16px; letter-spacing: -.025em; }
.compatibility p:last-child { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }

.section-heading { margin-bottom: 34px; }
.section-heading .eyebrow { margin-bottom: 12px; }
.section-heading h2 { margin-bottom: 14px; }
.section-heading p:last-child { max-width: 760px; margin-bottom: 0; }
.graphics { padding-bottom: 76px; }
.graphics-comparison { --comparison-position: 50%; --comparison-handle-size: 44px; --comparison-arrow-size: 32px; --comparison-line-width: 3px; margin: 0; }
.comparison-image { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.comparison-interactive { cursor: ew-resize; touch-action: pan-y; user-select: none; }
.comparison-image img { display: block; width: 100%; height: auto; user-select: none; }
.comparison-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--comparison-position)) 0 0); }
.comparison-before img { image-rendering: pixelated; }
.comparison-label { position: absolute; top: 16px; right: 16px; padding: 4px 12px; border-radius: 4px; background: var(--page); color: var(--text); font-size: .8125rem; font-weight: 700; pointer-events: none; }
.comparison-before .comparison-label { right: auto; left: 16px; }
.comparison-divider { position: absolute; inset: 0; pointer-events: none; }
.comparison-divider::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(0px, calc(var(--comparison-position) - var(--comparison-line-width) / 2), calc(100% - var(--comparison-line-width))); width: var(--comparison-line-width); background: var(--text); box-shadow: 0 0 4px var(--page); }
.comparison-divider span { position: absolute; top: 50%; left: clamp(calc(var(--comparison-handle-size) / 2), var(--comparison-position), calc(100% - var(--comparison-handle-size) / 2)); transform: translate(-50%, -50%); display: grid; place-items: center; width: var(--comparison-handle-size); height: var(--comparison-handle-size); border: var(--comparison-line-width) solid var(--text); border-radius: 50%; background: var(--page); color: var(--text); }
.comparison-divider svg { display: block; width: var(--comparison-arrow-size); height: var(--comparison-arrow-size); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.comparison-slider { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.comparison-image:focus-within { outline: 3px solid var(--accent); outline-offset: 5px; }
.graphics-comparison figcaption { margin-top: 16px; font-size: .875rem; }
.graphics-comparison figcaption p { margin-bottom: 6px; }
.graphics-comparison figcaption p:last-child { margin-bottom: 0; }

.feature { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; padding: 34px 0; border-top: 1px solid var(--line); }
.section-number { display: block; color: var(--accent); font-size: .8125rem; letter-spacing: .1em; font-weight: 700; margin-bottom: 12px; }
.feature-title h3 { margin-bottom: 10px; }
.feature-title p { font-size: .875rem; line-height: 1.5; margin-bottom: 12px; }
.feature-content { padding-top: 3px; }
ul { margin: 0; padding-left: 1.15em; }
li { padding-left: .25em; margin-bottom: 9px; }
li:last-child { margin-bottom: 0; }
li::marker { color: var(--accent); }
li ul { margin-top: 10px; color: var(--muted); }
.two-columns { columns: 2; column-gap: 32px; }
.two-columns li { break-inside: avoid; margin-bottom: 13px; }
.feature-lead { margin-bottom: 14px; }
kbd, code { font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace; font-size: .87em; }
kbd { display: inline-block; background: var(--raised); border: 1px solid #64758a; border-bottom-width: 2px; padding: 0 6px; border-radius: 4px; line-height: 1.6; white-space: nowrap; }
code { color: #f6d59e; overflow-wrap: anywhere; }
.label { display: inline-block; padding: 4px 9px; border: 1px solid var(--accent); border-radius: 4px; font-size: .75rem; font-weight: 800; letter-spacing: .04em; }
.warning { color: var(--accent); background: #34332f; }

.downloads { padding-top: 76px; }
.download-notice { padding: 15px 18px; border-left: 3px solid var(--accent); background: var(--surface); color: var(--muted); margin-bottom: 22px; }
.badge-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .875rem; margin-bottom: 24px; }
.bits-example { color: var(--badge); font-weight: 800; }
.badge-divider { margin-inline: 8px; }
.package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.package { display: flex; align-items: center; gap: 16px; padding: 20px 16px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.package[aria-disabled="true"] { cursor: default; }
.package[aria-disabled="true"]:hover { color: var(--text); }
.package[href]:hover { border-color: var(--accent); background: var(--raised); color: var(--text); }
.platform-icon { position: relative; display: block; width: 76px; height: 80px; flex: none; }
.platform-icon img { display: block; width: 58px; height: 58px; object-fit: contain; margin: 2px auto 0; }
.platform-icon .pixel-icon { image-rendering: pixelated; }
.bits { position: absolute; bottom: -2px; right: 0; color: var(--badge); background: var(--surface); padding: 0 3px; font-size: 1.5rem; line-height: 1; font-weight: 900; }
.no-sse2 { display: inline-flex; align-items: center; justify-content: center; position: absolute; left: 0; bottom: -2px; width: 37px; height: 37px; color: var(--badge); border: 2px solid currentColor; border-radius: 50%; background: transparent; font-size: 10px; line-height: 1; font-weight: 800; }
.no-sse2::after { content: ""; position: absolute; width: 100%; height: 2px; background: currentColor; transform: rotate(-45deg); }
.legend-badge { position: relative; bottom: auto; left: auto; margin-inline: 4px; flex: none; }
.package-info { display: flex; min-width: 0; flex-direction: column; overflow-wrap: anywhere; }
.package-name { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.package-arch { font-size: .875rem; color: var(--text); }
.package-requirement { color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.package-status { color: var(--accent); font-size: .8125rem; font-weight: 650; margin-top: 8px; }

.play { padding-block: 76px; }
.player-panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.player-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 22px; border-bottom: 1px solid var(--line); font-size: .875rem; }
.player-toolbar > span { display: inline-flex; gap: 12px; align-items: center; font-weight: 650; }
.player-toolbar .flag { width: 20px; height: 20px; background-size: 10px 10px; }
.player-start { text-align: center; padding: 46px 24px 34px; }
.play-key { display: inline-flex; justify-content: center; align-items: center; width: 56px; height: 56px; color: var(--accent); border: 1px solid var(--line); border-radius: 12px; padding-left: 3px; margin-bottom: 24px; }
.player-start h3 { margin-bottom: 12px; }
.player-start p { max-width: 500px; margin-inline: auto; }
.player-start .small { margin: 18px auto 0; }
.player-status { padding: 12px 22px; margin: 0; font-size: .875rem; }
#game-frame { display: block; width: 100%; height: 960px; border: 0; background: #121820; }
.site-footer { border-top: 1px solid var(--line); padding-block: 28px 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; }
.site-footer p { font-size: .875rem; margin-bottom: 0; }
.site-footer nav { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 24px; font-size: .8125rem; }

.site-header nav a[aria-current="page"] { color: var(--accent); }
.guide { --guide-gap: 32px; --guide-section-space: 48px; }
.guide-intro { padding-block: var(--guide-section-space); max-width: 880px; }
.guide-intro h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
.guide-intro .intro { margin-bottom: 18px; }
.guide-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 24px; font-size: .875rem; }
.guide-section { padding-block: var(--guide-section-space); border-top: 1px solid var(--line); }
.guide-section .section-heading { margin-bottom: 24px; }
.guide-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: var(--guide-gap); margin: 0; }
.guide-list > div { min-width: 0; }
.guide-list dt { font-size: 1.0625rem; font-weight: 650; line-height: 1.55; margin-bottom: 8px; }
.guide-list dd { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.7; }
.guide-callout { padding: 16px 20px; border-left: 3px solid var(--accent); background: var(--surface); margin-bottom: var(--guide-gap); }

@media (max-width: 960px) {
    .hero { gap: 32px; }
    .feature { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
    .two-columns { columns: 1; }
    .package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .wrap { width: calc(100% - 36px); }
    .site-header { flex-direction: column; align-items: flex-start; gap: 18px; padding-block: 22px; }
    .site-header nav { gap: 24px; }
    .hero { grid-template-columns: minmax(0, 1fr); padding-block: 42px 54px; gap: 36px; }
    h1 { font-size: clamp(2.6rem, 14vw, 3.6rem); }
    .compatibility { padding: 26px; }
    .compatibility-number { font-size: 4.5rem; }
    .graphics { padding-bottom: 50px; }
    .comparison-label { top: 10px; right: 10px; }
    .comparison-before .comparison-label { left: 10px; }
    .feature { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 28px; }
    .feature-title p { margin-bottom: 0; }
    .feature-title .label { margin-top: 12px; }
    .section-number { margin-bottom: 8px; }
    .downloads { padding-top: 50px; }
    .package-grid { grid-template-columns: 1fr; }
    .package { padding: 18px 22px; gap: 22px; }
    .play { padding-block: 50px; }
    .player-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; }
    #game-frame { height: 820px; }
    .site-footer { flex-direction: column; gap: 20px; }
    .site-footer nav { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    :root { scroll-behavior: auto; }
}
