:root {
  /* Brand palette: Lavender & Coral (from the Empathy-experiment reference).
     Soft pastel identity — deep indigo-violet primary + warm coral accent on a
     lavender background. Variable NAMES kept (navy/gold/blue); values are the new
     theme. Status colours (green/amber/red) are left semantic. */
  --navy: #2c2a63; /* deep indigo-violet — sidebar, headings, primary buttons */
  --navy-light: #3a3782; /* indigo light — hovers, gradients */
  --navy-dark: #1d1b45; /* darkest indigo — gradient tails */
  --blue: #5b6fe0; /* periwinkle — secondary accent */
  --gold: #f0673a; /* coral — brand badge, accents, CTAs */
  --gold-light: #ff7d50; /* light coral */
  --off-white: #f6f4fb; /* faint lavender white — cards / surfaces */
  --dark: #1a202c;
  --medium: #4a5568;
  --light: #718096;
  --line: #e6e2f0; /* soft lavender hairline */
  --green: #2f855a;
  --amber: #b7791f;
  --red: #c53030;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(44, 42, 99, 0.09), 0 8px 24px rgba(44, 42, 99, 0.07);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--dark);
  background: linear-gradient(160deg, #eae5f5 0%, #e5e8f9 100%) fixed;
  line-height: 1.6;
}

/* ===== Auth screen ===== */
#authScreen {
  display: none;
}
body:not(.authed) #authScreen {
  display: block;
}
body:not(.authed) .app {
  display: none;
}
.auth-screen {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}
.auth-brand {
  background: linear-gradient(160deg, #2c2a63 0%, #1d1b45 55%, #3a3782 100%);
  color: #fff;
  padding: 48px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-brand::after {
  content: "";
  position: absolute;
  right: -130px;
  top: -130px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 103, 58, 0.22), transparent 70%);
}
.auth-brand-top {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.auth-brand-mid {
  position: relative;
  z-index: 1;
}
.auth-brand-mid h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.18;
  margin: 0 0 26px;
}
.auth-points {
  list-style: none;
  margin: 0;
  padding: 0;
}
.auth-points li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
  color: #cbd5e0;
  font-size: 1.04rem;
  max-width: 42ch;
}
.auth-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold-light);
  font-weight: 700;
}
.auth-brand-foot {
  color: #8a98ab;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #eef0fa;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(44, 42, 99, 0.1);
  padding: 30px 30px 26px;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  background: #f1f3f8;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  border: none;
  background: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--medium);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}
.auth-tab.active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.auth-h2 {
  font-family: "DM Serif Display", serif;
  color: var(--navy);
  margin: 0 0 4px;
  font-size: 1.5rem;
}
.auth-sub {
  color: var(--light);
  margin: 0 0 20px;
  font-size: 0.95rem;
}
.auth-card .field2 {
  margin-bottom: 14px;
}
.auth-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.auth-submit {
  width: 100%;
  margin-top: 6px;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 0.9rem;
  gap: 10px;
  flex-wrap: wrap;
}
.auth-fineprint {
  margin: 18px 0 0;
  font-size: 0.78rem;
  color: var(--light);
  text-align: center;
}
@media (max-width: 860px) {
  .auth-screen {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    display: none;
  }
}

/* ===== App shell ===== */
.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  background: linear-gradient(180deg, #2c2a63 0%, #1d1b45 100%);
  color: #aab6c6;
  display: flex;
  flex-direction: column;
  transition: width 0.18s ease, transform 0.22s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.brand-badge {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #2a2008;
  font-family: "DM Serif Display", serif;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-line1 {
  font-family: "DM Serif Display", serif;
  font-size: 1rem;
  color: #fff;
  white-space: nowrap;
}
.brand-line2 {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  font-weight: 600;
}
.nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}
.nav-section {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5d6b7d;
  font-weight: 700;
  padding: 16px 12px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  color: #aab6c6;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 500;
  text-align: left;
  padding: 11px 12px;
  border-radius: 9px;
  cursor: pointer;
  position: relative;
  transition: background 0.14s ease, color 0.14s ease;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.nav-item.active {
  background: rgba(240, 103, 58, 0.14);
  color: #fff;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
}
.nav-item.active .ic {
  color: var(--gold-light);
}
.ic {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-cta {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.btn-pass {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: #2a2008;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  cursor: pointer;
  transition: filter 0.14s ease;
}
.btn-pass:hover {
  filter: brightness(1.06);
}

/* Main column */
.main {
  flex: 1;
  min-width: 0;
  margin-left: 248px;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.18s ease;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
}
.topbar-title {
  font-family: "DM Serif Display", serif;
  font-size: 1.3rem;
  color: var(--navy);
  margin: 0;
  font-weight: 400;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--medium);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.icon-btn:hover {
  background: #f1f3f8;
  color: var(--navy);
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #2a2008;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.mode-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 999px;
}
.mode-badge.demo {
  background: #fdf2e2;
  color: var(--amber);
}
.mode-badge.live {
  background: #e9f7ef;
  color: var(--green);
}

.content {
  padding: 28px 32px 64px;
  max-width: 1120px;
  width: 100%;
}

/* Dashboard */
.dash-hero {
  margin-bottom: 24px;
}
.dash-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 4px;
}
.dash-hero h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  color: var(--navy);
  margin: 0 0 8px;
}
.dash-sub {
  color: var(--medium);
  margin: 0;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.stat-card .stat-num {
  font-family: "DM Serif Display", serif;
  font-size: 2rem;
  color: var(--navy);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--light);
  margin-top: 6px;
}
.block-title {
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0 0 14px;
}

/* Placeholder sections */
.placeholder {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 64px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 640px;
  margin: 24px auto;
}
.placeholder .ic {
  width: 40px;
  height: 40px;
  color: var(--gold);
  stroke-width: 1.5;
}
.placeholder h3 {
  font-family: "DM Serif Display", serif;
  font-size: 1.4rem;
  color: var(--navy);
  margin: 14px 0 6px;
}
.placeholder p {
  color: var(--medium);
  margin: 0 auto;
  max-width: 42ch;
}

.lede {
  font-size: 1.02rem;
  color: var(--medium);
  max-width: 64ch;
  margin: 0 0 22px;
}

/* ===== Study Planner ===== */
.planner-setup {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 560px;
  margin: 16px auto;
  padding: 40px 32px;
  text-align: center;
}
.planner-setup .ic {
  width: 40px;
  height: 40px;
  color: var(--gold);
  stroke-width: 1.5;
}
.planner-setup h3 {
  font-family: "DM Serif Display", serif;
  font-size: 1.5rem;
  color: var(--navy);
  margin: 12px 0 6px;
}
.planner-setup p {
  color: var(--medium);
  max-width: 46ch;
  margin: 0 auto 20px;
}
.field {
  display: block;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  max-width: 280px;
  margin: 0 auto 18px;
}
.field input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--dark);
}
.field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.12);
}

.planner-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.countdown-card {
  background: linear-gradient(160deg, var(--navy), var(--navy-dark, #1d1b45));
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow);
}
.count-num {
  font-family: "DM Serif Display", serif;
  font-size: 3rem;
  line-height: 1;
  color: var(--gold-light);
}
.count-label {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #cbd5e0;
}
.count-label strong {
  color: #fff;
}
.readiness-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.readiness-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  color: var(--navy);
  font-weight: 600;
}
.readiness-head strong {
  font-family: "DM Serif Display", serif;
  font-size: 1.8rem;
  color: var(--gold);
}
.cover-bar {
  height: 8px;
  background: #edf0f5;
  border-radius: 999px;
  overflow: hidden;
}
.cover-bar.big {
  height: 12px;
}
.cover-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.3s ease;
}
.readiness-card .muted {
  font-size: 0.82rem;
  margin: 12px 0 8px;
}

/* Phases */
.phases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.phase {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.phase.current {
  border-top-color: var(--gold);
  box-shadow: var(--shadow);
}
.phase-top {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.phase-name {
  font-weight: 700;
  color: var(--navy);
}
.phase-dates {
  font-size: 0.78rem;
  color: var(--light);
}
.phase-desc {
  font-size: 0.88rem;
  color: var(--medium);
}
.phase-tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  background: rgba(240, 103, 58, 0.12);
  padding: 3px 9px;
  border-radius: 999px;
}

/* Today's focus */
.focus-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}
.focus-card h3 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 1.1rem;
}
.focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.focus-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.focus-list li:last-child {
  border-bottom: none;
}

/* Syllabus tracker */
.paper-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.paper-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: #fafbfd;
  border-bottom: 1px solid var(--line);
}
.paper-block-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 1.02rem;
}
.cover-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--medium);
  font-weight: 600;
  min-width: 120px;
}
.cover-mini .cover-bar {
  width: 80px;
}
.chapter-list {
  padding: 6px 22px 14px;
}
.chapter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f6;
}
.chapter-row:last-child {
  border-bottom: none;
}
.ch-name {
  font-size: 0.92rem;
  color: var(--dark);
}
.chapter-row.st-mastered .ch-name {
  color: var(--green);
}
.ch-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.status-select {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--dark);
  background: #fff;
  cursor: pointer;
}
.chapter-row.st-mastered .status-select {
  border-color: #9ae6b4;
  color: var(--green);
}
.chapter-row.st-revised .status-select {
  border-color: #b7d3f0;
}
.chapter-row.st-learning .status-select {
  border-color: #f6c98a;
}

@media (max-width: 720px) {
  .planner-grid {
    grid-template-columns: 1fr;
  }
  .chapter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ===== Videos ===== */
a.btn {
  text-decoration: none;
  display: inline-block;
}
.btn-sm {
  padding: 7px 14px;
  font-size: 0.84rem;
}
.video-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
.video-chapter {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.video-ch-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.video-ch-name {
  font-weight: 600;
  color: var(--navy);
}
.video-empty {
  margin: 10px 0 0;
  font-size: 0.88rem;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.video-card {
  cursor: pointer;
}
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--navy);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.video-card:hover .video-thumb {
  transform: translateY(-2px);
}
.video-play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(44, 42, 99, 0.78);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  padding-left: 3px;
}
.video-title {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}
.video-embed {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
}
.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.video-motiv {
  margin-bottom: 40px;
}

/* ===== Feedback ===== */
.fb-rating-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 14px;
  flex-wrap: wrap;
}
.fb-rating-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
}
.stars {
  display: flex;
  gap: 2px;
}
.star {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #d6dbe4;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.12s ease;
}
.star:hover,
.star.on {
  color: var(--gold);
}
.fb-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.fb-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.fb-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  background: rgba(240, 103, 58, 0.12);
  padding: 3px 9px;
  border-radius: 999px;
}
.fb-stars-mini {
  color: var(--gold);
  font-size: 0.85rem;
}
.fb-item p {
  margin: 0;
  color: var(--dark);
}

/* ===== Doubts ===== */
.doubt-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.doubt-hist {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.doubt-hist summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
}
.doubt-hist summary::marker {
  color: var(--gold);
}
.doubt-hist-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.doubt-hist-body p {
  margin: 0 0 8px;
}

/* ===== Mentoring ===== */
.mentor-intro {
  font-size: 1.02rem;
  color: var(--medium);
  margin: 0 0 14px;
}
.mentor-points {
  margin: 0;
  padding-left: 22px;
}
.mentor-points li {
  margin-bottom: 9px;
  color: var(--dark);
}
.mentor-reply {
  margin-top: 16px;
  background: var(--off-white);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
}
.mentor-reply-head {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 6px;
}
.mentor-reply p {
  margin: 0 0 10px;
  color: var(--dark);
}
.mentor-reply p:last-child {
  margin-bottom: 0;
}

/* ===== Notes ===== */
.notes-head {
  margin-bottom: 18px;
}
.notes-select-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  max-width: 420px;
}
.notes-select-label select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 400;
  color: var(--dark);
  background: #fff;
}
.notes-select-label select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.12);
}
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 50px;
}
.note-chapter {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.note-chapter.open {
  box-shadow: var(--shadow);
  border-color: var(--gold);
}
.note-ch-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
  padding: 16px 20px;
  cursor: pointer;
}
.note-ch-head:hover {
  background: #fafbfd;
}
.note-arrow {
  color: var(--gold);
  font-size: 0.9rem;
}
.note-ch-body {
  padding: 4px 20px 20px;
  border-top: 1px solid var(--line);
}
.note-section {
  margin-top: 16px;
}
.note-section h4 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
}
.ai-notes-content {
  background: var(--off-white);
  border-radius: 10px;
  padding: 16px 18px;
}
.note-summary {
  margin: 0 0 12px;
  color: var(--dark);
}
.note-block {
  margin-top: 12px;
}
.note-block h5 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: var(--navy);
}
.note-block ul {
  margin: 0;
  padding-left: 20px;
}
.note-block li {
  margin-bottom: 4px;
  font-size: 0.93rem;
}
.my-notes {
  width: 100%;
  min-height: 130px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.96rem;
  line-height: 1.6;
  resize: vertical;
  color: var(--dark);
}
.my-notes:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.12);
}
.note-saved {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--green);
  font-weight: 600;
  height: 1em;
}

/* ===== Focus Timer (Pomodoro) ===== */
.pomo-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
  padding-bottom: 40px;
}
.pomo-card {
  border-radius: 18px;
  padding: 44px 28px 36px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.pomo-emoji {
  font-size: 3.4rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}
.pomo-name {
  font-family: "DM Serif Display", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.04em;
  margin-top: 14px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}
.pomo-fca {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-top: 4px;
}
.pomo-fca.big {
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  letter-spacing: 0.08em;
  text-transform: none;
  color: #fff;
  margin-top: 16px;
}
.pomo-hint {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 6px;
}
.pomo-mode {
  margin-top: 26px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.75);
}
.pomo-time {
  font-family: "DM Serif Display", serif;
  font-size: clamp(4.5rem, 14vw, 7rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 22px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
.pomo-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.pomo-btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 11px 26px;
  border-radius: 10px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease;
}
.pomo-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}
.pomo-btn.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #2a2008;
}
.pomo-btn.primary:hover {
  background: var(--gold-light);
}
.pomo-caption {
  margin-top: 24px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.98rem;
}
.pomo-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pomo-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.pomo-panel h4 {
  margin: 0 0 10px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--light);
}
.pomo-tabs {
  display: flex;
  gap: 8px;
}
.pomo-tab {
  flex: 1;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--medium);
  padding: 9px 6px;
  border-radius: 8px;
  cursor: pointer;
}
.pomo-tab.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.pomo-themes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pomo-theme {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 9px 12px;
  cursor: pointer;
  text-align: left;
}
.pomo-theme:hover {
  border-color: var(--gold);
}
.pomo-theme.active {
  border-color: var(--gold);
  background: #fbf7ee;
}
.pt-emoji {
  font-size: 1.2rem;
}
.pomo-stat {
  text-align: center;
  color: var(--medium);
  font-size: 0.9rem;
}
.pomo-stat-num {
  font-family: "DM Serif Display", serif;
  font-size: 1.6rem;
  color: var(--gold);
  margin-right: 4px;
}
@media (max-width: 820px) {
  .pomo-layout {
    grid-template-columns: 1fr;
  }
}

/* ===== My Account ===== */
.acct-tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 22px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
/* On narrow phones the four tabs can't fit one row — wrap them so every tab
   stays visible (no hidden horizontal-scroll tabs). */
@media (max-width: 560px) {
  .acct-tabs {
    flex-wrap: wrap;
    width: 100%;
    overflow-x: visible;
  }
  .acct-tab {
    flex: 1 1 calc(50% - 4px);
    text-align: center;
    padding: 9px 10px;
  }
}
.acct-tab {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--medium);
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}
.acct-tab:hover {
  color: var(--navy);
}
.acct-tab.active {
  background: var(--navy);
  color: #fff;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.card.subtle {
  box-shadow: none;
  background: #fafbfd;
}
.card-title {
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0 0 18px;
}
.card-title.plain {
  margin: 0 0 14px;
  box-shadow: none;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}
.field2 {
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  gap: 6px;
}
.field2 input,
.field2 select {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--dark);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.field2 input:focus,
.field2 select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.12);
}
.save-banner {
  background: #f0faf4;
  border: 1px solid #9ae6b4;
  color: var(--green);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-weight: 600;
}

/* Toggles */
.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.toggle input {
  display: none;
}
.toggle .switch {
  width: 40px;
  height: 22px;
  background: #cbd5e0;
  border-radius: 999px;
  position: relative;
  transition: background 0.16s ease;
  flex-shrink: 0;
}
.toggle .switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.16s ease;
}
.toggle input:checked + .switch {
  background: var(--gold);
}
.toggle input:checked + .switch::after {
  transform: translateX(18px);
}

/* Plans */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.plan-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.plan-card.featured {
  border: 1.5px solid var(--gold);
}
.plan-tag {
  position: absolute;
  top: -11px;
  left: 22px;
  background: var(--gold);
  color: #2a2008;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
}
.plan-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
}
.plan-price {
  font-family: "DM Serif Display", serif;
  font-size: 2.2rem;
  color: var(--navy);
  margin: 6px 0 10px;
}
.plan-price span {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: var(--light);
}
.plan-desc {
  color: var(--medium);
  font-size: 0.9rem;
  margin: 0 0 14px;
}
.plan-perks {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  flex: 1;
}
.plan-perks li {
  font-size: 0.88rem;
  color: var(--dark);
  padding: 5px 0 5px 22px;
  position: relative;
}
.plan-perks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* Empty + tables + pills */
.empty-state {
  text-align: center;
  padding: 28px 16px;
}
.empty-state strong {
  color: var(--navy);
  display: block;
  margin-bottom: 4px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--light);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f0f2f6;
  color: var(--dark);
}
.pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.pill.pending {
  background: #fdf2e2;
  color: var(--amber);
}
.pill.ok {
  background: #e6f4ec;
  color: var(--green);
}
.pass-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.pass-row:last-child {
  border-bottom: none;
}

/* Access / paywall */
.access-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 0.92rem;
  color: var(--medium);
}
.access-banner.ok {
  border-left-color: var(--green);
}
.access-banner strong {
  color: var(--navy);
}
.paywall {
  text-align: center;
  max-width: 480px;
  margin: 24px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 28px;
  box-shadow: var(--shadow);
}
.paywall-lock {
  font-size: 2rem;
}
.paywall h3 {
  margin: 10px 0 8px;
  color: var(--navy);
  font-family: "DM Serif Display", serif;
  font-size: 1.4rem;
}
.paywall p {
  color: var(--medium);
  margin: 0 0 18px;
  line-height: 1.55;
}
.paywall strong {
  color: var(--navy);
}

/* Referrals */
.refer-hero {
  background: linear-gradient(135deg, #fff 60%, #fbf7ee);
}
.refer-title {
  font-family: "DM Serif Display", serif;
  font-size: 1.6rem;
  color: var(--navy);
  margin: 0 0 8px;
}
.refer-code-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 20px 0 14px;
}
.refer-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--light);
  font-weight: 600;
}
.refer-code {
  font-family: "DM Serif Display", serif;
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  color: var(--navy);
  border: 1.5px dashed var(--gold);
  border-radius: 8px;
  padding: 6px 16px;
}
.refer-link-row {
  display: flex;
  gap: 10px;
  max-width: 560px;
}
.refer-link-row input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--medium);
  background: #fff;
}
.steps3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 10px;
}
.step strong {
  display: block;
  color: var(--navy);
  margin-bottom: 4px;
}
.step p {
  margin: 0;
  font-size: 0.88rem;
}

/* Sidebar collapse (desktop) */
body.nav-collapsed .sidebar {
  width: 76px;
}
body.nav-collapsed .main {
  margin-left: 76px;
}
body.nav-collapsed .brand-text,
body.nav-collapsed .nav-item span,
body.nav-collapsed .nav-section {
  display: none;
}
body.nav-collapsed .sidebar-brand {
  justify-content: center;
  padding: 0;
}
body.nav-collapsed .nav-item {
  justify-content: center;
}
body.nav-collapsed .btn-pass {
  font-size: 0;
  padding: 12px 0;
}
body.nav-collapsed .btn-pass::after {
  content: "₹20";
  font-size: 0.85rem;
}

.sidebar-backdrop {
  display: none;
}

/* Mobile: off-canvas sidebar */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
  }
  .main {
    margin-left: 0;
  }
  body.nav-open .sidebar {
    transform: translateX(0);
  }
  body.nav-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(44, 42, 99, 0.45);
    z-index: 35;
  }
  .content {
    padding: 20px 18px 56px;
  }
}

/* Subjects */
.subject-list {
  padding-bottom: 60px;
}
.course-heading {
  font-family: "DM Serif Display", serif;
  font-size: 1.3rem;
  color: var(--navy);
  margin: 28px 0 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}
.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.group-subheading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin: 18px 0 10px;
}
.subject-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.4s ease;
}
.subject-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--gold);
}
.subject-card .level {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  font-weight: 600;
}
.subject-card .paper {
  font-size: 1.2rem;
  color: var(--navy);
  margin: 6px 0 12px;
  font-weight: 600;
}
.subject-card .stat {
  font-size: 0.9rem;
  color: var(--light);
}
.subject-card.coming-soon {
  cursor: default;
  opacity: 0.72;
  border-style: dashed;
}
.subject-card.coming-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line);
}
.soon-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber);
  background: rgba(183, 121, 31, 0.12);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}

/* Ladder */
.ladder-head {
  padding: 28px 0 8px;
  border-bottom: 1px solid var(--line);
}
.ladder-legend {
  display: flex;
  gap: 18px;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--medium);
}
.ladder-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.dot-pass {
  background: var(--green);
}
.dot-open {
  background: var(--blue);
}
.dot-lock {
  background: #cbd5e0;
}
.ladder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 22px 0 70px;
}
.paper-card {
  text-align: left;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: inherit;
  min-height: 92px;
}
.paper-card.open {
  cursor: pointer;
  border-left: 4px solid var(--blue);
}
.paper-card.open:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.paper-card.passed {
  cursor: pointer;
  border-left: 4px solid var(--green);
  background: #f4faf6;
}
.paper-card.passed:hover {
  box-shadow: var(--shadow);
}
.paper-card.locked {
  opacity: 0.6;
  border-style: dashed;
  background: #fafafa;
}
.paper-no {
  font-weight: 700;
  color: var(--navy);
}
.paper-diff {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  font-weight: 600;
  margin: 2px 0 8px;
}
.paper-status {
  font-size: 0.78rem;
  color: var(--light);
  display: block;
}
.paper-card.passed .paper-status {
  color: var(--green);
  font-weight: 600;
}

/* Sets A / B / C */
.sets-host {
  display: block;
  padding: 18px 0 50px;
}
.set-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.set-block.locked {
  background: #fafbfd;
  box-shadow: none;
  border-style: dashed;
}
.set-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.set-head > div:first-child {
  flex: 1;
  min-width: 60%;
}
.set-head h3 {
  margin: 6px 0 4px;
  color: var(--navy);
  font-size: 1.2rem;
}
.set-head .muted {
  margin: 0;
  max-width: 62ch;
}
.set-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: rgba(240, 103, 58, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
}
.set-prog {
  font-family: "DM Serif Display", serif;
  font-size: 1.8rem;
  color: var(--navy);
  text-align: right;
  line-height: 1;
  white-space: nowrap;
}
.set-prog span {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  color: var(--light);
  margin-top: 2px;
}
.set-lock {
  font-size: 1.4rem;
}
.lock-reason {
  margin: 0;
}

/* Set A chapter rows */
.ch-test-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ch-test-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  flex-wrap: wrap;
}
.ch-test-row.done {
  background: #f4faf6;
  border-color: #cdead8;
}
.ch-test-name {
  font-size: 0.94rem;
  color: var(--dark);
  font-weight: 500;
}
.ch-test-row.done .ch-test-name {
  color: var(--green);
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.chip:hover {
  border-color: var(--blue);
  background: #f7fafd;
}
.chip.passed {
  background: #eef7f1;
  border-color: #9ae6b4;
  color: var(--green);
}

/* Test */
.test-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 0 8px;
  border-bottom: 1px solid var(--line);
}
.test-title {
  font-family: "DM Serif Display", serif;
  color: var(--navy);
  margin: 8px 0 2px;
  font-size: 1.5rem;
}
.timer-box {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 16px;
  min-width: 96px;
}
.timer-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--light);
}
.timer {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.how-to {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.95rem;
  color: var(--medium);
}
.paper-questions {
  margin-top: 8px;
}
.paper-q {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
}

/* MCQ — test view */
.mcq-q {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
}
.mcq-options {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mcq-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.mcq-option:hover {
  border-color: var(--blue);
  background: #f7fafd;
}
.mcq-option input {
  margin-top: 3px;
  accent-color: var(--blue);
}
.mcq-option:has(input:checked) {
  border-color: var(--blue);
  background: #eef5fc;
}

/* MCQ — report view */
.mcq-result {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 4px;
}
.mcq-result-opt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.94rem;
}
.mcq-result-opt.correct {
  background: #f0faf4;
  border-color: #9ae6b4;
}
.mcq-result-opt.wrong {
  background: #fff5f5;
  border-color: #feb2b2;
}
.opt-tag {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.mcq-result-opt.correct .opt-tag {
  color: var(--green);
}
.mcq-result-opt.wrong .opt-tag {
  color: var(--red);
}

/* Upload */
.upload-zone {
  background: #fff;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin: 22px 0 8px;
  text-align: center;
}
.upload-zone h3 {
  margin: 0 0 4px;
  color: var(--navy);
}
.upload-zone .muted {
  margin: 0 0 16px;
}
.file-list {
  margin-top: 16px;
  text-align: left;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.file-row {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--off-white);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.file-row .file-name {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.file-thumb {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.file-thumb-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--red);
  cursor: default;
}
.file-thumb.sm {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}
.doubt-files-count {
  margin-right: 8px;
  vertical-align: middle;
}
#doubtFiles {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.file-remove {
  background: none;
  border: none;
  color: var(--red);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  margin-left: auto;
}

/* Transcription in report */
.transcription {
  background: var(--off-white);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.transcription h4 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
}
.transcription p {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.94rem;
  color: var(--dark);
}

.test-form {
  margin-top: 24px;
}
.q-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.q-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.q-num {
  font-weight: 700;
  color: var(--navy);
}
.q-marks {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}
.q-text {
  color: var(--dark);
  margin: 0 0 14px;
}
textarea {
  width: 100%;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.98rem;
  line-height: 1.6;
  resize: vertical;
  color: var(--dark);
}
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.12);
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 70px;
}
.btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover {
  background: var(--navy-light);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--navy);
}
.report-actions {
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-frozen {
  background: #eef0f5;
  color: var(--medium);
  border: 1px dashed #c3cad6;
}
.btn-frozen:hover {
  border-color: var(--gold);
  color: var(--navy);
}
.sa-hint {
  margin-right: auto;
  align-self: center;
  font-size: 0.85rem;
  color: var(--amber);
  font-weight: 600;
}

/* Unlock banner */
.unlock-banner {
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0 0;
  font-size: 0.98rem;
}
.unlock-banner.pass {
  background: #f0faf4;
  border: 1px solid #9ae6b4;
  color: var(--green);
}
.unlock-banner.fail {
  background: #fff7ed;
  border: 1px solid #f6c98a;
  color: var(--amber);
}
.link-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-family: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover {
  text-decoration: underline;
}

/* Grading */
.grading-state {
  text-align: center;
  padding: 90px 0;
}
.grading-state h2 {
  color: var(--navy);
  margin-bottom: 6px;
}
.spinner {
  width: 46px;
  height: 46px;
  border: 4px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Report */
.report-head {
  padding: 28px 0 0;
}
.scorecard {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 28px;
  margin: 14px 0 26px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.scorecard .score {
  font-family: "DM Serif Display", serif;
  font-size: 2.6rem;
  line-height: 1;
}
.scorecard .out-of {
  color: var(--gold-light);
  font-size: 1.2rem;
}
.scorecard .pct {
  margin-left: auto;
  font-size: 1.1rem;
  color: #cbd5e0;
}

.q-report {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.q-report-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.q-report-head .q-text {
  margin: 0;
  font-weight: 600;
  color: var(--navy);
}
.q-score {
  font-weight: 700;
  white-space: nowrap;
  color: var(--navy);
}
.criterion {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  align-items: start;
}
.criterion:last-child {
  border-bottom: none;
}
.verdict {
  font-weight: 700;
  text-align: center;
}
.verdict.covered {
  color: var(--green);
}
.verdict.partial {
  color: var(--amber);
}
.verdict.missing {
  color: var(--red);
}
.criterion .point {
  font-size: 0.94rem;
}
.criterion .comment {
  font-size: 0.85rem;
  color: var(--light);
  margin-top: 2px;
}
.criterion .marks {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.feedback-block {
  margin-top: 16px;
}
.feedback-block h4 {
  margin: 16px 0 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
}
.feedback-block ul {
  margin: 0;
  padding-left: 20px;
}
.feedback-block li {
  margin-bottom: 4px;
}
.examiner-note {
  background: var(--off-white);
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-top: 16px;
  font-style: italic;
  color: var(--medium);
}
.skipped-tag {
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 600;
}

.muted {
  color: var(--light);
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  background: #fff;
}

@media (max-width: 560px) {
  .scorecard {
    flex-wrap: wrap;
  }
  .scorecard .pct {
    margin-left: 0;
    width: 100%;
  }
}

/* ===== Conceptual Understanding — concept MCQ quiz ===== */
.cquiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cquiz-link {
  background: none;
  border: 0;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
}
.cquiz-link:hover {
  color: var(--gold);
}
.cquiz-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 18px;
}
.cquiz-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--blue));
  border-radius: 999px;
  transition: width 0.3s ease;
}
.cquiz-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.cquiz-chip {
  display: inline-block;
  background: #efeafa;
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.cquiz-q {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 18px;
  line-height: 1.5;
}
.cquiz-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cquiz-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font: inherit;
  color: var(--dark);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cquiz-opt:hover:not(:disabled) {
  border-color: var(--navy);
  background: #faf9fe;
}
.cquiz-opt:disabled {
  cursor: default;
}
.cquiz-key {
  flex: 0 0 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #efeafa;
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
}
.cquiz-opt.correct {
  border-color: var(--green);
  background: #e9f6ef;
}
.cquiz-opt.correct .cquiz-key {
  background: var(--green);
  color: #fff;
}
.cquiz-opt.wrong {
  border-color: var(--red);
  background: #fdecec;
}
.cquiz-opt.wrong .cquiz-key {
  background: var(--red);
  color: #fff;
}
.cquiz-explain {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  border-left: 4px solid var(--navy);
  background: #f6f4fb;
}
.cquiz-explain.ok {
  border-left-color: var(--green);
  background: #e9f6ef;
}
.cquiz-explain.no {
  border-left-color: var(--red);
  background: #fdecec;
}
.cquiz-explain strong {
  display: block;
  margin-bottom: 4px;
}
.cquiz-explain p {
  margin: 0;
  color: var(--medium);
}
.cquiz-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

/* ===== Concept quiz — final verdict ===== */
.cquiz-verdict {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 18px;
}
.cquiz-verdict.great { border-left-color: var(--green); }
.cquiz-verdict.ok    { border-left-color: var(--blue); }
.cquiz-verdict.warn  { border-left-color: var(--amber); }
.cquiz-verdict.bad   { border-left-color: var(--red); }
.cquiz-verdict h3 {
  margin: 0 0 10px;
  font-size: 19px;
  color: var(--dark);
}
.cquiz-verdict p {
  margin: 0;
  color: var(--medium);
  line-height: 1.7;
}
.cquiz-revisit {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.cquiz-revisit h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--dark);
}
.cquiz-revisit ul {
  margin: 0;
  padding-left: 20px;
  color: var(--medium);
}
.cquiz-revisit li { margin: 2px 0; }
.cquiz-revisit.ok h4 { color: var(--green); }

/* ===== Concept strength tracker ===== */
.cstrength {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin-bottom: 22px;
}
.cstrength-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 560px) {
  .cstrength-grid { grid-template-columns: 1fr; }
}
.cstrength-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--light);
}
.cstrength-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin: 2px 0 8px;
}
.cstrength-track {
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.cstrength-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
  background: var(--navy);
}
.cstrength-fill.cov   { background: linear-gradient(90deg, var(--navy), var(--blue)); }
.cstrength-fill.great { background: linear-gradient(90deg, #2f855a, #48bb78); }
.cstrength-fill.ok    { background: linear-gradient(90deg, #5b6fe0, #7c8cf0); }
.cstrength-fill.warn  { background: linear-gradient(90deg, #b7791f, #e0a83a); }
.cstrength-fill.bad   { background: linear-gradient(90deg, #c53030, #e05656); }
.cstrength-reset {
  margin: 12px 0 0;
  background: none;
  border: 1px solid var(--line);
  color: var(--light);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cstrength-reset:hover {
  color: var(--red);
  border-color: var(--red);
}
.cstrength-note {
  margin: 14px 0 0;
  color: var(--medium);
  font-size: 13px;
}
.great-txt { color: var(--green); }
.ok-txt    { color: var(--blue); }
.warn-txt  { color: var(--amber); }
.bad-txt   { color: var(--red); }

/* mini strength bar on subject cards */
.subj-strength {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.subj-strength-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
}
.subj-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.subj-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}
.subj-bar-fill.great { background: linear-gradient(90deg, #2f855a, #48bb78); }
.subj-bar-fill.ok    { background: linear-gradient(90deg, #5b6fe0, #7c8cf0); }
.subj-bar-fill.warn  { background: linear-gradient(90deg, #b7791f, #e0a83a); }
.subj-bar-fill.bad   { background: linear-gradient(90deg, #c53030, #e05656); }
.subj-cov {
  font-size: 12px;
  color: var(--light);
  margin-top: 6px;
}

/* ===== Concept level switcher (Foundation / Intermediate / Final) ===== */
.clevel-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  flex-wrap: wrap;
}
.clevel-tab {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--medium);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.clevel-tab:hover {
  border-color: var(--gold);
}
.clevel-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ===== Concept chapter badges / locked card ===== */
.free-badge,
.lock-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.free-badge {
  color: var(--green);
  background: rgba(47, 133, 90, 0.12);
}
.lock-badge {
  color: var(--gold);
  background: rgba(240, 103, 58, 0.12);
}
.subject-card.locked {
  border-style: dashed;
}
.subject-card.locked .stat {
  color: var(--gold);
  font-weight: 600;
}
.subject-card.ch-done {
  border-color: rgba(47, 133, 90, 0.55);
}
.free-badge.done-badge {
  color: #fff;
  background: var(--green);
}
/* Per-chapter mastery progress bar (chapter cards + quiz results) */
.ch-prog {
  height: 7px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-top: 10px;
}
.ch-prog-fill {
  height: 100%;
  border-radius: 999px;
  width: 0;
  background: linear-gradient(90deg, var(--navy), var(--blue));
  transition: width 0.5s ease;
}
.ch-prog-fill.done {
  background: linear-gradient(90deg, #2f855a, #48bb78);
}
.cquiz-roadmap {
  margin: 16px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.cquiz-roadmap h4 {
  margin: 0 0 4px;
  color: var(--dark);
  font-size: 0.98rem;
}
.cquiz-roadmap p {
  margin: 8px 0 0;
  font-size: 0.85rem;
}
.cquiz-roadmap.done {
  border-color: rgba(47, 133, 90, 0.45);
  background: rgba(47, 133, 90, 0.06);
}
