/* PCI Watch - Modern Design System
   A security-focused dashboard aesthetic with editorial clarity
   ============================================================ */

:root {
    /* ===== COLOR SYSTEM ===== */

    /* Primary - Deep slate with depth */
    --color-slate-950: #020617;
    --color-slate-900: #0f172a;
    --color-slate-800: #1e293b;
    --color-slate-700: #334155;
    --color-slate-600: #475569;
    --color-slate-500: #64748b;
    --color-slate-400: #94a3b8;
    --color-slate-300: #cbd5e1;
    --color-slate-200: #e2e8f0;
    --color-slate-100: #f1f5f9;
    --color-slate-50: #f8fafc;

    /* Accent - Vivid cyan */
    --color-cyan-500: #06b6d4;
    --color-cyan-400: #22d3ee;
    --color-cyan-600: #0891b2;
    --color-cyan-700: #0e7490;

    /* Status Colors */
    --color-emerald-500: #10b981;
    --color-emerald-100: #d1fae5;
    --color-emerald-800: #065f46;

    --color-sky-500: #0ea5e9;
    --color-sky-100: #e0f2fe;
    --color-sky-800: #075985;

    --color-amber-500: #f59e0b;
    --color-amber-100: #fef3c7;
    --color-amber-800: #92400e;

    --color-rose-500: #f43f5e;
    --color-rose-100: #ffe4e6;
    --color-rose-800: #9f1239;

    /* Semantic mappings */
    --color-primary: var(--color-slate-800);
    --color-accent: var(--color-cyan-500);
    --color-accent-hover: var(--color-cyan-400);

    --color-text: var(--color-slate-800);
    --color-text-secondary: var(--color-slate-600);
    --color-text-muted: var(--color-slate-500);
    --color-text-inverse: #ffffff;

    --color-bg: var(--color-slate-50);
    --color-bg-alt: var(--color-slate-100);
    --color-surface: #ffffff;
    --color-border: var(--color-slate-200);
    --color-border-subtle: var(--color-slate-100);

    /* Status semantic */
    --color-success: var(--color-emerald-500);
    --color-success-bg: var(--color-emerald-100);
    --color-success-text: var(--color-emerald-800);

    --color-info: var(--color-sky-500);
    --color-info-bg: var(--color-sky-100);
    --color-info-text: var(--color-sky-800);

    --color-warning: var(--color-amber-500);
    --color-warning-bg: var(--color-amber-100);
    --color-warning-text: var(--color-amber-800);

    --color-danger: var(--color-rose-500);
    --color-danger-bg: var(--color-rose-100);
    --color-danger-text: var(--color-rose-800);

    /* ===== TYPOGRAPHY ===== */
    /* Using modern system font stacks for optimal performance and native feel */
    --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Menlo, Monaco, Consolas, monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;

    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

    /* ===== SPACING ===== */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* ===== EFFECTS ===== */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgb(6 182 212 / 0.15);

    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;

    /* ===== LAYOUT ===== */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 960px;
    --container-xl: 1200px;
    --header-height: 64px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Disable rubber-banding only in PWA standalone mode */
@media (display-mode: standalone) {
    html, body {
        overscroll-behavior-y: none;
    }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-slate-900);
    letter-spacing: -0.01em;
}

h1 {
    font-size: var(--text-3xl);
    font-weight: 700;
    margin-bottom: var(--space-6);
}

h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
}

h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

h4 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

p {
    margin-bottom: var(--space-4);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-cyan-600);
}

code, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

code {
    background: var(--color-bg-alt);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    color: var(--color-slate-700);
}

pre {
    background: var(--color-slate-900);
    color: var(--color-slate-100);
    padding: var(--space-4);
    border-radius: var(--radius);
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

ul, ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
}

li {
    margin-bottom: var(--space-2);
}

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: var(--container-lg);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-wide {
    max-width: var(--container-xl);
}

@media (min-width: 640px) {
    .container {
        padding: 0 var(--space-6);
    }
}

/* ===== HEADER ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--color-slate-900) 0%, var(--color-slate-800) 100%);
    border-bottom: 1px solid var(--color-slate-700);
    backdrop-filter: blur(10px);
    /* Extend header color into iOS status bar area */
    padding-top: env(safe-area-inset-top, 0);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-3) var(--space-4);
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0));
    max-width: var(--container-xl);
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .site-header-inner {
        justify-content: flex-start;
    }
}

@media (min-width: 640px) {
    .site-header-inner {
        padding: var(--space-3) var(--space-6);
        padding-left: max(var(--space-6), env(safe-area-inset-left, 0));
        padding-right: max(var(--space-6), env(safe-area-inset-right, 0));
    }
}

.site-branding {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.site-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.site-title a {
    color: var(--color-text-inverse);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.site-title a:hover {
    color: var(--color-cyan-400);
}

.site-tagline {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
    display: none;
    font-weight: 400;
}

@media (min-width: 640px) {
    .site-tagline {
        display: inline;
    }
}

/* Mobile Menu Toggle (Pure CSS) */
.nav-toggle-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    color: var(--color-text-inverse);
    cursor: pointer;
    border-radius: var(--radius);
    transition: background var(--transition-fast);
    position: absolute;
    left: max(var(--space-4), env(safe-area-inset-left, 0));
}

.menu-toggle:hover {
    background: var(--color-slate-700);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

.menu-icon-close {
    display: none;
}

/* Checked state toggles icons */
.nav-toggle-checkbox:checked ~ .site-header .menu-icon-open {
    display: none;
}

.nav-toggle-checkbox:checked ~ .site-header .menu-icon-close {
    display: block;
}

@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }
}

/* Header Search Icon (mobile only) */
.header-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    color: var(--color-text-inverse);
    border-radius: var(--radius);
    transition: background var(--transition-fast);
    position: absolute;
    right: max(var(--space-4), env(safe-area-inset-right, 0));
}

.header-search:hover {
    background: var(--color-slate-700);
    text-decoration: none;
}

.header-search svg {
    width: 22px;
    height: 22px;
}

/* Header Share Button (mobile only, Web Share API) */
.header-share {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    color: var(--color-text-inverse);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition-fast);
    position: absolute;
    right: calc(44px + max(var(--space-4), env(safe-area-inset-right, 0)));
}

.header-share[data-share-supported] {
    display: flex;
}

.header-share:hover {
    background: var(--color-slate-700);
}

.header-share:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-cyan-500);
}

.header-share svg {
    width: 20px;
    height: 20px;
}

@media (min-width: 1024px) {
    .header-search,
    .header-share {
        display: none;
    }
}

/* ===== SITE LAYOUT (Sidebar + Main) ===== */
.site-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: var(--container-xl);
    margin: 0 auto;
    width: 100%;
}

/* Backdrop overlay when mobile menu is open */
.site-layout::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 98;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-toggle-checkbox:checked ~ .site-layout::before {
    opacity: 1;
}

@media (min-width: 1024px) {
    .site-layout {
        /* Sidebar is now fixed outside, so just single column with left margin */
        margin-left: 220px;
        width: calc(100% - 220px); /* Account for fixed sidebar */
        max-width: none; /* Remove max-width constraint on desktop */
    }

    /* No backdrop needed on desktop */
    .site-layout::before {
        display: none;
    }
}

/* ===== SIDEBAR ===== */
.site-sidebar {
    /* Mobile: fixed overlay below header */
    position: fixed;
    top: calc(var(--header-height) + env(safe-area-inset-top, 0));
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0 var(--space-4);
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0));
    /* Animation: slide down with fade */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition:
        max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.25s ease-out,
        transform 0.25s ease-out,
        padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pure CSS toggle - sidebar shows when checkbox is checked */
.nav-toggle-checkbox:checked ~ .site-sidebar {
    max-height: 80vh;
    opacity: 1;
    transform: translateY(0);
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
}


/* Staggered fade-in for nav items */
.site-sidebar .sidebar-nav a {
    opacity: 0;
    transform: translateY(-8px);
    transition:
        opacity 0.2s ease-out,
        transform 0.2s ease-out;
}

.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav a {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger the nav items (12 items: 2 section headers + 10 links) */
.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav li:nth-child(1) a { transition-delay: 0.05s; }
.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav li:nth-child(2) a { transition-delay: 0.08s; }
.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav li:nth-child(3) a { transition-delay: 0.11s; }
.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav li:nth-child(4) a { transition-delay: 0.14s; }
.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav li:nth-child(5) a { transition-delay: 0.17s; }
.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav li:nth-child(6) a { transition-delay: 0.20s; }
.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav li:nth-child(7) a { transition-delay: 0.23s; }
.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav li:nth-child(8) a { transition-delay: 0.26s; }
.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav li:nth-child(9) a { transition-delay: 0.29s; }
.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav li:nth-child(10) a { transition-delay: 0.32s; }
.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav li:nth-child(11) a { transition-delay: 0.35s; }
.nav-toggle-checkbox:checked ~ .site-sidebar .sidebar-nav li:nth-child(12) a { transition-delay: 0.38s; }

@media (min-width: 1024px) {
    .site-sidebar {
        /* Desktop: fixed sidebar on left */
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: auto;
        width: 220px;
        height: calc(100vh - var(--header-height));
        max-height: none;
        opacity: 1;
        transform: none;
        overflow-y: auto;
        transition: none;
        border-bottom: none;
        border-right: 1px solid var(--color-border);
        padding: var(--space-6) var(--space-4);
    }

    /* Reset nav item animations on desktop */
    .site-sidebar .sidebar-nav a {
        opacity: 1;
        transform: none;
        transition: color var(--transition-fast);
    }
}

/* Sidebar Navigation */
.sidebar-nav {
    font-family: var(--font-display);
}

.sidebar-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-list li {
    margin: 0;
}

/* Section Headers */
.sidebar-nav-section {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    padding: var(--space-3) 0;
    margin-top: var(--space-5);
}

.sidebar-nav-section:first-child {
    margin-top: 0;
    padding-top: 0;
}

.sidebar-nav-section svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* Navigation Links - indented from section headers */
.sidebar-nav-list a {
    display: block;
    padding: var(--space-2) var(--space-3);
    margin-left: var(--space-6);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
}

.sidebar-nav-list a:hover {
    color: var(--color-text);
    background: var(--color-bg-alt);
    border-left-color: var(--color-slate-300);
}

.sidebar-nav-list a.active {
    color: var(--color-cyan-600);
    background: rgba(6, 182, 212, 0.1);
    border-left-color: var(--color-cyan-500);
}

/* Navigation */
.site-nav {
    display: none;
}

.site-nav.active {
    display: block;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-slate-800);
    border-bottom: 1px solid var(--color-slate-700);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.nav-item {
    margin: 0;
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    color: var(--color-slate-300);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: var(--text-sm);
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.nav-link:hover {
    background: var(--color-slate-700);
    color: var(--color-text-inverse);
}

.nav-link.active {
    background: var(--color-cyan-500);
    color: var(--color-text-inverse);
}

/* Dropdown toggle */
.dropdown-toggle {
    justify-content: space-between;
}

.dropdown-icon {
    width: 12px;
    height: 12px;
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown menu - Mobile (accordion style) */
.dropdown-menu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    padding-left: var(--space-4);
    padding-top: var(--space-2);
}

.dropdown-menu.is-open {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: var(--space-2) var(--space-4);
    color: var(--color-slate-400);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: var(--text-sm);
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.dropdown-menu a:hover {
    background: var(--color-slate-700);
    color: var(--color-text-inverse);
}

/* Search link */
.nav-link-search {
    justify-content: flex-start;
}

.nav-link-search svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .site-nav {
        display: block;
    }

    .nav-list {
        flex-direction: row;
        align-items: center;
        gap: var(--space-1);
    }

    .nav-link {
        padding: var(--space-2) var(--space-3);
        width: auto;
    }

    .dropdown-toggle {
        justify-content: center;
        gap: var(--space-1);
    }

    /* Dropdown menu - Desktop (overlay) */
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 180px;
        background: var(--color-slate-800);
        border: 1px solid var(--color-slate-700);
        border-radius: var(--radius);
        box-shadow: var(--shadow-lg);
        padding: var(--space-2);
        margin-top: var(--space-1);
        z-index: 200;
    }

    .dropdown-menu a {
        padding: var(--space-2) var(--space-3);
    }

    /* Show dropdown on hover */
    .has-dropdown:hover .dropdown-menu,
    .has-dropdown:focus-within .dropdown-menu {
        display: block;
    }

    /* Hide search text on desktop, show icon only */
    .nav-search-label {
        display: none;
    }

    .nav-link-search {
        padding: var(--space-2);
    }
}

/* ===== SUB-NAVIGATION ===== */
.subnav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-3) 0;
}

.subnav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.subnav ul::-webkit-scrollbar {
    display: none;
}

.subnav li {
    margin: 0;
    flex-shrink: 0;
}

.subnav a {
    display: block;
    padding: var(--space-2) var(--space-3);
    color: var(--color-text-secondary);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: var(--text-sm);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.subnav a:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.subnav a.active {
    background: var(--color-slate-900);
    color: var(--color-text-inverse);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    margin: var(--space-4) 0;
    font-size: var(--text-sm);
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.breadcrumb li {
    display: flex;
    align-items: center;
    margin: 0;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-left: var(--space-2);
    color: var(--color-slate-400);
}

.breadcrumb a {
    color: var(--color-text-secondary);
}

.breadcrumb a:hover {
    color: var(--color-accent);
}

.breadcrumb li:last-child {
    color: var(--color-text);
    font-weight: 500;
}

/* ===== MAIN CONTENT ===== */
.site-main {
    flex: 1;
    min-width: 0;
}

.site-content {
    padding: var(--space-6) var(--space-4);
    overflow-x: hidden; /* Prevent horizontal scroll from content */
}

@media (min-width: 640px) {
    .site-content {
        padding: var(--space-8) var(--space-6);
    }
}

@media (min-width: 1024px) {
    .site-content {
        padding: var(--space-8);
    }
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--color-slate-900);
    color: var(--color-slate-400);
    padding: var(--space-6) var(--space-4);
    text-align: center;
    font-size: var(--text-sm);
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--color-slate-300);
    transition: color var(--transition-fast);
}

.site-footer a:hover {
    color: var(--color-cyan-400);
}

/* Language Switcher */
.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-top: var(--space-4);
    padding: 3px;
    background: var(--color-slate-800);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-slate-700);
}

.language-form {
    display: contents;
}

.language-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 28px;
    padding: 0 var(--space-2);
    background: transparent;
    color: var(--color-slate-500);
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.language-option:hover {
    color: var(--color-slate-200);
    background: var(--color-slate-700);
}

.language-option:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-cyan-500);
}

.language-option.active {
    background: linear-gradient(135deg, var(--color-cyan-500) 0%, var(--color-cyan-600) 100%);
    color: var(--color-slate-900);
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.language-option.active:hover {
    background: linear-gradient(135deg, var(--color-cyan-400) 0%, var(--color-cyan-500) 100%);
    color: var(--color-slate-900);
}

/* ===== CARDS ===== */
.card {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    border: 1px solid var(--color-border-subtle);
    transition: all var(--transition);
    min-width: 0; /* Prevent card from growing beyond container */
    overflow: hidden; /* Contain any overflow */
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Stretched link - makes entire card clickable */
.card-header h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Keep other links clickable above the stretched link */
.card a:not(.card-header h3 a) {
    position: relative;
    z-index: 2;
}

/* Cursor for entire card */
.card:has(.card-header h3 a) {
    cursor: pointer;
}

.card-header {
    margin-bottom: var(--space-3);
    min-width: 0; /* Allow flex child to shrink */
}

.card-header h3 {
    overflow-wrap: break-word;
    word-break: break-word;
}

.card-body {
    color: var(--color-text);
}

/* Card media container - floats left for text wrapping */
.card-media {
    display: block;
    float: left;
    width: 72px;
    height: auto;
    margin: 0 var(--space-4) var(--space-2) 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg-alt);
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    flex-shrink: 0;
}

.card-media:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.02);
}

.card-media img {
    width: 100%;
    height: auto;
    display: block;
}

/* Stacked thumbnails for grouped items */
/* Use higher specificity to override .card-media from home.css */
.card-media.card-media-stacked {
    position: relative;
    width: 88px;
    height: 56px;
    overflow: visible;
}

.card-media-stacked .stacked-thumb,
.card-media.card-media-stacked img.stacked-thumb {
    position: absolute;
    width: 72px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.card-media-stacked .stacked-thumb-1 {
    top: 0;
    left: 0;
    z-index: 3;
}

.card-media-stacked .stacked-thumb-2 {
    top: 6px;
    left: 6px;
    z-index: 2;
}

.card-media-stacked .stacked-thumb-3 {
    top: 12px;
    left: 12px;
    z-index: 1;
}

.card-media-stacked .stacked-count {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--color-slate-800);
    color: white;
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    z-index: 4;
    box-shadow: var(--shadow-sm);
}

.card-media-stacked:hover .stacked-thumb-1 {
    transform: translate(-2px, -2px);
}

.card-media-stacked:hover .stacked-thumb-2 {
    transform: translate(0, 0);
}

.card-media-stacked:hover .stacked-thumb-3 {
    transform: translate(2px, 2px);
}

@media (min-width: 640px) {
    .card-media {
        width: 88px;
    }

    .card-media.card-media-stacked {
        width: 100px;
        height: 64px;
    }

    .card-media-stacked .stacked-thumb,
    .card-media.card-media-stacked img.stacked-thumb {
        width: 80px;
        height: 45px;
    }
}

.card-footer {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

/* Update Cards with Status Indicators */
.card.update {
    border-left: 4px solid var(--color-border);
    padding-left: calc(var(--space-5) - 4px);
}

.card.update.new {
    border-left-color: var(--color-success);
}

.card.update.updated {
    border-left-color: var(--color-info);
}

.card.update.deleted {
    border-left-color: var(--color-danger);
}

.card.update.archived {
    border-left-color: var(--color-warning);
}

.card.update .card-header {
    margin-bottom: var(--space-2);
}

.card.update h3 {
    font-size: var(--text-lg);
    margin-top: var(--space-2);
    margin-bottom: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.card.update h3 a {
    color: var(--color-slate-900);
}

.card.update h3 a:hover {
    color: var(--color-accent);
}

.update-source {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-sm);
}

.update-source a {
    color: var(--color-text-secondary);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.update-source a:hover {
    color: var(--color-accent);
}

.update-identifier {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.card.update .snippet {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

/* ===== SOURCE NOTICE ===== */
.source-notice {
    background: linear-gradient(135deg, var(--color-info-bg) 0%, #f0f9ff 100%);
    border-left: 4px solid var(--color-info);
    border-radius: var(--radius);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.source-notice-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1;
}

.source-notice-content {
    flex: 1;
    color: var(--color-info-text);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.source-notice-content strong {
    font-weight: 600;
    color: var(--color-slate-800);
}

.source-notice-link {
    color: var(--color-info);
    font-weight: 500;
    white-space: nowrap;
}

.source-notice-link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .source-notice {
        flex-direction: column;
        gap: var(--space-2);
    }

    .source-notice-link {
        align-self: flex-start;
    }
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    background: var(--color-bg-alt);
    color: var(--color-text-secondary);
}

.badge-success, .badge-new {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.badge-info, .badge-updated {
    background: var(--color-info-bg);
    color: var(--color-info-text);
}

.badge-warning, .badge-archived {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
}

.badge-danger, .badge-deleted {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 500;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    min-height: 40px;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-cyan-500) 0%, var(--color-cyan-600) 100%);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-sm), 0 0 0 0 rgb(6 182 212 / 0);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-cyan-400) 0%, var(--color-cyan-500) 100%);
    box-shadow: var(--shadow), 0 0 20px rgb(6 182 212 / 0.3);
    color: var(--color-text-inverse);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-slate-300);
    color: var(--color-text);
}

/* ===== META INFORMATION ===== */
.meta {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    flex-wrap: wrap;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.meta time {
    color: var(--color-text-muted);
}

/* ===== LISTS ===== */
.list-unstyled {
    list-style: none;
    padding: 0;
}

.list-unstyled li {
    margin: 0;
}

.list-bordered li {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
}

.list-bordered li:last-child {
    border-bottom: none;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-4);
    color: var(--color-text-muted);
}

.empty-state p {
    margin: 0;
    font-size: var(--text-lg);
}

/* ===== PAGINATION ===== */
.pagination {
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
}

.pagination-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.pagination-item {
    display: inline-block;
    margin: 0;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-3);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.pagination-link:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-slate-300);
    color: var(--color-text);
    text-decoration: none;
}

.pagination-link.active {
    background: var(--color-slate-900);
    border-color: var(--color-slate-900);
    color: var(--color-text-inverse);
}

.pagination-info {
    padding: var(--space-2) var(--space-3);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

/* ===== RESOURCE GRID ===== */
.resource-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

@media (min-width: 640px) {
    .resource-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .resource-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

.resource-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: var(--space-6);
    border: 1px solid var(--color-border-subtle);
    border-left: 4px solid var(--color-accent);
    transition: all var(--transition);
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--color-cyan-400);
}

.resource-card h2 {
    margin: 0 0 var(--space-2) 0;
    font-size: var(--text-lg);
}

.resource-card h2 a {
    color: var(--color-slate-900);
}

.resource-card h2 a:hover {
    color: var(--color-accent);
}

.resource-card p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

/* ===== ERROR PAGES ===== */
.error-page {
    max-width: 600px;
    margin: var(--space-8) auto;
    padding: var(--space-8);
    text-align: center;
}

.error-page h1 {
    color: var(--color-danger);
    font-size: var(--text-4xl);
    margin-bottom: var(--space-2);
}

.error-page .error-code {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
}

.error-page .error-message {
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin: var(--space-6) 0;
}

.error-page .error-message p {
    margin: var(--space-2) 0;
    color: var(--color-warning-text);
}

.error-page .error-details {
    text-align: left;
    margin: var(--space-6) 0;
    padding: var(--space-6);
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
}

.error-page .error-details h2 {
    font-size: var(--text-lg);
    margin-top: var(--space-6);
    margin-bottom: var(--space-2);
}

.error-page .error-details h2:first-child {
    margin-top: 0;
}

.error-page .error-details ul {
    margin: var(--space-2) 0 0 var(--space-4);
}

.error-page .error-details li {
    margin: var(--space-2) 0;
}

.error-page .actions {
    margin-top: var(--space-8);
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.error-page .button {
    display: inline-flex;
    align-items: center;
    padding: var(--space-3) var(--space-6);
    background: linear-gradient(135deg, var(--color-cyan-500) 0%, var(--color-cyan-600) 100%);
    color: var(--color-text-inverse);
    text-decoration: none;
    border-radius: var(--radius);
    font-family: var(--font-display);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.error-page .button:hover {
    background: linear-gradient(135deg, var(--color-cyan-400) 0%, var(--color-cyan-500) 100%);
    text-decoration: none;
    transform: translateY(-1px);
}

/* ===== UTILITY CLASSES ===== */
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.text-success { color: var(--color-success); }
.text-info { color: var(--color-info); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-2); }
.mt-2 { margin-top: var(--space-4); }
.mt-3 { margin-top: var(--space-6); }
.mt-4 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-2); }
.mb-2 { margin-bottom: var(--space-4); }
.mb-3 { margin-bottom: var(--space-6); }
.mb-4 { margin-bottom: var(--space-8); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.3s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }

/* ===== VISUALLY HIDDEN (for screen readers) ===== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== SKIP LINK ===== */
.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-4);
    background: var(--color-slate-900);
    color: var(--color-text-inverse);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    z-index: 1000;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: var(--space-4);
    outline: 2px solid var(--color-cyan-400);
    outline-offset: 2px;
}

/* ===== FOCUS STYLES ===== */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ===== SELECTION ===== */
::selection {
    background: var(--color-cyan-500);
    color: var(--color-text-inverse);
}

/* ===== PRINT STYLES ===== */
@media print {
    .site-header,
    .site-footer,
    .subnav,
    .pagination,
    .btn {
        display: none !important;
    }

    .site-main {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* ===== DOCUMENTATION TABLES ===== */
.api-tools-table,
.feeds-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-4) 0;
    font-size: var(--text-sm);
}

.api-tools-table th,
.api-tools-table td,
.feeds-table th,
.feeds-table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.api-tools-table th,
.feeds-table th {
    background: var(--color-bg-alt);
    font-weight: 600;
    color: var(--color-text);
}

.api-tools-table tr:hover,
.feeds-table tr:hover {
    background: var(--color-bg-alt);
}

.api-tools-table code,
.feeds-table code {
    background: var(--color-slate-100);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-cyan-700);
}

/* Code blocks in documentation */
.card-body pre {
    background: var(--color-slate-900);
    color: var(--color-slate-100);
    padding: var(--space-4);
    border-radius: var(--radius);
    overflow-x: auto;
    margin: var(--space-4) 0;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.card-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.card-body p code,
.card-body li code {
    background: var(--color-slate-100);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--color-cyan-700);
}

/* ===== DOCUMENTATION PAGES ===== */

/* Page Layout */
.doc-page {
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section */
.doc-hero {
    background: linear-gradient(135deg, var(--color-slate-900) 0%, var(--color-slate-800) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-4);
    margin-bottom: var(--space-6);
    position: relative;
    overflow: hidden;
}

@media (min-width: 640px) {
    .doc-hero {
        border-radius: var(--radius-xl);
        padding: var(--space-10) var(--space-8);
        margin-bottom: var(--space-8);
    }
}

.doc-hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

/* Animated gradient mesh effect */
.doc-hero::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 40% 40%, rgba(14, 116, 144, 0.06) 0%, transparent 20%);
    animation: meshFloat 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes meshFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, 1%) rotate(1deg); }
    66% { transform: translate(-1%, 2%) rotate(-1deg); }
}

.doc-hero-content {
    position: relative;
    z-index: 1;
}

.doc-hero-badge {
    display: inline-block;
    background: rgba(6, 182, 212, 0.2);
    color: var(--color-cyan-400);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.doc-hero h1 {
    color: var(--color-text-inverse);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
}

@media (min-width: 640px) {
    .doc-hero h1 {
        font-size: var(--text-4xl);
    }
}

.doc-hero-lead {
    color: var(--color-slate-300);
    font-size: var(--text-lg);
    margin: 0;
    max-width: 600px;
}

/* Grid Layout */
.doc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

@media (min-width: 1024px) {
    .doc-grid {
        grid-template-columns: 200px 1fr;
    }
}

/* Sidebar Navigation */
.doc-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .doc-sidebar {
        display: block;
    }
}

.doc-nav {
    position: sticky;
    top: calc(var(--header-height) + var(--space-8));
}

.doc-nav-title {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.doc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-nav li {
    margin: 0;
}

.doc-nav a {
    display: block;
    padding: var(--space-2) 0;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    border-left: 2px solid transparent;
    padding-left: var(--space-3);
    margin-left: -2px;
    transition: all var(--transition-fast);
}

.doc-nav a:hover {
    color: var(--color-text);
    border-left-color: var(--color-slate-300);
}

.doc-nav a.active {
    color: var(--color-accent);
    border-left-color: var(--color-accent);
}

/* Content Sections */
.doc-content {
    min-width: 0;
}

.doc-content-single {
    max-width: 48rem;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

.doc-section {
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-border);
}

.doc-section:last-of-type {
    border-bottom: none;
}

.doc-section h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
    padding-top: var(--space-2);
}

.doc-section h3 {
    font-size: var(--text-xl);
    margin-top: var(--space-6);
    margin-bottom: var(--space-4);
}

.doc-section h4 {
    font-size: var(--text-lg);
    margin-top: var(--space-4);
    margin-bottom: var(--space-3);
}

/* Tool Grid */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

@media (min-width: 640px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.tool-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-cyan-500), var(--color-cyan-400));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.tool-card:hover {
    border-color: var(--color-cyan-500);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(6, 182, 212, 0.1);
    transform: translateY(-4px);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-name {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-slate-900) 0%, var(--color-slate-800) 100%);
    color: var(--color-cyan-400);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tool-card p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

/* Content Type List */
.content-type-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.content-type-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-alt);
    border-radius: var(--radius);
}

.content-type-item code {
    background: var(--color-slate-900);
    color: var(--color-cyan-400);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 500;
}

.content-type-item span {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

/* Feature Box */
.feature-box {
    background: linear-gradient(135deg, var(--color-info-bg) 0%, #f0f9ff 100%);
    border-left: 4px solid var(--color-info);
    border-radius: var(--radius);
    padding: var(--space-5);
}

.feature-box p {
    margin-bottom: var(--space-3);
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.check-list li {
    position: relative;
    padding-left: var(--space-6);
    margin-bottom: var(--space-2);
}

.check-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: bold;
}

/* Integration Cards */
.integration-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

@media (min-width: 768px) {
    .integration-cards {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--space-5);
        margin-top: var(--space-5);
    }
}

.integration-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition);
    position: relative;
}

.integration-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.integration-card-alt {
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-slate-100) 100%);
    border-style: dashed;
}

.integration-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.integration-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-slate-800) 0%, var(--color-slate-900) 100%);
    color: var(--color-cyan-400);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: var(--text-lg);
    font-weight: 700;
}

.integration-card h3 {
    margin: 0;
    font-size: var(--text-lg);
}

.integration-card p {
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.integration-card pre {
    margin: var(--space-3) 0;
    font-size: var(--text-xs);
}

.config-path {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.config-path code {
    font-size: var(--text-xs);
}

.integration-note {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-style: italic;
    margin: 0;
}

/* Endpoint Box */
.endpoint-box {
    background: var(--color-slate-900);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-top: var(--space-6);
}

.endpoint-box h3 {
    color: var(--color-text-inverse);
    margin: 0 0 var(--space-2) 0;
    font-size: var(--text-base);
}

.endpoint-box p {
    color: var(--color-slate-400);
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.endpoint-url {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.endpoint-url code {
    background: var(--color-slate-800);
    color: var(--color-cyan-400);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
    font-size: var(--text-base);
}

.endpoint-badge {
    background: var(--color-cyan-500);
    color: var(--color-slate-900);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
}

/* Rate Limits */
.limits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-4);
}

@media (max-width: 640px) {
    .limits-grid {
        grid-template-columns: 1fr;
    }
}

.limit-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}

.limit-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(6, 182, 212, 0.03) 100%);
    pointer-events: none;
}

.limit-item:hover {
    border-color: var(--color-cyan-200);
    box-shadow: var(--shadow-md);
}

.limit-value {
    display: block;
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-slate-800) 0%, var(--color-cyan-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.limit-label {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Example Queries */
.example-queries {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: var(--space-5) 0;
}

.example-query {
    background: linear-gradient(90deg, var(--color-bg-alt) 0%, var(--color-surface) 100%);
    border-left: 3px solid var(--color-cyan-500);
    padding: var(--space-4);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    border-radius: 0 var(--radius) var(--radius) 0;
    transition: all var(--transition-fast);
    cursor: default;
}

.example-query:hover {
    border-left-width: 6px;
    padding-left: calc(var(--space-4) - 3px);
    background: linear-gradient(90deg, var(--color-cyan-500), var(--color-cyan-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Doc Footer */
.doc-footer {
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
}

/* ===== RSS FEEDS PAGE ===== */

/* Featured Feed */
.feed-featured {
    display: flex;
    gap: var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}

.feed-featured-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-primary-bg);
    border-radius: var(--radius);
    color: var(--color-primary);
    flex-shrink: 0;
}

.feed-featured-content {
    flex: 1;
}

.feed-featured-content h3 {
    color: var(--color-text);
    margin: 0 0 var(--space-2) 0;
}

.feed-featured-content p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.feed-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.feed-link::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9'/%3E%3Cpath d='M4 4a16 16 0 0 1 16 16'/%3E%3Ccircle cx='5' cy='19' r='1'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9'/%3E%3Cpath d='M4 4a16 16 0 0 1 16 16'/%3E%3Ccircle cx='5' cy='19' r='1'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
}

.feed-link:hover {
    color: var(--color-accent);
}

/* RSS link inside headings */
h1 .feed-link {
    font-size: var(--text-sm);
    font-weight: 500;
    vertical-align: middle;
    margin-left: var(--space-3);
}

/* Feed Grid */
.feed-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

@media (min-width: 640px) {
    .feed-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--space-4);
    }
}

.feed-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-decoration: none;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.feed-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-cyan-500);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform var(--transition);
}

.feed-card:hover {
    border-color: var(--color-cyan-300);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(6, 182, 212, 0.08);
    transform: translateY(-4px);
}

.feed-card:hover::before {
    transform: scaleY(1);
}

.feed-card-title {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-2);
    transition: color var(--transition-fast);
}

.feed-card:hover .feed-card-title {
    color: var(--color-cyan-600);
}

.feed-card-desc {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
}

/* Comparison Box */
.comparison-box {
    background: linear-gradient(135deg, var(--color-success-bg) 0%, #ecfdf5 100%);
    border: 1px solid var(--color-success);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    position: relative;
    overflow: hidden;
}

.comparison-box::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.comparison-box h4 {
    color: var(--color-success-text);
    margin: 0 0 var(--space-4) 0;
    font-size: var(--text-lg);
    font-weight: 700;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.comparison-item {
    display: flex;
    gap: var(--space-3);
}

.comparison-icon {
    flex-shrink: 0;
    color: var(--color-success);
}

.comparison-item div {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.comparison-item strong {
    color: var(--color-success-text);
    font-size: var(--text-sm);
}

.comparison-item span {
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
}

/* Official Feeds List */
.official-feeds-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.official-feed {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-4);
    text-decoration: none;
    transition: all var(--transition);
}

.official-feed:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-slate-300);
    transform: translateX(4px);
}

.official-feed svg {
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.official-feed:hover svg {
    color: var(--color-accent);
    transform: translate(2px, -2px);
}

.official-feed-name {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-text);
    min-width: 140px;
}

.official-feed-note {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
}

.official-feed-warning {
    border-color: var(--color-warning);
    background: linear-gradient(90deg, var(--color-warning-bg) 0%, var(--color-surface) 100%);
    border-left: 4px solid var(--color-warning);
}

.official-feed-warning .official-feed-note {
    color: var(--color-warning-text);
}

/* ===== DOCUMENTATION PAGE ANIMATIONS ===== */

/* Staggered entrance for doc sections */
.doc-section {
    animation: docFadeIn 0.5s ease forwards;
    opacity: 0;
}

.doc-section:nth-child(1) { animation-delay: 0.1s; }
.doc-section:nth-child(2) { animation-delay: 0.15s; }
.doc-section:nth-child(3) { animation-delay: 0.2s; }
.doc-section:nth-child(4) { animation-delay: 0.25s; }
.doc-section:nth-child(5) { animation-delay: 0.3s; }
.doc-section:nth-child(6) { animation-delay: 0.35s; }
.doc-section:nth-child(7) { animation-delay: 0.4s; }

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

/* Tool cards stagger */
.tool-card {
    animation: cardSlideIn 0.4s ease forwards;
    opacity: 0;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.15s; }
.tool-card:nth-child(3) { animation-delay: 0.2s; }
.tool-card:nth-child(4) { animation-delay: 0.25s; }
.tool-card:nth-child(5) { animation-delay: 0.3s; }
.tool-card:nth-child(6) { animation-delay: 0.35s; }
.tool-card:nth-child(7) { animation-delay: 0.4s; }

/* Feed cards stagger */
.feed-card {
    animation: cardSlideIn 0.4s ease forwards;
    opacity: 0;
}

.feed-card:nth-child(1) { animation-delay: 0.05s; }
.feed-card:nth-child(2) { animation-delay: 0.1s; }
.feed-card:nth-child(3) { animation-delay: 0.15s; }
.feed-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Integration cards stagger */
.integration-card {
    animation: cardSlideIn 0.4s ease forwards;
    opacity: 0;
}

.integration-card:nth-child(1) { animation-delay: 0.1s; }
.integration-card:nth-child(2) { animation-delay: 0.15s; }
.integration-card:nth-child(3) { animation-delay: 0.2s; }
.integration-card:nth-child(4) { animation-delay: 0.25s; }

/* Hero text animation */
.doc-hero-content h1 {
    animation: heroTextIn 0.6s ease forwards;
    opacity: 0;
}

.doc-hero-lead {
    animation: heroTextIn 0.6s ease forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

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

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .doc-section,
    .tool-card,
    .feed-card,
    .integration-card,
    .doc-hero-content h1,
    .doc-hero-lead {
        animation: none;
        opacity: 1;
    }

    .doc-hero::after {
        animation: none;
    }
}

/* ===== PWA PULL-TO-REFRESH ===== */
.ptr-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
    display: flex;
    justify-content: center;
    pointer-events: none;
    padding-top: env(safe-area-inset-top, 0);
}

.ptr-indicator {
    --ptr-translate: -50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-slate-800);
    border: 2px solid var(--color-cyan-500);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(var(--ptr-translate));
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    opacity: 0;
}

.ptr-indicator.visible {
    opacity: 1;
}

.ptr-indicator.refreshing {
    transform: translateY(12px);
    opacity: 1;
}

.ptr-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-slate-600);
    border-top-color: var(--color-cyan-400);
    border-radius: 50%;
}

.ptr-indicator.refreshing .ptr-spinner {
    animation: ptr-spin 0.8s linear infinite;
}

.ptr-arrow {
    width: 16px;
    height: 16px;
    stroke: var(--color-cyan-400);
    stroke-width: 2.5;
    fill: none;
    transition: transform 0.2s ease-out;
}

.ptr-indicator.ready .ptr-arrow {
    transform: rotate(180deg);
}

.ptr-indicator.refreshing .ptr-arrow {
    display: none;
}

@keyframes ptr-spin {
    to { transform: rotate(360deg); }
}

.ptr-hidden {
    display: none !important;
}

/* ===== SW UPDATE TOAST ===== */
.sw-update-toast {
    position: fixed;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--color-slate-900);
    color: var(--color-text-inverse);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sw-update-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.sw-update-toast span {
    font-size: var(--text-sm);
    font-weight: 500;
}

.sw-update-toast button {
    background: var(--color-cyan-500);
    color: white;
    border: none;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sw-update-toast button:hover {
    background: var(--color-cyan-400);
}

@media (max-width: 480px) {
    .sw-update-toast {
        left: var(--space-4);
        right: var(--space-4);
        transform: translateX(0) translateY(100px);
    }

    .sw-update-toast.visible {
        transform: translateX(0) translateY(0);
    }
}

/* ===== CONTENT UPDATE TOAST ===== */
.content-update-toast {
    position: fixed;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--color-slate-800);
    color: var(--color-text-inverse);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.content-update-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.content-update-toast span {
    font-size: var(--text-sm);
    font-weight: 500;
}

.content-update-toast button {
    background: var(--color-cyan-600);
    color: white;
    border: none;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.content-update-toast button:hover {
    background: var(--color-cyan-500);
}

@media (max-width: 480px) {
    .content-update-toast {
        left: var(--space-4);
        right: var(--space-4);
        transform: translateX(0) translateY(100px);
    }

    .content-update-toast.visible {
        transform: translateX(0) translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ptr-indicator.refreshing .ptr-spinner {
        animation: none;
    }
}

/* ===== PWA LOADING SCREEN ===== */
.pwa-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-slate-900);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.pwa-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.pwa-loader-icon {
    width: 80px;
    height: 80px;
    animation: pwa-pulse 2s ease-in-out infinite;
}

.pwa-loader-title {
    margin-top: var(--space-6);
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-slate-100);
    letter-spacing: 0.05em;
}

.pwa-loader-spinner {
    margin-top: var(--space-4);
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-slate-700);
    border-top-color: var(--color-cyan-500);
    border-radius: 50%;
    animation: pwa-spin 0.8s linear infinite;
}

@keyframes pwa-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes pwa-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Page content fade-in when loading screen hides (only on fresh PWA launch) */
@keyframes pwa-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation only applied via JS class on fresh PWA launch */
.pwa-fresh-launch .site-layout,
.pwa-fresh-launch .site-header,
.pwa-fresh-launch .site-footer {
    animation: pwa-fade-in 0.3s ease 0.1s both;
}

/* Only show loading screen in PWA standalone mode */
@media not (display-mode: standalone) {
    .pwa-loader {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pwa-loader-icon {
        animation: none;
    }

    .pwa-loader-spinner {
        animation: none;
    }

    .pwa-fresh-launch .site-layout,
    .pwa-fresh-launch .site-header,
    .pwa-fresh-launch .site-footer {
        animation: none;
    }
}
