/* ── Base ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Geist', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background: #ffffff;
    color: #18181b;
    -webkit-font-smoothing: antialiased;
}

code, .font-mono { font-family: 'Geist Mono', monospace; }

/* ── Dark mode ──────────────────────────────────────────────────────────────── */
.dark body,
body.dark {
    background: #09090b;
    color: #fafafa;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-pill {
    margin: 0 auto;
    display: flex;
    max-width: 42rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 9999px;
    border: 1px solid #e4e4e7;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    padding: 6px 6px 6px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.dark .header-pill {
    background: rgba(9,9,11,0.88);
    border-color: rgba(255,255,255,0.1);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 20px; height: 20px;
    border-radius: 6px;
    background: #18181b;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.dark .logo-icon { background: #fafafa; }
.dark .logo-icon svg path { fill: #18181b; }

.logo-name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #18181b;
}
.dark .logo-name { color: #fafafa; }

.header-nav {
    display: none;
    align-items: center;
}
@media (min-width: 768px) { .header-nav { display: inline-flex; } }

.header-nav a {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #52525b;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.header-nav a:hover,
.header-nav a.active {
    background: #f4f4f5;
    color: #18181b;
}
.dark .header-nav a { color: #a1a1aa; }
.dark .header-nav a:hover,
.dark .header-nav a.active { background: rgba(255,255,255,0.08); color: #fafafa; }

.header-actions {
    display: none;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
@media (min-width: 768px) { .header-actions { display: inline-flex; } }

.btn-theme {
    padding: 8px;
    border-radius: 9999px;
    border: 1px solid #e4e4e7;
    background: transparent;
    color: #71717a;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    line-height: 0;
}
.btn-theme:hover { background: #f4f4f5; }
.dark .btn-theme { border-color: rgba(255,255,255,0.15); color: #a1a1aa; }
.dark .btn-theme:hover { background: rgba(255,255,255,0.08); }

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    background: #18181b;
    color: #fafafa;
    text-decoration: none;
    font-family: 'Geist', sans-serif;
    transition: background .15s;
}
.btn-download:hover { background: #3f3f46; }
.dark .btn-download { background: #fafafa; color: #18181b; }
.dark .btn-download:hover { background: #e4e4e7; }

.btn-mobile-theme {
    display: inline-flex;
    padding: 8px;
    border-radius: 9999px;
    background: transparent;
    border: none;
    color: #52525b;
    cursor: pointer;
    transition: background .15s;
    line-height: 0;
}
.btn-mobile-theme:hover { background: #f4f4f5; }
.dark .btn-mobile-theme { color: #a1a1aa; }
.dark .btn-mobile-theme:hover { background: rgba(255,255,255,0.08); }
@media (min-width: 768px) { .btn-mobile-theme { display: none; } }

/* ── Main content ───────────────────────────────────────────────────────────── */
.site-main {
    max-width: 768px;
    margin: 0 auto;
    padding: 0 20px 7rem;
}

/* ── Page header ────────────────────────────────────────────────────────────── */
.page-header {
    padding-top: 3.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f4f4f5;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.dark .page-header { border-color: rgba(255,255,255,0.07); }

.page-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.page-header p {
    font-size: 13px;
    color: #71717a;
}
.dark .page-header p { color: #a1a1aa; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid #e4e4e7;
    color: #71717a;
    background: #fff;
    white-space: nowrap;
}
.dark .status-pill { border-color: rgba(255,255,255,0.1); color: #a1a1aa; background: #09090b; }

.status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.35; } }

/* ── Filter bar ─────────────────────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 12px;
    color: #a1a1aa;
    margin-right: 4px;
}

.filter-btn {
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid #e4e4e7;
    background: transparent;
    color: #71717a;
    cursor: pointer;
    transition: all .15s;
    font-family: 'Geist', sans-serif;
}
.filter-btn:hover { background: #f4f4f5; color: #27272a; }
.filter-btn.active { background: #18181b; color: #fafafa; border-color: #18181b; font-weight: 500; }
.dark .filter-btn { color: #a1a1aa; border-color: rgba(255,255,255,0.1); }
.dark .filter-btn:hover { background: rgba(255,255,255,0.06); color: #e4e4e7; border-color: rgba(255,255,255,0.15); }
.dark .filter-btn.active { background: #fafafa; color: #18181b; border-color: #fafafa; }

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

.tl-line {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, #65a30d 0%, #e4e4e7 30%, transparent 100%);
}
.dark .tl-line { background: linear-gradient(to bottom, #a3e635 0%, rgba(255,255,255,0.1) 40%, transparent 100%); }

/* ── Release block ──────────────────────────────────────────────────────────── */
.release {
    position: relative;
    padding-bottom: 2.5rem;
    animation: fadeIn .3s ease both;
}
.release.hidden { display: none; }

@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.release:nth-child(1) { animation-delay: .05s; }
.release:nth-child(2) { animation-delay: .1s; }
.release:nth-child(3) { animation-delay: .15s; }
.release:nth-child(4) { animation-delay: .2s; }
.release:nth-child(5) { animation-delay: .25s; }

.dot-wrap {
    position: absolute;
    left: -28px;
    top: 7px;
    transform: translateX(-50%);
    z-index: 1;
}

.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: 1.5px solid #d4d4d8;
    background: #fff;
}
.dark .dot { background: #09090b; border-color: rgba(255,255,255,0.35); }

.dot.dot-major {
    background: #65a30d;
    border-color: #65a30d;
    box-shadow: 0 0 0 3px rgba(101,163,13,0.15);
}
.dark .dot.dot-major { background: #a3e635; border-color: #a3e635; box-shadow: 0 0 0 3px rgba(163,230,53,0.12); }

.release-divider {
    border-top: 1px solid #f4f4f5;
    margin-bottom: 2.5rem;
}
.dark .release-divider { border-color: rgba(255,255,255,0.07); }

/* ── Release header ─────────────────────────────────────────────────────────── */
.release-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.release-version {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
    color: #18181b;
}
.dark .release-version { color: #fafafa; }

.release-date {
    font-size: 12px;
    color: #a1a1aa;
    font-family: 'Geist Mono', monospace;
}

.release-subtitle {
    font-size: 13px;
    color: #a1a1aa;
    font-style: italic;
    margin-bottom: 20px;
}

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid;
    letter-spacing: .03em;
    font-family: 'Geist Mono', monospace;
}
.badge-major { background: #f0fdf4; color: #16a34a; border-color: rgba(22,163,74,.25); }
.badge-minor { background: #eff6ff; color: #2563eb; border-color: rgba(37,99,235,.2); }
.badge-patch { background: #fafafa; color: #71717a; border-color: #e4e4e7; }
.dark .badge-major { background: rgba(22,163,74,.1); color: #4ade80; border-color: rgba(74,222,128,.2); }
.dark .badge-minor { background: rgba(37,99,235,.1); color: #60a5fa; border-color: rgba(96,165,250,.2); }
.dark .badge-patch { background: rgba(255,255,255,.05); color: #a1a1aa; border-color: rgba(255,255,255,.1); }

/* ── Change type labels ─────────────────────────────────────────────────────── */
.ctype {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid;
    margin-bottom: 10px;
}
.ctype-new      { background: #f0fdf4; color: #16a34a; border-color: rgba(22,163,74,.2); }
.ctype-fix      { background: #fef2f2; color: #dc2626; border-color: rgba(220,38,38,.2); }
.ctype-improved { background: #eff6ff; color: #2563eb; border-color: rgba(37,99,235,.2); }
.ctype-breaking { background: #fffbeb; color: #d97706; border-color: rgba(217,119,6,.2); }
.dark .ctype-new      { background: rgba(22,163,74,.1); color: #4ade80; border-color: rgba(74,222,128,.2); }
.dark .ctype-fix      { background: rgba(220,38,38,.1); color: #f87171; border-color: rgba(248,113,113,.2); }
.dark .ctype-improved { background: rgba(37,99,235,.1); color: #60a5fa; border-color: rgba(96,165,250,.2); }
.dark .ctype-breaking { background: rgba(217,119,6,.1);  color: #fbbf24; border-color: rgba(251,191,36,.2); }

/* ── Change lists ───────────────────────────────────────────────────────────── */
.change-group { margin-bottom: 20px; }

.change-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.change-list li {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: #52525b;
    line-height: 1.65;
}
.dark .change-list li { color: #a1a1aa; }

.change-bullet {
    color: #d4d4d8;
    user-select: none;
    margin-top: 1px;
    flex-shrink: 0;
}
.dark .change-bullet { color: #3f3f46; }

/* ── Inline tags & code ─────────────────────────────────────────────────────── */
.inline-tag {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    background: #f4f4f5;
    color: #71717a;
    border: 1px solid #e4e4e7;
    font-family: 'Geist Mono', monospace;
    vertical-align: middle;
    margin-left: 4px;
}
.dark .inline-tag { background: rgba(255,255,255,.07); color: #a1a1aa; border-color: rgba(255,255,255,.1); }

.inline-code {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    background: #f4f4f5;
    color: #3f3f46;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid #e4e4e7;
}
.dark .inline-code { background: rgba(255,255,255,.08); color: #d4d4d8; border-color: rgba(255,255,255,.1); }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer { margin: 0 auto; max-width: 80rem; }

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 3rem 1rem;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.footer-logo-icon {
    width: 24px; height: 24px;
    border-radius: 6px;
    background: #18181b;
    display: flex; align-items: center; justify-content: center;
}
.dark .footer-logo-icon { background: #fafafa; }
.dark .footer-logo-icon svg path { fill: #18181b; }

.footer-logo-name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #18181b;
}
.dark .footer-logo-name { color: #fafafa; }

.footer-nav {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    font-weight: 500;
    color: #71717a;
}
@media (min-width: 640px) {
    .footer-nav { flex-direction: row; gap: 0 16px; }
}

.footer-nav a {
    color: #71717a;
    text-decoration: none;
    transition: color .15s;
}
.footer-nav a:hover { color: #18181b; }
.dark .footer-nav a { color: #71717a; }
.dark .footer-nav a:hover { color: #fafafa; }

.footer-social {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #a1a1aa;
}

.footer-social a {
    color: #a1a1aa;
    text-decoration: none;
    transition: color .15s;
    line-height: 0;
}
.footer-social a:hover { color: #18181b; }
.dark .footer-social a:hover { color: #fafafa; }

.footer-copy {
    font-size: 12px;
    color: #a1a1aa;
}
.dark .footer-copy { color: #52525b; }
