*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #f1f4fa;
  --card:         #ffffff;
  --border:       rgba(18,32,72,.10);
  --border-row:   rgba(18,32,72,.06);
  --accent:       #1f53bd;
  --accent-dark:  #163f93;
  --accent-light: #eaf0fb;
  --accent-red:   #b42a3c;
  --accent-red-dark: #8f2030;
  --navy:         #0e1830;
  --text:         #18223e;
  --muted:        #525e7c;
  --dimmer:       #828cad;
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std:     cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm:    0 1px 2px rgba(0,0,0,.04), 0 2px 6px rgba(14,24,55,.05);
  --shadow:       0 1px 3px rgba(0,0,0,.04), 0 4px 20px rgba(16,28,64,.07);
  --shadow-lg:    0 2px 8px rgba(0,0,0,.05), 0 12px 40px rgba(16,28,64,.11);
  --radius:       16px;
  --radius-sm:    10px;
}

html { scroll-behavior: smooth; }

/* ── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Loader ───────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: #0c1531;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .65s var(--ease-std);
}
#loader.ld-out {
  opacity: 0;
  pointer-events: none;
}
.ld-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.ld-ring-wrap {
  position: relative;
  width: 170px;
  height: 170px;
}
.ld-svg { width: 100%; height: 100%; overflow: visible; }
.ld-track {
  stroke: rgba(132,166,236,.18);
  stroke-width: 7;
  stroke-dasharray: 292.17 97.39;
  stroke-linecap: round;
  transform: rotate(135deg);
  transform-origin: 80px 80px;
}
.ld-fill {
  stroke: url(#ldGrad);
  stroke-width: 7;
  stroke-dasharray: 292.17 10000;
  stroke-dashoffset: 292.17;
  stroke-linecap: round;
  transform: rotate(135deg);
  transform-origin: 80px 80px;
}
.ld-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.ld-num {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ld-pts {
  font-size: .6rem;
  font-weight: 700;
  color: #85a8f0;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-top: 4px;
}
.ld-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  letter-spacing: -.01em;
  opacity: 0;
  animation: ldUp .5s ease forwards .35s;
}
.ld-sub {
  font-size: .68rem;
  font-weight: 500;
  color: rgba(255,255,255,.28);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: -16px;
  opacity: 0;
  animation: ldUp .5s ease forwards .5s;
}
@keyframes ldUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Body ────────────────────────────────────────────── */
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header ──────────────────────────────────────────── */
header {
  background: rgba(242,245,243,0.88);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  position: sticky;
  top: 0;
  z-index: 200;
  transition: background .3s var(--ease-std), box-shadow .3s var(--ease-std), border-color .3s var(--ease-std);
}
header.scrolled {
  background: rgba(242,245,243,0.95);
  box-shadow: 0 1px 0 rgba(18,32,72,.08), 0 4px 20px rgba(14,24,55,.07);
  border-bottom-color: transparent;
}
.header-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(31,83,189,.3), 0 0 0 1px rgba(31,83,189,.15);
  flex-shrink: 0;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.brand-mark:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 16px rgba(31,83,189,.4), 0 0 0 1px rgba(31,83,189,.2);
}
.brand-name   { font-size: 0.95rem; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
.brand-school { font-size: 0.72rem; color: var(--muted); margin-top: 1px; }

.header-actions { display: flex; gap: 8px; }
.btn-icon {
  width: 36px; height: 36px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .22s var(--ease);
}
.btn-icon:hover {
  background: var(--accent-light);
  border-color: rgba(31,83,189,.2);
  color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 72px 32px 96px;
  position: relative;
  overflow: visible; /* stacked cards behind front card peek out */
}
/* Clip only the decorative radial behind everything */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 50%, rgba(31,83,189,.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 1;
}
.hero-text { flex-shrink: 0; max-width: 420px; }

/* Hero entrance animations — triggered by body.loaded */
.hero-eyebrow,
.hero-text h1,
.hero-text p,
.hero-deck {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
body.loaded .hero-eyebrow {
  opacity: 1;
  transform: translateY(0);
}
body.loaded .hero-text h1 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.07s;
}
body.loaded .hero-text p {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.14s;
}
body.loaded .hero-deck {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.12s;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-light);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(31,83,189,.15);
}
.hero-text h1 {
  font-size: clamp(3rem, 5.5vw, 4.4rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.05em;
  line-height: 1.02;
  margin-bottom: 18px;
}
.hero-text h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-text p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 400;
  max-width: 38ch;
}
/* ── Hero Deck (cycling card stack) ──────────────────── */
.hero-deck {
  position: relative;
  width: 380px;
  height: 330px;
  flex-shrink: 0;
  cursor: grab;
  touch-action: pan-y;
}
.hero-deck:active { cursor: grabbing; }

/* Individual cards — perpetual orbit via CSS animation */
.hcard {
  position: absolute;
  top: 0; left: 0;
  width: 298px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(18,32,72,.09);
  padding: 18px 18px 16px;
  user-select: none;
  will-change: transform, opacity;
  /* Each card runs the same orbit; delays stagger them 1/4 cycle apart */
  animation: deckOrbit 10s ease-in-out infinite;
  pointer-events: none; /* only front card gets pointer events (JS adds class) */
}
/* Stagger: 4 cards × 2.5s offset = 10s full orbit */
.hcard:nth-child(1) { animation-delay:    0s; }
.hcard:nth-child(2) { animation-delay: -2.5s; }
.hcard:nth-child(3) { animation-delay:   -5s; }
.hcard:nth-child(4) { animation-delay: -7.5s; }

/* Front card (set by JS class .hcard--front) gets pointer events + hover lift */
.hcard.hcard--front { pointer-events: auto; }

/* Pause all cards when deck is hovered (JS adds .deck-paused) */
.hero-deck.deck-paused .hcard { animation-play-state: paused; }

/* ── The Orbit ────────────────────────────────────────────
   0-25%   : FRONT — fully visible, stays put
   25-45%  : moves to second position
   45-58%  : moves to third position
   58-65%  : fades out (going behind)
   65-65.1%: z-index jumps while opacity=0 (invisible — no flicker)
   65-84%  : invisible, re-enters from bottom-left
   84-100% : fades back in and arrives at front
─────────────────────────────────────────────────────────── */
@keyframes deckOrbit {
  /* === FRONT: dwell here ================================ */
  0% {
    transform: rotate(-1.5deg) translate(0px, 0px) scale(1);
    opacity: 1;
    z-index: 4;
    box-shadow: 0 4px 12px rgba(0,0,0,.06), 0 20px 56px rgba(14,24,55,.12);
  }
  25% {
    transform: rotate(-1.5deg) translate(0px, 0px) scale(1);
    opacity: 1;
    z-index: 4;
    box-shadow: 0 4px 12px rgba(0,0,0,.06), 0 20px 56px rgba(14,24,55,.12);
  }
  /* === Move to second =================================== */
  42% {
    transform: rotate(2.2deg) translate(20px, 16px) scale(0.94);
    opacity: 0.82;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(14,24,55,.07);
  }
  /* === Move to third ==================================== */
  56% {
    transform: rotate(5.5deg) translate(38px, 30px) scale(0.88);
    opacity: 0.58;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
  }
  /* === Fade out ========================================= */
  64% {
    transform: rotate(7.5deg) translate(54px, 44px) scale(0.80);
    opacity: 0;
    z-index: 1;
    box-shadow: none;
  }
  /* === z-index jumps HERE while opacity is 0 (invisible) */
  64.1% {
    transform: rotate(-5deg) translate(-22px, 32px) scale(0.80);
    opacity: 0;
    z-index: 4; /* back on top, ready to emerge */
    box-shadow: none;
  }
  /* === Stay invisible, re-enter position ================ */
  83% {
    transform: rotate(-4deg) translate(-16px, 22px) scale(0.84);
    opacity: 0;
    z-index: 4;
    box-shadow: none;
  }
  /* === Emerge — card fades in from slightly below ======= */
  93% {
    transform: rotate(-2.5deg) translate(-6px, 8px) scale(0.94);
    opacity: 0.55;
    z-index: 4;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
  }
  /* === Arrive at front ================================== */
  100% {
    transform: rotate(-1.5deg) translate(0px, 0px) scale(1);
    opacity: 1;
    z-index: 4;
    box-shadow: 0 4px 12px rgba(0,0,0,.06), 0 20px 56px rgba(14,24,55,.12);
  }
}

/* Deck navigation dots */
.hero-deck-dots {
  position: absolute;
  bottom: -28px;
  left: 2px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.hdot {
  height: 6px;
  width: 6px;
  border-radius: 3px;
  background: rgba(31,83,189,.22);
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    width  .38s cubic-bezier(0.16,1,0.3,1),
    background .3s ease;
}
.hdot.hdot--active {
  width: 22px;
  background: var(--accent);
}

/* ── Card content: shared header ── */
.hcard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(18,32,72,.07);
}
.hcard-hl {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
.hcard-stat {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.01em;
}
.hcard-stat small {
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Card 0: Course table ── */
.hcard-cols {
  display: grid;
  grid-template-columns: 1fr 44px 50px;
  gap: 6px;
  margin-bottom: 5px;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--dimmer);
}
.hcard-row {
  display: grid;
  grid-template-columns: 1fr 44px 50px;
  gap: 6px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(18,32,72,.04);
}
.hcard-row:last-of-type { border-bottom: none; }
.hcard-row--ph { opacity: 0.3; }
.hcard-name {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hcard-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(18,32,72,.06);
  color: var(--text);
  border: 1px solid rgba(18,32,72,.1);
  white-space: nowrap;
  letter-spacing: .01em;
}
.hcard-badge--em {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-color: rgba(31,83,189,.25);
}
.hcard-chip {
  font-size: 0.63rem;
  font-weight: 500;
  color: var(--muted);
}
.hcard-addbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 11px;
  padding: 7px 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .01em;
  pointer-events: none;
}

/* ── Card 1: Live GPA ── */
.hcard-gpa-hero {
  text-align: center;
  padding: 10px 0 14px;
}
.hcard-gpa-big {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hcard-gpa-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-top: 7px;
}
.hcard-gpa-uw {
  font-size: 0.7rem;
  color: var(--dimmer);
  margin-top: 4px;
  font-weight: 500;
}
.hcard-bar {
  height: 5px;
  background: rgba(31,83,189,.12);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}
.hcard-bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 3px;
  transition: width 1.3s cubic-bezier(0.16,1,0.3,1) .15s;
}
/* Fill animates when card comes to front */
.hcard.hcard--front .hcard-bar-fill { width: var(--fill-w, 0%); }
.hcard-bar-marks {
  display: flex;
  justify-content: space-between;
  font-size: 0.55rem;
  color: var(--dimmer);
  margin-bottom: 14px;
}
.hcard-status-chip {
  display: inline-block;
  padding: 5px 12px;
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid rgba(31,83,189,.2);
  border-radius: 20px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: .04em;
}

/* ── Card 2: Grade Dropdown ── */
.hcard-dd-lbl {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--dimmer);
  margin-bottom: 8px;
}
.hcard-dd {
  border: 1px solid rgba(31,83,189,.2);
  border-radius: 12px;
  overflow: hidden;
}
.hcard-dd-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--navy);
  border-bottom: 1px solid rgba(18,32,72,.04);
}
.hcard-dd-item:last-child { border-bottom: none; }
.hcard-dd-item--sel {
  background: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 700;
}
.hcard-dd-item--dim { opacity: 0.42; }

/* ── Card 3: Semester History ── */
.hcard-hist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.hcard-hist-row {
  display: grid;
  grid-template-columns: 58px 1fr 34px;
  gap: 8px;
  align-items: center;
}
.hcard-hist-sem {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.hcard-hist-row--cur .hcard-hist-sem { color: var(--navy); font-weight: 600; }
.hcard-hist-bar {
  height: 5px;
  background: rgba(18,32,72,.08);
  border-radius: 3px;
  overflow: hidden;
}
.hcard-hist-fill {
  height: 100%;
  width: 0;
  background: rgba(31,83,189,.38);
  border-radius: 3px;
  transition: width 1.1s cubic-bezier(0.16,1,0.3,1) .2s;
}
.hcard-hist-fill--cur { background: var(--accent); }
/* Fill history bars when card is at front */
.hcard.hcard--front .hcard-hist-fill { width: var(--w, 0); }
.hcard-hist-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
}
.hcard-hist-num--cur { color: var(--accent-dark); }
.hcard-cum {
  padding: 8px 12px;
  background: var(--navy);
  color: rgba(255,255,255,.82);
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: .02em;
}

/* ── Main ─────────────────────────────────────────────── */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 32px 120px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Semester card ───────────────────────────────────── */
.semester-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);

  /* scroll-reveal start state */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), box-shadow .3s var(--ease-std);
}
.semester-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.semester-card:hover {
  box-shadow: var(--shadow-lg);
}

.sem-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.sem-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sem-foot {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
}
.sem-gpa-line {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sem-gpa-line strong {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
}
.sem-gpa-line #current-gpa-u {
  color: var(--muted);
  font-size: 0.95rem;
}
.gpa-sep { color: var(--dimmer); margin: 0 4px; }

/* ── Table ────────────────────────────────────────────── */
.table-head {
  padding: 8px 24px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--dimmer);
  background: #fafcfb;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.row-grid {
  display: grid;
  grid-template-columns: minmax(110px,2.5fr) minmax(120px,1fr) minmax(96px,1.5fr) minmax(110px,1.3fr) 32px;
  gap: 10px;
  align-items: center;
}

/* ── Course row ───────────────────────────────────────── */
.course-row {
  padding: 8px 24px;
  border-bottom: 1px solid var(--border-row);
  transition: background .18s var(--ease-std);
  animation: rowSlideIn .25s var(--ease) both;
}
.course-row:last-child { border-bottom: none; }
.course-row:hover { background: rgba(31,83,189,.025); }
.course-row.removing {
  animation: rowSlideOut .22s var(--ease-std) forwards;
  pointer-events: none;
}

@keyframes rowSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rowSlideOut {
  to   { opacity: 0; transform: translateX(-8px); height: 0; padding: 0; margin: 0; }
}

.course-row input {
  width: 100%;
  padding: 8px 11px;
  background: #f8faf9;
  border: 1px solid rgba(18,32,72,.1);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.875rem;
  color: var(--navy);
  outline: none;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.course-row input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(31,83,189,.1);
}
.course-row input::placeholder { color: var(--dimmer); }

.course-row select {
  width: 100%;
  padding: 7px 26px 7px 12px;
  background: #fff;
  border: 1px solid rgba(18,32,72,.12);
  border-radius: 50px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--navy);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a9e91'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.course-row select:hover { border-color: rgba(31,83,189,.4); }
.course-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,83,189,.1);
}
.course-row select.sel-placeholder { color: var(--dimmer); }

/* ── Custom Grade Dropdown ────────────────────────────── */
.cs-wrap {
  position: relative;
  width: 100%;
}
.cs-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 7px 10px 7px 12px;
  background: #fff;
  border: 1px solid rgba(18,32,72,.12);
  border-radius: 50px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  outline: none;
  overflow: hidden;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.cs-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-chevron {
  flex-shrink: 0;
  transition: transform .25s var(--ease);
  color: var(--dimmer);
}
.cs-trigger:hover {
  border-color: rgba(31,83,189,.35);
  background: #fafcfb;
}
.cs-wrap.open .cs-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,83,189,.1);
}
.cs-wrap.cs-placeholder .cs-trigger { color: var(--dimmer); }
.cs-wrap.open .cs-chevron { transform: rotate(180deg); }

.cs-list { display: none; }

/* Portal dropdown — appended to <body> */
.cs-portal-open {
  position: fixed;
  display: none;
  min-width: 160px;
  background: #fff;
  border: 1px solid rgba(18,32,72,.1);
  border-radius: 14px;
  box-shadow: 0 4px 8px rgba(0,0,0,.04), 0 16px 48px rgba(14,24,55,.12);
  padding: 6px;
  z-index: 99999;
  max-height: 280px;
  overflow-y: auto;
  list-style: none;
}
.cs-portal-open.cs-anim {
  animation: csOpen .2s var(--ease) both;
}

@keyframes csOpen {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cs-item {
  padding: 9px 14px 9px 36px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  position: relative;
  transition: background .12s var(--ease-std), color .12s var(--ease-std);
  user-select: none;
}
.cs-item:hover { background: var(--accent-light); color: var(--accent-dark); }
.cs-item--selected { color: var(--accent-dark); font-weight: 600; }
.cs-item--selected::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px; height: 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 9' fill='none'%3E%3Cpath d='M1 4.5l3.5 3.5 7.5-7' stroke='%2312b886' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.btn-remove {
  width: 28px; height: 28px;
  background: none; border: none;
  color: var(--dimmer);
  font-size: 1.1rem; line-height: 1;
  cursor: pointer; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s var(--ease);
}
.btn-remove:hover { background: rgba(180,42,60,.08); color: var(--accent-red); transform: scale(1.1); }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: all .22s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  background: #f5faf8;
  border-color: rgba(18,32,72,.12);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(0); box-shadow: none; }

.btn.ghost-sm {
  background: none; border: none; padding: 4px 8px;
  font-size: 0.8rem; color: var(--muted); cursor: pointer;
  border-radius: 7px; font: inherit; transition: all .18s var(--ease);
}
.btn.ghost-sm:hover { background: rgba(31,83,189,.07); color: var(--text); }

.btn.btn-add {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(31,83,189,.2), 0 3px 10px rgba(31,83,189,.15);
}
.btn.btn-add:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 2px 4px rgba(31,83,189,.25), 0 6px 20px rgba(31,83,189,.2);
}
.btn.btn-add:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(31,83,189,.15); }

.btn.btn-outline {
  background: transparent;
  border-color: rgba(31,83,189,.25);
  color: var(--accent-dark);
}
.btn.btn-outline:hover {
  background: var(--accent-light);
  border-color: rgba(31,83,189,.4);
}

/* Cumulative toggle button */
.toggle-row { display: flex; justify-content: center; }
.btn-cumulative {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  border-radius: 50px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(31,83,189,.25);
  background: var(--card);
  color: var(--accent-dark);
  transition: all .25s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn-cumulative:hover {
  background: var(--accent-light);
  border-color: rgba(31,83,189,.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(31,83,189,.15);
}
.btn-cumulative:active { transform: translateY(0); }
#toggle-icon { transition: transform .3s var(--ease); flex-shrink: 0; }
.btn-cumulative.open #toggle-icon { transform: rotate(45deg); }

/* ── Past semester cards ─────────────────────────────── */
#past-semesters { display: flex; flex-direction: column; gap: 20px; }

.past-sem-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: cardSlideIn .32s var(--ease) both;
}
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sem-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 10px;
}
.sem-label { display: flex; gap: 8px; align-items: center; }
.sem-label select {
  padding: 7px 26px 7px 11px;
  background: #f8faf9;
  border: 1px solid rgba(18,32,72,.1);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 0.875rem; color: var(--navy);
  cursor: pointer; outline: none;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a9e91'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.sem-label select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,83,189,.1);
}

.sem-right { display: flex; align-items: center; gap: 16px; }
.sem-gpa-badge { text-align: right; }
.sem-gpa-num {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--navy);
}
.sem-gpa-sub {
  font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: .09em; color: var(--dimmer);
  margin-top: 3px;
}
.sem-gpa-uw-row {
  font-size: 0.65rem; color: var(--muted);
  font-weight: 500; margin-top: 2px;
}
.sem-gpa-uw-row span { font-weight: 700; color: var(--text); }
.btn-remove-sem {
  padding: 6px 13px;
  border: 1px solid var(--border); border-radius: 8px;
  background: none; font: inherit; font-size: 0.78rem;
  color: var(--muted); cursor: pointer; transition: all .2s var(--ease);
}
.btn-remove-sem:hover {
  border-color: rgba(180,42,60,.3);
  color: var(--accent-red);
  background: rgba(180,42,60,.05);
}

.sem-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; border-top: 1px solid var(--border);
}

/* ── Floating Gauge ──────────────────────────────────── */
.gauge-float {
  position: fixed;
  bottom: 28px; right: 28px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-radius: 20px;
  padding: 16px 16px 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 0 0 1px rgba(18,32,72,.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 162px;
  z-index: 100;
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.gauge-float:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.1), 0 0 0 1px rgba(31,83,189,.12);
  transform: translateY(-2px);
}
.gauge-float.pulse {
  animation: gaugePulse .65s var(--ease-std);
}
@keyframes gaugePulse {
  0%   { box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 0 0 1px rgba(18,32,72,.07); }
  40%  { box-shadow: 0 4px 24px rgba(31,83,189,.2), 0 0 0 3px rgba(31,83,189,.15); }
  100% { box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 0 0 1px rgba(18,32,72,.07); }
}

.gauge-svg {
  width: 130px; height: 130px;
  display: block;
}

.g-track {
  fill: none;
  stroke: rgba(31,83,189,.12);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 292.17 97.39;
}
.g-fill {
  fill: none;
  stroke: url(#gaugeGrad);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 292.17 10000;
  stroke-dashoffset: 310;
  transition: stroke-dashoffset .8s var(--ease);
}

.gauge-center {
  position: absolute;
  top: 16px; left: 0; right: 0;
  height: 130px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding-bottom: 16px;
}
.gauge-val {
  font-size: 1.75rem; font-weight: 700;
  letter-spacing: -.05em; line-height: 1;
  color: var(--navy);
  transition: color .4s var(--ease-std);
  font-variant-numeric: tabular-nums;
}
.gauge-val.c-green  { color: var(--accent-dark); }
.gauge-val.c-yellow { color: #d97706; }
.gauge-val.c-red    { color: var(--accent-red); }

.gauge-lbl {
  font-size: 0.48rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--dimmer);
  font-weight: 600; margin-top: 3px;
  text-align: center; line-height: 1.4;
  max-width: 100px;
}
.gauge-scale {
  display: flex;
  justify-content: space-between;
  width: 108px;
  font-size: 0.6rem; color: var(--dimmer);
  font-weight: 500;
  margin-top: 2px;
}
.gauge-sub {
  font-size: 0.58rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .02em;
  margin-top: 3px;
  text-align: center;
  min-height: 10px;
}

/* ── Toast ────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--navy);
  color: #fff;
  padding: 10px 22px; border-radius: 50px;
  font-size: 0.84rem; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
  z-index: 999; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Footer ───────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 28px 24px;
  color: var(--dimmer);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
}

.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════
   SCROLL STORY
═══════════════════════════════════════════════════════ */
.story-section {
  height: 500vh;
  position: relative;
  background: var(--bg);
}

.story-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-container {
  max-width: 980px;
  width: 100%;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

/* ── Left column ────────────────────────── */
.story-left { position: relative; }

.story-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 48px;
}

.story-steps { position: relative; min-height: 280px; }

.story-step {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}
.story-step.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.story-step.past {
  opacity: 0;
  transform: translateY(-24px);
}

.step-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 14px;
}
.step-title {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.04em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.step-desc {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.75;
  max-width: 360px;
}
.step-desc strong { color: var(--navy); font-weight: 700; }
.step-desc em     { color: var(--accent-dark); font-style: normal; font-weight: 600; }

/* Progress dots */
.story-dots {
  display: flex;
  gap: 9px;
  margin-top: 48px;
}
.sdot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(31,83,189,.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .3s var(--ease), transform .3s var(--ease), width .3s var(--ease);
}
.sdot.active {
  background: var(--accent);
  transform: scale(1.5);
}

/* ── Right column (visuals) ─────────────── */
.story-right {
  position: relative;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svis {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.94) translateY(20px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}
.svis.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.svis.past {
  opacity: 0;
  transform: scale(.94) translateY(-16px);
}

/* ── Shared vis card ──────────────────── */
.vis-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 22px 20px;
  width: 380px;
  max-width: 100%;
}
.vis-card--sm { width: 310px; }

/* Vis 0 — add course mockup */
.vis-row-head {
  display: grid;
  grid-template-columns: 2fr 70px 80px 70px;
  gap: 8px;
  padding: 0 4px 8px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--dimmer);
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.vis-row {
  display: grid;
  grid-template-columns: 2fr 70px 80px 70px 20px;
  gap: 8px;
  align-items: center;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(18,32,72,.04);
}
.vis-row--ghost { opacity: .4; }
.vis-field {
  background: #f8faf9;
  border: 1px solid rgba(18,32,72,.1);
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 0.8rem;
  color: var(--navy);
  font-weight: 500;
}
.vis-field--ph { color: var(--dimmer); }
.vis-pill {
  background: #fff;
  border: 1px solid rgba(18,32,72,.12);
  border-radius: 50px;
  padding: 5px 8px;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  white-space: nowrap;
}
.vis-pill--grade { color: var(--accent-dark); border-color: rgba(31,83,189,.35); }
.vis-pill--ph    { opacity: .35; }
.vis-x { color: var(--dimmer); font-size: 1rem; text-align: center; }

.vis-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 16px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  cursor: default;
  animation: addPulse 2.5s var(--ease-std) infinite;
}
@keyframes addPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(31,83,189,0), 0 2px 6px rgba(31,83,189,.2); }
  50%      { box-shadow: 0 0 0 8px rgba(31,83,189,.12), 0 2px 6px rgba(31,83,189,.2); }
}

/* Vis 1 — grade dropdown */
.vis-dd-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--dimmer);
  margin-bottom: 9px;
}
.vis-dropdown {
  border: 1px solid rgba(31,83,189,.25);
  border-radius: 12px;
  overflow: hidden;
}
.vis-opt {
  padding: 9px 13px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--navy);
  border-bottom: 1px solid rgba(18,32,72,.04);
}
.vis-opt:last-child { border-bottom: none; }
.vis-opt--ph  { color: var(--dimmer); }
.vis-opt--sel { background: var(--accent-light); color: var(--accent-dark); font-weight: 700; }
.vis-opt--fade { opacity: .45; }

/* Vis 2 — weights table */
.vis-tbl-head {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--dimmer);
  margin-bottom: 10px;
}
.vis-table {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.vis-trow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  border-bottom: 1px solid rgba(18,32,72,.04);
}
.vis-trow--hi   { background: rgba(31,83,189,.04); }
.vis-trow--last { border-bottom: none; }
.vis-w0  { color: var(--dimmer); }
.vis-whi { color: var(--accent-dark); font-weight: 700;
           animation: wBounce 2s var(--ease-std) infinite; }
@keyframes wBounce {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.1); }
}

/* Vis 3 — live gauge */
.vis-gauge-wrap {
  position: relative;
  width: 210px; height: 210px;
}
.vis-gauge-svg { width: 210px; height: 210px; display: block; }

.vis-g-track {
  fill: none; stroke: rgba(31,83,189,.1);
  stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 292.17 97.39;
}
.vis-g-fill {
  fill: none; stroke: url(#visGrad);
  stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 292.17 10000;
  stroke-dashoffset: 310;
  transition: stroke-dashoffset 1.5s var(--ease);
}
.svis.active .vis-g-fill { stroke-dashoffset: 42; }

.vis-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 22px;
}
.vis-gauge-val {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.vis-gauge-lbl {
  font-size: 0.52rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--dimmer);
  font-weight: 700;
  margin-top: 5px;
}
.vis-gauge-uw {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}

/* Vis 4 — semester history */
.vis-sem-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 0.82rem;
  margin-bottom: 7px;
  border: 1px solid transparent;
  transition: background .2s var(--ease-std);
}
.vis-sem-row--past {
  background: #f8faf9;
  color: var(--muted);
  border-color: var(--border);
}
.vis-sem-row--cur {
  background: var(--accent-light);
  color: var(--navy);
  border-color: rgba(31,83,189,.2);
  font-weight: 600;
}
.vis-sem-g     { font-weight: 700; color: var(--accent-dark); }
.vis-sem-g--cur { font-size: 1rem; }
.vis-cum-bar {
  margin-top: 12px;
  padding: 11px 14px;
  background: var(--navy);
  color: rgba(255,255,255,.85);
  border-radius: 11px;
  font-size: 0.84rem;
  text-align: center;
  animation: cumPulse 2.8s var(--ease-std) infinite;
}
.vis-cum-bar strong { color: rgba(31,83,189,.9); }
@keyframes cumPulse {
  0%,100% { box-shadow: 0 4px 20px rgba(31,83,189,.08); }
  50%     { box-shadow: 0 4px 28px rgba(31,83,189,.22); }
}

/* ═══════════════════════════════════════════════════════
   FAQ
═══════════════════════════════════════════════════════ */
.faq-section {
  padding: 96px 32px 80px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.faq-wrap {
  max-width: 700px;
  margin: 0 auto;
}
.faq-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.faq-heading {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.04em;
  margin-bottom: 44px;
}
.faq-list { display: flex; flex-direction: column; gap: 8px; }

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.faq-item[open] {
  box-shadow: 0 4px 24px rgba(0,0,0,.05);
  border-color: rgba(31,83,189,.2);
}

.faq-q {
  padding: 18px 20px;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  user-select: none;
  transition: background .18s var(--ease-std);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-item[open] .faq-q { background: rgba(31,83,189,.03); }

.faq-q::after {
  content: '';
  flex-shrink: 0;
  width: 20px; height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2312b886' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform .3s var(--ease);
}
.faq-item[open] .faq-q::after { transform: rotate(45deg); }

.faq-a {
  padding: 2px 20px 18px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.78;
  animation: faqReveal .25s var(--ease) both;
}
.faq-a strong { color: var(--navy); font-weight: 700; }
@keyframes faqReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 44px 20px 52px; }
  .hero-inner { flex-direction: column; gap: 24px; }
  .hero-art { justify-content: center; max-width: 100%; }
  .hero-text h1 { font-size: clamp(2.2rem, 8vw, 3rem); }
  .hero-text p { font-size: 0.95rem; }

  main { padding: 24px 16px 100px; gap: 16px; }
  header { padding: 12px 16px; }

  .table-head { display: none; }
  .row-grid {
    grid-template-columns: 1fr 1fr 1fr 32px;
    grid-template-rows: auto auto;
  }
  .course-row { padding: 8px 14px; }
  .course-row .input-name { grid-column: 1 / -1; }

  .sem-head { padding: 16px 16px 12px; }
  .sem-foot { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .sem-card-head { padding: 12px 16px; }

  .gauge-float {
    width: 142px; right: 14px; bottom: 14px;
    border-radius: 18px;
  }
  .gauge-svg { width: 110px; height: 110px; }
  .gauge-center { height: 110px; }
  .gauge-val { font-size: 1.45rem; }

  /* Scroll story — mobile: disable sticky, stack vertically */
  .story-section { height: auto; }
  .story-pin {
    position: relative;
    height: auto;
    padding: 60px 24px 48px;
    align-items: flex-start;
  }
  .story-container {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0;
  }
  .story-right { display: none; }
  .story-steps { min-height: 0; }
  .story-step {
    position: relative;
    inset: auto;
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .4s var(--ease), transform .4s var(--ease);
    pointer-events: auto;
    margin-bottom: 52px;
  }
  .story-step:last-child { margin-bottom: 0; }
  .story-step.in-view { opacity: 1; transform: translateY(0); }
  .story-dots { display: none; }
  .step-title { font-size: 1.8rem; }

  /* FAQ mobile */
  .faq-section { padding: 60px 20px 48px; }

  /* Hero deck — single card on mobile, no stack */
  .hero-deck {
    width: 100%;
    height: 270px;
    margin-top: 8px;
  }
  .hcard {
    width: calc(100% - 40px);
    max-width: 320px;
  }
  /* On mobile show only the front card — pause orbit, hide others */
  .hcard:nth-child(2),
  .hcard:nth-child(3),
  .hcard:nth-child(4) {
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .hcard:nth-child(1) {
    animation-delay: 0s !important;
    animation-play-state: paused !important;
    transform: rotate(0deg) translate(0,0) scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .hero-deck-dots { bottom: -22px; }
}

/* ── Disclaimer Modal ─────────────────────────────── */
.disclaimer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,21,.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: dOverlayIn .4s var(--ease) both;
}
.disclaimer-overlay.hiding {
  animation: dOverlayOut .3s var(--ease-std) forwards;
  pointer-events: none;
}
@keyframes dOverlayIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes dOverlayOut { to   { opacity: 0; backdrop-filter: blur(0px); } }

.disclaimer-card {
  background: rgba(255,255,255,.98);
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 72px rgba(0,0,0,.14), 0 0 0 1px rgba(31,83,189,.07);
  padding: 40px 36px 34px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  animation: dCardIn .45s var(--ease) both;
}
@keyframes dCardIn {
  from { opacity: 0; transform: scale(.94) translateY(18px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.disclaimer-mark {
  width: 52px; height: 52px;
  background: var(--accent);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(31,83,189,.3);
}

.disclaimer-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.03em;
  margin-bottom: 16px;
}

.disclaimer-body {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.78;
  margin-bottom: 10px;
}
.disclaimer-body strong { color: var(--navy); font-weight: 700; }
.disclaimer-body:last-of-type { margin-bottom: 28px; }

.disclaimer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 40px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(31,83,189,.25), 0 6px 24px rgba(31,83,189,.2);
  letter-spacing: .01em;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.disclaimer-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(31,83,189,.3), 0 10px 32px rgba(31,83,189,.25);
}
.disclaimer-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(31,83,189,.2); }
