/* ==========================================================================
   examtest.in - Core Stylesheet
   Pure CSS, High Performance, Mobile-First, Accessible, Theme-Aware
   ========================================================================== */

/* --- CSS Variables & Theme Tokens --- */
:root {
    --font-main: 'Plus Jakarta Sans', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: 'JetBrains Mono', Consolas, Monaco, "Courier New", monospace;

    /* Base Neutrals (Light) */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-muted: #f1f5f9;
    --bg-elevated: #ffffff;
    --border-subtle: #e2e8f0;
    --border-medium: #cbd5e1;

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-white: #ffffff;

    /* Primary Accent */
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --primary-soft: #eff6ff;
    --primary-border: #bfdbfe;

    /* Subject Color Tokens */
    --math-color: #2563eb;
    --math-bg: #eff6ff;
    --math-border: #bfdbfe;

    --physics-color: #0f766e;
    --physics-bg: #f0fdfa;
    --physics-border: #99f6e4;

    --chemistry-color: #b45309;
    --chemistry-bg: #fffbeb;
    --chemistry-border: #fde68a;

    --ssc-color: #e11d48;
    --ssc-bg: #fff1f2;
    --ssc-border: #fecdd3;

    --police-color: #059669;
    --police-bg: #ecfdf5;
    --police-border: #a7f3d0;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.06);

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 860px;
}

/* --- Dark Theme Tokens --- */
[data-theme="dark"],
:root:not([data-theme="light"]) {
    --bg-main: #0b0f19;
    --bg-surface: #131d31;
    --bg-muted: #1e293b;
    --bg-elevated: #1a253c;
    --border-subtle: #24324d;
    --border-medium: #334155;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-soft: rgba(59, 130, 246, 0.15);
    --primary-border: rgba(59, 130, 246, 0.35);

    --math-color: #60a5fa;
    --math-bg: rgba(37, 99, 235, 0.15);
    --math-border: rgba(59, 130, 246, 0.35);

    --physics-color: #2dd4bf;
    --physics-bg: rgba(15, 118, 110, 0.15);
    --physics-border: rgba(45, 212, 191, 0.35);

    --chemistry-color: #fbbf24;
    --chemistry-bg: rgba(180, 83, 9, 0.15);
    --chemistry-border: rgba(251, 191, 36, 0.35);

    --ssc-color: #fb7185;
    --ssc-bg: rgba(225, 29, 72, 0.15);
    --ssc-border: rgba(251, 113, 133, 0.35);

    --police-color: #34d399;
    --police-bg: rgba(5, 150, 105, 0.15);
    --police-border: rgba(52, 211, 153, 0.35);

    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 8px -1px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 12px 20px -3px rgb(0 0 0 / 0.6);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-muted: #f1f5f9;
    --bg-elevated: #ffffff;
    --border-subtle: #e2e8f0;
    --border-medium: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --primary-soft: #eff6ff;
    --primary-border: #bfdbfe;
    --math-color: #2563eb;
    --math-bg: #eff6ff;
    --math-border: #bfdbfe;
    --physics-color: #0f766e;
    --physics-bg: #f0fdfa;
    --physics-border: #99f6e4;
    --chemistry-color: #b45309;
    --chemistry-bg: #fffbeb;
    --chemistry-border: #fde68a;
    --ssc-color: #e11d48;
    --ssc-bg: #fff1f2;
    --ssc-border: #fecdd3;
    --police-color: #059669;
    --police-bg: #ecfdf5;
    --police-border: #a7f3d0;
}

/* --- Base Reset & Typography --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

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

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

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

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

body.menu-open {
    overflow: hidden;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--primary);
    color: white;
    padding: 10px 16px;
    z-index: 1000;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 15px;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

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

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

/* --- Buttons & UI Elements --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 10px 20px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.25;
}

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

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

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.btn-secondary:hover {
    background-color: var(--bg-muted);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-medium);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-soft);
}

.btn-google-play {
    background-color: #0f172a;
    color: #ffffff;
    border-color: #334155;
}

.btn-google-play:hover {
    background-color: #1e293b;
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.category-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.badge-blue, .badge-math { background: var(--math-bg); color: var(--math-color); border: 1px solid var(--math-border); }
.badge-teal, .badge-physics { background: var(--physics-bg); color: var(--physics-color); border: 1px solid var(--physics-border); }
.badge-amber, .badge-chemistry { background: var(--chemistry-bg); color: var(--chemistry-color); border: 1px solid var(--chemistry-border); }
.badge-rose, .badge-ssc-gd { background: var(--ssc-bg); color: var(--ssc-color); border: 1px solid var(--ssc-border); }
.badge-emerald, .badge-up-police { background: var(--police-bg); color: var(--police-color); border: 1px solid var(--police-border); }

.icon-blue { background: var(--math-bg); color: var(--math-color); }
.icon-teal { background: var(--physics-bg); color: var(--physics-color); }
.icon-amber { background: var(--chemistry-bg); color: var(--chemistry-color); }
.icon-rose { background: var(--ssc-bg); color: var(--ssc-color); }
.icon-emerald { background: var(--police-bg); color: var(--police-color); }

.sub-badge {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 600;
}

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

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.brand-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    object-fit: contain;
    flex-shrink: 0;
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: inline-flex;
    align-items: baseline;
}

.brand-name .brand-tld {
    color: var(--primary);
    font-weight: 800;
}

.desktop-nav {
    display: none;
}

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

.nav-list {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background-color: var(--primary-soft);
}

.nav-item-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none;
    min-width: 220px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 200;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}

.dropdown-menu li a:hover {
    background-color: var(--bg-muted);
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-muted);
    color: var(--primary);
}

.theme-toggle-btn .sun-icon { display: none; }
.theme-toggle-btn .moon-icon { display: block; }
[data-theme="dark"] .theme-toggle-btn .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle-btn .moon-icon { display: none; }

.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-sm);
}

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

.mobile-toggle .bar {
    width: 22px;
    height: 2.5px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.mobile-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.mobile-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav-backdrop {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.nav-backdrop.active { opacity: 1; }

.mobile-nav {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 99;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-link {
    display: block;
    padding: 10px 14px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}

.mobile-link:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.mobile-group-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    padding: 10px 14px 4px;
}

/* --- Hero Section --- */
.hero-section {
    padding: 60px 0 40px;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-main) 100%);
    border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 992px) {
    .hero-grid {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 60px;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--primary-soft);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .hero-title { font-size: 3rem; }
}

.highlight-text {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 620px;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 36px;
}

.hero-metrics {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.metric-item {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.metric-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.metric-divider {
    width: 1px;
    height: 36px;
    background-color: var(--border-subtle);
}

/* Hero Visual Card */
.visual-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.visual-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border-subtle);
}

.visual-header-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.visual-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.visual-links {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-link-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.quick-link-pill:hover {
    transform: translateX(4px);
}

.pill-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pill-math { background: var(--math-bg); color: var(--math-color); border-color: var(--math-border); }
.pill-math .pill-dot { background: var(--math-color); }
.pill-physics { background: var(--physics-bg); color: var(--physics-color); border-color: var(--physics-border); }
.pill-physics .pill-dot { background: var(--physics-color); }
.pill-chemistry { background: var(--chemistry-bg); color: var(--chemistry-color); border-color: var(--chemistry-border); }
.pill-chemistry .pill-dot { background: var(--chemistry-color); }
.pill-ssc { background: var(--ssc-bg); color: var(--ssc-color); border-color: var(--ssc-border); }
.pill-ssc .pill-dot { background: var(--ssc-color); }
.pill-police { background: var(--police-bg); color: var(--police-color); border-color: var(--police-border); }
.pill-police .pill-dot { background: var(--police-color); }

.visual-footer {
    padding: 14px 20px;
    background: var(--bg-muted);
    border-top: 1px solid var(--border-subtle);
}

.visual-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.visual-tip .tip-icon {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- Section Layout & Headers --- */
.section {
    padding: 64px 0;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 48px;
}

.section-tag {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Apps Grid --- */
.apps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

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

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

.app-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.app-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-medium);
}

.app-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.app-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-card-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.app-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.app-card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 18px;
    flex-grow: 1;
}

.app-card-highlights {
    list-style: none;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-card-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.app-card-highlights svg {
    color: #10b981;
    flex-shrink: 0;
    margin-top: 2px;
}

.app-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.app-card-details-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background-color 0.15s ease;
    text-align: center;
}

.app-card-details-link:hover {
    color: var(--primary);
    background-color: var(--bg-muted);
}

/* --- Resource Cards Grid --- */
.resource-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

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

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

.resource-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

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

.res-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.res-icon { font-size: 1.5rem; }

.res-card-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.resource-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.res-topics-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.res-topics-list a {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 4px 8px;
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.res-topics-list a:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.res-view-link {
    margin-top: auto;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
}

/* --- Articles Section --- */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

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

.article-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

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

.article-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.article-category {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
}

.article-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.article-title a {
    color: var(--text-primary);
}

.article-title a:hover {
    color: var(--primary);
}

.article-excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 18px;
    flex-grow: 1;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.article-author { color: var(--text-muted); }
.article-read-more { font-weight: 700; color: var(--primary); }

/* --- FAQs Accordion --- */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-question {
    padding: 18px 24px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
    content: "+";
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-muted);
}

.faq-item[open] .faq-question::after {
    content: "−";
}

.faq-answer {
    padding: 0 24px 20px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- App Detail Page --- */
.app-hero-section {
    padding: 40px 0 60px;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-main) 100%);
    border-bottom: 1px solid var(--border-subtle);
}

.app-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 24px;
}

@media (min-width: 992px) {
    .app-hero-grid { grid-template-columns: 1.2fr 0.8fr; }
}

.app-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.app-hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.app-hero-tagline {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
}

.app-hero-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.app-compliance-callout {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-muted);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.app-hero-cta {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.play-btn-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.1;
}

.play-btn-text small { font-size: 0.6875rem; letter-spacing: 0.05em; opacity: 0.85; }
.play-btn-text strong { font-size: 1.125rem; }

.app-specs-inline {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* App Hero Device Preview Mockup */
.app-hero-mockup {
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-preview-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-card-header {
    padding: 16px 20px;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-app-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-app-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-app-meta {
    display: flex;
    flex-direction: column;
}

.preview-app-title {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.preview-badge {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.preview-status-pill {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #166534;
    background: #dcfce7;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

[data-theme="dark"] .preview-status-pill {
    background: #14532d;
    color: #86efac;
}

.preview-card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.preview-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: var(--bg-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.preview-search-icon {
    flex-shrink: 0;
    color: var(--text-muted);
}

.preview-pill-tabs {
    display: flex;
    gap: 6px;
}

.preview-pill {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--bg-muted);
    color: var(--text-secondary);
}

.preview-pill.active {
    background: var(--primary);
    color: white;
}

.preview-items-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.preview-item {
    padding: 12px 14px;
    background: var(--bg-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.preview-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.preview-item-tag {
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}

.preview-item-label {
    font-size: 0.625rem;
    color: var(--text-muted);
}

.preview-item-text {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.preview-card-footer {
    padding: 12px 20px;
    background: var(--bg-muted);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.preview-footer-feature {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Features Layout */
.features-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 992px) {
    .features-layout { grid-template-columns: 1fr 340px; }
}

.content-block {
    margin-bottom: 40px;
}

.content-block h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.content-block p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.features-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

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

.feature-box {
    display: flex;
    gap: 14px;
    padding: 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.feature-icon-wrap {
    color: var(--primary);
    flex-shrink: 0;
}

.feature-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.feature-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.audience-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audience-checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.check-icon {
    color: #10b981;
    font-weight: 700;
}

/* Sidebar Box */
.sidebar-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.sidebar-box h3, .sidebar-box h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.sidebar-box p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.sidebar-resource-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-resource-list a {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    color: var(--text-secondary);
}

.sidebar-resource-list a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

/* Download Banner */
.download-banner-section {
    padding: 40px 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
}

.banner-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .banner-box {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.banner-text h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.banner-text p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* --- Resource Subject View --- */
.page-header-section {
    padding: 36px 0 28px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
}

.header-badge-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.6;
}

.header-action-row {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-print, .btn-whatsapp, .btn-native-share {
    background: var(--bg-surface);
    border-color: var(--border-medium);
    color: var(--text-secondary);
}

.btn-whatsapp { color: #16a34a; border-color: #86efac; }
.btn-whatsapp:hover { background: #16a34a; color: white; border-color: #16a34a; }

/* Subject Switcher */
.subject-switcher-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.subject-switcher-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.subject-switcher-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.subject-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.subject-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Layout With Sidebar */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 32px;
}

@media (min-width: 992px) {
    .layout-with-sidebar { grid-template-columns: 1fr 320px; }
}

/* Formula Live Filter */
.formula-filter-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.search-input-box {
    position: relative;
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.formula-filter-input {
    width: 100%;
    padding: 10px 36px 10px 38px;
    font-size: 0.9375rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background-color: var(--bg-muted);
    color: var(--text-primary);
}

.formula-filter-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--bg-surface);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.search-clear-btn {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
}

.filter-count-badge {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Empty State */
.formula-empty-state {
    background: var(--bg-surface);
    border: 1.5px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    margin-bottom: 32px;
}

.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.empty-state-desc { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 16px; }

/* Formula Cards */
.content-section-box {
    margin-bottom: 40px;
}

.section-title-sm {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.section-desc-sm {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.formula-cards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.formula-item-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.formula-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.formula-name {
    font-size: 1rem;
    font-weight: 700;
}

.btn-copy-formula {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    border: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-copy-formula:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.btn-copy-formula.copied {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.formula-display {
    padding: 14px 18px;
    background: var(--bg-muted);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow-x: auto;
}

.formula-equations-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
}

.math-equation {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Cambria Math", "Times New Roman", serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    display: inline-block;
}

[data-theme="dark"] .formula-display {
    background: #1e293b;
}

.formula-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* In-Content Micro CTA */
.in-content-cta {
    margin: 28px 0;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.in-content-cta-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 640px) {
    .in-content-cta-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.cta-micro-badge {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 4px;
}

.in-content-cta-text h4 { font-size: 1.125rem; font-weight: 700; margin-bottom: 4px; }
.in-content-cta-text p { font-size: 0.875rem; color: var(--text-secondary); margin: 0; }

/* Exam Pattern & PYQs */
.exam-pattern-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.pattern-stat-card {
    padding: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.negative-marking-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    color: #92400e;
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.negative-marking-notice .notice-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: #d97706;
}

[data-theme="dark"] .negative-marking-notice {
    background: rgba(180, 83, 9, 0.2);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fbbf24;
}

[data-theme="dark"] .negative-marking-notice .notice-icon {
    color: #fbbf24;
}

.pattern-table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

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

.data-table th {
    background: var(--bg-muted);
    font-weight: 700;
}

/* PYQ Card */
.pyq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pyq-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.pyq-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.pyq-subject-badge {
    font-weight: 700;
    color: var(--primary);
}

.pyq-question-text {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 18px;
}

.pyq-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

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

.pyq-option-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pyq-option-btn:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.pyq-option-btn.is-correct {
    background: #dcfce7 !important;
    border-color: #86efac !important;
    color: #14532d !important;
}

.pyq-option-btn.is-incorrect {
    background: #ffe4e6 !important;
    border-color: #fecdd3 !important;
    color: #9f1239 !important;
}

.option-marker {
    font-weight: 700;
    font-size: 0.875rem;
}

.pyq-interactive-feedback {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 14px;
}

.pyq-interactive-feedback.correct {
    background: #dcfce7;
    color: #14532d;
    border: 1px solid #86efac;
}

.pyq-interactive-feedback.incorrect {
    background: #ffe4e6;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.pyq-solution-toggle summary {
    cursor: pointer;
    list-style: none;
}

.pyq-solution-body {
    margin-top: 14px;
    padding: 16px;
    background: var(--bg-muted);
    border-left: 3px solid #10b981;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.875rem;
}

.correct-answer {
    color: #047857;
    margin-bottom: 6px;
}

/* Sidebar App Widget */
.sidebar-app-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.widget-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--primary-soft);
    color: var(--primary);
    margin-bottom: 10px;
}

.sidebar-app-widget h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.sidebar-app-widget p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.widget-feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.widget-details-link {
    display: block;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-top: 12px;
}

.toc-box h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.toc-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toc-links a {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 4px 0;
    display: block;
}

.toc-links a:hover { color: var(--primary); }

/* Mobile Sticky Dock */
.mobile-sticky-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding: 10px 16px;
    box-shadow: var(--shadow-lg);
    z-index: 90;
    transform: translateY(100%);
    transition: transform 0.25s ease;
}

.mobile-sticky-dock.visible {
    transform: translateY(0);
}

@media (min-width: 992px) {
    .mobile-sticky-dock { display: none; }
}

.mobile-dock-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dock-app-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dock-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.dock-text strong { font-size: 0.875rem; }
.dock-sub { font-size: 0.75rem; color: var(--text-muted); }

/* --- Blog & Articles --- */
.articles-grid-large {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 860px;
    margin: 0 auto;
}

.article-card-large {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.article-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.article-title-lg {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.article-title-lg a { color: var(--text-primary); }
.article-title-lg a:hover { color: var(--primary); }

.article-excerpt-lg {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.article-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.author-badge { font-size: 0.8125rem; color: var(--text-muted); }

/* Article Detail */
.article-container-narrow {
    max-width: 760px;
}

.article-header {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-subtle);
}

.article-main-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.article-lead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.article-author-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 42px;
    height: 42px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.author-info {
    display: flex;
    flex-direction: column;
    font-size: 0.8125rem;
}

.author-info strong { color: var(--text-primary); }
.author-info span { color: var(--text-muted); }

.article-body {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

.article-section-block {
    margin-bottom: 32px;
}

.article-section-block h2 {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.article-share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 24px;
    padding: 16px 20px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.share-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.article-app-cta {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 40px 0;
}

.cta-tag {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 6px;
}

.article-app-cta h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.article-app-cta p { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 18px; }

.article-footer-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

/* --- Resource Hub View --- */
.resource-hub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

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

.hub-subject-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.hub-card-header {
    margin-bottom: 12px;
}

.hub-category-tag {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: 8px;
}

.hub-subject-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.hub-subject-title a { color: var(--text-primary); }
.hub-subject-title a:hover { color: var(--primary); }

.hub-subject-intro {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.hub-topics-preview {
    margin-bottom: 24px;
}

.hub-topics-preview h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.hub-topics-preview ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hub-topics-preview li a {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    color: var(--text-secondary);
}

.hub-topics-preview li a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.count-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.exam-pattern-mini-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8125rem;
}

.mini-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
}

.hub-card-footer {
    margin-top: auto;
}

.apps-grid-compact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .apps-grid-compact { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .apps-grid-compact { grid-template-columns: repeat(5, 1fr); }
}

.app-compact-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.compact-info h4 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 4px; }
.compact-info p { font-size: 0.75rem; color: var(--text-muted); }

/* --- Legal & Contact Pages --- */
.legal-content-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.compliance-callout-lg {
    display: flex;
    gap: 18px;
    padding: 24px;
    background-color: var(--bg-muted);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
}

.compliance-callout-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.compliance-callout-lg h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.compliance-callout-lg p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.legal-last-updated {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.legal-section-block {
    margin-bottom: 28px;
}

.legal-section-block h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.legal-section-block p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.legal-sources-list {
    margin: 14px 0 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal-quick-switch {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.legal-switch-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.legal-switch-links a {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    color: var(--text-secondary);
}

.legal-switch-links a.active {
    background: var(--primary);
    color: white;
}

/* Contact */
.contact-details-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-channel-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.channel-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.channel-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.channel-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.notice-channel-card {
    background-color: var(--bg-muted);
}

.notice-channel-card .channel-content p {
    margin-bottom: 0;
}

/* --- 404 Error Page --- */
.error-page-section {
    padding: 80px 0;
}

.error-badge {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--ssc-bg);
    color: var(--ssc-color);
    margin-bottom: 16px;
}

.error-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.error-desc {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 28px;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.error-helpful-links h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.helpful-links-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.helpful-links-grid a {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 8px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.helpful-links-grid a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    margin-bottom: 18px;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
}

.breadcrumbs li + li::before {
    content: "/";
    color: var(--text-muted);
    margin-right: 8px;
}

.breadcrumbs a {
    color: var(--text-muted);
}

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

.breadcrumbs span[aria-current="page"] {
    color: var(--text-secondary);
    font-weight: 600;
}

/* --- Footer --- */
.site-footer {
    background-color: #0f172a;
    color: #cbd5e1;
    padding: 64px 0 32px;
    margin-top: auto;
}

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

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

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

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

.footer-brand .brand-name {
    font-size: 1.25rem;
    color: #ffffff;
}

.footer-brand .brand-tld {
    color: #60a5fa;
}

.footer-desc {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 14px 0 20px;
}

.footer-badge-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trust-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    background: #1e293b;
    color: #e2e8f0;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    width: fit-content;
}

.footer-heading {
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.875rem;
    transition: color 0.15s ease;
}

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

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding-top: 32px;
    border-top: 1px solid #1e293b;
    font-size: 0.8125rem;
    color: #64748b;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* Floating Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--text-primary);
    color: white;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 95;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.15s ease;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background-color: var(--primary);
}

@media (max-width: 991px) {
    .back-to-top-btn {
        bottom: 20px;
        right: 16px;
    }
    body.dock-visible .back-to-top-btn {
        bottom: 76px;
    }
}

/* ==========================================================================
   Audience Fork Section & Post-Quiz CTA Box
   ========================================================================== */
.audience-fork-section {
    padding: 36px 0 20px;
}

.audience-fork-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .audience-fork-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.fork-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.fork-stem {
    border-top: 4px solid var(--math-color, #2563eb);
}

.fork-gov {
    border-top: 4px solid var(--ssc-color, #e11d48);
}

.fork-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.fork-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fork-stem .fork-tag { color: var(--math-color, #2563eb); }
.fork-gov .fork-tag { color: var(--ssc-color, #e11d48); }

.fork-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fork-stem .fork-icon { background: var(--math-bg, #eff6ff); color: var(--math-color, #2563eb); }
.fork-gov .fork-icon { background: var(--ssc-bg, #fff1f2); color: var(--ssc-color, #e11d48); }

.fork-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.fork-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.fork-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Post-Quiz Action Trigger Box */
.post-quiz-cta-box {
    margin-top: 32px;
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-muted) 100%);
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
}

.quiz-cta-badge {
    display: inline-block;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 4px 12px;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.post-quiz-cta-box h3 {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.post-quiz-cta-box p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.quiz-cta-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.cta-micro-guarantee {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ==========================================================================
   Print Stylesheet (@media print) for PDF Cheat Sheets
   ========================================================================== */
@media print {
    *, *::before, *::after {
        background: transparent !important;
        color: #000000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-size: 11pt;
        line-height: 1.4;
        background: #ffffff !important;
    }

    .site-header,
    .mobile-nav,
    .mobile-sticky-dock,
    .in-content-cta,
    .resource-sidebar,
    .header-action-row,
    .formula-filter-wrap,
    .btn-copy-formula,
    .site-footer {
        display: none !important;
    }

    .layout-with-sidebar {
        display: block !important;
    }

    .resource-main {
        width: 100% !important;
        max-width: 100% !important;
    }

    .page-header-section {
        padding: 10px 0 !important;
        border-bottom: 2px solid #000000;
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 18pt !important;
    }

    .formula-item-card {
        page-break-inside: avoid;
        border: 1px solid #cccccc !important;
        margin-bottom: 12px !important;
        padding: 10px !important;
    }

    .formula-code,
    .math-equation {
        font-size: 11pt !important;
        font-weight: bold;
    }

    .formula-section-block {
        page-break-before: auto;
    }

    body::after {
        content: "examtest.in — Free educational formula sheets and Android apps";
        display: block;
        text-align: center;
        font-size: 9pt;
        border-top: 1px solid #999999;
        margin-top: 24px;
        padding-top: 8px;
    }
}
