/* CSS Reset & Variables */
:root {
    --primary: #046bd2;
    --primary-hover: #0352a1;
    --text-main: #334155;
    --text-heading: #1e293b;
    --text-light: #64748b;
    --bg-page: #f0f5fa;
    --bg-surface: #ffffff;
    --border: #e2e8f0;
    --radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    
    --container-width: 900px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-page);
    line-height: 1.65;
    font-size: 16px;
    overflow-x: hidden;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

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

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo img {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    margin-right: 12px;
    object-fit: cover;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
}

.site-nav a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 8px 0;
}

.site-nav a:hover, .site-nav a.active {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
}

/* Main Content */
.main-content {
    background: var(--bg-surface);
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 40px 48px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-heading);
    line-height: 1.3;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 48px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-page);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 24px 0 12px;
}

p {
    margin-bottom: 16px;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.hero-image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

/* Buttons */
.cta-wrapper {
    margin: 24px 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 32px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.data-table th, .data-table td {
    padding: 16px;
    border: 1px solid var(--border);
    text-align: left;
}

.data-table th {
    background-color: var(--bg-page);
    font-weight: 600;
    color: var(--text-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tr:nth-child(even) {
    background-color: #f8fafc;
}

/* Lists */
.styled-list {
    margin-left: 0;
    padding-left: 24px;
    margin-bottom: 24px;
}

.styled-list li {
    margin-bottom: 8px;
}

.feature-list {
    display: grid;
    gap: 20px;
    margin-top: 24px;
}

.feature-item {
    background: var(--bg-page);
    padding: 20px;
    border-radius: var(--radius);
}

.feature-item h3 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.1rem;
}

.feature-item p {
    margin-bottom: 0;
}

/* Notice Box */
.notice {
    background-color: #fff1f2;
    border-left: 4px solid #e11d48;
    padding: 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #881337;
}

.notice p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Footer */
.site-footer {
    background-color: var(--text-heading);
    color: #cbd5e1;
    text-align: center;
    padding: 32px 0;
    margin-top: 60px;
}

/* Accessibility */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 24px 20px;
        margin-top: 24px;
        border-radius: 0;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        width: 100%;
        background-color: var(--bg-surface);
        box-shadow: var(--shadow-md);
        padding: 20px;
        border-top: 1px solid var(--border);
    }

    .site-nav.active {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 16px;
    }

    .site-nav a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--bg-page);
    }
}

/* Skip link, disclosure, overflow and touch targets */
.skip-link {
    position: absolute;
    left: 8px;
    top: -60px;
    background: var(--primary);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius);
    z-index: 2000;
}

.skip-link:focus {
    top: 8px;
    color: #fff;
}

.affiliate-note {
    margin: 12px 0 0;
    font-size: 0.85rem;
    color: var(--text-main);
}

img, svg, video {
    max-width: 100%;
}

p, li, td, th, h1, h2, h3 {
    overflow-wrap: break-word;
}

.mobile-menu-toggle {
    min-width: 44px;
    min-height: 44px;
}

.site-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.btn {
    min-height: 48px;
}

@media (max-width: 768px) {
    .site-nav a {
        display: flex;
    }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .btn-primary:hover {
        transform: none;
    }
}
