@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root{
  --page-bg:#EEF1FA;
  --paper-raised:#FFFFFF;
  --ink:#152238;
  --ink-soft:#5B6B85;
  --line:#E1E6F2;

  --brand-blue:#1B4FA0;
  --brand-blue-deep:#0F3670;
  --brand-blue-bg:#EAF0FC;
  --brand-orange:#EF7D22;
  --brand-orange-deep:#C7620F;
  --brand-orange-bg:#FDECDD;
  --gold:#F5B400;

  --not-started:#C7CBC3;
  --not-started-bg:#EEEFEA;
  --weak:#C6453D;
  --weak-bg:#FBEAE8;
  --shaky:#C98A22;
  --shaky-bg:#FBF1DE;
  --solid:#3C8A5C;
  --solid-bg:#E7F3EA;
  --mastered:#8A6A22;
  --mastered-bg:#F5EEDD;
  --revise-dot:#EF7D22;

  --physics:#2F6FE0;
  --physics-bg:#EAF1FD;
  --chemistry:#8A4FD6;
  --chemistry-bg:#F3ECFB;
  --biology:#1FA463;
  --biology-bg:#E7F8EF;

  --radius:14px;
  --shadow:0 1px 2px rgba(21,34,56,0.05), 0 10px 28px -14px rgba(21,34,56,0.18);
}

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--page-bg);
  color:var(--ink);
  font-family:'Inter',sans-serif;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,.display{font-family:'Space Grotesk',sans-serif;}
.mono{font-family:'IBM Plex Mono',monospace;}

/* ===== HEADER ===== */
header{
  position:sticky; top:0; z-index:40;
  background:rgba(238,241,250,0.92);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  max-width:1180px; margin:0 auto; padding:14px 24px;
  display:flex; align-items:center; gap:28px;
}
.logo{
  font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:1.15rem;
  letter-spacing:-0.01em; color:var(--ink); text-decoration:none;
  display:flex; align-items:center; gap:8px;
}
.logo .dot{width:9px;height:9px;border-radius:50%;background:var(--brand-blue);display:inline-block;}
nav.primary{display:flex; gap:4px; flex:1;}
nav.primary a{
  font-size:0.87rem; font-weight:600; color:var(--ink-soft); text-decoration:none;
  padding:8px 12px; border-radius:8px; transition:background .15s, color .15s;
}
nav.primary a.active{color:var(--brand-blue-deep); background:var(--brand-blue-bg);}
nav.primary a:hover{background:#E4E9F5; color:var(--ink);}
.header-actions{display:flex; align-items:center; gap:10px;}
.btn-ghost{
  font-size:0.85rem; font-weight:600; color:var(--ink-soft); text-decoration:none;
  padding:8px 10px;
}
.btn-upgrade{
  font-size:0.85rem; font-weight:700; color:#fff; background:var(--brand-orange);
  padding:9px 16px; border-radius:8px; text-decoration:none;
  box-shadow:var(--shadow);
}
.btn-upgrade:hover{background:var(--brand-orange-deep);}

/* ===== PAGE SHELL ===== */
.page{max-width:1180px; margin:0 auto; padding:24px 24px 60px;}
.page-section{margin-bottom:36px;}
.page-section:last-child{margin-bottom:0;}

/* ===== HERO (contained gradient card) ===== */
.hero{
  position:relative;
  overflow:hidden;
  border-radius:22px;
  background:linear-gradient(135deg, #2A4FDB 0%, #17226E 100%);
  padding:44px 40px;
  box-shadow:0 20px 44px -20px rgba(23,34,110,0.55);
  margin-bottom:32px;
}
.hero::before{
  content:"";
  position:absolute; top:-60px; right:-40px;
  width:280px; height:280px; border-radius:50%;
  background:rgba(255,255,255,0.06);
}
.hero::after{
  content:"";
  position:absolute; bottom:-90px; right:120px;
  width:220px; height:220px; border-radius:50%;
  background:rgba(255,255,255,0.05);
}
.hero-inner{
  position:relative; z-index:1;
  display:flex; justify-content:space-between; align-items:flex-end; gap:24px; flex-wrap:wrap;
}
.hero-text{max-width:680px;}
.hero h1{
  font-size:2.1rem; line-height:1.18; letter-spacing:-0.02em;
  margin:0 0 14px; color:#fff;
}
.hero h1 .accent-gold{color:var(--gold);}
.hero p.lede{
  font-size:1.02rem; color:rgba(255,255,255,0.82); max-width:600px; margin:0 0 22px; line-height:1.55;
}
.hero-cta{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--brand-orange); color:#fff; font-weight:700; font-size:0.95rem;
  padding:13px 22px; border-radius:10px; text-decoration:none;
  box-shadow:0 10px 24px -8px rgba(239,125,34,0.6);
  white-space:nowrap;
}
.hero-cta:hover{background:var(--brand-orange-deep);}

@media(max-width:640px){
  .hero{padding:30px 22px;}
  .hero h1{font-size:1.5rem;}
}

.logo-accent{color:var(--gold);}

/* ===== CALLOUT / INTRO CARD ===== */
.callout-card{
  display:flex; gap:16px; align-items:flex-start;
  background:var(--paper-raised);
  border:1px solid var(--line);
  border-left:4px solid var(--brand-blue);
  border-radius:12px;
  padding:18px 20px;
  margin-bottom:16px;
  box-shadow:var(--shadow);
}
.callout-card .icon-box{
  flex:0 0 auto; width:38px; height:38px; border-radius:10px;
  background:var(--brand-blue-bg); display:flex; align-items:center; justify-content:center;
  font-size:1.15rem;
}
.callout-card h2{font-size:1rem; margin:0 0 5px; letter-spacing:-0.005em;}
.callout-card p{margin:0; font-size:0.88rem; color:var(--ink-soft); line-height:1.55;}
.callout-card p strong{color:var(--ink);}

/* ===== STAT ROW (readiness) ===== */
.stat-row{display:grid; grid-template-columns:repeat(4, 1fr); gap:14px;}
@media(max-width:900px){.stat-row{grid-template-columns:repeat(2,1fr);}}
@media(max-width:520px){.stat-row{grid-template-columns:1fr;}}
.stat-card{
  background:var(--paper-raised); border:1.5px solid var(--line);
  border-radius:12px; padding:16px 18px; box-shadow:var(--shadow);
}
.stat-card.days{background:var(--brand-orange-bg); border-color:#F6CBA3;}
.stat-card.physics{border-color:#C9DBF7;}
.stat-card.chemistry{border-color:#DFCEF5;}
.stat-card.biology{border-color:#C3EAD6;}
.stat-card .stat-label{
  display:flex; align-items:center; gap:7px;
  font-size:0.72rem; font-weight:700; letter-spacing:0.03em; text-transform:uppercase;
  margin-bottom:10px;
}
.stat-card.days .stat-label{color:var(--brand-orange-deep);}
.stat-card.physics .stat-label{color:var(--physics);}
.stat-card.chemistry .stat-label{color:var(--chemistry);}
.stat-card.biology .stat-label{color:var(--biology);}
.stat-card .stat-value{font-family:'IBM Plex Mono',monospace; font-weight:700; font-size:1.7rem; margin-bottom:4px;}
.stat-card.days .stat-value{color:var(--brand-orange);}
.stat-card .stat-sub{font-size:0.78rem; color:var(--ink-soft);}
.stat-card .stat-link{
  display:inline-block; margin-top:10px; font-size:0.82rem; font-weight:700;
  color:var(--brand-blue); text-decoration:none;
}
.stat-card .ring-inline{display:flex; align-items:center; gap:10px;}
.stat-card .ring-inline svg{transform:rotate(-90deg); flex:0 0 auto;}

/* ===== CONTENT CARD (wraps map / performance) ===== */
.content-card{
  background:var(--paper-raised); border:1px solid var(--line);
  border-radius:16px; padding:22px 24px; box-shadow:var(--shadow);
}

.legend{display:flex; gap:16px; flex-wrap:wrap; margin-bottom:18px;}
.legend span{display:flex; align-items:center; gap:6px; font-size:0.78rem; color:var(--ink-soft);}
.legend .dot{width:9px;height:9px;border-radius:50%;}

.subject-tabs{display:flex; gap:6px; margin-bottom:20px; border-bottom:1px solid var(--line);}
.subject-tabs button{
  font-family:'Inter',sans-serif; font-size:0.9rem; font-weight:600;
  background:none; border:none; padding:10px 6px; margin-right:14px;
  color:var(--ink-soft); cursor:pointer; border-bottom:2px solid transparent;
  display:flex; gap:7px; align-items:center;
}
.subject-tabs button.active{color:var(--ink); border-color:var(--brand-blue);}
.subject-tabs .count{font-family:'IBM Plex Mono',monospace; font-size:0.75rem; color:var(--ink-soft);}

.map-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(168px,1fr));
  gap:12px;
}
.tile{
  position:relative;
  background:var(--paper-raised);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:14px 14px 12px;
  cursor:pointer;
  text-align:left;
  transition:transform .12s ease, box-shadow .12s ease;
  border-left:4px solid var(--not-started);
}
.tile:hover{transform:translateY(-3px); box-shadow:var(--shadow);}
.tile:focus-visible{outline:2px solid var(--brand-blue); outline-offset:2px;}
.tile.state-learning{border-left-color:var(--brand-blue);}
.tile.state-weak{border-left-color:var(--weak);}
.tile.state-shaky{border-left-color:var(--shaky);}
.tile.state-solid{border-left-color:var(--solid);}
.tile.state-mastered{border-left-color:var(--mastered);}

.tile .top-row{display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:22px;}
.tile .led{width:9px;height:9px;border-radius:50%; margin-top:3px; background:var(--not-started);}
.tile.state-learning .led{background:var(--brand-blue);}
.tile.state-weak .led{background:var(--weak);}
.tile.state-shaky .led{background:var(--shaky);}
.tile.state-solid .led{background:var(--solid);}
.tile.state-mastered .led{background:var(--mastered);}

.tile .revise-badge{
  font-size:0.62rem; font-weight:700; color:var(--brand-orange-deep);
  background:var(--brand-orange-bg); border-radius:999px; padding:2px 7px;
  display:flex; align-items:center; gap:4px;
}
.tile .revise-badge .pulse{width:5px;height:5px;border-radius:50%;background:var(--revise-dot); animation:pulse 2s infinite;}
@keyframes pulse{
  0%{box-shadow:0 0 0 0 rgba(239,125,34,0.5);}
  70%{box-shadow:0 0 0 7px rgba(239,125,34,0);}
  100%{box-shadow:0 0 0 0 rgba(239,125,34,0);}
}

.tile h3{font-size:0.9rem; margin:0 0 4px; line-height:1.25; font-weight:600; font-family:'Inter',sans-serif;}
.tile .meta{font-size:0.72rem; color:var(--ink-soft); margin-bottom:10px;}
.tile .bar-track{height:5px; border-radius:3px; background:var(--not-started-bg); overflow:hidden;}
.tile .bar-fill{height:100%; border-radius:3px; background:var(--not-started);}
.tile.state-learning .bar-fill{background:var(--brand-blue);}
.tile.state-weak .bar-fill{background:var(--weak);}
.tile.state-shaky .bar-fill{background:var(--shaky);}
.tile.state-solid .bar-fill{background:var(--solid);}
.tile.state-mastered .bar-fill{background:var(--mastered);}
.tile .state-label{font-size:0.68rem; margin-top:6px; color:var(--ink-soft); font-weight:600; text-transform:uppercase; letter-spacing:0.03em;}

/* ===== PERFORMANCE ===== */
.perf-grid{display:grid; grid-template-columns:1.1fr 1fr; gap:16px;}
@media(max-width:820px){.perf-grid{grid-template-columns:1fr;}}
.card{
  background:var(--paper-raised); border:1px solid var(--line);
  border-radius:var(--radius); padding:20px;
}
.card h3{font-size:1rem; margin:0 0 4px;}
.card .card-sub{font-size:0.8rem; color:var(--ink-soft); margin:0 0 14px; line-height:1.45;}
.trend-row{display:flex; align-items:center; gap:12px; margin-bottom:14px;}
.trend-row .sub-icon{font-size:1.1rem; width:22px;}
.trend-row .sub-name{font-size:0.85rem; font-weight:600; width:88px;}
.trend-track{flex:1; height:8px; background:var(--not-started-bg); border-radius:5px; overflow:hidden;}
.trend-fill{height:100%; border-radius:5px;}
.trend-pct{font-family:'IBM Plex Mono',monospace; font-size:0.82rem; font-weight:600; width:52px; text-align:right; white-space:nowrap;}

.weak-list{list-style:none; margin:0; padding:0;}
.weak-list li{
  display:flex; justify-content:space-between; align-items:center;
  padding:9px 0; border-bottom:1px solid var(--line); font-size:0.86rem;
}
.weak-list li:last-child{border-bottom:none;}
.weak-list .tag{
  font-size:0.68rem; font-weight:700; padding:2px 8px; border-radius:999px;
}
.tag.weak{color:var(--weak); background:var(--weak-bg);}
.tag.shaky{color:var(--shaky); background:var(--shaky-bg);}

/* topics to prioritise: name stands out with a state-coloured bullet */
.weak-list .weak-item{gap:12px; justify-content:flex-start;}
.weak-list .weak-item .tag{margin-left:auto; flex-shrink:0;}
.weak-list .weak-name{
  position:relative; padding-left:20px; font-size:0.95rem; font-weight:700; color:var(--ink); line-height:1.35;
}
.weak-list .weak-name::before{
  content:""; position:absolute; left:2px; top:0.5em; width:9px; height:9px; border-radius:50%;
  background:var(--shaky);
}
.weak-list .is-weak .weak-name::before{background:var(--weak);}
.weak-list .is-shaky .weak-name::before{background:var(--shaky);}
.view-all{display:inline-block; margin-top:14px; font-size:0.82rem; font-weight:600; color:var(--brand-blue); text-decoration:none;}

/* ===== ACTION SHEET (modal) ===== */
.scrim{
  position:fixed; inset:0; background:rgba(21,34,56,0.42);
  opacity:0; pointer-events:none; transition:opacity .2s ease; z-index:60;
}
.scrim.open{opacity:1; pointer-events:auto;}
.sheet{
  position:fixed; left:50%; bottom:0; transform:translate(-50%, 100%);
  width:min(520px, 92vw); background:var(--paper-raised);
  border-radius:18px 18px 0 0; padding:22px 24px 26px;
  box-shadow:0 -8px 40px rgba(21,34,56,0.25);
  transition:transform .28s cubic-bezier(.2,.8,.3,1);
  z-index:61;
}
@media(min-width:640px){
  .sheet{bottom:auto; top:50%; transform:translate(-50%,-40%); border-radius:18px; opacity:0; pointer-events:none; transition:transform .22s ease, opacity .22s ease;}
  .sheet.open{transform:translate(-50%,-50%); opacity:1; pointer-events:auto;}
}
.sheet.open{transform:translate(-50%,0%);}
.sheet .close{
  position:absolute; top:16px; right:18px; background:none; border:none;
  font-size:1.1rem; color:var(--ink-soft); cursor:pointer;
}
.sheet .sheet-eyebrow{font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.04em; color:var(--ink-soft); margin-bottom:6px;}
.sheet h2{font-size:1.2rem; margin:0 0 6px;}
.sheet .status-line{font-size:0.85rem; color:var(--ink-soft); margin-bottom:18px;}
.sheet .status-line b{color:var(--ink);}

.option-card{
  display:flex; gap:14px; align-items:flex-start;
  border:1.5px solid var(--line); border-radius:12px; padding:14px 16px;
  margin-bottom:12px; cursor:pointer; text-decoration:none; color:var(--ink);
  transition:border-color .15s, background .15s;
}
.option-card:hover{border-color:var(--brand-blue);}
.option-card .icon{font-size:1.4rem; margin-top:1px;}
.option-card .title-row{display:flex; align-items:center; gap:8px; margin-bottom:3px;}
.option-card .title-row strong{font-size:0.95rem;}
.option-card .rec-tag{
  font-size:0.62rem; font-weight:700; color:#fff; background:var(--brand-orange);
  padding:2px 7px; border-radius:999px; letter-spacing:0.02em;
}
.option-card p{margin:0; font-size:0.82rem; color:var(--ink-soft); line-height:1.4;}
.option-card.recommended{border-color:var(--brand-orange); background:var(--brand-orange-bg);}
.option-card.secondary{opacity:0.82;}

footer{border-top:1px solid var(--line); padding:26px 24px; text-align:center; color:var(--ink-soft); font-size:0.8rem;}

/* ===== SECTION PANELS: header strip + content read as one card ===== */
.page-section{
  background:var(--paper-raised); border:1px solid var(--line);
  border-radius:16px; box-shadow:var(--shadow); overflow:hidden;
}
.page-section > .callout-card{
  background:#F7F9FE; border:0; border-left:4px solid var(--brand-blue); border-bottom:1px solid var(--line);
  border-radius:0; box-shadow:none; margin-bottom:0; padding:18px 22px;
}
.page-section > .stat-row,
.page-section > .perf-grid{margin:20px 22px 22px;}
.page-section > .content-card{border:0; border-radius:0; box-shadow:none; padding:20px 22px 22px;}
@media(max-width:640px){
  .page-section > .callout-card{padding:14px 16px;}
  .page-section > .stat-row,.page-section > .perf-grid{margin:16px;}
  .page-section > .content-card{padding:16px;}
}

/* ===== HERO side panel (replaces the missing photo) ===== */
.hero-inner{align-items:center;}
.hero-left{flex:1 1 440px;min-width:0;}
.hero-panel{
  flex:0 0 300px; max-width:100%;
  background:rgba(255,255,255,0.12); border:1px solid rgba(255,255,255,0.22);
  border-radius:16px; padding:20px 22px; color:#fff;
  backdrop-filter:blur(4px);
}
.hero-panel-label{font-size:0.7rem; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; color:rgba(255,255,255,0.72);}
.hero-panel-days{margin-top:4px; font-size:0.95rem; color:rgba(255,255,255,0.85);}
.hero-panel-days .mono{font-size:2.4rem; font-weight:700; color:var(--gold); margin-right:4px;}
.hero-panel-rule{height:1px; background:rgba(255,255,255,0.2); margin:16px 0 14px;}
.hero-panel-week{margin-top:4px; font-size:0.9rem; color:rgba(255,255,255,0.85);}
.hero-panel-week .mono{font-size:1.25rem; font-weight:700; color:#fff;}
.hero-strip{display:flex; gap:6px; margin-top:10px;}
.hero-strip span{flex:1; height:8px; border-radius:4px; background:rgba(255,255,255,0.22);}
.hero-strip span.is-on{background:var(--gold);}
@media(max-width:820px){.hero-panel{flex:1 1 100%;}}

/* Readiness row: three subject cards (days-to-NEET lives in the hero) */
.stat-row{grid-template-columns:repeat(3,1fr);}
@media(max-width:700px){.stat-row{grid-template-columns:1fr;}}

.red{color:#FF0000;}
