:root{
  --bg: #070a12;
  --text: #e5e7eb;
  --muted: #a7b0c0;
  --line: rgba(255,255,255,.10);
  --warn: #fbbf24;
  --shadow: 0 14px 40px rgba(0,0,0,.45);
  --radius: 18px;
  --max: 1120px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", "Noto Sans", "Liberation Sans", sans-serif;
}

*{ box-sizing:border-box; }
html, body{ margin:0; padding:0; }
body{
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(99,102,241,.28), transparent 60%),
    radial-gradient(780px 520px at 88% 8%, rgba(34,211,238,.18), transparent 55%),
    radial-gradient(900px 620px at 60% 100%, rgba(16,185,129,.14), transparent 55%),
    var(--bg);
  overflow-x:hidden;
}

/* Subtle animated glow */
body::before, body::after{
  content:"";
  position:fixed;
  inset:-120px;
  pointer-events:none;
  z-index:-1;
  background:
    radial-gradient(220px 180px at 20% 15%, rgba(99,102,241,.18), transparent 70%),
    radial-gradient(260px 220px at 80% 20%, rgba(34,211,238,.14), transparent 70%),
    radial-gradient(320px 260px at 60% 85%, rgba(16,185,129,.10), transparent 75%);
  filter: blur(18px);
  animation: drift 12s ease-in-out infinite alternate;
}
body::after{ animation-duration: 16s; opacity:.65; }
@keyframes drift{
  from{ transform: translate3d(-10px,-6px,0) scale(1); }
  to{ transform: translate3d(10px,8px,0) scale(1.02); }
}

a{ color: inherit; text-decoration:none; }
.wrap{ width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }

.site-header{
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  background: rgba(7,10,18,.72);
  border-bottom: 1px solid var(--line);
}

.brand{
  display:flex;
  gap: 14px;
  align-items:flex-start;
  padding: 18px 0 8px;
}
.badge{
  width: 46px; height: 46px;
  display:grid; place-items:center;
  background: linear-gradient(145deg, rgba(99,102,241,.28), rgba(34,211,238,.14));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  box-shadow: var(--shadow);
  font-size: 20px;
}
h1{ font-size: 22px; margin: 0; letter-spacing:.2px; }
.subtitle{ margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.meta{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
}
.pill{
  font-size: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.20);
}

.toolbar{
  display:flex;
  gap: 10px;
  padding: 0 0 16px;
  flex-wrap: wrap;
}

.btn{
  appearance:none;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  color: var(--text);
  padding: 10px 13px;
  border-radius: 14px;
  font-weight: 800;
  cursor:pointer;
  transition: transform .10s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}
.btn:hover{
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.08));
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 14px 30px rgba(0,0,0,.34);
}
.btn:active{ transform: translateY(1px); }
.btn.ghost{
  background: rgba(0,0,0,.18);
  box-shadow: none;
}
.btn:disabled{ opacity:.45; cursor:not-allowed; }

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 16px 0;
}

.lead{ margin: 6px 0 0; color: var(--muted); }

.callout{
  margin-top: 14px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(99,102,241,.10);
}
.callout.small{ padding: 10px 12px; font-size: 14px; }
.callout.warn{
  background: rgba(251,191,36,.10);
  border-color: rgba(251,191,36,.24);
}

.compact{ margin: 8px 0 0; padding-left: 18px; }
.compact li{ margin: 6px 0; }

.teacher-tip{
  display:none;
  margin-top: 14px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(16,185,129,.22);
  background: rgba(16,185,129,.10);
}

.hero{ padding: 18px; }
.hero-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
}
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
}
.hero-title{
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing:.2px;
}
.cta-row{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.example-card{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  border-radius: 16px;
  overflow:hidden;
}
.example-head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.example-foot{
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
  display:flex;
  justify-content: flex-end;
}
.video-embed{
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.video-embed iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}

/* Wizard */
.wizard-top{ margin-bottom: 14px; }
.progress{
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  overflow:hidden;
}
.progress-bar{
  height: 100%;
  background: linear-gradient(90deg, rgba(99,102,241,.92), rgba(34,211,238,.85), rgba(16,185,129,.80));
  width:0%;
  transition: width .2s ease;
}
.progress-meta{
  display:flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
}
.muted{ color: var(--muted); }

/* Step cards */
.stepcard{ display:none; padding: 0; }
.stepcard.active{ display:block; animation: fadeIn .18s ease; }
@keyframes fadeIn{
  from{ opacity:.65; transform: translateY(2px); }
  to{ opacity:1; transform: translateY(0); }
}

.step-head{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  margin-bottom: 14px;
}
.step-num{
  width: 36px; height: 36px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(99,102,241,.22);
  border: 1px solid rgba(99,102,241,.32);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(0,0,0,.28);
}

.step-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px){
  .step-grid{ grid-template-columns: 1fr; }
}

.tasks{ margin: 0; padding-left: 18px; }
.tasks li{ margin: 8px 0; }

.checks{
  margin-top: 14px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.checks label{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 10px 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  border-radius: 16px;
}
.checks input{ margin-top: 3px; }

.figure{
  margin:0;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  border-radius: 16px;
  overflow:hidden;
}
.figure-head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  font-size: 13px;
  color: var(--muted);
}
.figure img{
  width: 100%;
  display:block;
  max-height: 360px;
  object-fit: cover;
}
.figure figcaption{
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}
.figure-stack{ display:flex; flex-direction:column; gap: 12px; }

.img-placeholder{
  display:grid;
  place-items:center;
  height: 220px;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.04) 12px, rgba(255,255,255,.02) 12px, rgba(255,255,255,.02) 24px);
  color: rgba(229,231,235,.78);
  font-weight: 900;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.18);
  padding: 16px;
  text-align:center;
}

.wizard-nav{
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.10);
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.wizard-nav-mid{ display:flex; gap: 10px; align-items:center; }

.reflect{ margin-top: 16px; display:flex; flex-direction:column; gap: 8px; }
textarea{
  width:100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color: var(--text);
  padding: 12px;
  resize: vertical;
  outline:none;
}
textarea:focus{ border-color: rgba(99,102,241,.35); }

/* Dialog */
.step-dialog{
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: rgba(17,24,39,.96);
  color: var(--text);
  padding: 14px;
  width: min(520px, calc(100% - 24px));
  box-shadow: var(--shadow);
}
.step-dialog::backdrop{ background: rgba(0,0,0,.60); }
.dialog-head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.dialog-body{
  padding-top: 12px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.step-jump{
  width: 100%;
  text-align:left;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 16px;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap: 10px;
}
.step-jump:hover{ background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18); }
.jump-num{
  width: 30px; height: 30px;
  display:grid; place-items:center;
  border-radius: 12px;
  background: rgba(34,211,238,.12);
  border: 1px solid rgba(34,211,238,.22);
  font-weight: 900;
}

.site-footer{ padding: 10px 0 30px; }


/* Video fallback (when YouTube embed is blocked) */
.video-fallback{
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.thumb-link{
  display:flex;
  gap: 12px;
  align-items:center;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}
.thumb-link:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
}
.thumb-link img{
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
}
.thumb-cta{
  font-weight: 900;
}
.smallprint{
  margin: 10px 2px 0;
  font-size: 12px;
}


/* YouTube link card (embed-free, school-proof) */
.video-link-block{
  padding: 14px;
}
.yt-card{
  display:flex;
  gap: 14px;
  align-items:center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  transition: transform .12s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,.26);
}
.yt-card:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 16px 34px rgba(0,0,0,.32);
}
.yt-thumb{
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  flex: 0 0 auto;
}
.yt-meta{ display:flex; flex-direction:column; gap: 6px; }
.yt-title{ font-weight: 950; letter-spacing: .2px; }
.yt-sub{ color: var(--muted); font-size: 13px; }
@media (max-width: 560px){
  .yt-card{ flex-direction:column; align-items:flex-start; }
  .yt-thumb{ width: 100%; height: auto; aspect-ratio: 16/9; }
}


/* Collapsible Start card */
.hero-title-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}
.btn.mini{
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
}
#startCard #startBody{
  max-height: 1200px;
  overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease, transform .25s ease;
  opacity: 1;
  transform: translateY(0);
}
#startCard.collapsed #startBody{
  max-height: 0px;
  opacity: .0;
  transform: translateY(-4px);
}
#startCard.collapsed{
  padding-bottom: 10px;
}
