/*
 * MedLearno Global Design System
 * ml-design-system.css — v1.0 — 2026-06
 *
 * Shared tokens, components, and utilities for all 7 portals:
 *   medlearno.in · qb · bio · che · phy · math · [institute]
 *
 * HOW TO USE:
 *   1. Add class to <body>: portal-main, portal-qb, portal-bio, portal-che, portal-phy, portal-math
 *   2. Use --pa / --pa-dk / --pa-lt / --pa-wash for the current portal's accent color
 *   3. Use ml-* classes for shared components (cards, buttons, trust strip, footer, etc.)
 */

/* ════════════════════════════════════════════════════════════
   DESIGN TOKENS
════════════════════════════════════════════════════════════ */
:root {
    /* Typography */
    --ml-font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ml-font-display: 'DM Serif Display', Georgia, serif;

    /* Brand anchor — blue MUST appear on every portal */
    --ml-blue:    #3b82f6;
    --ml-blue-dk: #1d4ed8;
    --ml-blue-lt: #60a5fa;

    /* Portal accent (defaults to brand blue; overridden per portal below) */
    --pa:      #3b82f6;
    --pa-dk:   #1d4ed8;
    --pa-lt:   #60a5fa;
    --pa-rgb:  59, 130, 246;
    --pa-wash: rgba(59, 130, 246, 0.06);

    /* Surfaces */
    --ml-white:       #ffffff;
    --ml-surface-alt: #f8fafc;
    --ml-dark:        #0f172a;
    --ml-dark-2:      #1e293b;

    /* Text */
    --ml-text:       #0f172a;
    --ml-text-2:     #475569;
    --ml-text-muted: #94a3b8;
    --ml-text-light: #cbd5e1;

    /* Cards — 16px standard, 20px feature/pathway */
    --ml-card-r:          16px;
    --ml-card-r-lg:       20px;
    --ml-card-border:     1px solid rgba(0, 0, 0, 0.07);
    --ml-card-shadow:     0 4px 20px rgba(0, 0, 0, 0.06);
    --ml-card-shadow-h:   0 14px 44px rgba(0, 0, 0, 0.13);

    /* Buttons — 10px radius (not pill-shaped) */
    --ml-btn-r: 10px;

    /* Section vertical padding */
    --ml-sp:    96px;
    --ml-sp-md: 64px;
    --ml-sp-sm: 48px;

    /* Footer */
    --ml-footer-bg:     #0f172a;
    --ml-footer-border: rgba(255, 255, 255, 0.07);

    /* Transitions */
    --ml-t:    0.25s ease;
    --ml-t-md: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --ml-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ════════════════════════════════════════════════════════════
   PORTAL ACCENT OVERRIDES
   Apply one class to <body>: portal-qb, portal-bio, etc.
════════════════════════════════════════════════════════════ */
body.portal-qb {
    --pa: #6366f1; --pa-dk: #4f46e5; --pa-lt: #818cf8;
    --pa-rgb: 99, 102, 241; --pa-wash: rgba(99, 102, 241, 0.06);
}
body.portal-bio {
    --pa: #10b981; --pa-dk: #059669; --pa-lt: #34d399;
    --pa-rgb: 16, 185, 129; --pa-wash: rgba(16, 185, 129, 0.06);
}
body.portal-che {
    --pa: #22c55e; --pa-dk: #16a34a; --pa-lt: #4ade80;
    --pa-rgb: 34, 197, 94; --pa-wash: rgba(34, 197, 94, 0.06);
}
body.portal-phy {
    --pa: #3b82f6; --pa-dk: #1d4ed8; --pa-lt: #60a5fa;
    --pa-rgb: 59, 130, 246; --pa-wash: rgba(59, 130, 246, 0.06);
}
body.portal-math {
    --pa: #ef4444; --pa-dk: #dc2626; --pa-lt: #f87171;
    --pa-rgb: 239, 68, 68; --pa-wash: rgba(239, 68, 68, 0.06);
}

/* ════════════════════════════════════════════════════════════
   BASE RESET
════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: var(--ml-font);
    color: var(--ml-text);
    background: var(--ml-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--pa); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ════════════════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════════════════ */
.ml-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

.ml-section { padding: var(--ml-sp) 0; }

/* ════════════════════════════════════════════════════════════
   SECTION HEADER
════════════════════════════════════════════════════════════ */
.ml-section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 56px;
}

.ml-section-header h2 {
    font-family: var(--ml-font-display);
    font-size: clamp(26px, 3.5vw, 42px);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ml-text);
    margin-bottom: 16px;
}

.ml-section-header p {
    font-size: 17px;
    color: var(--ml-text-2);
    line-height: 1.75;
}

/* ════════════════════════════════════════════════════════════
   BADGE (SECTION LABEL)
════════════════════════════════════════════════════════════ */
.ml-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--pa-wash);
    color: var(--pa);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(var(--pa-rgb), 0.18);
    margin-bottom: 18px;
}

/* ════════════════════════════════════════════════════════════
   CARD SYSTEM
════════════════════════════════════════════════════════════ */

/* Standard card — 16px radius */
.ml-card {
    background: var(--ml-white);
    border: var(--ml-card-border);
    border-radius: var(--ml-card-r);
    box-shadow: var(--ml-card-shadow);
    transition: transform var(--ml-t), box-shadow var(--ml-t);
}
.ml-card:hover { transform: translateY(-6px); box-shadow: var(--ml-card-shadow-h); }

/* Feature / pathway card — 20px radius */
.ml-card-lg {
    background: var(--ml-white);
    border: var(--ml-card-border);
    border-radius: var(--ml-card-r-lg);
    box-shadow: var(--ml-card-shadow);
    transition: transform var(--ml-t), box-shadow var(--ml-t);
}
.ml-card-lg:hover { transform: translateY(-6px); box-shadow: var(--ml-card-shadow-h); }

/* ════════════════════════════════════════════════════════════
   BUTTON SYSTEM — 10px radius, not pill-shaped
════════════════════════════════════════════════════════════ */
.ml-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--ml-btn-r);
    font-family: var(--ml-font);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition:
        transform var(--ml-t),
        box-shadow var(--ml-t),
        background var(--ml-t),
        border-color var(--ml-t),
        color var(--ml-t);
}
.ml-btn:active { transform: scale(0.97); transition-duration: 100ms; }

.ml-btn-primary {
    background: var(--pa);
    color: #fff;
    box-shadow: 0 4px 14px rgba(var(--pa-rgb), 0.28);
}
.ml-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--pa-rgb), 0.40);
    background: var(--pa-dk);
    color: #fff;
}

.ml-btn-outline {
    background: transparent;
    color: var(--ml-text);
    border: 1.5px solid rgba(0, 0, 0, 0.14);
}
.ml-btn-outline:hover {
    border-color: var(--pa);
    color: var(--pa);
    background: var(--pa-wash);
}

.ml-btn-lg { padding: 14px 32px; font-size: 16px; }
.ml-btn-sm { padding: 8px 18px; font-size: 13px; }

/* ════════════════════════════════════════════════════════════
   TRUST STRIP  (lives below hero on every portal)
════════════════════════════════════════════════════════════ */
.ml-trust-strip {
    background: var(--ml-white);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 28px 0;
}

.ml-trust-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.ml-trust-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 52px;
    position: relative;
}
.ml-trust-stat + .ml-trust-stat::before {
    content: '';
    position: absolute;
    left: 0; top: 15%; height: 70%;
    width: 1px;
    background: rgba(0, 0, 0, 0.08);
}

.ml-trust-val {
    font-family: var(--ml-font-display);
    font-size: 30px;
    color: var(--ml-text);
    line-height: 1;
    margin-bottom: 5px;
}

.ml-trust-lbl {
    font-size: 13px;
    color: var(--ml-text-muted);
    font-weight: 500;
}

/* ════════════════════════════════════════════════════════════
   PROOF CARD  (serif italic quotes)
════════════════════════════════════════════════════════════ */
.ml-proof-card {
    background: var(--ml-white);
    border: var(--ml-card-border);
    border-radius: var(--ml-card-r-lg);
    box-shadow: var(--ml-card-shadow);
    padding: 32px;
    transition: transform var(--ml-t), box-shadow var(--ml-t);
}
.ml-proof-card:hover { transform: translateY(-6px); box-shadow: var(--ml-card-shadow-h); }

.ml-proof-quote {
    font-family: var(--ml-font-display);
    font-style: italic;
    font-size: 16px;
    line-height: 1.75;
    color: var(--ml-text);
    margin-bottom: 24px;
}

.ml-proof-persona { display: flex; align-items: center; gap: 12px; }

.ml-proof-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pa-wash);
    color: var(--pa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    border: 1px solid rgba(var(--pa-rgb), 0.15);
}

.ml-proof-name  { font-size: 14px; font-weight: 700; color: var(--ml-text); }
.ml-proof-label { font-size: 13px; color: var(--ml-text-muted); }

/* ════════════════════════════════════════════════════════════
   FAQ ACCORDION
════════════════════════════════════════════════════════════ */
.ml-faq-wrap { max-width: 760px; margin: 0 auto; }

.ml-faq-item {
    border: var(--ml-card-border);
    border-radius: var(--ml-card-r);
    overflow: hidden;
    margin-bottom: 10px;
    background: var(--ml-white);
}

.ml-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ml-text);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    gap: 16px;
    font-family: var(--ml-font);
    transition: color var(--ml-t), background var(--ml-t);
}
.ml-faq-q:hover    { color: var(--pa); background: var(--pa-wash); }
.ml-faq-q.open     { color: var(--pa); }

.ml-faq-chevron {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform var(--ml-t);
    color: var(--ml-text-muted);
}
.ml-faq-q.open .ml-faq-chevron { transform: rotate(180deg); color: var(--pa); }

.ml-faq-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.32s ease;
}
.ml-faq-body.open { grid-template-rows: 1fr; }

.ml-faq-body-inner {
    overflow: hidden;
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--ml-text-2);
    padding: 0 24px;
    transition: padding 0.32s ease;
}
.ml-faq-body.open .ml-faq-body-inner { padding: 0 24px 20px; }

/* ════════════════════════════════════════════════════════════
   CROSS-PORTAL BRIDGE CARD
════════════════════════════════════════════════════════════ */
.ml-bridge {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    background: var(--ml-white);
    border: var(--ml-card-border);
    border-left: 3px solid var(--ml-blue);
    border-radius: var(--ml-card-r);
    box-shadow: var(--ml-card-shadow);
    text-decoration: none;
    color: var(--ml-text);
    transition: box-shadow var(--ml-t), transform var(--ml-t), border-left-color var(--ml-t);
}
.ml-bridge:hover {
    box-shadow: var(--ml-card-shadow-h);
    transform: translateX(4px);
    border-left-color: var(--pa);
    color: var(--ml-text);
}

.ml-bridge-content  { flex: 1; min-width: 0; }
.ml-bridge-pre      { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ml-text-muted); margin-bottom: 2px; }
.ml-bridge-name     { font-size: 15px; font-weight: 700; color: var(--ml-blue); }
.ml-bridge-desc     { font-size: 13px; color: var(--ml-text-2); }
.ml-bridge-arr      { font-size: 22px; color: var(--ml-blue); flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════
   FOOTER  (5-column dark — same structure all portals)
════════════════════════════════════════════════════════════ */
.ml-footer {
    background: var(--ml-footer-bg);
    color: var(--ml-text-muted);
    padding: 80px 0 32px;
}

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

.ml-footer-brand-name {
    font-size: 20px;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.3px;
    margin-bottom: 12px;
}

.ml-footer-brand-desc {
    font-size: 14px;
    line-height: 1.75;
    max-width: 260px;
    margin-bottom: 24px;
}

.ml-footer-col h4 {
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.ml-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ml-footer-col a  { color: var(--ml-text-muted); text-decoration: none; font-size: 14px; transition: color var(--ml-t); }
.ml-footer-col a:hover { color: #f1f5f9; }

.ml-footer-bottom {
    border-top: 1px solid var(--ml-footer-border);
    padding-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 16px;
}

.ml-footer-social { display: flex; gap: 10px; }

.ml-footer-soc-link {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ml-text-muted);
    text-decoration: none;
    transition: background var(--ml-t), color var(--ml-t), border-color var(--ml-t), transform var(--ml-t);
}
.ml-footer-soc-link:hover {
    background: var(--ml-blue);
    border-color: var(--ml-blue);
    color: #fff;
    transform: translateY(-2px);
}

/* ════════════════════════════════════════════════════════════
   SCROLL REVEAL  (JS adds .visible class via IntersectionObserver)
════════════════════════════════════════════════════════════ */
.ml-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.ml-reveal.visible { opacity: 1; transform: translateY(0); }

/* Staggered children — each gets its own delay once parent is visible */
.ml-stagger > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.ml-stagger.visible > *:nth-child(1)  { opacity: 1; transform: none; transition-delay: 0ms; }
.ml-stagger.visible > *:nth-child(2)  { opacity: 1; transform: none; transition-delay: 80ms; }
.ml-stagger.visible > *:nth-child(3)  { opacity: 1; transform: none; transition-delay: 160ms; }
.ml-stagger.visible > *:nth-child(4)  { opacity: 1; transform: none; transition-delay: 240ms; }
.ml-stagger.visible > *:nth-child(5)  { opacity: 1; transform: none; transition-delay: 320ms; }
.ml-stagger.visible > *:nth-child(6)  { opacity: 1; transform: none; transition-delay: 400ms; }
.ml-stagger.visible > *:nth-child(n+7){ opacity: 1; transform: none; transition-delay: 480ms; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .ml-container { padding: 0 24px; }
    :root { --ml-sp: var(--ml-sp-md); }
    .ml-footer-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
}

@media (max-width: 768px) {
    :root { --ml-sp: var(--ml-sp-sm); }
    .ml-container { padding: 0 20px; }
    .ml-trust-inner { gap: 8px; }
    .ml-trust-stat { padding: 8px 24px; }
    .ml-trust-stat + .ml-trust-stat::before { display: none; }
    .ml-footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .ml-footer-bottom { flex-direction: column; text-align: center; }
    .ml-section-header h2 { font-size: 26px; }
    .ml-section-header { margin-bottom: 40px; }
}

/* Honour reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .ml-reveal, .ml-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ════════════════════════════════════════════════════════════════════
   ════════════════════════════════════════════════════════════════════
   SHARED PORTAL CHROME
   Header, hero, drawer, tabs, chapter/PYQ/feature cards, accordions,
   comparison cards, CTA — used by every portal, themed via --pa.
   ════════════════════════════════════════════════════════════════════
   ════════════════════════════════════════════════════════════════════ */

/* ── Scroll progress ─────────────────────────────────────────────── */
#ml-scroll-progress {
    position: fixed; top: 0; left: 0; width: 0; height: 3px;
    background: var(--pa); z-index: 9999;
    transition: width .1s linear; border-radius: 0 2px 2px 0;
}

/* ── HEADER ──────────────────────────────────────────────────────── */
.ml-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 16px 0;
    transition: padding .35s ease, background .35s ease, box-shadow .35s ease;
}
.ml-header.scrolled {
    padding: 10px 0;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 4px 20px rgba(0,0,0,.06);
}
.ml-header-inner { display: flex; align-items: center; gap: 32px; }
.ml-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.ml-logo-img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.ml-logo-text {
    font-size: 20px; font-weight: 800; letter-spacing: -.4px;
    background: linear-gradient(135deg, var(--pa), #8b5cf6);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.ml-logo-text.solid {
    background: none; -webkit-text-fill-color: currentColor; color: var(--ml-text);
}
.ml-nav { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0 auto; }
.ml-nav li a {
    color: #475569; text-decoration: none; font-weight: 600; font-size: 14.5px;
    padding: 7px 14px; border-radius: 8px; transition: color .2s, background .2s; display: block;
}
.ml-nav li a:hover { color: var(--pa); background: var(--pa-wash); }
.ml-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.ml-mob-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 7px; border-radius: 8px;
}
.ml-mob-toggle span {
    display: block; width: 22px; height: 2px; background: #0f172a;
    border-radius: 2px; transition: all .3s ease; transform-origin: center;
}
.ml-mob-toggle.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.ml-mob-toggle.open span:nth-child(2){ opacity: 0; }
.ml-mob-toggle.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE DRAWER ───────────────────────────────────────────────── */
#ml-drawer-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.4); backdrop-filter: blur(4px);
    z-index: 1100; opacity: 0; transition: opacity .3s;
}
#ml-drawer-overlay.active { display: block; }
#ml-drawer-overlay.visible { opacity: 1; }
#ml-drawer {
    position: fixed; top: 0; right: -320px; width: 300px; height: 100dvh;
    background: #fff; z-index: 1200; display: flex; flex-direction: column;
    transition: right .4s cubic-bezier(.4,0,.2,1);
    box-shadow: -16px 0 48px rgba(0,0,0,.12); overflow-y: auto;
}
#ml-drawer.open { right: 0; }
.ml-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid #f1f5f9;
}
.ml-drawer-close {
    background: none; border: none; cursor: pointer; font-size: 20px;
    color: #94a3b8; padding: 4px; border-radius: 6px; transition: background .2s; line-height: 1;
}
.ml-drawer-close:hover { background: #f1f5f9; }
.ml-drawer-nav { padding: 16px 12px; flex: 1; }
.ml-drawer-nav a {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
    color: #475569; text-decoration: none; font-size: 15px; font-weight: 600;
    transition: background .2s, color .2s;
}
.ml-drawer-nav a:hover { background: var(--pa-wash); color: var(--pa); }
.ml-drawer-section { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; padding: 14px 14px 6px; }
.ml-drawer-foot { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #f1f5f9; }

/* ── HERO (two-column) ───────────────────────────────────────────── */
.ml-hero {
    min-height: 100vh; display: flex; align-items: center;
    padding: 120px 0 80px; background: #fff; position: relative; overflow: hidden;
}
/* subtle accent wash, top-right */
.ml-hero::after {
    content: ''; position: absolute; top: -200px; right: -200px;
    width: 700px; height: 700px; border-radius: 50%;
    background: radial-gradient(circle, var(--pa-wash), transparent 65%);
    pointer-events: none; z-index: 0;
}
.ml-hero > .ml-container { position: relative; z-index: 1; }
.ml-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.ml-hero-badge {
    display: inline-flex; flex-wrap: wrap; gap: 6px;
    font-size: 13px; font-weight: 600; letter-spacing: .03em; color: #475569; margin-bottom: 22px;
}
.ml-hero-pill {
    display: inline-block; padding: 4px 12px; border-radius: 999px;
    background: var(--pa-wash); color: var(--pa); font-size: 12px; font-weight: 700;
    border: 1px solid rgba(var(--pa-rgb), .18);
}
.ml-hero-h1 {
    font-family: var(--ml-font-display); font-size: clamp(34px, 4.2vw, 56px);
    font-weight: 400; line-height: 1.13; letter-spacing: -.02em; color: #0f172a; margin-bottom: 22px;
}
.ml-hero-h1 .accent { color: var(--pa); }
.ml-hero-sub { font-size: 17px; line-height: 1.75; color: #475569; margin-bottom: 36px; max-width: 520px; }
.ml-hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Generic hero "preview" card on the right */
.ml-hero-preview {
    background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: var(--ml-card-r-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,.10); overflow: hidden;
}
.ml-hero-preview-head {
    padding: 16px 20px; border-bottom: 1px solid #f1f5f9;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--pa-wash);
}
.ml-hero-preview-title { font-size: 14px; font-weight: 700; color: var(--pa); }
.ml-hero-preview-body { padding: 8px; }

/* ── EXAM / SUBJECT TABS ─────────────────────────────────────────── */
.ml-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 36px; }
.ml-tab-btn {
    padding: 9px 22px; border-radius: var(--ml-btn-r); border: 1.5px solid rgba(0,0,0,.1);
    font-size: 14px; font-weight: 600; cursor: pointer; background: #fff; color: #475569;
    font-family: inherit; transition: all .2s; position: relative;
}
.ml-tab-btn.active {
    background: var(--pa); border-color: var(--pa); color: #fff;
    box-shadow: 0 4px 14px rgba(var(--pa-rgb),.25);
}
.ml-tab-btn:not(.active):hover { border-color: var(--pa); color: var(--pa); }
.ml-tab-panel { display: none; }
.ml-tab-panel.active { display: block; }

/* ── EXAM GRID ───────────────────────────────────────────────────── */
.ml-exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ml-exam-card {
    background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 14px; padding: 16px 18px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,.04); transition: box-shadow .2s, transform .2s;
    text-decoration: none; color: inherit;
}
.ml-exam-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.09); transform: translateY(-2px); }
.ml-exam-name { font-size: 14.5px; font-weight: 700; color: #0f172a; }
.ml-exam-tag { font-size: 11.5px; color: #94a3b8; font-weight: 500; margin-top: 3px; }
.ml-exam-arrow { font-size: 14px; color: var(--pa); flex-shrink: 0; }

/* ── FEATURE GRID ────────────────────────────────────────────────── */
.ml-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ml-feature-card {
    background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 16px; padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,.05);
    transition: transform .25s ease, box-shadow .25s ease; position: relative; overflow: hidden;
}
.ml-feature-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--pa); border-radius: 16px 16px 0 0;
    transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.ml-feature-card:hover { transform: translateY(-5px); box-shadow: 0 14px 40px rgba(0,0,0,.10); }
.ml-feature-card:hover::after { transform: scaleX(1); }
.ml-feature-icon { font-size: 28px; margin-bottom: 14px; display: block; }
.ml-feature-title { font-size: 16px; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.ml-feature-desc { font-size: 14px; color: #64748b; line-height: 1.7; }

/* ── CHAPTER CARDS ───────────────────────────────────────────────── */
.ml-chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ml-chapter-card {
    background: #fff; border: 1px solid rgba(0,0,0,.07); border-left: 3px solid var(--pa);
    border-radius: 12px; padding: 16px 18px; display: flex; align-items: center; gap: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04); text-decoration: none; color: inherit;
    transition: box-shadow .2s, transform .2s;
}
.ml-chapter-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.09); transform: translateY(-2px); }
.ml-chapter-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pa); flex-shrink: 0; }
.ml-chapter-body { flex: 1; min-width: 0; }
.ml-chapter-name { font-size: 14.5px; font-weight: 700; color: #0f172a; }
.ml-chapter-meta { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.ml-chapter-count {
    font-size: 12px; font-weight: 700; color: var(--pa);
    background: var(--pa-wash); padding: 3px 10px; border-radius: 999px; flex-shrink: 0;
}

/* ── PYQ CARDS ───────────────────────────────────────────────────── */
.ml-pyq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ml-pyq-card {
    background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 16px; padding: 22px;
    box-shadow: 0 4px 20px rgba(0,0,0,.05); text-decoration: none; color: inherit;
    transition: transform .25s, box-shadow .25s;
}
.ml-pyq-card:hover { transform: translateY(-4px); box-shadow: var(--ml-card-shadow-h); }
.ml-pyq-tag {
    display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; color: var(--pa); background: var(--pa-wash);
    padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}
.ml-pyq-title { font-size: 15.5px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.ml-pyq-desc { font-size: 13px; color: #64748b; line-height: 1.6; margin-bottom: 14px; }
.ml-pyq-foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.ml-pyq-count { color: #94a3b8; font-weight: 500; }
.ml-pyq-link { color: var(--pa); font-weight: 700; }

/* ── COLLAPSIBLE UNIT GROUPS ─────────────────────────────────────── */
.ml-unit { border: 1px solid rgba(0,0,0,.07); border-radius: 16px; overflow: hidden; margin-bottom: 12px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.ml-unit-head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 24px; cursor: pointer; background: var(--pa-wash);
    border: none; width: 100%; text-align: left; font-family: inherit; transition: background .2s;
}
.ml-unit-head:hover { background: rgba(var(--pa-rgb), .1); }
.ml-unit-titlewrap { display: flex; align-items: center; gap: 12px; }
.ml-unit-title { font-size: 16px; font-weight: 700; color: #0f172a; }
.ml-unit-badge { font-size: 12px; font-weight: 700; color: var(--pa); background: #fff; padding: 3px 10px; border-radius: 999px; }
.ml-unit-chevron { width: 20px; height: 20px; color: var(--pa); transition: transform .3s; flex-shrink: 0; }
.ml-unit-head.open .ml-unit-chevron { transform: rotate(180deg); }
.ml-unit-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s ease; }
.ml-unit-body.open { grid-template-rows: 1fr; }
.ml-unit-body-inner { overflow: hidden; }
.ml-unit-body .ml-chapter-grid { padding: 18px 24px; }

/* ── COMPARISON CARDS (JEE vs NEET etc.) ─────────────────────────── */
.ml-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ml-compare-card {
    background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 20px; padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,.05);
}
.ml-compare-card.alt { background: var(--pa-wash); border-color: rgba(var(--pa-rgb), .15); }
.ml-compare-head { font-family: var(--ml-font-display); font-size: 24px; color: var(--pa); margin-bottom: 8px; }
.ml-compare-sub { font-size: 13px; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 18px; }
.ml-compare-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ml-compare-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: #475569; line-height: 1.6; }
.ml-compare-list li::before { content: '→'; color: var(--pa); font-weight: 700; flex-shrink: 0; }

/* ── MOCK TEST CARDS ─────────────────────────────────────────────── */
.ml-mock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ml-mock-card {
    background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 16px; padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,.05); text-decoration: none; color: inherit;
    transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; gap: 12px;
}
.ml-mock-card:hover { transform: translateY(-4px); box-shadow: var(--ml-card-shadow-h); }
.ml-mock-icon { font-size: 26px; }
.ml-mock-name { font-size: 16px; font-weight: 700; color: #0f172a; }
.ml-mock-meta { display: flex; gap: 14px; font-size: 12.5px; color: #94a3b8; }
.ml-mock-cta { margin-top: auto; font-size: 13.5px; font-weight: 700; color: var(--pa); }

/* ── QUALITY / FEATURED BLOCK ────────────────────────────────────── */
.ml-quality {
    background: #0f172a; border-radius: 24px; padding: 56px;
    text-align: center; position: relative; overflow: hidden;
}
.ml-quality::before {
    content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
    width: 500px; height: 300px; background: radial-gradient(circle, rgba(var(--pa-rgb),.22), transparent 70%);
    pointer-events: none;
}
.ml-quality-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.ml-quality h2 { font-family: var(--ml-font-display); font-size: clamp(24px,3vw,36px); font-weight: 400; color: #fff; margin-bottom: 16px; line-height: 1.25; }
.ml-quality p { font-size: 16px; color: #cbd5e1; line-height: 1.75; }

/* ── 3-STEP / METHOD ─────────────────────────────────────────────── */
.ml-steps-grid { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 0; align-items: start; }
.ml-step-card {
    background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,.05); padding: 36px 28px; text-align: center;
}
.ml-step-num { font-family: var(--ml-font-display); font-size: 48px; color: var(--pa); opacity: .15; line-height: 1; margin-bottom: 16px; }
.ml-step-title { font-size: 22px; font-weight: 700; color: #0f172a; margin-bottom: 12px; }
.ml-step-desc { font-size: 15px; color: #475569; line-height: 1.7; }
.ml-step-connector { display: flex; align-items: center; justify-content: center; padding: 0 16px; margin-top: 80px; color: #cbd5e1; font-size: 24px; font-weight: 300; }

/* ── FINAL CTA ───────────────────────────────────────────────────── */
.ml-cta-section { background: #fff; text-align: center; padding: var(--ml-sp) 0; position: relative; overflow: hidden; }
.ml-cta-strip { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--pa), var(--pa-lt)); }
.ml-cta-section h2 { font-family: var(--ml-font-display); font-size: clamp(30px, 4vw, 50px); font-weight: 400; letter-spacing: -.02em; color: #0f172a; margin-bottom: 16px; }
.ml-cta-section p { font-size: 17px; color: #475569; margin-bottom: 36px; max-width: 520px; margin-left: auto; margin-right: auto; line-height: 1.75; }

/* ── surface helper ──────────────────────────────────────────────── */
.ml-surface { background: var(--ml-surface-alt); }

/* ── SHARED CHROME RESPONSIVE ────────────────────────────────────── */
@media (max-width: 1100px) {
    .ml-hero-grid { gap: 40px; }
    .ml-features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .ml-steps-grid { grid-template-columns: 1fr; }
    .ml-step-connector { display: none; }
    .ml-compare-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .ml-nav { display: none !important; }
    .ml-header-actions .ml-btn-outline { display: none !important; }
    .ml-mob-toggle { display: flex !important; }
    .ml-hero { padding: 100px 0 60px; }
    .ml-hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .ml-features-grid { grid-template-columns: 1fr; }
    .ml-hero-actions { flex-direction: column; align-items: stretch; }
    .ml-hero-actions .ml-btn { width: 100%; }
}
@media (max-width: 480px) {
    .ml-exam-grid { grid-template-columns: 1fr 1fr; }
    .ml-chapter-grid { grid-template-columns: 1fr; }
    .ml-compare-card, .ml-quality { padding: 28px; }
}
