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

:root {
    --bg: #111118;
    --surface: #1a1a24;
    --surface-hover: #22222e;
    --border: #2a2a3a;
    --border-light: #38384a;
    --text: #e0e0e8;
    --text-muted: #90909e;
    --accent: #7aa2f7;
    --accent-hover: #9bb8ff;
    --green: #7ecf8e;
    --red: #f7768e;
    --orange: #e9b17a;
    --code-bg: #14141e;
    --font: Georgia, 'Noto Serif', 'Source Serif 4', serif;
    --sans: -apple-system, system-ui, 'Segoe UI', Helvetica, Arial, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

body {
    font-family: var(--sans), serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    font-size: 17px;
}

a {
    color: var(--accent);
    text-underline-offset: 2px;
}

a:hover {
    color: var(--accent-hover);
}

/* Nav */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(17, 17, 24, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(6px);
}

.nav-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: 18px;
}

/* Lang toggle */
.lang-toggle {
    display: flex;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.lang-btn {
    font-family: var(--sans), sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.lang-btn:hover {
    color: var(--text);
}

.lang-btn.active {
    background: var(--accent);
    color: #fff;
}

.nav-links a {
    font-size: 13px;
    font-family: var(--sans), serif;
    color: var(--text-muted);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* Header */
header {
    padding: 64px 24px 40px;
    border-bottom: 1px solid var(--border);
}

.header-content {
    max-width: 660px;
    margin: 0 auto;
}

header h1 {
    font-size: 30px;
    font-weight: 700;
    font-family: var(--sans), serif;
    line-height: 1.3;
    margin-bottom: 14px;
    color: var(--text);
    letter-spacing: -0.4px;
}

header .highlight {
    color: var(--accent);
}

.subtitle {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 18px;
    font-family: var(--sans), sans-serif;
}

.subtitle code {
    font-family: var(--mono);
    font-size: 14px;
    background: var(--code-bg);
    padding: 1px 6px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
}

.meta-row {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-family: var(--sans), sans-serif;
}

.critical {
    color: var(--red);
    font-weight: 600;
}

/* Main content */
main {
    max-width: 660px;
    margin: 0 auto;
    padding: 44px 24px 64px;
}

section {
    margin-bottom: 52px;
}

section h2 {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--sans), sans-serif;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
    letter-spacing: -0.3px;
}

.card {
    margin-bottom: 24px;
}

.card h3 {
    font-size: 17px;
    font-weight: 600;
    font-family: var(--sans), sans-serif;
    color: var(--text);
    margin-bottom: 10px;
}

.card p {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.8;
}

.card p:last-child {
    margin-bottom: 0;
}

.card ul, .card ol {
    margin: 10px 0;
    padding-left: 24px;
    font-size: 16px;
    color: var(--text);
    line-height: 1.8;
}

.card li {
    margin-bottom: 6px;
}

/* Code blocks */
.code-header {
    font-size: 11px;
    font-weight: 600;
    font-family: var(--sans), sans-serif;
    color: var(--text-muted);
    padding: 7px 14px;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.code-header + pre {
    border-radius: 0 0 4px 4px;
    border-top: none;
    margin-top: 0;
}

pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 16px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.6;
    margin: 14px 0;
    color: #d0d0da;
}

code {
    font-family: var(--mono);
    font-size: 14px;
    background: var(--code-bg);
    padding: 1px 5px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
}

pre code {
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: 13px;
}

/* Flow list */
.flow-list {
    padding-left: 20px;
}

.flow-list li {
    padding: 6px 0;
    line-height: 1.7;
}

.flow-list li strong {
    color: var(--accent);
}

/* Impact grid */
.impact-grid {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 28px;
}

.impact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 18px;
    flex: 1;
    max-width: 320px;
}

.impact-card h4 {
    font-size: 12px;
    font-weight: 700;
    font-family: var(--sans), sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.impact-card.critical h4 { color: var(--red); }
.impact-card.high h4 { color: var(--orange); }
.impact-card.medium h4 { color: var(--accent); }

.impact-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    font-family: var(--sans), sans-serif;
}

/* Version list */
.version-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.version-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.version-name {
    font-weight: 600;
    font-size: 14px;
    font-family: var(--sans), sans-serif;
    min-width: 100px;
    white-space: nowrap;
}

.version-item.broken .version-name { color: var(--red); }
.version-item.fixed .version-name { color: var(--green); }

.version-detail {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    font-family: var(--sans), sans-serif;
}

.affected {
    border-left: 3px solid var(--accent);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 22px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 28px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 7px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
}

.timeline-date {
    font-size: 13px;
    font-weight: 600;
    font-family: var(--sans), sans-serif;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.timeline-content h4 {
    font-size: 16px;
    font-weight: 600;
    font-family: var(--sans), sans-serif;
    color: var(--text);
    margin-bottom: 4px;
}

.timeline-content p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    font-family: var(--sans), sans-serif;
}

/* Footer */
footer {
    max-width: 660px;
    margin: 0 auto;
    padding: 28px 24px 48px;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    font-family: var(--sans), sans-serif;
}

/* Responsive */
@media (max-width: 640px) {
    header h1 {
        font-size: 24px;
    }

    body {
        font-size: 16px;
    }

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

    .nav-links {
        display: none;
    }

    .meta-row {
        flex-direction: column;
        gap: 6px;
    }

    .version-item {
        flex-direction: column;
        gap: 4px;
    }

    .version-name {
        min-width: auto;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}
