/* ==========================================================================
   EduPrimeX — Premium Legal & Policies Stylesheet
   Supports: Terms of Service, Privacy Policy
   Features: Glassmorphism, Dual Theme (Dark/Light), Scrollspy Sidebar, Print
   ========================================================================== */

:root {
    /* Dark Theme (Default) */
    --bg-base: #060911;
    --bg-surface: #0b1120;
    --bg-card: rgba(15, 23, 42, 0.72);
    --bg-card-hover: rgba(26, 38, 66, 0.85);
    --bg-glass: rgba(11, 17, 32, 0.85);
    --bg-subtle: rgba(255, 255, 255, 0.04);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(56, 189, 248, 0.3);
    --border-focus: #06b6d4;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-cyan: #06b6d4;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-purple: #8b5cf6;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    
    --grad-primary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
    --grad-badge: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.15));
    --grad-glow: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 35px rgba(6, 182, 212, 0.2);
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --nav-height: 76px;
}

/* Light Theme Overrides */
html[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-surface: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.88);
    --bg-subtle: rgba(15, 23, 42, 0.04);
    
    --border-subtle: rgba(15, 23, 42, 0.09);
    --border-hover: rgba(6, 182, 212, 0.45);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 30px rgba(6, 182, 212, 0.15);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.7;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--grad-primary);
    z-index: 1001;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
    transition: width 0.1s linear;
}

/* Ambient Glowing Shapes */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: rgba(6, 182, 212, 0.18);
    top: -100px;
    left: -150px;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: rgba(139, 92, 246, 0.15);
    top: 35%;
    right: -200px;
}

.glow-3 {
    width: 450px;
    height: 450px;
    background: rgba(59, 130, 246, 0.12);
    bottom: -100px;
    left: 10%;
}

/* Container */
.legal-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.legal-nav {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.legal-nav .legal-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-wrap img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(6, 182, 212, 0.35));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text strong {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-primary);
}

.brand-text strong span {
    color: var(--accent-cyan);
}

.brand-text small {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
}

/* Center Policy Switcher Tabs */
.policy-switcher {
    display: flex;
    align-items: center;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 4px;
    gap: 4px;
}

.policy-tab {
    padding: 7px 18px;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 7px;
}

.policy-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.policy-tab.active {
    background: var(--grad-primary);
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(6, 182, 212, 0.35);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.btn-back-home:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateX(-2px);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.legal-hero {
    padding: 60px 0 40px;
    position: relative;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: var(--grad-badge);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.hero-title .text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 820px;
    line-height: 1.7;
    margin-bottom: 28px;
}

.meta-chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.meta-chip i {
    color: var(--accent-cyan);
}

.meta-chip strong {
    color: var(--text-primary);
    font-weight: 600;
}

.meta-chip.status-chip {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-emerald);
    font-weight: 600;
}

.meta-chip.status-chip .live-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 10px var(--accent-emerald);
}

.btn-print {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-print:hover {
    color: var(--text-primary);
    border-color: var(--accent-cyan);
}

/* TL;DR Notice Card */
.tldr-card {
    margin-top: 32px;
    padding: 24px 28px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.06), rgba(59, 130, 246, 0.06));
    border: 1px solid rgba(6, 182, 212, 0.22);
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.tldr-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--grad-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
}

.tldr-body h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.tldr-body p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   Two-Column Layout: Sidebar & Content
   ========================================================================== */
.legal-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 48px;
    padding: 50px 0 80px;
    align-items: start;
}

/* Sticky Sidebar */
.legal-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    max-height: calc(100vh - var(--nav-height) - 48px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.toc-search-wrap {
    position: relative;
    margin-bottom: 14px;
}

.toc-search-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.toc-search-input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-subtle);
    color: var(--text-primary);
    font-size: 0.82rem;
    outline: none;
    transition: all 0.2s ease;
}

.toc-search-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.toc-heading {
    font-family: var(--font-heading);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 6px;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    max-height: 48vh;
    padding-right: 4px;
}

.toc-list::-webkit-scrollbar {
    width: 4px;
}

.toc-list::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 4px;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.toc-num {
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 18px;
}

.toc-link:hover {
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.toc-link.active {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.08);
    border-left-color: var(--accent-cyan);
    font-weight: 600;
}

.toc-link.active .toc-num {
    color: var(--accent-cyan);
}

/* Sidebar Officer Card */
.sidebar-officer-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.officer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-cyan);
}

.officer-details strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.officer-details p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 8px;
}

.officer-details a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    word-break: break-all;
}

.officer-details a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Main Legal Content Sections
   ========================================================================== */
.legal-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.legal-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    backdrop-filter: blur(14px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.legal-section:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.section-header-wrap {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.section-number-pill {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    flex: 1;
}

.section-anchor {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.legal-section:hover .section-anchor {
    opacity: 0.7;
}

.section-anchor:hover {
    opacity: 1 !important;
    color: var(--accent-cyan);
}

.legal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 0.96rem;
    color: var(--text-secondary);
}

.legal-body p {
    line-height: 1.75;
}

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

/* Sub-sections */
.sub-section {
    margin-top: 14px;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
}

.sub-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sub-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sub-header .sub-badge {
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

/* Styled Lists */
.legal-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.legal-list li {
    position: relative;
    padding-left: 26px;
    line-height: 1.65;
}

.legal-list li::before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent-cyan);
    font-size: 0.82rem;
}

.legal-list.cross li::before {
    content: "\f057";
    color: #ef4444;
}

.legal-list.bullet li::before {
    content: "\f111";
    font-size: 0.45rem;
    top: 9px;
    color: var(--accent-blue);
}

/* Definition Grid (Terms) */
.definition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.def-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
}

.def-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.def-term {
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 8px;
}

.def-term i {
    font-size: 0.85rem;
    color: var(--accent-blue);
}

.def-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Callout Alert Boxes */
.callout-box {
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin: 12px 0;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    font-size: 0.92rem;
    line-height: 1.65;
}

.callout-box.info {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: var(--text-secondary);
}

.callout-box.info i {
    color: var(--accent-cyan);
    font-size: 1.2rem;
    margin-top: 2px;
}

.callout-box.warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--text-secondary);
}

.callout-box.warning i {
    color: var(--accent-amber);
    font-size: 1.2rem;
    margin-top: 2px;
}

.callout-box.ai {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.08));
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--text-secondary);
}

.callout-box.ai i {
    color: var(--accent-purple);
    font-size: 1.25rem;
    margin-top: 2px;
}

.callout-box strong {
    color: var(--text-primary);
}

/* Contact Entity Card */
.contact-entity-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(11, 17, 32, 0.9));
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    box-shadow: var(--shadow-glow);
}

.entity-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.entity-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--accent-cyan);
}

.entity-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.entity-value a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
}

.entity-value a:hover {
    text-decoration: underline;
}

/* Bottom Page Switcher CTA */
.policy-page-cta {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 20px;
}

.policy-page-cta-text h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.policy-page-cta-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.btn-switch-page {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    background: var(--grad-primary);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.35);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-switch-page:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.5);
}

/* Back to Top Floating Button */
.btn-back-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s ease;
    z-index: 900;
}

.btn-back-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-back-top:hover {
    background: var(--grad-primary);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.legal-footer {
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: 60px 0 36px;
    margin-top: 40px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-row-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-brand strong {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
}

.footer-brand span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .legal-sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }

    .toc-list {
        max-height: 280px;
    }

    .policy-switcher {
        display: none;
    }

    .contact-entity-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .legal-section {
        padding: 24px 20px;
    }

    .policy-page-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-title {
        font-size: 2rem;
    }

    .btn-back-home span {
        display: none;
    }

    .btn-back-home {
        padding: 8px 12px;
    }

    .meta-chip-row {
        gap: 8px;
    }

    .btn-print {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Print Stylesheet
   ========================================================================== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .legal-nav,
    .reading-progress,
    .ambient-glow,
    .legal-sidebar,
    .policy-page-cta,
    .btn-back-top,
    .legal-footer,
    .btn-print,
    .policy-switcher,
    .nav-actions {
        display: none !important;
    }

    .legal-layout {
        grid-template-columns: 1fr !important;
        padding: 0 !important;
    }

    .legal-section {
        background: none !important;
        border: none !important;
        border-bottom: 1px solid #ddd !important;
        padding: 20px 0 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }

    .section-title {
        color: #000000 !important;
    }

    .legal-body {
        color: #222222 !important;
    }
}
