/* ============================================================
   Etiq Reskill — Production brand stylesheet  (etiq-brand.css)

   Drop-in for a Tailwind v4 + daisyUI v5 project.
   Contains: design tokens + ALL shared component classes used
   across the reskinned pages (navbar, cards, callouts, score
   rings, progress bars, buttons, chat/exercise UI, prose).

   Variants are LOCKED to the chosen defaults (navbar gradient,
   tinted surface, blue accent, gradient score ring). No
   data-attribute switches.

   LOAD ORDER in your Django base template:
     1. Tailwind / daisyUI build
     2. THIS FILE            (so it wins on the cascade)

   See README.md for the daisyUI @plugin theme block — that is
   the biggest lever and removes most purple with zero edits.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

/* ---------- 1. TOKENS — single source of truth ---------- */
:root {
  --navy: #0a2740;
  --navy-2: #103a5c;
  --brand: #1b72c4; /* primary blue            */
  --brand-bright: #38a0ea; /* hover / highlight        */
  --brand-ink: #0e3a60; /* deep text-on-tint        */
  --cyan: #15bccf; /* logo accent              */

  --brand-grad: linear-gradient(135deg, #0e3a60 0%, #1e78c9 56%, #3aa1ea 100%);
  --logo-grad: linear-gradient(140deg, #1ec7d8 0%, #1b72c4 100%);

  --tint: #eef6fd;
  --tint-2: #e3f0fb;
  --tint-border: #cde4f8;

  --ok: #16a36a; /* score good / success     */
  --warn: #e0962a; /* score medium / warning   */
  --bad: #dc4b52; /* score low / error        */
  --gold: #e9a826;
}

html,
body {
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
  background: #eef4fa;
  color: #33475c;
}
* {
  box-sizing: border-box;
}

/* ---------- 2. NAVBAR (shared, gradient) ---------- */
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 6px 24px -10px rgba(10, 39, 64, 0.55);
  position: sticky;
  top: 0;
  z-index: 30;
}
.brandmark {
  display: flex;
  align-items: center;
  gap: 11px;
}
.logo-tile {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, #0b2944, #103a5c);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px -3px rgba(10, 39, 64, 0.5);
  flex: 0 0 auto;
}
.logo-tile img {
  width: 27px;
  height: 27px;
  object-fit: contain;
}
.brandmark .name {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.navlinks {
  display: flex;
  align-items: center;
  gap: 4px;
}
.navlinks a {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.82);
  transition: 0.15s;
  white-space: nowrap;
}
.navlinks a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.navlinks a.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.nav-end {
  display: flex;
  align-items: center;
  gap: 10px;
}
.help-link {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.82);
}
.help-link:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--logo-grad);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

/* ---------- 3. PAGE SCAFFOLD ---------- */
.page {
  width: min(1240px, 94%);
  margin: 0 auto;
  padding: 26px 0 56px;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #7c93aa;
  margin-bottom: 16px;
}
.crumbs a {
  color: var(--brand);
  font-weight: 500;
}
.crumbs a:hover {
  text-decoration: underline;
}
.crumbs .sep {
  color: #c3d3e3;
}

/* ---------- 4. CARDS + GRID ---------- */
.grid-3-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.card {
  background: #fff;
  border: 1px solid #e2edf7;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 12px 40px -28px rgba(16, 58, 92, 0.5);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}
.card-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
}
.card-link:hover {
  text-decoration: underline;
}
.col-span-1 {
  grid-column: span 1;
}
.col-span-2 {
  grid-column: span 2;
}
.row-span-2 {
  grid-row: span 2;
}
@media (max-width: 960px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  .col-span-2,
  .row-span-2 {
    grid-column: span 2;
    grid-row: auto;
  }
}

/* ---------- 5. DASHBOARD HERO / BANNER ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  background: var(--brand-grad);
  border-radius: 20px;
  padding: 26px 30px;
  margin-bottom: 22px;
  box-shadow: 0 18px 44px -26px rgba(10, 39, 64, 0.6);
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1),
    transparent 70%
  );
  pointer-events: none;
}
.greet {
  position: relative;
  z-index: 1;
}
.greet h1 {
  font-size: 29px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.greet p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 5px;
}
.stat-bar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 12px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 14px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
}
.stat .ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.16);
}
.stat .ico svg {
  width: 22px;
  height: 22px;
}
.stat .v {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.stat .l {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 3px;
}

/* ---------- 6. PROGRESS ROWS + BARS ---------- */
.prog-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
}
.prog-row + .prog-row {
  border-top: 1px solid #f1f6fb;
}
.prog-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.prog-ico svg {
  width: 22px;
  height: 22px;
  color: #fff;
}
.pi-1 {
  background: linear-gradient(140deg, #3aa1ea, #1b72c4);
}
.pi-2 {
  background: linear-gradient(140deg, #1ec7d8, #0f9aad);
}
.pi-3 {
  background: linear-gradient(140deg, #5b78ee, #3a55c4);
}
.pi-4 {
  background: linear-gradient(140deg, #16a36a, #0c7d4f);
}
.pi-5 {
  background: linear-gradient(140deg, #f4724a, #c94420);
}
.pi-6 {
  background: linear-gradient(140deg, #b05ee8, #7c30b8);
}
.pi-7 {
  background: linear-gradient(140deg, #f0a030, #c07010);
}
.pi-8 {
  background: linear-gradient(140deg, #e8507a, #b82850);
}
.prog-body {
  flex: 1;
  min-width: 0;
}
.prog-name {
  font-size: 13.5px;
  font-weight: 500;
  color: #33475c;
  margin-bottom: 7px;
}
.bar {
  height: 8px;
  border-radius: 99px;
  background: #e9eff6;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--brand-grad);
}
.bar.done i {
  background: linear-gradient(90deg, #16a36a, #0c7d4f);
}
.prog-pct {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  width: 44px;
  text-align: right;
  flex: 0 0 auto;
}
.prog-pct.zero {
  color: #aebccb;
}

/* ---------- 7. SCORE BLOCKS, GOALS, LEAGUE, QUIZ, ACHIEVEMENTS ---------- */
.score-top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.score-left {
  flex: 0 0 auto;
}
.score-left .lbl {
  font-size: 12.5px;
  color: #8298ad;
  margin-bottom: 6px;
}
.score-num {
  font-size: 40px;
  font-weight: 800;
  color: var(--ok);
  line-height: 1;
}
.score-num span {
  font-size: 18px;
  color: #aebccb;
  font-weight: 600;
}
.score-tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #1c7a51;
  background: #e3f5ec;
  border: 1px solid #c4e9d4;
  padding: 4px 12px;
  border-radius: 99px;
}
.chart {
  flex: 1;
  min-width: 0;
}

.goal {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 0;
}
.goal + .goal {
  border-top: 1px solid #f1f6fb;
}
.goal-ico {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.gi-target {
  background: #e9f1fb;
}
.gi-book {
  background: #e3f5ec;
}
.gi-star {
  background: #fdf4dd;
}
.goal-ico svg {
  width: 20px;
  height: 20px;
}
.goal-body {
  flex: 1;
  min-width: 0;
}
.goal-name {
  font-size: 13.5px;
  font-weight: 500;
  color: #33475c;
  line-height: 1.35;
  margin-bottom: 8px;
}
.goal-foot {
  display: flex;
  align-items: center;
  gap: 10px;
}
.goal-foot .bar {
  flex: 1;
}
.goal-count {
  font-size: 12.5px;
  font-weight: 700;
  color: #6b8298;
  flex: 0 0 auto;
}
.goal-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ok);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.goal-check svg {
  width: 14px;
  height: 14px;
  color: #fff;
}

.league {
  display: flex;
  align-items: center;
  gap: 18px;
}
.league-body {
  flex: 1;
}
.league-sub {
  font-size: 13px;
  color: #6b8298;
  margin-bottom: 8px;
}
.league-rank {
  font-size: 34px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.league-rank span {
  font-size: 18px;
  color: #aebccb;
  font-weight: 600;
}
.league-note {
  font-size: 12.5px;
  color: #8298ad;
  margin: 8px 0 10px;
}
.league-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
}
.league-link:hover {
  text-decoration: underline;
}
.trophy {
  width: 96px;
  height: 104px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.quiz-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  font-size: 13.5px;
}
.quiz-row + .quiz-row {
  border-top: 1px solid #f1f6fb;
}
.quiz-name {
  color: #33475c;
  font-weight: 500;
  flex: 1;
  min-width: 0;
}
.quiz-date {
  color: #9aabbd;
  font-size: 12.5px;
  flex: 0 0 auto;
}
.quiz-score {
  font-weight: 700;
  flex: 0 0 auto;
  width: 48px;
  text-align: right;
}
.qs-good {
  color: var(--ok);
}
.qs-mid {
  color: var(--warn);
}
.qs-low {
  color: var(--bad);
}

.ach-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.ach {
  text-align: center;
  padding: 8px 6px;
  border-radius: 14px;
  transition: 0.15s;
}
.ach:hover {
  background: #f6fafe;
}
.badge {
  margin: 5px 1px;
}
.ach-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.ach-desc {
  font-size: 11.5px;
  color: #8298ad;
  margin-top: 3px;
  line-height: 1.4;
}
.ach.locked .ach-name,
.ach.locked .ach-desc {
  color: #b3c1cf;
}
@media (max-width: 960px) {
  .ach-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- 8. COURSE: layout, lesson sidebar, content card ---------- */
.layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.lessons {
  width: 286px;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid #e2edf7;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 34px -24px rgba(16, 58, 92, 0.5);
  position: sticky;
  top: 84px;
}
.lessons-head {
  padding: 14px 18px;
  background: var(--brand-grad);
  color: #fff;
}
.lessons-head .k {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
  font-weight: 600;
}
.lessons-head .t {
  font-size: 15px;
  font-weight: 600;
  margin-top: 2px;
}
.lesson {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 16px;
  border-bottom: 1px solid #f0f5fa;
  transition: background 0.15s;
  position: relative;
}
.lesson:last-child {
  border-bottom: none;
}
.lesson:hover {
  background: #f6fafe;
}
.lesson.active {
  background: var(--tint);
}
.lesson.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand-grad);
}
.lesson .mark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex: 0 0 auto;
  margin-top: 1px;
  display: grid;
  place-items: center;
}
.lesson .mark.done {
  background: var(--ok);
}
.lesson .mark.done svg {
  width: 12px;
  height: 12px;
  color: #fff;
}
.lesson .mark.todo {
  border: 2px solid #cdd9e6;
}
.lesson .mark.cur {
  background: var(--brand-grad);
}
.lesson .mark.cur svg {
  width: 11px;
  height: 11px;
  color: #fff;
}
.lesson .ttl {
  font-size: 13.5px;
  line-height: 1.4;
  color: #3f5872;
}
.lesson.active .ttl {
  color: var(--brand-ink);
  font-weight: 600;
}
.lesson .type {
  font-size: 11px;
  color: #9aabbd;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.lesson .type .badge-q {
  background: #fdf1dd;
  color: #b9772a;
  font-weight: 600;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 10px;
}

.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.card-c {
  background: #fff;
  border: 1px solid #e2edf7;
  border-radius: 18px;
  padding: 30px 34px;
  box-shadow: 0 12px 40px -28px rgba(16, 58, 92, 0.5);
}
.lesson-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--tint);
  border: 1px solid var(--tint-border);
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 16px;
}
.lesson-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.lesson-meta {
  font-size: 13px;
  color: #8298ad;
  margin-bottom: 24px;
  display: flex;
  gap: 14px;
}
.lesson-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lesson-foot {
  display: flex;
  justify-content: flex-end;
}
.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--brand-grad);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 26px -10px rgba(21, 114, 196, 0.7);
  transition:
    transform 0.12s,
    filter 0.15s;
  text-align: left;
}
.btn-next:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.btn-next .lbl {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.btn-next .lbl small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
}
.btn-next svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* ---------- 9. CALLOUT + VIDEO PLACEHOLDER ---------- */
.callout {
  margin: 20px 0;
  padding: 18px 22px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f0f7fe, #eaf3fc);
  border: 1px solid var(--tint-border);
  border-left: 4px solid var(--brand);
}
.callout h2 {
  margin: 0 0 8px !important;
  font-size: 1.18em;
  color: var(--brand-ink);
}
.callout p {
  margin: 0.5em 0;
  color: #3f5872;
}
.callout p:last-child {
  margin-bottom: 0;
}
.callout .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}

.video-wrap {
  text-align: center;
  margin: 8px 0 6px;
}
.video-ph {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.06) 0 14px,
      transparent 14px 28px
    ),
    var(--brand-grad);
  display: grid;
  place-items: center;
  box-shadow: 0 18px 50px -28px rgba(16, 58, 92, 0.7);
}
.play {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
}
.play svg {
  width: 24px;
  height: 24px;
  color: var(--brand);
  margin-left: 3px;
}
.video-tag {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.04em;
}
.video-cap {
  font-size: 13px;
  color: #7c93aa;
  margin-top: 10px;
}

/* ---------- 10. EXERCISE / CHAT WORKSPACE ---------- */
.work {
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
  font-size: 14px;
}
.chat-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: linear-gradient(180deg, #f3f9fe 0%, #ffffff 22%);
}

.ex-head {
  padding: 14px 26px 12px;
  border-bottom: 1px solid #e7eef6;
  background: #fff;
  position: relative;
}
.ex-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-grad);
}
.ex-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--navy);
  font-size: 15px;
}
.ex-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  background: var(--tint);
  border: 1px solid var(--tint-border);
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.ex-desc {
  color: #5a6f86;
  font-size: 13.5px;
  line-height: 1.6;
  margin-top: 6px;
  /* max-width: 62ch; */
  max-width: 90%;
}
.reset-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #9aabbd;
  padding: 3px 8px;
  border-radius: 7px;
  transition: 0.15s;
}
.reset-btn:hover {
  color: var(--bad);
  background: #fdecec;
}

.msgs {
  flex: 1;
  overflow-y: auto;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.msgs::-webkit-scrollbar {
  width: 10px;
}
.msgs::-webkit-scrollbar-thumb {
  background: #d3e2f1;
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
.turn {
  display: flex;
  gap: 13px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}
.ai-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: 0 0 auto;
  margin-top: 2px;
  background: var(--brand-grad);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px -4px rgba(21, 114, 196, 0.55);
}
.ai-avatar svg {
  width: 17px;
  height: 17px;
  color: #fff;
}
.ai-intro {
  color: #3f5872;
  line-height: 1.65;
  font-size: 14px;
}
.ai-intro .hl {
  color: var(--brand);
  font-weight: 600;
}
.user-row {
  display: flex;
  justify-content: flex-end;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}
.user-bubble {
  max-width: 74%;
  background: var(--brand-grad);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  padding: 12px 17px;
  line-height: 1.55;
  font-size: 14px;
  box-shadow: 0 8px 20px -10px rgba(21, 114, 196, 0.6);
}
.user-bubble.prose p {
  margin: 0;
  color: #fff;
}

.answer-card {
  border: 1px solid #d7e9c9;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px -18px rgba(16, 58, 92, 0.25);
}
.answer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: linear-gradient(90deg, #eaf7e3, #f4fbef);
  border-bottom: 1px solid #dcecce;
  font-weight: 600;
  font-size: 13px;
  color: #2f6b3a;
}
.answer-head .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}
.answer-body {
  padding: 16px 18px;
}
.answer-body .prose {
  font-size: 13.5px;
  color: #33475c;
}

.score-card {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #dbe8f4;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: 0 10px 30px -20px rgba(16, 58, 92, 0.3);
}
.score-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 5px;
}
.score-label svg {
  width: 14px;
  height: 14px;
}
.score-text {
  color: #5a6f86;
  font-size: 12.5px;
  line-height: 1.6;
}
.next-step {
  margin-top: 10px;
  border-radius: 11px;
  padding: 9px 12px;
  background: var(--tint);
  border: 1px solid var(--tint-border);
}
.next-step .lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-ink);
  margin-bottom: 2px;
  letter-spacing: 0.02em;
}
.next-step p {
  font-size: 12px;
  color: #3f6285;
  line-height: 1.55;
}

.composer {
  padding: 10px 26px 20px;
}
.composer-inner {
  max-width: 760px;
  margin: 0 auto;
}
.composer-box {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: #fff;
  border: 1.5px solid #d3e2f1;
  border-radius: 18px;
  padding: 10px 12px 10px 16px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.composer-box:focus-within {
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 4px rgba(56, 160, 234, 0.13);
}
.composer-box textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: #33475c;
  line-height: 1.5;
  max-height: 140px;
  padding: 5px 0;
}
.composer-box textarea::placeholder {
  color: #a9bccf;
}
.send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--brand-grad);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(21, 114, 196, 0.7);
  transition:
    transform 0.12s,
    filter 0.15s;
}
.send-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}
.send-btn:active {
  transform: translateY(0);
}
.send-btn svg {
  width: 17px;
  height: 17px;
  color: #fff;
}
.hint {
  text-align: center;
  font-size: 11px;
  color: #a9bccf;
  margin-top: 8px;
}

/* ---------- 11. EXERCISE SIDEBAR (AI skills overlay) ---------- */
.side {
  width: 340px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid #dde9f4;
  background: linear-gradient(180deg, #eef6fd 0%, #f5fafe 100%);
}
.side-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 18px;
  color: #fff;
  background: var(--brand-grad);
}
.side-head svg {
  width: 17px;
  height: 17px;
}
.side-head .t {
  font-weight: 600;
  font-size: 14.5px;
  flex: 1;
}
.side-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side-body::-webkit-scrollbar {
  width: 9px;
}
.side-body::-webkit-scrollbar-thumb {
  background: #cfe1f2;
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
.panel {
  background: #fff;
  border: 1px solid #e2edf7;
  border-radius: 15px;
  box-shadow: 0 8px 26px -20px rgba(16, 58, 92, 0.4);
}
.side-body {
  overflow-y: scroll;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px 11px;
}
.panel-title {
  font-weight: 600;
  color: var(--navy);
  font-size: 14px;
}
.panel-body {
  padding: 0 16px 16px;
}
.sec-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 4px 0 9px;
}
.sec-label .pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.sec-label.good {
  color: #2f7a4f;
}
.sec-label.good .pip {
  background: var(--ok);
}
.sec-label.improve {
  color: #b9772a;
}
.sec-label.improve .pip {
  background: var(--warn);
}
.feed {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.feed li {
  display: flex;
  gap: 9px;
  font-size: 12px;
  color: #4a6076;
  line-height: 1.5;
  list-style: none;
}
.feed li .ic {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
}
.ic-ok {
  color: var(--ok);
}
.ic-warn {
  color: var(--warn);
}
.ic-bad {
  color: var(--bad);
}
.summary-note {
  font-size: 12px;
  color: #3f6285;
  line-height: 1.55;
  margin: 2px 0 12px;
  background: var(--tint);
  border: 1px solid var(--tint-border);
  border-left: 3px solid var(--brand);
  border-radius: 9px;
  padding: 9px 11px;
}
.coach-italic {
  font-size: 11.5px;
  color: #8298ad;
  font-style: italic;
  line-height: 1.6;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef3f8;
}
.checks-count {
  font-size: 11px;
  color: #fff;
  background: var(--brand);
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
}
.verif-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  color: #4a6076;
  line-height: 1.5;
  padding: 7px 0;
  border-bottom: 1px solid #f1f6fb;
}
.verif-row:last-child {
  border-bottom: none;
}
.verif-row .ic {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
}
.verif-row .sub {
  color: #94a7ba;
}

/* ---------- 12. SCORE RING (paired with JS in README §6) ---------- */
.ring-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
}
.ring-wrap .val {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-wrap .val b {
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  line-height: 1;
}
.ring-wrap .val small {
  font-size: 8px;
  color: #9aabbd;
}
.coach-ring {
  position: relative;
  width: 48px;
  height: 48px;
}
.coach-ring .v {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.coach-ring .v b {
  font-weight: 700;
  font-size: 14px;
  color: var(--brand);
  line-height: 1;
}
.coach-ring .v small {
  font-size: 7px;
  color: #9aabbd;
}

/* ---------- 13. PROSE (lesson + answer body) ---------- */
.prose-c h1 {
  font-size: 1.9em;
  font-weight: 700;
  margin: 0.6em 0;
}
.prose-c h2 {
  font-size: 1.4em;
  font-weight: 700;
  margin: 0.9em 0 0.5em;
  color: var(--navy);
}
.prose-c h3 {
  font-size: 1.12em;
  font-weight: 600;
  margin: 1.1em 0 0.4em;
  color: var(--brand-ink);
}
.prose-c p {
  margin: 0.9em 0;
  line-height: 1.75;
  color: #3f5872;
}
.prose-c strong {
  font-weight: 700;
  color: var(--navy);
}
.prose-c em {
  font-style: italic;
}
.prose-c blockquote {
  margin: 1.1em 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: #0f2a44;
  color: #dce9f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  line-height: 1.6;
  border-left: 4px solid var(--brand-bright);
  box-shadow: 0 10px 30px -18px rgba(16, 58, 92, 0.6);
}
.prose-c blockquote p {
  margin: 0;
  color: #dce9f6;
}

.prose h1 {
  font-size: 2em;
  font-weight: 700;
  margin: 0.67em 0;
}
.prose h2 {
  font-size: 1.5em;
  font-weight: 700;
  margin: 0.75em 0;
}
.prose h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin: 0.83em 0;
}
.prose p {
  margin: 0.85em 0;
  line-height: 1.7;
}
.prose ul {
  list-style-type: disc;
  padding-left: 1.5em;
  margin: 1em 0;
}
.prose ol {
  list-style-type: decimal;
  padding-left: 1.5em;
  margin: 1em 0;
}
.prose li {
  margin: 0.25em 0;
}
.prose strong {
  font-weight: 700;
}
.prose code {
  font-family: monospace;
  background: #eaf2fb;
  padding: 0.1em 0.3em;
  border-radius: 0.25em;
  font-size: 0.875em;
}

/* ---------- 14. ONBOARDING (centered chat wizard) ---------- */
.onboard-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  background:
    radial-gradient(
      1100px 520px at 12% -8%,
      rgba(56, 160, 234, 0.22),
      transparent 60%
    ),
    radial-gradient(
      900px 520px at 100% 110%,
      rgba(21, 188, 207, 0.18),
      transparent 55%
    ),
    linear-gradient(160deg, #eaf4fd 0%, #ffffff 48%, #e9f1fb 100%);
}
.welcome {
  width: min(620px, 100%);
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  border: 1px solid #e6eef7;
  box-shadow:
    0 30px 80px -40px rgba(10, 39, 64, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.6) inset;
}
.w-head {
  background: var(--brand-grad);
  color: #fff;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.w-head .logo-tile {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.w-head .logo-tile img {
  width: 32px;
  height: 32px;
}
.w-head h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.w-head p {
  font-size: 13px;
  font-weight: 300;
  opacity: 0.85;
  margin: 2px 0 0;
}

.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, #f7fbfe, #fff 30%);
}
.chat-area::-webkit-scrollbar {
  width: 9px;
}
.chat-area::-webkit-scrollbar-thumb {
  background: #cfe1f2;
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
.row {
  display: flex;
  gap: 11px;
  align-items: flex-end;
  max-width: 88%;
}
.row.ai {
  align-self: flex-start;
}
.row.me {
  align-self: stretch;
  max-width: 100%;
  display: block;
  text-align: right;
}
.row.me .bubble {
  display: inline-block;
  text-align: left;
  max-width: 88%;
}
.ai-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: linear-gradient(140deg, #0b2944, #103a5c);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px -4px rgba(10, 39, 64, 0.45);
}
.ai-av img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}
.bubble {
  padding: 11px 15px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 16px;
  flex: 0 0 auto;
  max-width: 100%;
}
.bubble.ai {
  background: var(--tint);
  border: 1px solid var(--tint-border);
  color: #33475c;
  border-bottom-left-radius: 5px;
}
.bubble.me {
  background: var(--brand-grad);
  color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow: 0 8px 20px -10px rgba(21, 114, 196, 0.6);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-ink);
  background: #fff;
  border: 1.5px solid var(--tint-border);
  padding: 8px 14px;
  border-radius: 11px;
  cursor: pointer;
  transition: 0.15s;
}
.chip:hover {
  background: var(--tint);
  border-color: var(--brand-bright);
  transform: translateY(-1px);
}
.chip.sel {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
}
.typing {
  display: inline-flex;
  gap: 4px;
  padding: 13px 16px;
  background: var(--tint);
  border: 1px solid var(--tint-border);
  border-radius: 16px;
  border-bottom-left-radius: 5px;
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-bright);
  opacity: 0.5;
  animation: blink 1.2s infinite;
}
.typing i:nth-child(2) {
  animation-delay: 0.2s;
}
.typing i:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.welcome .composer {
  padding: 14px 20px 18px;
  border-top: 1px solid #eef3f8;
  background: #fff;
}
.progress-line {
  height: 5px;
  border-radius: 99px;
  background: #e7eef6;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-line i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--brand-grad);
  transition: width 0.5s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #9aabbd;
  margin: -8px 0 12px;
}
.c-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid #d3e2f1;
  border-radius: 14px;
  padding: 6px 6px 6px 16px;
  transition: 0.15s;
}
.c-box:focus-within {
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 4px rgba(56, 160, 234, 0.13);
}
.c-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: #33475c;
}
.c-box input::placeholder {
  color: #a9bccf;
}
.send {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex: 0 0 auto;
  background: var(--brand-grad);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(21, 114, 196, 0.7);
  transition: 0.12s;
}
.send:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}
.send svg {
  width: 18px;
  height: 18px;
  color: #fff;
}
.send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

/* ---------- 15. ANIM + ESCAPE HATCH ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.anim {
  animation: fadeUp 0.35s ease both;
}

/* score colours, usable directly */
.score-good {
  color: var(--ok);
}
.score-mid {
  color: var(--warn);
}
.score-low {
  color: var(--bad);
}

/* Stop-gap: repaint any leftover hardcoded violet/purple utilities to brand.
   Delete once daisyUI theme + find/replace are done. */
.bg-violet-600,
.bg-violet-700,
.bg-purple-600 {
  background-color: var(--brand) !important;
}
.text-violet-600,
.text-violet-700 {
  color: var(--brand) !important;
}
.border-violet-600 {
  border-color: var(--brand) !important;
}

.mermaid-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.5em 0;
}

.mermaid-figure figcaption {
  margin-top: 0.5em;
  font-size: 0.875em;
  color: #6b7280;
  font-style: italic;
  text-align: center;
}

.mermaid svg {
  display: block;
  margin: 0 auto;
}

/* Override Mermaid's baked-in trebuchet font on all SVG text */
.mermaid svg text,
.mermaid svg .label,
.mermaid svg .nodeLabel,
.mermaid svg .cluster-label span {
  font-family: ui-sans-serif, system-ui, sans-serif !important;
}

/* ---------- 12. WORK MODE ---------- */
.navlinks a.nav-placeholder {
  opacity: 0.45;
  cursor: default;
}
.navlinks a.workmode-link {
  background: #16a36a;
  color: #fff;
  border-radius: 999px;
  padding: 5px 14px;
  font-weight: 600;
}
.navlinks a.workmode-link:hover {
  background: #128a5a;
  color: #fff;
}
.chats-side {
  width: 280px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #dde9f4;
  background: #fbfdff;
}
.chats-side .cs-head {
  padding: 16px 16px 8px;
}
.chats-side .cs-title {
  font-size: 13px;
  font-weight: 700;
  color: #27415c;
}
.newchat-btn {
  display: block;
  margin: 4px 16px 10px;
  padding: 8px 12px;
  border: 1px solid #bcd7ef;
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #1d69b4;
  text-decoration: none;
  background: #fff;
}
.newchat-btn:hover {
  background: #eef6fd;
}
.cs-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px 16px;
}
.cs-empty {
  font-size: 12px;
  color: #8aa0b6;
  padding: 8px;
}
.chat-item {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  text-decoration: none;
}
.chat-item:hover {
  background: #f0f6fc;
}
.chat-item.active {
  background: #e8f2fc;
}
.chat-item .ct {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #27415c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item .cm {
  display: block;
  font-size: 11px;
  color: #8aa0b6;
  margin-top: 2px;
}
.welcome-hero {
  margin: auto;
  text-align: center;
  padding: 40px 20px;
  color: #4a627c;
}
.welcome-hero .welcome-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #16a36a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.welcome-hero h1 {
  font-size: 22px;
  font-weight: 700;
  color: #1d3c5a;
  margin-bottom: 10px;
}
.welcome-hero p {
  font-size: 13.5px;
  line-height: 1.7;
}
