:root {
    --ink: #171222;
    --muted: #666072;
    --line: #e7e0f0;
    --paper: #fffdf9;
    --soft: #f7f3fc;
    --primary: #6d28d9;
    --primary-dark: #4c1d95;
    --primary-pale: #ede9fe;
    --success: #15803d;
    --danger: #b42318;
    --shadow: 0 24px 60px rgba(61, 35, 94, 0.13);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

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

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 80% 8%, rgba(109, 40, 217, 0.09), transparent 30rem),
        var(--paper);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid #7c3aed;
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-weight: 750;
    transform: translateY(-160%);
    transition: transform 180ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(231, 224, 240, 0.85);
    background: rgba(255, 253, 249, 0.9);
    backdrop-filter: blur(18px);
}

.site-nav,
.hero,
.downloads-section,
.site-footer > div {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
}

.site-nav {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--primary-dark);
    font-weight: 850;
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(109, 40, 217, 0.22);
}

.brand-mark svg {
    width: 24px;
    height: 24px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    color: #514b5c;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: color 180ms ease;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-button,
.refresh-button,
.download-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.nav-button {
    padding: 0 17px;
    background: var(--ink);
    color: #fff;
}

.nav-button:hover {
    background: var(--primary-dark);
}

.hero {
    min-height: 400px;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    align-items: center;
    gap: 70px;
    padding-block: 72px 64px;
}

.eyebrow,
.section-kicker {
    color: var(--primary);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.14em;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(21, 128, 61, 0.12);
}

h1 {
    max-width: 720px;
    margin: 16px 0 18px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.hero-copy > p {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 20px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 28px;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #443d50;
    font-size: 14px;
    font-weight: 700;
}

.hero-meta svg {
    width: 20px;
    height: 20px;
    color: var(--success);
}

.hero-visual {
    min-height: 250px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 22px;
    border: 1px solid #ded4eb;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(240, 232, 252, 0.82));
    box-shadow: var(--shadow);
}

.hero-visual > span {
    color: #766d82;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.13em;
}

.download-glyph {
    width: 118px;
    height: 118px;
    display: grid;
    place-items: center;
    border: 1px solid #d9c9ed;
    border-radius: 28px;
    background: #fff;
    color: var(--primary);
    box-shadow: 0 20px 40px rgba(76, 29, 149, 0.13);
}

.download-glyph svg {
    width: 80px;
    height: 80px;
}

.downloads-section {
    padding-block: 50px 96px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.section-heading h2 {
    margin: 6px 0 2px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

.refresh-button {
    flex: 0 0 auto;
    padding: 0 16px;
    border: 1px solid #d8cfdf;
    background: #fff;
    color: #403748;
    font: inherit;
    font-size: 14px;
}

.refresh-button:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 8px 22px rgba(76, 29, 149, 0.1);
}

.refresh-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.refresh-button svg {
    width: 19px;
    height: 19px;
}

.download-list {
    display: grid;
    gap: 16px;
}

.download-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 28px rgba(54, 36, 71, 0.055);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.download-card:hover {
    border-color: #c8b4e2;
    box-shadow: 0 16px 42px rgba(54, 36, 71, 0.1);
}

.file-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--primary-pale);
    color: var(--primary);
}

.file-icon svg {
    width: 30px;
    height: 30px;
}

.file-content {
    min-width: 0;
}

.file-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.file-heading h3 {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 19px;
    line-height: 1.35;
}

.version-badge {
    padding: 3px 8px;
    border: 1px solid #d7c9ea;
    border-radius: 999px;
    background: #faf7ff;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 800;
}

.file-description {
    margin: 6px 0 10px;
    color: var(--muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.file-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 18px;
    margin: 0;
    color: #777080;
    font-size: 12px;
}

.file-facts span {
    overflow-wrap: anywhere;
}

.file-facts .checksum {
    font-family: "Cascadia Code", Consolas, monospace;
}

.download-button {
    min-width: 126px;
    padding: 0 18px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(109, 40, 217, 0.2);
}

.download-button:hover {
    background: var(--primary-dark);
    box-shadow: 0 14px 28px rgba(76, 29, 149, 0.26);
}

.download-button svg {
    width: 20px;
    height: 20px;
}

.state-panel {
    padding: 52px 24px;
    border: 1px dashed #cec4d8;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.state-panel[hidden] {
    display: none;
}

.state-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--primary-pale);
    color: var(--primary);
}

.state-icon svg {
    width: 30px;
    height: 30px;
}

.state-panel h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.state-panel p {
    margin: 0;
    color: var(--muted);
}

.state-error {
    border-color: #f2b8b5;
    background: #fff7f6;
}

.state-error .state-icon {
    background: #fee4e2;
    color: var(--danger);
}

.skeleton-card {
    height: 112px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(90deg, #f6f2f9 20%, #fff 40%, #f6f2f9 60%);
    background-size: 300% 100%;
    animation: skeleton 1.4s ease infinite;
}

@keyframes skeleton {
    from { background-position: 100% 0; }
    to { background-position: 0 0; }
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #171222;
    color: #ddd4e7;
}

.site-footer > div {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-size: 14px;
}

.site-footer a {
    color: #fff;
    font-weight: 750;
}

@media (max-width: 760px) {
    .nav-link {
        display: none;
    }

    .nav-actions {
        gap: 8px;
    }

    .hero {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 30px;
        padding-block: 48px;
    }

    .hero-visual {
        min-height: 190px;
    }

    .download-glyph {
        width: 96px;
        height: 96px;
    }

    .download-glyph svg {
        width: 65px;
        height: 65px;
    }

    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .refresh-button {
        align-self: flex-start;
    }

    .download-card {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        padding: 18px;
    }

    .download-button {
        min-width: 0;
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 430px) {
    .site-nav,
    .hero,
    .downloads-section,
    .site-footer > div {
        width: min(100% - 24px, 1120px);
    }

    .brand > span:last-child {
        display: none;
    }

    h1 {
        font-size: 40px;
    }

    .hero-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .file-icon {
        width: 48px;
        height: 48px;
    }

    .site-footer > div {
        min-height: 112px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
