:root {
    --color-primary: #E66018;
    --color-text: #1A1A1A;
    --color-secondary-text: #6B7280;
    --color-secondary-bg: #FFF7ED;
    --color-bg: #FAFAF9;
    --color-border: #E5E7EB;
    --color-surface: #FFFFFF;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

/* styles.css sets overflow-x:hidden on html/body, which turns them into scroll
   containers (overflow-y then computes to auto) and breaks position:sticky —
   the TOC sidebar stops sticking and scrolls away. Legal pages have no
   horizontal-overflow content, so restore the default scrolling context. */
html, body { overflow-x: visible; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Legal pages use the shared site nav (#main-nav from styles.css). It is
   position:fixed, so the hero banner below needs top clearance for it. */

@keyframes gradient-pulse {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ── Hero banner ── */
.hero {
    background: var(--color-text);
    padding: 132px 40px 56px; /* extra top padding clears the fixed site nav */
    text-align: center;
}
.hero .badge {
    display: inline-block;
    background: rgba(230, 96, 24, 0.15);
    color: var(--color-primary);
    border: 1px solid rgba(230, 96, 24, 0.3);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 14px;
    background: linear-gradient(90deg, #d93d1a, #e66018, #f5821f, #e66018, #d93d1a);
    background-size: 200% 100%;
    background-position: 0% 50%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-pulse 4s ease-in-out infinite;
}
.hero .meta { font-size: 0.9rem; color: rgba(255,255,255,0.45); }
.hero-intro {
    max-width: 620px;
    margin: 20px auto 0;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    text-align: center;
}
.hero-intro p { margin-bottom: 6px; }
.hero-intro p:last-child { margin-bottom: 0; }
.hero-intro strong { color: rgba(255,255,255,0.8); font-weight: 700; }

/* ── Document layout ── */
.doc-wrapper { max-width: 780px; margin: 0 auto; padding: 60px 24px 100px; }

/* ── TOC + content two-column layout (privacy notice) ── */
.doc-layout {
    display: flex;
    align-items: flex-start;
    gap: 48px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 60px 24px 100px;
}
.doc-content { flex: 1; min-width: 0; max-width: 780px; }

.toc-sidebar {
    width: 196px;
    flex-shrink: 0;
    position: sticky;
    top: 108px; /* clears the fixed site nav (~84px) with breathing room */
    max-height: calc(100vh - 128px);
    overflow-y: auto;
}
/* Offset anchor jumps from the TOC so section headings land below the fixed nav */
.doc-content .section[id] { scroll-margin-top: 108px; }
.toc-heading {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-secondary-text);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
}
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 1px; }
.toc-link {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-secondary-text);
    padding: 5px 8px 5px 10px;
    border-radius: 6px;
    border-left: 2px solid transparent;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.toc-link:hover {
    color: var(--color-text);
    background: rgba(0,0,0,0.04);
    text-decoration: none;
}
.toc-link.active {
    color: var(--color-primary);
    background: rgba(230,96,24,0.07);
    border-left-color: var(--color-primary);
    font-weight: 600;
}
@media (max-width: 960px) {
    .toc-sidebar { display: none; }
    .doc-layout { padding: 40px 24px 80px; }
    .doc-content { max-width: 100%; }
}
@media (max-width: 640px) {
    .doc-layout { padding: 24px 16px 60px; }
}

/* ── Intro card ── */
.intro {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 36px 40px;
    margin-bottom: 20px;
    font-size: 0.975rem;
    color: var(--color-text);
}

/* ── Sections ── */
.section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 36px 40px;
    margin-bottom: 20px;
}
.section-number {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 8px;
}
.section h2 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--color-text);
    margin-bottom: 18px;
    line-height: 1.3;
}
.section p { font-size: 0.975rem; color: var(--color-text); margin-bottom: 14px; }
.section p:last-child { margin-bottom: 0; }

/* ── Sub-items ── */
.sub-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--color-border);
}
.sub-item:first-of-type { margin-top: 14px; }
.sub-item .dot {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    margin-top: 8px;
}
.sub-item .sub-label { font-size: 0.9rem; font-weight: 700; color: var(--color-text); margin-bottom: 4px; }
.sub-item .sub-text  { font-size: 0.9rem; color: var(--color-secondary-text); }

/* ── Disclaimer block ── */
.disclaimer {
    background: var(--color-secondary-bg);
    border: 1px solid rgba(230, 96, 24, 0.2);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 18px;
    font-size: 0.88rem;
    color: var(--color-text);
    line-height: 1.6;
}

/* ── Footer ── */
footer {
    width: 100%;
    margin-top: auto;
    padding: 32px 40px;
    background: var(--color-text);
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}
footer p { font-size: clamp(1rem, 1.5vw, 1.2rem); }
footer a { color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.2s ease; }
footer a:hover { color: rgba(255,255,255,0.8); text-decoration: none; }
.footer-heart {
    color: #e74c3c;
    animation: heartGlow 2s ease-in-out infinite;
}
@keyframes heartGlow {
    0%, 100% { color: #e74c3c; text-shadow: 0 0 5px rgb(231 76 60 / .3); }
    50%       { color: #c0392b; text-shadow: 0 0 10px rgb(192 57 43 / .6); }
}

@media (max-width: 640px) {
    .hero { padding: 104px 20px 40px; } /* clears the fixed site nav on mobile */
    .intro, .section { padding: 24px 20px; }
    footer { padding: 28px 20px; }
}

/* ── Markdown-rendered content ── */
.section h1 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--color-text);
    margin-bottom: 18px;
    line-height: 1.3;
}
.section h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 24px;
    margin-bottom: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}
.section h2:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.section h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 18px;
    margin-bottom: 8px;
}
.intro p, .section p { font-size: 0.975rem; color: var(--color-text); margin-bottom: 14px; }
.intro p:last-child, .section p:last-child { margin-bottom: 0; }

/* Tables */
.section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    margin-bottom: 4px;
    font-size: 0.875rem;
}
.section thead tr { background: #F3F4F6; }
.section th {
    font-weight: 700;
    text-align: left;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.section td {
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: top;
    line-height: 1.6;
}
.section tbody tr:nth-child(even) td { background: var(--color-bg); }

/* Lists */
.section ul, .intro ul { list-style: none; margin: 10px 0 14px 0; padding: 0; }
.section ul li, .intro ul li {
    position: relative;
    padding-left: 18px;
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1.65;
}
.section ul li::before, .intro ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
}
.section ol { padding-left: 1.4rem; margin: 10px 0 14px; }
.section ol li { font-size: 0.95rem; color: var(--color-text); margin-bottom: 8px; line-height: 1.65; }

/* Inline */
.section strong, .intro strong { font-weight: 700; }
.section em, .intro em { font-style: italic; }
.section code { font-family: monospace; background: #F3F4F6; padding: 1px 5px; border-radius: 4px; font-size: 0.85em; }

/* Mobile */
@media (max-width: 640px) {
    .section table { font-size: 0.8rem; }
    .section th, .section td { padding: 8px 10px; }
}

/* ── Columned footer (shared with marketing pages; rendered by index.php) ── */
.site-footer { text-align: left; padding: 0; }
.footer-inner {
    max-width: 1120px; margin: 0 auto; padding: 54px 40px 0;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px;
}
.footer-brand { max-width: 30ch; }
.footer-logo { height: 90px; width: auto; position: relative; left: -25px; }
.footer-tagline { margin-top: 12px; font-size: 0.9rem; color: rgba(255,255,255,0.55); line-height: 1.5; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 44px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
    font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: rgba(255,255,255,0.9); margin: 0 0 4px; font-weight: 700;
}
.footer-col a { font-size: 0.9rem; color: rgba(255,255,255,0.55); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    max-width: 1120px; margin: 34px auto 0; padding: 20px 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    font-size: 0.8rem;
}
@media (max-width: 640px) {
    .footer-inner, .footer-bottom { padding-left: 20px; padding-right: 20px; }
    .footer-cols { gap: 28px; }
    .footer-logo { height: 65px; left: -20px; }
}
