/* =========================================================
   1. BASE LAYOUT & CONTAINERS
   ========================================================= */
.legal-content-wrapper {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
    color: white;
}

.legal-document {
    scroll-padding-top: 20px;
}

.mt-0 { margin-top: 0 !important; }
.mt-15 { margin-top: 15px; }

/* =========================================================
   2. TYPOGRAPHY & LINKS (Dark Theme Default)
   ========================================================= */
.legal-document h1 {
    color: #555; /* 🟢 Changed from var(--accent) to dark grey */
    font-size: 14px; /* 🟢 Reduced from 24px to 14px ("way smaller") */
    font-weight: 800;
    margin-bottom: 16px;
    /*text-transform: uppercase;*/
    letter-spacing: 1px;
}

.legal-document h2 {
    color: #eee;             /* Clear white-ish anchor */
    font-size: 18px;         /* Distinctly larger than body */
    font-weight: 700;
    margin-top: 40px;        /* Heavy breathing room above */
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05); /* Subtle underline for "Section" feel */
    padding-bottom: 8px;
}

.legal-document h3 {
    color: #ddd; /* Slightly muted compared to h2 */
    font-size: 14px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 8px;
}

.legal-document p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 13.5px;
    margin-bottom: 16px;
}

.legal-document strong {
    color: var(--text);
}

.legal-document p a {
    color: inherit;
    text-decoration: underline;
}

.legal-document hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 40px 0;
}

.cookie-settings-link {
    color: #3dd1dc;
    text-decoration: underline;
    font-weight: bold;
    font-size: 14px;
}

/* =========================================================
   3. QUICK JUMP MENU
   ========================================================= */
.quick-jump-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 32px;
}

.quick-jump-label {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.quick-jump-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.quick-jump-col {
    flex: 1;
    min-width: 200px;
}

.quick-jump-col-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.quick-jump-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.7);
}

.quick-jump-list a {
    color: inherit;
    text-decoration: underline;
}

/* =========================================================
   4. SPA HEADER TOGGLES
   ========================================================= */
body.is-legal-view #tournament-controls,
body.is-legal-view #interactive-section,
body.is-legal-view #app-subheader {
    display: none !important;
}

body.is-legal-view #legal-controls {
    display: flex !important;
}

body.is-legal-view #controls-section {
    flex-grow: 1;
}

/* Hidden by default in the main app */
.legal-site-title {
    display: none;
}

/* =========================================================
   5. LIGHT THEME OVERRIDE (For traffic from stats site)
   ========================================================= */
body.light-theme-override {
    background-color: #ffffff;
    color: #333;
}

body.light-theme-override .legal-content-wrapper {
    color: #333;
}

body.light-theme-override .quick-jump-box {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

body.light-theme-override .quick-jump-label {
    color: #999;
}

body.light-theme-override .quick-jump-col-title {
    color: #111;
}

body.light-theme-override .quick-jump-list {
    color: #555;
}

body.light-theme-override .legal-document h1,
body.light-theme-override .legal-document h2 {
    color: #111;
    border-bottom-color: #eee;
}

body.light-theme-override .legal-document h3 {
    color: #444;
}

body.light-theme-override .legal-document p {
    color: #555;
}

body.light-theme-override .legal-document a {
    color: #0088cc;
}

body.light-theme-override .cookie-settings-link {
    color: #0088cc;
}

body.light-theme-override .legal-document hr {
    border-top-color: #eee;
}

/* Hide main site navigation elements so it looks like a standalone document */
body.light-theme-override header,
body.light-theme-override #app-header {
    display: none;
}

/* Show and style the title only for the standalone stats view */
body.light-theme-override .legal-site-title {
    display: block;
    font-size: 28px;
    font-weight: 900;
    color: #111;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}