html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: #FFFFFF;
    color: #2C2C2C;
    overflow-x: hidden;
}

/* ══════════════════════════════
       READING PROGRESS BAR
    ══════════════════════════════ */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #C49A3C, #DDB96A);
    width: 0%;
    z-index: 100;
    transition: width 0.1s linear;
}

/* ══════════════════════════════
       DOCUMENT HEADER
    ══════════════════════════════ */
.doc-header {
    background: #1C3A2A;
    border-bottom: 3px solid #C49A3C;
}

/* ══════════════════════════════
       LAYOUT — STICKY TOC + CONTENT
    ══════════════════════════════ */
.doc-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 1024px) {
    .doc-layout {
        grid-template-columns: 260px 1fr;
        align-items: start;
    }
}

/* ══════════════════════════════
       STICKY TOC
    ══════════════════════════════ */
.toc-wrap {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.toc-wrap::-webkit-scrollbar {
    width: 3px;
}

.toc-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.toc-wrap::-webkit-scrollbar-thumb {
    background: rgba(196, 154, 60, 0.3);
    border-radius: 2px;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    color: #7A7A6E;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    border-left: 2px solid transparent;
    line-height: 1.3;
}

.toc-link:hover {
    background: rgba(28, 58, 42, 0.05);
    color: #1C3A2A;
}

.toc-link.active {
    background: rgba(196, 154, 60, 0.08);
    color: #1C3A2A;
    border-left-color: #C49A3C;
    font-weight: 500;
}

.toc-num {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    color: rgba(196, 154, 60, 0.5);
    flex-shrink: 0;
    width: 16px;
}

.toc-link.active .toc-num {
    color: #C49A3C;
}

/* ══════════════════════════════
       PLAIN LANGUAGE TOGGLE
    ══════════════════════════════ */
.lang-toggle-wrap {
    background: rgba(28, 58, 42, 0.06);
    border: 1px solid rgba(28, 58, 42, 0.12);
    border-radius: 50px;
    padding: 4px;
    display: inline-flex;
    gap: 0;
}

.lang-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
    color: #7A7A6E;
    white-space: nowrap;
}

.lang-btn.active {
    background: #1C3A2A;
    color: #F7F3ED;
}

/* Plain / Legal text visibility */
.text-plain {
    display: block;
}

.text-legal {
    display: none;
}

body.legal-mode .text-plain {
    display: none;
}

body.legal-mode .text-legal {
    display: block;
}

/* ══════════════════════════════
       LEGAL SECTIONS
    ══════════════════════════════ */
.legal-section {
    padding: 48px 0;
    border-bottom: 1px solid rgba(28, 58, 42, 0.08);
    scroll-margin-top: 24px;
}

.legal-section:last-child {
    border-bottom: none;
}

.section-num {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    color: #C49A3C;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 6px;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.85rem;
    font-weight: 500;
    color: #1C3A2A;
    line-height: 1.15;
    margin-bottom: 20px;
}

/* Summary card */
.summary-card {
    background: rgba(196, 154, 60, 0.07);
    border-left: 3px solid #C49A3C;
    border-radius: 0 10px 10px 0;
    padding: 14px 18px;
    margin-bottom: 24px;
}

.summary-card p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: #1C3A2A;
    line-height: 1.6;
    font-weight: 500;
}

.summary-card .label {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    color: rgba(196, 154, 60, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 4px;
}

/* Body text */
.legal-body p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    color: #4A4A4A;
    line-height: 1.8;
    margin-bottom: 16px;
}

.legal-body p:last-child {
    margin-bottom: 0;
}

.legal-body.text-legal p {
    font-size: 0.82rem;
    line-height: 1.9;
    color: #5A5A5A;
}

/* Subsections */
.sub-heading {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1C3A2A;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 24px;
    margin-bottom: 10px;
}

/* Legal list */
.legal-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    space-y: 8px;
}

.legal-list li {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    color: #4A4A4A;
    line-height: 1.7;
    padding: 8px 0 8px 20px;
    position: relative;
    border-bottom: 1px solid rgba(28, 58, 42, 0.05);
}

.legal-list li:last-child {
    border-bottom: none;
}

.legal-list li::before {
    content: '·';
    position: absolute;
    left: 6px;
    color: #C49A3C;
    font-weight: 700;
}

/* ══════════════════════════════
       REGISTRATION BLOCK
    ══════════════════════════════ */
.reg-block {
    background: #1C3A2A;
    border-radius: 16px;
    padding: 28px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .reg-block {
        grid-template-columns: 1fr 1fr;
    }
}

.reg-field label {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    color: rgba(196, 154, 60, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 4px;
}

.reg-field p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: rgba(247, 243, 237, 0.85);
    line-height: 1.5;
}

/* ══════════════════════════════
       GDPR BADGE
    ══════════════════════════════ */
.gdpr-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(28, 58, 42, 0.07);
    border: 1px solid rgba(28, 58, 42, 0.15);
    border-radius: 50px;
    padding: 6px 14px;
}

/* ══════════════════════════════
       PRINT / DOWNLOAD
    ══════════════════════════════ */
@media print {

    #reading-progress,
    .toc-wrap,
    .lang-toggle-wrap,
    .no-print {
        display: none !important;
    }

    .doc-layout {
        grid-template-columns: 1fr !important;
    }

    .legal-section {
        page-break-inside: avoid;
    }

    body {
        background: white;
    }
}

/* ══════════════════════════════
       CONTACT INLINE BLOCK
    ══════════════════════════════ */
.contact-inline {
    background: rgba(28, 58, 42, 0.05);
    border: 1px solid rgba(28, 58, 42, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 20px;
}

/* ══════════════════════════════
       VERSION BADGE
    ══════════════════════════════ */
.version-chip {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    background: rgba(196, 154, 60, 0.15);
    color: #C49A3C;
    padding: 3px 10px;
    border-radius: 50px;
    border: 1px solid rgba(196, 154, 60, 0.25);
}

/* HR variants */
.hr-light {
    border: none;
    height: 1px;
    background: rgba(28, 58, 42, 0.08);
}

.hr-gold {
    border: none;
    height: 1px;
    background: linear-gradient(to right, #C49A3C, transparent);
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}