:root {
    --primary: #0284C7;
    --primary-light: #38BDF8;
    --primary-dark: #0369A1;
    --accent: #2563EB;
    --accent-glow: rgba(2, 132, 199, 0.18);
    
    --bg-body: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-badge: #E0F2FE;
    --bg-code: #F1F5F9;
    --bg-card-hover: #F8FAFC;

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-accent: #0284C7;

    --border-light: #E2E8F0;
    --border-focus: #0284C7;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --primary: #38BDF8;
    --primary-light: #7DD3FC;
    --primary-dark: #0284C7;
    --accent: #60A5FA;
    --accent-glow: rgba(56, 189, 248, 0.2);

    --bg-body: #0B0F19;
    --bg-surface: #111827;
    --bg-surface-elevated: #1F2937;
    --bg-glass: rgba(17, 24, 39, 0.88);
    --bg-badge: #0C4A6E;
    --bg-code: #1E293B;
    --bg-card-hover: #1E293B;

    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --text-accent: #38BDF8;

    --border-light: #1E293B;
    --border-focus: #38BDF8;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 15.5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

/* Ambient Gradient Background Glow */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 480px;
    background: radial-gradient(circle 800px at 50% -15%, var(--accent-glow), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Top Header */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.brand-logo-badge {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #0284C7, #2563EB);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
    letter-spacing: -0.5px;
}

.brand-meta h2 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.brand-meta span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    position: relative;
    display: none;
}

@media (min-width: 768px) {
    .search-box {
        display: block;
    }
}

.search-box input {
    width: 220px;
    padding: 8px 12px 8px 34px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    width: 280px;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box svg {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    fill: var(--text-muted);
    pointer-events: none;
}

.btn-icon {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Hero Banner */
.hero {
    position: relative;
    z-index: 1;
    padding: 56px 24px 36px;
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-badge);
    color: var(--text-accent);
    border-radius: var(--radius-full);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.badge-pill .pulse-dot {
    width: 7px;
    height: 7px;
    background: var(--text-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--text-accent);
}

.hero h1 {
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 14px;
}

.hero p {
    max-width: 720px;
    margin: 0 auto 20px;
    color: var(--text-secondary);
    font-size: 16.5px;
}

.hero-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-meta-row span strong {
    color: var(--text-primary);
}

/* Main Layout Grid */
.main-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 80px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 992px) {
    .main-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Sticky Sidebar Navigation */
.sidebar-nav {
    position: sticky;
    top: 86px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

@media (max-width: 992px) {
    .sidebar-nav {
        display: none;
    }
}

.sidebar-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 8px;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-link {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 2px solid transparent;
}

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

.toc-link.active {
    color: var(--primary);
    background: var(--bg-badge);
    font-weight: 700;
    border-left-color: var(--primary);
}

/* Content Area */
.content-area {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
    .content-area {
        padding: 24px 18px;
    }
}

/* Policy Sections */
.policy-section {
    padding-bottom: 36px;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--border-light);
}

.policy-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.policy-section h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--bg-badge);
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.policy-section h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 22px 0 10px;
}

.policy-section p {
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.policy-section ul, .policy-section ol {
    padding-left: 24px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.policy-section li {
    margin-bottom: 8px;
}

.policy-section li strong {
    color: var(--text-primary);
}

/* Highlight Callout Cards */
.callout-box {
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin: 18px 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-left: 4px solid;
    font-size: 14.5px;
}

.callout-box.info {
    background: var(--bg-badge);
    border-left-color: var(--primary);
    color: var(--text-primary);
}

.callout-box.success {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: #10B981;
    color: var(--text-primary);
}

.callout-box.warning {
    background: rgba(245, 158, 11, 0.12);
    border-left-color: #F59E0B;
    color: var(--text-primary);
}

.callout-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Policy Comparison / Feature Table */
.data-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

table.data-table th {
    background: var(--bg-code);
    color: var(--text-primary);
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

table.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    vertical-align: top;
}

table.data-table tr:last-child td {
    border-bottom: none;
}

table.data-table code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-code);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12.5px;
    color: var(--primary);
}

.tag-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.tag-status.allowed {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.tag-status.removed {
    background: rgba(239, 68, 68, 0.15);
    color: #DC2626;
}

/* Contact & Action Cards */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.contact-card {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px;
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.contact-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.contact-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    padding: 32px 24px;
    text-align: center;
    font-size: 13.5px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Back to top float button */
#backToTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary);
    color: #FFFFFF;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 40;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* Print styles */
@media print {
    header, .sidebar-nav, #backToTop, .ambient-glow, .header-actions {
        display: none !important;
    }
    .main-wrapper {
        grid-template-columns: 1fr;
        padding: 0;
    }
    .content-area {
        border: none;
        box-shadow: none;
        padding: 0;
    }
    body {
        background: #FFFFFF;
        color: #000000;
        font-size: 12pt;
    }
}
