/* ══════════════════════════════════════
   terms.css — fully matches index.html brand
   ══════════════════════════════════════ */

/* Force same base as index */
body.terms-page {
    background: var(--off-white);
    padding-top: 74px;
    font-family: 'Sora', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ── SIDEBAR ── */
.terms-sidebar {
    position: fixed;
    top: 74px;
    left: 0;
    height: calc(100vh - 74px);
    width: 44px;
    background: var(--white);
    border-right: 1px solid var(--border);
    border-top: 4px solid var(--navy);
    z-index: 90;
    transition: width 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terms-sidebar.open {
    width: 230px;
    box-shadow: 4px 0 20px rgba(26,50,99,0.1);
}

/* ── TOGGLE BUTTON ── */
.sidebar-toggle {
    min-height: 44px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
    font-family: 'Sora', sans-serif;
    z-index: 91;
    position: relative;
}

.sidebar-toggle:hover {
    background: rgba(84,119,146,0.08);
}

/* ── SIDEBAR BODY ── */
.sidebar-body {
    padding: 8px 16px 24px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease 0s;
    pointer-events: none;
}

.terms-sidebar.open .sidebar-body {
    opacity: 1;
    transition: opacity 0.2s ease 0.15s;
    pointer-events: all;
}

.sidebar-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-family: 'DM Mono', monospace;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 10px;
    border-left: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    display: block;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--navy);
    border-left-color: var(--steel);
    background: rgba(84,119,146,0.07);
    font-weight: 700;
}

/* ══════════════════════════════════════
   LAYOUT — single authoritative rule
   (no duplicates — this was the bug)
   ══════════════════════════════════════ */
.terms-layout {
    display: flex;
    max-width: 1100px;
    margin: 0 0 0 44px;          /* offset by collapsed sidebar width */
    padding: 60px 60px 100px 40px;
    align-items: flex-start;
    transition: margin-left 0.3s ease;
}

/* content shifts right when sidebar opens */
.terms-layout.shifted {
    margin-left: 230px;
}

/* ── MAIN CONTENT ── */
.terms-content {
    flex: 1;
    min-width: 0;
}

/* ── META ── */
.terms-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 28px;
    font-family: 'DM Mono', monospace;
}

.terms-version {
    background: rgba(84,119,146,0.1);
    color: var(--steel);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    letter-spacing: 0.5px;
    border: 1px solid var(--steel);
    font-family: 'DM Mono', monospace;
}

.terms-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 48px 0;
}

/* ── SECTION ── */
.terms-section {
    scroll-margin-top: 100px;
}

.section-label {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--steel);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.terms-section h2 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.8px;
    margin-bottom: 20px;
    line-height: 1.15;
}

.terms-section p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 14px;
}

/* ── LIST ── */
.terms-list {
    list-style: none;
    padding: 0;
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.terms-list li {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    padding-left: 22px;
    position: relative;
}

.terms-list li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--steel);
    font-weight: 700;
}

/* ── TABLE ── */
.terms-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 24px;
    border: 1px solid var(--border);
}

.terms-table th {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-align: left;
    padding: 12px 18px;
    background: var(--white);
    border-bottom: 3px solid var(--navy);
    text-transform: uppercase;
}

.terms-table td {
    padding: 14px 18px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.terms-table tbody tr:last-child td {
    border-bottom: none;
}

.terms-table tbody tr:hover {
    background: rgba(84,119,146,0.04);
}

/* ── BLOCKQUOTE ── */
.terms-quote {
    margin: 24px 0;
    padding: 20px 24px;
    border-left: 4px solid var(--steel);
    background: rgba(84,119,146,0.06);
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.85;
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 900px) {
    .terms-layout,
    .terms-layout.shifted {
        margin-left: 0 !important;
        padding: 32px 20px 80px 20px !important;
        transition: none;
    }

    .terms-sidebar {
        left: 0;
        z-index: 100;
    }

    .terms-sidebar.open {
        width: 80vw;
        max-width: 320px;
        box-shadow: 4px 0 20px rgba(26,50,99,0.1);
    }
}

@media (max-width: 768px) {
    nav {
        padding: 16px 24px;
    }
}