/* ══════════════════════════════════════════════════════════════════════════════
   LEGAL COMPONENT STYLESHEET
   Neural Flow Dynamics LLC — Shared across all public-facing pages
   Owns: global footer legal band, cookie consent banner, disclaimer callouts,
         legal policy page layout, consent checkboxes, trademark notices
   ══════════════════════════════════════════════════════════════════════════════ */

:root {
    --legal-bg:              #06060b;
    --legal-surface:         #0e0e17;
    --legal-surface-2:       #141423;
    --legal-border:          rgba(255, 255, 255, 0.08);
    --legal-border-strong:   rgba(255, 255, 255, 0.16);
    --legal-text:            #e6e6f0;
    --legal-text-dim:        #a0a0b4;
    --legal-text-muted:      #6b6b80;
    --legal-accent:          #6366f1;
    --legal-accent-2:        #22d3ee;
    --legal-warn:            #f59e0b;
    --legal-danger:          #ef4444;
    --legal-radius:          10px;
    --legal-radius-sm:       6px;
}

/* ──────────────────────────────────────────────────────────────────────────────
   1. GLOBAL LEGAL FOOTER (injected on every page)
   ────────────────────────────────────────────────────────────────────────────── */
.legal-footer {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: transparent;
    color: rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 18px 20px 14px;
    font-size: 10px;
    line-height: 1.5;
    position: relative;
    z-index: 10;
}

.legal-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.legal-footer-disclaimer {
    background: transparent;
    border: none;
    border-top: 1px solid var(--legal-border);
    padding: 18px 0 20px;
    margin-bottom: 24px;
    color: var(--legal-text-muted);
    font-size: 11px;
    line-height: 1.65;
}

.legal-footer-disclaimer strong {
    color: var(--legal-text-dim);
    font-weight: 500;
}

.legal-footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.legal-footer-brand-block {
    max-width: 340px;
}

.legal-footer-brand {
    font-size: 16px;
    font-weight: 700;
    color: var(--legal-text);
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}

.legal-footer-entity {
    font-size: 12px;
    color: var(--legal-text-muted);
    line-height: 1.7;
}

.legal-footer-entity a {
    color: var(--legal-text-dim);
    text-decoration: none;
    border-bottom: 1px dotted var(--legal-border-strong);
    transition: color 0.15s ease;
}

.legal-footer-entity a:hover {
    color: var(--legal-accent-2);
}

.legal-footer-col h4 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--legal-text);
    margin: 0 0 14px 0;
}

.legal-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-footer-col li {
    margin-bottom: 8px;
}

.legal-footer-col a {
    color: var(--legal-text-dim);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s ease;
}

.legal-footer-col a:hover {
    color: var(--legal-accent-2);
}

.legal-footer-bottom {
    border-top: 1px solid var(--legal-border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--legal-text-muted);
}

.legal-footer-copy span {
    display: block;
    margin-bottom: 4px;
}

.legal-footer-marks {
    max-width: 640px;
    text-align: right;
    font-size: 11px;
    line-height: 1.6;
    color: var(--legal-text-muted);
}

@media (max-width: 900px) {
    .legal-footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
    .legal-footer-brand-block {
        grid-column: span 2;
    }
    .legal-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
    .legal-footer-marks {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .legal-footer-columns {
        grid-template-columns: 1fr;
    }
    .legal-footer-brand-block {
        grid-column: span 1;
    }
}

/* ──────────────────────────────────────────────────────────────────────────────
   2. COOKIE CONSENT BANNER
   ────────────────────────────────────────────────────────────────────────────── */
.cookie-consent {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    max-width: 520px;
    margin: 0 auto;
    background: rgba(14, 14, 23, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius);
    padding: 14px 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--legal-text-dim);
    font-size: 12px;
    line-height: 1.55;
    z-index: 9000;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.cookie-consent.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-consent-title {
    font-weight: 500;
    font-size: 12.5px;
    margin-bottom: 4px;
    color: var(--legal-text-dim);
}

.cookie-consent-body {
    color: var(--legal-text-muted);
    margin-bottom: 10px;
    font-size: 11.5px;
}

.cookie-consent-body a {
    color: var(--legal-accent-2);
    text-decoration: none;
    border-bottom: 1px dotted var(--legal-accent-2);
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.cookie-consent-btn {
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--legal-radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid var(--legal-border);
    background: transparent;
    color: var(--legal-text-dim);
}

.cookie-consent-btn:hover {
    border-color: var(--legal-accent-2);
    color: var(--legal-accent-2);
}

.cookie-consent-btn.primary {
    background: var(--legal-accent);
    border-color: var(--legal-accent);
    color: #fff;
}

.cookie-consent-btn.primary:hover {
    background: #4f52db;
    border-color: #4f52db;
    color: #fff;
}

.cookie-consent-btn.ghost {
    background: transparent;
    color: var(--legal-text-dim);
}

/* Cookie preferences modal */
.cookie-prefs-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 11, 0.78);
    backdrop-filter: blur(6px);
    z-index: 100001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cookie-prefs-backdrop.visible {
    display: flex;
}

.cookie-prefs {
    background: var(--legal-surface);
    border: 1px solid var(--legal-border-strong);
    border-radius: var(--legal-radius);
    max-width: 520px;
    width: 100%;
    max-height: 86vh;
    overflow-y: auto;
    padding: 28px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--legal-text);
}

.cookie-prefs h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.cookie-prefs > p {
    color: var(--legal-text-dim);
    font-size: 13px;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.cookie-prefs-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-top: 1px solid var(--legal-border);
    gap: 16px;
}

.cookie-prefs-row:first-of-type {
    border-top: none;
}

.cookie-prefs-row-info {
    flex: 1;
}

.cookie-prefs-row-info strong {
    display: block;
    color: var(--legal-text);
    font-size: 13px;
    margin-bottom: 4px;
}

.cookie-prefs-row-info span {
    color: var(--legal-text-dim);
    font-size: 12px;
    line-height: 1.55;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--legal-border-strong);
    border-radius: 24px;
    transition: background 0.2s ease;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: var(--legal-accent);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(18px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.55;
    cursor: not-allowed;
}

.cookie-prefs-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ──────────────────────────────────────────────────────────────────────────────
   3. PREDICTION-OUTPUT METHODOLOGY CALLOUT
   ────────────────────────────────────────────────────────────────────────────── */
/* Readable but unobtrusive legal disclosure — sits quietly below content.
   Visible enough to cover statutory requirements without dominating the page. */
.analytics-disclaimer-callout {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 6px 0;
    margin: 10px auto 0;
    max-width: 1080px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 11px;
    line-height: 1.5;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-weight: 400;
    letter-spacing: 0.005em;
}

.analytics-disclaimer-callout-icon {
    display: none;
}

.analytics-disclaimer-callout strong {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.analytics-disclaimer-callout a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.15);
    text-underline-offset: 2px;
}

.analytics-disclaimer-callout a:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration-color: rgba(255, 255, 255, 0.4);
}

/* ──────────────────────────────────────────────────────────────────────────────
   4. CONSENT CHECKBOXES (signup / billing / forms)
   ────────────────────────────────────────────────────────────────────────────── */
.legal-consent-group {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 18px 0;
}

.legal-consent-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--legal-text-dim);
}

.legal-consent-row input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--legal-accent);
    cursor: pointer;
}

.legal-consent-row label {
    cursor: pointer;
    user-select: none;
}

.legal-consent-row a {
    color: var(--legal-accent-2);
    text-decoration: none;
    border-bottom: 1px dotted var(--legal-accent-2);
}

.legal-consent-row a:hover {
    color: var(--legal-text);
}

.legal-consent-error {
    color: var(--legal-danger);
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.legal-consent-error.visible {
    display: block;
}

/* ──────────────────────────────────────────────────────────────────────────────
   5. IN-PAGE DATA / PRIVACY MICRO-NOTICES
   ────────────────────────────────────────────────────────────────────────────── */
.legal-micro-notice {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11.5px;
    color: var(--legal-text-muted);
    line-height: 1.55;
    margin-top: 8px;
}

.legal-micro-notice a {
    color: var(--legal-text-dim);
    text-decoration: none;
    border-bottom: 1px dotted var(--legal-text-muted);
}

.legal-micro-notice a:hover {
    color: var(--legal-accent-2);
}

/* ──────────────────────────────────────────────────────────────────────────────
   6. LEGAL POLICY PAGE LAYOUT (terms, privacy, disclaimer, cookies, refund, AUP)
   ────────────────────────────────────────────────────────────────────────────── */
.legal-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--legal-bg);
    color: var(--legal-text);
    min-height: 100vh;
    line-height: 1.7;
    font-size: 15px;
}

.legal-page-header {
    max-width: 840px;
    margin: 0 auto;
    padding: 56px 24px 24px;
}

.legal-page-header a.legal-back {
    font-size: 13px;
    color: var(--legal-text-dim);
    text-decoration: none;
    border-bottom: 1px dotted var(--legal-border-strong);
    padding-bottom: 1px;
}

.legal-page-header a.legal-back:hover {
    color: var(--legal-accent-2);
}

.legal-page-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 20px 0 8px 0;
    color: var(--legal-text);
}

.legal-page-meta {
    color: var(--legal-text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.legal-page-lede {
    color: var(--legal-text-dim);
    font-size: 16px;
    line-height: 1.65;
    margin-top: 18px;
    padding: 18px 20px;
    background: var(--legal-surface);
    border-left: 3px solid var(--legal-accent);
    border-radius: 4px;
}

.legal-page-content {
    max-width: 840px;
    margin: 0 auto;
    padding: 20px 24px 96px;
    color: var(--legal-text-dim);
}

.legal-page-content h2 {
    color: var(--legal-text);
    font-size: 22px;
    font-weight: 600;
    margin: 44px 0 12px 0;
    letter-spacing: -0.005em;
}

.legal-page-content h3 {
    color: var(--legal-text);
    font-size: 16px;
    font-weight: 600;
    margin: 28px 0 8px 0;
}

.legal-page-content p {
    margin: 0 0 14px 0;
}

.legal-page-content ul,
.legal-page-content ol {
    margin: 0 0 14px 0;
    padding-left: 24px;
}

.legal-page-content li {
    margin-bottom: 8px;
}

.legal-page-content a {
    color: var(--legal-accent-2);
    text-decoration: none;
    border-bottom: 1px dotted var(--legal-accent-2);
}

.legal-page-content a:hover {
    color: var(--legal-text);
}

.legal-page-content strong {
    color: var(--legal-text);
    font-weight: 600;
}

.legal-page-content .legal-emphasis {
    background: var(--legal-surface);
    border: 1px solid var(--legal-border);
    border-left: 3px solid var(--legal-warn);
    padding: 16px 20px;
    border-radius: 4px;
    margin: 18px 0;
    color: var(--legal-text);
    font-size: 14.5px;
}

.legal-page-content .legal-contact-block {
    background: var(--legal-surface);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius);
    padding: 20px 24px;
    margin: 28px 0;
    color: var(--legal-text-dim);
    font-size: 14px;
}

.legal-page-content .legal-contact-block strong {
    display: block;
    margin-bottom: 6px;
}

.legal-page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 13.5px;
}

.legal-page-content th,
.legal-page-content td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--legal-border);
    vertical-align: top;
}

.legal-page-content th {
    color: var(--legal-text);
    font-weight: 600;
    background: var(--legal-surface);
}

.legal-page-toc {
    background: var(--legal-surface);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius);
    padding: 20px 24px;
    margin: 28px 0;
}

.legal-page-toc h4 {
    margin: 0 0 12px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--legal-text-dim);
    font-weight: 600;
}

.legal-page-toc ol {
    margin: 0;
    padding-left: 20px;
}

.legal-page-toc li {
    margin-bottom: 4px;
    font-size: 13.5px;
}

.legal-page-toc a {
    color: var(--legal-text-dim);
    text-decoration: none;
    border-bottom: none;
}

.legal-page-toc a:hover {
    color: var(--legal-accent-2);
}

@media (max-width: 640px) {
    .legal-page-title { font-size: 28px; }
    .legal-page-header,
    .legal-page-content { padding-left: 20px; padding-right: 20px; }
}

/* ──────────────────────────────────────────────────────────────────────────────
   7. LEAGUE TRADEMARK NOTICE (per-league page)
   ────────────────────────────────────────────────────────────────────────────── */
.trademark-notice {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 1080px;
    margin: 24px auto;
    padding: 14px 18px;
    background: var(--legal-surface);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius-sm);
    color: var(--legal-text-muted);
    font-size: 11.5px;
    line-height: 1.6;
    text-align: center;
}

.trademark-notice strong {
    color: var(--legal-text-dim);
}

/* ── COMPACT FOOTER (2026-07-04) ─────────────────────────────────────────────
   The full-height columns layout consumed ~half the viewport on short pages.
   Same links + legal substance, ~1/4 the height. */
.legal-footer--compact { padding: 14px 20px 12px; }
.legal-footer--compact .legal-footer-inner { max-width: 1280px; margin: 0 auto; }
.legal-footer-disclaimer--compact {
    font-size: 11px;
    line-height: 1.55;
    opacity: 0.85;
    margin-bottom: 10px;
}
.legal-footer-links-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    font-size: 10.5px;
    line-height: 1.6;
    padding: 8px 0;
    border-top: 1px solid rgba(226, 229, 255, 0.08);
    border-bottom: 1px solid rgba(226, 229, 255, 0.08);
    margin-bottom: 8px;
}
.legal-footer-links-row a { white-space: nowrap; text-decoration: none; }
.legal-footer-links-row a:hover { text-decoration: underline; }
.legal-footer-dot { opacity: 0.35; }
.legal-footer-bottom--compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 9.5px;
    line-height: 1.5;
    opacity: 0.65;
}
.legal-footer-marks--compact { opacity: 0.85; }
