:root{
  --primary:#F5821F;
  --primary-dark:#D96C10;
  --secondary:#1E3A5F;
  --secondary-light:#2C4F7C;
  --white:#FFFFFF;
  --bg-light:#F4F7FA;
  --text:#5B6B7C;
  --text-dark:#1E293B;
  --line: rgba(30,58,95,0.12);
  --shadow: 0 18px 40px -18px rgba(30,58,95,0.25);
  --radius: 16px;
  --mint:#0E8C6F;
  --mint-bright:#2FBF9F;
  --sun:#FFC857;
  --sky:#3DA9FC;
  --pink:#FF6B9D;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  font-family:'Poppins', sans-serif;
  color:var(--text);
  background:var(--bg-light);
  overflow-x:hidden;
}
h1,h2,h3,.brand,.pill,.step-num{
  font-family:'Nunito', sans-serif;
}
a{text-decoration:none; color:inherit;}
img,svg{display:block;}
.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:0 32px;
}
@media (prefers-reduced-motion: reduce){
  *{animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important;}
}

/* ---------- Buttons ---------- */
.btn{
  font-family:'Poppins', sans-serif;
  font-weight:700;
  font-size:15px;
  padding:11px 22px;
  border-radius:999px;
  border:2px solid transparent;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:transform .15s ease, box-shadow .15s ease;
}
.btn:hover{transform:translateY(-2px);}
.btn:focus-visible{outline:3px solid var(--secondary); outline-offset:2px;}
.btn-ghost{
  background:transparent; color:var(--text-dark); border-color:var(--line);
}
.btn-ghost:hover{border-color:var(--secondary);}
.btn-primary{
  background:var(--primary); color:var(--white);
  box-shadow:0 8px 0 0 var(--primary-dark);
}
.btn-primary:hover{box-shadow:0 5px 0 0 var(--primary-dark); transform:translateY(1px);}
.btn-primary:active{box-shadow:0 2px 0 0 var(--primary-dark); transform:translateY(4px);}

/* ---------- Hero ---------- */
.hero{
  position:relative;
  padding:84px 0 60px;
  overflow:hidden;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap:40px;
  align-items:center;
  position:relative;
  z-index:2;
}
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--white); border:1px solid var(--line);
  padding:7px 16px; border-radius:999px;
  font-weight:800; font-size:13px; letter-spacing:.03em;
  color:var(--secondary);
  box-shadow:var(--shadow);
}
.eyebrow .spark{width:8px; height:8px; background:var(--primary); border-radius:2px; transform:rotate(45deg);}
.hero h1{
  font-size:56px;
  line-height:1.05;
  margin-top:20px;
  font-weight:800;
  color:var(--text-dark);
}
.hero h1 .accent{color:var(--primary); position:relative; display:inline-block;}
.hero h1 .accent::after{
  content:"";
  position:absolute; left:-2%; right:-2%; bottom:2px; height:12px;
  background:rgba(245,130,31,0.18); z-index:-1; border-radius:6px;
}
.hero p.lede{
  margin-top:20px; font-size:19px; line-height:1.6; color:var(--text);
  max-width:480px; font-weight:500;
}
.hero-ctas{display:flex; gap:14px; margin-top:24px; flex-wrap:wrap;}
.btn-lg{padding:16px 30px; font-size:17px;}

/* grade path — redesigned to pop */
.grade-path{
  margin-top:34px;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF6EA 100%);
  border:2px dashed rgba(245,130,31,0.4);
  border-radius:22px;
  padding:22px 24px 20px;
  box-shadow: var(--shadow);
  position:relative;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.grade-path.needs-attention{
  border:2px solid #E5484D;
  box-shadow: 0 0 0 5px rgba(229,72,77,0.12), var(--shadow);
}
.grade-path.shake{ animation: gradeShake .45s ease; }
@keyframes gradeShake{
  10%,90%{ transform:translateX(-3px); }
  20%,80%{ transform:translateX(5px); }
  30%,50%,70%{ transform:translateX(-8px); }
  40%,60%{ transform:translateX(8px); }
}
.grade-path .label{
  font-weight:800; font-size:15.5px; letter-spacing:.01em;
  color:var(--text-dark); margin-bottom:16px; display:flex; align-items:center; gap:9px;
}
.grade-path .label i{
  color:var(--white); background:var(--primary); font-size:13px;
  width:26px; height:26px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
}

/* mode toggle — By Grade / By Topic */
.mode-toggle{
  display:inline-flex; background:var(--bg-light);
  border:1px solid var(--line); border-radius:999px;
  padding:4px; gap:4px; margin-bottom:18px;
}
.mode-btn{
  border:none; background:transparent; cursor:pointer;
  font-family:inherit; font-weight:800; font-size:13.5px;
  color:var(--text); padding:9px 18px; border-radius:999px;
  min-height:44px; white-space:nowrap;
  display:flex; align-items:center; justify-content:center; gap:7px;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.mode-btn i{ font-size:12px; }
.mode-btn:hover:not(.active){ background:rgba(30,58,95,0.07); }
.mode-btn.active{
  background:var(--secondary); color:var(--white);
  box-shadow:0 3px 0 0 rgba(0,0,0,0.16);
}
.mode-panel[hidden]{ display:none; }

/* topic chips — mirrors practice-topics.html tile styling for visual continuity */
.topic-chips{
  display:grid; grid-template-columns:repeat(2, 1fr); gap:11px;
}
.topic-chip{
  display:flex; align-items:center; gap:11px;
  background:var(--chip-soft, var(--bg-light));
  border:2px solid transparent; border-radius:14px;
  padding:12px 14px; min-height:44px; text-decoration:none;
  color:var(--text-dark); font-weight:800; font-size:13.5px; line-height:1.2;
  box-shadow:0 3px 0 0 rgba(30,58,95,0.08);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.topic-chip:hover{
  border-color:var(--chip-accent, var(--primary));
  transform:translateY(-2px);
  box-shadow:0 5px 0 0 rgba(30,58,95,0.1);
}
.topic-chip:active{
  transform:translateY(1px);
  box-shadow:0 1px 0 0 rgba(30,58,95,0.1);
}
.topic-chip__icon{
  width:34px; height:34px; flex-shrink:0;
  background:var(--chip-accent, var(--primary));
  color:var(--white); font-size:15px;
  border-radius:10px;
  display:flex; align-items:center; justify-content:center;
}
.topic-chip__label{ min-width:0; overflow-wrap:break-word; }
/* side-by-side grade + subject pickers */
.picker-grid{
  display:grid;
  grid-template-columns: 1.3fr 1fr;
  gap:20px;
  align-items:start;
}
.picker-col{
  display:flex;
  flex-direction:column;
  min-width:0;
}

/* compact chip grid — grade list */
.pills{
  display:grid;
  gap:8px;
  min-width:0;
}
.pills[hidden]{ display:none; }
.grade-pills{
  grid-template-columns: repeat(2, 1fr);
}
.subject-pills{
  grid-template-columns: 1fr;
}
.subject-pills.pills{
  animation: subjectIn .3s ease;
}
@keyframes subjectIn{
  from{ opacity:0; transform:translateX(10px); }
  to{ opacity:1; transform:translateX(0); }
}

.pill{
  position:relative;
  background-color:var(--accent, var(--secondary));
  background-image:linear-gradient(180deg, rgba(255,255,255,0.38) 0%, rgba(255,255,255,0) 55%);
  border:2px solid rgba(255,255,255,0.35);
  font-weight:800; font-size:13.5px;
  padding:9px 12px; min-height:40px;
  border-radius:11px;
  cursor:pointer;
  color:var(--white);
  text-shadow:0 1px 2px rgba(0,0,0,0.2);
  box-shadow:0 3px 0 0 rgba(0,0,0,0.2);
  transition: transform .12s ease, box-shadow .12s ease;
  display:flex; align-items:center; justify-content:center; gap:6px;
  text-align:center;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
  user-select:none;
}
.pill:hover{ transform:translateY(-3px); box-shadow:0 5px 0 0 rgba(0,0,0,0.24);}
.pill:active{
  transform:translateY(1px);
  box-shadow:0 1px 0 0 rgba(0,0,0,0.2);
}
.pill.active{
  border-color:rgba(255,255,255,0.9);
  box-shadow:0 3px 0 0 rgba(0,0,0,0.26), 0 0 0 3px rgba(30,58,95,0.14);
  animation: gradePop .3s ease;
}
.pill.active::after{
  content:"\f00c";
  font-family:"Font Awesome 6 Free"; font-weight:900;
  position:absolute; top:-6px; right:-6px;
  width:17px; height:17px; border-radius:50%;
  background:var(--mint); color:var(--white);
  font-size:9px;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 2px 4px rgba(0,0,0,0.25);
}
@keyframes gradePop{
  0%{ transform:scale(1); }
  45%{ transform:scale(1.08); }
  100%{ transform:scale(1); }
}

/* subject column placeholder, shown before a grade needing a subject is picked */
.subject-placeholder{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; text-align:center;
  border:2px dashed var(--line);
  border-radius:14px;
  padding:20px 12px;
  min-height:132px;
  color:var(--text);
  font-weight:700; font-size:12.5px;
  background:rgba(255,255,255,0.5);
}
.subject-placeholder i{ font-size:18px; color:var(--primary); opacity:.55; }
.picker-col--subject.is-active .subject-placeholder{ display:none; }
.grade-warning{
  display:none;
  align-items:center; gap:7px;
  margin-top:14px;
  color:#E5484D;
  font-weight:700; font-size:13.5px;
}
.grade-warning.show{ display:flex; animation: gradeShake .45s ease; }
.grade-summary{
  display:none;
  align-items:center; gap:8px;
  margin-top:14px;
  color:var(--mint);
  font-weight:800; font-size:13.5px;
}
.grade-summary.show{ display:flex; }
.grade-summary .chip{
  background:var(--white); border:1px solid var(--line);
  padding:4px 12px; border-radius:999px; font-weight:800;
  color:var(--text-dark);
}

/* Signature shapes, recolored to brand */
.scene{
  position:relative;
  height:460px;
  z-index:1;
}
.shape{
  position:absolute;
  animation: float 6s ease-in-out infinite;
}
@keyframes float{
  0%,100%{ transform:translateY(0) rotate(var(--r,0deg)); }
  50%{ transform:translateY(-16px) rotate(var(--r,0deg)); }
}
.card-stage{
  position:absolute; inset:40px 10px 40px 60px;
  background:var(--white);
  border-radius:28px;
  box-shadow:var(--shadow);
  border:1px solid var(--line);
  padding:30px;
  display:flex; flex-direction:column; gap:16px;
  z-index:2;
}
.card-stage .row{display:flex; align-items:center; gap:14px;}
.card-stage .badge{
  width:46px; height:46px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  font-weight:800; color:var(--white); font-size:20px; flex-shrink:0;
}
.card-stage .qtext{font-weight:800; font-size:16px; color:var(--text-dark);}
.card-stage .sub{font-size:13px; color:var(--text); font-weight:700;}
.opt{
  border:2px solid var(--line); border-radius:12px; padding:12px 14px;
  font-weight:700; font-size:14px; color:var(--text);
  display:flex; align-items:center; gap:10px;
}
.opt.correct{border-color:var(--mint); background:#EAFBF6; color:var(--mint);}
.opt .dot-mark{width:10px; height:10px; border-radius:50%; border:2px solid var(--text); flex-shrink:0;}
.opt.correct .dot-mark{background:var(--mint); border-color:var(--mint);}
.streak{
  margin-top:auto;
  display:flex; align-items:center; justify-content:space-between;
  background:var(--bg-light); border-radius:12px; padding:10px 14px;
}
.streak .flame{font-weight:800; color:var(--primary-dark); font-size:14px;}
.streak .bar{flex:1; height:8px; background:#E4EAF0; border-radius:99px; margin:0 12px; overflow:hidden;}
.streak .bar span{display:block; height:100%; width:72%; background:var(--primary); border-radius:99px;}

/* ---------- Subjects / Skills ---------- */
.section{padding:90px 0;}
#subjects{position:relative; overflow:hidden;}
#stories{position:relative; overflow:hidden;}
.section-head{max-width:640px; margin-bottom:48px;}
.section-head .kicker{
  color:var(--primary); font-weight:800; font-size:13px; letter-spacing:.08em; text-transform:uppercase;
}
.section-head h2{font-size:38px; margin-top:10px; line-height:1.15; color:var(--text-dark);}
.section-head p{margin-top:14px; font-size:17px; color:var(--text); font-weight:500; line-height:1.6;}

.subject-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:20px;
}
.subject-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:22px;
  padding:26px 22px;
  display:flex; flex-direction:column; gap:14px;
  transition: transform .2s ease, box-shadow .2s ease;
  cursor:pointer;
}
.subject-card:hover{transform:translateY(-6px); box-shadow:var(--shadow);}
.subject-icon{
  width:52px; height:52px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
}
.subject-card h3{font-size:19px; color:var(--text-dark);}
.subject-card p{font-size:14px; color:var(--text); font-weight:500; line-height:1.5;}
.subject-card .count{font-size:13px; font-weight:800; color:var(--primary); margin-top:auto;}

/* ---------- How it works ---------- */
.how{
  background:var(--secondary);
  color:var(--white);
  border-radius:36px;
  margin:0 32px;
  padding:70px 56px;
  position:relative;
  overflow:hidden;
}
.how .section-head h2, .how .section-head p{color:var(--white);}
.how .section-head p{color:#C7D3E0;}
.how .section-head .kicker{color:var(--primary);}
.steps{
  display:grid; grid-template-columns:repeat(3,1fr); gap:28px;
  position:relative; z-index:2;
}
.step{
  background:rgba(255,255,255,0.07);
  border:1px solid rgba(255,255,255,0.16);
  border-radius:20px;
  padding:28px;
}
.step-num{
  font-size:15px; font-weight:800; color:var(--primary);
  display:inline-block; margin-bottom:14px;
}
.step h3{font-size:20px; margin-bottom:10px;}
.step p{font-size:14.5px; color:#C7D3E0; font-weight:500; line-height:1.6;}

/* ---------- Stats ---------- */
.stats{
  display:grid; grid-template-columns:repeat(4,1fr);
  gap:20px;
}
.stat{
  background:var(--white); border:1px solid var(--line); border-radius:20px;
  padding:28px 24px; text-align:left;
}
.stat .num{font-family:'Nunito',sans-serif; font-size:38px; font-weight:800; color:var(--primary);}
.stat .num.mint{color:var(--mint);}
.stat .num.plum{color:var(--secondary);}
.stat .num.sun{color:var(--primary-dark);}
.stat .lbl{margin-top:6px; font-weight:700; color:var(--text); font-size:14.5px;}

/* ---------- Testimonials ---------- */
.testi-grid{
  display:grid; grid-template-columns:repeat(3,1fr); gap:22px;
}
.testi{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:22px;
  padding:28px;
  display:flex; flex-direction:column; gap:16px;
}
.testi .quote{font-size:16px; font-weight:600; color:var(--text-dark); line-height:1.6;}
.testi .who{display:flex; align-items:center; gap:12px; margin-top:auto;}
.testi .avatar{width:40px; height:40px; border-radius:12px; flex-shrink:0;}
.testi .name{font-weight:800; font-size:14px; color:var(--text-dark);}
.testi .role{font-size:12.5px; color:var(--text); font-weight:700;}

/* ---------- CTA band ---------- */
.cta-band{
  background:linear-gradient(135deg, var(--secondary), #14263F);
  border-radius:32px;
  margin:0 32px;
  padding:60px 56px;
  color:var(--white);
  display:flex; align-items:center; justify-content:space-between;
  gap:30px;
  position:relative; overflow:hidden;
}
.cta-band h2{font-size:32px; max-width:480px; line-height:1.2;}
.cta-band p{margin-top:10px; color:#C7D3E0; font-weight:500; font-size:15.5px;}
.cta-band .btn-primary{background:var(--primary); color:var(--white); box-shadow:0 8px 0 0 var(--primary-dark);}
.cta-band .btn-primary:hover{box-shadow:0 5px 0 0 var(--primary-dark);}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .hero-grid{grid-template-columns:1fr;}
  .scene{height:360px; order:-1;}
  .hero h1{font-size:40px;}
  .steps{grid-template-columns:1fr;}
  .stats{grid-template-columns:repeat(2,1fr);}
  .testi-grid{grid-template-columns:1fr;}
  .cta-band{flex-direction:column; text-align:center; padding:44px 28px;}
  .how{margin:0 16px; padding:48px 24px;}
  .cta-band{margin:0 16px;}
}

/* ---------- Phone (Android/iOS handsets) ---------- */
@media (max-width: 600px){
  .wrap{padding:0 18px;}

  .hero{padding:56px 0 40px;}
  .hero h1{font-size:30px; margin-top:16px;}
  .hero p.lede{font-size:16px; margin-top:14px;}
  .eyebrow{font-size:11.5px; padding:6px 12px;}

  .hero-ctas{flex-direction:column; align-items:stretch; gap:12px;}
  .btn-lg{padding:14px 20px; font-size:15.5px; justify-content:center;}

  .grade-path{padding:16px 14px 14px; margin-top:24px; border-radius:16px;}
  .grade-path .label{font-size:13.5px; margin-bottom:10px;}
  .picker-grid{grid-template-columns:1fr; gap:14px;}
  .grade-pills{grid-template-columns:repeat(2, 1fr);}
  .pills{gap:7px;}
  .pill{font-size:12.5px; padding:10px 10px; min-height:44px; border-radius:10px;}
  .subject-placeholder{min-height:0; padding:12px 10px; font-size:12px; flex-direction:row; justify-content:center;}
  .subject-placeholder i{font-size:14px;}
  .grade-warning, .grade-summary{font-size:12.5px;}

  .mode-toggle{display:flex; width:100%; margin-bottom:14px;}
  .mode-btn{flex:1; font-size:12.5px; padding:10px 8px; min-height:44px;}
  .topic-chips{grid-template-columns:1fr; gap:9px;}
  .topic-chip{padding:11px 12px; font-size:13px; min-height:48px;}
  .topic-chip__icon{width:30px; height:30px; font-size:13px;}

  .scene{height:260px;}
  .card-stage{inset:16px 6px 16px 6px; padding:18px; border-radius:20px; gap:12px;}
  .card-stage .badge{width:38px; height:38px; font-size:17px;}
  .card-stage .qtext{font-size:14px;}
  .card-stage .qtext[style]{font-size:16px !important;}
  .opt{padding:10px 12px; font-size:13px;}
  .streak{padding:8px 10px;}
  .streak .flame{font-size:12px;}

  .section{padding:56px 0;}
  .section-head{margin-bottom:32px;}
  .section-head h2{font-size:26px;}
  .section-head p{font-size:15px;}

  .subject-grid{grid-template-columns:1fr 1fr; gap:14px;}
  .subject-card{padding:18px 16px; border-radius:16px;}
  .subject-icon{width:44px; height:44px;}
  .subject-card h3{font-size:16px;}
  .subject-card p{font-size:13px;}

  .how{margin:0 10px; padding:32px 18px; border-radius:24px;}
  .how .section-head h2{font-size:24px;}
  .steps{gap:16px;}
  .step{padding:20px;}
  .step h3{font-size:17px;}

  .stats{grid-template-columns:1fr 1fr; gap:14px;}
  .stat{padding:20px 16px;}
  .stat .num{font-size:28px;}
  .stat .lbl{font-size:13px;}

  .testi{padding:22px;}
  .testi .quote{font-size:14.5px;}

  .cta-band{margin:0 10px; padding:32px 20px; border-radius:24px;}
  .cta-band h2{font-size:22px;}
  .cta-band p{font-size:14px;}
  .cta-band .btn-lg{width:100%;}
}

@media (max-width: 380px){
  .subject-grid{grid-template-columns:1fr;}
  .stats{grid-template-columns:1fr;}
  .hero h1{font-size:26px;}
  .pill{font-size:11.5px; padding:9px 8px; min-height:42px;}

  .mode-btn{font-size:11.5px; padding:9px 6px; gap:5px;}
  .mode-btn i{font-size:11px;}
  .topic-chip{font-size:12.5px; padding:10px 11px;}
  .topic-chip__icon{width:28px; height:28px; font-size:12px;}
}