/* ---------- Klay.edu — global styles (v2, brand colours) ---------- */

:root {
  /* Klay palette — from logo */
  --bg: #0A0A0A;            /* black */
  --bg-2: #141414;
  --bg-3: #1C1C1C;
  --paper: #F5F1E8;         /* warm off-white */
  --ink: #FFFFFF;
  --ink-2: #E8E4DA;
  --muted: #8A8278;
  --muted-2: #5C564E;
  --line: #2A2622;
  --line-soft: #1F1C18;

  --red: #FF3D2E;           /* K */
  --cyan: #3DD1D9;          /* l */
  --yellow: #FFD24A;        /* a */
  --orange: #FF8528;        /* y */

  --max: 1480px;
  --gutter: clamp(20px, 4vw, 56px);

  --serif: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; font-size: 16px; line-height: 1.5; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--yellow); color: var(--bg); }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0.02em; }
.italic { font-style: normal; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.025em; line-height: 1.02; }
.italic, em, i, .it { font-style: normal; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; }
.section-pad { padding: clamp(80px, 10vw, 160px) 0; }
.divider { height: 1px; background: var(--line); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10,10,10,0.78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav .logo {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  display: inline-flex; align-items: baseline;
}
.nav .logo .k { color: var(--red); }
.nav .logo .l { color: var(--cyan); }
.nav .logo .a { color: var(--yellow); }
.nav .logo .y { color: var(--orange); }
.nav .logo .edu { color: var(--ink); }
.nav .links { display: flex; gap: 28px; font-size: 13.5px; color: var(--ink-2); }
.nav .links a { position: relative; padding: 6px 0; }
.nav .links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--ink);
  transition: width 0.3s ease;
}
.nav .links a:hover::after { width: 100%; }
.nav .cta {
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--bg);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.2s ease;
}
.nav .cta:hover { background: var(--cyan); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
@media (max-width: 800px) { .nav .links { display: none; } }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(140px, 18vh, 200px) 0 clamp(60px, 8vw, 100px);
  position: relative;
  overflow: hidden;
}
.hero-top {
  display: flex; justify-content: center; align-items: center;
  margin-bottom: 50px; flex-wrap: wrap; gap: 40px; text-align: center;
}
.hero-top .meta {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
  display: flex; flex-direction: column; gap: 6px;
}
.hero-top .meta strong { color: var(--ink); font-weight: 500; }

.hero-headline {
  font-family: var(--serif);
  font-size: clamp(56px, 11vw, 184px);
  line-height: 0.93;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-weight: 400;
  text-align: center;
}
.hero-headline .k { color: var(--red); }
.hero-headline .l { color: var(--cyan); }
.hero-headline .a { color: var(--yellow); }
.hero-headline .y { color: var(--orange); }
.hero-headline .strike { text-decoration: line-through; color: var(--muted-2); }

.hero-sub {
  display: flex; flex-direction: column;
  gap: 40px;
  margin-top: 60px;
  align-items: center;
  text-align: center;
}
.hero-sub p {
  font-family: var(--sans);
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 60ch;
}
.hero-actions { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.hero-actions .btn-primary {
  font-size: 14px; padding: 16px 24px;
  background: var(--ink); color: var(--bg);
  border-radius: 999px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 12px;
  transition: background 0.2s ease;
}
.hero-actions .btn-primary:hover { background: var(--yellow); }
.hero-actions .btn-primary svg { width: 16px; height: 16px; }
.hero-actions .secondary {
  font-size: 13px; color: var(--muted);
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
}

.hero-stickers {
  position: absolute;
  pointer-events: none;
  inset: 0;
}
.sticker {
  position: absolute;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px;
  color: var(--bg); font-weight: 500;
  transform: rotate(-6deg);
}
.sticker.red { background: var(--red); top: 22%; right: 6%; transform: rotate(8deg); }
.sticker.cyan { background: var(--cyan); top: 56%; left: 4%; transform: rotate(-12deg); }
.sticker.yellow { background: var(--yellow); top: 78%; right: 12%; transform: rotate(5deg); }

@media (max-width: 800px) {
  .hero-sub { grid-template-columns: 1fr; }
  .sticker { display: none; }
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 24px 0;
}
.marquee-track {
  display: flex; gap: 60px; white-space: nowrap;
  animation: scroll 40s linear infinite;
  align-items: center;
}
.marquee-item {
  font-family: var(--serif);
  font-size: 38px;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 60px;
}
.marquee-item .sep { width: 10px; height: 10px; border-radius: 50%; }
.marquee-item:nth-child(4n) { color: var(--red); }
.marquee-item:nth-child(4n+1) .sep { background: var(--cyan); }
.marquee-item:nth-child(4n+2) .sep { background: var(--yellow); }
.marquee-item:nth-child(4n+3) .sep { background: var(--orange); }
.marquee-item:nth-child(4n) .sep { background: var(--red); }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Stats grid ---------- */
.stats { padding: clamp(80px, 9vw, 140px) 0; }
.stats-head {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 70px; gap: 24px; text-align: center;
}
.stats-head h2 { font-size: clamp(36px, 4.5vw, 64px); max-width: 16ch; }
.stats-head p { font-size: 14px; color: var(--muted); max-width: 38ch; }

.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  background: var(--bg); padding: 40px 30px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; min-height: 240px;
  transition: background 0.3s ease;
}
.stat:hover { background: var(--bg-2); }
.stat .num {
  font-family: var(--serif);
  font-size: clamp(56px, 7vw, 96px);
  line-height: 1; letter-spacing: -0.03em;
}
.stat .num .small { font-size: 0.42em; }
.stat:nth-child(1) .num { color: var(--red); }
.stat:nth-child(2) .num { color: var(--cyan); }
.stat:nth-child(3) .num { color: var(--yellow); }
.stat:nth-child(4) .num { color: var(--orange); }
.stat:nth-child(5) .num { color: var(--cyan); }
.stat:nth-child(6) .num { color: var(--yellow); }

.stat .label { font-size: 14px; color: var(--ink-2); margin-top: auto; max-width: 20ch; }
.stat .corner {
  position: absolute; top: 20px; right: 20px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; color: var(--muted);
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stats-grid { grid-template-columns: 1fr; } }

/* ---------- Section heads ---------- */
.section-head {
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; margin-bottom: 70px; text-align: center;
}
.section-head .left { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.section-head h2 { font-size: clamp(40px, 6vw, 92px); line-height: 0.98; max-width: 18ch; }
.section-head .lede {
  font-family: var(--sans);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5; color: var(--ink-2); max-width: 60ch;
}
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head .left { position: relative; top: 0; }
}

/* ---------- Problem cols ---------- */
.cols-2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 30px);
  margin-top: 40px;
}
@media (max-width: 800px) { .cols-2 { grid-template-columns: 1fr; } }
.col-card {
  padding: 36px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 12px;
  display: flex; flex-direction: column; gap: 18px;
}
.col-card.bright {
  background: var(--yellow); color: var(--bg);
  border-color: var(--yellow);
}
.col-card.bright .col-title { color: var(--bg); }
.col-card .col-title {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.15; letter-spacing: -0.01em;
}
.col-card ul { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.col-card li {
  display: grid; grid-template-columns: 24px 1fr;
  gap: 12px; font-size: 14.5px; line-height: 1.5;
}
.col-card li .bullet {
  font-family: var(--mono); font-size: 11px;
  color: var(--orange); padding-top: 4px;
}
.col-card.bright li .bullet { color: var(--red); }

/* ---------- Ind 10 ---------- */
.ind10 {
  background: var(--bg);
  padding: clamp(80px, 10vw, 160px) 0;
}
.ind10-head {
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; margin-bottom: 60px; text-align: center;
}
.ind10-head h2 {
  font-family: var(--serif);
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.92; letter-spacing: -0.03em;
}
.ind10-head h2 .ten {
  display: inline-block;
  background: var(--red);
  color: var(--bg);
  padding: 0 18px 6px;
  border-radius: 14px;
  transform: rotate(-3deg);
  margin: 0 6px;
}
.ind10-head .right { max-width: 380px; }
.ind10-head .right p { color: var(--ink-2); font-size: 16px; line-height: 1.5; }

.ind10-list { display: flex; flex-direction: column; }
.ind10-row {
  display: grid;
  grid-template-columns: 60px 1.4fr 1fr 1fr 80px;
  gap: 30px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  align-items: center;
  cursor: pointer;
  transition: padding 0.25s ease, background 0.25s ease;
  position: relative;
}
.ind10-row:last-child { border-bottom: 1px solid var(--line); }
.ind10-row:hover { padding: 40px 12px; background: var(--bg-2); }
.ind10-row .idx { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.18em; }
.ind10-row .name {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1;
  color: var(--ink);
  transition: color 0.3s ease;
}
.ind10-row:hover .name { color: var(--yellow); }
.ind10-row .tag { font-size: 13px; color: var(--muted); margin-top: 4px; }
.ind10-row .admit {
  font-family: var(--mono); font-size: 13px;
  letter-spacing: 0.04em; color: var(--ink);
}
.ind10-row .admit .label {
  display: block; font-size: 10px; color: var(--muted);
  letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 4px;
}
.ind10-row .edge { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.ind10-row .arrow { font-family: var(--serif); font-size: 28px; text-align: right; transition: transform 0.3s ease; color: var(--ink); }
.ind10-row:hover .arrow { transform: translateX(8px); color: var(--orange); }
.ind10-row .chip {
  display: inline-block;
  font-family: var(--mono); font-size: 10px;
  padding: 4px 10px; border-radius: 999px;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 8px;
}
.ind10-row .chip.core { background: var(--red); color: var(--bg); }
.ind10-row .chip.tier2 { background: transparent; color: var(--cyan); border: 1px solid var(--cyan); }
.ind10-row .chip.emerging { background: transparent; color: var(--muted); border: 1px solid var(--muted-2); }

@media (max-width: 1000px) {
  .ind10-row { grid-template-columns: 40px 1fr 80px; }
  .ind10-row .admit, .ind10-row .edge { display: none; }
}

/* ---------- Process timeline ---------- */
.process-list { display: flex; flex-direction: column; }
.process-row {
  display: grid;
  grid-template-columns: 90px 1fr 1.2fr 60px;
  gap: 30px; padding: 36px 0;
  border-top: 1px solid var(--line);
  align-items: center; cursor: pointer;
  transition: padding 0.3s ease, background 0.3s ease;
}
.process-row:hover { padding: 44px 16px; background: var(--bg-2); }
.process-row:last-child { border-bottom: 1px solid var(--line); }
.process-row .idx { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; }
.process-row:nth-child(1) .idx { color: var(--red); }
.process-row:nth-child(2) .idx { color: var(--cyan); }
.process-row:nth-child(3) .idx { color: var(--yellow); }
.process-row:nth-child(4) .idx { color: var(--orange); }
.process-row h3 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1; color: var(--ink); }
.process-row .duration {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); letter-spacing: 0.18em;
  margin-top: 6px; text-transform: uppercase;
}
.process-row .desc { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.process-row .arrow { text-align: right; font-family: var(--serif); font-size: 28px; transition: transform 0.3s ease; }
.process-row:hover .arrow { transform: translateX(8px); color: var(--yellow); }
@media (max-width: 800px) {
  .process-row { grid-template-columns: 50px 1fr 30px; }
  .process-row .desc { display: none; }
}

/* ---------- Track Your Progress (dashboard mock) ---------- */
.track {
  padding: clamp(80px, 10vw, 160px) 0;
  background: var(--bg);
}
.track-dash {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  margin-top: 50px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}
.track-dash .side {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 22px;
}
.track-dash .student-card {
  display: flex; gap: 12px; align-items: center;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.track-dash .avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--orange));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 22px; color: var(--bg);
}
.track-dash .who .name { font-weight: 500; font-size: 14px; }
.track-dash .who .school { font-size: 11.5px; color: var(--muted); }
.track-dash .side .nav-list { display: flex; flex-direction: column; gap: 4px; }
.track-dash .nav-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 8px;
  font-size: 13px; color: var(--ink-2);
  cursor: pointer;
  transition: background 0.2s ease;
}
.track-dash .nav-item:hover { background: var(--bg-2); }
.track-dash .nav-item.active { background: var(--yellow); color: var(--bg); font-weight: 500; }
.track-dash .nav-item .count {
  font-family: var(--mono); font-size: 11px; opacity: 0.7;
}
.track-dash .main { display: flex; flex-direction: column; gap: 18px; }
.track-dash .topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0 14px; border-bottom: 1px solid var(--line);
}
.track-dash .topbar h4 { font-family: var(--serif); font-size: 24px; }
.track-dash .topbar .days {
  font-family: var(--mono); font-size: 11.5px;
  color: var(--muted); letter-spacing: 0.12em;
}
.track-grid {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}
.track-card {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.track-card .head {
  display: flex; justify-content: space-between; align-items: center;
}
.track-card .head h5 {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.track-card .pill {
  font-family: var(--mono); font-size: 10px;
  padding: 4px 10px; border-radius: 999px;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.track-card .pill.green { background: rgba(61,209,217,0.15); color: var(--cyan); }
.track-card .pill.yellow { background: rgba(255,210,74,0.15); color: var(--yellow); }
.track-card .pill.red { background: rgba(255,61,46,0.18); color: var(--red); }
.track-card .big-stat {
  font-family: var(--serif);
  font-size: 56px; line-height: 1;
  letter-spacing: -0.02em;
}
.track-card .big-stat .small { font-size: 0.5em; color: var(--muted); }
.track-card .sub { font-size: 12px; color: var(--muted); }

.progress-bar {
  height: 8px; background: var(--line); border-radius: 999px;
  overflow: hidden; margin-top: 4px;
}
.progress-bar .fill { height: 100%; border-radius: 999px; }

.streak-grid {
  display: grid; grid-template-columns: repeat(14, 1fr);
  gap: 4px;
}
.streak-grid .day-dot {
  aspect-ratio: 1; border-radius: 4px;
  background: var(--line);
}
.streak-grid .day-dot.l1 { background: rgba(61,209,217,0.3); }
.streak-grid .day-dot.l2 { background: rgba(61,209,217,0.55); }
.streak-grid .day-dot.l3 { background: var(--cyan); }

.task-list { display: flex; flex-direction: column; gap: 10px; }
.task {
  display: grid; grid-template-columns: 18px 1fr auto;
  gap: 10px; align-items: center;
  font-size: 13px;
}
.task .check {
  width: 16px; height: 16px;
  border: 1.5px solid var(--muted-2); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
}
.task.done .check { background: var(--cyan); border-color: var(--cyan); color: var(--bg); }
.task.done .label { color: var(--muted); text-decoration: line-through; }
.task .when { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.1em; }

.mentor-row {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.mentor-row:last-child { border-bottom: 0; }
.mentor-row .ava {
  width: 32px; height: 32px; border-radius: 50%;
  font-family: var(--serif); font-size: 14px; color: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.mentor-row .info { flex: 1; }
.mentor-row .info .name { font-size: 13px; }
.mentor-row .info .msg { font-size: 12px; color: var(--muted); }
.mentor-row .when { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.mentor-row .unread { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

@media (max-width: 900px) {
  .track-dash { grid-template-columns: 1fr; }
  .track-grid { grid-template-columns: 1fr; }
}

/* ---------- Edge ---------- */
.edge { padding: clamp(80px, 10vw, 160px) 0; }
.edge-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.edge-item {
  display: flex; flex-direction: column; gap: 20px;
  padding: 36px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.edge-item:hover { transform: translateY(-4px); border-color: var(--muted-2); }
.edge-item .num { font-family: var(--serif); font-size: 64px; line-height: 1; }
.edge-item:nth-child(1) .num { color: var(--red); }
.edge-item:nth-child(2) .num { color: var(--cyan); }
.edge-item:nth-child(3) .num { color: var(--yellow); }
.edge-item h3 { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.edge-item p { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
@media (max-width: 800px) { .edge-grid { grid-template-columns: 1fr; } }

/* ---------- Week at Klay ---------- */
.week-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.day {
  background: var(--bg-2); padding: 24px 18px;
  min-height: 260px;
  display: flex; flex-direction: column; gap: 14px;
  transition: background 0.3s ease;
}
.day:hover { background: var(--bg-3); }
.day .dow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.day:nth-child(1) .dow { color: var(--red); }
.day:nth-child(2) .dow { color: var(--orange); }
.day:nth-child(3) .dow { color: var(--yellow); }
.day:nth-child(4) .dow { color: var(--cyan); }
.day:nth-child(5) .dow { color: var(--red); }
.day:nth-child(6) .dow { color: var(--orange); }
.day:nth-child(7) .dow { color: var(--yellow); }
.day h4 { font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.day p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.day.off { background: var(--yellow); color: var(--bg); }
.day.off:hover { background: var(--orange); color: var(--bg); }
.day.off .dow { color: var(--bg); }
.day.off p { color: var(--bg); }
@media (max-width: 1100px) { .week-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 700px) { .week-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Packages ---------- */
.pkg-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; align-items: start;
}
.pkg {
  border: 1px solid var(--line);
  border-radius: 16px; padding: 32px;
  display: flex; flex-direction: column; gap: 22px;
  background: var(--bg-2);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.pkg:hover { transform: translateY(-4px); }
.pkg.flagship {
  background: var(--yellow); color: var(--bg);
  border-color: var(--yellow);
}
.pkg .pkg-tag {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  display: flex; justify-content: space-between;
}
.pkg.flagship .pkg-tag { color: var(--bg); }
.pkg h3 { font-family: var(--serif); font-size: 32px; line-height: 1.05; }
.pkg .price { font-family: var(--serif); font-size: 56px; line-height: 1; letter-spacing: -0.02em; }
.pkg:nth-child(1) .price { color: var(--red); }
.pkg:nth-child(2) .price { color: var(--cyan); }
.pkg.flagship .price { color: var(--bg); }
.pkg .blurb { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.pkg.flagship .blurb { color: var(--bg); }
.pkg ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pkg li {
  font-size: 13.5px; line-height: 1.45;
  display: grid; grid-template-columns: 18px 1fr; gap: 10px;
}
.pkg li::before {
  content: "+"; color: var(--orange); font-family: var(--mono);
}
.pkg.flagship li::before { color: var(--red); }
.pkg .pkg-btn {
  margin-top: 8px;
  padding: 14px 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: space-between;
  transition: background 0.2s ease;
}
.pkg .pkg-btn:hover { background: var(--cyan); }
.pkg.flagship .pkg-btn { background: var(--bg); color: var(--yellow); }
.pkg.flagship .pkg-btn:hover { background: var(--red); color: var(--bg); }

@media (max-width: 900px) { .pkg-grid { grid-template-columns: 1fr; } }

/* ---------- Advisor / Team ---------- */
.advisor { display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px; align-items: start; }
.advisor .photo {
  aspect-ratio: 4/5; width: 100%;
  background: var(--bg-2);
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
}
.advisor .info { display: flex; flex-direction: column; gap: 26px; }
.advisor .name { font-family: var(--serif); font-size: clamp(48px, 6vw, 84px); line-height: 0.95; }
.advisor .role { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan); }
.advisor .bio { font-family: var(--serif); font-size: 22px; line-height: 1.3; color: var(--ink-2); max-width: 32ch; }
.advisor ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.advisor li { font-size: 14px; display: grid; grid-template-columns: 24px 1fr; gap: 8px; color: var(--ink-2); }
.advisor li::before { content: "✶"; color: var(--yellow); }
@media (max-width: 900px) { .advisor { grid-template-columns: 1fr; } }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.mentor { display: flex; flex-direction: column; gap: 16px; }
.mentor .photo {
  aspect-ratio: 4/5; background: var(--bg-2);
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); position: relative;
}
.mentor:nth-child(1) .photo { border-color: var(--red); }
.mentor:nth-child(2) .photo { border-color: var(--cyan); }
.mentor:nth-child(3) .photo { border-color: var(--yellow); }
.mentor:nth-child(4) .photo { border-color: var(--orange); }
.mentor .photo .role-tag {
  position: absolute; bottom: 12px; left: 12px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px;
  color: var(--bg); font-weight: 500;
}
.mentor:nth-child(1) .role-tag { background: var(--red); }
.mentor:nth-child(2) .role-tag { background: var(--cyan); }
.mentor:nth-child(3) .role-tag { background: var(--yellow); }
.mentor:nth-child(4) .role-tag { background: var(--orange); }
.mentor h4 { font-family: var(--serif); font-size: 26px; line-height: 1.05; }
.role-tag-inline {
  align-self: flex-start;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  color: var(--bg); font-weight: 500;
}
.mentor:nth-child(1) .role-tag-inline { background: var(--red); }
.mentor:nth-child(2) .role-tag-inline { background: var(--cyan); }
.mentor:nth-child(3) .role-tag-inline { background: var(--yellow); }
.mentor:nth-child(4) .role-tag-inline { background: var(--orange); }
.mentor .blurb { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.mentor ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.mentor li { font-size: 13px; color: var(--muted); }
.mentor li::before { content: "·  "; color: var(--orange); }

@media (max-width: 1000px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta-section {
  padding: clamp(100px, 12vw, 180px) 0;
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,61,46,0.15) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(61,209,217,0.1) 0%, transparent 50%),
    var(--bg);
}
.cta-section h2 {
  font-size: clamp(56px, 9vw, 144px);
  line-height: 0.95; letter-spacing: -0.03em;
  max-width: 16ch;
  margin: 0 auto;
  text-align: center;
}
.cta-section .wrap > .fade-in { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-section .sub { margin-left: auto; margin-right: auto; }
.cta-section .actions { justify-content: center; }
.cta-section h2 .it { color: var(--yellow); }
.cta-section .sub {
  font-family: var(--sans);
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.45; margin-top: 36px;
  max-width: 50ch; color: var(--ink-2);
}
.cta-section .actions { margin-top: 50px; display: flex; gap: 16px; flex-wrap: wrap; }
.cta-section .btn {
  padding: 18px 28px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cta-section .btn.primary { background: var(--yellow); color: var(--bg); }
.cta-section .btn.primary:hover { background: var(--cyan); }
.cta-section .btn.ghost { border: 1px solid var(--muted-2); color: var(--ink); }
.cta-section .btn.ghost:hover { border-color: var(--ink); }
.cta-section .check-list {
  margin-top: 70px;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px 60px; max-width: 900px;
}
.cta-section .check-list li {
  list-style: none; font-size: 14.5px; color: var(--ink-2);
  line-height: 1.45;
  display: grid; grid-template-columns: 24px 1fr; gap: 8px;
}
.cta-section .check-list li::before { content: "→"; color: var(--orange); }
@media (max-width: 800px) { .cta-section .check-list { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
footer { padding: 60px 0 30px; border-top: 1px solid var(--line); }
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 60px;
}
.footer-top h5 {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
}
.footer-top a, .footer-top p {
  font-size: 14px; color: var(--ink-2);
  display: block; margin-bottom: 8px; line-height: 1.5;
}
.footer-top a:hover { color: var(--yellow); }
.footer-brand .big {
  font-family: var(--sans);
  font-size: 60px; line-height: 1; letter-spacing: -0.04em;
  font-weight: 800; margin-bottom: 16px;
}
.footer-brand .big .k { color: var(--red); }
.footer-brand .big .l { color: var(--cyan); }
.footer-brand .big .a { color: var(--yellow); }
.footer-brand .big .y { color: var(--orange); }
.footer-brand .big .edu { color: var(--ink); }
.footer-brand .tag {
  font-family: var(--serif); font-size: 22px;
  color: var(--ink-2); max-width: 24ch; line-height: 1.3;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); padding-top: 24px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap; gap: 16px;
}
@media (max-width: 800px) { .footer-top { grid-template-columns: 1fr 1fr; } }

/* ---------- Reveals ---------- */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(0.2, 0, 0, 1), transform 0.9s cubic-bezier(0.2, 0, 0, 1);
}
.fade-in.is-visible { opacity: 1; transform: translateY(0); }

image-slot {
  --image-slot-bg: var(--bg-2);
  --image-slot-border: var(--line);
  --image-slot-color: var(--muted);
}

.quote-block {
  border-left: 3px solid var(--cyan);
  padding-left: 28px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.2; letter-spacing: -0.01em;
  color: var(--ink); max-width: 24ch;
}
.quote-attr {
  margin-top: 24px; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}

.guarantee {
  margin-top: 40px; padding: 22px 26px;
  background: var(--red); color: var(--bg);
  border-radius: 12px;
  display: flex; gap: 18px; align-items: center; max-width: 760px;
}
.guarantee .ic {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); color: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 22px; flex-shrink: 0;
}
.guarantee p { font-size: 14px; line-height: 1.5; color: var(--bg); }
.guarantee strong { color: var(--bg); }

/* ============================================================
   Student dashboard + login  (dashboard.html / dashboard.jsx)
   Reuses the .track-* / .progress-bar / .streak-grid / .mentor-row
   / .pill / .task-list / .big-stat classes from the marketing site.
   ============================================================ */

/* generic logo coloring (marketing site scopes this under .nav) */
.auth-logo .logo, .dash-topnav .logo {
  font-family: var(--sans); font-size: 24px; font-weight: 800;
  letter-spacing: -0.04em; display: inline-flex; align-items: baseline;
}
.logo .k { color: var(--red); }
.logo .l { color: var(--cyan); }
.logo .a { color: var(--yellow); }
.logo .y { color: var(--orange); }
.logo .edu { color: var(--ink); }

/* ---- loading splash ---- */
.dash-loading {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--muted);
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em;
}

/* ---- login / auth screens ---- */
.auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(900px 500px at 50% -10%, var(--bg-2), var(--bg));
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 18px; padding: 36px 34px;
}
.auth-logo { display: inline-block; margin-bottom: 28px; }
.auth-card h1 { font-family: var(--serif); font-size: 32px; letter-spacing: -0.02em; }
.auth-sub { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.auth-card code {
  font-family: var(--mono); font-size: 12px; color: var(--cyan);
  background: var(--bg); padding: 2px 6px; border-radius: 5px;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 26px; }
.auth-form label { display: flex; flex-direction: column; gap: 7px; }
.auth-form label span {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.auth-form input {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 14px; color: var(--ink); font-size: 14px; font-family: var(--sans);
  transition: border-color 0.2s ease;
}
.auth-form input:focus { outline: none; border-color: var(--cyan); }
.auth-error {
  background: rgba(255,61,46,0.12); border: 1px solid rgba(255,61,46,0.3);
  color: var(--red); font-size: 12.5px; padding: 10px 12px; border-radius: 9px;
}
.auth-notice {
  background: rgba(61,209,217,0.12); border: 1px solid rgba(61,209,217,0.3);
  color: var(--cyan); font-size: 12.5px; padding: 10px 12px; border-radius: 9px;
}
.auth-btn {
  margin-top: 4px; background: var(--yellow); color: var(--bg);
  border: none; border-radius: 10px; padding: 13px 16px;
  font-family: var(--sans); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
}
.auth-btn:hover { opacity: 0.92; }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: 0.55; cursor: default; }
.auth-foot { margin-top: 22px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.auth-foot a { color: var(--cyan); }

/* ---- dashboard page ---- */
.dash-page { min-height: 100vh; background: var(--bg); }
.dash-topnav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: rgba(10,10,10,0.85); backdrop-filter: blur(10px); z-index: 10;
}
.dash-signout {
  background: transparent; border: 1px solid var(--line); color: var(--ink-2);
  border-radius: 999px; padding: 8px 16px; font-size: 12.5px; cursor: pointer;
  font-family: var(--sans); transition: background 0.2s ease, border-color 0.2s ease;
}
.dash-signout:hover { background: var(--bg-2); border-color: var(--muted-2); }
.dash-shell { max-width: var(--max); margin: 0 auto; padding: clamp(20px, 4vw, 40px) clamp(20px, 4vw, 56px); }
.dash-shell .track-dash { margin-top: 0; }

/* single-section sub-pages */
.single-panel { display: flex; flex-direction: column; gap: 16px; }

/* coming-soon placeholder */
.coming-soon .cs-body { padding: 40px 0; text-align: center; }
.coming-soon .cs-title { font-size: 26px; color: var(--ink); margin-bottom: 8px; }
.coming-soon .cs-body .sub { max-width: 360px; margin: 0 auto; }

@media (max-width: 900px) {
  .dash-shell .track-dash { grid-template-columns: 1fr; }
}

/* ---------- Aptitude Prep (chat UI) ---------- */
/* Klay Coach reads like every other nav link; cyan only on hover. */
.nav .links a.nav-apt:hover { color: var(--cyan); }
.nav .links a.nav-apt:hover::after { background: var(--cyan); }

.apt-body { height: 100%; overflow: hidden; }
.apt-shell {
  height: 100vh; height: 100dvh;
  display: flex;
  background: var(--bg);
  overflow: hidden;
}

/* --- Sidebar --- */
.apt-sidebar {
  width: 288px; flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  height: 100%;
}
.apt-side-top { padding: 20px 18px 14px; }
.apt-logo-link { display: inline-flex; margin: 4px 4px 16px; }
.apt-logo-link .logo {
  font-family: var(--sans); font-size: 24px; font-weight: 800;
  letter-spacing: -0.04em; display: inline-flex; align-items: baseline;
}
.apt-logo-link .logo .k { color: var(--red); }
.apt-logo-link .logo .l { color: var(--cyan); }
.apt-logo-link .logo .a { color: var(--yellow); }
.apt-logo-link .logo .y { color: var(--orange); }
.apt-logo-link .logo .edu { color: var(--ink); }
.apt-newchat {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-3); color: var(--ink);
  font-size: 14px; font-weight: 500;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.apt-newchat:hover { border-color: var(--cyan); background: #20201d; }
.apt-plus { font-size: 18px; line-height: 1; color: var(--cyan); }

.apt-side-scroll { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.apt-side-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
  padding: 16px 8px 8px;
}
.apt-topics { display: flex; flex-direction: column; gap: 4px; }
.apt-topic {
  width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px;
  padding: 9px 12px; border-radius: 10px; color: var(--ink-2);
  transition: background 0.15s ease;
}
.apt-topic:hover { background: var(--bg-3); }
.apt-topic-name { font-size: 13.5px; font-weight: 500; }
.apt-topic-hint { font-size: 11.5px; color: var(--muted); }

.apt-history { display: flex; flex-direction: column; gap: 2px; }
.apt-history-row {
  width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px;
  font-size: 13.5px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background 0.15s ease;
}
.apt-history-row:hover { background: var(--bg-3); }
.apt-history-row.active { background: var(--bg-3); color: var(--ink); }

.apt-side-foot { padding: 14px 18px; border-top: 1px solid var(--line); }
.apt-foot-link { font-size: 13px; color: var(--muted); transition: color 0.2s ease; }
.apt-foot-link:hover { color: var(--cyan); }

/* --- Main / chat --- */
.apt-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  height: 100%; position: relative;
}
.apt-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
}
.apt-menu { display: none; font-size: 20px; color: var(--ink); padding: 2px 6px; }
.apt-topbar-title { font-size: 15px; font-weight: 500; }
.apt-badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bg);
  background: var(--yellow); padding: 3px 8px; border-radius: 999px;
}
.apt-back {
  margin-left: auto; margin-right: 14px; font-size: 13px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  transition: color .15s, border-color .15s;
}
.apt-back:hover { color: var(--ink); border-color: var(--ink); }

/* welcome / empty state */
.apt-welcome {
  flex: 1; overflow-y: auto;
  display: flex; align-items: center; justify-content: center;
  padding: 32px var(--gutter);
}
.apt-welcome-inner { width: 100%; max-width: 760px; text-align: center; }
.apt-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 18px;
}
.apt-welcome-h1 { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.05; margin-bottom: 16px; }
.apt-italic { color: var(--yellow); }
.apt-welcome-sub { color: var(--muted); max-width: 540px; margin: 0 auto 36px; font-size: 15px; }
.apt-suggest {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; text-align: left;
}
.apt-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg-2);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.apt-card:hover { border-color: var(--cyan); transform: translateY(-2px); background: var(--bg-3); }
.apt-card-title { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.apt-card-sub { font-size: 13px; color: var(--muted); }

/* thread */
.apt-thread { flex: 1; overflow-y: auto; padding: 28px var(--gutter); }
.apt-thread-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.apt-msg { display: flex; gap: 12px; max-width: 100%; }
.apt-msg.user { justify-content: flex-end; }
.apt-avatar {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px;
  background: var(--red); color: var(--ink);
  font-family: var(--sans); font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.apt-bubble {
  padding: 12px 16px; border-radius: 14px; font-size: 14.5px; line-height: 1.55;
  max-width: 78%; white-space: pre-wrap; word-wrap: break-word;
}
.apt-msg.user .apt-bubble { background: var(--bg-3); color: var(--ink); border-bottom-right-radius: 4px; }
.apt-msg.bot .apt-bubble { background: transparent; color: var(--ink-2); padding-left: 0; padding-top: 4px; }

/* input */
.apt-inputwrap { padding: 14px var(--gutter) 18px; border-top: 1px solid var(--line); background: var(--bg); }
.apt-inputbar {
  max-width: 760px; margin: 0 auto;
  display: flex; align-items: flex-end; gap: 10px;
  padding: 8px 8px 8px 16px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--bg-2);
  transition: border-color 0.2s ease;
}
.apt-inputbar:focus-within { border-color: var(--cyan); }
.apt-textarea {
  flex: 1; resize: none; border: 0; outline: 0; background: transparent;
  color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5;
  max-height: 200px; padding: 8px 0;
}
.apt-textarea::placeholder { color: var(--muted-2); }
.apt-send {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px;
  background: var(--yellow); color: var(--bg); font-size: 19px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.apt-send:hover:not(:disabled) { background: var(--cyan); }
.apt-send:disabled { opacity: 0.4; cursor: default; }
.apt-disclaimer {
  max-width: 760px; margin: 10px auto 0; text-align: center;
  font-size: 11.5px; color: var(--muted-2);
}

/* image attach button (matches .apt-send footprint, quieter styling) */
.apt-attach {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px;
  background: transparent; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.apt-attach:hover:not(:disabled) { background: var(--bg-3); color: var(--ink); }
.apt-attach:disabled { opacity: 0.4; cursor: default; }
.apt-inputbar.drag-over { border-color: var(--cyan); background: rgba(61,209,217,0.06); }

/* pending-attachment preview strip (above the input bar) */
.apt-preview-strip {
  max-width: 760px; margin: 0 auto 8px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.apt-thumb {
  position: relative; width: 56px; height: 56px; border-radius: 10px;
  overflow: hidden; border: 1px solid var(--line); background: var(--bg-2);
}
.apt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.apt-thumb.uploading img { opacity: 0.45; }
.apt-thumb.error { border-color: var(--red); }
.apt-thumb-x {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(0,0,0,0.65); color: #fff;
  font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.apt-thumb-x:hover { background: rgba(0,0,0,0.85); }
.apt-thumb-spin {
  position: absolute; top: 50%; left: 50%; width: 18px; height: 18px;
  margin: -9px 0 0 -9px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: var(--cyan);
  animation: apt-spin 0.7s linear infinite;
}
@keyframes apt-spin { to { transform: rotate(360deg); } }

/* images inside a sent/loaded user message */
.apt-msg-images { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.apt-msg-images img {
  max-width: 180px; max-height: 220px; border-radius: 10px;
  object-fit: cover; display: block;
}

/* mobile sidebar */
.apt-scrim { display: none; }
@media (max-width: 860px) {
  .apt-menu { display: inline-flex; }
  .apt-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
    transform: translateX(-100%); transition: transform 0.28s ease;
  }
  .apt-sidebar.open { transform: translateX(0); }
  .apt-scrim {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none;
    transition: opacity 0.28s ease;
  }
  .apt-scrim.show { opacity: 1; pointer-events: auto; }
  .apt-suggest { grid-template-columns: 1fr; }
}

/* ----------------- Klay Coach — chat extras ----------------- */
.apt-bot-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.apt-typing { color: var(--muted); letter-spacing: 2px; }

/* whitespace in streamed answers should wrap naturally */
.apt-msg.bot .apt-bubble { white-space: pre-wrap; line-height: 1.6; }

/* 👍 / 👎 feedback row under a bot answer */
.apt-rate { display: flex; gap: 6px; padding-left: 2px; }
.apt-rate-btn {
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  border-radius: 8px; padding: 3px 9px; font-size: 13px; line-height: 1;
  opacity: 0.6; transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.apt-rate-btn:hover { opacity: 1; border-color: var(--cyan); }
.apt-rate-btn.on { opacity: 1; border-color: var(--cyan); background: #20201d; }

/* question cards */
.apt-qset { gap: 12px; }
.apt-qcard {
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2);
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px;
}
.apt-qnum {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--cyan); text-transform: uppercase;
}
.apt-qtext { font-size: 14.5px; color: var(--ink); line-height: 1.5; white-space: pre-wrap; }
.apt-qopts { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; }
.apt-qopts li { font-size: 13.5px; color: var(--ink-2); }
.apt-qkey {
  display: inline-block; min-width: 18px; font-weight: 600; color: var(--muted);
}
.apt-explain {
  align-self: flex-start; margin-top: 2px; cursor: pointer;
  border: 1px solid var(--cyan); color: var(--cyan); background: transparent;
  border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}
.apt-explain:hover { background: var(--cyan); color: var(--bg); }

/* let an <a> use the auth button style on the sign-in gate */
a.auth-btn { display: inline-block; text-align: center; text-decoration: none; }

/* =====================================================================
   Booking page (/book) — yellow primary button, cyan highlights, Klay black
   ===================================================================== */
.book-body { background: var(--bg); }
.book-shell {
  min-height: 100vh;
  background: radial-gradient(1100px 600px at 50% -12%, var(--bg-2), var(--bg));
  padding: clamp(28px, 5vw, 72px) var(--gutter);
}
.book-grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(32px, 5vw, 72px); align-items: start;
}

/* ---- left pane ---- */
.book-left { padding-top: 6px; }
.book-left-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 34px;
}
.book-logo { display: inline-block; font-size: 24px; }
.book-pill {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px 7px 12px; font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.04em; color: var(--ink-2);
}
.book-pill-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(61,209,217,0.15);
}
.book-head {
  margin-top: 22px; font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.05; font-weight: 500; letter-spacing: -0.025em; color: var(--ink);
}
.book-head .cyan { color: var(--cyan); }
.book-head .yellow { color: var(--yellow); }
.book-lede {
  margin-top: 22px; max-width: 460px; color: var(--muted);
  font-size: 15px; line-height: 1.65;
}
.book-meta {
  list-style: none; margin-top: 26px; display: flex; flex-direction: column; gap: 13px;
}
.book-meta li {
  display: flex; align-items: center; gap: 11px; color: var(--ink-2); font-size: 14.5px;
}
.book-meta li.ok { color: var(--cyan); font-weight: 500; }
.book-meta-ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.book-meta li.ok .book-meta-ic { color: var(--cyan); }
.book-left-divider { height: 1px; background: var(--line); margin: 30px 0 24px; max-width: 460px; }
.book-mini-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
.book-points { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.book-points li { display: flex; gap: 13px; }
.book-point-ic {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; margin-top: 1px;
  background: rgba(61,209,217,0.12); color: var(--cyan);
}
.book-points strong { display: block; color: var(--ink); font-size: 14.5px; font-weight: 600; }
.book-points span { display: block; margin-top: 3px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* ---- right panel ---- */
.book-panel {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 22px; padding: clamp(24px, 2.6vw, 38px);
}
.book-step-top { margin-bottom: 22px; }
.book-title { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 30px); font-weight: 500; letter-spacing: -0.02em; margin-top: 10px; color: var(--ink); }
.book-sub { margin-top: 7px; color: var(--muted); font-size: 13.5px; }
.book-banner {
  margin-bottom: 18px; background: rgba(255,210,74,0.1); border: 1px solid rgba(255,210,74,0.3);
  color: var(--yellow); font-size: 13px; padding: 11px 13px; border-radius: 10px;
}

/* quick pick */
.book-quick { margin-bottom: 24px; }
.book-quick-row { display: flex; gap: 9px; margin-top: 11px; flex-wrap: wrap; }
.book-quick-day {
  flex: 1 1 0; min-width: 72px;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 13px; cursor: pointer; transition: border-color 0.18s ease, background 0.18s ease;
}
.book-quick-day:hover { border-color: var(--muted-2); }
.book-quick-day.is-active { border-color: var(--cyan); background: rgba(61,209,217,0.1); }
.book-quick-top { font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.book-quick-day.is-active .book-quick-top { color: var(--cyan); }
.book-quick-date { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }

/* picker: calendar + times */
.book-picker { display: grid; grid-template-columns: 1fr 226px; gap: 26px; }
.book-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.book-cal-month { font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--ink); }
.book-cal-nav { display: flex; gap: 6px; }
.book-cal-nav button {
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px;
  display: grid; place-items: center; color: var(--ink-2); cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.book-cal-nav button:hover { border-color: var(--cyan); color: var(--cyan); }
.book-cal-nav button:disabled { opacity: 0.3; cursor: default; border-color: var(--line); color: var(--muted); }
.book-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.book-cal-dow { text-align: center; font-size: 10px; letter-spacing: 0.1em; color: var(--muted-2); padding-bottom: 6px; }
.book-cal-cell {
  aspect-ratio: 1 / 1; border: none; background: transparent; border-radius: 10px;
  color: var(--ink-2); font-size: 13.5px; cursor: pointer;
  display: grid; place-items: center; transition: background 0.15s ease, color 0.15s ease;
}
.book-cal-cell:hover:not(.is-past):not(.is-active) { background: var(--bg-3); }
.book-cal-cell.empty { background: transparent; cursor: default; }
.book-cal-cell.is-past { color: var(--muted-2); cursor: default; }
.book-cal-cell.is-today { color: var(--cyan); font-weight: 600; }
.book-cal-cell.is-active { background: var(--cyan); color: var(--bg); font-weight: 600; }
.book-tz { display: flex; align-items: center; gap: 7px; margin-top: 16px; font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }

/* times */
.book-times-day { margin-top: 12px; margin-bottom: 12px; font-size: 15px; font-weight: 600; color: var(--ink); }
.book-slot-list { display: flex; flex-direction: column; gap: 9px; max-height: 326px; overflow-y: auto; padding-right: 4px; }
.book-slot-list.is-loading { opacity: 0.55; }
.book-slot {
  background: var(--bg); border: 1px solid var(--line); border-radius: 11px;
  padding: 13px; color: var(--ink); font-size: 14px; cursor: pointer; text-align: center;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.book-slot:hover:not(.is-taken) { border-color: var(--cyan); }
.book-slot.is-active { border-color: var(--cyan); background: rgba(61,209,217,0.12); color: var(--cyan); font-weight: 600; }
.book-slot.is-taken { color: var(--muted-2); text-decoration: line-through; cursor: default; opacity: 0.6; }

/* primary CTA */
.book-cta {
  margin-top: 28px; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--yellow); color: var(--bg); text-decoration: none;
  border: none; border-radius: 14px; padding: 17px 22px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}
.book-cta:hover { background: var(--cyan); }
.book-cta:active { transform: translateY(1px); }
.book-cta:disabled { background: var(--bg-3); color: var(--muted-2); cursor: default; }
.book-cta-arrow { width: 16px; height: 16px; flex: none; }

/* details form */
.book-back {
  display: inline-flex; align-items: center; gap: 5px; margin-bottom: 16px;
  color: var(--muted); font-size: 13px; cursor: pointer; transition: color 0.18s ease;
}
.book-back:hover { color: var(--ink); }
.book-form { display: flex; flex-direction: column; gap: 16px; }
.book-form label { display: flex; flex-direction: column; gap: 7px; }
.book-form label span {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.book-form label span em { font-style: normal; color: var(--muted-2); letter-spacing: 0.04em; }
.book-form input, .book-form textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 14px; color: var(--ink); font-size: 14px; font-family: var(--sans);
  transition: border-color 0.2s ease; resize: vertical;
}
.book-form input:focus, .book-form textarea:focus { outline: none; border-color: var(--cyan); }
.book-error {
  background: rgba(255,61,46,0.12); border: 1px solid rgba(255,61,46,0.3);
  color: var(--red); font-size: 12.5px; padding: 10px 12px; border-radius: 9px;
}
.book-fineprint { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.book-fineprint b { color: var(--ink-2); font-weight: 600; }

/* confirmed */
.book-confirmed { text-align: center; padding: clamp(20px, 4vw, 48px) 10px; }
.book-check-badge {
  width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 50%;
  display: grid; place-items: center; color: var(--cyan);
  background: rgba(61,209,217,0.12); border: 1px solid rgba(61,209,217,0.35);
}
.book-confirmed .book-title { margin-top: 0; }
.book-confirmed-when { margin-top: 12px; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.book-confirm-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 30px; max-width: 320px; margin-left: auto; margin-right: auto; }
.book-confirm-actions .book-cta { margin-top: 0; }
.book-secondary { color: var(--cyan); font-size: 14px; font-weight: 500; }
.book-secondary:hover { text-decoration: underline; }
.book-home { display: inline-block; margin-top: 28px; color: var(--muted); font-size: 13px; }
.book-home:hover { color: var(--ink); }

/* responsive */
@media (max-width: 940px) {
  .book-grid { grid-template-columns: 1fr; gap: 40px; }
  .book-left { max-width: 560px; }
  .book-left-top { margin-bottom: 24px; }
}
@media (max-width: 600px) {
  .book-picker { grid-template-columns: 1fr; gap: 28px; }
  .book-slot-list { max-height: none; }
  .book-quick-row { flex-wrap: nowrap; overflow-x: auto; }
  .book-quick-day { min-width: 78px; }
}

/* ══════════════════════════════════════════════════════════════════════
   WHITEBOARD — animated step cards for Klay Coach explanations
   ══════════════════════════════════════════════════════════════════════ */

@keyframes aptFadeSlide {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Single whiteboard surface — all steps flow inside one board */
.apt-whiteboard {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 4px 0;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
}

.apt-step-card {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  animation: aptFadeSlide 0.22s ease both;
}

.apt-step-card:last-of-type {
  border-bottom: none;
}

.apt-step-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.apt-step-icon { font-size: 13px; line-height: 1; }

.apt-step-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.apt-step-body {
  font-size: 14px;
  line-height: 1.7;
  color: #e0e0e0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.apt-step-body strong { color: #fff; }

/* KaTeX math */
.katex-block {
  display: block;
  text-align: center;
  margin: 8px 0;
  overflow-x: auto;
}
.katex-inline { display: inline; }
.katex-fallback { font-family: monospace; color: #aaa; }

/* Answer box — sits at the bottom of the whiteboard */
.apt-answer-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 20px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  padding: 11px 16px;
  animation: aptFadeSlide 0.22s ease both;
}

.apt-answer-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(134, 239, 172);
  white-space: nowrap;
}

.apt-answer-value {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

/* ── Handwriting reveal — each solution line "writes" onto the board ──
   A left→right clip wipe simulates ink being laid down; text lines get a
   glowing pen nib gliding along as they appear. Math stays crisp KaTeX. */
@keyframes aptInkWipe {
  from { clip-path: inset(0 100% 0 0); opacity: 0.35; }
  to   { clip-path: inset(0 0 0 0);    opacity: 1; }
}

@keyframes aptPenGlide {
  0%   { left: 0;    opacity: 1; }
  85%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.apt-ink-line {
  position: relative;
  animation: aptInkWipe 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.apt-ink-line + .apt-ink-line { margin-top: 2px; }

.apt-ink-line.is-math { animation-duration: 0.6s; }

/* pen nib gliding along a text line while it's written */
.apt-ink-line.is-text::after {
  content: "";
  position: absolute;
  top: 0.15em;
  width: 2px;
  height: 1.05em;
  background: linear-gradient(180deg, #7dd3fc, #38bdf8);
  border-radius: 2px;
  box-shadow: 0 0 7px rgba(56, 189, 248, 0.85);
  animation: aptPenGlide 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .apt-ink-line { animation: aptFadeSlide 0.18s ease both; }
  .apt-ink-line.is-text::after { display: none; }
}
