/**
 * Legal Pages Stylesheet - Enterprise Edition
 *
 * Styles for Terms of Service, Privacy Policy, Acceptable Use Policy,
 * and Prohibited Businesses pages.
 *
 * Designed to convey trust, professionalism, and regulatory credibility.
 *
 * @author Stackvate Inc.
 * @version 2.0.0
 */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */

:root {
    /* Billvate Primary Colors */
    --legal-primary: #1e3d52;
    --legal-primary-light: #2b5876;
    --legal-primary-dark: #162d3d;

    /* Accent Colors */
    --legal-accent: #f59e0b;
    --legal-accent-light: #fbbf24;

    /* Semantic Colors */
    --legal-success: #059669;
    --legal-success-light: #d1fae5;
    --legal-warning: #d97706;
    --legal-warning-light: #fef3c7;
    --legal-danger: #dc2626;
    --legal-danger-light: #fee2e2;
    --legal-info: #2563eb;
    --legal-info-light: #dbeafe;

    /* Neutrals */
    --legal-text-primary: #1f2937;
    --legal-text-secondary: #4b5563;
    --legal-text-muted: #6b7280;
    --legal-bg-primary: #ffffff;
    --legal-bg-secondary: #f8fafc;
    --legal-bg-tertiary: #f1f5f9;
    --legal-border: #e2e8f0;
    --legal-border-light: #f1f5f9;

    /* Typography */
    --legal-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --legal-section-gap: 56px;
    --legal-content-gap: 24px;

    /* Border Radius */
    --legal-radius-sm: 6px;
    --legal-radius-md: 10px;
    --legal-radius-lg: 14px;
    --legal-radius-xl: 20px;

    /* Shadows */
    --legal-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --legal-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --legal-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --legal-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============================================
   LEGAL CONTENT WRAPPER
   ============================================ */

.legal-content {
    background: var(--legal-bg-secondary);
    min-height: 100vh;
}

/* ============================================
   PAGE HERO - ENHANCED
   ============================================ */

.page-hero {
    background: linear-gradient(135deg, var(--legal-primary) 0%, var(--legal-primary-light) 50%, var(--legal-primary) 100%);
    background-size: 200% 200%;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(245, 158, 11, 0.15) 0%, transparent 40%);
    pointer-events: none;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero .page-title {
    /* Clean enterprise typography - no shadow */
}

.page-hero .page-subtitle {
    /* Clean enterprise typography - no shadow */
}

/* Page Hero Variants */
.page-hero.page-hero-danger {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 50%, #b91c1c 100%);
    background-size: 200% 200%;
}

.page-hero.page-hero-danger::before {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 0, 0, 0.1) 0%, transparent 40%);
}

.page-hero.page-hero-warning {
    background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #b45309 100%);
    background-size: 200% 200%;
}

/* ============================================
   LAYOUT - TWO COLUMN WITH STICKY TOC
   ============================================ */

.legal-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 32px 80px;
}

.legal-main-content {
    max-width: 820px;
    background: var(--legal-bg-primary);
    border-radius: var(--legal-radius-xl);
    padding: 48px;
    box-shadow: var(--legal-shadow-lg);
    border: 1px solid var(--legal-border-light);
}

/* ============================================
   TABLE OF CONTENTS SIDEBAR
   ============================================ */

.legal-toc-sidebar {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding-right: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--legal-border) transparent;
}

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

.legal-toc-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.legal-toc-sidebar::-webkit-scrollbar-thumb {
    background: var(--legal-border);
    border-radius: 2px;
}

.legal-toc {
    background: var(--legal-bg-primary);
    border-radius: var(--legal-radius-lg);
    padding: 24px;
    box-shadow: var(--legal-shadow-md);
    border: 1px solid var(--legal-border-light);
}

.legal-toc h3 {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--legal-text-muted);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--legal-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-toc h3::before {
    content: '';
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, var(--legal-primary), var(--legal-primary-light));
    border-radius: 2px;
}

.legal-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
}

.legal-toc-list li {
    margin-bottom: 2px;
}

.legal-toc-list a {
    color: var(--legal-text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: block;
    padding: 8px 12px;
    border-radius: var(--legal-radius-sm);
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    line-height: 1.4;
}

.legal-toc-list a:hover {
    color: var(--legal-primary);
    background: var(--legal-bg-tertiary);
    border-left-color: var(--legal-primary-light);
}

.legal-toc-list a.active {
    background: linear-gradient(135deg, var(--legal-primary), var(--legal-primary-light));
    color: white;
    border-left-color: transparent;
    font-weight: 500;
}

/* ============================================
   EFFECTIVE DATE BANNER
   ============================================ */

.effective-date-banner {
    background: linear-gradient(135deg, var(--legal-primary) 0%, var(--legal-primary-light) 100%);
    color: white;
    padding: 18px 24px;
    border-radius: var(--legal-radius-md);
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--legal-shadow-md);
    position: relative;
    overflow: hidden;
}

.effective-date-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08));
    pointer-events: none;
}

.effective-date-banner span {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.effective-date-banner span::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--legal-accent);
    border-radius: 50%;
}

.effective-date-banner strong {
    font-weight: 500;
}

.effective-date-banner.danger {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
}

.effective-date-banner.warning {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
}

/* ============================================
   LEGAL SECTIONS
   ============================================ */

.legal-section {
    margin-bottom: var(--legal-section-gap);
    scroll-margin-top: 32px;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: 24px;
    font-weight: 500;
    color: var(--legal-text-primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--legal-border);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-section h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--legal-primary), var(--legal-primary-light));
    border-radius: 1px;
}

.legal-section h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--legal-text-primary);
    margin: 32px 0 16px 0;
    padding-left: 16px;
    border-left: 3px solid var(--legal-primary-light);
}

.legal-section h4 {
    font-size: 16px;
    font-weight: 500;
    color: var(--legal-text-primary);
    margin: 24px 0 12px 0;
}

.legal-section p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--legal-text-secondary);
    margin-bottom: 16px;
}

.legal-section ul,
.legal-section ol {
    margin: 16px 0;
    padding-left: 0;
    list-style: none;
}

.legal-section li {
    font-size: 15px;
    line-height: 1.7;
    color: var(--legal-text-secondary);
    margin-bottom: 10px;
    padding-left: 28px;
    position: relative;
}

.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--legal-primary);
    border-radius: 50%;
}

.legal-section ol {
    counter-reset: list-counter;
}

.legal-section ol li {
    counter-increment: list-counter;
}

.legal-section ol li::before {
    content: counter(list-counter) ".";
    position: absolute;
    left: 4px;
    top: 0;
    font-weight: 500;
    color: var(--legal-primary);
    font-size: 14px;
}

/* ============================================
   CALLOUTS
   ============================================ */

.legal-callout {
    background: var(--legal-bg-tertiary);
    border-left: 4px solid var(--legal-primary);
    padding: 20px 24px;
    margin: 28px 0;
    border-radius: 0 var(--legal-radius-md) var(--legal-radius-md) 0;
    position: relative;
}

.legal-callout::before {
    content: '\f05a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 500;
    position: absolute;
    top: 20px;
    left: -12px;
    width: 24px;
    height: 24px;
    background: var(--legal-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.legal-callout h4 {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 8px 0;
    color: var(--legal-primary);
}

.legal-callout p {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.7;
}

.legal-callout p:last-child {
    margin-bottom: 0;
}

/* Callout Variants */
.legal-callout.warning {
    border-left-color: var(--legal-warning);
    background: var(--legal-warning-light);
}

.legal-callout.warning::before {
    content: '\f071';
    background: var(--legal-warning);
}

.legal-callout.warning h4 {
    color: var(--legal-warning);
}

.legal-callout.danger {
    border-left-color: var(--legal-danger);
    background: var(--legal-danger-light);
}

.legal-callout.danger::before {
    content: '\f057';
    background: var(--legal-danger);
}

.legal-callout.danger h4 {
    color: var(--legal-danger);
}

.legal-callout.info {
    border-left-color: var(--legal-info);
    background: var(--legal-info-light);
}

.legal-callout.info::before {
    content: '\f05a';
    background: var(--legal-info);
}

.legal-callout.info h4 {
    color: var(--legal-info);
}

.legal-callout.success {
    border-left-color: var(--legal-success);
    background: var(--legal-success-light);
}

.legal-callout.success::before {
    content: '\f058';
    background: var(--legal-success);
}

.legal-callout.success h4 {
    color: var(--legal-success);
}

/* ============================================
   TABLES
   ============================================ */

.legal-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 28px 0;
    border-radius: var(--legal-radius-md);
    overflow: hidden;
    box-shadow: var(--legal-shadow-sm);
    border: 1px solid var(--legal-border);
}

.legal-table th,
.legal-table td {
    padding: 14px 18px;
    text-align: left;
    font-size: 14px;
}

.legal-table th {
    background: linear-gradient(135deg, var(--legal-primary), var(--legal-primary-light));
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.legal-table td {
    background: var(--legal-bg-primary);
    border-bottom: 1px solid var(--legal-border);
    color: var(--legal-text-secondary);
}

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

.legal-table tr:hover td {
    background: var(--legal-bg-tertiary);
}

/* ============================================
   LINK BOXES
   ============================================ */

.legal-link-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.legal-link-box a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--legal-bg-primary);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius-md);
    text-decoration: none;
    color: var(--legal-primary);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.25s ease;
    box-shadow: var(--legal-shadow-sm);
}

.legal-link-box a i {
    font-size: 16px;
    opacity: 0.8;
}

.legal-link-box a:hover {
    background: linear-gradient(135deg, var(--legal-primary), var(--legal-primary-light));
    color: white;
    border-color: var(--legal-primary);
    transform: translateY(-2px);
    box-shadow: var(--legal-shadow-md);
}

.legal-link-box a:hover i {
    opacity: 1;
}

/* ============================================
   DATA CATEGORY GRID (Privacy Policy)
   ============================================ */

.data-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.data-category-card {
    background: var(--legal-bg-primary);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius-md);
    padding: 20px;
    transition: all 0.25s ease;
}

.data-category-card:hover {
    border-color: var(--legal-primary-light);
    box-shadow: var(--legal-shadow-md);
}

.data-category-card h4 {
    font-size: 15px;
    font-weight: 500;
    color: var(--legal-text-primary);
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--legal-border-light);
}

.data-category-card h4 i {
    color: var(--legal-primary);
    font-size: 18px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(30, 61, 82, 0.08), rgba(43, 88, 118, 0.12));
    border-radius: var(--legal-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.data-category-card ul {
    margin: 0;
    padding-left: 0;
}

.data-category-card li {
    font-size: 13px;
    margin-bottom: 6px;
    padding-left: 20px;
}

.data-category-card li::before {
    width: 5px;
    height: 5px;
    top: 8px;
    left: 4px;
    background: var(--legal-primary-light);
}

/* ============================================
   PROHIBITED CATEGORY CARDS
   ============================================ */

.prohibited-category {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-radius: var(--legal-radius-md);
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.prohibited-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--legal-danger);
}

.prohibited-category h4 {
    font-size: 15px;
    font-weight: 500;
    color: #b91c1c;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prohibited-category h4 i {
    font-size: 16px;
}

.prohibited-category ul {
    margin: 0;
    padding-left: 0;
}

.prohibited-category li {
    font-size: 13px;
    color: #7f1d1d;
    margin-bottom: 6px;
    padding-left: 20px;
}

.prohibited-category li::before {
    background: #dc2626;
    width: 5px;
    height: 5px;
    top: 8px;
}

/* ============================================
   USE CATEGORY GRID & CARDS (Acceptable Use)
   ============================================ */

.use-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 28px 0;
}

.use-card {
    background: var(--legal-bg-primary);
    border-radius: var(--legal-radius-lg);
    padding: 24px;
    border: 2px solid var(--legal-border);
    position: relative;
    overflow: hidden;
}

.use-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.use-card.allowed {
    border-color: var(--legal-success);
    background: linear-gradient(180deg, var(--legal-success-light) 0%, var(--legal-bg-primary) 100%);
}

.use-card.allowed::before {
    background: linear-gradient(90deg, #059669, #10b981);
}

.use-card.prohibited {
    border-color: var(--legal-danger);
    background: linear-gradient(180deg, var(--legal-danger-light) 0%, var(--legal-bg-primary) 100%);
}

.use-card.prohibited::before {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

.use-card h4 {
    font-size: 17px;
    font-weight: 500;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.use-card.allowed h4 {
    color: #047857;
}

.use-card.allowed h4 i {
    color: var(--legal-success);
}

.use-card.prohibited h4 {
    color: #b91c1c;
}

.use-card.prohibited h4 i {
    color: var(--legal-danger);
}

.use-card ul {
    margin: 0;
    padding-left: 0;
}

.use-card li {
    margin-bottom: 10px;
    font-size: 14px;
    padding-left: 24px;
}

.use-card.allowed li::before {
    background: var(--legal-success);
}

.use-card.prohibited li::before {
    background: var(--legal-danger);
}

/* ============================================
   VIOLATION TIER CARDS
   ============================================ */

.violation-tier {
    background: var(--legal-bg-primary);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius-md);
    padding: 20px 24px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.violation-tier:hover {
    box-shadow: var(--legal-shadow-md);
}

.violation-tier::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.violation-tier h4 {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.violation-tier.tier-1 {
    border-left-color: #fbbf24;
}

.violation-tier.tier-1::before {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.violation-tier.tier-1 h4 {
    color: #b45309;
}

.violation-tier.tier-2 {
    border-left-color: #fb923c;
}

.violation-tier.tier-2::before {
    background: linear-gradient(180deg, #fb923c, #f97316);
}

.violation-tier.tier-2 h4 {
    color: #c2410c;
}

.violation-tier.tier-3 {
    border-left-color: #f87171;
}

.violation-tier.tier-3::before {
    background: linear-gradient(180deg, #f87171, #ef4444);
}

.violation-tier.tier-3 h4 {
    color: #b91c1c;
}

.violation-tier p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--legal-text-secondary);
}

.violation-tier ul {
    margin: 12px 0 0 0;
    padding-left: 0;
}

.violation-tier li {
    font-size: 13px;
    margin-bottom: 6px;
    padding-left: 20px;
}

/* ============================================
   CATEGORY CARDS (Prohibited Businesses)
   ============================================ */

.category-card {
    background: var(--legal-bg-primary);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius-lg);
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: var(--legal-shadow-sm);
    transition: all 0.25s ease;
}

.category-card:hover {
    box-shadow: var(--legal-shadow-lg);
}

.category-card-header {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: white;
}

.category-card-header i {
    font-size: 22px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--legal-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card-header h3 {
    margin: 0;
    color: white;
    font-size: 17px;
    font-weight: 500;
}

.category-card-header.high-risk {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
}

.category-card-header.moderate-risk {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
}

.category-card-header.restricted {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
}

.category-card-body {
    padding: 24px;
}

.category-card-body p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--legal-text-secondary);
    line-height: 1.7;
}

.category-card-body ul {
    margin: 0;
    padding-left: 0;
}

.category-card-body li {
    margin-bottom: 8px;
    font-size: 14px;
    padding-left: 24px;
}

/* ============================================
   COUNTRY GRID (Prohibited Businesses)
   ============================================ */

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.country-card {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-radius: var(--legal-radius-md);
    padding: 16px;
    text-align: center;
    transition: all 0.25s ease;
}

.country-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--legal-shadow-md);
}

.country-card h4 {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 4px 0;
    color: #b91c1c;
}

.country-card p {
    font-size: 12px;
    color: var(--legal-text-muted);
    margin: 0;
}

/* ============================================
   RISK BADGES
   ============================================ */

.risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.risk-badge.critical {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    color: white;
}

.risk-badge.high {
    background: linear-gradient(135deg, #c2410c, #ea580c);
    color: white;
}

.risk-badge.moderate {
    background: linear-gradient(135deg, #b45309, #d97706);
    color: white;
}

.risk-badge.low {
    background: linear-gradient(135deg, #4b5563, #6b7280);
    color: white;
}

/* ============================================
   QUICK REFERENCE
   ============================================ */

.quick-reference {
    background: var(--legal-bg-primary);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius-lg);
    padding: 24px;
    margin: 28px 0;
    box-shadow: var(--legal-shadow-sm);
}

.quick-reference h4 {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 16px 0;
    color: var(--legal-text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-reference h4::before {
    content: '\f0ca';
    font-family: 'Font Awesome 6 Free';
    font-weight: 500;
    color: var(--legal-primary);
}

.quick-reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.quick-reference-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    padding: 8px 12px;
    background: var(--legal-bg-tertiary);
    border-radius: var(--legal-radius-sm);
    color: var(--legal-text-secondary);
}

.quick-reference-item i {
    color: var(--legal-danger);
    width: 16px;
    text-align: center;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .legal-toc-sidebar,
    .legal-link-box,
    .page-hero::before,
    .page-hero::after {
        display: none !important;
    }

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

    .legal-main-content {
        box-shadow: none;
        border: none;
        padding: 0;
        max-width: 100%;
    }

    .legal-section {
        page-break-inside: avoid;
    }

    .legal-section h2 {
        page-break-after: avoid;
    }

    .legal-callout,
    .category-card,
    .use-card {
        page-break-inside: avoid;
    }
}

/* ============================================
   RESPONSIVE STYLES - TABLET
   ============================================ */

@media (max-width: 1024px) {
    .legal-layout {
        grid-template-columns: 260px 1fr;
        gap: 32px;
        padding: 40px 24px 64px;
    }

    .legal-main-content {
        padding: 36px;
    }
}

@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
        padding: 32px 20px 56px;
    }

    .legal-toc-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        padding-right: 0;
        order: -1;
    }

    .legal-toc {
        margin-bottom: 0;
    }

    .legal-main-content {
        padding: 32px;
    }
}

/* ============================================
   RESPONSIVE STYLES - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .legal-layout {
        padding: 24px 16px 48px;
    }

    .legal-main-content {
        padding: 24px;
        border-radius: var(--legal-radius-lg);
    }

    .legal-section {
        margin-bottom: 40px;
    }

    .legal-section h2 {
        font-size: 20px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    .legal-section h2::after {
        width: 48px;
    }

    .legal-section h3 {
        font-size: 16px;
        margin: 24px 0 12px 0;
        padding-left: 12px;
    }

    .legal-section p,
    .legal-section li {
        font-size: 14px;
    }

    .legal-toc {
        padding: 20px;
    }

    .legal-toc-list a {
        font-size: 13px;
        padding: 8px 10px;
    }

    .legal-callout {
        padding: 18px 20px;
        margin: 24px 0;
    }

    .legal-callout::before {
        left: -10px;
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .effective-date-banner {
        flex-direction: column;
        text-align: center;
        padding: 16px 20px;
        gap: 12px;
    }

    .effective-date-banner span {
        justify-content: center;
    }

    .legal-link-box {
        flex-direction: column;
    }

    .legal-link-box a {
        width: 100%;
        justify-content: center;
    }

    .use-category-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .use-card {
        padding: 20px;
    }

    .use-card h4 {
        font-size: 16px;
    }

    .data-category-grid {
        grid-template-columns: 1fr;
    }

    .country-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .legal-table {
        font-size: 13px;
    }

    .legal-table th,
    .legal-table td {
        padding: 10px 12px;
    }

    .category-card-header {
        padding: 16px 20px;
    }

    .category-card-header i {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .category-card-header h3 {
        font-size: 15px;
    }

    .category-card-body {
        padding: 20px;
    }
}

/* ============================================
   RESPONSIVE STYLES - SMALL MOBILE
   ============================================ */

@media (max-width: 480px) {
    .legal-layout {
        padding: 16px 12px 40px;
    }

    .legal-main-content {
        padding: 20px 16px;
        border-radius: var(--legal-radius-md);
    }

    .legal-section h2 {
        font-size: 18px;
    }

    .legal-section h3 {
        font-size: 15px;
    }

    .legal-toc {
        padding: 16px;
    }

    .legal-callout {
        padding: 16px;
    }

    .legal-callout::before {
        display: none;
    }

    .legal-callout h4 {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .legal-callout h4::before {
        content: '\f05a';
        font-family: 'Font Awesome 6 Free';
        font-weight: 500;
        font-size: 14px;
    }

    .legal-callout.warning h4::before {
        content: '\f071';
    }

    .legal-callout.danger h4::before {
        content: '\f057';
    }

    .legal-callout.success h4::before {
        content: '\f058';
    }

    .data-category-card,
    .prohibited-category {
        padding: 16px;
    }

    .violation-tier {
        padding: 16px 18px;
    }

    .quick-reference {
        padding: 18px;
    }

    .quick-reference-grid {
        grid-template-columns: 1fr;
    }

    .country-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   ACCESSIBILITY - HIGH CONTRAST
   ============================================ */

@media (prefers-contrast: high) {
    .legal-callout,
    .data-category-card,
    .prohibited-category,
    .use-card,
    .violation-tier,
    .category-card {
        border-width: 2px;
    }

    .legal-toc-list a.active {
        outline: 2px solid white;
        outline-offset: -2px;
    }
}
