:root {
    --sidebar-bg: #0f0f23;
    --sidebar-text: #94a3b8;
    --sidebar-active: #f8fafc;
    --content-bg: #ffffff;
    --content-text: #1e293b;
    --content-muted: #64748b;
    --accent: #2389ae;
    --accent-hover: #1c6e8b;
    --accent-light: rgba(35, 137, 174, 0.1);
    --border: #e2e8f0;
    --code-bg: #f8fafc;
    --surface: #f5f8ff;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--content-text);
    background: var(--content-bg);
}

/* ── Layout ── */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    margin-bottom: 0.5rem;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.sidebar-logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(35, 137, 174, 0.6);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sidebar-active);
}

.sidebar-subtitle {
    font-size: 0.72rem;
    color: var(--sidebar-text);
    margin-left: 18px;
}

.sidebar-version {
    display: inline-block;
    margin-left: 18px;
    margin-top: 6px;
    font-size: 0.68rem;
    background: rgba(35, 137, 174, 0.15);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.nav-section {
    margin-bottom: 0.25rem;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.5);
    padding: 0.75rem 1.5rem 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s, background 0.15s;
    border-left: 2px solid transparent;
}

.nav-link:hover {
    color: var(--sidebar-active);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: var(--accent);
    font-weight: 500;
    border-left-color: var(--accent);
    background: rgba(35, 137, 174, 0.08);
}

/* ── Main ── */
.main {
    flex: 1;
    padding: 2.5rem 3.5rem 5rem;
    max-width: 54rem;
}

/* ── Page header ── */
.page-header {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

.page-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--content-text);
    line-height: 1.2;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1rem;
    color: var(--content-muted);
    max-width: 560px;
    margin: 0;
}

/* ── Pill tabs ── */
.pill-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.pill-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--content-muted);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.pill-tab:hover {
    color: var(--accent);
}

.pill-tab.active {
    background: white;
    color: var(--accent);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--border);
}

.pill-content {
    display: none;
}

.pill-content.active {
    display: block;
}

/* ── Typography ── */
h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--content-text);
    margin: 2.5rem 0 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--content-text);
    margin: 2rem 0 0.75rem;
}

h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--content-text);
    margin: 1.25rem 0 0.5rem;
}

p {
    margin: 0 0 1rem;
    color: var(--content-text);
}

ul,
ol {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.4rem;
    color: var(--content-text);
}

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

a:hover {
    text-decoration: underline;
}

/* ── Code ── */
pre {
    background: #1a1d2e;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
}

:not(pre)>code {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    font-size: 0.875em;
    font-weight: 500;
}

/* ── Callouts ── */
.callout {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.25rem 0;
    border-left: 3px solid;
}

.callout-info {
    background: #eff6ff;
    border-color: #3b82f6;
}

.callout-warning {
    background: #fffbeb;
    border-color: #f59e0b;
}

.callout-tip {
    background: #f0fdf4;
    border-color: #22c55e;
}

.callout-danger {
    background: #fef2f2;
    border-color: #ef4444;
}

.callout-title {
    font-weight: 700;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.callout-info .callout-title {
    color: #1d4ed8;
}

.callout-warning .callout-title {
    color: #b45309;
}

.callout-tip .callout-title {
    color: #15803d;
}

.callout-danger .callout-title {
    color: #b91c1c;
}

.callout p:last-child {
    margin: 0;
}

/* ── Steps ── */
.step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.step-number {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
    margin-top: 2px;
}

.step-body {
    flex: 1;
}

.step-body h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

/* ── Feature grid ── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.feature-card {
    padding: 1.1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.15s;
}

.feature-card:hover {
    border-color: var(--accent);
}

.feature-card-icon {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.feature-card h4 {
    margin: 0 0 0.6rem;
    font-size: 0.9375rem;
    color: var(--accent);
}

.feature-card ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.875rem;
    color: var(--content-muted);
}

.feature-card li {
    margin-bottom: 0.3rem;
}

/* ── Table ── */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

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

th {
    font-weight: 600;
    background: var(--surface);
    font-size: 0.8125rem;
}

tr:last-child td {
    border-bottom: none;
}

/* ── Credits ── */
.credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.credit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
}

.credit-item a {
    font-weight: 500;
}

/* ── Changelog ── */
.changelog-item {
    border-left: 2px solid var(--border);
    padding-left: 1.25rem;
    margin-bottom: 2rem;
    position: relative;
}

.changelog-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.changelog-version {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.changelog-version-number {
    font-weight: 700;
    font-size: 1rem;
    color: var(--content-text);
}

.changelog-date {
    font-size: 0.8125rem;
    color: var(--content-muted);
}

.changelog-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.badge-initial {
    background: rgba(35, 137, 174, 0.12);
    color: var(--accent);
}

.changelog-list {
    list-style: none;
    padding: 0;
}

.changelog-list li {
    padding: 4px 0;
    font-size: 0.875rem;
    color: var(--content-muted);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.changelog-list li::before {
    content: '✓';
    color: #22c55e;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Support card ── */
.support-card {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border-radius: 10px;
    padding: 2rem;
    color: white;
    margin: 1.5rem 0;
}

.support-card h3 {
    color: white;
    margin-top: 0;
}

.support-card p {
    color: rgba(255, 255, 255, 0.7);
}

.support-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.support-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s;
}

.support-link:hover {
    background: rgba(255, 255, 255, 0.18);
    text-decoration: none;
}

.support-link.primary {
    background: var(--accent);
    border-color: var(--accent);
}

.support-link.primary:hover {
    background: var(--accent-hover);
}

/* ── Responsive ── */
html {
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main {
        padding: 1.5rem 1.25rem 3rem;
    }

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