:root {
    color-scheme: dark;
    --ink: #111219;
    --surface: #191b25;
    --surface-raised: #222431;
    --border: #343747;
    --text: #f8f8fb;
    --muted: #c1c3cf;
    --accent: #d90101;
    --accent-hover: #ed1b1b;
    --accent-text: #ed1b1b;
    --accent-ink: #fff;
    --radius: 1.125rem;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.home-hero, .page-chase main, .header-actions > .button-primary {
    --accent: #d7ff48;
    --accent-hover: #e5ff8b;
    --accent-text: var(--accent);
    --accent-ink: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ink); color: var(--text); line-height: 1.55; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { line-height: 1.1; letter-spacing: -.035em; }
h1 { font-size: clamp(2.65rem, 7vw, 4rem); font-weight: 750; }
h2 { font-size: clamp(1.75rem, 3.3vw, 3rem); font-weight: 600; }
h3 { font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }
section[id] { scroll-margin-top: 1.25rem; }

.shell { width: min(100% - 6rem, 82rem); margin-inline: auto; }
.section-space { margin-block: clamp(2.5rem, 6vw, 5.25rem); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.25rem; margin-bottom: 1.45rem; }

.skip-link { position: absolute; top: .75rem; left: .75rem; z-index: 5; transform: translateY(-200%); padding: .65rem 1rem; background: var(--accent); color: var(--ink); border-radius: .5rem; font-weight: 750; }
.skip-link:focus { transform: translateY(0); }

.site-header { background: #13141d; border-bottom: 1px solid var(--border); position: relative; z-index: 2; }
.header-inner { min-height: 5.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-block; flex: 0 0 auto; }
.brand img { width: 7.9rem; }
.header-inner .brand { flex: 0 1 auto; min-width: 0; }
.header-inner .brand img { width: 225px; }
.desktop-nav, .header-actions { display: flex; flex-shrink: 0; align-items: center; }
.desktop-nav { gap: clamp(1rem, 3vw, 2.25rem); }
.desktop-nav a, .mobile-nav nav a { color: var(--muted); font-size: .96rem; font-weight: 600; text-decoration: none; }
.desktop-nav a:hover, .mobile-nav nav a:hover, .desktop-nav [aria-current], .mobile-nav [aria-current] { color: var(--accent-text); }
.header-actions { gap: .5rem; }
.mobile-nav { display: none; }
.mobile-nav summary { min-height: 2.75rem; display: grid; place-items: center; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: .65rem; cursor: pointer; font-weight: 600; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav nav { position: absolute; top: calc(100% + .5rem); right: 1rem; left: 1rem; padding: .35rem; background: var(--surface-raised); border: 1px solid var(--border); border-radius: .75rem; box-shadow: 0 1rem 2.5rem #0009; }
.mobile-nav nav a { display: block; padding: .7rem .8rem; border-radius: .5rem; }
.mobile-nav nav a:hover { background: var(--surface); }

.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 1.55rem; }
.button { min-height: 3.1rem; display: inline-flex; align-items: center; justify-content: center; gap: .7rem; padding: .62rem 1rem; border: 1px solid transparent; border-radius: .65rem; font-size: .94rem; line-height: 1.35; font-weight: 600; text-decoration: none; }
.button-small { min-height: 2.75rem; padding: .46rem .83rem; white-space: nowrap; }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: var(--accent-hover); }
.button-outline { color: var(--text); border-color: #515568; }
.button-outline:hover, .button-quiet:hover { background: var(--surface-raised); }
.button-outline:hover { outline: 2px solid #515568; outline-offset: -1px; }
.button-dark { background: var(--ink); color: var(--text); }
.button-dark:hover { background: #2c3421; }
.button-dark:focus-visible { outline-color: var(--ink); }
.text-link { color: var(--accent-text); font-weight: 600; text-underline-offset: .25em; }
.text-link:hover { color: var(--accent-hover); }
.arrow {
    position: relative;
    display: inline-block;
    flex: 0 0 1rem;
    width: 1rem;
    height: 1rem;
    vertical-align: -.18em;
}
.arrow::before, .arrow::after { content: ""; position: absolute; top: 50%; }
.arrow::before { left: .05rem; right: .12rem; border-top: 2px solid currentColor; transform: translateY(-50%); }
.arrow::after { right: .16rem; width: .48rem; height: .48rem; border: solid currentColor; border-width: 2px 2px 0 0; transform: translateY(-50%) rotate(45deg); }
.arrow-back { transform: rotate(180deg); }
.text-link > .arrow, .breadcrumb > .arrow { vertical-align: middle; }
.text-link > .arrow { margin-inline-start: .4em; }
.breadcrumb > .arrow { margin-inline-end: .4em; }

.home-hero {
    padding-block: clamp(1.35rem, 3.5vw, 3.4rem);
    border-bottom: 1px solid var(--border);
}
.home-hero, .archive-panel, .page-chase .classic-game-header {
    background:
        radial-gradient(ellipse at 72% 0%, #244a7899, transparent 56%),
        repeating-linear-gradient(132deg, transparent 0 100px, #ffffff08 100px 101px),
        #121b2b;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(1.75rem, 5vw, 5rem); align-items: center; }
.hero-copy :is(h1, h2) { font-size: clamp(3rem, 6vw, 4rem); font-weight: 750; letter-spacing: -.04em; }
.hero-copy :is(h1, h2) em { display: inline-block; color: var(--accent-text); font-style: normal; }
.kicker { color: var(--accent-text); font-size: .79rem; letter-spacing: .13em; font-weight: 650; text-transform: uppercase; margin-bottom: .9rem; }
.status-dot { width: .55rem; height: .55rem; display: inline-block; vertical-align: .1em; border-radius: 50%; background: currentColor; margin-right: .28rem; }
.hero-intro, .page-intro > p:not(.kicker), .split-copy > p:not(.kicker) { margin-top: 1rem; color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.23rem); }
.hero-art { display: block; text-decoration: none; border: 1px solid transparent; border-radius: var(--radius); padding: .55rem; background: #191c18; box-shadow: 0 1.5rem 4rem #0006; }
.hero-art img { width: 100%; border-radius: .65rem; }
.hero-art:hover { outline: 2px solid var(--accent); outline-offset: -1px; }
.hero-art-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .125rem 1rem; padding: .6rem .35rem .16rem; color: var(--muted); font-weight: 650; font-size: .81rem; text-decoration: none; }
.hero-art-caption span:first-child { color: var(--text); }
.chase-slideshow { position: relative; }
.chase-slides { display: block; position: relative; aspect-ratio: 1066 / 573; overflow: hidden; border-radius: .65rem; }
.chase-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1.2s ease-in-out; }
.chase-slide.is-current { opacity: 1; z-index: 1; }
.chase-slide.is-entering { opacity: 1; z-index: 2; }
.slideshow-toggle { position: absolute; z-index: 3; right: .5rem; bottom: .5rem; padding: .35rem .65rem; border: 1px solid #ffffff66; border-radius: .4rem; background: #111219d9; color: #fff; font: inherit; font-size: .8rem; cursor: pointer; }
.slideshow-toggle[hidden] { display: none; }
.chase-preview-copy { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .chase-slide { transition: none; } }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 2vw, 1.5rem); }
.app-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.app-card a { display: block; border-radius: inherit; height: 100%; text-decoration: none; }
.app-card img { width: 100%; aspect-ratio: 2 / 1; object-fit: contain; background: #0c0e19; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.app-card:hover { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: -1px; }
.card-caption { min-height: 4.3rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .65rem .9rem; }
.card-name { font-size: clamp(1rem, 1.85vw, 1.25rem); font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }
.card-arrow { display: grid; place-items: center; flex: 0 0 2.1rem; height: 2.1rem; border-radius: 50%; color: var(--accent-text); background: var(--surface-raised); }
.app-card a:hover .card-arrow { color: var(--accent-ink); background: var(--accent); }

.archive-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; color: #fff; border-radius: var(--radius); overflow: hidden; }
.panel-copy { padding: clamp(1.25rem, 4vw, 3.5rem); }
.panel-copy .kicker { color: #fff; }
.panel-copy p:not(.kicker) { margin: .85rem 0 1.25rem; }
.archive-panel img { width: 100%; height: auto; aspect-ratio: 1066 / 573; }

.page-intro { margin-top: clamp(2.5rem, 6vw, 5.3rem); }
.split-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: center; gap: clamp(1.4rem, 4vw, 4.5rem); }
.split-copy h1 { font-size: clamp(2.65rem, 5.7vw, 4rem); }
.split-copy > .button { margin-top: 1.5rem; }
.breadcrumb { display: inline-block; margin-bottom: 1.15rem; color: var(--muted); text-underline-offset: .24em; font-weight: 600; }
.breadcrumb:hover { color: var(--accent-text); }
.product-art { width: 100%; object-fit: contain; aspect-ratio: 2 / 1; border-radius: var(--radius); background: #0c0e19; border: 1px solid var(--border); }
.page-classics .product-art { aspect-ratio: 1066 / 573; }
.screenshot-gallery .section-heading { align-items: center; margin-bottom: .8rem; }
.gallery-controls { display: flex; gap: .45rem; }
.gallery-controls[hidden], .trailer-poster[hidden] { display: none; }
.icon-button { min-height: 2.75rem; width: 2.75rem; padding: 0; cursor: pointer; }
.icon-button[aria-disabled="true"] { opacity: .45; cursor: default; }
.screenshot-track { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .65rem; scrollbar-color: #5c6174 var(--surface); }
.screenshot-list { display: flex; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.screenshot-list li { flex: 0 0 min(83%, 32rem); min-width: 0; scroll-snap-align: start; }
.screenshot-track-portrait li { flex-basis: min(73%, 17rem); }
.screenshot-list img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: .8rem; background: var(--surface); }

.trailer-player { max-width: 58rem; }
.trailer-poster, .trailer-player iframe { width: 100%; display: block; aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: var(--radius); background: #0c0e19; }
.trailer-poster { position: relative; padding: 0; overflow: hidden; color: var(--ink); cursor: pointer; }
.trailer-poster img { width: 100%; height: 100%; object-fit: contain; opacity: .65; }
.trailer-play-label { display: inline-flex; align-items: center; gap: .65rem; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: .65rem 1rem; border-radius: .65rem; background: var(--accent); color: #fff; font: 600 .94rem/1.3 Inter, ui-sans-serif, system-ui, sans-serif; white-space: nowrap; box-shadow: 0 .35rem 1.5rem #0007; }
.trailer-poster:hover .trailer-play-label { background: var(--accent-hover); }
.play-icon { display: block; width: 0; height: 0; border-block: .4rem solid transparent; border-left: .65rem solid currentColor; }

.chase-intro h1 { font-size: clamp(2.65rem, 7vw, 4rem); }
.chase-area { margin-top: 2rem; }
.game-viewport {
    --game-max-height: min(75vh, 46rem);
    width: 100%;
    max-width: calc(var(--game-max-height) * (var(--game-ratio)));
    margin-inline: auto;
}
.chase-runtime { --game-ratio: 16 / 9; display: block; aspect-ratio: var(--game-ratio); border: 0; background: #0c0e19; }
.chase-preview { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #0c0e19; }
.chase-preview > img { width: 100%; height: auto; aspect-ratio: 1066 / 573; }
.chase-preview-copy { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .26rem; padding: 1rem; text-align: center; background: #10131cc7; }
.chase-preview-copy img { width: clamp(9.5rem, 28vw, 16rem); }
.chase-preview-copy p { font-size: clamp(1.14rem, 2vw, 1.45rem); font-weight: 650; }
.chase-preview-copy span { color: var(--muted); }
.play-notes { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1rem; color: var(--muted); }

.ranking-games { margin: 0 0 2rem; }
.ranking-status { margin-bottom: 1rem; color: var(--muted); font-size: .9rem; }
.ranking-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.ranking-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ranking-card table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ranking-card caption { padding: .85rem .9rem; text-align: left; font-size: 1.15rem; font-weight: 600; }
.ranking-card th, .ranking-card td { padding: .5rem .75rem; border-top: 1px solid var(--border); text-align: left; }
.ranking-card :is(th, td):last-child:not([colspan]) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ranking-card td:nth-child(2) { overflow-wrap: anywhere; }

.callout, .utility-card { padding: clamp(1.15rem, 3.3vw, 2.25rem); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.callout h2, .utility-card h2 { font-size: clamp(1.4rem, 3.2vw, 2.2rem); }
.callout p, .utility-card p, .prose p { color: var(--muted); margin-top: .6rem; }
.utility-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.utility-grid .utility-card { display: flex; flex-direction: column; align-items: flex-start; }
.utility-grid .utility-card p { flex: 1; }
.utility-card > a { display: inline-flex; margin-top: 1rem; }
.founder-card img { width: 6.5rem; height: 6.5rem; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; background: var(--surface-raised); }
.founder-card h3 { font-size: 1.35rem; }
.founders-grid .founder-role { flex: 0 0 auto; margin-top: .25rem; color: var(--accent-text); font-size: .92rem; font-weight: 600; }
.support-topics { display: grid; gap: .8rem; }
.support-topics section:target { border-color: var(--accent); }

.classic-group + .classic-group { margin-top: clamp(2rem, 5vw, 3.75rem); }
.classic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .9rem; list-style: none; padding: 0; margin: 0; }
.classic-card { min-width: 0; max-width: 14rem; }
.classic-card a { position: relative; display: block; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; text-decoration: none; }
.classic-card a:hover { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: -1px; }
.classic-card img { width: 100%; aspect-ratio: 150 / 122; object-fit: cover; }
.classic-card-label { position: absolute; inset: auto 0 0; min-height: 34%; display: flex; align-items: center; justify-content: center; padding: .2rem 0; color: #fff; font-size: .9375rem; font-weight: 600; line-height: 1.17; text-align: center; text-shadow: 0 1px 3px #000; }
.archive-help { margin-top: 1.25rem; }

.studio-art { border-radius: var(--radius); overflow: hidden; }
.studio-art img { width: 100%; height: auto; }

.app-copy h3 { margin-top: 1.15rem; font-size: 1.12rem; }
.app-copy ul { padding-left: 1.5rem; color: var(--muted); }
.app-copy li { margin-top: .35rem; }
.app-copy strong { color: var(--text); }

.legal-content > * { max-width: 76ch; color: var(--muted); overflow-wrap: anywhere; }
.legal-content p, .legal-content li { margin-top: .8rem; max-width: 76ch; }
.legal-content h2 { margin-top: 1.85rem; color: var(--text); font-size: clamp(1.22rem, 3vw, 1.72rem); letter-spacing: -.03em; }
.legal-content strong, .legal-content b { color: var(--text); }
.legal-content ol, .legal-content ul { padding-left: 1.5rem; }
.legal-content a { color: var(--accent-text); text-underline-offset: .2em; }

.site-footer { border-top: 1px solid var(--border); background: #13141d; margin-top: clamp(2.5rem, 6vw, 5rem); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; column-gap: 2rem; }
.footer-brand, .footer-links { padding-block: 1.6rem; }
.footer-brand p { color: var(--muted); margin-top: .35rem; font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .45rem 1.2rem; justify-content: flex-end; }
.footer-links a, .footer-meta a { color: var(--muted); text-underline-offset: .22em; }
.footer-links a:hover, .footer-meta a:hover { color: var(--accent-text); }
.footer-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; border-top: 1px solid var(--border); padding-block: .9rem; font-size: .88rem; color: var(--muted); }
.footer-meta div { display: flex; gap: 1rem; }

@media (max-width: 62rem) {
    .shell { width: min(100% - 3rem, 82rem); }
}

@media (max-width: 48rem) {
    .shell { width: min(100% - 2rem, 82rem); }
    .header-inner { min-height: 4.35rem; }
    .desktop-nav { display: none; }
    .classic-discovery,
    .mobile-nav nav .classic-discovery { display: none; }
    .mobile-nav { display: block; }
    .footer-brand .brand img { width: 6.45rem; }
    .hero-grid, .split-grid, .utility-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-copy :is(h1, h2) { font-size: clamp(2.7rem, 11vw, 4rem); }
    .home-hero { padding-block: 1.35rem .875rem; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .archive-panel { grid-template-columns: 1fr; }
    .chase-runtime { --game-ratio: 9 / 16; }
    .footer-inner { grid-template-columns: minmax(0, 1fr); }
    .footer-brand { padding-block: 1.25rem .25rem; }
    .footer-links { justify-content: flex-start; padding-block: 1rem; }
    .footer-links a { padding-block: .25rem; }
}

@media (max-width: 26rem) {
    .card-grid { grid-template-columns: minmax(0, 1fr); }
    .card-caption { min-height: 3.5rem; }
    .button-row { gap: .55rem; }
    .header-inner { gap: .4rem; }
    .header-actions { gap: .35rem; }
    .header-actions .button-small, .mobile-nav summary { padding-inline: .62rem; font-size: .85rem; }
    .header-actions .button-small span { display: none; }
}

.contact-form { max-width: 44rem; display: grid; gap: 1.25rem; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.account-form { max-width: 32rem; }
.account-fields { display: grid; gap: 1.25rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.account-fields > button { justify-self: start; }
.contact-field { min-width: 0; display: grid; gap: .45rem; padding: 0; margin: 0; border: 0; }
.contact-field > label, .contact-field legend { font-weight: 600; }
.contact-field legend { padding: 0; margin-bottom: .4rem; }
.contact-field > :is(input, select, textarea) { min-width: 0; width: 100%; padding: .65rem .8rem; border: 1px solid #646879; border-radius: .55rem; background: var(--ink); color: var(--text); font: inherit; }
.contact-field > :is(input, select) { min-height: 2.75rem; }
.contact-field textarea { resize: vertical; }
.contact-field input[type="file"]::file-selector-button { margin-inline-end: .55rem; padding: .3rem .55rem; border: 1px solid var(--border); border-radius: .35rem; background: var(--surface-raised); color: var(--text); font: inherit; cursor: pointer; }
.contact-optional { color: var(--muted); font-size: .9rem; font-weight: 500; }
.contact-field [aria-invalid="true"] { border-color: #ffa7a7; }
.contact-choices { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; }
.contact-choices label { min-height: 2.25rem; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.contact-choices input { margin: 0; accent-color: var(--accent); }
.contact-form > button { justify-self: start; cursor: pointer; }
.contact-form > button:disabled { opacity: .55; cursor: default; }
.contact-notice { max-width: 44rem; padding: .8rem 1rem; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--surface); }
.contact-notice h2 { margin-bottom: .45rem; font-size: 1.5rem; }
.field-error { font-size: .92rem; color: #ffb3b3; overflow-wrap: anywhere; }
.contact-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.25rem; }
