/* =========================================================
   gexam.in — Tamil Scholar Editorial
   ---------------------------------------------------------
   Aesthetic: literary journal + scholarly study room.
   Palette : maroon (--gx-maroon) + saffron (--gx-saffron)
             on parchment cream (--gx-bg).
   Typography:
     Display : Fraunces (variable serif, optical-size)
     Body    : Plus Jakarta Sans (Latin) + Hind Madurai (Tamil)
     Tabular : JetBrains Mono (numbers, timer, year stamps)
   ========================================================= */

:root {
    /* core palette */
    --gx-maroon:   #7B1E26;
    --gx-maroon-d: #5C161D;
    --gx-maroon-l: #A62B36;
    --gx-saffron:  #E8A33D;
    --gx-saffron-d:#C5871F;
    --gx-green:    #15803D;
    --gx-green-d:  #14532D;
    --gx-charcoal: #18181B;
    --gx-ink:      #27272A;

    /* surfaces */
    --gx-bg:       #FBF6EB;   /* parchment cream */
    --gx-bg-2:     #F5EFE0;   /* deeper cream for stripes */
    --gx-card:     #FFFEF9;   /* warmer than white */
    --gx-paper:    #FFFCF2;   /* paper card highlight */
    --gx-muted:    #6B6360;
    --gx-border:   #E7DECB;
    --gx-rule:     #D9CDB4;   /* darker rule for editorial dividers */

    /* gradients */
    --gx-hero-grad: linear-gradient(140deg, #5C161D 0%, #7B1E26 35%, #A62B36 65%, #E8A33D 100%);

    /* type stacks — Catamaran (designed for Tamil+Latin) primary; Noto Sans Tamil fallback */
    --font-tamil:    'Mukta Malar', 'Catamaran', 'Noto Sans Tamil', 'Hind Madurai', system-ui, sans-serif;
    --font-latin:    'Mukta Malar', 'Catamaran', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-display:  'Fraunces', 'Catamaran', 'Plus Jakarta Sans', Georgia, serif;
    --font-mono:     'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* radii + shadow */
    --gx-r-sm: 6px;
    --gx-r:    12px;
    --gx-r-lg: 18px;
    --gx-shadow-1: 0 1px 0 rgba(24,24,27,.04), 0 4px 14px rgba(123,30,38,.06);
    --gx-shadow-2: 0 2px 0 rgba(24,24,27,.05), 0 16px 36px rgba(123,30,38,.10);
}

/* =====================  RESET & BASE  ===================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-tamil);
    color: var(--gx-ink);
    background: var(--gx-bg);
    background-image:
        radial-gradient(circle at 100% 0%, rgba(232,163,61,.06), transparent 35%),
        radial-gradient(circle at 0% 100%, rgba(123,30,38,.04), transparent 40%);
    background-attachment: fixed;
    font-size: 16.5px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection { background: rgba(232,163,61,.35); color: var(--gx-charcoal); }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 {
    font-family: var(--font-display);
    color: var(--gx-charcoal);
    font-weight: 600;
    font-variation-settings: "opsz" 144, "SOFT" 30;
    line-height: 1.12;
    letter-spacing: -0.015em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); }

p { margin: 0 0 1.1em; }

:lang(ta), [lang="ta"] {
    font-family: var(--font-tamil);
    line-height: 1.85;
    word-break: normal;
    overflow-wrap: break-word;
    letter-spacing: -0.005em;
}

a {
    color: var(--gx-maroon);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .18s;
}
a:hover { color: var(--gx-saffron-d); }

/* numbers in mono */
.gx-num, .gx-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ===== icons ===== */
.gx-icon {
    width: 1em; height: 1em;
    display: inline-block;
    vertical-align: -0.15em;
    fill: none; stroke: currentColor;
    flex-shrink: 0;
}
.gx-icon-md { width: 1.25em; height: 1.25em; vertical-align: -0.22em; }
.gx-icon-lg { width: 2rem; height: 2rem; }
.gx-icon-xl { width: 2.5rem; height: 2.5rem; }
.gx-icon.spin { animation: gx-spin 1.1s linear infinite; }
@keyframes gx-spin { to { transform: rotate(360deg); } }

/* =====================  NAV  ============================== */

#navigation {
    background: rgba(251,246,235,0.92);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--gx-border);
    padding: .9rem 0;
    position: sticky; top: 0;
    z-index: 100;
}
#navigation, #navigation * { font-family: var(--font-latin); }

.site-logo a {
    display: inline-flex; align-items: center;
    font-family: var(--font-latin);
    font-weight: 800;
    font-style: normal;
    font-size: 1.55rem;
    line-height: 1;
    color: var(--gx-maroon);
    text-decoration: none;
    letter-spacing: -0.025em;
}
.site-logo a span { color: var(--gx-saffron-d); font-weight: 800; }

#main-menu ul { list-style: none; display: flex; gap: 1.7rem; margin: 0; padding: 0; }
#main-menu a {
    font-weight: 600; font-size: .96rem;
    color: var(--gx-charcoal);
    text-decoration: none;
    letter-spacing: .005em;
    position: relative;
    padding-bottom: 2px;
}
#main-menu a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
    height: 1.5px; background: var(--gx-maroon);
    transform: scaleX(0); transform-origin: left;
    transition: transform .22s ease;
}
#main-menu a:hover { color: var(--gx-maroon); }
#main-menu a:hover::after { transform: scaleX(1); }

/* =====================  BUTTONS  ========================== */

.btn_one, .btn_two, .header-btn, .subscribe__btn {
    background: var(--gx-maroon) !important;
    border-color: var(--gx-maroon) !important;
    color: #fff !important;
    font-family: var(--font-latin);
    font-weight: 600;
    border-radius: var(--gx-r-sm);
    padding: .7rem 1.3rem;
    transition: all .2s ease;
}

.gx-btn-cta {
    display: inline-flex; align-items: center; gap: .55rem;
    background: var(--gx-green);
    color: #fff !important;
    font-family: var(--font-latin);
    font-weight: 600;
    font-size: .96rem;
    border: none;
    border-radius: var(--gx-r-sm);
    padding: .85rem 1.55rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 6px 14px rgba(21,128,61,.18);
    letter-spacing: .005em;
}
.gx-btn-cta:hover {
    background: var(--gx-green-d);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 12px 22px rgba(21,128,61,.25);
    text-decoration: none;
}
.gx-btn-outline {
    display: inline-flex; align-items: center; gap: .55rem;
    background: transparent;
    color: var(--gx-maroon);
    border: 1.5px solid var(--gx-maroon);
    font-family: var(--font-latin);
    font-weight: 600; font-size: .94rem;
    border-radius: var(--gx-r-sm);
    padding: .75rem 1.4rem;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s ease;
}
.gx-btn-outline:hover {
    background: var(--gx-maroon);
    color: #fff !important;
    text-decoration: none;
    border-color: var(--gx-maroon);
}

/* =====================  HERO  ============================= */

.gx-hero {
    position: relative;
    color: #fff;
    padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(4rem, 9vw, 7rem);
    overflow: hidden;
    background: var(--gx-hero-grad);
    isolation: isolate;
}
/* grain + atmospheric overlay */
.gx-hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        radial-gradient(ellipse 60% 40% at 85% 15%, rgba(255,255,255,.18), transparent 65%),
        radial-gradient(ellipse 50% 50% at 15% 90%, rgba(232,163,61,.30), transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.gx-hero::after {
    content: "";
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.13 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: .55;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}
.gx-hero > .container { position: relative; z-index: 2; }

.gx-hero h1 {
    color: #fff;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(2rem, 4.2vw, 3.4rem);
    line-height: 1.12;
    letter-spacing: -0.022em;
    margin: 0 0 1rem;
    font-variation-settings: "opsz" 144, "SOFT" 60;
    max-width: 20ch;
}
.gx-hero h1[lang="ta"] {
    font-family: var(--font-tamil);
    font-style: normal;
    font-weight: 700;
    font-size: clamp(1.7rem, 3.6vw, 2.7rem);
    line-height: 1.32;
    letter-spacing: -0.012em;
    max-width: 17ch;
}

.gx-hero-en {
    display: inline-flex; align-items: center; gap: .65rem;
    color: rgba(255,255,255,.78);
    font-family: var(--font-mono);
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin: 0 0 1.6rem;
}
.gx-hero-en::before {
    content: ""; width: 28px; height: 1px;
    background: rgba(255,255,255,.55);
}

.gx-hero-sub {
    color: rgba(255,255,255,.92);
    font-size: 1.075rem;
    margin: 0 0 2rem;
    max-width: 56ch;
    line-height: 1.65;
}

.gx-hero-stats {
    display: flex; gap: 2.5rem; margin-top: 2.8rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.18);
    flex-wrap: wrap;
}
.gx-hero-stat strong {
    display: block;
    font-family: var(--font-mono);
    font-feature-settings: "tnum";
    font-size: 2.1rem;
    line-height: 1;
    color: #fff;
    font-weight: 600;
    letter-spacing: -.03em;
}
.gx-hero-stat span {
    color: rgba(255,255,255,.75);
    font-size: .76rem;
    font-family: var(--font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-top: .4rem;
    display: inline-block;
}

/* hero side card */
.gx-hero-card {
    background: rgba(255,254,249,.10);
    border: 1px solid rgba(255,254,249,.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--gx-r-lg);
    padding: 2rem 1.9rem;
    color: #fff;
}
.gx-hero-card .gx-eyebrow {
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: rgba(255,254,249,.78);
    margin-bottom: .65rem;
    display: flex; align-items: center; gap: .5rem;
}
.gx-hero-card .gx-eyebrow::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--gx-saffron); box-shadow: 0 0 0 4px rgba(232,163,61,.25);
    animation: gxPulse 2.4s infinite ease-out;
}
@keyframes gxPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(232,163,61,.25); }
    50%      { box-shadow: 0 0 0 9px rgba(232,163,61,.0); }
}
.gx-hero-card h3 {
    color: #fff;
    font-family: var(--font-display);
    font-weight: 500;
    font-style: italic;
    font-size: 1.6rem;
    margin: 0 0 .35rem;
}
.gx-hero-card .gx-card-meta {
    color: rgba(255,254,249,.78);
    font-family: var(--font-mono); font-size: .82rem;
    margin: 0 0 1rem;
    letter-spacing: .03em;
}
.gx-hero-card .gx-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.gx-hero-card .gx-tags span {
    background: rgba(255,254,249,.13);
    border: 1px solid rgba(255,254,249,.16);
    padding: .25rem .65rem;
    border-radius: 50px;
    font-family: var(--font-mono); font-size: .7rem;
    letter-spacing: .05em;
    color: rgba(255,254,249,.92);
    text-transform: uppercase;
}
.gx-hero-card a.gx-card-cta {
    display: inline-flex; align-items: center; gap: .5rem;
    background: #fff; color: var(--gx-maroon);
    font-family: var(--font-latin); font-weight: 600;
    font-size: .94rem;
    border-radius: var(--gx-r-sm);
    padding: .8rem 1.35rem;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .2s ease;
}
.gx-hero-card a.gx-card-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
    color: var(--gx-maroon);
    text-decoration: none;
}

/* =====================  GROUP BADGES  ===================== */

.gx-group-badges {
    display: flex; gap: .45rem; flex-wrap: wrap;
}
.gx-group-badge {
    background: rgba(255,254,249,.15);
    border: 1px solid rgba(255,254,249,.32);
    color: rgba(255,254,249,.95);
    font-family: var(--font-mono); font-weight: 500;
    font-size: .72rem;
    padding: .35rem .8rem;
    border-radius: 50px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.gx-group-badge.live {
    background: #fff;
    color: var(--gx-maroon);
    border-color: #fff;
    font-weight: 600;
}

/* =====================  SECTIONS  ========================= */

.gx-section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.gx-section.alt-bg { background: var(--gx-card); border-top: 1px solid var(--gx-border); border-bottom: 1px solid var(--gx-border); }

.gx-section-title { text-align: center; margin-bottom: 3.2rem; }
.gx-section-title .gx-en {
    color: var(--gx-maroon);
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: .15em;
    text-transform: uppercase;
    font-size: .76rem;
    margin-bottom: .9rem;
    display: inline-flex; align-items: center; gap: .65rem;
}
.gx-section-title .gx-en::before, .gx-section-title .gx-en::after {
    content: ""; display: inline-block; width: 18px; height: 1px;
    background: var(--gx-rule);
}
.gx-section-title h2 {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    color: var(--gx-charcoal);
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.018em;
    margin: 0;
}
.gx-section-title h2[lang="ta"] {
    font-family: var(--font-tamil);
    font-style: normal;
    font-weight: 700;
    letter-spacing: -0.012em;
}

/* =====================  FEATURES  ========================= */

.gx-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.4rem;
}
.gx-feature {
    background: var(--gx-card);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-r);
    padding: 2rem 1.7rem;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    position: relative;
}
.gx-feature::before {
    content: ""; position: absolute; top: 0; left: 1.7rem; right: 1.7rem; height: 3px;
    background: var(--gx-maroon);
    transform: scaleX(0); transform-origin: left;
    transition: transform .3s ease;
}
.gx-feature:hover {
    transform: translateY(-3px);
    border-color: var(--gx-rule);
    box-shadow: var(--gx-shadow-2);
}
.gx-feature:hover::before { transform: scaleX(1); }
.gx-feature-icon {
    width: 52px; height: 52px;
    display: grid; place-items: center;
    border-radius: var(--gx-r-sm);
    font-size: 1.35rem; color: #fff;
    background: var(--gx-maroon);
    margin-bottom: 1.1rem;
}
.gx-feature-icon.saffron { background: var(--gx-saffron); color: var(--gx-charcoal); }
.gx-feature-icon.green   { background: var(--gx-green); }
.gx-feature h3 {
    font-family: var(--font-tamil);
    font-style: normal;
    font-weight: 700;
    font-size: 1.18rem;
    margin: 0 0 .25rem;
    color: var(--gx-charcoal);
    letter-spacing: -0.005em;
}
.gx-feature .gx-en-title {
    font-family: var(--font-mono); font-weight: 500;
    color: var(--gx-muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: .9rem;
}
.gx-feature p { color: var(--gx-muted); font-size: .98rem; margin: 0; line-height: 1.65; }

/* =====================  PAPER CARDS (editorial) =========== */

.gx-papers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.gx-paper-card {
    background: var(--gx-paper);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-r);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
    position: relative;
}
.gx-paper-card::after {
    /* faint pattern hint at "paper" */
    content: "";
    position: absolute; inset: 0;
    background-image: linear-gradient(180deg, rgba(217,205,180,.0) 0%, rgba(217,205,180,.10) 100%);
    pointer-events: none;
}
.gx-paper-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--gx-shadow-2);
}
.gx-paper-head {
    padding: 1.4rem 1.5rem 1.1rem;
    border-bottom: 1px dashed var(--gx-rule);
    display: flex; flex-direction: column; align-items: flex-start;
    background: linear-gradient(180deg, var(--gx-paper) 60%, rgba(232,163,61,.08));
    position: relative; z-index: 1;
}
.gx-paper-head .gx-paper-name {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--gx-maroon);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    margin-bottom: .2rem;
}
.gx-paper-head .gx-year {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 3rem;
    line-height: 1;
    color: var(--gx-charcoal);
    font-variation-settings: "opsz" 144, "SOFT" 60;
}
.gx-paper-body { padding: 1.1rem 1.5rem 1.4rem; flex: 1; position: relative; z-index: 1; }
.gx-paper-meta {
    color: var(--gx-muted);
    font-size: .9rem;
    margin-bottom: 1.1rem;
    min-height: 2.4em;
    line-height: 1.55;
}
.gx-paper-meta strong { color: var(--gx-charcoal); font-family: var(--font-mono); font-weight: 500; }
.gx-paper-actions { display: flex; gap: .55rem; flex-wrap: wrap; }
.gx-paper-actions a, .gx-paper-actions .gx-btn-disabled {
    flex: 1; text-align: center; font-size: .88rem; padding: .55rem .8rem;
    justify-content: center;
}
.gx-paper-actions .gx-btn-disabled {
    background: var(--gx-bg-2); color: var(--gx-muted);
    border-radius: var(--gx-r-sm); border: 1px dashed var(--gx-rule);
    font-family: var(--font-latin); font-weight: 600;
    cursor: not-allowed;
}

/* =====================  ABOUT IMAGE  ====================== */

.gx-about-img {
    border-radius: var(--gx-r-lg);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #FCF5F6, #FFFBF2);
    position: relative;
    box-shadow: var(--gx-shadow-2);
    border: 1px solid var(--gx-border);
}
.gx-about-img img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    filter: saturate(.95) contrast(1.02);
}
.gx-about-img-badge {
    position: absolute; bottom: 1.25rem; left: 1.25rem;
    background: var(--gx-card);
    padding: .9rem 1.1rem; border-radius: var(--gx-r-sm);
    box-shadow: 0 12px 24px rgba(0,0,0,.18);
    display: flex; align-items: center; gap: .8rem;
    border: 1px solid var(--gx-border);
}
.gx-about-img-badge .gx-num {
    font-family: var(--font-display); font-style: italic; font-weight: 400;
    font-size: 2.1rem; line-height: 1;
    color: var(--gx-maroon);
}
.gx-about-img-badge .gx-cap {
    font-family: var(--font-mono); font-size: .7rem;
    color: var(--gx-muted); text-transform: uppercase;
    letter-spacing: .12em; line-height: 1.4;
}

/* =====================  CTA WITH IMAGE  =================== */

.gx-cta-img {
    background:
        linear-gradient(135deg, rgba(123,30,38,.95), rgba(232,163,61,.85));
    color: #fff !important;
    text-align: center;
    position: relative;
}
.gx-cta-img::before {
    content: ""; position: absolute; inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.10 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: .6; mix-blend-mode: overlay;
    pointer-events: none;
}
.gx-cta-img > .container { position: relative; }
.gx-cta-img h2 { color: #fff; font-family: var(--font-tamil); font-weight: 700; font-style: normal; }

/* =====================  PAGE HEADER (sub-pages) =========== */

.gx-page-header {
    background: var(--gx-hero-grad);
    color: #fff; text-align: center;
    padding: clamp(3rem, 7vw, 5rem) 0;
    position: relative; overflow: hidden;
    isolation: isolate;
}
.gx-page-header::after {
    content: ""; position: absolute; inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.12 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: .55; mix-blend-mode: overlay; pointer-events: none;
}
.gx-page-header > .container { position: relative; z-index: 1; }
.gx-page-header h1 {
    color: #fff;
    font-family: var(--font-tamil);
    font-weight: 700; font-style: normal;
    margin: 0 0 .5rem;
    font-size: clamp(1.9rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}
.gx-page-header .gx-en {
    color: rgba(255,255,255,.82);
    font-family: var(--font-mono); font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase;
    font-size: .82rem;
    display: inline-flex; align-items: center; gap: .65rem;
}
.gx-page-header .gx-en::before, .gx-page-header .gx-en::after {
    content: ""; display: inline-block; width: 24px; height: 1px;
    background: rgba(255,255,255,.45);
}
.gx-page-header .gx-group-badges { justify-content: center; margin-top: 1.2rem; }

/* =====================  QUIZ  ============================= */

.gx-quiz-wrap { max-width: 1320px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

/* Year-based quiz: 2 questions per row, paginated 6 per page */
#questions-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    align-items: start;
}
#questions-container > .gx-page-nav { grid-column: 1 / -1; }
@media (max-width: 991.98px) { #questions-container { gap: 1rem; } }
@media (max-width: 575px) { #questions-container { gap: .7rem; } }

/* Pagination control */
.gx-page-nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: 1rem 1.2rem;
    background: var(--gx-card);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-r);
    margin: .5rem 0 1rem;
    flex-wrap: wrap;
}
.gx-page-nav .gx-btn-outline,
.gx-page-nav .gx-btn-cta { padding: .55rem 1rem; font-size: .9rem; }
.gx-page-nav .gx-btn-outline:disabled,
.gx-page-nav .gx-btn-cta:disabled {
    opacity: .4; cursor: not-allowed; transform: none !important; box-shadow: none !important;
}
.gx-page-info {
    text-align: center;
    display: flex; flex-direction: column; gap: .15rem; align-items: center;
    flex: 1 1 auto;
}
.gx-page-info-main {
    font-family: var(--font-latin);
    font-weight: 700;
    font-size: .98rem;
    color: var(--gx-charcoal);
}
.gx-page-info-range {
    font-family: var(--font-mono);
    font-size: .76rem;
    color: var(--gx-muted);
    letter-spacing: .04em;
}
@media (max-width: 575px) {
    .gx-page-nav { padding: .8rem 1rem; gap: .6rem; }
    .gx-page-nav .gx-btn-outline,
    .gx-page-nav .gx-btn-cta { padding: .5rem .85rem; font-size: .85rem; }
    .gx-page-info-main { font-size: .9rem; }
    .gx-page-info-range { font-size: .7rem; }
}

/* Topic-based practice page: 2 questions per page, side-by-side */
#practice-stage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.5rem;
}
@media (max-width: 767.98px) {
    #practice-stage { grid-template-columns: 1fr; gap: 1.2rem; }
}
.gx-page-actions {
    display: flex; justify-content: flex-end;
    margin-top: 1.6rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--gx-border);
}
.gx-page-actions .gx-btn-cta { padding: .85rem 1.6rem; font-size: 1rem; }
.gx-page-actions .gx-btn-cta:disabled {
    opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important;
}
@media (max-width: 575px) {
    .gx-page-actions { justify-content: stretch; }
    .gx-page-actions .gx-btn-cta { width: 100%; justify-content: center; }
}

/* Compact "How it works" feature blocks (practice page) */
.gx-features.gx-compact { gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.gx-features.gx-compact .gx-feature { padding: 1.3rem 1.2rem; }
.gx-features.gx-compact .gx-feature-icon { width: 36px; height: 36px; font-size: .95rem; margin-bottom: .55rem; }
.gx-features.gx-compact .gx-feature h3 { font-size: 1rem; margin-bottom: .1rem; line-height: 1.3; }
.gx-features.gx-compact .gx-feature .gx-en-title { font-size: .76rem; margin-bottom: .5rem; }
.gx-features.gx-compact .gx-feature p { font-size: .86rem; line-height: 1.55; margin: 0; }

/* YouTube channel CTA — homepage */
.gx-youtube-cta {
    background: linear-gradient(135deg, #FF0000 0%, #C4302B 100%);
    color: #fff;
    padding: 2.4rem 2rem;
    border-radius: var(--gx-r-lg);
    margin: 0 auto;
    max-width: 1000px;
    display: flex;
    align-items: center;
    gap: 1.6rem;
    box-shadow: 0 10px 30px rgba(196,48,43,.2);
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
.gx-youtube-cta::before {
    content: ""; position: absolute; right: -40px; top: -40px;
    width: 180px; height: 180px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
    pointer-events: none;
}
.gx-youtube-icon {
    width: 64px; height: 64px;
    background: rgba(255,255,255,.18);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.gx-youtube-icon svg { width: 36px; height: 36px; fill: #fff; }
.gx-youtube-text { flex: 1; min-width: 240px; position: relative; z-index: 1; }
.gx-youtube-text .gx-yt-eyebrow {
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .9;
    margin-bottom: .35rem;
}
.gx-youtube-text h3 {
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.55rem;
    margin: 0 0 .4rem;
    line-height: 1.2;
}
.gx-youtube-text p {
    color: rgba(255,255,255,.92);
    font-size: .95rem;
    margin: 0;
    line-height: 1.55;
}
.gx-youtube-cta .gx-yt-btn {
    background: #fff;
    color: #C4302B !important;
    font-family: var(--font-latin);
    font-weight: 700;
    border-radius: 50px;
    padding: .8rem 1.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: transform .15s, box-shadow .2s;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.gx-youtube-cta .gx-yt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.25);
    color: #C4302B !important;
    text-decoration: none;
}
@media (max-width: 575px) {
    .gx-youtube-cta { padding: 1.8rem 1.3rem; flex-direction: column; text-align: center; }
    .gx-youtube-text h3 { font-size: 1.25rem; }
}

.gx-quiz-header {
    background: var(--gx-card);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-r);
    padding: 1.6rem 1.8rem;
    margin-bottom: 1.4rem;
    display: flex; flex-wrap: wrap; gap: 1rem;
    align-items: center; justify-content: space-between;
    box-shadow: var(--gx-shadow-1);
}
.gx-quiz-header h1 {
    margin: 0;
    font-family: var(--font-display);
    font-style: italic; font-weight: 500;
    font-size: 1.55rem; letter-spacing: -.015em;
}
.gx-quiz-header .gx-quiz-meta {
    color: var(--gx-muted);
    font-family: var(--font-mono); font-size: .82rem;
    margin-top: .25rem; letter-spacing: .03em;
}
.gx-quiz-progress {
    width: 100%; background: var(--gx-bg-2); height: 4px;
    border-radius: 2px; overflow: hidden; margin-top: 1rem;
}
.gx-quiz-progress > div {
    background: linear-gradient(90deg, var(--gx-saffron), var(--gx-maroon));
    height: 100%; transition: width .25s ease;
}

/* bilingual notice */
.gx-quiz-note {
    background: linear-gradient(180deg, rgba(232,163,61,.10), rgba(232,163,61,.04));
    border: 1px solid rgba(232,163,61,.35);
    border-radius: var(--gx-r);
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
    display: flex; gap: .8rem;
    font-size: .92rem;
}
.gx-quiz-note .gx-note-icon {
    color: var(--gx-saffron-d); font-size: 1.1rem; flex-shrink: 0;
    margin-top: .15rem;
}
.gx-quiz-note p { margin: 0 0 .25rem; color: var(--gx-charcoal); }
.gx-quiz-note p:last-child { margin: 0; color: var(--gx-muted); font-size: .87rem; }

.gx-question {
    background: var(--gx-card);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-r);
    padding: 1.6rem 1.7rem;
    margin-bottom: 1rem;
    transition: box-shadow .2s, border-color .2s;
}
.gx-question:hover { border-color: var(--gx-rule); }
.gx-question-num {
    font-family: var(--font-mono); font-weight: 500;
    color: var(--gx-maroon); font-size: .76rem;
    text-transform: uppercase; letter-spacing: .14em;
    margin-bottom: .55rem;
    display: flex; align-items: center; gap: .5rem;
}
.gx-question-num::before {
    content: ""; width: 14px; height: 1px; background: var(--gx-maroon);
}
.gx-question-text {
    font-size: 1.05rem;
    color: var(--gx-charcoal);
    margin-bottom: 1.2rem;
    font-family: var(--font-latin);
    font-weight: 500;
    line-height: 1.55;
}
.gx-options { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.gx-option {
    display: flex; align-items: flex-start; gap: 1rem;
    padding: 1.1rem 1.3rem; margin: 0;
    border: 1.5px solid var(--gx-border);
    border-radius: var(--gx-r);
    cursor: pointer;
    transition: all .15s ease;
    background: var(--gx-card);
    min-height: 56px;
}
.gx-option:hover { border-color: var(--gx-saffron); background: rgba(232,163,61,.08); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,163,61,.10); }
.gx-option.selected { border-color: var(--gx-maroon); background: rgba(123,30,38,.06); box-shadow: inset 4px 0 0 var(--gx-maroon), 0 4px 12px rgba(123,30,38,.10); }
.gx-option input { margin-top: .35rem; accent-color: var(--gx-maroon); width: 18px; height: 18px; flex-shrink: 0; }
.gx-option .gx-opt-letter {
    font-family: var(--font-mono); font-weight: 700;
    color: var(--gx-maroon);
    min-width: 1.8rem;
    font-size: .95rem;
    line-height: 1.65;
}
.gx-option .gx-opt-text { flex: 1; font-family: var(--font-tamil); font-size: 1.02rem; line-height: 1.65; }

/* post-submit review */
.gx-question.reviewed .gx-option { cursor: default; }
.gx-question.reviewed .gx-option:hover { background: var(--gx-card); border-color: var(--gx-border); }
.gx-question.reviewed .gx-option.selected { background: rgba(123,30,38,.04); }
.gx-question.reviewed .gx-option.correct {
    border-color: var(--gx-green); background: rgba(21,128,61,.06);
    box-shadow: inset 3px 0 0 var(--gx-green);
}
.gx-question.reviewed .gx-option.wrong {
    border-color: #B91C1C; background: rgba(185,28,28,.05);
    box-shadow: inset 3px 0 0 #B91C1C;
}
.gx-question.reviewed .gx-option.correct::after {
    content: " ✓"; color: var(--gx-green); font-weight: 700; font-family: var(--font-mono);
}
.gx-question.reviewed .gx-option.wrong::after {
    content: " ✗"; color: #B91C1C; font-weight: 700; font-family: var(--font-mono);
}

/* submit bar */
.gx-submit-bar {
    position: sticky; bottom: 1rem;
    background: var(--gx-card);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-r);
    padding: 1rem 1.4rem;
    box-shadow: 0 -4px 28px rgba(24,24,27,.12);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem;
}
.gx-submit-bar .gx-attempted {
    color: var(--gx-muted); font-family: var(--font-mono); font-size: .9rem;
    letter-spacing: .03em;
}
.gx-submit-bar .gx-attempted #attempted-count,
.gx-submit-bar .gx-attempted #total-count { color: var(--gx-charcoal); font-weight: 500; }

/* results panel */
.gx-results {
    background: var(--gx-hero-grad);
    color: #fff;
    border-radius: var(--gx-r);
    padding: 2.2rem 1.8rem;
    margin: 1.5rem 0;
    text-align: center;
    position: relative; overflow: hidden; isolation: isolate;
}
.gx-results::after {
    content: ""; position: absolute; inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.10 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: .55; mix-blend-mode: overlay; pointer-events: none;
}
.gx-results h2 { color: #fff; font-family: var(--font-tamil); font-weight: 700; font-style: normal; font-size: 1.7rem; margin: 0 0 .8rem; position: relative; }
.gx-results .gx-score {
    font-family: var(--font-display); font-style: italic; font-weight: 400;
    font-size: 4.5rem; line-height: 1;
    margin: .4rem 0;
    font-variation-settings: "opsz" 144, "SOFT" 60;
    position: relative;
}
.gx-results .gx-score small { font-size: 1.6rem; opacity: .8; font-style: italic; }
.gx-results p { color: rgba(255,255,255,.92); margin: .25rem 0; position: relative; }
.gx-results-actions { margin-top: 1.4rem; display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; position: relative; }
.gx-results-actions a, .gx-results-actions button {
    background: rgba(255,255,255,.18);
    border: 1.5px solid rgba(255,255,255,.5);
    color: #fff;
    border-radius: var(--gx-r-sm);
    padding: .62rem 1.2rem;
    font-family: var(--font-latin); font-weight: 600; font-size: .9rem;
    text-decoration: none;
    cursor: pointer; transition: background .15s;
}
.gx-results-actions a:hover, .gx-results-actions button:hover {
    background: rgba(255,255,255,.32); color: #fff; text-decoration: none;
}

/* =====================  QUIZ NAVIGATOR GRID  ============== */

.gx-q-nav {
    background: var(--gx-card);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-r);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.4rem;
}
.gx-q-nav-title {
    font-family: var(--font-mono); font-weight: 500;
    font-size: .76rem; color: var(--gx-maroon);
    text-transform: uppercase; letter-spacing: .14em;
    margin-bottom: .9rem;
    display: flex; align-items: center; gap: .5rem;
}
.gx-q-nav-title::before {
    content: ""; width: 14px; height: 1px; background: var(--gx-maroon);
}
.gx-q-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: .35rem;
}
.gx-q-nav-cell {
    aspect-ratio: 1;
    display: grid; place-items: center;
    border: 1.5px solid var(--gx-border);
    border-radius: var(--gx-r-sm);
    background: var(--gx-card);
    font-family: var(--font-mono); font-weight: 500;
    font-size: .8rem; color: var(--gx-muted);
    cursor: pointer; transition: all .15s;
}
.gx-q-nav-cell:hover { border-color: var(--gx-saffron); color: var(--gx-charcoal); }
.gx-q-nav-cell.answered { background: rgba(232,163,61,.10); border-color: var(--gx-saffron); color: var(--gx-charcoal); }
.gx-q-nav-cell.reviewed-correct { background: rgba(21,128,61,.10); border-color: var(--gx-green); color: var(--gx-green); }
.gx-q-nav-cell.reviewed-wrong   { background: rgba(185,28,28,.08); border-color: #B91C1C; color: #B91C1C; }
.gx-q-nav-legend {
    margin-top: .9rem;
    font-family: var(--font-mono); font-size: .72rem; color: var(--gx-muted);
    display: flex; gap: 1rem; flex-wrap: wrap;
    letter-spacing: .05em;
}
.gx-q-nav-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.gx-q-nav-legend .gx-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid var(--gx-border); }
.gx-q-nav-legend .gx-dot.answered { background: rgba(232,163,61,.15); border-color: var(--gx-saffron); }
.gx-q-nav-legend .gx-dot.correct  { background: rgba(21,128,61,.15);  border-color: var(--gx-green); }
.gx-q-nav-legend .gx-dot.wrong    { background: rgba(185,28,28,.15);  border-color: #B91C1C; }

/* =====================  FOOTER  =========================== */

.gx-footer {
    background: linear-gradient(180deg, var(--gx-charcoal) 0%, #0F0F12 100%);
    color: #D4D4D8;
    padding: 4.5rem 0 1.8rem;
    margin-top: 5rem;
    position: relative;
}
.gx-footer::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: linear-gradient(90deg, var(--gx-maroon) 0%, var(--gx-saffron) 50%, var(--gx-green) 100%);
}
.gx-footer h4 {
    color: #fff;
    font-family: var(--font-mono); font-weight: 600;
    font-size: .82rem; margin-bottom: 1.3rem;
    text-transform: uppercase; letter-spacing: .15em;
    position: relative;
    padding-bottom: .7rem;
}
.gx-footer h4::after {
    content: ""; position: absolute; left: 0; bottom: 0;
    width: 32px; height: 2px;
    background: var(--gx-saffron);
    border-radius: 1px;
}
.gx-footer a {
    color: var(--gx-saffron);
    text-decoration: none;
    transition: all .18s;
    display: inline-flex; align-items: center; gap: .35rem;
}
.gx-footer a:hover { color: #fff; transform: translateX(2px); }
.gx-footer ul { list-style: none; padding: 0; margin: 0; }
.gx-footer ul li {
    margin-bottom: .65rem;
    font-family: var(--font-latin);
    font-size: .94rem;
}
.gx-footer ul li::before {
    content: "›";
    color: var(--gx-saffron);
    margin-right: .5rem;
    font-weight: 700;
    opacity: .6;
}
.gx-footer p { color: #A1A1AA; font-size: .94rem; line-height: 1.7; }
.gx-footer .gx-footer-brand {
    font-family: var(--font-latin);
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    letter-spacing: -.02em;
    display: inline-block;
    margin-bottom: 1rem;
}
.gx-footer .gx-footer-brand .dot { color: var(--gx-saffron); }
.gx-footer .gx-footer-tags {
    display: flex; flex-wrap: wrap; gap: .4rem;
    margin-top: 1rem;
}
.gx-footer .gx-footer-tag {
    background: rgba(232,163,61,.10);
    border: 1px solid rgba(232,163,61,.25);
    color: var(--gx-saffron);
    font-family: var(--font-mono);
    font-size: .72rem;
    padding: .25rem .6rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
/* New 4-column grid layout */
.gx-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
    gap: 2.6rem;
    margin-bottom: 2.8rem;
}
.gx-footer-brand-block { display: flex; flex-direction: column; gap: 1rem; }
.gx-footer-brand-block p {
    color: #B5B5BC;
    font-family: var(--font-tamil);
    font-size: .94rem;
    line-height: 1.7;
    margin: 0;
    max-width: 320px;
}
.gx-footer-about p {
    margin: 0 0 .8rem;
    font-size: .88rem;
    color: #A1A1AA;
    line-height: 1.65;
}
.gx-footer-about p strong { color: #fff; font-weight: 600; }
.gx-footer-about p:last-child { margin: 0; }

/* Bottom row */
.gx-footer-bottom {
    border-top: 1px solid #27272A;
    padding-top: 1.5rem;
    margin-top: 0;
    color: #71717A;
    font-family: var(--font-mono); font-size: .78rem;
    letter-spacing: .03em;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem;
}
.gx-footer-copyright { color: #71717A; }
.gx-footer-copyright span[lang="ta"] { color: #9CA3AF; }
.gx-footer-meta { display: flex; gap: .8rem; align-items: center; }
.gx-footer-meta a { color: #A1A1AA; font-family: var(--font-mono); font-size: .76rem; }
.gx-footer-meta a:hover { color: var(--gx-saffron); }
.gx-footer-meta span { color: #4B5563; }

/* Footer responsive */
@media (max-width: 991.98px) {
    .gx-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.6rem; }
    .gx-footer-brand-block { grid-column: 1 / -1; max-width: 480px; }
    .gx-footer-about { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
    .gx-footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
    .gx-footer-bottom { flex-direction: column; text-align: center; }
}

/* =====================  PROSE / FORMS  ==================== */

.gx-prose p { margin-bottom: 1.1rem; }
.gx-prose h2 {
    margin-top: 2.2rem; margin-bottom: .8rem;
    font-family: var(--font-display); font-style: italic; font-weight: 500;
}
.gx-prose h2[lang="ta"] { font-family: var(--font-tamil); font-style: normal; font-weight: 700; }
.gx-contact-form { display: grid; gap: 1rem; max-width: 540px; }
.gx-contact-form label {
    font-family: var(--font-mono); font-weight: 500;
    font-size: .76rem; text-transform: uppercase; letter-spacing: .12em;
    color: var(--gx-muted);
}
.gx-contact-form input, .gx-contact-form textarea {
    width: 100%; padding: .85rem 1rem;
    border: 1.5px solid var(--gx-border); border-radius: var(--gx-r-sm);
    font: inherit; background: var(--gx-card);
    font-family: var(--font-latin);
}
.gx-contact-form input:focus, .gx-contact-form textarea:focus {
    outline: none; border-color: var(--gx-maroon);
    box-shadow: 0 0 0 3px rgba(123,30,38,.10);
}

/* =====================  MOBILE NAV  ======================= */

/* DESKTOP DEFAULT — completely hide all mobile nav elements */
.gx-mobile-toggle,
.gx-mobile-menu,
.gx-mobile-menu-overlay { display: none !important; }

@media (max-width: 991.98px) {
    .gx-mobile-toggle {
        display: inline-flex !important; align-items: center;
        background: transparent; border: 0;
        color: var(--gx-charcoal);
        font-size: 1.45rem; padding: .5rem .7rem;
        cursor: pointer;
    }
    .gx-mobile-menu {
        display: block !important;
        position: fixed; top: 0; right: 0;
        width: 86%; max-width: 320px; height: 100vh;
        background: var(--gx-card);
        box-shadow: -8px 0 32px rgba(24,24,27,.18);
        z-index: 1101; padding: 1.5rem;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform .3s cubic-bezier(.2,.7,.2,1);
    }
    .gx-mobile-menu.open { transform: translateX(0); }
    .gx-mobile-menu-overlay {
        display: block !important;
        position: fixed; inset: 0;
        background: rgba(24,24,27,.55);
        z-index: 1100;
        opacity: 0; pointer-events: none;
        transition: opacity .3s ease;
    }
    .gx-mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }
    .gx-mobile-head {
        display: flex; justify-content: space-between; align-items: center;
        padding-bottom: 1rem; border-bottom: 1px solid var(--gx-border);
    }
    .gx-mobile-head a {
        font-family: var(--font-display); font-style: italic;
        font-weight: 700; font-size: 1.5rem;
        color: var(--gx-maroon); text-decoration: none;
    }
    .gx-mobile-head .gx-mobile-close {
        background: transparent; border: 0; cursor: pointer;
        font-size: 1.4rem; color: var(--gx-muted); padding: .25rem .5rem;
    }
    .gx-mobile-menu ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
    .gx-mobile-menu ul li { border-bottom: 1px solid var(--gx-border); }
    .gx-mobile-menu ul li a {
        display: block; padding: 1rem 0;
        font-family: var(--font-latin); font-weight: 600; font-size: 1rem;
        color: var(--gx-charcoal); text-decoration: none;
    }
    .gx-mobile-menu ul li a:hover { color: var(--gx-maroon); }
    .gx-mobile-menu .gx-mobile-cta {
        margin-top: 1.5rem; display: block; text-align: center; justify-content: center;
    }
    #navigation .col-lg-2.text-end {
        display: flex; justify-content: flex-end; align-items: center; gap: .5rem;
    }
    /* on mobile, hide .d-none.d-lg-inline-flex (Bootstrap class chain — already hides on small) */
}

/* on smallest screens shrink hero stats spacing */
@media (max-width: 575px) {
    .gx-hero-stats { gap: 1.4rem; padding-top: 1.4rem; margin-top: 1.8rem; }
    .gx-hero-stat strong { font-size: 1.7rem; }
    .gx-paper-head .gx-year { font-size: 2.5rem; }
    .gx-section-title { margin-bottom: 2.2rem; }
}

/* =====================  ELUDEB OVERRIDES  ================= */
.home_bg { display: none !important; }   /* eduleb's old hero, we use our own */

/* small utilities */
.gx-mt-0 { margin-top: 0 !important; }
.gx-text-center { text-align: center; }
.gx-mb-0 { margin-bottom: 0 !important; }

/* =========================================================
   STRONG RESPONSIVE — tablet + mobile
   ========================================================= */
@media (max-width: 991.98px) {
    .gx-quiz-wrap { padding: 1.5rem 1rem 3rem; max-width: 100%; }
    .gx-q-card { padding: 1.4rem 1.2rem; }
    .gx-quiz-header { gap: 1rem; }
    .gx-quiz-header h1 { font-size: 1.4rem; }
}
@media (max-width: 767.98px) {
    .gx-option {
        padding: 1rem 1.05rem;
        gap: .8rem;
        min-height: 52px;
    }
    .gx-option .gx-opt-text { font-size: .98rem; }
    .gx-option .gx-opt-letter { min-width: 1.5rem; font-size: .88rem; }
    .gx-question-block {
        font-size: .98rem;
        padding: 1rem 1.1rem;
        line-height: 1.7;
    }
    .gx-q-card { padding: 1.2rem 1rem; }
    .gx-question-text { font-size: 1rem; }
    .gx-q-ta { font-size: 1.02rem; }
    .gx-q-en { font-size: .9rem; }
    .gx-opt-ta { font-size: .98rem !important; }
    .gx-opt-en { font-size: .82rem !important; }

    /* Footer */
    .gx-footer { padding: 3rem 0 1.5rem; margin-top: 3rem; }
    .gx-footer h4 { font-size: .78rem; margin-bottom: 1rem; }
    .gx-footer .gx-footer-brand { font-size: 1.3rem; }
    .gx-footer-bottom { font-size: .72rem; }

    /* Submit bar */
    .gx-submit-bar { flex-direction: column; gap: .8rem; align-items: stretch; }
    .gx-submit-bar > div { width: 100%; }
    .gx-submit-bar button, .gx-submit-bar .gx-btn-cta, .gx-submit-bar .gx-btn-outline {
        width: 100%; justify-content: center;
    }

    /* Question navigator grid */
    .gx-q-nav-grid { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)) !important; gap: .35rem !important; }
    .gx-q-nav-cell { font-size: .78rem !important; padding: .4rem .25rem !important; }
}
@media (max-width: 480px) {
    .gx-quiz-wrap { padding: 1rem .75rem 2.5rem; }
    .gx-q-card { padding: 1rem .85rem; border-radius: 10px; }
    .gx-option { padding: .9rem 1rem; min-height: 48px; }
    .gx-option .gx-opt-text { font-size: .94rem; }
    .gx-question-block { font-size: .94rem; padding: .9rem 1rem; }
    .gx-q-nav-grid { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)) !important; }
}

/* =========================================================
   TOPIC-BASED PRACTICE — practice.html
   ========================================================= */

/* ---- Practice page hero ---- */
.gx-practice-hero {
    background: linear-gradient(135deg, #5C161D 0%, #7B1E26 30%, #A62B36 70%, #E8A33D 100%);
    color: #fff;
    padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 8vw, 6rem);
    position: relative;
    overflow: hidden;
    margin-bottom: -3.5rem;
}
.gx-practice-hero::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        radial-gradient(ellipse 50% 60% at 80% 20%, rgba(255,255,255,.18), transparent 60%),
        radial-gradient(ellipse 40% 60% at 15% 90%, rgba(232,163,61,.30), transparent 65%);
    pointer-events: none;
}
.gx-practice-hero-inner {
    position: relative;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}
.gx-practice-eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.22);
    color: rgba(255,255,255,.94);
    padding: .4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.4rem;
    backdrop-filter: blur(6px);
}
.gx-practice-hero h1 {
    color: #fff;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.15;
    letter-spacing: -.02em;
    margin: 0 0 1rem;
}
.gx-practice-hero p {
    color: rgba(255,255,255,.92);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
    max-width: 600px;
    margin-left: auto; margin-right: auto;
}
.gx-practice-hero p strong { color: #fff; }

/* Topic grid section sits in cream-coloured container with raised cards */
.gx-practice-topics {
    background: linear-gradient(180deg, var(--gx-bg) 0%, var(--gx-bg-2) 100%);
    padding-top: 4.5rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--gx-border);
    position: relative;
    z-index: 1;
}

/* "How it works" section — cream box with numbered points */
.gx-howitworks {
    background: #fff;
    padding-top: 1.4rem;
    padding-bottom: 1.4rem;
}
.gx-howitworks-inner {
    max-width: 1180px;
    margin: 0 auto;
    background: linear-gradient(135deg, #FFF9EB 0%, #FFFEF9 100%);
    border: 1px solid var(--gx-border);
    border-left: 3px solid var(--gx-saffron);
    border-radius: var(--gx-r-sm);
    padding: .9rem 1.2rem;
    box-shadow: var(--gx-shadow-1);
    display: grid;
    grid-template-columns: minmax(140px, 170px) 1fr;
    gap: 1rem;
    align-items: center;
}
.gx-howitworks-head {
    text-align: left;
    border-right: 1px solid var(--gx-border);
    padding-right: .9rem;
}
.gx-howitworks-head .gx-en {
    font-family: var(--font-mono);
    font-size: .65rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gx-saffron-d);
    font-weight: 700;
}
.gx-howitworks-head h2 {
    font-size: .95rem;
    margin: .15rem 0 0;
    color: var(--gx-charcoal);
    line-height: 1.25;
}
.gx-points {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .55rem;
}
.gx-point {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .6rem;
    background: rgba(255,255,255,.75);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-r-sm);
    transition: transform .15s, box-shadow .2s;
    min-width: 0;
}
.gx-point:hover { transform: translateY(-1px); box-shadow: var(--gx-shadow-1); }
.gx-point-num {
    flex-shrink: 0;
    width: 22px; height: 22px;
    background: var(--gx-maroon);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: .72rem;
}
.gx-point:nth-child(2) .gx-point-num { background: var(--gx-saffron); color: var(--gx-charcoal); }
.gx-point:nth-child(3) .gx-point-num { background: var(--gx-green); }
.gx-point:nth-child(4) .gx-point-num { background: var(--gx-maroon-l); }
.gx-point-body {
    display: flex; flex-direction: column; gap: 0;
    line-height: 1.4;
    min-width: 0;
    flex: 1;
}
.gx-point-body strong {
    font-family: var(--font-tamil);
    font-size: .82rem;
    color: var(--gx-charcoal);
    font-weight: 600;
    line-height: 1.45;
    word-break: normal;
    overflow-wrap: break-word;
}
.gx-point-body span {
    font-family: var(--font-latin);
    font-size: .68rem;
    color: var(--gx-muted);
    word-break: normal;
    overflow-wrap: break-word;
}

@media (max-width: 991.98px) {
    .gx-howitworks-inner { grid-template-columns: 1fr; gap: .65rem; padding: .8rem 1rem; }
    .gx-howitworks-head { border-right: none; border-bottom: 1px solid var(--gx-border); padding-right: 0; padding-bottom: .55rem; text-align: center; }
    .gx-points { grid-template-columns: repeat(2, 1fr); gap: .45rem; }
}
@media (max-width: 575px) {
    .gx-practice-hero h1 { font-size: 1.6rem; }
    .gx-practice-hero p { font-size: .95rem; }
    .gx-howitworks { padding-top: 1rem; padding-bottom: 1rem; }
    .gx-howitworks-inner { padding: .8rem .9rem; }
    .gx-points { grid-template-columns: 1fr; gap: .4rem; }
    .gx-point {
        padding: .55rem .7rem;
        gap: .55rem;
        align-items: flex-start;
    }
    .gx-point-num { width: 22px; height: 22px; font-size: .72rem; margin-top: .1rem; }
    .gx-point-body strong { font-size: .82rem; line-height: 1.45; }
    .gx-point-body span { display: none; }
}

/* ---- Topic selection grid ---- */
.gx-topic-grid {
    display: grid;
    gap: 1.4rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    margin-top: 1rem;
}
.gx-topic-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    background: var(--gx-card);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-r-lg);
    padding: 1.6rem 1.4rem 1.3rem;
    text-decoration: none;
    color: var(--gx-charcoal);
    transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
    box-shadow: var(--gx-shadow-1);
    overflow: hidden;
}
.gx-topic-card::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--gx-saffron);
    transform: scaleX(0); transform-origin: left;
    transition: transform .25s ease;
}
.gx-topic-card:hover {
    transform: translateY(-3px);
    border-color: var(--gx-saffron);
    box-shadow: var(--gx-shadow-2);
    text-decoration: none;
    color: var(--gx-charcoal);
}
.gx-topic-card:hover::before { transform: scaleX(1); }
.gx-topic-num {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--gx-muted);
    letter-spacing: .08em;
}
.gx-topic-icon {
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--gx-maroon); color: #fff;
    border-radius: var(--gx-r-sm);
    font-size: 1.2rem;
    margin-bottom: .15rem;
}
.gx-topic-icon.saffron { background: var(--gx-saffron); color: var(--gx-charcoal); }
.gx-topic-icon.green   { background: var(--gx-green); color: #fff; }
.gx-topic-icon.maroon  { background: var(--gx-maroon); color: #fff; }
.gx-topic-card h3 {
    font-family: var(--font-tamil);
    font-size: 1.18rem;
    margin: 0;
    line-height: 1.35;
    color: var(--gx-charcoal);
}
.gx-topic-en {
    font-family: var(--font-latin);
    font-size: .87rem;
    color: var(--gx-muted);
    line-height: 1.4;
}
.gx-topic-meta {
    font-family: var(--font-latin);
    font-size: .82rem;
    color: var(--gx-muted);
    margin-top: .3rem;
    border-top: 1px dashed var(--gx-border);
    padding-top: .7rem;
}
.gx-topic-cta {
    display: inline-flex; align-items: center; gap: .35rem;
    font-family: var(--font-latin);
    font-size: .9rem;
    font-weight: 600;
    color: var(--gx-maroon);
    margin-top: .15rem;
}

/* ---- Quiz topbar (when running a topic) ---- */
.gx-quiz-topbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.4rem 0 1rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--gx-border);
}
.gx-quiz-back {
    display: inline-flex; align-items: center; gap: .35rem;
    font-family: var(--font-latin);
    font-size: .88rem;
    color: var(--gx-muted);
    text-decoration: none;
}
.gx-quiz-back:hover { color: var(--gx-maroon); }
.gx-quiz-title-block { flex: 1; min-width: 220px; }
.gx-quiz-title-block h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--gx-charcoal);
}
.gx-quiz-counter {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gx-maroon);
    background: rgba(123,30,38,.06);
    padding: .35rem .8rem;
    border-radius: var(--gx-r-sm);
}

/* ---- Question card ---- */
.gx-q-card {
    background: var(--gx-card);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-r-lg);
    padding: 2rem 1.8rem;
    margin-top: 1.4rem;
    box-shadow: var(--gx-shadow-1);
}
.gx-q-num {
    font-family: var(--font-mono);
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gx-muted);
    margin-bottom: .6rem;
}
.gx-q-title {
    font-family: var(--font-tamil);
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    line-height: 1.6;
    color: var(--gx-charcoal);
    margin-bottom: 1.4rem;
    font-weight: 500;
}

/* ---- Option buttons ---- */
.gx-opts {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.gx-opt {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    text-align: left;
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--gx-border);
    border-radius: var(--gx-r);
    padding: .9rem 1rem;
    font-family: var(--font-tamil);
    font-size: 1rem;
    color: var(--gx-charcoal);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.gx-opt:hover:not(:disabled) {
    border-color: var(--gx-saffron);
    background: rgba(232,163,61,.06);
}
.gx-opt:active:not(:disabled) { transform: scale(.998); }
.gx-opt .gx-opt-letter {
    flex-shrink: 0;
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 6px;
    background: var(--gx-bg-2);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: .82rem;
    color: var(--gx-muted);
    margin-top: .05rem;
}
.gx-opt .gx-opt-text { flex: 1; line-height: 1.55; }
.gx-opt.selected {
    border-color: var(--gx-maroon);
    background: rgba(123,30,38,.05);
    box-shadow: inset 3px 0 0 var(--gx-maroon);
}
.gx-opt.selected .gx-opt-letter { background: var(--gx-maroon); color: #fff; }
.gx-opt.correct {
    border-color: var(--gx-green) !important;
    background: rgba(21,128,61,.08) !important;
    box-shadow: inset 3px 0 0 var(--gx-green);
}
.gx-opt.correct .gx-opt-letter { background: var(--gx-green); color: #fff; }
.gx-opt.wrong {
    border-color: #B91C1C !important;
    background: rgba(185,28,28,.07) !important;
    box-shadow: inset 3px 0 0 #B91C1C;
}
.gx-opt.wrong .gx-opt-letter { background: #B91C1C; color: #fff; }
.gx-opt:disabled { cursor: default; opacity: 1; }

/* ---- Feedback banner ---- */
.gx-feedback {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin-top: 1.2rem;
    padding: .9rem 1.1rem;
    border-radius: var(--gx-r);
    font-family: var(--font-tamil);
    font-size: .98rem;
    line-height: 1.55;
}
.gx-feedback.correct {
    background: rgba(21,128,61,.10);
    border: 1px solid rgba(21,128,61,.3);
    color: var(--gx-green-d);
}
.gx-feedback.wrong {
    background: rgba(185,28,28,.07);
    border: 1px solid rgba(185,28,28,.25);
    color: #7A1313;
}
.gx-feedback .gx-icon { flex-shrink: 0; width: 1.2em; height: 1.2em; margin-top: .15rem; }
.gx-feedback-explain {
    display: block;
    margin-top: .25rem;
    color: var(--gx-charcoal);
    font-weight: 500;
}

/* ---- Action buttons row ---- */
.gx-q-actions {
    display: flex;
    justify-content: flex-end;
    gap: .7rem;
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--gx-border);
}
.gx-q-actions button:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ---- Final score card ---- */
.gx-score-card {
    background: var(--gx-card);
    border: 1px solid var(--gx-border);
    border-radius: var(--gx-r-lg);
    padding: 2.2rem 1.8rem;
    margin-top: 1.4rem;
    text-align: center;
    box-shadow: var(--gx-shadow-1);
    border-top: 4px solid var(--gx-saffron);
}
.gx-score-card.good { border-top-color: var(--gx-green); }
.gx-score-card.ok   { border-top-color: var(--gx-saffron); }
.gx-score-card.low  { border-top-color: var(--gx-maroon); }
.gx-score-num {
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--gx-charcoal);
    line-height: 1;
    margin: .6rem 0 .2rem;
}
.gx-score-of {
    font-size: .55em;
    color: var(--gx-muted);
    margin-left: .4rem;
}
.gx-score-pct {
    font-size: 1.05rem;
    color: var(--gx-muted);
    margin-bottom: .8rem;
}
.gx-score-verdict {
    font-family: var(--font-tamil);
    font-size: 1.15rem;
    color: var(--gx-charcoal);
    margin-bottom: 1.4rem;
    font-weight: 500;
}
.gx-score-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .7rem;
}

/* ---- Review section ---- */
.gx-review h3 { font-family: var(--font-display); margin-bottom: 1rem; }
.gx-review-row {
    background: var(--gx-card);
    border: 1px solid var(--gx-border);
    border-left: 4px solid var(--gx-border);
    border-radius: var(--gx-r);
    padding: 1rem 1.1rem;
    margin-bottom: .8rem;
}
.gx-review-row.correct { border-left-color: var(--gx-green); }
.gx-review-row.wrong   { border-left-color: #B91C1C; }
.gx-review-head {
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--font-mono);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .5rem;
}
.gx-review-num { color: var(--gx-muted); }
.gx-review-row.correct .gx-review-status { color: var(--gx-green); font-weight: 700; }
.gx-review-row.wrong   .gx-review-status { color: #B91C1C;        font-weight: 700; }
.gx-review-q {
    font-family: var(--font-tamil);
    font-size: 1rem;
    color: var(--gx-charcoal);
    margin-bottom: .5rem;
    line-height: 1.55;
    font-weight: 500;
}
.gx-review-a, .gx-review-x {
    font-family: var(--font-tamil);
    font-size: .92rem;
    color: var(--gx-charcoal);
    margin-bottom: .25rem;
}
.gx-review-a strong { color: var(--gx-green-d); }
.gx-review-x strong { color: #B91C1C; }
.gx-review-explain {
    margin-top: .5rem;
    padding-top: .5rem;
    border-top: 1px dashed var(--gx-border);
    font-family: var(--font-tamil);
    font-size: .9rem;
    color: var(--gx-muted);
    line-height: 1.55;
}

/* ---- Mobile tweaks ---- */
@media (max-width: 575px) {
    .gx-q-card { padding: 1.4rem 1.1rem; }
    .gx-opt { padding: .8rem .85rem; font-size: .96rem; }
    .gx-q-actions { flex-direction: column-reverse; }
    .gx-q-actions button, .gx-q-actions .gx-btn-cta, .gx-q-actions .gx-btn-outline { width: 100%; justify-content: center; }
    .gx-quiz-topbar { gap: .6rem; }
    .gx-quiz-counter { font-size: .95rem; padding: .25rem .65rem; }
}

/* =========================================================
   BILINGUAL — quiz.html (year-based) Tamil + English
   ========================================================= */
.gx-q-ta {
    font-family: var(--font-tamil);
    font-size: 1.08rem;
    color: var(--gx-charcoal);
    font-weight: 500;
    line-height: 1.65;
    margin-bottom: .35rem;
}
.gx-q-en {
    font-family: var(--font-latin);
    font-size: .94rem;
    color: var(--gx-muted);
    line-height: 1.55;
    padding-top: .25rem;
    border-top: 1px dashed var(--gx-border);
}
.gx-opt-text .gx-opt-ta {
    display: block;
    font-family: var(--font-tamil);
    font-size: 1rem;
    color: var(--gx-charcoal);
    line-height: 1.55;
    margin-bottom: .15rem;
}
.gx-opt-text .gx-opt-en {
    display: block;
    font-family: var(--font-latin);
    font-size: .85rem;
    color: var(--gx-muted);
    line-height: 1.45;
}
.gx-question-block {
    white-space: pre-line;          /* preserve line breaks but collapse spaces */
    font-family: var(--font-tamil);
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--gx-charcoal);
    background: var(--gx-paper);
    border: 1px solid var(--gx-border);
    border-left: 4px solid var(--gx-saffron);
    border-radius: var(--gx-r-sm);
    padding: 1.2rem 1.4rem;
    margin: .6rem 0 1.2rem;
    word-break: break-word;
    overflow-wrap: break-word;
}
.gx-question-block::first-line {
    font-weight: 600;
    color: var(--gx-charcoal);
}
