:root {
    /* Color Palette */
    --primary-blue: #002d5d;
    --accent-teal: #002d5d;
    --dark-gray: #212529;
    --medium-gray: #6c757d;
    --light-gray: #f8f9fa;
    --border-gray: #dee2e6;
    --white: #ffffff;
    --success-green: #28a745;
    --warning-orange: #fd7e14;
    --danger-red: #dc3545;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-xxl: 4rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--light-gray);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-teal));
    z-index: 9999;
    transition: width var(--transition-fast);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border-gray);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.logo span {
    color: var(--accent-teal);
}

.logo a {
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-link {
    color: var(--medium-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-normal);
}

.nav-link:hover {
    color: var(--primary-blue);
}

.print-btn {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.print-btn:hover {
    background: var(--accent-teal);
    transform: translateY(-1px);
}

/* Main Layout */
.main {
    min-height: calc(100vh - 120px);
    padding: var(--space-lg) 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 120px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--primary-blue);
}

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

.toc-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--medium-gray);
}

.toc-list {
    list-style: none;
}

.toc-list li {
    margin-bottom: var(--space-xs);
}

.toc-link {
    display: block;
    padding: var(--space-xs) var(--space-sm);
    text-decoration: none;
    color: var(--medium-gray);
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    font-size: 0.9rem;
}

.toc-link:hover,
.toc-link.active {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateX(4px);
}

/* Content Area */
.content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.document-header {
    text-align: center;
    margin-bottom: var(--space-xxl);
    padding-bottom: var(--space-lg);
    border-bottom: 3px solid var(--primary-blue);
}

.document-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: var(--space-md);
}

.document-meta {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.company-name {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 1.1rem;
}

.last-updated {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

/* Sections */
.section {
    margin-bottom: var(--space-xxl);
    scroll-margin-top: 120px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--accent-teal);
}

.subsection {
    margin-bottom: var(--space-lg);
}

.subsection-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: var(--space-md);
}

.intro-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-blue);
}

.intro-text {
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
    color: var(--dark-gray);
}

/* Definitions Grid */
.definitions-grid {
    display: grid;
    gap: var(--space-md);
}

.definition-item {
    background: #f8f9fa;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-teal);
    transition: all var(--transition-normal);
}

.definition-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.definition-term {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: var(--space-xs);
}

.definition-desc {
    color: var(--dark-gray);
    line-height: 1.6;
}

/* Lists */
.restriction-list {
    list-style: none;
    padding-left: 0;
}

.restriction-list li {
    position: relative;
    padding: var(--space-xs) 0 var(--space-xs) var(--space-lg);
    margin-bottom: var(--space-xs);
    background: #fff3cd;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--warning-orange);
}

.restriction-list li::before {
    content: "⚠";
    position: absolute;
    left: var(--space-sm);
    color: var(--warning-orange);
    font-weight: bold;
}

/* Important Notices */
.important-notice {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid var(--danger-red);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
}

.notice-title {
    font-family: var(--font-heading);
    color: var(--danger-red);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.notice-title::before {
    content: "⚠";
    font-size: 1.4rem;
}

.disclaimer-text {
    font-weight: 500;
    color: var(--dark-gray);
    line-height: 1.5;
}

.liability-notice {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: var(--success-green);
}

.liability-notice .notice-title {
    color: var(--success-green);
}

.liability-notice .notice-title::before {
    content: "ℹ";
}

.liability-content p {
    margin-bottom: var(--space-md);
}

.liability-content strong {
    color: var(--success-green);
}

/* Legal Table */
.jurisdiction-table {
    overflow-x: auto;
    margin: var(--space-md) 0;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.legal-table th,
.legal-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-gray);
}

.legal-table th {
    background: var(--primary-blue);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

.legal-table td {
    font-size: 0.9rem;
}

.legal-table tr:hover {
    background: var(--light-gray);
}

/* Contact Link */
.contact-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-normal);
}

.contact-link:hover {
    color: var(--accent-teal);
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: var(--space-lg) 0;
    margin-top: var(--space-xxl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-links {
    display: flex;
    gap: var(--space-md);
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-normal);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .sidebar {
        position: relative;
        top: auto;
        max-height: none;
        order: 2;
    }
    
    .toc-toggle {
        display: block;
    }
    
    .toc.collapsed {
        display: none;
    }
    
    .document-title {
        font-size: 2rem;
    }
    
    .document-meta {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    .nav {
        width: 100%;
        justify-content: space-between;
    }
    
    .content {
        padding: var(--space-lg);
    }
    
    .legal-table {
        font-size: 0.8rem;
    }
    
    .legal-table th,
    .legal-table td {
        padding: var(--space-sm);
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .content {
        padding: var(--space-md);
    }
    
    .document-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .print-btn {
        padding: var(--space-xs);
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .sidebar,
    .footer,
    .progress-bar {
        display: none !important;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .content {
        box-shadow: none;
        padding: 0;
    }
    
    .important-notice {
        border: 2px solid var(--dark-gray);
        background: var(--white) !important;
    }
    
    .definition-item {
        background: var(--white) !important;
        border: 1px solid var(--border-gray);
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
