:root {
    --black: #0b0d10;
    --black-soft: #171a20;
    --yellow: #ffcc33;
    --yellow-strong: #f2b900;
    --lavender: #9999cc;
    --lavender-soft: #ededf8;
    --ink: #1b2130;
    --muted: #677084;
    --line: #dfe3eb;
    --panel: #ffffff;
    --bg: #f5f6f9;
    --green: #137a4b;
    --shadow: 0 14px 34px rgba(15, 20, 30, .08);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
code {
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: .86em;
    overflow-wrap: anywhere;
}

.shell {
    width: min(1240px, calc(100% - 32px));
    margin-inline: auto;
}

.retro-stripe { width: 100%; }
.retro-stripe--black { height: 5px; background: #000; }
.retro-stripe--yellow { height: 5px; background: var(--yellow); }

.site-header {
    background:
        radial-gradient(circle at 88% 20%, rgba(153,153,204,.22), transparent 24rem),
        linear-gradient(115deg, #070809, #11151b 72%);
    color: white;
}

.header-inner {
    min-height: 150px;
    padding: 30px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.eyebrow,
.kicker,
.card-kicker {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .74rem;
    font-weight: 800;
}

.eyebrow { color: var(--yellow); margin-bottom: 7px; }
.site-header h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 3rem); line-height: 1.05; }
.header-copy { margin: 10px 0 0; color: #c7ccd6; max-width: 720px; }

.header-mark {
    flex: 0 0 auto;
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    border-radius: 13px;
}
.header-mark img { width: 82px; image-rendering: auto; border-radius: 8px; }
.header-mark span { font: 700 .72rem/1 ui-monospace, monospace; color: var(--yellow); }

.layout {
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
    gap: 24px;
    padding-block: 24px 54px;
}

.sidebar {
    align-self: start;
    position: sticky;
    top: 18px;
    border: 1px solid #7f80b0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--lavender);
    box-shadow: var(--shadow);
}

.legacy-badge {
    min-height: 104px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #8d8fc5, #aeafe0);
    border-bottom: 1px solid rgba(0,0,0,.18);
}
.legacy-badge img { width: 115px; }

.side-nav { padding: 10px; display: grid; gap: 5px; }
.side-nav a {
    text-decoration: none;
    font-weight: 750;
    font-size: .9rem;
    padding: 10px 11px;
    border-radius: 10px;
    transition: .18s ease;
}
.side-nav a:hover,
.side-nav a:focus-visible { background: rgba(255,255,255,.56); outline: none; transform: translateX(2px); }

.status-box {
    margin: 4px 10px 10px;
    padding: 13px;
    border-radius: 12px;
    background: #11151b;
    color: white;
    display: grid;
    gap: 4px;
}
.status-label { color: #bfc5d1; font-size: .78rem; }
.status-box strong { font-size: 1.5rem; color: var(--yellow); }
.status-box small { color: #bbc1cc; line-height: 1.35; }

.content { min-width: 0; }
.panel,
.section-block,
.archive-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero {
    padding: clamp(22px, 4vw, 36px);
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 26px;
    align-items: end;
    overflow: hidden;
    position: relative;
}
.hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    right: -90px;
    top: -110px;
    background: rgba(255,204,51,.18);
}
.pill {
    display: inline-block;
    background: #11151b;
    color: var(--yellow);
    padding: 7px 10px;
    border-radius: 999px;
    font: 800 .72rem/1 ui-monospace, monospace;
}
.hero h2 { margin: 12px 0 8px; font-size: clamp(1.65rem, 3vw, 2.45rem); }
.hero p { margin: 0; color: var(--muted); max-width: 780px; }

.search-box {
    display: grid;
    gap: 7px;
    position: relative;
    z-index: 1;
}
.search-box span { font-size: .8rem; font-weight: 800; }
.search-box input {
    width: 100%;
    border: 1px solid #cfd5df;
    border-radius: 12px;
    padding: 13px 14px;
    font: inherit;
    background: white;
    outline: none;
}
.search-box input:focus { border-color: #7375aa; box-shadow: 0 0 0 4px rgba(153,153,204,.22); }

.section-block { margin-top: 24px; padding: clamp(20px, 3.2vw, 34px); }
.section-heading { display: flex; align-items: end; gap: 18px; margin-bottom: 18px; }
.section-heading > div { flex: 0 0 auto; }
.section-heading h2 { margin: 3px 0 0; font-size: clamp(1.4rem, 2.4vw, 2rem); }
.kicker, .card-kicker { color: #696aa0; }
.section-rule { height: 2px; background: linear-gradient(90deg, var(--yellow), transparent); flex: 1; margin-bottom: 8px; }
.section-intro { margin: -4px 0 20px; color: var(--muted); }

.featured-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feature-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    background: linear-gradient(155deg, #fff, #fafaff);
}
.feature-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--black);
    color: var(--yellow);
    font-size: 1.55rem;
}
.feature-card h3 { margin: 4px 0 9px; font-size: 1.15rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.file-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 15px 0; }
.file-meta code { color: #3f4660; background: #f0f2f7; padding: 5px 7px; border-radius: 7px; }
.availability { font-size: .78rem; font-weight: 800; color: #8a5a15; }
.availability.is-online { color: var(--green); }

.button,
.mini-button {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 800;
}
.button { padding: 10px 14px; font-size: .9rem; }
.button-primary { background: var(--yellow); color: #151515; border: 1px solid #e6b600; }
.button-primary:hover { background: #ffda62; }
.button-disabled { background: #eef0f4; color: #9298a5; border: 1px solid #dde1e7; cursor: default; }

.external-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.external-card {
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 11px;
    align-items: start;
    transition: .18s ease;
    background: white;
}
.external-card:hover { transform: translateY(-2px); border-color: #b7b8d8; box-shadow: 0 10px 24px rgba(20,24,34,.08); }
.external-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #16191f;
    color: var(--yellow);
    font: 900 .75rem/1 ui-monospace, monospace;
}
.external-copy { min-width: 0; display: grid; gap: 4px; }
.external-copy strong { font-size: .95rem; }
.external-copy small { color: var(--muted); line-height: 1.35; }
.external-copy code { font-size: .7rem; color: #7d8494; }
.external-arrow { color: #7a7ba6; font-weight: 900; }

.download-groups { display: grid; gap: 18px; }
.download-group { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.download-group h3 {
    margin: 0;
    padding: 12px 14px;
    background: #f4f4fb;
    border-bottom: 1px solid var(--line);
    font-size: .95rem;
    display: flex;
    gap: 8px;
    align-items: center;
}
.file-list { display: grid; }
.file-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 96px 74px;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-top: 1px solid #edf0f4;
}
.file-row:first-child { border-top: 0; }
.file-row:hover { background: #fbfbfe; }
.file-type {
    justify-self: start;
    min-width: 42px;
    text-align: center;
    padding: 4px 6px;
    border-radius: 7px;
    font: 900 .65rem/1 ui-monospace, monospace;
    color: #56588c;
    background: #e9e9f7;
}
.file-name { min-width: 0; overflow-wrap: anywhere; font: 600 .86rem/1.35 "Cascadia Code", Consolas, monospace; }
.file-state { color: var(--muted); font-size: .78rem; text-align: right; }
.mini-button { padding: 7px 9px; font-size: .75rem; background: #15191f; color: white; }
.mini-button:hover { background: #2b3039; }
.mini-button--off { background: #eceff3; color: #a0a6b1; }

.link-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.link-group { border: 1px solid var(--line); border-radius: 14px; padding: 15px; }
.link-group h3 { margin: 0 0 11px; font-size: .96rem; display: flex; gap: 8px; align-items: center; }
.link-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.link-cloud a {
    text-decoration: none;
    border: 1px solid #d9ddea;
    background: #f8f9fc;
    padding: 7px 9px;
    border-radius: 999px;
    font-size: .77rem;
    font-weight: 800;
    color: #353b4c;
}
.link-cloud a:hover { border-color: #9395c0; background: #f0f0fa; }

.archive-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    background: linear-gradient(125deg, #11151b, #202633);
    color: white;
}
.archive-panel .kicker { color: var(--yellow); }
.archive-panel h2 { margin: 4px 0 8px; }
.archive-panel p { margin: 0; color: #c6ccd7; }
.archive-image-wrap {
    border: 4px solid var(--yellow);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}
.archive-image-wrap img { width: 276px; image-rendering: auto; }

.no-results {
    margin-top: 24px;
    padding: 22px;
    text-align: center;
    border: 1px dashed #b9bec9;
    border-radius: 14px;
    color: var(--muted);
    background: white;
}

.is-filtered-out { display: none !important; }

.site-footer { background: #0b0d10; color: #aeb5c2; border-top: 5px solid var(--yellow); }
.footer-inner { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 18px; font-size: .8rem; }

@media (max-width: 1050px) {
    .external-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .featured-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .header-mark { display: none; }
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .legacy-badge { display: none; }
    .side-nav { display: flex; overflow-x: auto; padding: 9px; }
    .side-nav a { white-space: nowrap; background: rgba(255,255,255,.32); }
    .status-box { grid-template-columns: auto auto 1fr; align-items: center; }
    .status-box strong { font-size: 1.1rem; }
    .hero { grid-template-columns: 1fr; }
    .archive-panel { grid-template-columns: 1fr; }
    .archive-image-wrap { justify-self: start; }
}

@media (max-width: 640px) {
    .shell { width: min(100% - 20px, 1240px); }
    .header-inner { min-height: 130px; padding: 24px 0; }
    .external-grid, .link-groups { grid-template-columns: 1fr; }
    .section-block, .hero { border-radius: 14px; }
    .section-heading { align-items: center; }
    .section-rule { display: none; }
    .file-row {
        grid-template-columns: 50px minmax(0, 1fr) auto;
        gap: 8px;
    }
    .file-state { display: none; }
    .mini-button { grid-column: 3; }
    .footer-inner { padding: 18px 0; min-height: 0; align-items: flex-start; flex-direction: column; gap: 5px; }
    .status-box { grid-template-columns: 1fr auto; }
    .status-box small { grid-column: 1 / -1; }
}
