:root{
  --ink:#183a59;
  --ink-soft:#34536f;
  --muted:#6e8499;
  --line:#dce7f0;
  --line-strong:#cbd9e6;
  --white:#ffffff;

  --blue:#3b82f6;
  --blue-deep:#2868c7;
  --sky:#5bc0eb;
  --cyan:#49c6d8;

  --green:#49b98b;
  --mint:#dff7ee;

  --purple:#8a70db;
  --lavender:#f0ebff;

  --pink:#e876ac;
  --rose:#fff0f7;

  --orange:#f2a653;
  --yellow:#f5c85b;

  --page:#f7fafc;
  --shadow-sm:0 8px 22px rgba(44,80,113,.07);
  --shadow:0 18px 46px rgba(44,80,113,.10);
  --shadow-lg:0 28px 75px rgba(44,80,113,.14);
  --radius:26px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}

body{
  margin:0;
  min-height:100vh;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at 8% 4%,rgba(91,192,235,.16),transparent 22%),
    radial-gradient(circle at 92% 8%,rgba(138,112,219,.11),transparent 22%),
    linear-gradient(180deg,#ffffff 0%,#f8fbfe 30%,#f2f7fb 100%);
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background:
    radial-gradient(circle,rgba(59,130,246,.10) 1.2px,transparent 1.3px);
  background-size:24px 24px;
  opacity:.30;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.55),transparent 72%);
}

a{color:inherit;text-decoration:none}
button{font:inherit}
.shell{width:min(1180px,calc(100% - 32px));margin:0 auto}

.topbar{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(255,255,255,.91);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border-bottom:1px solid rgba(203,217,230,.78);
  box-shadow:0 5px 20px rgba(55,82,108,.045);
}

.nav{
  height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  color:#163a5b;
  font-size:1.25rem;
  font-weight:900;
  letter-spacing:-.035em;
}

.brand-mark{
  width:46px;
  height:46px;
  border-radius:15px;
  display:grid;
  place-items:center;
  color:#fff;
  background:linear-gradient(135deg,#3b82f6,#52c4d9);
  box-shadow:0 10px 24px rgba(59,130,246,.21);
}
.brand-mark svg{width:23px;height:23px}

.nav-right{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 11px;
  border-radius:999px;
  color:#577087;
  background:#f4faf8;
  border:1px solid #dceee7;
  font-size:.82rem;
  font-weight:800;
}

.status-dot{
  width:8px;height:8px;border-radius:50%;
  background:var(--green);
  box-shadow:0 0 0 4px rgba(73,185,139,.11);
}

main{padding:52px 0 40px}

/* ---------- Home ---------- */

.hero{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:38px;
  align-items:center;
  padding:30px 0 58px;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  color:#2868a4;
  background:#ecf7ff;
  border:1px solid #d4eafa;
  font-size:.79rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.055em;
  margin-bottom:19px;
}

h1{
  margin:0;
  font-size:clamp(3.2rem,7vw,6.2rem);
  line-height:.94;
  letter-spacing:-.065em;
  color:#173b5a;
}

.gradient-text{
  background:linear-gradient(90deg,#3b82f6 0%,#44bed0 43%,#8a70db 82%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.hero p{
  margin:24px 0 0;
  max-width:700px;
  color:var(--muted);
  font-size:clamp(1rem,1.55vw,1.15rem);
  line-height:1.75;
}

.hero-panel{
  min-height:330px;
  position:relative;
  overflow:hidden;
  padding:28px;
  border-radius:34px;
  border:1px solid #d9e7f2;
  background:
    radial-gradient(circle at 18% 16%,rgba(91,192,235,.18),transparent 30%),
    radial-gradient(circle at 86% 82%,rgba(138,112,219,.12),transparent 30%),
    linear-gradient(145deg,#ffffff,#f4faff);
  box-shadow:var(--shadow-lg);
}

.hero-panel::before,
.hero-panel::after{
  content:"";
  position:absolute;
  border-radius:50%;
  pointer-events:none;
}
.hero-panel::before{
  width:150px;height:150px;
  right:-55px;top:-48px;
  background:rgba(245,200,91,.17);
}
.hero-panel::after{
  width:115px;height:115px;
  left:-35px;bottom:-45px;
  background:rgba(73,185,139,.12);
}

.learning-board{
  position:relative;
  z-index:2;
  height:100%;
  min-height:272px;
  display:grid;
  grid-template-columns:1fr 1fr;
  grid-template-rows:auto 1fr 1fr;
  gap:12px;
}

.board-title{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:15px 17px;
  border-radius:18px;
  background:#fff;
  border:1px solid #e0e9f1;
  box-shadow:var(--shadow-sm);
}
.board-title strong{font-size:1.03rem;letter-spacing:-.02em}
.board-title span{font-size:.75rem;color:#6e8499;font-weight:800}

.board-tile{
  min-height:105px;
  padding:16px;
  border-radius:20px;
  border:1px solid transparent;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  box-shadow:0 8px 24px rgba(52,80,108,.055);
}
.board-tile b{font-size:.92rem;letter-spacing:-.01em}
.board-tile span{font-size:.76rem;line-height:1.4;font-weight:700;opacity:.78}
.board-tile .mini-icon{
  width:38px;height:38px;border-radius:12px;
  display:grid;place-items:center;
  background:rgba(255,255,255,.72);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.9);
  font-size:1.05rem;
}

.board-tile.lessons{
  color:#245d94;
  background:#e9f5ff;
  border-color:#d0e8fb;
}
.board-tile.revision{
  color:#5e4aa7;
  background:#f1edff;
  border-color:#dfd7fb;
}
.board-tile.activities{
  color:#24785f;
  background:#e8f8f1;
  border-color:#d2eee2;
}
.board-tile.progress{
  color:#996926;
  background:#fff5df;
  border-color:#f2e3ba;
}

.section-title{
  margin:0 0 8px;
  color:#173b5a;
  font-size:clamp(1.9rem,3vw,2.65rem);
  letter-spacing:-.045em;
}
.section-copy{margin:0 0 28px;color:var(--muted);line-height:1.7}

.subject-grid,
.topic-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
}

.subject-card{
  position:relative;
  min-height:330px;
  padding:29px;
  overflow:hidden;
  border-radius:28px;
  border:1px solid var(--line);
  background:#fff;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  transition:.24s ease;
}

.subject-card:hover{
  transform:translateY(-6px);
  box-shadow:0 25px 58px rgba(44,80,113,.14);
}

.subject-card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.92;
}

.subject-card.cs::before{
  background:
    linear-gradient(135deg,rgba(232,246,255,.96),rgba(255,255,255,.80) 54%),
    radial-gradient(circle at 92% 92%,rgba(91,192,235,.24),transparent 32%);
}
.subject-card.imedia::before{
  background:
    linear-gradient(135deg,rgba(247,240,255,.96),rgba(255,255,255,.82) 54%),
    radial-gradient(circle at 90% 90%,rgba(232,118,172,.17),transparent 34%);
}

.subject-card.cs{border-color:#cfe5f6}
.subject-card.imedia{border-color:#e2d8f3}

.subject-card > *{position:relative;z-index:1}

.subject-card .subject-kicker{
  display:inline-flex;
  margin-bottom:17px;
  padding:6px 9px;
  border-radius:999px;
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.subject-card.cs .subject-kicker{color:#2f6eaa;background:#dff1ff}
.subject-card.imedia .subject-kicker{color:#7259b7;background:#eee7ff}

.icon-box{
  width:66px;height:66px;
  display:grid;
  place-items:center;
  border-radius:20px;
  background:#fff;
  box-shadow:0 10px 25px rgba(46,77,105,.08);
}
.subject-card.cs .icon-box{border:1px solid #cfe7f8}
.subject-card.imedia .icon-box{border:1px solid #e2d9f5}
.icon-box svg{width:32px;height:32px}

.subject-card h3{
  margin:24px 0 9px;
  color:#173b5a;
  font-size:1.7rem;
  letter-spacing:-.04em;
}
.subject-card p{
  margin:0;
  max-width:500px;
  color:#698096;
  line-height:1.62;
}

.card-footer{
  margin-top:28px;
  padding-top:17px;
  border-top:1px solid rgba(205,218,230,.72);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.pill{
  padding:7px 10px;
  border-radius:999px;
  font-size:.76rem;
  font-weight:850;
  color:#5d748a;
  background:rgba(255,255,255,.72);
  border:1px solid #dce6ee;
}

.arrow{
  width:42px;height:42px;
  display:grid;place-items:center;
  border-radius:14px;
  color:#fff;
  font-weight:900;
}
.cs .arrow{background:linear-gradient(135deg,#3b82f6,#52b9df)}
.imedia .arrow{background:linear-gradient(135deg,#8a70db,#e876ac)}

.subject-card:hover .arrow{transform:translateX(3px)}

/* ---------- Inner pages ---------- */

.breadcrumb{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
  margin-bottom:24px;
  color:#7b8fa2;
  font-size:.88rem;
}
.breadcrumb a{
  color:#3571a9;
  font-weight:850;
}
.breadcrumb a:hover{text-decoration:underline}

.page-head{
  position:relative;
  overflow:hidden;
  margin-bottom:28px;
  padding:30px 32px;
  border-radius:28px;
  background:#fff;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

.page-head::after{
  content:"";
  position:absolute;
  width:240px;height:240px;
  right:-80px;top:-105px;
  border-radius:50%;
  background:rgba(91,192,235,.12);
}

.imedia-page .page-head::after{background:rgba(138,112,219,.12)}

.page-head > div{position:relative;z-index:1}
.page-head h1{
  font-size:clamp(2.6rem,6vw,4.8rem);
  line-height:1;
}
.page-head p{
  margin:13px 0 0;
  max-width:700px;
  color:var(--muted);
  line-height:1.65;
}

.topic-card{
  position:relative;
  min-height:205px;
  padding:25px;
  border-radius:24px;
  border:1px solid #d7e5ef;
  background:#fff;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  overflow:hidden;
  transition:.22s ease;
}

.topic-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:7px;
  background:linear-gradient(180deg,#3b82f6,#54c2d5);
}
.imedia-page .topic-card::before{
  background:linear-gradient(180deg,#8a70db,#e876ac);
}

.topic-card:hover{
  transform:translateY(-5px);
  border-color:#c6dbe9;
  box-shadow:0 22px 52px rgba(44,80,113,.13);
}

.topic-number{
  width:max-content;
  padding:7px 10px;
  border-radius:999px;
  color:#2b6eaa;
  background:#eaf6ff;
  border:1px solid #d5eafa;
  font-size:.74rem;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.imedia-page .topic-number{
  color:#7058b4;
  background:#f0ebff;
  border-color:#dfd6fb;
}

.topic-card h3{
  margin:24px 0 8px;
  color:#183b59;
  font-size:1.4rem;
  letter-spacing:-.03em;
}
.topic-card p{margin:0;color:var(--muted);line-height:1.55}
.topic-open{
  margin-top:23px;
  color:#2f73b5;
  font-weight:900;
  font-size:.9rem;
}
.imedia-page .topic-open{color:#765dbb}

/* ---------- Topic / lesson pages ---------- */

.topic-view{
  position:relative;
  overflow:hidden;
  padding:clamp(25px,5vw,48px);
  border-radius:30px;
  background:#fff;
  border:1px solid #d8e5ef;
  box-shadow:var(--shadow-lg);
}

.topic-view::before{
  content:"";
  position:absolute;
  width:340px;height:340px;
  border-radius:50%;
  right:-150px;top:-165px;
  background:rgba(91,192,235,.12);
  pointer-events:none;
}
.imedia-page .topic-view::before{background:rgba(138,112,219,.11)}

.topic-view > *{position:relative;z-index:1}

.topic-label{
  display:inline-flex;
  padding:8px 12px;
  border-radius:999px;
  color:#2d6fa9;
  background:#eaf6ff;
  border:1px solid #d4eafa;
  font-size:.77rem;
  font-weight:900;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.imedia-page .topic-label{
  color:#7058b4;
  background:#f0ebff;
  border-color:#ded5f8;
}

.topic-view h1{
  margin:19px 0 12px;
  max-width:920px;
  color:#183b59;
  font-size:clamp(2.3rem,5vw,4.35rem);
  line-height:1.02;
  letter-spacing:-.055em;
}
.topic-view .intro{
  max-width:830px;
  color:var(--muted);
  line-height:1.75;
  font-size:1.02rem;
}

.resource-strip{
  margin-top:32px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.resource-card{
  min-height:130px;
  padding:18px;
  border-radius:18px;
  border:1px solid #dce7ef;
  background:#fbfdff;
}
.resource-card:nth-child(1){background:#eef8ff;border-color:#d8ebf8}
.resource-card:nth-child(2){background:#f2efff;border-color:#e2daf9}
.resource-card:nth-child(3){background:#edf9f4;border-color:#d8eee4}

.resource-card strong{
  display:block;
  margin-bottom:7px;
  color:#24445f;
}
.resource-card span{
  color:#71869a;
  font-size:.88rem;
  line-height:1.5;
}

.back-button{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:24px;
  padding:11px 14px;
  border-radius:13px;
  color:#326fa6;
  background:#eef7fe;
  border:1px solid #d7e9f8;
  font-weight:850;
}
.back-button:hover{background:#e5f3fd}

/* ---------- Lesson cards ---------- */

.lesson-list{margin-top:32px;display:grid;gap:18px}

.lesson-card{
  position:relative;
  display:block;
  overflow:hidden;
  padding:25px;
  border-radius:24px;
  border:1px solid #d8e5ef;
  background:
    linear-gradient(135deg,#f8fcff,#ffffff 58%);
  box-shadow:var(--shadow);
  transition:.22s ease;
}

.lesson-card::before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:7px;
  background:linear-gradient(180deg,#3b82f6,#4bc6d7);
}

.lesson-card::after{
  content:"";
  position:absolute;
  width:170px;height:170px;
  right:-60px;bottom:-90px;
  border-radius:50%;
  background:rgba(73,185,139,.09);
}

.lesson-card > *{position:relative;z-index:1}

.lesson-card:hover{
  transform:translateY(-5px);
  box-shadow:0 22px 52px rgba(44,80,113,.13);
  border-color:#c9ddea;
}

.lesson-card-top,
.lesson-card-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.lesson-number,
.lesson-status{
  padding:7px 10px;
  border-radius:999px;
  font-size:.73rem;
  font-weight:900;
}
.lesson-number{
  color:#2b6eaa;
  background:#e9f5ff;
  border:1px solid #d5eafa;
}
.lesson-status{
  color:#2f8b68;
  background:#e8f7f0;
  border:1px solid #d4ecdf;
}

.lesson-card-main{
  display:flex;
  align-items:center;
  gap:18px;
  margin:24px 0;
}

.lesson-icon{
  width:72px;height:72px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  border-radius:21px;
  color:#2f78bf;
  background:#eaf6ff;
  border:1px solid #d3e9f9;
  box-shadow:0 8px 20px rgba(52,94,130,.07);
}
.lesson-icon svg{width:36px;height:36px}

.lesson-card h2{
  margin:0 0 7px;
  color:#193b58;
  font-size:1.58rem;
  letter-spacing:-.035em;
}
.lesson-card p{margin:0;color:var(--muted);line-height:1.56}

.lesson-card-footer{
  padding-top:17px;
  border-top:1px solid #e5edf3;
  color:#7a8ea1;
  font-size:.84rem;
}
.lesson-arrow{color:#2f73b5;font-weight:900}

/* ---------- Resource cards ---------- */

.lesson-resource-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
  margin-top:34px;
}

.lesson-resource-card{
  display:grid;
  grid-template-columns:132px 1fr;
  min-height:240px;
  overflow:hidden;
  border-radius:24px;
  background:#fff;
  border:1px solid #d9e5ee;
  box-shadow:var(--shadow);
  transition:.22s ease;
}

.lesson-resource-card:hover{
  transform:translateY(-6px);
  box-shadow:0 24px 56px rgba(44,80,113,.14);
}

.lesson-resource-card.arcade{border-color:#cfe7f3}
.lesson-resource-card.revision{border-color:#ded6f2}

.resource-art{
  display:grid;
  place-items:center;
  border-right:1px solid #e3ebf1;
}
.arcade .resource-art{
  background:
    radial-gradient(circle at 24% 22%,rgba(91,192,235,.20),transparent 42%),
    linear-gradient(145deg,#eaf7ff,#f6fcff);
}
.revision .resource-art{
  background:
    radial-gradient(circle at 25% 24%,rgba(138,112,219,.18),transparent 42%),
    linear-gradient(145deg,#f1edff,#fff8fc);
}

.resource-svg{
  width:66px;height:66px;
  display:grid;
  place-items:center;
  border-radius:20px;
  background:#fff;
  box-shadow:0 10px 24px rgba(55,82,108,.09);
}
.resource-svg svg{width:34px;height:34px}

.arcade .resource-svg{color:#2d83b9}
.revision .resource-svg{color:#7258b7}

.resource-content{
  padding:25px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.resource-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.resource-tag,
.resource-format{
  padding:6px 9px;
  border-radius:999px;
  font-size:.69rem;
  font-weight:900;
}
.arcade .resource-tag{
  color:#2f779f;
  background:#e7f6fc;
  border:1px solid #d1ebf5;
}
.revision .resource-tag{
  color:#7058b4;
  background:#f0ebff;
  border:1px solid #ded5f8;
}
.resource-format{
  color:#657b8e;
  background:#f6f9fb;
  border:1px solid #e1e8ee;
}

.lesson-resource-card h2{
  margin:0 0 8px;
  color:#193b58;
  font-size:1.45rem;
  letter-spacing:-.03em;
}
.lesson-resource-card p{
  margin:0;
  color:var(--muted);
  line-height:1.55;
  font-size:.92rem;
}
.resource-launch{
  margin-top:20px;
  color:#2f73b5;
  font-weight:900;
  font-size:.88rem;
}
.revision .resource-launch{color:#7258b7}

/* ---------- Footer / accessibility ---------- */

footer{
  margin-top:58px;
  padding:34px 0 38px;
  display:flex;
  justify-content:space-between;
  gap:18px;
  color:#8193a4;
  border-top:1px solid #dde7ef;
  font-size:.84rem;
}

.kbd{
  padding:4px 7px;
  border-radius:7px;
  color:#587187;
  background:#fff;
  border:1px solid #d9e4ec;
}

::selection{background:#d9ecff;color:#173b5a}
a:focus-visible,button:focus-visible{
  outline:4px solid rgba(59,130,246,.18);
  outline-offset:3px;
  border-radius:12px;
}

@media (max-width:850px){
  .hero{grid-template-columns:1fr}
  .hero-panel{min-height:300px}
  .subject-grid,.topic-grid,.lesson-resource-grid{grid-template-columns:1fr}
  .resource-strip{grid-template-columns:1fr}
}

@media (max-width:600px){
  .lesson-card-main{align-items:flex-start}
  .lesson-status{display:none}
  .lesson-resource-card{grid-template-columns:1fr}
  .resource-art{
    min-height:125px;
    border-right:0;
    border-bottom:1px solid #e3ebf1;
  }
  .learning-board{grid-template-columns:1fr 1fr}
}

@media (max-width:560px){
  .shell{width:min(100% - 22px,1180px)}
  .nav{height:70px}
  .nav-right .status-text{display:none}
  .nav-right{padding:8px}
  main{padding-top:34px}
  .hero{padding-top:10px}
  h1{font-size:clamp(3rem,18vw,4.7rem)}
  .subject-card{min-height:300px;padding:23px}
  .topic-view{border-radius:24px}
  .page-head{padding:24px}
  footer{flex-direction:column}
}

@media (prefers-reduced-motion:reduce){
  *{scroll-behavior:auto!important;transition:none!important}
}
