/* ===================================
   AdaptAI - Unified Styles
   Modern design system with consistency
   =================================== */

/* Import CSS Variables */
@import url('variables.css');

/* Import Shared Components */
@import url('components.css');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-secondary);
    padding-top: 60px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* === Accessibility Font Sizes === */
html.font-small {
    font-size: 14px;
}

html.font-normal {
    font-size: 16px;
}

html.font-large {
    font-size: 18px;
}

html.font-xlarge {
    font-size: 20px;
}

/* === Dark Mode === */
html.dark-mode {
    --color-bg-primary: #1a1a1a;
    --color-bg-secondary: #111111;
    --color-bg-tertiary: #2a2a2a;
    --color-bg-blue-light: #1a2534;
    --color-bg-blue-lighter: #1e2a3d;
    --color-text-primary: #e5e5e5;
    --color-text-secondary: #b5b5b5;
    --color-text-heading: #ffffff;
    --color-text-muted: #8a8a8a;
    --color-text-dark: #ffffff;
    --color-text-light: #b5b5b5;
    --color-border-light: #333333;
    --color-border-medium: #444444;
    --gradient-bg-blue: linear-gradient(135deg, rgba(26, 37, 52, 0.5) 0%, rgba(30, 42, 61, 0.3) 100%);
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.6), 0 1px 2px -1px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7), 0 4px 6px -4px rgba(0, 0, 0, 0.6);
}

/* Header in dark mode */
html.dark-mode .header {
    background-color: rgba(26, 26, 26, 0.95);
    border-bottom: 1px solid rgba(58, 58, 58, 0.6);
}

html.dark-mode .logo {
    color: #ffffff;
}

html.dark-mode .nav-menu a {
    color: #e5e5e5;
}

html.dark-mode .nav-menu a:hover {
    color: var(--color-primary);
}

html.dark-mode .nav-menu a.active {
    color: var(--color-primary);
}

html.dark-mode .accessibility-toggle {
    border-color: #444444;
    color: #e5e5e5;
}

html.dark-mode .accessibility-toggle:hover {
    background: #2a2a2a;
    border-color: var(--color-primary);
}

html.dark-mode .nav-menu.active {
    background-color: rgba(26, 26, 26, 0.98);
}

/* Hero section in dark mode */
html.dark-mode .hero {
    background: linear-gradient(180deg, #111111 0%, #1a2534 50%, #1e2a3d 100%);
}

html.dark-mode .hero h1 {
    text-shadow: 0 0 80px rgba(14, 165, 233, 0.4);
}

html.dark-mode .reassurance {
    background: linear-gradient(135deg, rgba(26, 37, 52, 0.3) 0%, rgba(30, 42, 61, 0.2) 100%);
}

/* Cards section in dark mode */
html.dark-mode .cards {
    background: #0d0d0d;
}

html.dark-mode .cards-container {
    position: relative;
}

/* Cards in dark mode */
html.dark-mode .card {
    background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
    border: 2px solid #333333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

html.dark-mode .card:hover {
    background: linear-gradient(135deg, #2a2a2a 0%, #333333 100%) !important;
    border-color: #555555 !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 8px 24px rgba(0, 0, 0, 0.6) !important;
    transform: translateY(-8px) scale(1.01) !important;
}

html.dark-mode .card h2 {
    color: #ffffff;
}

html.dark-mode .card p {
    color: #b5b5b5;
}

html.dark-mode .card-icon {
    filter: drop-shadow(0 4px 12px rgba(14, 165, 233, 0.3));
}

html.dark-mode .card:hover .card-icon {
    filter: drop-shadow(0 12px 24px rgba(14, 165, 233, 0.5));
}

/* Post tiles in dark mode */
html.dark-mode .post-tile {
    background: #1a1a1a;
    border-color: #333333;
}

html.dark-mode .post-tile:hover {
    background: #222222;
    border-color: var(--color-primary-lighter);
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.4);
}

html.dark-mode .post-tile-header {
    border-bottom-color: #333333;
}

html.dark-mode .post-tile-footer {
    border-top-color: #333333;
}

/* Buttons in dark mode */
html.dark-mode .btn {
    box-shadow:
        0 8px 24px rgba(14, 165, 233, 0.4),
        0 2px 8px rgba(14, 165, 233, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

html.dark-mode .nav-link {
    background: #2a2a2a;
    color: #e5e5e5;
    border-color: #333333;
}

html.dark-mode .nav-link:hover {
    background: #1e2a3d;
    border-color: var(--color-primary-lighter);
}

html.dark-mode .nav-link.primary {
    background: var(--gradient-primary);
    color: white;
}

/* Forms and inputs in dark mode */
html.dark-mode input,
html.dark-mode select,
html.dark-mode textarea {
    background: #2a2a2a;
    border-color: #444444;
    color: #e5e5e5;
}

html.dark-mode input:focus,
html.dark-mode select:focus,
html.dark-mode textarea:focus {
    background: #333333;
    border-color: var(--color-primary);
}

/* Footer in dark mode */
html.dark-mode footer {
    background: #1a1a1a;
    border-top-color: #333333;
}

/* Support section in dark mode */
html.dark-mode .support-container {
    background: linear-gradient(135deg, rgba(26, 37, 52, 0.5) 0%, rgba(30, 42, 61, 0.3) 100%);
    border-color: rgba(14, 165, 233, 0.3);
}

html.dark-mode .transparency-note {
    background: #2a2a2a;
}

html.dark-mode .bookshop-section {
    background: linear-gradient(135deg, rgba(26, 37, 52, 0.5) 0%, rgba(30, 42, 61, 0.3) 100%);
    border-color: rgba(14, 165, 233, 0.3);
}

html.dark-mode .bookshop-note {
    background: #1a1a1a;
    border-left-color: var(--color-primary);
}

/* Accessibility modal in dark mode */
html.dark-mode .accessibility-modal-content {
    background: #1a1a1a;
    border: 1px solid #333333;
}

html.dark-mode .accessibility-modal-header {
    border-bottom-color: #333333;
}

html.dark-mode .accessibility-option {
    border-bottom-color: #333333;
}

html.dark-mode .font-size-btn {
    background: #2a2a2a;
    border-color: #444444;
    color: #e5e5e5;
}

html.dark-mode .font-size-btn:hover {
    background: #1e2a3d;
    border-color: var(--color-primary-lighter);
}

html.dark-mode .accessibility-reset-btn {
    background: #2a2a2a;
    border-color: #444444;
    color: #e5e5e5;
}

/* Adaptai CTA in dark mode */
html.dark-mode .adaptai-cta {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(30, 42, 61, 0.6) 100%);
    border-color: rgba(14, 165, 233, 0.3);
}

/* Guide cards in dark mode */
html.dark-mode .guide-card {
    background: #1a1a1a;
}

html.dark-mode .guide-card:hover {
    background: #222222;
}

/* Industry cards in dark mode */
html.dark-mode .industry-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #222222 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

html.dark-mode .industry-card::before {
    background: linear-gradient(135deg,
        rgba(14, 165, 233, 0.15) 0%,
        rgba(56, 189, 248, 0.15) 25%,
        rgba(125, 211, 252, 0.15) 50%,
        rgba(56, 189, 248, 0.15) 75%,
        rgba(14, 165, 233, 0.15) 100%);
}

html.dark-mode .industry-card::after {
    background: linear-gradient(135deg,
        var(--color-primary) 0%,
        #38bdf8 25%,
        #7dd3fc 50%,
        #38bdf8 75%,
        var(--color-primary) 100%);
}

html.dark-mode .industry-card:hover {
    background: linear-gradient(135deg, #2a2a2a 0%, #333333 100%) !important;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.9),
        0 16px 40px rgba(0, 0, 0, 0.7) !important;
}

html.dark-mode .industry-title {
    color: #ffffff;
}

html.dark-mode .industry-description {
    color: #b5b5b5;
}

/* Application cards and skill cards in dark mode */
html.dark-mode .application-card,
html.dark-mode .skill-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
    border-color: #333333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

html.dark-mode .application-card:hover,
html.dark-mode .skill-card:hover {
    background: linear-gradient(135deg, #222222 0%, #282828 100%);
    border-color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.25);
}

html.dark-mode .application-card h3,
html.dark-mode .skill-card h3 {
    color: #ffffff;
}

html.dark-mode .application-card p,
html.dark-mode .skill-card p {
    color: #b5b5b5;
}

/* Applications grid and skills grid in dark mode */
html.dark-mode .applications-grid,
html.dark-mode .skills-grid {
    background: transparent;
}

/* Skill items in dark mode */
html.dark-mode .skill-item {
    background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
    border-color: #333333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

html.dark-mode .skill-item:hover {
    background: linear-gradient(135deg, #222222 0%, #282828 100%);
    border-color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.25);
}

html.dark-mode .skill-item h3 {
    color: #ffffff;
}

html.dark-mode .skill-item p {
    color: #b5b5b5;
}

/* Industry detail pages in dark mode */
html.dark-mode .industry-section {
    color: #e5e5e5;
}

html.dark-mode .chart-section {
    background: #1a1a1a !important;
}

html.dark-mode .chart-insight {
    background: linear-gradient(135deg, #1a2534 0%, #1e2a3d 100%);
    border-left-color: var(--color-primary);
}

html.dark-mode .chart-insight p {
    color: #b5b5b5;
}

html.dark-mode .chart-insight strong {
    color: #ffffff;
}

html.dark-mode .robotics-explainer {
    background: linear-gradient(135deg, #2a1a0d 0%, #3a2515 100%);
    border-color: #ea580c;
}

html.dark-mode .robotics-explainer summary {
    color: #fb923c;
}

html.dark-mode .robotics-explainer-content {
    color: #e5e5e5;
}

html.dark-mode .robotics-disclaimer {
    color: #b5b5b5;
}

html.dark-mode .stat-card {
    background: #1a1a1a;
    border-color: #333333;
}

html.dark-mode .stat-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.2);
}

/* Risk assessment cards in dark mode */
html.dark-mode .risk-assessment {
    background: transparent;
}

html.dark-mode .risk-level-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
    border-color: #333333;
}

html.dark-mode .risk-level-card.high-risk {
    background: linear-gradient(135deg, #2a1515 0%, #331a1a 100%);
    border-color: #4a2626;
}

html.dark-mode .risk-level-header h3 {
    color: #ffffff;
}

html.dark-mode .risk-level-card p {
    color: #b5b5b5;
}

html.dark-mode .risk-level-card ul {
    color: #b5b5b5;
}

html.dark-mode .risk-badge {
    background: rgba(14, 165, 233, 0.2);
    color: #7dd3fc;
}

html.dark-mode .risk-badge.high {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

html.dark-mode .risk-badge.low {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

/* UK Context section in dark mode */
html.dark-mode .uk-context {
    background: linear-gradient(135deg, #1a2534 0%, #1e2a3d 100%);
    border-color: rgba(14, 165, 233, 0.2);
}

html.dark-mode .uk-context h2 {
    color: #ffffff;
}

html.dark-mode .uk-context p {
    color: #b5b5b5;
}

/* Research disclaimer in dark mode */
html.dark-mode .research-disclaimer {
    background: linear-gradient(135deg, #1a2534 0%, #1e2a3d 100%);
    border-left-color: var(--color-primary);
    color: #b5b5b5;
}

/* Calculator in dark mode */
html.dark-mode .calculator-container {
    background: #1a1a1a;
}

html.dark-mode .calculator-header {
    background: linear-gradient(135deg, #1a2534 0%, #1e2a3d 100%);
}

html.dark-mode .question-card {
    background: #1a1a1a;
    border-color: #333333;
}

html.dark-mode .question-card:hover {
    border-color: var(--color-primary-lighter);
}

html.dark-mode .option-btn {
    background: #2a2a2a;
    border-color: #444444;
    color: #e5e5e5;
}

html.dark-mode .option-btn:hover {
    background: #1e2a3d;
    border-color: var(--color-primary-lighter);
}

html.dark-mode .option-btn.selected {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

html.dark-mode .results-card {
    background: #1a1a1a;
    border-color: #333333;
}

html.dark-mode .risk-meter {
    background: #2a2a2a;
}

html.dark-mode .progress-bar {
    background: #2a2a2a;
}

html.dark-mode .form-section {
    background: linear-gradient(135deg, rgba(26, 37, 52, 0.5) 0%, rgba(26, 26, 26, 0.8) 100%);
    border-color: rgba(14, 165, 233, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

html.dark-mode .form-section:hover {
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 12px 40px rgba(14, 165, 233, 0.15);
}

html.dark-mode .form-section-title {
    color: #ffffff;
}

html.dark-mode .form-group label {
    color: #e5e5e5;
}

html.dark-mode .form-group select,
html.dark-mode .form-group input {
    background: #2a2a2a;
    border-color: #444444;
    color: #e5e5e5;
}

html.dark-mode .form-group select:focus,
html.dark-mode .form-group input:focus {
    background: #333333;
    border-color: var(--color-primary);
}

html.dark-mode .submit-button {
    background: var(--gradient-primary);
    color: white;
}

html.dark-mode .submit-button:hover {
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.4);
}

/* Big Picture page in dark mode */
html.dark-mode .hero-section {
    background: linear-gradient(180deg, #111111 0%, #1a2534 50%, #1e2a3d 100%);
}

html.dark-mode .stat-card {
    background: #1a1a1a;
}

html.dark-mode .key-stats-section {
    background: #111111;
}

html.dark-mode .hero-subtitle {
    color: #b5b5b5;
}

html.dark-mode .stats-grid {
    color: #e5e5e5;
}

html.dark-mode .stat-number {
    color: #ffffff;
}

html.dark-mode .stat-label {
    color: #e5e5e5;
}

html.dark-mode .stat-description {
    color: #b5b5b5;
}

html.dark-mode .charts-section {
    background: #0d0d0d;
    border-top: 1px solid #333333;
}

/* Warning/red section variant */
.charts-section--warning {
    background: #fef2f2 !important;
}

html.dark-mode .charts-section--warning {
    background: #2a1515 !important;
}

/* Warning chart explanation variant */
.chart-explanation--warning {
    background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%) !important;
    border-left-color: #ef4444 !important;
}

html.dark-mode .chart-explanation--warning {
    background: linear-gradient(135deg, #3a1515 0%, #2a1515 100%) !important;
    border-left-color: #ef4444 !important;
}

html.dark-mode .section-intro {
    color: #b5b5b5;
}

html.dark-mode .chart-container-large {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

html.dark-mode .chart-container {
    background: #1a1a1a;
    border-radius: var(--radius-md);
    padding: var(--space-3);
}

html.dark-mode .chart-explanation {
    background: linear-gradient(135deg, #1a2534 0%, #1e2a3d 100%);
    color: #e5e5e5;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

html.dark-mode .chart-explanation h3,
html.dark-mode .chart-explanation h4 {
    color: #ffffff;
}

html.dark-mode .chart-explanation ul {
    color: #b5b5b5;
}

html.dark-mode .chart-explanation strong {
    color: #ffffff;
}

html.dark-mode .trends-section {
    background: #111111;
}

html.dark-mode .trend-card {
    background: #1a1a1a;
    border-color: #333333;
}

html.dark-mode .trend-card-explanation {
    color: #e5e5e5;
}

html.dark-mode .impact-list {
    background: #222222;
}

html.dark-mode .impact-item {
    background: #1a1a1a;
    border-color: #333333;
}

html.dark-mode .impact-item:hover {
    background: #252525;
    border-color: var(--color-primary-lighter);
}

html.dark-mode .impact-industry {
    color: #ffffff;
}

html.dark-mode .impact-change {
    color: #e5e5e5;
}

html.dark-mode .impact-badge {
    background: rgba(14, 165, 233, 0.2);
    color: #7dd3fc;
}

html.dark-mode .impact-badge.high {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Contact section (about page) in dark mode */
html.dark-mode .contact-section {
    background: linear-gradient(135deg, rgba(26, 37, 52, 0.5) 0%, rgba(30, 42, 61, 0.3) 100%);
    border-color: rgba(14, 165, 233, 0.3);
}

html.dark-mode .contact-btn {
    background: var(--color-linkedin);
    color: white;
}

html.dark-mode .contact-btn:hover {
    background: var(--color-linkedin-dark);
}

/* About page sections in dark mode */
html.dark-mode .intro {
    color: #e5e5e5;
}

html.dark-mode .section h2 {
    color: #ffffff;
}

html.dark-mode .section p,
html.dark-mode .section li {
    color: #b5b5b5;
}

/* Insight cards in dark mode */
html.dark-mode .insight-card {
    background: linear-gradient(135deg, #1a2534 0%, #1e2a3d 100%);
    border-left-color: var(--color-primary);
}

html.dark-mode .insight-card h3 {
    color: #ffffff;
}

html.dark-mode .insight-card p {
    color: #b5b5b5;
}

/* Nav section in dark mode */
html.dark-mode .nav-section {
    background: #0d0d0d;
}

/* CTA section in dark mode */
html.dark-mode .cta-section {
    background: linear-gradient(180deg, #1a2534 0%, #1e2a3d 100%);
}

/* Caveat text in dark mode */
html.dark-mode .caveat-text {
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.3) 0%, rgba(146, 64, 14, 0.2) 100%);
    border-left-color: #f59e0b;
    color: #d1d5db;
}

html.dark-mode .caveat-text strong {
    color: #fbbf24;
}

/* === Header Navigation === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    z-index: var(--z-dropdown);
    height: 60px;
    box-shadow: var(--shadow-xs);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-4);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-color);
}

.logo:hover {
    color: var(--color-primary-dark);
}

.logo-image {
    height: 32px;
    width: auto;
    display: block;
}

/* === Header Right Section === */
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* === Hamburger Menu === */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: var(--space-1);
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--color-text-primary);
    margin: 3px 0;
    transition: var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

html.dark-mode .menu-toggle span {
    background-color: #e5e5e5;
}

/* === Navigation Menu === */
.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-5);
    align-items: center;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--color-text-primary);
    font-weight: 500;
    font-size: var(--space-3);
    transition: var(--transition-color);
    position: relative;
    padding-bottom: 0.25rem;
}

.nav-menu li a:hover {
    color: var(--color-primary);
}

.nav-menu li a.active {
    color: var(--color-primary);
}

.nav-menu li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 2px;
}

/* Accessibility Toggle */
.accessibility-toggle {
    background: none;
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    padding: var(--space-1);
    cursor: pointer;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.accessibility-toggle:hover {
    background: #f0f9ff;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.accessibility-toggle svg {
    display: block;
}

/* === Accessibility Modal === */
.accessibility-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.accessibility-modal.active {
    display: flex;
}

.accessibility-modal-content {
    background: var(--color-bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

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

.accessibility-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5);
    border-bottom: 2px solid var(--color-border-light);
}

.accessibility-modal-header h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-text-heading);
    margin: 0;
}

.accessibility-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
    color: var(--color-text-secondary);
    transition: var(--transition-base);
    border-radius: var(--radius-sm);
}

.accessibility-modal-close:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-heading);
}

.accessibility-modal-body {
    padding: var(--space-5);
}

.accessibility-option {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-border-light);
}

.accessibility-option:last-of-type {
    border-bottom: none;
    margin-bottom: var(--space-5);
    padding-bottom: 0;
}

.accessibility-option label {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-3);
}

.option-label {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-heading);
}

.option-description {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Font Size Controls */
.font-size-controls {
    display: flex;
    gap: var(--space-2);
}

.font-size-btn {
    flex: 1;
    padding: var(--space-3);
    background: var(--color-bg-tertiary);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: var(--font-semibold);
    color: var(--color-text-secondary);
    transition: var(--transition-base);
}

.font-size-btn[data-size="small"] {
    font-size: var(--text-sm);
}

.font-size-btn[data-size="normal"] {
    font-size: var(--text-base);
}

.font-size-btn[data-size="large"] {
    font-size: var(--text-lg);
}

.font-size-btn[data-size="xlarge"] {
    font-size: var(--text-xl);
}

.font-size-btn:hover {
    background: var(--color-bg-blue-lighter);
    border-color: var(--color-primary-lighter);
}

.font-size-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Dark Mode Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-border-medium);
    border-radius: 32px;
    transition: var(--transition-base);
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition-base);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(28px);
}

/* Reset Button */
.accessibility-reset-btn {
    width: 100%;
    padding: var(--space-3);
    background: var(--color-bg-tertiary);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
}

.accessibility-reset-btn:hover {
    background: var(--color-error-bg);
    border-color: var(--color-error-border);
    color: var(--color-error-dark);
}

/* === Modern Bold Buttons === */
.btn {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    padding: var(--space-3) var(--space-7);
    border-radius: var(--radius-md);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow:
        0 8px 24px rgba(14, 165, 233, 0.3),
        0 2px 8px rgba(14, 165, 233, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    color: white !important;
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 16px 40px rgba(14, 165, 233, 0.4),
        0 8px 16px rgba(14, 165, 233, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(-2px) scale(0.98);
}

.btn-large {
    font-size: var(--text-xl);
    padding: var(--space-4) 3.5rem;
    border-radius: 16px;
}

/* === Bold Modern Cards === */
.card {
    background: linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
    border-radius: 24px;
    padding: var(--space-8) var(--space-6);
    box-shadow:
        0 20px 60px rgba(15, 23, 42, 0.08),
        0 8px 24px rgba(15, 23, 42, 0.04);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(56, 189, 248, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.5s;
    border-radius: 24px;
}

.card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-lighter), #bae6fd, var(--color-primary-lighter), var(--color-primary-light));
    background-size: 300% 300%;
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s;
    animation: gradientRotate 3s ease infinite;
}

@keyframes gradientRotate {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.card:hover::before {
    opacity: 1;
}

.card:hover::after {
    opacity: 1;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 32px 80px rgba(14, 165, 233, 0.2),
        0 16px 40px rgba(15, 23, 42, 0.12);
    border-color: transparent;
}

/* === Footer === */
footer {
    background-color: #1e293b;
    color: #94a3b8;
    padding: var(--space-5) var(--space-4);
    text-align: center;
    border-top: 1px solid var(--color-text-primary);
}

footer p {
    font-size: 0.875rem;
    margin-bottom: var(--space-1);
}

footer a {
    color: var(--color-primary-lighter);
    text-decoration: none;
    transition: var(--transition-color);
}

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

/* Footer Links */
.footer-links {
    margin-top: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.footer-link {
    background: none;
    border: none;
    color: var(--color-primary-lighter);
    font-size: 0.875rem;
    cursor: pointer;
    padding: var(--space-1) var(--space-2);
    transition: var(--transition-color);
    font-family: inherit;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

.footer-link:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

.footer-separator {
    color: #64748b;
    font-size: 0.875rem;
    user-select: none;
}

/* === Policy Modals === */
.policy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
}

.policy-modal.active {
    display: flex;
}

.policy-modal-content {
    background: var(--color-bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
    margin: var(--space-4);
}

.policy-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5);
    border-bottom: 2px solid var(--color-border-light);
    position: sticky;
    top: 0;
    background: var(--color-bg-primary);
    z-index: 10;
}

.policy-modal-header h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-text-heading);
    margin: 0;
}

.policy-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
    color: var(--color-text-secondary);
    transition: var(--transition-base);
    border-radius: var(--radius-sm);
}

.policy-modal-close:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-heading);
}

.policy-modal-close:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.policy-modal-body {
    padding: var(--space-6);
}

.policy-modal-body h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-text-heading);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.policy-modal-body h3:first-of-type {
    margin-top: var(--space-4);
}

.policy-modal-body p {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.policy-modal-body ul {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

.policy-modal-body li {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-2);
}

.policy-modal-body a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition-base);
}

.policy-modal-body a:hover {
    border-bottom-color: var(--color-primary);
}

.policy-modal-body code {
    background: var(--color-bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-xs);
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
    color: var(--color-primary-dark);
}

.policy-last-updated {
    background: var(--color-bg-blue-lighter);
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-primary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

/* Cookie Table */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-4) 0;
    font-size: var(--text-sm);
}

.cookie-table th,
.cookie-table td {
    padding: var(--space-3);
    text-align: left;
    border: 1px solid var(--color-border-light);
}

.cookie-table th {
    background: var(--color-bg-tertiary);
    font-weight: var(--font-semibold);
    color: var(--color-text-heading);
}

.cookie-table td {
    color: var(--color-text-secondary);
}

/* Dark Mode Policy Modals */
html.dark-mode .policy-modal-content {
    background: #1a1a1a;
    border: 1px solid #333333;
}

html.dark-mode .policy-modal-header {
    background: #1a1a1a;
    border-bottom-color: #333333;
}

html.dark-mode .cookie-table th {
    background: #2a2a2a;
}

html.dark-mode .cookie-table th,
html.dark-mode .cookie-table td {
    border-color: #333333;
}

/* Responsive Policy Modals */
@media (max-width: 768px) {
    .policy-modal-content {
        max-width: 95%;
        max-height: 95vh;
        margin: var(--space-3);
    }

    .policy-modal-header {
        padding: var(--space-4);
    }

    .policy-modal-header h2 {
        font-size: var(--text-xl);
    }

    .policy-modal-body {
        padding: var(--space-4);
    }

    .policy-modal-body h3 {
        font-size: var(--text-lg);
    }

    .cookie-table {
        font-size: var(--text-xs);
    }

    .cookie-table th,
    .cookie-table td {
        padding: var(--space-2);
    }
}

@media (max-width: 480px) {
    .policy-modal-content {
        margin: var(--space-2);
        border-radius: var(--radius-sm);
    }

    .policy-modal-header {
        padding: var(--space-3);
    }

    .policy-modal-body {
        padding: var(--space-3);
    }

    .footer-links {
        font-size: 0.75rem;
    }

    .footer-separator {
        display: none;
    }

    .footer-links {
        gap: var(--space-3);
    }

    /* Make cookie table scrollable on very small screens */
    .cookie-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* === Modern Typography === */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text-heading);
    margin-bottom: var(--space-3);
    line-height: 1.2;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-heading);
    margin-bottom: var(--space-3);
    line-height: 1.3;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

p {
    color: var(--color-text-muted);
    line-height: 1.7;
}

a {
    color: var(--color-primary);
    transition: var(--transition-color);
}

a:hover {
    color: var(--color-primary-dark);
}

/* === Utility Classes === */
/* Container defined in components.css */

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

/* === Mobile Navigation === */
@media (max-width: 768px) {
    .header-container {
        padding: 0 var(--space-3);
    }

    .header-right {
        margin-left: auto;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        padding: var(--space-3) 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-base);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0.75rem var(--space-4);
        border-bottom: 1px solid #f1f5f9;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu li a {
        display: block;
        padding: var(--space-1);
    }

    h1 {
        font-size: 2rem;
    }

    .btn-large {
        font-size: 1.125rem;
        padding: var(--space-3) var(--space-5);
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    .btn {
        width: 100%;
        padding: 0.875rem var(--space-4);
    }
}

/* DARK MODE OVERRIDES - MUST BE LAST! */
html.dark-mode .card:hover {
    background: linear-gradient(135deg, #2a2a2a 0%, #333333 100%) !important;
    border-color: #555555 !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 8px 24px rgba(0, 0, 0, 0.6) !important;
    transform: translateY(-8px) scale(1.01) !important;
}

html.dark-mode .card:hover::before,
html.dark-mode .card:hover::after {
    opacity: 0 !important;
}

html.dark-mode .robotics-disclaimer {
    background: rgba(120, 53, 15, 0.2);
    border-left-color: #f59e0b;
    color: #d1d5db;
}

html.dark-mode .robotics-disclaimer strong {
    color: #fbbf24;
}

/* Chart insight color variants */
.chart-insight--red {
    background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%) !important;
    border-left-color: #ef4444 !important;
}

.chart-insight--green {
    background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%) !important;
    border-left-color: #10b981 !important;
}

.chart-insight--yellow {
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%) !important;
    border-left-color: #f59e0b !important;
}

.chart-insight--blue {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%) !important;
    border-left-color: #3b82f6 !important;
}

/* Dark mode variants */
html.dark-mode .chart-insight--red {
    background: linear-gradient(135deg, #3a1515 0%, #2a1515 100%) !important;
    border-left-color: #ef4444 !important;
}

html.dark-mode .chart-insight--green {
    background: linear-gradient(135deg, #1a2e1a 0%, #152515 100%) !important;
    border-left-color: #10b981 !important;
}

html.dark-mode .chart-insight--yellow {
    background: linear-gradient(135deg, #2a1f0d 0%, #1f170a 100%) !important;
    border-left-color: #f59e0b !important;
}

html.dark-mode .chart-insight--blue {
    background: linear-gradient(135deg, #1a2534 0%, #152030 100%) !important;
    border-left-color: #3b82f6 !important;
}
