:root{
  --blue:#1E3A8A;
  --blue-dark:#152a63;
  --blue-light:#3956a8;
  --teal:#00BFA5;
  --teal-dark:#00a591;
  --bg:#F8FAFC;
  --bg-alt:#F1F5F9;
  --text:#1F2937;
  --heading:#0F172A;
  --red:#DC2626;
  --red-bg:#FEF2F2;
  --teal-bg:#E6FBF7;
  --border:#E2E8F0;
  --radius-lg:20px;
  --radius-md:14px;
  --radius-sm:10px;
  --shadow-sm:0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:0 4px 14px rgba(15,23,42,0.08);
  --shadow-lg:0 12px 32px rgba(15,23,42,0.12);
  --rail-w:72px;
  --rail-w-open:248px;
}
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  font-family:'Inter',sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
  overflow-x:hidden;
}
h1,h2,h3,h4,.display{
  font-family:'Space Grotesk',sans-serif;
  color:var(--heading);
  font-weight:700;
  letter-spacing:-0.01em;
}
img{max-width:100%;display:block;}
button{font-family:inherit;cursor:pointer;border:none;background:none;}
a{text-decoration:none;color:inherit;}
ul{list-style:none;}
:focus-visible{outline:2px solid var(--teal);outline-offset:2px;border-radius:4px;}

/* ============ LAYOUT SHELL ============ */
.app{display:flex;min-height:100vh;}

/* ---- Floating side rail ---- */
.rail{
  position:fixed;top:16px;left:16px;bottom:16px;
  width:var(--rail-w);
  background:var(--blue);
  border-radius:22px;
  display:flex;flex-direction:column;
  align-items:flex-start;
  padding:20px 0;
  box-shadow:var(--shadow-lg);
  z-index:100;
  transition:width .28s cubic-bezier(.4,0,.2,1);
  overflow:hidden;
}
.rail:hover{width:var(--rail-w-open);}
.rail-logo{
  display:flex;align-items:center;gap:12px;
  padding:0 22px 22px;margin-bottom:8px;
  border-bottom:1px solid rgba(255,255,255,0.12);
  width:100%;
}
.rail-logo .mark{
  width:32px;height:32px;border-radius:9px;background:var(--teal);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
  font-family:'Space Grotesk';font-weight:700;color:var(--blue-dark);font-size:15px;
}
.rail-logo .word{color:#fff;font-family:'Space Grotesk';font-weight:700;font-size:16px;white-space:nowrap;opacity:0;transition:opacity .2s;}
.rail:hover .rail-logo .word{opacity:1;transition-delay:.05s;}
.rail-nav{display:flex;flex-direction:column;gap:4px;width:100%;padding:0 12px;}
.rail-item{
  display:flex;align-items:center;gap:14px;
  padding:11px 11px;border-radius:12px;
  color:rgba(255,255,255,0.65);
  width:100%;white-space:nowrap;
  transition:background .15s,color .15s;
}
.rail-item svg{flex-shrink:0;width:20px;height:20px;}
.rail-item span{opacity:0;transition:opacity .2s;font-size:14px;font-weight:500;}
.rail:hover .rail-item span{opacity:1;transition-delay:.05s;}
.rail-item:hover{background:rgba(255,255,255,0.08);color:#fff;}
.rail-item.active{background:var(--teal);color:var(--blue-dark);font-weight:600;}
.rail-spacer{flex:1;}
.rail-bottom{padding:0 12px;width:100%;}

/* ---- Top bar ---- */
.topbar{
  position:fixed;top:16px;right:16px;left:calc(var(--rail-w) + 32px);
  height:56px;
  background:rgba(248,250,252,0.85);
  backdrop-filter:blur(12px);
  border:1px solid var(--border);
  border-radius:16px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 18px;
  z-index:90;
  box-shadow:var(--shadow-sm);
  transition:left .28s cubic-bezier(.4,0,.2,1);
}
.search-box{
  display:flex;align-items:center;gap:10px;
  background:var(--bg-alt);border-radius:10px;
  padding:8px 14px;width:340px;
  border:1px solid transparent;
}
.search-box:focus-within{border-color:var(--teal);}
.search-box input{background:none;border:none;font-size:14px;width:100%;color:var(--text);}
.search-box svg{flex-shrink:0;color:#94a3b8;width:16px;height:16px;}
.topbar-right{display:flex;align-items:center;gap:14px;}
.streak-pill{
  display:flex;align-items:center;gap:6px;
  background:var(--teal-bg);color:var(--teal-dark);
  font-size:13px;font-weight:600;padding:6px 12px;border-radius:20px;
}
.avatar{
  width:36px;height:36px;border-radius:50%;
  background:linear-gradient(135deg,var(--blue),var(--teal));
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-weight:600;font-size:13px;font-family:'Space Grotesk';
}

.main{
  margin-left:calc(var(--rail-w) + 32px);
  padding-top:35px;
  width:100%;
  min-height:100vh;
  transition:margin-left .28s cubic-bezier(.4,0,.2,1);
}

.view{display:none;}
.view.active{display:block;animation:fadeUp .35s ease both;}
@keyframes fadeUp{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);}}

.container{max-width:1280px;margin:0 auto;padding:0 32px 64px;}

/* ============ HOMEPAGE ============ */
.hero{
  position:relative;
  padding:64px 32px 10px;
  margin-bottom:3px;
  overflow:hidden;
  border-radius:0 0 32px 32px;
}
.hero-mesh{
  position:absolute;inset:0;z-index:0;
  background:
    radial-gradient(ellipse 600px 400px at 15% 20%, rgba(0,191,165,0.18), transparent 60%),
    radial-gradient(ellipse 700px 500px at 85% 10%, rgba(30,58,138,0.16), transparent 60%),
    radial-gradient(ellipse 500px 400px at 50% 90%, rgba(0,191,165,0.10), transparent 60%),
    var(--bg);
  animation:meshDrift 16s ease-in-out infinite alternate;
}
@keyframes meshDrift{
  0%{background-position:0% 0%, 0% 0%, 0% 0%;}
  100%{background-position:5% 8%, -5% -6%, 3% -4%;}
}
.hero-inner{position:relative;z-index:1;max-width:1280px;margin:0 auto;}
.eyebrow{
  display:inline-flex;align-items:center;gap:8px;
  font-size:13px;font-weight:600;color:var(--blue);
  background:rgba(30,58,138,0.07);
  padding:7px 14px;border-radius:20px;margin-bottom:22px;
}
.eyebrow .dot{width:6px;height:6px;border-radius:50%;background:var(--teal);}
.hero h1{
  font-size:clamp(2.4rem,4.6vw,4rem);
  line-height:1.06;
  max-width:780px;
  margin-bottom:20px;
}
.hero h1 .accent{color:var(--teal);}
.hero p.lede{
  font-size:18px;color:#475569;max-width:560px;margin-bottom:32px;
}
.hero-ctas{display:flex;gap:14px;margin-bottom:48px;flex-wrap:wrap;}
.btn{
  font-weight:600;font-size:15px;padding:14px 26px;border-radius:12px;
  display:inline-flex;align-items:center;gap:8px;
  transition:transform .15s, box-shadow .15s, background .15s;
}
.btn:active{transform:scale(0.97);}
.btn-primary{background:var(--teal);color:#06302a;box-shadow:0 6px 18px rgba(0,191,165,0.35);}
.btn-primary:hover{background:var(--teal-dark);box-shadow:0 8px 22px rgba(0,191,165,0.45);transform:translateY(-1px);}
.btn-secondary{background:var(--blue);color:#fff;}
.btn-secondary:hover{background:var(--blue-dark);transform:translateY(-1px);}
.btn-ghost{background:#fff;color:var(--heading);border:1px solid var(--border);}
.btn-ghost:hover{border-color:var(--teal);}

.hero-stats{display:flex;gap:40px;flex-wrap:wrap;}
.hero-stat .num{font-family:'Space Grotesk';font-size:28px;font-weight:700;color:var(--blue);}
.hero-stat .num .unit{color:var(--teal);}
.hero-stat .label{font-size:13px;color:#64748b;margin-top:2px;}

/* ---- Section heading pattern ---- */
.section{padding:56px 0;}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:28px;flex-wrap:wrap;gap:14px;}
.section-head h2{font-size:28px;}
.section-head p{color:#64748b;font-size:15px;margin-top:6px;}
.view-all{font-size:14px;font-weight:600;color:var(--blue);display:flex;align-items:center;gap:4px;}
.view-all:hover{color:var(--teal-dark);}

/* ---- Bento grid ---- */
.bento{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
}
.bento-card{
  border-radius:var(--radius-lg);
  padding:26px;
  position:relative;
  overflow:hidden;
  cursor:pointer;
  transition:transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
  display:flex;flex-direction:column;
  min-height:168px;
}
.bento-card:hover{transform:translateY(-4px);}
.bento-card .icon{
  width:44px;height:44px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  margin-bottom:auto;
}
.bento-card .icon svg{width:22px;height:22px;}
.bento-card h3{font-size:18px;margin-bottom:4px;}
.bento-card .count{font-size:13px;font-weight:500;}
.bento-card .arrow{
  position:absolute;top:22px;right:22px;
  width:30px;height:30px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  opacity:0;transform:translate(-4px,4px);
  transition:opacity .2s,transform .2s;
}
.bento-card:hover .arrow{opacity:1;transform:translate(0,0);}

/* size variants */
.bento-card.lg{grid-column:span 2;grid-row:span 2;min-height:280px;}
.bento-card.md{grid-column:span 2;}
.bento-card.sm{grid-column:span 1;}

/* style variants */
.bento-card.style-solid{
  background:var(--blue);color:#fff;
  border-left:5px solid var(--teal);
  box-shadow:var(--shadow-md);
}
.bento-card.style-solid .icon{background:rgba(255,255,255,0.12);color:#fff;}
.bento-card.style-solid .count{color:rgba(255,255,255,0.7);}
.bento-card.style-solid .arrow{background:rgba(255,255,255,0.15);color:#fff;}
.bento-card.style-solid:hover{box-shadow:0 16px 36px rgba(30,58,138,0.35);}

.bento-card.style-glass{
  background:linear-gradient(150deg, rgba(255,255,255,0.75), rgba(255,255,255,0.4));
  backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,0.6);
  box-shadow:var(--shadow-md);
}
.bento-card.style-glass::before{
  content:'';position:absolute;inset:0;z-index:-1;
  background:radial-gradient(circle at 80% 0%, rgba(0,191,165,0.25), transparent 60%);
}
.bento-card.style-glass .icon{background:rgba(0,191,165,0.15);color:var(--teal-dark);}
.bento-card.style-glass .count{color:#64748b;}
.bento-card.style-glass .arrow{background:rgba(30,58,138,0.08);color:var(--blue);}
.bento-card.style-glass:hover{border-color:var(--teal);box-shadow:0 0 0 1px var(--teal), var(--shadow-lg);}

.bento-card.style-outline{
  background:#fff;
  border:1.5px solid var(--border);
}
.bento-card.style-outline .icon{background:var(--bg-alt);color:var(--blue);}
.bento-card.style-outline .count{color:#64748b;}
.bento-card.style-outline .arrow{background:var(--bg-alt);color:var(--blue);}
.bento-card.style-outline:hover{border-color:var(--teal);box-shadow:0 0 0 3px var(--teal-bg), var(--shadow-sm);}

/* ---- Featured carousel ---- */
.carousel{display:flex;gap:18px;overflow-x:auto;padding-bottom:8px;scrollbar-width:thin;}
.carousel::-webkit-scrollbar{height:6px;}
.carousel::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px;}
.exam-tile{
  flex:0 0 280px;background:#fff;border-radius:var(--radius-md);
  border:1px solid var(--border);padding:20px;
  transition:transform .2s, box-shadow .2s, border-color .2s;
  cursor:pointer;
}
.exam-tile:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:var(--teal);}
.exam-tile .badge-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;}
.diff-badge{font-size:11px;font-weight:700;padding:4px 9px;border-radius:6px;text-transform:uppercase;letter-spacing:.04em;}
.diff-badge.easy{background:#DCFCE7;color:#166534;}
.diff-badge.medium{background:#FEF3C7;color:#92400E;}
.diff-badge.hard{background:var(--red-bg);color:var(--red);}
.exam-tile .cat-tag{font-size:12px;color:var(--teal-dark);font-weight:600;}
.exam-tile h4{font-size:16px;margin-bottom:10px;line-height:1.3;}
.exam-tile .meta{display:flex;gap:14px;font-size:12.5px;color:#64748b;}
.exam-tile .meta span{display:flex;align-items:center;gap:5px;}
.exam-tile .meta svg{width:13px;height:13px;}

/* ---- Stats band ---- */
.stats-band{
  background:var(--blue);
  border-radius:var(--radius-lg);
  padding:44px 40px;
  display:grid;grid-template-columns:repeat(4,1fr);gap:24px;
  position:relative;overflow:hidden;
}
.stats-band::before{
  content:'';position:absolute;inset:0;
  background:radial-gradient(circle at 90% 100%, rgba(0,191,165,0.25), transparent 55%);
}
.stat-card{position:relative;z-index:1;}
.stat-card .num{font-family:'Space Grotesk';font-size:36px;font-weight:700;color:#fff;}
.stat-card .num .accent{color:var(--teal);}
.stat-card .label{color:rgba(255,255,255,0.65);font-size:14px;margin-top:4px;}

/* ---- Testimonials ---- */
.testi-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;}
.testi-card{
  background:#fff;border-radius:var(--radius-md);padding:24px;
  border:1px solid var(--border);
}
.testi-card .stars{color:var(--teal);font-size:14px;margin-bottom:12px;letter-spacing:2px;}
.testi-card p.quote{font-size:14.5px;color:var(--text);margin-bottom:18px;line-height:1.6;}
.testi-person{display:flex;align-items:center;gap:10px;}
.testi-person .av{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,var(--blue),var(--teal));display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;font-weight:600;font-family:'Space Grotesk';}
.testi-person .name{font-size:13.5px;font-weight:600;color:var(--heading);}
.testi-person .role{font-size:12px;color:#64748b;}

/* ---- Final CTA ---- */
.final-cta{
  background:linear-gradient(120deg, var(--blue), var(--blue-light));
  border-radius:var(--radius-lg);
  padding:56px;text-align:center;position:relative;overflow:hidden;
}
.final-cta::after{
  content:'';position:absolute;inset:0;
  background:radial-gradient(ellipse 500px 300px at 50% 0%, rgba(0,191,165,0.3), transparent 60%);
}
.final-cta h2{color:#fff;font-size:30px;margin-bottom:12px;position:relative;z-index:1;}
.final-cta p{color:rgba(255,255,255,0.75);margin-bottom:28px;position:relative;z-index:1;}
.final-cta .btn-primary{position:relative;z-index:1;}

/* ============ BREADCRUMB ============ */
.breadcrumb{display:flex;align-items:center;gap:8px;font-size:13.5px;color:#64748b;margin-bottom:24px;flex-wrap:wrap;}
.breadcrumb a:hover{color:var(--blue);}
.breadcrumb .sep{color:#cbd5e1;}
.breadcrumb .current{color:var(--heading);font-weight:600;}

/* ============ CATEGORY PAGE ============ */
.page-head .kicker{color:var(--teal-dark);font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:.05em;}
.page-head h1{font-size:34px;margin-bottom:10px;}
.page-head p{color:#64748b;font-size:15.5px;max-width:640px;}

.filter-row{display:flex;gap:10px;margin-bottom:28px;flex-wrap:wrap;}
.chip{
  font-size:13.5px;font-weight:600;padding:8px 16px;border-radius:20px;
  background:#fff;border:1.5px solid var(--border);color:#475569;
  transition:all .15s;
}
.chip:hover{border-color:var(--teal);}
.chip.active{background:var(--blue);border-color:var(--blue);color:#fff;}

.subcat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;}
.subcat-card{
  background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);
  padding:22px;display:flex;gap:16px;align-items:flex-start;
  transition:transform .2s,box-shadow .2s,border-color .2s;cursor:pointer;
}
.subcat-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:var(--teal);}
.subcat-card .icon-badge{
  width:46px;height:46px;border-radius:12px;background:var(--teal-bg);color:var(--teal-dark);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.subcat-card .icon-badge svg{width:22px;height:22px;}
.subcat-card h4{font-size:16px;margin-bottom:5px;}
.subcat-card p{font-size:13px;color:#64748b;}

/* ============ EXAM LIST PAGE ============ */
.exam-list-layout{display:grid;grid-template-columns:280px 1fr;gap:32px;align-items:start;}
.sticky-panel{
  position:sticky;top:104px;
  background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);
  padding:24px;
}
.sticky-panel h3{font-size:17px;margin-bottom:6px;}
.sticky-panel .sub{font-size:13px;color:#64748b;margin-bottom:20px;}
.stat-row{display:flex;justify-content:space-between;padding:11px 0;border-top:1px solid var(--bg-alt);font-size:13.5px;}
.stat-row:first-of-type{border-top:none;}
.stat-row .k{color:#64748b;}
.stat-row .v{font-weight:600;color:var(--heading);}
.prereq-list{margin-top:18px;display:flex;flex-direction:column;gap:8px;}
.prereq-item{display:flex;gap:8px;align-items:flex-start;font-size:13px;color:#475569;}
.prereq-item svg{width:15px;height:15px;color:var(--teal);flex-shrink:0;margin-top:1px;}

.test-list{display:flex;flex-direction:column;gap:12px;}
.test-row{
  background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);
  padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px;
  transition:border-color .15s, box-shadow .15s;cursor:pointer;flex-wrap:wrap;
}
.test-row:hover{border-color:var(--teal);box-shadow:var(--shadow-sm);}
.test-row .left{display:flex;flex-direction:column;gap:6px;}
.test-row h4{font-size:15.5px;}
.test-row .meta{display:flex;gap:12px;font-size:12.5px;color:#64748b;flex-wrap:wrap;}
.test-row .meta span{display:flex;align-items:center;gap:4px;}
.test-row .meta svg{width:13px;height:13px;}
.test-row .right{display:flex;align-items:center;gap:14px;}

/* ============ TEST INTERFACE ============ */
.test-shell{display:grid;grid-template-columns:1fr 240px;gap:28px;align-items:start;}
.test-top{display:flex;align-items:center;gap:16px;margin-bottom:28px;}
.progress-track{flex:1;height:8px;background:var(--bg-alt);border-radius:5px;overflow:hidden;}
.progress-fill{height:100%;background:var(--teal);border-radius:5px;transition:width .4s cubic-bezier(.4,0,.2,1);}
.q-pill{
  background:var(--blue);color:#fff;font-size:13px;font-weight:700;
  padding:6px 14px;border-radius:20px;white-space:nowrap;font-family:'Space Grotesk';
}
.timer-pill{display:flex;align-items:center;gap:6px;font-size:13.5px;font-weight:600;color:var(--blue);background:var(--teal-bg);padding:6px 13px;border-radius:20px;}

.question-card{background:#fff;border-radius:var(--radius-lg);border:1px solid var(--border);padding:36px;box-shadow:var(--shadow-sm);}
.question-card .q-text{font-size:19px;font-weight:600;color:var(--heading);margin-bottom:26px;line-height:1.4;font-family:'Space Grotesk';}
.options{display:flex;flex-direction:column;gap:12px;}
.option-card{
  border:2px solid var(--border);border-radius:var(--radius-md);
  padding:16px 18px;display:flex;align-items:center;gap:14px;
  transition:border-color .15s, background .15s, transform .1s;
  cursor:pointer;font-size:15px;
}
.option-card:hover{border-color:var(--blue-light);background:var(--bg-alt);}
.option-card .letter{
  width:30px;height:30px;border-radius:8px;background:var(--bg-alt);color:#64748b;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex-shrink:0;
  font-family:'Space Grotesk';transition:background .15s,color .15s;
}
.option-card.correct{border-color:var(--teal);background:var(--teal-bg);box-shadow:0 0 0 3px rgba(0,191,165,0.15);}
.option-card.correct .letter{background:var(--teal);color:#fff;}
.option-card.incorrect{border-color:var(--red);background:var(--red-bg);}
.option-card.incorrect .letter{background:var(--red);color:#fff;}
.option-card.disabled{cursor:default;}
.option-card.disabled:not(.correct):not(.incorrect):hover{background:none;border-color:var(--border);}

.explain-panel{
  margin-top:0;max-height:0;overflow:hidden;
  transition:max-height .35s ease, margin-top .35s ease, opacity .3s ease;
  opacity:0;
}
.explain-panel.open{max-height:200px;margin-top:18px;opacity:1;}
.explain-inner{
  background:var(--bg-alt);border-left:4px solid var(--teal);
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  padding:16px 20px;font-size:14px;color:#475569;
}
.explain-inner strong{color:var(--heading);}

.test-nav-actions{display:flex;justify-content:space-between;margin-top:24px;}

.sidebar-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);padding:20px;margin-bottom:18px;}
.sidebar-card h5{font-size:13px;font-weight:700;color:var(--heading);margin-bottom:14px;text-transform:uppercase;letter-spacing:.04em;}
.minimap{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;}
.mm-dot{
  aspect-ratio:1;border-radius:7px;background:var(--bg-alt);color:#94a3b8;
  display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;
  cursor:pointer;transition:all .15s;
}
.mm-dot.current{background:var(--blue);color:#fff;}
.mm-dot.answered-correct{background:var(--teal);color:#fff;}
.mm-dot.answered-incorrect{background:var(--red);color:#fff;}

/* ============ RESULTS DASHBOARD ============ */
.results-hero{
  background:linear-gradient(135deg,var(--blue),var(--blue-light));
  border-radius:var(--radius-lg);padding:44px;display:flex;align-items:center;gap:40px;
  position:relative;overflow:hidden;margin-bottom:32px;
}
.results-hero::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 100% 0%, rgba(0,191,165,0.3), transparent 55%);}
.ring-wrap{position:relative;z-index:1;flex-shrink:0;}
.results-hero-text{position:relative;z-index:1;}
.results-hero-text .tag{color:rgba(255,255,255,0.7);font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px;}
.results-hero-text h2{color:#fff;font-size:30px;margin-bottom:10px;}
.results-hero-text p{color:rgba(255,255,255,0.8);font-size:15px;max-width:420px;}

.results-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:32px;}
.metric-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);padding:20px;}
.metric-card .icon{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;margin-bottom:14px;}
.metric-card .num{font-family:'Space Grotesk';font-size:24px;font-weight:700;color:var(--heading);}
.metric-card .label{font-size:13px;color:#64748b;margin-top:2px;}

.breakdown-section{display:grid;grid-template-columns:1.3fr 1fr;gap:24px;}
.breakdown-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);padding:26px;}
.breakdown-card h3{font-size:17px;margin-bottom:18px;}
.topic-row{margin-bottom:16px;}
.topic-row .top{display:flex;justify-content:space-between;font-size:13.5px;margin-bottom:6px;}
.topic-row .top .name{font-weight:600;color:var(--heading);}
.topic-row .top .pct{color:#64748b;}
.bar-track{height:8px;background:var(--bg-alt);border-radius:5px;overflow:hidden;}
.bar-fill{height:100%;border-radius:5px;}
.bar-fill.good{background:var(--teal);}
.bar-fill.weak{background:#F59E0B;}
.bar-fill.bad{background:var(--red);}

.rec-item{display:flex;gap:12px;padding:14px 0;border-top:1px solid var(--bg-alt);}
.rec-item:first-child{border-top:none;padding-top:0;}
.rec-item .ricon{width:32px;height:32px;border-radius:9px;background:var(--teal-bg);color:var(--teal-dark);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.rec-item h5{font-size:14px;margin-bottom:3px;}
.rec-item p{font-size:12.5px;color:#64748b;}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px){
  .bento{grid-template-columns:repeat(2,1fr);}
  .bento-card.lg{grid-column:span 2;}
  .testi-grid{grid-template-columns:1fr;}
  .stats-band{grid-template-columns:repeat(2,1fr);}
  .exam-list-layout{grid-template-columns:1fr;}
  .sticky-panel{position:static;}
  .test-shell{grid-template-columns:1fr;}
  .breakdown-section{grid-template-columns:1fr;}
  .results-grid{grid-template-columns:repeat(2,1fr);}
  .subcat-grid{grid-template-columns:repeat(2,1fr);}
}
@media (max-width: 720px){
  .rail{display:none;}
  .topbar{left:16px;}
  .main{margin-left:0;}
  .search-box{width:160px;}
  .bento{grid-template-columns:1fr;}
  .bento-card.lg,.bento-card.md{grid-column:span 1;}
  .stats-band{grid-template-columns:1fr 1fr;}
  .hero{padding:40px 18px 36px;border-radius:0 0 24px 24px;}
  .container{padding:0 16px 48px;}
  .results-hero{flex-direction:column;text-align:center;}
  .results-grid{grid-template-columns:1fr 1fr;}
  .subcat-grid{grid-template-columns:1fr;}
}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:0.01ms !important; transition-duration:0.01ms !important;}
}
/* ==========================================
   SCHOOL PAGE STYLES
   ========================================== */

/* School Stats */
.school-stats {
    display: flex;
    gap: 32px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.school-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.school-stat .num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--blue);
    line-height: 1;
}

.school-stat .label {
    font-size: 13px;
    color: #64748b;
}

/* Section Badge */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--teal-bg);
    color: var(--teal-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 20px;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 18px;
}

/* Course Card */
.course-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s;
    animation: fadeUp .35s ease both;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--teal);
}

.course-header {
    padding: 22px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: background .2s;
    height: 100px;
}

.course-header:hover {
    background: var(--border);
}

.course-card.active .course-header {
    background: var(--blue);
    border-bottom-color: var(--teal);
}

.course-card.active .course-header h3,
.course-card.active .course-header .course-count span {
    color: #fff;
}

.course-card.active .course-header .course-count svg {
    color: rgba(255,255,255,0.8);
}

.course-card.active .course-icon {
    background: var(--teal);
    color: var(--blue-dark);
}

.course-card.active .toggle-icon {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.course-title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.course-icon {
    width: 52px;
    height: 52px;
    background: var(--teal-bg);
    color: var(--teal-dark);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}

.course-icon svg {
    width: 26px;
    height: 26px;
}

.course-title {
    flex: 1;
}

.course-title h3 {
    font-size: 17px;
    margin-bottom: 4px;
    transition: color .2s;
}

.course-count {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    transition: color .2s;
}

.course-count svg {
    color: var(--teal);
    transition: color .2s;
}

.toggle-icon {
    width: 34px;
    height: 34px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}

.toggle-icon svg {
    width: 18px;
    height: 18px;
    color: #64748b;
    transition: transform .3s ease, color .2s;
}

.course-card.active .toggle-icon svg {
    transform: rotate(180deg);
}

/* Subjects Dropdown */
.subjects-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s cubic-bezier(.4,0,.2,1);
}

.course-card.active .subjects-dropdown {
    max-height: 2000px;
}

.subjects-list {
    padding: 18px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subject-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    transition: all .2s;
    text-decoration: none;
    color: var(--text);
    border: 1.5px solid transparent;
    position: relative;
    overflow: hidden;
}

.subject-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--teal);
    transform: scaleY(0);
    transition: transform .2s;
}

.subject-item:hover {
    background: #fff;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-bg);
    transform: translateX(4px);
}

.subject-item:hover::before {
    transform: scaleY(1);
}

.subject-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.subject-icon {
    width: 28px;
    height: 28px;
    background: var(--teal-bg);
    color: var(--teal-dark);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.subject-icon svg {
    width: 14px;
    height: 14px;
}

.subject-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--heading);
}

.subject-arrow {
    color: #94a3b8;
    transition: color .2s, transform .2s;
}

.subject-item:hover .subject-arrow {
    color: var(--teal);
    transform: translateX(4px);
}

.no-subjects {
    text-align: center;
    padding: 28px 16px;
    color: #94a3b8;
}

.no-subjects svg {
    margin: 0 auto 12px;
    opacity: 0.5;
}

.no-subjects p {
    font-size: 14px;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 64px 32px;
    background: #fff;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
}

.empty-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
    background: var(--bg-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon svg {
    width: 44px;
    height: 44px;
    color: #94a3b8;
}

.empty-state h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.empty-state p {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive for School Page */
@media (max-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 720px) {
    .school-stats {
        gap: 24px;
    }
    
    .school-stat .num {
        font-size: 24px;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .course-header {
        padding: 18px;
    }
    
    .course-icon {
        width: 44px;
        height: 44px;
    }
    
    .course-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .course-title h3 {
        font-size: 15px;
    }
    
    .subjects-list {
        padding: 14px 18px 18px;
    }
    
    .subject-item {
        padding: 10px 12px;
    }
    
    .empty-state {
        padding: 48px 24px;
    }
}