/* CREST Champs app styles — the server-rendered product.
   Originally the React SPA's design system (brand tokens + 242 component
   selectors), carried over verbatim when the SPA was retired: the CI4 views emit
   the same markup, so they kept the same stylesheet. This is now the source of
   truth — edit here. */

/* ===== Self-hosted fonts (mirrors the marketing site) ===== */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/chakra-petch-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/chakra-petch-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/chakra-petch-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/chakra-petch-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/assets/fonts/sora-variable.woff2') format('woff2');
}

:root {
  /* OFFICIAL PALETTE (docs/BRAND_COLORS.md) — mirrors the marketing site.
     Core: Midnight Blue #00264a + Rose Fuchsia #f4157e on white. Supporting:
     Burgundy, Powder Pink, Ice Blue, Steel Blue, Olive, Warm Beige. Only
     tonal steps of these 8 hues — no other colors. */
  --navy-900: #001830;
  --navy-800: #00264a; /* midnight blue */
  --navy-700: #14406b;
  --navy-100: #e7ecf4;
  --pink-500: #f4157e; /* rose fuchsia — the one accent */
  --pink-700: #c40e62;
  --pink-100: #f5d8d9; /* powder pink tint */
  --blue-100: #dce9f4; /* ice blue */
  --amber-400: #d8bcac; /* warm beige — streaks / XP */
  --mint-400: #68684a; /* olive — success ticks */
  --lilac-200: #dce9f4; /* ice blue */

  /* Light surfaces — the app is bright like the marketing site. */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f5fb; /* insets: inputs, stat tiles, options */
  --ink: #14203a;
  --ink-soft: #566079;
  --line: rgba(20, 32, 58, 0.1);

  --success: var(--mint-400);
  --error: #7b023f;

  /* Aliases so shared class names read cleanly — the accent is pink. */
  --accent: var(--pink-500);
  --accent-deep: var(--pink-700);
  --accent-tint: var(--pink-100);
  --gold: var(--amber-400);

  --font-display: 'Chakra Petch', 'Segoe UI', sans-serif;
  --font-body: 'Sora', 'Segoe UI', sans-serif;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 32, 58, 0.08);
  --container: 1240px;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 620px at 82% -10%, rgba(244, 21, 126, 0.1), transparent 60%),
    radial-gradient(900px 520px at 6% 108%, rgba(135, 155, 179, 0.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

a {
  color: var(--accent-deep);
  text-decoration: none;
  font-weight: 500;
}
a:hover {
  text-decoration: underline;
}

/* ===== Shared building blocks ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(244, 21, 126, 0.32);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-deep);
  box-shadow: 0 10px 28px rgba(244, 21, 126, 0.42);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-deep);
}
.btn-block {
  width: 100%;
}

.field {
  display: block;
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
}
.field textarea {
  resize: vertical;
  line-height: 1.5;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(244, 21, 126, 0.16);
}

.alert {
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.alert-error {
  background: rgba(123, 2, 63, 0.12);
  border: 1px solid rgba(123, 2, 63, 0.4);
  color: #efb6c8;
}
.alert-success {
  background: rgba(104, 104, 74, 0.14);
  border: 1px solid rgba(104, 104, 74, 0.45);
  color: #4e4f36;
}

.muted {
  color: var(--ink-soft);
}

.spinner-wrap {
  min-height: 60vh;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
}

/* ===== components (ui.css) ===== */
/* ============================================================================
   App-specific styles (layout, auth, dashboard, practice). Base tokens and
   generic .btn/.card/.field live in index.css.
   ========================================================================== */

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.field-error {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: #efb6c8;
}

.form-actions {
  display: flex;
  gap: 12px;
}

/* ===== Brand wordmark ===== */
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand__accent {
  color: var(--accent);
}

/* ===== App shell / header ===== */
.app-header {
  border-bottom: 1px solid var(--line);
  background: rgba(253, 254, 255, 0.78);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.app-header__right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-header__user {
  font-size: 0.9rem;
}
.app-main {
  padding-top: 32px;
  padding-bottom: 64px;
}

/* ===== Auth screens ===== */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
}
.auth-brand {
  display: block;
  margin-bottom: 24px;
}
.auth-title {
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.auth-subtitle {
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.auth-alt {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
}

/* ===== Dashboard ===== */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.page-title {
  font-size: 1.9rem;
  margin-bottom: 4px;
}
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-state h2 {
  margin-bottom: 8px;
}
.empty-state .btn {
  margin-top: 20px;
}

.add-student {
  max-width: 480px;
  margin-bottom: 28px;
}
.add-student__title {
  font-size: 1.2rem;
  margin-bottom: 18px;
}

.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.student-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* One account = one student: the dashboard shows a single card — capped so
     it breathes without stretching across the whole row. */
  max-width: 480px;
}
.student-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.student-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink-500), #ff86a4);
}
.student-card__name {
  font-size: 1.15rem;
}
.student-card__sub {
  font-size: 0.82rem;
  margin-top: 2px;
}

/* ===== Stat blocks (shared: card + complete screen) ===== */
.stat-row {
  display: flex;
  gap: 10px;
}
.stat {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent-deep);
}
.stat__flame {
  font-size: 1rem;
}
.stat__label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-top: 2px;
}

.badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.badge-strip--center {
  justify-content: center;
}
.badge-chip {
  font-size: 0.78rem;
  background: var(--accent-tint);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 5px 11px;
  font-weight: 600;
}
.badge-chip--new {
  background: var(--amber-400);
  color: #4a3200;
}

/* ===== Practice ===== */
.practice {
  max-width: 640px;
  margin: 0 auto;
}
.practice__top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.progress-track {
  flex: 1;
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink-500), #ff86a4);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.practice__count {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
  min-width: 42px;
  text-align: right;
}

.question-card {
  padding: 32px;
}
.question-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  font-weight: 600;
}
.question-body {
  font-size: 1.5rem;
  line-height: 1.35;
  margin: 12px 0 26px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 15px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.08s ease;
}
.option:hover:not(:disabled) {
  border-color: var(--accent);
}
.option:active:not(:disabled) {
  transform: translateY(1px);
}
.option:disabled {
  cursor: default;
}
.option--chosen {
  border-color: var(--accent);
  background: rgba(244, 21, 126, 0.09);
}
.option--correct {
  border-color: var(--success);
  background: rgba(104, 104, 74, 0.16);
}
.option--wrong {
  border-color: var(--error);
  background: rgba(123, 2, 63, 0.14);
}
.option__mark {
  font-weight: 700;
}
.option--correct .option__mark {
  color: var(--success);
}
.option--wrong .option__mark {
  color: var(--error);
}

.feedback {
  margin-top: 22px;
  padding: 13px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
}
.feedback--good {
  background: rgba(104, 104, 74, 0.16);
  color: #12836f;
}
.feedback--bad {
  background: rgba(123, 2, 63, 0.12);
  color: #efb6c8;
}

.practice__actions {
  margin-top: 24px;
}

/* ===== Challenge complete ===== */
.complete-card {
  max-width: 480px;
  margin: 40px auto 0;
  text-align: center;
  padding: 40px 32px;
}
.complete-burst {
  font-size: 3.4rem;
  line-height: 1;
  margin-bottom: 12px;
}
.complete-title {
  font-size: 1.7rem;
  margin-bottom: 8px;
}
.complete-stats {
  margin: 26px 0;
}
.new-badges {
  margin-bottom: 26px;
}
.new-badges__label {
  font-weight: 600;
  color: #a9720f;
  margin-bottom: 10px;
}

@media (max-width: 560px) {
  .page-head {
    flex-direction: column;
  }
  .question-body {
    font-size: 1.3rem;
  }
}

/* ============================================================================
   Admin dashboard
   ========================================================================== */
.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-pill {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-800);
  background: var(--blue-100);
  border-radius: 999px;
  padding: 3px 9px;
}

.admin-nav {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.admin-nav__inner {
  display: flex;
  gap: 4px;
}
.admin-nav__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding: 14px 16px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}
.admin-nav__link:hover {
  color: var(--ink);
  text-decoration: none;
}
.admin-nav__link--active {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

/* Student nav — a left sidebar on desktop (the app pages are narrow, so the
   flanks are free real estate); collapses to a scrollable top bar on phones. */
.app-body {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.app-nav {
  flex: 0 0 190px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 32px;
  position: sticky;
  top: 88px; /* clears the sticky .app-header */
}
.app-nav__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
}
.app-nav__link:hover {
  color: var(--ink);
  background: var(--navy-100);
  text-decoration: none;
}
.app-nav__link--active {
  color: var(--pink-700);
  background: var(--pink-100);
}
.app-body .app-main {
  flex: 1;
  min-width: 0;
}
@media (max-width: 860px) {
  .app-body {
    display: block;
  }
  .app-nav {
    flex-direction: row;
    overflow-x: auto;
    position: static;
    padding: 10px 0 0;
    border-bottom: 1px solid var(--line);
  }
  .app-nav__link {
    white-space: nowrap;
  }
}

/* Locked subject (single-subject plan) — visibly present, clearly not actionable */
.subject-card--locked {
  opacity: 0.6;
  background: var(--surface-2);
}

/* Profile page */
.profile-card {
  max-width: 860px;
}
.profile-row .field {
  min-width: 220px;
}
.profile-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 24px 0 16px;
}
.profile-subhead {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 14px;
}

/* Filter tabs (enquiries, questions) */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.filter-tab {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-tab:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}
.filter-tab--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Data tables */
.table-card {
  padding: 0;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.data-table th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover,
.data-table tbody tr:hover:not(.detail-row) {
  background: var(--surface-2);
}
.table-sub {
  font-size: 0.82rem;
}
.row--open {
  background: var(--surface-2);
}
.detail-row td {
  background: var(--surface-2);
  padding-top: 6px;
}

/* Status select (enquiries, feedback, testimonials — 'new' is shared) */
.status-select {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  cursor: pointer;
  text-transform: capitalize;
}
.status-select--new {
  background: var(--blue-100);
  color: var(--navy-800);
}
.status-select--contacted {
  background: #fff3d6;
  color: #8a6100;
}
.status-select--converted {
  background: rgba(104, 104, 74, 0.2);
  color: #4e4f36;
}
.status-select--closed,
.status-select--archived,
.status-select--retired {
  background: var(--navy-100);
  color: var(--ink-soft);
}
.status-select--reviewed,
.status-select--draft {
  background: #fff3d6;
  color: #8a6100;
}
.status-select--published {
  background: rgba(104, 104, 74, 0.2);
  color: #4e4f36;
}

/* Enquiry message — free text from the demo form ("school or group booking",
   best time to call). Capped so one long note can't stretch the table. */
.enquiry-message {
  max-width: 280px;
  white-space: pre-wrap;
  font-size: 0.86rem;
  line-height: 1.5;
}

/* Feedback + testimonial cards (admin queues) */
.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feedback-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feedback-item__head,
.feedback-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.86rem;
}
.feedback-item__head > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.feedback-item__message {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  /* Family-authored text — preserve their paragraph breaks. */
  white-space: pre-wrap;
}
.feedback-item__rating {
  font-weight: 600;
}
.feedback-item__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.feedback-item__foot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* Category / provenance chips */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--navy-100);
  color: var(--navy-800);
}
.tag--praise {
  background: var(--pink-100);
  color: var(--pink-700);
}
.tag--suggestion {
  background: var(--lilac-200);
  color: #4b3d8f;
}
.tag--bug {
  background: rgba(123, 2, 63, 0.14);
  color: #b3213c;
}
.tag--content {
  background: #fff3d6;
  color: #8a6100;
}
.tag--consent {
  background: rgba(104, 104, 74, 0.2);
  color: #4e4f36;
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.filter-check input {
  accent-color: var(--accent);
}

/* Consent checkbox — the box sits beside its explanation, not above it. */
.field--check label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.5;
  cursor: pointer;
}
.field--check input {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.field-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.field-row .field {
  flex: 1;
  min-width: 130px;
}

/* Dashboard feedback prompt — deliberately quiet, below the practice CTAs. */
.feedback-section {
  margin-top: 28px;
}
.feedback-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.feedback-prompt__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

/* Family detail children */
.child-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}
.child-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
}
.child-item__name {
  font-weight: 600;
}
.child-item__grade {
  font-weight: 400;
  font-size: 0.88rem;
}
.child-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.child-metrics b {
  color: var(--accent-deep);
}

/* Question review */
.question-review-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.review-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  margin-bottom: 12px;
}
.review-tag {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  background: var(--accent-tint);
  border-radius: 999px;
  padding: 3px 10px;
}
.status-badge {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 10px;
}
.status-badge--draft {
  background: #fff3d6;
  color: #8a6100;
}
.status-badge--published {
  background: rgba(104, 104, 74, 0.2);
  color: #4e4f36;
}
.status-badge--retired {
  background: var(--navy-100);
  color: var(--ink-soft);
}
.review-card__body {
  font-size: 1.08rem;
  line-height: 1.4;
  margin-bottom: 16px;
}
.review-options {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.review-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.95rem;
}
.review-option--correct {
  border-color: var(--success);
  background: rgba(104, 104, 74, 0.12);
  font-weight: 600;
}
.review-option__check {
  color: #4e4f36;
  font-weight: 700;
}
.review-card__explanation {
  font-size: 0.9rem;
  line-height: 1.5;
  border-left: 2px solid var(--line);
  padding-left: 12px;
  margin-bottom: 16px;
}
.review-card__actions {
  display: flex;
  gap: 10px;
}

/* ============================================================================
   Adaptive Program
   ========================================================================== */
.student-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.points-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent), #ff86a4);
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 8px 22px rgba(244, 21, 126, 0.3);
}
.points-pill__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1;
}
.points-pill__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.sub-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(104, 104, 74, 0.12);
  border: 1px solid rgba(104, 104, 74, 0.4);
  color: #12836f;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  font-weight: 500;
}
.sub-banner__badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
}

/* Enrollment */
.enroll__intro {
  margin-bottom: 20px;
}
.enroll__intro h2 {
  margin-bottom: 8px;
}
.enroll__note {
  margin-top: 10px;
  font-size: 0.85rem;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-card--feature {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(244, 21, 126, 0.16);
}
.plan-card__ribbon {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 4px 10px;
}
.plan-card__name {
  font-size: 1.15rem;
}
.plan-card__scope {
  font-size: 0.88rem;
}
.plan-card__price {
  margin: 6px 0 14px;
}
.plan-card__points {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--accent-deep);
}

/* Subject cards */
.subject-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.subject-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.subject-card__name {
  font-size: 1.12rem;
}
.subject-card__hint {
  font-size: 0.88rem;
  flex: 1;
}
.level-chip {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  background: var(--accent-tint);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
}
.level-chip--new {
  color: var(--ink-soft);
  background: var(--navy-100);
}

/* Placement test */
.placement__questions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 22px;
}
.placement-q__body {
  font-size: 1.15rem;
  line-height: 1.4;
  margin: 10px 0 18px;
}
.complete-alt {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.9rem;
}

/* ============================================================================
   Olympiad Zone
   ========================================================================== */
.section-title {
  font-size: 1.2rem;
  margin: 32px 0 16px;
}

.contest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  border: 0;
  color: #fff;
  margin-bottom: 8px;
}
.contest-banner__eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber-400);
}
.contest-banner__title {
  font-size: 1.35rem;
  margin: 4px 0 6px;
  color: #fff;
}
.contest-banner .muted {
  color: rgba(255, 255, 255, 0.75);
}

.mock-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mock-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.mock-card__title {
  font-size: 1.08rem;
}
.mock-card__meta {
  font-size: 0.86rem;
}
.mock-card__score {
  font-size: 0.9rem;
}
.mock-card__score b {
  color: var(--accent-deep);
}
.style-chip {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy-800);
  background: var(--blue-100);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lesson-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.08s ease;
}
.lesson-row:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.lesson-row__title {
  font-size: 1.02rem;
}
.lesson-row__topic {
  font-size: 0.84rem;
}
.lesson-row__arrow {
  color: var(--accent-deep);
  font-size: 1.2rem;
}

/* Lesson reader */
.lesson-reader {
  max-width: 720px;
  margin: 0 auto;
}
.lesson-reader__title {
  font-size: 1.9rem;
  margin: 8px 0 18px;
}
.lesson-reader__video {
  display: inline-block;
  margin-bottom: 18px;
  font-weight: 600;
}
.lesson-reader__body {
  white-space: pre-line;
  line-height: 1.7;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 28px;
}

/* Mock test */
.mocktest__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.mocktest__title {
  font-size: 1.5rem;
  margin-top: 6px;
}
.timer {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy-800);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.timer--low {
  color: #fff;
  background: var(--error);
  border-color: var(--error);
}
.mocktest__progress {
  text-align: center;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

/* Mock test results review */
.mock-result .complete-card {
  margin-bottom: 24px;
}
.review-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-q__body {
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 8px 0 14px;
}
.review-option--wrong {
  border-color: var(--error);
  background: rgba(123, 2, 63, 0.1);
}
.review-option__x {
  color: var(--error);
  font-weight: 700;
}
.review-option__you {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

/* Leaderboard rank badge */
.rank-badge {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--navy-800);
  background: var(--blue-100);
}
.data-table tbody tr:first-child .rank-badge {
  color: #4a3200;
  background: var(--amber-400);
}

/* ============================================================================
   Admin analytics
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kpi__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--accent-deep);
  line-height: 1.1;
}
.kpi__label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
}
.kpi__hint {
  font-size: 0.74rem;
  color: var(--ink-soft);
}

.analytics-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.card-title {
  font-size: 1.02rem;
  margin-bottom: 16px;
}
.analytics-note {
  margin-top: 14px;
  font-size: 0.84rem;
}

/* Horizontal bar rows */
.bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 40px;
  align-items: center;
  gap: 10px;
}
.bar-row__label {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.bar-row__track {
  height: 12px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.bar-row__fill {
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
  transition: width 0.4s ease;
}
.bar-row__fill--accent { background: var(--accent); }
.bar-row__fill--mint   { background: var(--mint-400); }
.bar-row__fill--amber  { background: var(--amber-400); }
.bar-row__fill--navy   { background: var(--navy-700); }
.bar-row__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: right;
}

/* 7-day vertical spark chart */
.spark-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
}
.spark-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
}
.spark-col__bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}
.spark-col__bar {
  width: 100%;
  min-height: 3px;
  background: linear-gradient(180deg, var(--accent), #ff86a4);
  border-radius: 6px 6px 0 0;
  transition: height 0.4s ease;
}
.spark-col__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--ink);
}
.spark-col__label {
  font-size: 0.68rem;
  color: var(--ink-soft);
}

/* ============================================================================
   Mental Maths (engine-backed adaptive)
   ========================================================================== */
.placement-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.placement-cta__title {
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.placement-cta--done {
  border-color: rgba(104, 104, 74, 0.4);
  background: rgba(104, 104, 74, 0.06);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.skill-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-family: var(--font-body);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.08s ease;
}
.skill-tile:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.skill-tile__level {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  background: var(--navy-700);
  border-radius: 8px;
  padding: 4px 8px;
  flex-shrink: 0;
}
.skill-tile__label {
  font-size: 0.92rem;
  color: var(--ink);
}

.skill-tag {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}

.feedback__mis {
  margin-top: 8px;
  font-size: 0.9rem;
}
.feedback__seewhy {
  font-weight: 600;
}
.mm-finish {
  margin-top: 10px;
}

/* ===== Public two-column auth pages (login / register) ===== */
.public-main { min-height: calc(100vh - 200px); }
.auth-split {
  max-width: 1100px; margin: 0 auto; padding: 48px 24px 72px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: start;
}
@media (max-width: 860px) { .auth-split { grid-template-columns: 1fr; gap: 28px; } }
/* left rail — value prop / noticeboard */
.auth-aside__eyebrow { color: var(--pink-700, #c40e62); font-weight: 700; letter-spacing: .08em; font-size: .78rem; text-transform: uppercase; }
.auth-aside__title { font-family: 'Chakra Petch','Segoe UI',sans-serif; font-size: 2rem; line-height: 1.12; color: var(--navy-900, #001830); margin: .3em 0 .5em; }
.auth-aside__lead { color: var(--ink-soft, #566079); max-width: 46ch; margin: 0 0 28px; }
.value-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 16px; }
.value-item { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.value-item__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #f5d8d9; color: var(--pink-700, #c40e62); font-size: 1.1rem; }
.value-item__title { font-weight: 700; color: var(--navy-900, #001830); margin: 0 0 2px; }
.value-item__body { color: var(--ink-soft, #566079); font-size: .92rem; margin: 0; }
/* before/after strip */
.ba-strip { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; background: var(--surface,#fff); border: 1px solid var(--line, rgba(20,32,58,.1)); border-radius: 14px; padding: 16px 18px; }
.ba-cell__label { font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft,#566079); }
.ba-cell__value { font-weight: 700; color: var(--navy-900,#001830); }
.ba-arrow { color: var(--pink-500,#f4157e); font-size: 1.4rem; }
/* right rail — the form card sits in the split */
.auth-split .auth-card { margin: 0; max-width: none; }
/* noticeboard (login) */
.noticeboard { display: grid; gap: 12px; }
.notice-item { background: var(--surface,#fff); border: 1px solid var(--line, rgba(20,32,58,.1)); border-left: 3px solid var(--pink-500,#f4157e); border-radius: 12px; padding: 14px 16px; }
.notice-item__tag { font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pink-700,#c40e62); }
.notice-item__title { font-weight: 700; color: var(--navy-900,#001830); margin: 2px 0 3px; }
.notice-item__body { color: var(--ink-soft,#566079); font-size: .9rem; margin: 0; }
.checkbox-field { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; margin: 4px 0 18px; font-size: .9rem; color: var(--ink-soft,#566079); }
.checkbox-field input { margin-top: 3px; }
