@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap');
/* Forem Suite Support - Stratos dark design system (matches home screen) */
:root {
    /* Brand accent (violet) */
    --primary: #8b5cf6;
    --primary-light: rgba(139, 92, 246, 0.14);
    --primary-dark: #6d28d9;
    /* Status */
    --success: #34d399;
    --success-light: rgba(52, 211, 153, 0.14);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.14);
    --danger: #fb7185;
    --danger-light: rgba(251, 113, 133, 0.14);
    /* Text scale (light on dark) — names kept so all pages adapt */
    --dark: #f5f6fa;
    --gray-900: #ebedf3;
    --gray-800: #dbdee9;
    --gray-700: #c2c7d6;
    --gray-600: #a0a5b8;
    --gray-500: #828798;
    --gray-400: #6e7284;
    /* Borders / dividers / subtle fills (translucent white) */
    --gray-300: rgba(255, 255, 255, 0.16);
    --gray-200: rgba(255, 255, 255, 0.10);
    --gray-100: rgba(255, 255, 255, 0.07);
    --gray-50: rgba(255, 255, 255, 0.04);
    /* Surface (was white) */
    --white: #0e1119;

    /* Stratos surfaces & effects */
    --bg: #05060b;
    --bg-2: #0a0c16;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-2: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --grad-primary: linear-gradient(120deg, #8b5cf6 0%, #22d3ee 60%, #f472b6 100%);
    --grad-violet: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.6);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 24px;

    --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Legacy tokens still referenced by several pages (search buttons, banners, cards).
       Undefined custom properties make the whole declaration invalid, so define them here. */
    --gradient-1: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    --gradient-2: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%);
    --gradient-3: linear-gradient(135deg, #f472b6 0%, #fb7185 100%);
    --gradient-success: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --shadow-xl: 0 32px 64px -16px rgba(0, 0, 0, 0.65);
    --transition: all 0.25s ease;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.6;
    background: var(--gray-50);
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Background - simplified, no animation */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    z-index: -2;
}

.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.bg-shapes::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    top: -150px;
    right: -100px;
}

.bg-shapes::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    bottom: -150px;
    left: -100px;
}

/* Header - clean and slim */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 24px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
}

.header-container {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xs);
}

.logo-icon i {
    font-size: 18px;
    color: var(--primary);
    background: none;
    -webkit-text-fill-color: var(--primary);
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.3px;
}

.header.scrolled .logo-text {
    color: var(--dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    color: rgba(255,255,255,0.85);
    font-size: 13.5px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,0.15);
    color: var(--white);
}

.header.scrolled .nav-links a {
    color: var(--gray-600);
}

.header.scrolled .nav-links a:hover,
.header.scrolled .nav-links a.active {
    background: var(--gray-100);
    color: var(--primary);
}

/* "Forem Suite" button linking back to the main website */
.nav-links a.main-site-link {
    margin-left: 6px;
    padding: 8px 16px;
    color: var(--white);
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 999px;
    font-weight: 600;
}

.nav-links a.main-site-link:hover {
    background: rgba(255,255,255,0.25);
}

.header.scrolled .nav-links a.main-site-link {
    color: var(--primary);
    background: var(--gray-100);
    border-color: var(--gray-300, #d1d5db);
}

.header.scrolled .nav-links a.main-site-link:hover {
    background: var(--gray-200, #e5e7eb);
}

.mobile-menu-btn {
    display: none;
    background: rgba(255,255,255,0.15);
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    transition: background 0.15s ease;
}

.header.scrolled .mobile-menu-btn {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Page Header - compact */
.page-header {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    text-align: center;
    position: relative;
}

.page-header-content {
    max-width: 600px;
}

.page-header .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    margin-bottom: 16px;
}

.page-header h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.page-header p {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Main Content - clean white background */
.main-content {
    background: var(--white);
    position: relative;
    z-index: 1;
    border-radius: 32px 32px 0 0;
    margin-top: -32px;
    min-height: 50vh;
}

.content-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 48px 24px;
}

/* Section Styles - minimal */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 8px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.section-header p {
    color: var(--gray-600);
    font-size: 15px;
    max-width: 480px;
    margin: 0 auto;
}

/* Cards - flat, clean */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow);
    border-color: var(--gray-300);
}

.card-glass {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

/* Buttons - clean, no gradients */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

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

.btn-success:hover {
    background: #047857;
    box-shadow: var(--shadow);
}

/* Forms - minimal borders */
.form-container {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xs);
}

.form-info {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    padding: 16px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 28px;
}

.form-info h3 {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-info p {
    color: var(--gray-600);
    font-size: 13px;
    margin: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
    background: var(--white);
    color: var(--gray-800);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-message {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    display: none;
    font-size: 13px;
    font-weight: 500;
}

.form-message.success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid #a7f3d0;
    display: block;
}

.form-message.error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid #fecaca;
    display: block;
}

.form-message.info {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid #c7d2fe;
    display: block;
}

.submit-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.submit-btn:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Tables - clean borders */
.table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead {
    background: var(--gray-50);
}

.modern-table th {
    padding: 12px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
}

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

.modern-table tr:hover {
    background: var(--gray-50);
}

/* Badges - subtle */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background: var(--primary-light);
    color: var(--primary);
}

/* Status Dots */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online { background: var(--success); }
.status-dot.warning { background: var(--warning); }
.status-dot.offline { background: var(--danger); }

/* Icons - flat colors, no gradients */
.icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
}

.icon-box.primary { background: var(--primary); }
.icon-box.success { background: var(--success); }
.icon-box.warning { background: var(--warning); }
.icon-box.info { background: #0ea5e9; }

/* Breadcrumb */
.breadcrumb {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 24px;
    font-size: 13px;
    color: var(--gray-500);
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Footer - darker, cleaner */
.footer {
    background: var(--dark);
    padding: 48px 24px 28px;
    color: var(--gray-500);
}

.footer-container {
    max-width: 1120px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.footer-brand p {
    line-height: 1.7;
    font-size: 13px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: background 0.15s ease, color 0.15s ease;
    font-size: 14px;
}

.social-links a:hover {
    background: var(--primary);
    color: var(--white);
}

.footer-links h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 13px;
    transition: color 0.15s ease;
}

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

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 12px;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    font-size: 12px;
    transition: color 0.15s ease;
}

.footer-bottom-links a:hover {
    color: var(--white);
}

/* Tabs - clean */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    color: var(--gray-600);
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Animations - subtle */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.3s ease forwards;
}

/* ======= RESPONSIVE ======= */

/* 1024px - small desktops / tablets landscape */
@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

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

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

    .content-container {
        padding: 40px 20px;
    }

    .form-container {
        padding: 32px 24px;
    }
}

/* Desktop header: never let links / brand wrap onto two lines */
.logo-text, .nav-links a { white-space: nowrap; }
@media (max-width: 1220px) {
    .nav-links { gap: 2px; }
    .nav-links a { padding: 8px 10px; font-size: 13px; }
}

/* 1100px - tablets & small laptops: the desktop nav (links + language + theme
   toggle) no longer fits, so collapse to the hamburger menu here */
@media (max-width: 1100px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 62px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 12px;
        box-shadow: var(--shadow-lg);
        gap: 0;
        z-index: 999;
        max-height: calc(100vh - 62px);
        overflow-y: auto;
        border-bottom: 1px solid var(--gray-200);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        color: var(--gray-700);
        padding: 12px;
        border-bottom: 1px solid var(--gray-100);
        width: 100%;
        font-size: 14px;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links a.main-site-link {
        margin-left: 0;
        margin-top: 8px;
        border-radius: var(--radius-sm);
        justify-content: center;
        display: flex;
    }

    /* Header controls cluster on the right: [logo] ......... [lang] [theme] [menu] */
    html .header-container { gap: 10px; }
    html .logo { flex-shrink: 1; min-width: 0; }
    html .logo-text { white-space: nowrap; }
    html .logo-icon, html .theme-toggle, html .mobile-menu-btn { flex-shrink: 0; }
    html .header-container > .theme-toggle,
    html .header-container > .language-selector { margin-left: auto; }
    html .header-container > .language-selector ~ .theme-toggle,
    html .header-container > .language-selector ~ .mobile-menu-btn,
    html .header-container > .theme-toggle ~ .mobile-menu-btn { margin-left: 0; }

    /* Mobile menu colours must win over the theme-scoped desktop nav rules
       (otherwise light theme renders white links on the white dropdown). */
    html .nav-links,
    html[data-theme="light"] .nav-links { background: var(--white); border-bottom: 1px solid var(--gray-200); }
    html .nav-links a,
    html[data-theme="light"] .nav-links a,
    html .header.scrolled .nav-links a,
    html[data-theme="light"] .header.scrolled .nav-links a { color: var(--gray-700); background: transparent; }
    html .nav-links a:hover,
    html .nav-links a.active,
    html[data-theme="light"] .nav-links a:hover,
    html[data-theme="light"] .nav-links a.active,
    html[data-theme="light"] .header.scrolled .nav-links a:hover,
    html[data-theme="light"] .header.scrolled .nav-links a.active { color: var(--primary); background: var(--primary-light); }
    html .nav-links a.main-site-link,
    html[data-theme="light"] .nav-links a.main-site-link,
    html .header.scrolled .nav-links a.main-site-link { color: #fff; background: var(--primary); border: none; }
    html .nav-links a.main-site-link:hover { background: var(--primary-dark); }
}

/* 768px - tablets portrait */
@media (max-width: 768px) {
    .header {
        padding: 10px 16px;
    }

    .page-header {
        min-height: auto;
        padding: 100px 20px 56px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .page-header p {
        font-size: 14px;
    }

    .page-header .badge {
        font-size: 11px;
        padding: 5px 12px;
        margin-bottom: 12px;
    }

    .main-content {
        border-radius: 24px 24px 0 0;
        margin-top: -24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 24px 18px;
    }

    .content-container {
        padding: 32px 16px;
    }

    .section-header {
        margin-bottom: 28px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .footer {
        padding: 36px 16px 20px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        justify-content: center;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 22px;
    }

    .card-glass {
        padding: 22px;
    }

    .icon-box {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .breadcrumb {
        padding: 12px 16px;
        font-size: 12px;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 480px - mobile phones */
@media (max-width: 480px) {
    .header {
        padding: 8px 12px;
    }

    .logo-icon {
        width: 34px;
        height: 34px;
    }

    .logo-icon i {
        font-size: 16px;
    }

    .logo-text {
        font-size: 16px;
    }

    .mobile-menu-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .nav-links {
        top: 54px;
    }

    .page-header {
        padding: 88px 14px 40px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .page-header p {
        font-size: 13px;
    }

    .main-content {
        border-radius: 20px 20px 0 0;
        margin-top: -20px;
    }

    .content-container {
        padding: 24px 12px;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .section-header p {
        font-size: 13px;
    }

    .card {
        padding: 18px 14px;
        border-radius: var(--radius-lg);
    }

    .form-container {
        padding: 20px 14px;
        border-radius: var(--radius-lg);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
    }

    .form-group label {
        font-size: 12px;
    }

    .btn {
        width: 100%;
        padding: 10px 18px;
        font-size: 13px;
    }

    .submit-btn {
        font-size: 14px;
        padding: 12px 18px;
    }

    .icon-box {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .breadcrumb {
        padding: 10px 12px;
        font-size: 11px;
    }

    .footer {
        padding: 28px 12px 16px;
    }

    .footer-top {
        gap: 20px;
        margin-bottom: 20px;
    }

    .footer-brand h3 {
        font-size: 18px;
    }

    .footer-brand p {
        font-size: 12px;
    }

    .footer-links h4 {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .footer-links a {
        font-size: 12px;
    }

    .badge {
        font-size: 11px;
        padding: 3px 10px;
    }
}

/* 360px - small mobile phones */
@media (max-width: 360px) {
    .page-header {
        padding: 80px 12px 36px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .content-container {
        padding: 20px 10px;
    }

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

    .card {
        padding: 16px 12px;
    }

    .form-container {
        padding: 16px 12px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 9px 10px;
        font-size: 13px;
    }
}

/* ==========================================================
   Stratos dark theme — overrides (match home screen)
   Layered after base rules; flips surfaces, glass & effects.
   ========================================================== */

body {
    background: var(--bg);
    color: var(--gray-700);
    -webkit-font-smoothing: antialiased;
}
*::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

/* Display font for headings + brand */
h1, h2, h3, h4,
.logo-text,
.page-header h1,
.section-header h2,
.footer-brand h3,
.footer-links h4 { font-family: var(--font-display); letter-spacing: -0.01em; }

/* ----- Animated Stratos backdrop (reuses .bg-gradient / .bg-shapes) ----- */
.bg-gradient {
    height: 100%;
    background:
        radial-gradient(ellipse at 20% -10%, #1a0b2e 0%, transparent 55%),
        radial-gradient(ellipse at 90% 8%, #062235 0%, transparent 50%),
        radial-gradient(ellipse at 50% 110%, #2a0b3f 0%, transparent 60%),
        var(--bg);
}
.bg-shapes::before {
    width: 620px; height: 480px; top: 4%; right: -120px;
    background: radial-gradient(closest-side, rgba(139, 92, 246, 0.22), transparent 70%);
    filter: blur(20px);
}
.bg-shapes::after {
    width: 560px; height: 460px; bottom: auto; top: 22%; left: -140px;
    background: radial-gradient(closest-side, rgba(34, 211, 238, 0.16), transparent 70%);
    filter: blur(20px);
}

/* ----- Header (glass) ----- */
.header.scrolled {
    background: rgba(8, 10, 18, 0.78);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
}
.logo-text,
.header.scrolled .logo-text { color: var(--dark); }
.logo-icon {
    background: var(--grad-violet);
    box-shadow: 0 6px 18px -6px rgba(139, 92, 246, 0.7);
}
.logo-icon i { color: #fff; -webkit-text-fill-color: #fff; }
.header.scrolled .nav-links a { color: var(--gray-600); }
.header.scrolled .nav-links a:hover,
.header.scrolled .nav-links a.active { background: var(--surface-2); color: var(--dark); }
.mobile-menu-btn { color: var(--dark); }
.header.scrolled .mobile-menu-btn { background: var(--surface-2); color: var(--dark); }

/* ----- Page header / hero band ----- */
.page-header::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(60% 120% at 50% 0%, rgba(139, 92, 246, 0.18), transparent 70%);
    pointer-events: none;
}
/* Hero text must stay light (var(--white) now resolves to a dark surface) */
.page-header h1 { color: #f8f9fc; }
.page-header p { color: rgba(255, 255, 255, 0.82); }
.page-header .badge { color: #fff; background: rgba(255, 255, 255, 0.16); }

/* ----- Main content surface ----- */
.main-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--border);
    border-bottom: none;
    backdrop-filter: blur(6px);
}

/* ----- Cards ----- */
.card, .card-glass {
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }

/* ----- Buttons (gradient primary, white label) ----- */
.btn-primary, .submit-btn {
    background: var(--grad-violet); color: #fff;
    box-shadow: 0 8px 24px -8px rgba(139, 92, 246, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover, .submit-btn:hover {
    background: var(--grad-violet); filter: brightness(1.08);
    box-shadow: 0 12px 30px -8px rgba(139, 92, 246, 0.75);
    transform: translateY(-1px);
}
.btn-success { color: #fff; }
.btn-secondary { background: var(--surface); color: var(--gray-800); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-strong); }

/* ----- Forms ----- */
.form-container { background: var(--surface); border-color: var(--border); backdrop-filter: blur(12px); }
.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-strong);
    color: var(--gray-900);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--gray-500); }
.form-group select option { background: var(--bg-2); color: var(--gray-900); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
}
.form-message.success { border-color: rgba(52, 211, 153, 0.4); }
.form-message.error { border-color: rgba(251, 113, 133, 0.4); }
.form-message.info { border-color: rgba(139, 92, 246, 0.4); }

/* ----- Tables ----- */
.table-container { background: var(--surface); border-color: var(--border); }
.modern-table thead { background: rgba(255, 255, 255, 0.04); }
.modern-table tr:hover { background: rgba(255, 255, 255, 0.04); }

/* ----- Icon boxes keep white glyphs on color ----- */
.icon-box { color: #fff; }

/* ----- Footer ----- */
.footer {
    background: linear-gradient(180deg, rgba(10, 12, 22, 0.4) 0%, rgba(0, 0, 0, 0.55) 100%);
    border-top: 1px solid var(--border);
    color: var(--gray-500);
}
.footer-brand h3 { color: var(--dark); }
.footer-links h4 { color: var(--dark); text-transform: uppercase; letter-spacing: 0.1em; font-size: 13px; }
.footer-links a { color: var(--gray-500); }
.footer-links a:hover { color: var(--dark); }
.social-links a { background: var(--surface); border: 1px solid var(--border); color: var(--gray-500); }
.social-links a:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--dark); transform: translateY(-2px); }
.footer-bottom-links a:hover { color: var(--dark); }

/* ----- Nav hover (non-scrolled) + active tab keep light text ----- */
.nav-links a:hover,
.nav-links a.active { background: var(--surface-2); color: var(--dark); }
.tab-btn.active { background: var(--grad-violet); color: #fff; border-color: transparent; }

/* ==========================================================
   Theme toggle button (works in both themes)
   ========================================================== */
.theme-toggle {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.theme-toggle:hover { transform: translateY(-1px); }
.header.scrolled .theme-toggle { background: var(--surface-2); color: var(--dark); border-color: var(--border); }
@media (max-width: 768px) { .theme-toggle { width: 38px; height: 38px; } }

/* ==========================================================
   LIGHT THEME — activated by <html data-theme="light">
   Scoped with [data-theme="light"] so it beats the dark layer.
   ========================================================== */
[data-theme="light"] {
    --primary: #7c3aed;
    --primary-light: #f3effe;
    --primary-dark: #6d28d9;
    --success: #059669;
    --success-light: #ecfdf5;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --dark: #111827;
    --gray-900: #1f2937;
    --gray-800: #374151;
    --gray-700: #4b5563;
    --gray-600: #6b7280;
    --gray-500: #9ca3af;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --bg: #f5f6fb;
    --bg-2: #eef0f7;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.04);
    --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.04);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    --shadow-xl: 0 20px 40px -12px rgb(0 0 0 / 0.14), 0 8px 16px -8px rgb(0 0 0 / 0.08);
    --gradient-1: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

[data-theme="light"] body { background: var(--gray-50); color: var(--gray-700); }

/* Backdrop → original colored hero gradient + soft white blobs */
[data-theme="light"] .bg-gradient {
    height: 100vh;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
}
[data-theme="light"] .bg-shapes::before {
    width: 500px; height: 500px; top: -150px; right: -100px;
    background: rgba(255, 255, 255, 0.05); filter: none;
}
[data-theme="light"] .bg-shapes::after {
    width: 400px; height: 400px; top: auto; bottom: -150px; left: -100px;
    background: rgba(255, 255, 255, 0.04); filter: none;
}

/* Header */
[data-theme="light"] .header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: none;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
}
[data-theme="light"] .logo-text { color: #fff; }
[data-theme="light"] .header.scrolled .logo-text { color: var(--dark); }
[data-theme="light"] .logo-icon { background: var(--white); box-shadow: var(--shadow-xs); }
[data-theme="light"] .logo-icon i { color: var(--primary); -webkit-text-fill-color: var(--primary); }
[data-theme="light"] .nav-links a { color: rgba(255, 255, 255, 0.85); }
[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active { background: rgba(255, 255, 255, 0.15); color: #fff; }
[data-theme="light"] .header.scrolled .nav-links a { color: var(--gray-600); }
[data-theme="light"] .header.scrolled .nav-links a:hover,
[data-theme="light"] .header.scrolled .nav-links a.active { background: var(--gray-100); color: var(--primary); }
[data-theme="light"] .mobile-menu-btn { background: rgba(255, 255, 255, 0.15); color: #fff; }
[data-theme="light"] .header.scrolled .mobile-menu-btn { background: var(--gray-100); color: var(--gray-700); }
[data-theme="light"] .theme-toggle { background: rgba(255, 255, 255, 0.15); color: #fff; }
[data-theme="light"] .header.scrolled .theme-toggle { background: var(--gray-100); color: var(--gray-700); }

/* Hero band (text stays light on the colored gradient) */
[data-theme="light"] .page-header::after { background: none; }

/* Main content surface */
[data-theme="light"] .main-content {
    background: var(--white);
    border: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
}

/* Cards / forms / tables */
[data-theme="light"] .card,
[data-theme="light"] .card-glass { background: var(--white); border: 1px solid var(--gray-200); backdrop-filter: none; }
[data-theme="light"] .card:hover { border-color: var(--gray-300); box-shadow: var(--shadow); }
[data-theme="light"] .btn-primary,
[data-theme="light"] .submit-btn { background: var(--primary); box-shadow: none; }
[data-theme="light"] .btn-primary:hover,
[data-theme="light"] .submit-btn:hover { background: var(--primary-dark); filter: none; box-shadow: var(--shadow); }
[data-theme="light"] .btn-secondary { background: var(--white); color: var(--gray-700); border-color: var(--gray-200); }
[data-theme="light"] .btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-300); }
[data-theme="light"] .form-container { background: var(--white); border-color: var(--gray-200); backdrop-filter: none; }
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea { background: var(--white); border-color: var(--gray-300); color: var(--gray-800); }
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group select:focus,
[data-theme="light"] .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12); }
[data-theme="light"] .table-container { background: var(--white); border-color: var(--gray-200); }
[data-theme="light"] .modern-table thead { background: var(--gray-50); }
[data-theme="light"] .modern-table tr:hover { background: var(--gray-50); }

/* Footer stays dark (original light-site design) */
[data-theme="light"] .footer {
    background: var(--dark);
    border-top: none;
    color: var(--gray-500);
}
[data-theme="light"] .footer-brand h3,
[data-theme="light"] .footer-links h4 { color: #fff; }
[data-theme="light"] .footer-links a { color: var(--gray-500); }
[data-theme="light"] .footer-links a:hover { color: #fff; }
[data-theme="light"] .footer-bottom-links a:hover { color: #fff; }
[data-theme="light"] .social-links a { background: rgba(255, 255, 255, 0.08); border: none; color: var(--gray-500); }
[data-theme="light"] .social-links a:hover { background: rgba(255, 255, 255, 0.15); border: none; color: #fff; }

/* Nav hover non-scrolled keeps light text over the colored hero */
[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active { background: rgba(255, 255, 255, 0.15); color: #fff; }
[data-theme="light"] .tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ==========================================================
   Polish layer — refined surfaces, gradient accents & motion
   (specificity bumped with `html` so it wins over per-page inline styles)
   ========================================================== */
:root { --grad-hair: linear-gradient(135deg, rgba(139,92,246,.75), rgba(34,211,238,.45) 55%, rgba(244,114,182,.75)); }

/* Page header */
html .page-header { padding-top: 132px; }
html .page-header .badge {
    position: relative; isolation: isolate;
    background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(8px); letter-spacing: .04em; text-transform: uppercase; font-size: 11.5px; font-weight: 600;
    padding: 7px 14px;
}
html:not([data-theme="light"]) .page-header h1 {
    background: linear-gradient(120deg, #ffffff 0%, #e9e4ff 55%, #c9d8ff 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
    letter-spacing: -0.02em;
}
html:not([data-theme="light"]) .page-header::after {
    background:
        radial-gradient(50% 120% at 30% 0%, rgba(139,92,246,.22), transparent 70%),
        radial-gradient(40% 100% at 75% 10%, rgba(34,211,238,.14), transparent 70%);
}
html .page-header-content { animation: sp-rise .8s cubic-bezier(.22,1,.36,1) both; }
@keyframes sp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Main content surface — gradient hairline at the top edge */
html .main-content { position: relative; }
html .main-content::before {
    content: ''; position: absolute; top: -1px; left: 10%; right: 10%; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(139,92,246,.7) 30%, rgba(34,211,238,.6) 55%, rgba(244,114,182,.6) 75%, transparent);
}

/* Section headings */
html .section-label {
    padding: 5px 12px; border-radius: 999px;
    background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.3);
    margin-bottom: 12px;
}
html .section-header h2 { position: relative; display: inline-block; padding-bottom: 12px; }
html .section-header h2::after {
    content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    width: 40px; height: 3px; border-radius: 3px; background: var(--grad-primary);
}

/* Cards — unified lift + gradient hairline on hover */
html .card, html .card-glass, html .category-card, html .info-card, html .support-option, html .app-card,
html .option-card, html .sidebar-card, html .popular-item, html .monitor-item, html .form-container,
html .quick-link, html .table-container {
    position: relative; isolation: isolate;
    transition: transform .3s cubic-bezier(.22,1,.36,1), border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
html .card::after, html .category-card::after, html .info-card::after, html .support-option::after, html .app-card::after,
html .option-card::after, html .sidebar-card::after, html .popular-item::after, html .form-container::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
    background: var(--grad-hair);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity .3s ease;
}
html .card:hover, html .category-card:hover, html .info-card:hover, html .support-option:hover, html .app-card:hover,
html .option-card:hover, html .popular-item:hover, html .quick-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px -24px rgba(139,92,246,.45), var(--shadow-lg);
}
html .card:hover::after, html .category-card:hover::after, html .info-card:hover::after, html .support-option:hover::after,
html .app-card:hover::after, html .option-card:hover::after, html .popular-item:hover::after, html .sidebar-card:hover::after,
html .form-container:hover::after { opacity: 1; }
html .sidebar-card:hover, html .form-container:hover { transform: none; }

/* Category / icon chips glow */
html .category-icon, html .support-option-icon, html .info-icon, html .app-card .app-icon, html .option-icon, html .popular-icon, html .icon-box {
    box-shadow: 0 10px 22px -10px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.18);
    transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
html .category-card:hover .category-icon, html .support-option:hover .support-option-icon, html .app-card:hover .app-icon,
html .option-card:hover .option-icon, html .info-card:hover .info-icon { transform: scale(1.06) rotate(-4deg); }

/* KB accordion — no layout jump, accent rail when open */
html .article-item { border-bottom: 1px solid var(--border); border-radius: 12px; transition: background .25s ease; }
html .article-header { padding: 20px 16px; margin: 0; border-radius: 12px; }
html .article-header:hover { margin: 0; padding: 20px 16px; background: rgba(139,92,246,.06); }
html .article-item.active { background: rgba(139,92,246,.05); border-bottom-color: transparent; margin-bottom: 8px; }
html .article-item.active .article-header h3 { color: var(--primary); }
html .article-item .toggle-icon {
    width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.3); font-size: 13px; margin-top: 0;
}
html .article-item.active .toggle-icon { background: var(--grad-violet); color: #fff; border-color: transparent; }
html .article-item.active .article-content { padding: 4px 16px 22px; background: transparent; }
html .article-content .tip {
    background: rgba(139,92,246,.10); border: 1px solid rgba(139,92,246,.25); border-left: 3px solid var(--primary);
    border-radius: 0 12px 12px 0; padding: 12px 16px;
}
html .article-content .tip strong { color: var(--primary); }
html .sidebar-card h3 { border-bottom: 0; padding-bottom: 12px; position: relative; }
html .sidebar-card h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; border-radius: 3px; background: var(--grad-primary); }
html .help-card { background: var(--grad-violet); box-shadow: 0 20px 44px -18px rgba(139,92,246,.7); }
html .help-card::after { display: none; }

/* Buttons */
html .btn, html .submit-btn { border-radius: 12px; transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, background .2s ease; }
html .btn-primary, html .submit-btn { background: var(--grad-primary); background-size: 200% 200%; }
html .btn-primary:hover, html .submit-btn:hover { background-position: 100% 0; transform: translateY(-2px); }
html .btn-secondary:hover { transform: translateY(-2px); }

/* Forms */
html .form-group input, html .form-group select, html .form-group textarea { border-radius: 12px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
html .form-group input:focus, html .form-group select:focus, html .form-group textarea:focus {
    box-shadow: 0 0 0 4px rgba(139,92,246,.18), 0 8px 24px -14px rgba(139,92,246,.6);
}
html .form-group label { font-weight: 600; letter-spacing: .01em; }

/* Tables */
html .table-container { border-radius: var(--radius-xl); overflow: hidden; }
html .modern-table th { text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; }

/* Breadcrumb as chips */
html .breadcrumb a { padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); transition: all .2s ease; }
html .breadcrumb a:hover { border-color: rgba(139,92,246,.4); background: rgba(139,92,246,.10); }

/* Footer */
html .footer { position: relative; }
html .footer::before {
    content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(139,92,246,.7) 30%, rgba(34,211,238,.6) 55%, rgba(244,114,182,.6) 75%, transparent);
}
html .footer-links a { transition: color .2s ease, transform .2s ease; display: inline-block; }
html .footer-links a:hover { transform: translateX(3px); }

/* Light theme adjustments */
html[data-theme="light"] .article-header:hover, html[data-theme="light"] .article-item.active { background: rgba(124,58,237,.05); }
html[data-theme="light"] .card:hover, html[data-theme="light"] .category-card:hover, html[data-theme="light"] .info-card:hover,
html[data-theme="light"] .support-option:hover, html[data-theme="light"] .app-card:hover, html[data-theme="light"] .option-card:hover,
html[data-theme="light"] .popular-item:hover { box-shadow: 0 24px 50px -24px rgba(124,58,237,.35), var(--shadow-lg); }

@media (prefers-reduced-motion: reduce) {
    html .page-header-content { animation: none; }
    html .card, html .category-card, html .info-card, html .support-option, html .app-card, html .option-card,
    html .popular-item, html .quick-link, html .btn, html .submit-btn { transition: none; }
}

/* ==========================================================
   Responsive hardening — applies to every page (all devices)
   `html` prefix bumps specificity above per-page inline styles.
   ========================================================== */

/* Long unbreakable strings (URLs, CSV headers, code) must never widen the page */
html body { overflow-wrap: break-word; }
html code, html kbd, html samp { overflow-wrap: anywhere; word-break: break-word; }
html pre { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: pre; }
html pre code { overflow-wrap: normal; word-break: normal; }

/* Media never overflows its container */
html img, html video, html iframe, html embed, html object { max-width: 100%; }
html img, html video { height: auto; }
html iframe { max-width: 100%; }

/* Tables scroll inside their wrapper instead of stretching the layout */
html .table-wrap, html .table-container { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
html table { max-width: 100%; }

/* Grid / flex children may shrink below their content's min-content width.
   Without this a `1fr` track holding a long <code> or a table blows past the viewport
   (seen on KB pages on iPhone SE). */
html .kb-layout,
html .grid-2, html .grid-3, html .grid-4,
html .popular-grid, html .apps-grid, html .categories-grid, html .category-grid,
html .options-grid, html .info-grid, html .status-grid, html .stats-grid,
html .contact-grid, html .contact-split, html .form-row { min-width: 0; }
html .kb-layout > *, html .grid-2 > *, html .grid-3 > *, html .grid-4 > *,
html .popular-grid > *, html .apps-grid > *, html .categories-grid > *, html .category-grid > *,
html .options-grid > *, html .info-grid > *, html .status-grid > *, html .stats-grid > *,
html .contact-grid > *, html .contact-split > *, html .form-row > * { min-width: 0; }
html .kb-layout { grid-template-columns: minmax(0, 1fr) 320px; }
html .articles-list, html .article-item, html .article-content, html .article-header, html .sidebar { min-width: 0; max-width: 100%; }
html .articles-list { overflow: hidden; }
html .article-header > div, html .article-header h3, html .article-header .summary { min-width: 0; }
html .article-header { gap: 12px; }
html .article-item .toggle-icon { flex: 0 0 auto; }

/* Auto-fill/auto-fit grids: the minmax floor may not exceed the container width */
html .popular-grid { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }

@media (max-width: 1024px) {
    html .kb-layout { grid-template-columns: minmax(0, 1fr); }
    html .kb-layout .sidebar { position: static; }
}

@media (max-width: 768px) {
    /* Section headings that carry the underline pseudo-element should wrap nicely */
    html .section-header h2 { display: block; }
    /* Buttons in a row wrap instead of overflowing */
    html .btn-group, html .cta-buttons, html .hero-actions, html .form-actions { flex-wrap: wrap; }
    /* Comfortable tap targets */
    html .nav-links a { min-height: 44px; display: flex; align-items: center; }
    html .btn, html .submit-btn { min-height: 44px; }
    /* Prevent iOS Safari zoom-on-focus (fires when control font-size < 16px) */
    html .form-group input, html .form-group select, html .form-group textarea,
    html input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), html select, html textarea { font-size: 16px; }
    /* KB tables: keep columns readable and scroll sideways inside their wrapper */
    html .article-content .table-wrap { margin: 12px -4px 16px; padding: 0 4px; }
    html .article-content .table-wrap table { min-width: 540px; }
    /* Nested article content is compact on phones */
    html .article-item.active .article-content { padding: 4px 12px 18px; }
    html .article-header, html .article-header:hover { padding: 16px 12px; }
}

@media (max-width: 480px) {
    html .logo-text { font-size: 15px; }
    html .page-header h1 { font-size: 22px; }
    html .page-header { padding-top: 104px; }
    html .articles-list { padding: 14px 10px; }
    html .article-content h4 { font-size: 15px; }
    html .article-content ul, html .article-content ol { padding-left: 20px; }
}

@media (max-width: 360px) {
    html .articles-list { padding: 12px 8px; }
    html .article-header, html .article-header:hover { padding: 14px 10px; }
}

/* Landscape phones: keep the fixed hero from swallowing the whole screen */
@media (max-height: 480px) and (orientation: landscape) {
    html .page-header { min-height: auto; padding: 96px 20px 40px; }
}
