*,
*::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;
}

/* ── Header ─────────────────────────────────────────── */
#terms-header {
    background: #1e293b;
    border-bottom: 1px solid #0f172a;
    padding: 14px 32px;
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-shrink: 0;
}

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

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

/* ── Layout ─────────────────────────────────────────── */
#terms-body {
    display: flex;
    height: calc(100vh - 53px);
    overflow: hidden;
}

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

#terms-nav h2 {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    padding: 0 16px 10px;
}

#terms-nav a {
    display: block;
    padding: 7px 16px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    border-left: 3px solid transparent;
    transition:
        color 0.1s,
        border-color 0.1s,
        background 0.1s;
}

#terms-nav a:hover {
    color: #e2e8f0;
    background: #263347;
}

#terms-nav a.active {
    color: #3b82f6;
    border-left-color: #3b82f6;
    background: #172035;
}

/* ── Content ─────────────────────────────────────────── */
#terms-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px 48px 64px;
}

#terms-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.last-updated {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 40px;
}

.terms-section {
    margin-bottom: 36px;
    scroll-margin-top: 24px;
}

.terms-section h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #3b82f6;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1e293b;
}

.terms-section p {
    color: #cbd5e1;
    line-height: 1.75;
    margin-bottom: 12px;
}

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

.terms-section ul {
    list-style: none;
    margin: 8px 0 12px 0;
}

.terms-section ul li {
    color: #cbd5e1;
    line-height: 1.7;
    padding: 3px 0 3px 20px;
    position: relative;
}

.terms-section ul li::before {
    content: '•';
    color: #475569;
    position: absolute;
    left: 6px;
}

.highlight-box {
    background: #1e293b;
    border: 1px solid #334155;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 14px 0;
}

.highlight-box p {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 8px;
}

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

a.external {
    color: #3b82f6;
    text-decoration: none;
}

a.external:hover {
    text-decoration: underline;
}

.divider {
    border: none;
    border-top: 1px solid #1e293b;
    margin: 36px 0;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 13px;
}

.footer-links a:hover {
    text-decoration: underline;
}
