:root {
    --background: #f5f5f7;
    --surface: #ffffff;
    --surface-muted: #f5f5f7;
    --text: #1d1d1f;
    --secondary: #6e6e73;
    --tertiary: #98989d;
    --accent: #ff7a00;
    --accent-dark: #d96400;
    --border: rgba(0, 0, 0, 0.09);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.055);
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    --content-width: 980px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    min-width: 0;
    background: var(--background);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: 0;
    color: inherit;
    font: inherit;
}

svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 60px;
    border-bottom: 1px solid var(--border);
    background: rgba(251, 251, 253, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.site-nav {
    width: min(100%, calc(var(--content-width) + 48px));
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand,
.official-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.brand {
    gap: 8px;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.brand svg {
    width: 21px;
    height: 21px;
    color: var(--accent);
}

.official-link {
    gap: 4px;
    color: var(--secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 160ms ease;
}

.official-link:hover {
    color: var(--text);
}

.official-link svg {
    width: 16px;
    height: 16px;
}

.page-shell {
    width: min(100%, calc(var(--content-width) + 48px));
    margin: 0 auto;
    padding: 76px 24px 88px;
}

.page-heading {
    max-width: 820px;
    margin: 0 auto 68px;
    text-align: center;
    animation: enter 360ms ease-out both;
}

.page-heading h1 {
    font-size: clamp(40px, 6vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.page-subtitle {
    margin-top: 16px;
    color: var(--secondary);
    font-size: 20px;
}

.build-legend {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    color: var(--secondary);
    font-size: 13px;
}

.build-legend strong {
    color: var(--text);
    font-weight: 600;
}

.release-section + .release-section {
    margin-top: 64px;
}

.release-section > h2 {
    margin-bottom: 18px;
    font-size: 24px;
    letter-spacing: -0.02em;
}

.history-list {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.release-host,
.history-list {
    animation: enter 420ms 70ms ease-out both;
}

.release-accordion {
    border-top: 1px solid var(--border);
}

.release-accordion:last-child,
.release-host .release-accordion {
    border-bottom: 1px solid var(--border);
}

.release-toggle {
    width: 100%;
    min-height: 82px;
    padding: 14px 4px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px;
    align-items: center;
    gap: 16px;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.release-toggle:hover {
    background: rgba(255, 255, 255, 0.46);
}

.release-toggle-content {
    min-width: 0;
}

.release-toggle-version-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.release-version {
    font-size: 25px;
    letter-spacing: -0.02em;
}

.config-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.badge-tone-orange {
    background: rgba(255, 122, 0, 0.12);
    color: var(--accent-dark);
}

.badge-tone-blue {
    background: rgba(0, 122, 255, 0.11);
    color: #0066cc;
}

.badge-tone-green {
    background: rgba(52, 199, 89, 0.12);
    color: #237a3b;
}

.badge-tone-purple {
    background: rgba(175, 82, 222, 0.11);
    color: #8c3db5;
}

.badge-tone-gray {
    background: rgba(110, 110, 115, 0.12);
    color: var(--secondary);
}

.release-summary {
    margin-top: 7px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 6px;
    color: var(--secondary);
    font-size: 14px;
}

.release-summary-separator {
    color: var(--tertiary);
}

.release-chevron {
    color: var(--secondary);
    font-size: 26px;
    line-height: 1;
    text-align: center;
    transition: transform 180ms ease;
}

.release-toggle[aria-expanded="true"] .release-chevron {
    transform: rotate(90deg);
}

.release-files-panel {
    border-top: 1px solid var(--border);
    animation: panel-enter 180ms ease-out both;
}

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

.files-list {
    padding: 0 4px;
    border-top: 1px solid var(--border);
}

.file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, auto);
    align-items: center;
    gap: 24px;
    padding: 20px 0;
}

.file-row + .file-row {
    border-top: 1px solid var(--border);
}

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

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

.file-name {
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.file-meta {
    margin-top: 4px;
    color: var(--secondary);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.file-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.source-link,
.source-more-toggle,
.sha-toggle,
.sha-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 550;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.source-link {
    gap: 5px;
    padding: 8px 13px;
}

.source-link:hover,
.source-more-toggle:hover,
.sha-toggle:hover,
.sha-copy:hover {
    border-color: rgba(0, 0, 0, 0.14);
    background: #eaeaed;
}

.source-link svg {
    width: 14px;
    height: 14px;
}

.source-more-toggle {
    display: none;
    padding: 8px 14px;
}

.source-unavailable {
    color: var(--tertiary);
    font-size: 13px;
}

.sha-block {
    margin-top: 9px;
}

.sha-toggle {
    min-height: 32px;
    padding: 5px 10px;
    color: var(--secondary);
    font-size: 12px;
}

.sha-panel {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

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

.sha-value {
    min-width: 0;
    padding: 7px 9px;
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--secondary);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.sha-copy {
    min-height: 34px;
    padding: 6px 11px;
    flex: 0 0 auto;
    font-size: 12px;
}

.sha-copy.is-success {
    border-color: rgba(52, 199, 89, 0.25);
    background: rgba(52, 199, 89, 0.1);
    color: #1f7a39;
}

.sha-copy.is-failed {
    border-color: rgba(255, 59, 48, 0.2);
    color: #b42318;
}

.history-empty,
.empty-state {
    color: var(--secondary);
    font-size: 14px;
}

.history-empty {
    padding: 2px 4px;
}

.empty-state {
    padding: 24px 0;
}

.empty-state.standalone {
    padding: 2px 4px;
}

.site-footer {
    padding: 0 24px 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: var(--tertiary);
    font-size: 12px;
    text-align: center;
}

.site-footer a {
    color: var(--secondary);
}

.visually-hidden {
    position: fixed;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

@keyframes enter {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes panel-enter {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .site-nav {
        padding: 0 18px;
    }

    .page-shell {
        padding: 48px 18px 64px;
    }

    .page-heading {
        margin-bottom: 48px;
    }

    .page-heading h1 {
        font-size: 36px;
    }

    .page-subtitle {
        margin-top: 12px;
        font-size: 16px;
    }

    .build-legend {
        margin-top: 21px;
        flex-direction: column;
        gap: 3px;
        line-height: 1.55;
    }

    .release-section + .release-section {
        margin-top: 46px;
    }

    .release-section > h2 {
        margin-bottom: 14px;
        font-size: 21px;
    }

    .release-version {
        font-size: 22px;
    }

    .release-toggle {
        min-height: 76px;
        padding: 12px 2px;
        gap: 12px;
    }

    .release-summary {
        margin-top: 5px;
        font-size: 13px;
    }

    .files-list {
        padding: 0 2px;
    }

    .file-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
        padding: 15px 0;
    }

    .file-name {
        font-size: 16px;
    }

    .file-actions {
        justify-content: flex-start;
        gap: 8px;
    }

    .source-link,
    .source-more-toggle {
        min-height: 44px;
        padding: 9px 14px;
    }

    .source-extra {
        display: none;
    }

    .file-actions.is-expanded .source-extra {
        display: inline-flex;
    }

    .source-more-toggle {
        display: inline-flex;
    }

    .sha-toggle,
    .sha-copy {
        min-height: 44px;
    }

    .sha-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .sha-copy {
        align-self: flex-start;
    }

}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
