:root {
    color-scheme: dark;
    --bg: #07111f;
    --bg-soft: #0c1a2e;
    --panel: rgba(13, 27, 47, 0.88);
    --panel-border: rgba(125, 211, 252, 0.14);
    --text: #e7f1ff;
    --muted: #8fa9c4;
    --accent: #7dd3fc;
    --accent-strong: #38bdf8;
    --good: #34d399;
    --warn: #fbbf24;
    --bad: #fb7185;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background:
        radial-gradient(circle at 15% 0%, rgba(56, 189, 248, 0.18), transparent 38rem),
        radial-gradient(circle at 90% 10%, rgba(52, 211, 153, 0.12), transparent 32rem),
        var(--bg);
    color: var(--text);
    font: 15px/1.6 "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}

code,
pre {
    font-family: "Cascadia Code", "Consolas", "SFMono-Regular", monospace;
}

.page {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0 28px;
}

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

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

h2 {
    margin-bottom: 4px;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.subtitle {
    max-width: 620px;
    margin-bottom: 0;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.button {
    appearance: none;
    border: 1px solid rgba(125, 211, 252, 0.4);
    border-radius: 999px;
    padding: 10px 18px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.button:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: var(--accent);
}

.button:active {
    transform: translateY(1px);
}

.button.secondary {
    background: transparent;
    border-color: rgba(143, 169, 196, 0.35);
    color: var(--muted);
}

.button.secondary:hover {
    color: var(--text);
    border-color: var(--muted);
}

.status {
    min-width: 9em;
    color: var(--muted);
    font-size: 13px;
    text-align: right;
}

.status.ok {
    color: var(--good);
}

.status.error {
    color: var(--bad);
}

.panel {
    margin-bottom: 20px;
    padding: 22px;
    border: 1px solid var(--panel-border);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.muted {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
}

.chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(143, 169, 196, 0.25);
    border-radius: 999px;
    padding: 4px 10px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.chip.stable {
    color: var(--good);
    border-color: rgba(52, 211, 153, 0.35);
}

.chip.snapshot {
    color: var(--warn);
    border-color: rgba(251, 191, 36, 0.35);
}

.release-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.release-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 250px;
    padding: 18px;
    border: 1px solid rgba(143, 169, 196, 0.16);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 34, 58, 0.9), rgba(8, 20, 36, 0.9));
}

.release-card.empty {
    align-items: flex-start;
    justify-content: center;
    color: var(--muted);
}

.release-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.release-title {
    margin: 0;
    font-size: 16px;
}

.release-version {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

.release-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--muted);
    font-size: 12px;
}

.asset {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.06);
}

.asset-copy {
    min-width: 0;
}

.asset-name {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.asset-size {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.asset a,
.notice-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.asset a:hover,
.notice-link:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

.release-notes {
    margin-top: auto;
}

.release-notes summary {
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

.release-notes pre {
    max-height: 220px;
    margin: 10px 0 0;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 12px;
}

.history-list {
    display: grid;
    gap: 8px;
}

.history-item {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(143, 169, 196, 0.16);
    border-radius: 14px;
    background: rgba(8, 20, 36, 0.55);
}

.history-main {
    min-width: 0;
}

.history-title {
    margin: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-meta {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.history-item a {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.history-item a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

.notice-list {
    display: grid;
    gap: 12px;
}

.notice {
    padding: 16px;
    border: 1px solid rgba(143, 169, 196, 0.16);
    border-left: 3px solid var(--accent);
    border-radius: 14px;
    background: rgba(8, 20, 36, 0.55);
}

.notice.warning {
    border-left-color: var(--warn);
}

.notice.critical {
    border-left-color: var(--bad);
}

.notice h3 {
    margin-bottom: 8px;
    font-size: 15px;
}

.notice p {
    margin-bottom: 0;
    color: var(--muted);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.notice-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
}

.empty-state {
    padding: 22px;
    border: 1px dashed rgba(143, 169, 196, 0.28);
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
}

.endpoint-list {
    display: grid;
    gap: 10px;
}

.endpoint {
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1.3fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(143, 169, 196, 0.16);
    border-radius: 14px;
    background: rgba(8, 20, 36, 0.55);
}

.endpoint-label {
    font-size: 13px;
    font-weight: 600;
}

.endpoint-path {
    color: var(--accent);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.endpoint-desc {
    grid-column: 1 / -1;
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 4px 0;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 820px) {
    .page {
        width: min(100% - 24px, 680px);
        padding-top: 24px;
    }

    .hero,
    .panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .status {
        text-align: left;
    }

    .release-grid {
        grid-template-columns: 1fr;
    }

    .history-item {
        grid-template-columns: 1fr auto;
    }

    .history-meta {
        grid-column: 1 / -1;
    }

    .endpoint {
        grid-template-columns: 1fr auto;
    }

    .endpoint-path {
        grid-column: 1 / -1;
    }

    footer {
        flex-direction: column;
        gap: 4px;
    }
}
