@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
    --bg-top: #eef4ff;
    --bg-bottom: #d9e5ff;
    --text: #10213a;
    --muted: #5d6c84;
    --surface: rgba(255, 255, 255, 0.84);
    --surface-strong: rgba(255, 255, 255, 0.95);
    --border: rgba(16, 33, 58, 0.12);
    --shadow: 0 28px 80px rgba(20, 43, 79, 0.14);
    --shadow-strong: 0 30px 64px rgba(20, 43, 79, 0.2);
    --accent: #0f6cf2;
    --accent-strong: #ff7b1c;
    --accent-soft: rgba(15, 108, 242, 0.12);
    --notice-bg: rgba(15, 108, 242, 0.08);
    --notice-border: rgba(15, 108, 242, 0.3);
    --important-bg: rgba(255, 123, 28, 0.1);
    --important-border: rgba(255, 123, 28, 0.35);
    --tips-bg: rgba(26, 168, 104, 0.1);
    --tips-border: rgba(26, 168, 104, 0.3);
    --code-bg: #0c1730;
    --code-text: #eaf2ff;
    --table-head: rgba(15, 108, 242, 0.08);
    --table-row: rgba(255, 255, 255, 0.55);
}

body.dark {
    --bg-top: #0c1220;
    --bg-bottom: #171f35;
    --text: #ecf2ff;
    --muted: #94a4c0;
    --surface: rgba(15, 22, 38, 0.78);
    --surface-strong: rgba(18, 27, 46, 0.92);
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
    --shadow-strong: 0 30px 64px rgba(0, 0, 0, 0.45);
    --accent: #7cb5ff;
    --accent-strong: #ffb066;
    --accent-soft: rgba(124, 181, 255, 0.14);
    --notice-bg: rgba(124, 181, 255, 0.12);
    --notice-border: rgba(124, 181, 255, 0.28);
    --important-bg: rgba(255, 176, 102, 0.12);
    --important-border: rgba(255, 176, 102, 0.28);
    --tips-bg: rgba(72, 204, 143, 0.12);
    --tips-border: rgba(72, 204, 143, 0.3);
    --code-bg: #0a101c;
    --code-text: #edf4ff;
    --table-head: rgba(124, 181, 255, 0.1);
    --table-row: rgba(255, 255, 255, 0.02);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 123, 28, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(15, 108, 242, 0.18), transparent 32%),
        linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 80%);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code,
pre {
    font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

code {
    padding: 0.12rem 0.36rem;
    border-radius: 0.5rem;
    background: var(--accent-soft);
}

pre {
    margin: 0.9rem 0 0;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    overflow-x: auto;
    background: var(--code-bg);
    color: var(--code-text);
    line-height: 1.55;
}

p,
li {
    line-height: 1.7;
}

.shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 2rem auto 3rem;
}

.hero,
.quick-card,
.hero-copy,
.hero-card,
.part,
.notice,
.important,
.tips,
.arch-section,
.footer {
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    gap: 1rem;
    padding: 1rem;
}

.hero-copy,
.hero-card,
.quick-card,
.part,
.notice,
.important,
.tips,
.footer {
    padding: 1.4rem;
}

.eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

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

h1 {
    margin-bottom: 0.9rem;
    font-size: clamp(2.3rem, 5vw, 4rem);
    line-height: 0.96;
}

.lede {
    max-width: 58ch;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    color: var(--muted);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.chip {
    padding: 0.48rem 0.8rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
}

.hero-card {
    display: grid;
    gap: 0.8rem;
    align-content: start;
    background: var(--surface-strong);
    box-shadow: var(--shadow-strong);
}

.mini-stat {
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    background: var(--accent-soft);
}

.mini-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.4rem;
}

.quick-card {
    position: relative;
    overflow: hidden;
}

.quick-card::after {
    content: "";
    position: absolute;
    inset: auto -2rem -2.8rem auto;
    width: 7rem;
    height: 7rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 123, 28, 0.16), transparent 70%);
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0 1.4rem;
}

button {
    border: 0;
    border-radius: 999px;
    padding: 0.78rem 1.1rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    color: var(--accent);
    background: var(--surface-strong);
    box-shadow: inset 0 0 0 1px var(--border);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
}

button.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: none;
}

button.inactive {
    opacity: 0.9;
}

#toggle-theme {
    width: 100%;
}

.version-toggle-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: 1.2rem;
    border: 1px dashed var(--notice-border);
    background: var(--surface);
}

.version-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.notice {
    background: var(--notice-bg);
    border-color: var(--notice-border);
}

.important {
    background: var(--important-bg);
    border-color: var(--important-border);
}

.tips {
    background: var(--tips-bg);
    border-color: var(--tips-border);
}

.note {
    color: var(--muted);
}

.arch-section {
    margin-top: 1rem;
    overflow: hidden;
}

.arch-section summary {
    padding: 1rem 1.2rem;
    cursor: pointer;
    font-weight: 700;
    background: var(--surface-strong);
}

.arch-section[open] summary {
    border-bottom: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--table-head);
}

th,
td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

tbody tr {
    background: var(--table-row);
}

tbody tr:hover {
    background: var(--accent-soft);
}

.size-cell,
.sha256-cell {
    font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
    font-size: 0.9rem;
}

.sha256-cell {
    word-break: break-all;
}

.footer {
    margin-top: 1.5rem;
    color: var(--muted);
}

@media (max-width: 900px) {
    .hero,
    .quick-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        background:
            radial-gradient(circle at top left, rgba(255, 123, 28, 0.12), transparent 34%),
            radial-gradient(circle at top right, rgba(15, 108, 242, 0.14), transparent 36%),
            linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
    }

    .shell {
        width: min(100%, calc(100% - 1rem));
        margin: 0.5rem auto 1.5rem;
    }

    .hero,
    .hero-copy,
    .hero-card,
    .quick-card,
    .part,
    .notice,
    .important,
    .tips,
    .footer {
        border-radius: 1.2rem;
    }

    th,
    td {
        padding: 0.75rem;
    }
}
