/* School Results – "Aurora" theme.
   Loaded after site.css ("Classic"). Every rule is scoped to
   html[data-theme="aurora"], so Classic is untouched when this theme is off.
   Look: deep-night hero bands with aurora glows, glass surfaces, indigo→violet
   accents for GCSE and amber→coral accents for A-Level. */

html[data-theme="aurora"] {
  --green: #5b4bf5; --green-dark: #3b2fc9; --green-mid: #6d5efc; --green-light: #ecebff; --green-subtle: #f5f4ff;
  --gold: #e8730c; --gold-soft: #fff3e6; --sun: #ffb547;
  --ink: #0f1222; --ink-2: #464c68; --muted: #7c8199; --line: #e2e4f0; --line-soft: #eceef6;
  --bg: #f6f6fb; --up: #0f7a55; --up-bg: #e3f7ee; --down: #c2410c; --down-bg: #fff0e7;
  --r: 22px;
  --shadow: 0 1px 2px rgba(17,20,45,.04), 0 12px 32px rgba(17,20,45,.07);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --night: #0a0c1d; --night-2: #13163a;
  --grad: linear-gradient(120deg, #5b4bf5 0%, #9b5cf6 55%, #ec5fa8 100%);
  --grad-warm: linear-gradient(120deg, #ffb547 0%, #ff7a45 60%, #ec5f7c 100%);
  --grad-cool: linear-gradient(120deg, #22d3ee 0%, #5b4bf5 100%);
  --glass: rgba(255,255,255,.07); --glass-line: rgba(255,255,255,.14);
}
html[data-theme="aurora"] body { font-family: var(--sans); background: var(--bg); letter-spacing: -.005em; }
html[data-theme="aurora"] ::selection { background: #d9d4ff; }

/* ---------- shared night band (header, heroes, footer) ---------- */
html[data-theme="aurora"] .hero,
html[data-theme="aurora"] .hero-school {
  position: relative; isolation: isolate; overflow: hidden; color: #eef0ff; border: 0;
  background:
    radial-gradient(600px 340px at 12% 0%, rgba(91,75,245,.55), transparent 70%),
    radial-gradient(520px 320px at 88% 10%, rgba(236,95,168,.38), transparent 70%),
    radial-gradient(700px 380px at 60% 120%, rgba(34,211,238,.30), transparent 70%),
    linear-gradient(180deg, var(--night), var(--night-2));
}
html[data-theme="aurora"] .hero::before,
html[data-theme="aurora"] .hero-school::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 26px 26px;
  mask: linear-gradient(180deg, #000 0%, transparent 85%); -webkit-mask: linear-gradient(180deg, #000 0%, transparent 85%);
}
html[data-theme="aurora"] .hero::after {
  content: ""; position: absolute; z-index: -1; width: 680px; height: 680px; right: -160px; top: -220px; border-radius: 50%;
  background: conic-gradient(from 0deg, #5b4bf5, #22d3ee, #ec5fa8, #ffb547, #5b4bf5);
  filter: blur(90px); opacity: .28; animation: aurora-spin 26s linear infinite;
}
@keyframes aurora-spin { to { transform: rotate(360deg); } }

/* ---------- header ---------- */
html[data-theme="aurora"] .site-header { background: rgba(10,12,29,.82); border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; }
html[data-theme="aurora"] .brand { font: 400 24px var(--serif); letter-spacing: 0; }
html[data-theme="aurora"] .mark svg { border-radius: 10px; background: var(--grad); }
html[data-theme="aurora"] .mark rect { fill: transparent; }
html[data-theme="aurora"] .mark path { stroke: #fff; }
html[data-theme="aurora"] .site-header nav a { color: rgba(238,240,255,.72); }
html[data-theme="aurora"] .site-header nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
html[data-theme="aurora"] .site-header nav a[aria-current] { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(91,75,245,.45); }
html[data-theme="aurora"] .site-header .btn-ghost { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #fff; }
html[data-theme="aurora"] .site-header .btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- buttons, chips ---------- */
html[data-theme="aurora"] .btn { border-radius: 14px; font-weight: 700; }
html[data-theme="aurora"] .btn-primary { background: var(--grad); background-size: 140% 100%; box-shadow: 0 8px 24px rgba(91,75,245,.35); }
html[data-theme="aurora"] .btn-primary:hover { background-position: 100% 0; box-shadow: 0 12px 30px rgba(91,75,245,.5); }
html[data-theme="aurora"] .btn-light { color: var(--ink); }
html[data-theme="aurora"] .btn-light:hover { background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); transform: translateY(-2px); }
html[data-theme="aurora"] .chip { border-radius: 8px; font-weight: 700; letter-spacing: .01em; }
html[data-theme="aurora"] .chip.gold { background: var(--gold-soft); color: #b4500a; }
html[data-theme="aurora"] .eyebrow { font-size: 11.5px; letter-spacing: .14em; color: var(--green); }
html[data-theme="aurora"] .eyebrow.gold { color: var(--gold); }

/* ---------- home hero ---------- */
html[data-theme="aurora"] .hero { padding: 96px 0 88px; }
html[data-theme="aurora"] .hero .pill { background: var(--glass); border-color: var(--glass-line); color: #d9dcff; backdrop-filter: blur(8px); }
html[data-theme="aurora"] .hero .pill::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.2); vertical-align: 1px; }
html[data-theme="aurora"] .hero h1 { font: 400 clamp(46px, 6.4vw, 84px)/1 var(--serif); letter-spacing: -1px; color: #fff; }
html[data-theme="aurora"] .hero h1 em { background: linear-gradient(100deg, #a5b4ff, #f0abfc 50%, #ffcf8a); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
html[data-theme="aurora"] .hero .lede { color: rgba(226,229,255,.78); }
html[data-theme="aurora"] .search { border-radius: 18px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.96); box-shadow: 0 20px 60px rgba(0,0,0,.35), 0 0 0 6px rgba(255,255,255,.06); }
html[data-theme="aurora"] .search .btn { border-radius: 12px; }
html[data-theme="aurora"] .hero-links { color: rgba(226,229,255,.6); }
html[data-theme="aurora"] .hero-links a { color: #fff; border-bottom-color: rgba(255,255,255,.3); }
html[data-theme="aurora"] .ring { background: conic-gradient(from 210deg, #5b4bf5, #22d3ee 30%, #ec5fa8 60%, #ffb547 80%, #5b4bf5); opacity: .55; filter: drop-shadow(0 0 40px rgba(91,75,245,.6)); }
html[data-theme="aurora"] .float-card { background: rgba(20,22,52,.62); border: 1px solid var(--glass-line); color: #fff; backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(0,0,0,.4); }
html[data-theme="aurora"] .float-card span, html[data-theme="aurora"] .float-card em { color: rgba(226,229,255,.7); }
html[data-theme="aurora"] .float-card b { font-size: 40px; }
html[data-theme="aurora"] .float-card b.sm2 { display: block; font-size: 30px; }
html[data-theme="aurora"] .float-card polyline { stroke: #a5b4ff; }
html[data-theme="aurora"] .float-card .cov-bar { background: rgba(255,255,255,.12); }
html[data-theme="aurora"] .cov-bar b { background: var(--grad-cool); }
@media (prefers-reduced-motion: no-preference) {
  html[data-theme="aurora"] .float-card { animation: aurora-float 7s ease-in-out infinite; }
  html[data-theme="aurora"] .float-card.c2 { animation-delay: -2.3s; }
  html[data-theme="aurora"] .float-card.c3 { animation-delay: -4.6s; }
}
@keyframes aurora-float { 50% { transform: translateY(-10px); } }

/* proof strip – floating glass panel overlapping the hero */
html[data-theme="aurora"] .proof { background: linear-gradient(var(--night-2) 50%, var(--bg) 50%); }
html[data-theme="aurora"] .proof-grid { background: #fff; border-radius: 24px; box-shadow: 0 24px 60px rgba(17,20,45,.14); padding: 28px 32px; gap: 0; }
html[data-theme="aurora"] .proof-grid > div { padding: 4px 24px; border-left: 1px solid var(--line-soft); }
html[data-theme="aurora"] .proof-grid > div:first-child { border-left: 0; }
html[data-theme="aurora"] .proof b { font: 400 46px/1.1 var(--serif); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="aurora"] .proof span { color: var(--ink-2); font-weight: 500; }

/* sections */
html[data-theme="aurora"] .section { padding: 88px 0; }
html[data-theme="aurora"] .section.tint { background: linear-gradient(180deg, #efeeff, #f6f6fb); border: 0; }
html[data-theme="aurora"] .h2 { font: 400 clamp(34px, 4.2vw, 52px)/1.05 var(--serif); letter-spacing: -.5px; }
html[data-theme="aurora"] .features article { border-radius: var(--r); border-color: var(--line-soft); transition: .25s; position: relative; overflow: hidden; }
html[data-theme="aurora"] .features article:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(91,75,245,.14); }
html[data-theme="aurora"] .features .i { width: 48px; height: 48px; padding: 12px; border-radius: 14px; color: #fff; background: var(--grad); box-shadow: 0 10px 24px rgba(91,75,245,.35); }
html[data-theme="aurora"] .features article:nth-child(2) .i { background: var(--grad-cool); box-shadow: 0 10px 24px rgba(34,211,238,.35); }
html[data-theme="aurora"] .features article:nth-child(3) .i { background: var(--grad-warm); box-shadow: 0 10px 24px rgba(255,122,69,.35); }
html[data-theme="aurora"] .features h3 { font: 700 19px var(--sans); letter-spacing: -.01em; }
html[data-theme="aurora"] .area, html[data-theme="aurora"] .school-card { border-radius: var(--r); border-color: var(--line-soft); box-shadow: var(--shadow); position: relative; overflow: hidden; }
html[data-theme="aurora"] .area::before, html[data-theme="aurora"] .school-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--grad); opacity: 0; transition: .25s; }
html[data-theme="aurora"] .area:hover::before, html[data-theme="aurora"] .school-card:hover::before { opacity: 1; }
html[data-theme="aurora"] .area:hover, html[data-theme="aurora"] .school-card:hover { border-color: #d6d2ff; box-shadow: 0 22px 50px rgba(91,75,245,.16); transform: translateY(-5px); }
html[data-theme="aurora"] .area h3 { font: 400 40px var(--serif); }
html[data-theme="aurora"] .school-card h3 { font: 700 17px/1.3 var(--sans); }
html[data-theme="aurora"] .area.soon { box-shadow: none; background: transparent; }
html[data-theme="aurora"] .go { color: var(--green); }
html[data-theme="aurora"] .cta { position: relative; overflow: hidden; background: radial-gradient(500px 260px at 90% 0%, rgba(236,95,168,.6), transparent 70%), radial-gradient(500px 300px at 0% 100%, rgba(34,211,238,.45), transparent 70%), linear-gradient(120deg, #2a1fb8, #5b4bf5 50%, #8b4cf0); padding: 72px 0; }
html[data-theme="aurora"] .cta h2 { font: 400 44px/1.1 var(--serif); }
html[data-theme="aurora"] .cta p { color: rgba(238,240,255,.82); }

/* ---------- school & ranking hero ---------- */
html[data-theme="aurora"] .hero-school { padding: 30px 0 48px; }
html[data-theme="aurora"] .crumbs { color: rgba(226,229,255,.55); }
html[data-theme="aurora"] .crumbs a:hover { color: #fff; }
html[data-theme="aurora"] .crumbs [aria-current] { color: rgba(255,255,255,.9); }
html[data-theme="aurora"] .hero-school h1 { font: 400 clamp(38px, 5vw, 64px)/1.04 var(--serif); letter-spacing: -.5px; color: #fff; }
html[data-theme="aurora"] .meta { color: rgba(226,229,255,.75); }
html[data-theme="aurora"] .meta span + span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.35); margin-right: 10px; }
html[data-theme="aurora"] .avail { background: var(--glass); border-color: var(--glass-line); color: rgba(226,229,255,.85); backdrop-filter: blur(8px); }
html[data-theme="aurora"] .avail b { color: #fff; }
html[data-theme="aurora"] .avail:not(.off)::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #34d399; vertical-align: 1px; }
html[data-theme="aurora"] .avail.off { color: rgba(226,229,255,.5); background: transparent; }
html[data-theme="aurora"] .hero-school .btn-ghost { background: var(--glass); border-color: var(--glass-line); color: #fff; backdrop-filter: blur(8px); }
html[data-theme="aurora"] .hero-school .btn-ghost:hover { background: rgba(255,255,255,.16); }
html[data-theme="aurora"] .hero-school .lede { color: rgba(226,229,255,.78); }
html[data-theme="aurora"] .facts div { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 18px; backdrop-filter: blur(10px); }
html[data-theme="aurora"] .facts dt { color: rgba(226,229,255,.6); }
html[data-theme="aurora"] .facts dd { font: 400 28px var(--serif); color: #fff; }
html[data-theme="aurora"] .facts small { font-family: var(--sans); color: rgba(226,229,255,.6); }

/* ---------- layout ---------- */
html[data-theme="aurora"] .layout { padding-top: 36px; }
html[data-theme="aurora"] .toc { background: #fff; border: 1px solid var(--line-soft); border-radius: 18px; padding: 16px 12px; box-shadow: var(--shadow); }
html[data-theme="aurora"] .toc strong { padding-left: 10px; }
html[data-theme="aurora"] .toc a { border-left: 0; border-radius: 10px; padding: 8px 10px; font-weight: 500; }
html[data-theme="aurora"] .toc a:hover { background: var(--green-light); color: var(--green-dark); }

/* ---------- cards ---------- */
html[data-theme="aurora"] .card { border-radius: var(--r); border-color: var(--line-soft); padding: 32px; }
html[data-theme="aurora"] .card h2 { font: 400 36px/1.1 var(--serif); letter-spacing: -.3px; }
html[data-theme="aurora"] .card h3 { font: 700 17px var(--sans); letter-spacing: -.01em; margin-top: 34px; }
html[data-theme="aurora"] .insight { position: relative; overflow: hidden; background: linear-gradient(135deg, #f1efff 0%, #fff 55%, #fff4f9 100%); border-color: #e2ddff; }
html[data-theme="aurora"] .insight::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--grad); opacity: .12; filter: blur(30px); }
html[data-theme="aurora"] .insight p { font-size: 17.5px; line-height: 1.7; }
html[data-theme="aurora"] .insight strong { color: var(--green-dark); }
html[data-theme="aurora"] .exam { position: relative; overflow: hidden; border-top: 1px solid var(--line-soft); }
html[data-theme="aurora"] .exam::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--grad); }
html[data-theme="aurora"] .exam.alv::before { background: var(--grad-warm); }
html[data-theme="aurora"] .card.empty { background: repeating-linear-gradient(135deg, #fff, #fff 12px, #f8f8fd 12px, #f8f8fd 24px); }
html[data-theme="aurora"] .caution { background: linear-gradient(135deg, #fff6ec, #fff); border-color: #ffdcb8; }
html[data-theme="aurora"] .banner { border-radius: 16px; }

/* ---------- stats ---------- */
html[data-theme="aurora"] .stat { position: relative; background: linear-gradient(160deg, #f4f2ff, #fbfbff); border: 1px solid #e8e5ff; border-radius: 18px; padding: 20px 22px; }
html[data-theme="aurora"] .alv .stat { background: linear-gradient(160deg, #fff4e8, #fffbf6); border-color: #ffe3c6; }
html[data-theme="aurora"] .stat-label { font-weight: 700; font-size: 12.5px; }
html[data-theme="aurora"] .stat-value { font: 400 54px/1.05 var(--serif); letter-spacing: -.5px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="aurora"] .alv .stat-value { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="aurora"] .stat-value.plain, html[data-theme="aurora"] .alv .stat-value.plain { background: none; color: var(--ink); }
html[data-theme="aurora"] .delta { border-radius: 8px; }
html[data-theme="aurora"] .delta.up::before { content: "▲ "; font-size: 9px; }
html[data-theme="aurora"] .delta.down::before { content: "▼ "; font-size: 9px; }

/* ---------- tables ---------- */
html[data-theme="aurora"] .table-wrap { border-radius: 16px; border-color: var(--line-soft); }
html[data-theme="aurora"] .data thead th { background: #f7f6ff; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
html[data-theme="aurora"] .data tbody tr { transition: background .15s; }
html[data-theme="aurora"] .data tbody tr:hover { background: #f8f7ff; }
html[data-theme="aurora"] .data a { color: var(--green-dark); font-weight: 700; }
html[data-theme="aurora"] .data a:hover { text-decoration: underline; text-decoration-color: #c9c2ff; text-underline-offset: 3px; }
html[data-theme="aurora"] .rank-table .rank { width: 72px; }
html[data-theme="aurora"] .rank-table .rank,
html[data-theme="aurora"] .rank-table tbody tr:nth-child(-n+3) .rank { font: 700 15px var(--sans); color: var(--ink-2); }
html[data-theme="aurora"] .rank-table tbody tr:nth-child(-n+3) .rank { color: transparent; position: relative; }
html[data-theme="aurora"] .rank-table tbody tr:nth-child(-n+3) .rank::after {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  color: #fff; font: 700 15px var(--sans); box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
html[data-theme="aurora"] .rank-table tbody tr:nth-child(1) .rank::after { content: "1"; background: linear-gradient(135deg, #ffd66b, #f59e0b); }
html[data-theme="aurora"] .rank-table tbody tr:nth-child(2) .rank::after { content: "2"; background: linear-gradient(135deg, #e2e8f0, #94a3b8); }
html[data-theme="aurora"] .rank-table tbody tr:nth-child(3) .rank::after { content: "3"; background: linear-gradient(135deg, #f5b48a, #c2652a); }
html[data-theme="aurora"] .np { border-radius: 8px; background: #f0f0f7; }
html[data-theme="aurora"] .track { height: 10px; background: #efeff7; }
html[data-theme="aurora"] .track b { background: var(--grad); box-shadow: 0 2px 8px rgba(91,75,245,.3); }
html[data-theme="aurora"] .meter.gold .track b { background: var(--grad-warm); box-shadow: 0 2px 8px rgba(255,122,69,.3); }
html[data-theme="aurora"] .bm { top: -5px; height: 20px; width: 3px; background: var(--ink); opacity: .7; }
html[data-theme="aurora"] .note { background: #f5f4ff; border: 1px solid #ebe8ff; border-radius: 14px; }
html[data-theme="aurora"] .note .i { color: var(--green); }
html[data-theme="aurora"] .combined-grades summary { cursor: pointer; margin-top: 18px; }

/* ---------- charts (override inline SVG presentation attributes) ---------- */
html[data-theme="aurora"] .chart { border-radius: 16px; background: linear-gradient(180deg, #fbfbff, #fff); }
html[data-theme="aurora"] .trend polyline:not(.bench) { stroke: #5b4bf5; stroke-width: 3; }
html[data-theme="aurora"] .trend polygon { fill: #7c6cff; opacity: .14; }
html[data-theme="aurora"] .trend circle { stroke: #5b4bf5; }
html[data-theme="aurora"] .alv .trend polyline:not(.bench) { stroke: #ff7a45; }
html[data-theme="aurora"] .alv .trend polygon { fill: #ff9a5c; }
html[data-theme="aurora"] .alv .trend circle { stroke: #ff7a45; }
html[data-theme="aurora"] .trend .bench { stroke: #a3a7c2; }
html[data-theme="aurora"] .k1 { background: var(--grad); }
html[data-theme="aurora"] .k1.gold { background: var(--grad-warm); }
html[data-theme="aurora"] .k2 { background: #a3a7c2; }

/* ---------- prose ---------- */
html[data-theme="aurora"] .ticks .i { color: #fff; background: var(--grad); }
html[data-theme="aurora"] .sources dt { color: var(--green); }

/* ---------- footer ---------- */
html[data-theme="aurora"] .site-footer { position: relative; overflow: hidden; background: radial-gradient(600px 260px at 85% 0%, rgba(91,75,245,.35), transparent 70%), var(--night); color: rgba(226,229,255,.75); }
html[data-theme="aurora"] .foot strong { font: 400 28px var(--serif); }
html[data-theme="aurora"] .foot p, html[data-theme="aurora"] .foot a { color: rgba(226,229,255,.6); }
html[data-theme="aurora"] .foot a:hover { color: #fff; }
html[data-theme="aurora"] .legal { border-top-color: rgba(255,255,255,.08); color: rgba(226,229,255,.45); }

/* ---------- theme picker (header select themed for the night bar) ---------- */
html[data-theme="aurora"] .theme-select { background-color: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #fff; }
html[data-theme="aurora"] .theme-select option { color: var(--ink); }
html[data-theme="aurora"] .theme-card[aria-pressed="true"] { border-color: var(--green); box-shadow: 0 0 0 4px rgba(91,75,245,.18), 0 20px 50px rgba(91,75,245,.16); }
html[data-theme="aurora"] .theme-card strong { font: 400 26px var(--serif); }

@media (max-width: 960px) {
  html[data-theme="aurora"] .proof-grid > div:nth-child(3) { border-left: 0; }
  html[data-theme="aurora"] .proof-grid > div { padding: 10px 16px; }
}
@media (max-width: 600px) {
  html[data-theme="aurora"] .hero { padding: 56px 0 64px; }
  html[data-theme="aurora"] .proof-grid { margin: 0 16px; padding: 18px 8px; }
  html[data-theme="aurora"] .card { padding: 22px; }
  html[data-theme="aurora"] .stat-value { font-size: 44px; }
  html[data-theme="aurora"] .card h2 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="aurora"] .hero::after, html[data-theme="aurora"] .float-card { animation: none !important; }
}
