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

html,
body {
    height: 100%;
    font-family:
        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    background: #0f172a;
    color: #e2e8f0;
}

body {
    display: flex;
    flex-direction: column;
}

/* ── Header ─────────────────────────────────────────── */
#help-header {
    background: #1e293b;
    border-bottom: 1px solid #0f172a;
    padding: 14px 32px;
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

#help-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #f1f5f9;
}

#help-version {
    font-size: 12px;
    color: #64748b;
}

/* ── Layout ──────────────────────────────────────────── */
#help-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ── Sidebar nav ─────────────────────────────────────── */
#help-nav {
    width: 220px;
    flex-shrink: 0;
    background: #1e293b;
    border-right: 1px solid #0f172a;
    overflow-y: auto;
    padding: 16px 0;
}

#help-nav a {
    display: block;
    padding: 5px 20px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    border-left: 2px solid transparent;
    transition:
        color 0.1s,
        border-color 0.1s,
        background 0.1s;
}

#help-nav a:hover {
    color: #e2e8f0;
    background: #0f172a;
}

#help-nav a.active {
    color: #60a5fa;
    border-left-color: #3b82f6;
    background: #0f172a;
}

#help-nav .nav-section {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    padding: 12px 20px 4px;
}

/* ── Content ─────────────────────────────────────────── */
#help-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px 48px;
    max-width: 860px;
}

section {
    margin-bottom: 48px;
}

h2 {
    font-size: 22px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1e293b;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    color: #cbd5e1;
    margin: 20px 0 10px;
}

p {
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 12px;
}

a {
    color: #60a5fa;
}

/* ── Tables ──────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 20px;
    font-size: 13px;
}

th {
    background: #1e293b;
    color: #94a3b8;
    font-weight: 600;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid #334155;
}

td {
    padding: 7px 12px;
    border-bottom: 1px solid #1e293b;
    color: #cbd5e1;
    vertical-align: top;
}

tr:last-child td {
    border-bottom: none;
}
tr:hover td {
    background: #1e293b44;
}

/* ── Code & kbd ──────────────────────────────────────── */
kbd,
code {
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
    font-size: 12px;
    background: #1e293b;
    color: #7dd3fc;
    border: 1px solid #334155;
    border-radius: 3px;
    padding: 1px 5px;
}

pre {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
    margin: 10px 0 16px;
    white-space: pre;
}

/* ── Lists ───────────────────────────────────────────── */
ul,
ol {
    color: #94a3b8;
    line-height: 1.7;
    margin: 8px 0 12px 20px;
}

li {
    margin-bottom: 4px;
}

li strong,
td strong {
    color: #e2e8f0;
}

/* ── Callout ──────────────────────────────────────────── */
.note {
    background: #1e293b;
    border-left: 3px solid #3b82f6;
    padding: 10px 16px;
    border-radius: 0 4px 4px 0;
    margin: 12px 0;
    color: #94a3b8;
    font-size: 13px;
}

.note strong {
    color: #60a5fa;
}
