@font-face {
  font-family: "InterVar";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "FrauncesVar";
  src: url("/assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #1c1917;
  --ink-soft: #44403c;
  --muted: #57534e;
  --teal: #c2410c;
  --teal-bright: #9a3412;
  --teal-vivid: #ea580c;
  --teal-deep: #7c2d12;
  --teal-soft: #fff7ed;
  --gold: #a16207;
  --gold-soft: #fef3c7;
  --ivory: #faf9f7;
  --paper: #ffffff;
  --surface-subtle: #f5f5f4;
  --surface-alt: #f5f0eb;
  --line: #e7e5e4;
  --line-strong: #d6d3d1;
  --danger: #b91c1c;
  --success: #15803d;
  --ring: rgba(234, 88, 12, .22);
  --grad-brand: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
  --grad-brand-deep: linear-gradient(140deg, #1c1917 0%, #7c2d12 60%, #c2410c 100%);
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, .04), 0 1px 3px rgba(28, 25, 23, .06);
  --shadow: 0 4px 14px rgba(28, 25, 23, .05), 0 14px 34px rgba(28, 25, 23, .09);
  --shadow-lg: 0 10px 26px rgba(28, 25, 23, .08), 0 30px 66px rgba(28, 25, 23, .13);
  --shadow-brand: 0 8px 22px rgba(194, 65, 12, .22);
  --content-max: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --font-sans: "InterVar", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "FrauncesVar", Georgia, "Times New Roman", serif;
  /* Motion system — one set of easings + durations used site-wide so every
     interactive surface animates with the same feel. */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
  /* Layered hover elevation — additive; refined components opt into it. */
  --shadow-hover: 0 2px 8px rgba(28, 25, 23, .07), 0 18px 40px rgba(28, 25, 23, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--ivory);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; color: var(--ink); }
h1 { letter-spacing: -.02em; line-height: 1.05; }
h2 { letter-spacing: -.015em; line-height: 1.13; }
h3 { letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img, svg, video, iframe { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* Skip-to-content link (WCAG 2.4.1 Bypass Blocks): visually hidden until it
   receives keyboard focus, then pinned to the top-left over all content. */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 2000;
  transform: translateY(-150%); transition: transform 0.15s ease;
  background: var(--teal, #c2410c); color: #fff; text-decoration: none;
  padding: 0.6rem 1rem; border-radius: 8px; font: 600 0.95rem/1 system-ui, sans-serif;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.skip-link:focus { transform: translateY(0); outline: 3px solid #fff; outline-offset: 2px; }
.notice {
  padding: 12px 20px;
  background: var(--teal);
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 400;
}
.site-header {
  min-height: 78px;
  padding: 13px clamp(20px, 5vw, 64px);
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header.minimal { justify-content: space-between; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.brand strong { font-size: 15px; font-weight: 400; letter-spacing: -.02em; }
.desktop-nav {
  display: flex;
  gap: 20px;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}
.desktop-nav a { color: var(--muted); padding: 10px 0; }
.desktop-nav a:hover, .desktop-nav .active, .text-link:hover { color: var(--teal); }
.search-bar {
  margin-left: auto;
  width: min(370px, 32vw);
  height: 48px;
  display: flex;
  border: 1px solid #c4c0bc;
  border-radius: 26px;
  overflow: hidden;
  background: var(--paper);
}
.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0 16px;
  background: transparent;
}
.search-bar button {
  border: 0;
  padding: 0 17px;
  background: transparent;
  color: var(--teal);
  font-size: 12px;
  font-weight: 400;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.header-spacer { flex: 1; }
.text-link { color: var(--muted); font-size: 12px; font-weight: 400; }
.text-link.strong { color: var(--teal); }
/* The `display: inline-flex` below is an author rule, so it outranks the user
   agent's `[hidden] { display: none }` and silently makes the hidden property
   inert on every button and link-button. That has been patched piecemeal at
   least five times (.dashboard-section[hidden], .ab-block[hidden],
   .cw-overlay [hidden], .community-*[hidden]); this restores it once, at the
   source, for anything the rule below touches. */
.primary-link[hidden], .outline-link[hidden], button[hidden] { display: none; }
.primary-link, .outline-link, button {
  border: 1px solid var(--teal);
  border-radius: 10px;
  padding: 13px 24px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: -.01em;
  box-shadow: var(--shadow-sm);
  transition: background .16s ease, border-color .16s ease, transform .12s ease, box-shadow .16s ease;
}
.primary-link:hover, button:hover { background: var(--teal-bright); border-color: var(--teal-bright); box-shadow: 0 8px 20px rgba(194, 65, 12,.24); }
.primary-link:active, .outline-link:active, button:active { transform: translateY(1px); }
.primary-link.compact, .outline-link { padding: 11px 18px; font-size: 12px; }
.outline-link, .outline-button {
  background: var(--paper);
  border: 1px solid var(--teal);
  color: var(--teal);
}
.outline-link:hover, .outline-button:hover { background: var(--teal-soft); color: var(--teal); border-color: var(--teal); }
.primary-link.full { width: 100%; margin: 23px 0 26px; }
.eyebrow {
  color: var(--teal-bright);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 17px;
}
.lead {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.lead.narrow { max-width: 700px; }
.label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .15em;
  font-weight: 400;
  text-transform: uppercase;
}
.subtle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.error { color: var(--danger); font-size: 12px; line-height: 1.45; min-height: 20px; }
.empty-state {
  padding: 23px;
  border: 1px dashed #c5c1bd;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}

.home-hero {
  padding: clamp(54px, 7vw, 88px) clamp(20px, 7vw, 92px);
  display: grid;
  grid-template-columns: minmax(410px, 1.15fr) minmax(340px, .75fr);
  gap: clamp(38px, 7vw, 96px);
  align-items: center;
  background: radial-gradient(circle at 88% 10%, rgba(191, 147, 60, .19), transparent 30%), linear-gradient(135deg, #fffdf7, var(--ivory));
}
.hero-copy h1 {
  max-width: 730px;
  font-size: clamp(31px, 4vw, 48px);
}
.hero-copy .lead { max-width: 670px; margin: 24px 0 32px; }
.hero-search {
  width: min(620px, 100%);
  padding: 7px;
  display: flex;
  background: var(--paper);
  border: 1px solid #c4c0bc;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(28, 25, 23, .06);
}
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0 16px;
  background: transparent;
}
.hero-board {
  padding: 29px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.evidence-line {
  margin: 24px 0 9px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  font-size: 12px;
}
.badge {
  padding: 5px 10px;
  border-radius: 18px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 400;
  text-transform: capitalize;
}
.badge.verified { background: var(--gold-soft); color: #76530c; }
.progress {
  height: 7px;
  border-radius: 10px;
  background: var(--surface-alt);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal-bright);
}
.progress .progress-88 { width: 88%; }
.progress .progress-74 { width: 74%; }
.assessment-ticket {
  display: grid;
  gap: 7px;
  margin-top: 29px;
  padding: 18px;
  border-radius: 9px;
  background: var(--surface-subtle);
}
.assessment-ticket small, .assessment-ticket span { color: var(--muted); font-size: 11px; }
.category-band {
  padding: 18px clamp(20px, 7vw, 92px);
  background: var(--paper);
  border-block: 1px solid var(--line);
  display: flex;
  gap: clamp(17px, 4vw, 42px);
  overflow-x: auto;
  font-size: 12px;
  font-weight: 400;
}
.category-band { align-items: center; }
.category-band a {
  white-space: nowrap;
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.category-band a:hover { color: var(--teal); border-color: var(--teal); background: var(--teal-soft); }
.section { padding: clamp(52px, 6vw, 76px) clamp(20px, 7vw, 92px); }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: clamp(23px, 3.1vw, 31px); }
.section-head.split {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
}
.section-head.centered { max-width: 690px; margin-inline: auto; text-align: center; }
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.course-tile {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.tile-cover {
  height: 126px;
  margin-bottom: 3px;
  padding: 18px;
  display: flex;
  align-items: end;
  background: linear-gradient(125deg, var(--teal), #2c2927);
  border-radius: 7px;
  color: #fff;
  font-size: 11px;
  font-weight: 400;
}
.course-tile h3 { font-size: 14px; line-height: 1.3; }
.tile-description { color: var(--muted); font-size: 12px; line-height: 1.5; min-height: 58px; }
.tile-trainer { color: var(--muted); font-size: 12px; }
.tile-facts { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; }
.tile-facts strong { font-size: 13px; }
.tile-link { color: var(--teal); font-weight: 400; font-size: 12px; margin-top: 5px; }
.outcome-strip {
  padding: clamp(44px, 5vw, 64px) clamp(20px, 7vw, 92px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  color: #fff;
  background: linear-gradient(140deg, var(--ink), #201d1a 62%, #27231f);
}
.outcome-strip > div { display: grid; gap: 13px; align-content: start; }
.outcome-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: rgba(253, 186, 116, .12);
  border: 1px solid rgba(253, 186, 116, .22);
  color: #fed7aa;
}
.outcome-ico svg { width: 26px; height: 26px; }
.outcome-strip strong { display: block; font-size: 14px; font-family: var(--font-display); font-weight: 400; letter-spacing: -.01em; }
.outcome-strip p { color: #c6c2be; line-height: 1.58; font-size: 12px; }
.launch-readiness {
  background:
    radial-gradient(circle at 94% 0%, rgba(191, 147, 60, .14), transparent 21rem),
    linear-gradient(135deg, #fff, #faf9f8);
}
.readiness-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.readiness-grid article {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 35px rgba(28, 25, 23, .06);
}
.readiness-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  box-shadow: 0 8px 18px rgba(194, 65, 12, .26);
}
.readiness-grid h3 {
  margin-bottom: 12px;
  font-size: 14px;
}
.readiness-grid p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.58;
}
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.audience-card {
  padding: clamp(30px, 4vw, 46px);
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.audience-card.dark { background: #f4f1ef; }
.audience-card h2 { font-size: clamp(21px, 2.4vw, 27px); margin-bottom: 17px; }
.audience-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; margin-bottom: 29px; }

.teacher-hero {
  padding: clamp(58px, 8vw, 94px) clamp(20px, 7vw, 92px);
  display: grid;
  grid-template-columns: minmax(410px, 1fr) minmax(330px, .72fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
  background: linear-gradient(135deg, #f9f7f5, #fffdf7);
}
.teacher-hero h1 { font-size: clamp(30px, 3.9vw, 45px); }
.teacher-hero .lead { margin: 23px 0 34px; }
.studio-preview {
  padding: 30px;
  background: var(--paper);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.studio-row {
  margin-top: 20px;
  padding: 15px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.studio-row strong { color: var(--ink); }
.studio-row.highlight { margin-top: 25px; padding: 17px; border: 0; background: var(--gold-soft); border-radius: 8px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature-grid article {
  min-height: 148px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.feature-grid h3 { margin-bottom: 11px; font-size: 14px; }
.feature-grid p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.core-section {
  padding: 0 clamp(20px, 7vw, 92px) clamp(56px, 7vw, 78px);
}
.core-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.core-flow article {
  padding: 24px;
  min-height: 220px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
}
.core-flow span {
  color: #fdba74;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .18em;
}
.core-flow h3 { margin: 24px 0 10px; font-size: 14px; }
.core-flow p { color: #c8c4c1; font-size: 12px; line-height: 1.58; }
.security-boundary {
  margin-top: 17px;
  padding: 22px 25px;
  display: flex;
  align-items: start;
  gap: clamp(20px, 4vw, 42px);
  border: 1px solid #dfd2b2;
  border-radius: 10px;
  background: var(--gold-soft);
}
.security-boundary strong { color: #76530c; white-space: nowrap; }
.security-boundary p { color: #5e5744; font-size: 12px; line-height: 1.57; }
.callout {
  margin: 0 clamp(20px, 7vw, 92px) 72px;
  padding: clamp(30px, 5vw, 54px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  border-radius: 13px;
  color: #fff;
  background: var(--ink);
}
.callout .eyebrow { color: #fdba74; }
.callout h2 { max-width: 650px; font-size: clamp(21px, 2.4vw, 28px); }

.catalog-page { padding: 50px clamp(20px, 5vw, 66px) 72px; }
.page-heading { max-width: 920px; margin-bottom: 43px; }
.page-heading h1 { font-size: clamp(28px, 3.9vw, 41px); margin-bottom: 18px; }
.catalog-layout {
  display: grid;
  grid-template-columns: 210px minmax(370px, 1fr) minmax(295px, 360px);
  gap: 22px;
  align-items: start;
}
.filters, .detail-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.filters h2 { font: 750 17px/1.3 var(--font-sans); margin-bottom: 19px; }
.filters label {
  margin: 14px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
}
.filters input { width: auto; accent-color: var(--teal); }
.filters p { margin-top: 21px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.course-list { display: grid; gap: 13px; }
.catalog-card {
  padding: 21px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
/* Generated cover art bleeds to the card's top edge, spanning both columns. */
.catalog-card-cover {
  grid-column: 1 / -1;
  margin: -21px -21px 2px;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--paper-2, #efebe8);
}
.course-cover { display: block; width: 100%; height: 100%; }
.catalog-card h2 { font: 750 21px/1.3 var(--font-sans); margin: 8px 0; }
.card-price { display: grid; justify-items: end; align-content: start; gap: 19px; }
.card-price strong { font-size: 15px; }
.outline-button { padding: 9px 13px; font-size: 12px; }
.detail-panel { position: sticky; top: 18px; }
.detail-panel h2 { font: 750 25px/1.27 var(--font-sans); }
.detail-price { margin: 17px 0 9px; font-size: 18px; font-weight: 400; }
.detail-description { margin-top: 17px; color: var(--muted); font-size: 12px; line-height: 1.58; }
.syllabus { border-top: 1px solid var(--line); padding-top: 21px; }
.syllabus h3 { margin-bottom: 12px; font-size: 13px; }
.syllabus-row { padding: 12px 0; display: grid; gap: 5px; border-bottom: 1px solid var(--line); font-size: 12px; }
.syllabus-row span, .syllabus-row small { color: var(--muted); }

.auth-body { background: var(--surface-subtle); }
.auth-layout {
  min-height: calc(100vh - 78px);
  padding: clamp(42px, 7vw, 80px) clamp(20px, 10vw, 126px);
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: clamp(40px, 9vw, 120px);
  align-items: center;
}
.auth-promise h1 { max-width: 620px; font-size: clamp(28px, 3.4vw, 40px); }
.auth-promise .lead { margin: 25px 0 36px; max-width: 600px; }
.auth-list { display: grid; gap: 14px; }
.auth-list span { padding-left: 32px; position: relative; color: var(--ink-soft); font-weight: 400; }
.auth-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 13l4 4L19 7'/></svg>") center / 13px no-repeat;
}
.login-card {
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.login-card h2 { margin-bottom: 7px; font-size: 24px; }
.form-stack { margin-top: 27px; display: grid; gap: 18px; }
.form-stack label, .form-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--ink);
  background: var(--paper);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: #a9a39d; }
input:hover, textarea:hover, select:hover { border-color: #c1bdba; }
textarea { min-height: 83px; resize: vertical; }
input:focus, textarea:focus, select:focus,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--teal-bright);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, .18);
}
input:disabled, textarea:disabled, select:disabled, button:disabled { opacity: .55; cursor: not-allowed; }
.security-note {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.account-links {
  margin-top: 20px;
  display: grid;
  gap: 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 400;
}
.account-top-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 400;
}
.registration-choice {
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(46px, 7vw, 76px) 22px 72px;
  text-align: center;
}
.registration-choice h1 {
  margin-bottom: 18px;
  font-size: clamp(28px, 3.5vw, 39px);
}
.registration-choice > .lead {
  max-width: 770px;
  margin: 0 auto 39px;
}
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  text-align: left;
}
.choice-card {
  padding: clamp(26px, 4vw, 35px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.choice-card.teacher-choice { border-top: 4px solid var(--gold); }
.choice-card h2 { margin-bottom: 13px; font-size: 22px; }
.choice-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.choice-list {
  min-height: 126px;
  margin: 23px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 12px;
  font-weight: 400;
}
.teacher-application-layout {
  grid-template-columns: minmax(335px, .86fr) minmax(520px, 610px);
  align-items: start;
}
.teacher-application-card { padding: clamp(26px, 3vw, 35px); }
.privacy-callout {
  margin-top: 35px;
  padding: 16px 18px;
  border: 1px solid #d9c99e;
  border-radius: 8px;
  background: var(--gold-soft);
  color: #5e5744;
  font-size: 12px;
  line-height: 1.55;
}
.success-message {
  color: var(--success);
  font-size: 12px;
  line-height: 1.45;
}
.secondary-form { padding-top: 22px; border-top: 1px solid var(--line); }
.secondary-form h3 { font-size: 14px; }
.account-result { min-height: calc(100vh - 78px); }
.account-result .primary-link { margin-top: 22px; }

.dashboard-body { background: var(--surface-subtle); }
.dashboard-header {
  height: 72px;
  padding: 10px clamp(18px, 3vw, 34px);
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.dashboard-header .brand img { width: 45px; height: 45px; }
.portal-label {
  padding: 6px 12px;
  border-radius: 16px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 400;
}
.portal-label.teacher { background: var(--gold-soft); color: #79580e; }
.session-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 12px; font-weight: 400; }
.ghost {
  padding: 9px 14px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
}
.ghost:hover { background: var(--surface-alt); color: var(--ink); border-color: var(--line); }
.dashboard-shell { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 238px minmax(0, 1fr); align-items: start; }
.dashboard-nav {
  position: sticky;
  top: 72px;
  min-height: calc(100vh - 72px);
  max-height: calc(100vh - 72px);
  padding: 29px 16px;
  display: grid;
  align-content: start;
  gap: 6px;
  border-right: 1px solid var(--line);
  background: var(--paper);
  overflow-y: auto;
}
.dashboard-nav a {
  padding: 12px 13px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.dashboard-nav a:hover, .dashboard-nav a.selected { color: var(--teal); background: var(--teal-soft); }
.dashboard-main { padding: 37px clamp(20px, 4vw, 45px) 50px; min-width: 0; display: grid; gap: 18px; align-content: start; }
.dashboard-main.standalone { max-width: 1080px; margin: auto; display: grid; gap: 22px; }
.dashboard-main.admin-control { max-width: 1240px; }
.admin-lead { max-width: 870px; }
.dashboard-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}
.dashboard-title h1, .dashboard-main.standalone h1 { font-size: clamp(22px, 3.1vw, 29px); }
.dashboard-message {
  min-height: 0;
  padding: 0;
  font-size: 12px;
}
.dashboard-section {
  display: grid;
  gap: 16px;
}
.dashboard-section[hidden] { display: none !important; }
.dashboard-overview .stat-grid { margin-bottom: 0; }
.dashboard-message.success, .dashboard-message.failed {
  padding: 12px 15px;
  border-radius: 7px;
}
.dashboard-message.success { color: var(--success); background: #e7f5ed; }
.dashboard-message.failed { color: var(--danger); background: #fff0ec; }
.stat-grid {
  margin-bottom: 23px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
}
.stat-card {
  padding: 18px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}
.stat-card span { color: var(--muted); font-size: 11px; font-weight: 400; }
.stat-card strong { font-size: 18px; }
.dashboard-columns {
  display: grid;
  grid-template-columns: 1.15fr .86fr;
  gap: 16px;
  align-items: start;
}
.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.panel.wide { grid-column: 1; grid-row: span 2; }
.panel-head { margin-bottom: 18px; }
.panel-head h2, .panel > h2 { font: 750 20px/1.3 var(--font-sans); }
.panel-description { margin: 10px 0 17px; }
.dashboard-record {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.dashboard-record:last-child { border-bottom: 0; padding-bottom: 0; }
.dashboard-record h3 { font-size: 12px; margin-bottom: 5px; }
.record-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.status-pill {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.status-pill.pending, .status-pill.fail-closed { background: var(--gold-soft); color: #76530c; }
.status-pill.refunded, .status-pill.failed, .status-pill.cancelled { background: #fff0ec; color: var(--danger); }
.record-row, .record-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.record-actions { justify-content: start; margin-top: 12px; }
.application-review {
  display: grid;
  gap: 9px;
}
.application-review h3 { font-size: 14px; }
.application-title { color: var(--teal); font-size: 12px; }
.application-label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 400;
  text-transform: uppercase;
}
.application-copy { color: var(--ink); font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.application-links { display: flex; gap: 18px; margin-top: 7px; }
.decline-button { border-color: #c89c93; color: var(--danger); }
.decline-button:hover { border-color: #c89c93; color: var(--danger); background: #fff0ec; }
.text-button {
  padding: 9px 11px;
  background: transparent;
  border-color: transparent;
  color: var(--teal);
  font-size: 12px;
}
.text-button:hover { background: var(--teal-soft); border-color: transparent; color: var(--teal); }
.compact-record button { margin-top: 12px; }
.timeline-item {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.timeline-item:last-child { border-bottom: 0; }
.timeline-item span { color: var(--muted); font-size: 12px; }
.control-grid, .work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.control-card, .work-card {
  padding: 15px;
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-subtle);
}
.control-card strong { overflow-wrap: anywhere; }
.work-card.needs-action { border-color: #dec58f; background: #fffaf0; }
.work-count { color: var(--teal); font: 800 28px/1 var(--font-sans); }
.contract-record, .transaction-record { display: grid; gap: 7px; }
.learning-detail, .attempt-form {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}
.action-record, .lab-record {
  padding: 13px;
  display: grid;
  gap: 9px;
  border-radius: 7px;
  background: var(--surface-subtle);
  font-size: 12px;
}
.action-record span, .lab-record span { color: var(--muted); }
.action-record button, .lab-record button { width: max-content; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; margin-top: 9px; }
.question-block {
  margin: 0;
  padding: 13px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.question-block legend { font-size: 12px; font-weight: 400; padding: 0 7px; }
.answer-option { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.answer-option input { width: auto; }
.question-block .subtle { font-size: 11px; color: var(--muted); }
.match-row { display: flex; gap: 9px; align-items: center; }
.match-row .match-prompt { flex: 1; font-size: 12px; color: var(--ink, inherit); }
.match-row .match-select { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 13px; box-sizing: border-box; }
.order-row { display: flex; gap: 9px; align-items: center; }
.order-row .order-pos { width: 56px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: 13px; box-sizing: border-box; text-align: center; }
.order-row .order-label { flex: 1; font-size: 12px; color: var(--ink, inherit); }
.teacher-columns { grid-template-columns: 1fr 1fr; }
.workflow-list { display: grid; gap: 12px; }
.workflow-list span {
  padding: 12px 12px 12px 36px;
  position: relative;
  border-radius: 6px;
  background: var(--surface-subtle);
  font-size: 12px;
  font-weight: 400;
}
.workflow-list span::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 11px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8741f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 13l4 4L19 7'/></svg>") center / 11px no-repeat;
}
.form-panel .form-stack { margin-top: 0; }
.compact-form button { margin-top: 3px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid button { align-self: end; }
.studio-picker {
  margin-bottom: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.studio-summary {
  margin-bottom: 22px;
  display: grid;
  gap: 7px;
}
.media-library {
  margin-bottom: 22px;
  display: grid;
  gap: 9px;
}
.media-library h3 { margin-bottom: 4px; font-size: 13px; }
.media-line {
  padding: 12px 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.media-line strong { display: block; margin-bottom: 5px; font-size: 12px; }
.media-line span { color: var(--muted); font-size: 11px; }
.media-controls { display: flex; align-items: center; gap: 10px; }
.media-controls .badge { color: var(--teal); }
.upload-progress {
  width: 100%;
  height: 10px;
  accent-color: var(--teal);
}
.topic-line {
  padding: 11px 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface-subtle);
  border-radius: 7px;
  font-size: 12px;
}
.topic-line span { color: var(--muted); }
.content-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 23px;
}
.content-forms .form-stack {
  margin-top: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.content-forms h3 { font-size: 13px; }
.content-forms .processing-form {
  grid-column: 1 / -1;
  border-color: #e0dddb;
  background: var(--surface-subtle);
}
.processing-form .subtle { line-height: 1.55; }
.checkbox-line {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  font-weight: 400 !important;
}
.checkbox-line input {
  width: auto;
  height: auto;
  margin: 0;
  accent-color: var(--teal);
}
.billing-note {
  padding: 11px 12px;
  border-radius: 7px;
  background: var(--gold-soft);
}
.media-meta {
  display: block;
  margin-top: 5px;
}
.wallet-balance { margin-bottom: 8px; color: var(--teal); font-size: 21px; font-weight: 400; }
.chat-grid {
  display: grid;
  grid-template-columns: minmax(190px, .36fr) 1fr;
  gap: 18px;
}
.conversation-button {
  width: 100%;
  margin-bottom: 8px;
  padding: 11px 12px;
  justify-content: start;
  background: var(--surface-subtle);
  border-color: var(--line);
  color: var(--ink);
  font-size: 12px;
}
.conversation-button:hover { color: var(--teal); background: var(--teal-soft); border-color: var(--line); }
.chat-thread {
  min-height: 118px;
  max-height: 310px;
  padding: 13px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}
.chat-message { margin-bottom: 10px; padding: 10px; border-radius: 7px; background: var(--paper); }
.chat-message strong { display: block; margin-bottom: 5px; font-size: 11px; color: var(--teal); }
.chat-message p { font-size: 12px; line-height: 1.5; }
.review-form {
  margin-top: 15px;
  padding: 14px;
  display: grid;
  gap: 10px;
  border-radius: 8px;
  background: var(--surface-subtle);
}
.review-form strong { font-size: 12px; }

.course-page, .profile-page {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 66px) clamp(20px, 4vw, 42px) 70px;
}
.course-hero {
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
}
.course-hero h1, .profile-hero h1 { margin-bottom: 18px; font-size: clamp(27px, 3.9vw, 39px); }
.course-hero .lead { margin-bottom: 18px; }
.enrol-card {
  padding: 27px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.course-price { display: block; margin-bottom: 15px; font-size: 22px; }
.full-button { width: 100%; margin-top: 10px; }
.course-columns {
  display: grid;
  grid-template-columns: 1fr .85fr;
  gap: 18px;
  align-items: start;
}
.course-section h2 { margin-bottom: 12px; }
.course-section > .subtle { margin-bottom: 14px; }
.review { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 7px; }
.review small { color: var(--muted); }
.profile-hero {
  max-width: 780px;
  margin-bottom: 42px;
}
.profile-background { margin-top: 18px; color: var(--muted); line-height: 1.7; }
.profile-links { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 11px; align-items: center; }
.profile-courses { display: grid; gap: 13px; }
.profile-courses h2 { margin-bottom: 10px; }

.site-footer {
  padding: 28px clamp(20px, 7vw, 92px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
}
.site-footer nav { display: flex; gap: 23px; font-weight: 400; }
.footer-brand img { width: 38px; height: 38px; }
.site-footer.simple a { color: var(--teal); font-weight: 400; }
.policy-page {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(42px, 8vw, 78px) 22px 76px;
}
.policy-page h1 { margin: 8px 0 14px; }
.policy-page .lead { margin-bottom: 34px; }
.policy-section {
  padding: 25px 0;
  border-top: 1px solid var(--line);
}
.policy-section h2 { margin-bottom: 12px; font-size: 18px; }
.policy-section p, .policy-section li { color: var(--muted); line-height: 1.65; }
.policy-section ul { margin: 12px 0 0; padding-left: 20px; }

@media (max-width: 1150px) {
  .header-actions .text-link { display: none; }
  .home-hero, .teacher-hero { grid-template-columns: 1fr; }
  .hero-board, .studio-preview { max-width: 560px; }
  .catalog-layout { grid-template-columns: minmax(350px, 1fr) minmax(290px, 350px); }
  .filters { display: none; }
}
@media (max-width: 880px) {
  .site-header { flex-wrap: wrap; }
  .desktop-nav { display: none; }
  .search-bar { order: 4; width: 100%; margin-left: 0; }
  .outcome-strip, .feature-grid, .audience-grid, .core-flow, .readiness-grid { grid-template-columns: 1fr 1fr; }
  .catalog-layout, .auth-layout, .dashboard-columns, .teacher-columns, .content-forms, .course-hero, .course-columns, .chat-grid, .teacher-application-layout { display: block; }
  .detail-panel { position: static; margin-top: 18px; }
  .dashboard-shell { grid-template-columns: minmax(112px, 30vw) minmax(0, 1fr); }
  .dashboard-nav {
    top: 0;
    min-height: 100vh;
    max-height: 100vh;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding: 13px 10px;
  }
  .panel { margin-bottom: 16px; }
  .content-forms .form-stack { margin-bottom: 16px; }
  .chat-thread { margin-top: 16px; }
}
@media (max-width: 580px) {
  .notice { font-size: 11px; }
  .brand strong { font-size: 14px; }
  .brand img { width: 42px; height: 42px; }
  .header-actions .outline-link { display: none; }
  .hero-copy h1, .teacher-hero h1 { font-size: 27px; }
  .hero-search { display: grid; gap: 8px; }
  .hero-search input { height: 46px; }
  .outcome-strip, .feature-grid, .audience-grid, .core-flow, .readiness-grid { grid-template-columns: 1fr; }
  .section-head.split, .callout, .dashboard-title, .record-row { display: block; }
  .callout .primary-link, .dashboard-title .outline-link { margin-top: 22px; }
  .catalog-card { grid-template-columns: 1fr; }
  .card-price { justify-items: start; }
  .form-grid { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr; }
  .security-boundary { display: block; }
  .security-boundary p { margin-top: 10px; }
  .site-footer { display: grid; }
}

@media (max-width: 880px) {
  .site-header {
    min-height: 0;
    padding-block: 11px;
    gap: 12px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .section, .catalog-page, .course-page, .profile-page, .policy-page, .registration-choice {
    padding-inline: 18px;
  }
  .home-hero, .teacher-hero, .auth-layout {
    padding-inline: 18px;
  }
  .hero-board, .studio-preview, .login-card, .choice-card, .teacher-application-card, .enrol-card {
    box-shadow: 0 12px 30px rgba(28, 25, 23, .08);
  }
  .dashboard-header {
    height: auto;
    min-height: 68px;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 10px 14px;
  }
  .dashboard-header .brand {
    min-width: 0;
  }
  .dashboard-header .brand strong,
  .session-actions span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .portal-label {
    order: 3;
  }
  .session-actions {
    margin-left: auto;
    max-width: 58vw;
    gap: 10px;
  }
  .dashboard-main {
    padding: 22px 16px 38px;
  }
  .dashboard-main.standalone {
    width: 100%;
    max-width: none;
    padding-inline: 16px;
  }
  .dashboard-nav {
    position: sticky;
    top: 0;
    z-index: 6;
    gap: 8px;
    scroll-snap-type: y proximity;
    -webkit-overflow-scrolling: touch;
  }
  .dashboard-nav a {
    scroll-snap-align: start;
    white-space: normal;
    line-height: 1.25;
  }
  .panel {
    padding: 18px;
  }
  .stat-grid, .control-grid, .work-grid {
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  }
  .media-line, .topic-line, .studio-row {
    align-items: flex-start;
  }
  .media-line {
    flex-wrap: wrap;
  }
  .media-controls {
    width: 100%;
    justify-content: space-between;
  }
  .chat-thread {
    max-height: 42vh;
  }
  .site-footer {
    align-items: start;
  }
  .site-footer nav {
    flex-wrap: wrap;
    gap: 12px 18px;
  }
}

@media (max-width: 580px) {
  .notice {
    padding-inline: 14px;
    line-height: 1.45;
  }
  .site-header {
    padding-inline: 14px;
  }
  .site-header.minimal {
    justify-content: flex-start;
  }
  .site-header.minimal > .text-link, .account-top-links {
    width: 100%;
  }
  .account-top-links {
    flex-wrap: wrap;
    gap: 10px 18px;
  }
  .brand {
    gap: 8px;
  }
  .search-bar {
    height: 44px;
    border-radius: 10px;
  }
  .header-actions .primary-link,
  .header-actions .outline-link,
  .header-actions .text-link {
    flex: 1 1 auto;
  }
  .hero-copy, .teacher-hero > *, .auth-promise, .page-heading, .registration-choice {
    width: 100%;
    min-width: 0;
  }
  .hero-copy h1, .teacher-hero h1, .page-heading h1, .registration-choice h1, .auth-promise h1 {
    max-width: 100%;
    font-size: clamp(21px, 6.5vw, 24px);
    line-height: 1.12;
    overflow-wrap: break-word;
  }
  .course-hero h1, .profile-hero h1 {
    max-width: 100%;
    font-size: clamp(21px, 6.5vw, 24px);
    line-height: 1.12;
    overflow-wrap: break-word;
  }
  .lead {
    font-size: 13px;
    line-height: 1.58;
  }
  .readiness-grid article {
    min-height: 0;
    padding: 19px;
  }
  .section, .catalog-page, .course-page, .profile-page, .policy-page, .registration-choice {
    padding-inline: 14px;
  }
  .home-hero, .teacher-hero, .auth-layout {
    padding: 36px 14px;
  }
  .hero-board, .studio-preview, .login-card, .choice-card, .teacher-application-card, .enrol-card,
  .filters, .detail-panel, .catalog-card, .panel {
    padding: 16px;
    border-radius: 10px;
  }
  .tile-facts, .studio-row, .media-line, .topic-line, .application-links, .record-actions {
    display: grid;
    justify-content: stretch;
  }
  .catalog-card {
    gap: 16px;
  }
  .dashboard-header {
    padding: 9px 12px;
  }
  .dashboard-header .brand img {
    width: 38px;
    height: 38px;
  }
  .portal-label {
    padding: 5px 10px;
    font-size: 11px;
  }
  .session-actions {
    width: 100%;
    max-width: none;
    margin-left: 0;
    justify-content: space-between;
  }
  .session-actions span {
    max-width: calc(100vw - 128px);
  }
  .ghost {
    padding: 8px 11px;
  }
  .dashboard-shell {
    grid-template-columns: 104px minmax(0, 1fr);
  }
  .dashboard-nav {
    padding: 8px 7px;
  }
  .dashboard-nav a {
    padding: 10px 8px;
    font-size: 11px;
  }
  .dashboard-main {
    padding: 18px 12px 32px;
  }
  .dashboard-title {
    margin-bottom: 18px;
  }
  .dashboard-title h1, .dashboard-main.standalone h1 {
    font-size: clamp(21px, 7vw, 25px);
  }
  .stat-grid, .control-grid, .work-grid {
    grid-template-columns: 1fr;
  }
  .stat-card strong, .work-count {
    font-size: 17px;
  }
  .record-heading {
    display: grid;
    gap: 8px;
    justify-content: stretch;
  }
  .status-pill {
    width: max-content;
    max-width: 100%;
  }
  .record-actions button, .action-record button, .lab-record button,
  .compact-form button, .form-grid button {
    width: 100%;
  }
  .content-forms .form-stack {
    padding: 16px;
  }
  .application-copy, .dashboard-record, .timeline-item, .control-card, .work-card,
  .chat-message, .subtle, .lead, .panel-description {
    overflow-wrap: anywhere;
  }
  .chat-grid {
    gap: 12px;
  }
  .chat-thread {
    min-height: 180px;
    max-height: 48vh;
  }
  .auth-list span {
    line-height: 1.45;
    overflow-wrap: break-word;
  }
  .conversation-button {
    white-space: normal;
  }
  .site-footer {
    padding-inline: 14px;
  }
}

@media (max-width: 390px) {
  .primary-link, .outline-link, button {
    padding-inline: 14px;
  }
  .brand strong {
    font-size: 13px;
  }
  .dashboard-header .brand strong {
    max-width: 112px;
  }
  .panel-head h2, .panel > h2 {
    font-size: 14px;
  }
}

/* --- Instructor studio: upload, Q&A, design, promotions (2026-06-13) --- */
#media-progress { width: 100%; height: 10px; margin: .4rem 0; }
.qa-card { display: grid; gap: .5rem; padding: 1rem 1.1rem; }
.qa-card textarea { min-height: 64px; }
.video-qa { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--ivory); display: grid; gap: .75rem; }
.video-qa h4 { margin: 0; color: var(--teal); }
.video-qa-list { display: grid; gap: .6rem; }
.video-qa-item { padding: .6rem .8rem; border-left: 3px solid var(--course-accent, var(--teal)); background: var(--paper); border-radius: 8px; }
.video-qa-time { font-size: .7rem; font-weight: 400; color: var(--course-accent, var(--teal)); }
.video-qa-answer { margin: .35rem 0 0; padding: .5rem .7rem; background: var(--teal-soft); border-radius: 8px; }
.video-qa-form textarea { min-height: 56px; }

/* Friendly Q&A (Tutor-style threaded UI) */
.qa-avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 400; font-size: 12px; background: var(--teal); }
.qa-avatar.instructor { background: var(--teal); color: #ffd86b; }
.qa-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.qa-tabs { display: inline-flex; gap: 4px; background: var(--teal-soft); padding: 3px; border-radius: 999px; }
.qa-tab { border: none; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 400; font-size: 12px; color: var(--muted); cursor: pointer; }
.qa-tab.active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.qa-search { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13px; min-width: 200px; }
.qa-list { display: grid; gap: 12px; }
.qa-thread { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface, #fff); display: grid; gap: 8px; }
.qa-head { display: flex; align-items: center; gap: 10px; }
.qa-who { display: grid; flex: 1 1 auto; line-height: 1.3; }
.qa-name { font-weight: 400; font-size: 13px; }
.qa-meta { font-size: 11px; color: var(--muted); }
.qa-badge { font-size: 10px; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.qa-badge.open { background: #fef3c7; color: #92400e; }
.qa-badge.answered { background: #ffedd5; color: #c2410c; }
.qa-question { margin: 0; font-size: 14px; line-height: 1.5; }
.qa-reply { display: flex; gap: 10px; margin-top: 2px; padding: 10px 12px; background: var(--teal-soft); border-radius: 0 12px 12px 12px; }
.qa-reply-body { display: grid; gap: 2px; }
.qa-reply-body p { margin: 0; font-size: 13px; line-height: 1.5; }
.qa-answer-form { display: grid; gap: 8px; margin-top: 4px; }
.qa-answer-form textarea { min-height: 56px; }
.qa-panel { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--ivory); display: grid; gap: 12px; }
.qa-panel-head { display: flex; align-items: baseline; gap: 8px; }
.qa-panel-head h4 { margin: 0; }
.qa-count { font-size: 12px; color: var(--muted); background: var(--teal-soft); border-radius: 999px; padding: 1px 9px; font-weight: 400; }
.qa-ask { display: flex; gap: 10px; align-items: flex-start; }
.qa-ask-body { flex: 1 1 auto; display: grid; gap: 8px; }
.qa-ask-body textarea { min-height: 52px; }
.qa-ask-row { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.qa-fc-input { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.qa-fc-input input { width: 64px; }
@media (max-width: 560px) { .qa-search { min-width: 0; flex: 1 1 auto; } }
/* Full thread: titles, unread, star/archive, follow-ups */
.qa-thread.unread { box-shadow: inset 3px 0 0 var(--teal); }
.qa-title { margin: 0; font-size: 14px; font-weight: 400; }
.qa-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.qa-badge.solved { background: var(--teal-soft); color: var(--teal); }
.qa-actions { display: inline-flex; gap: 4px; }
.qa-icon-btn { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 3px 8px; font-size: 11px; font-weight: 400; color: var(--muted); cursor: pointer; }
.qa-icon-btn.on { color: #d97706; border-color: #d97706; }
.qa-unread-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); margin-left: 6px; vertical-align: middle; }
.qa-thread-replies { display: grid; gap: 8px; }
.qa-reply.student { background: var(--paper, #f5f3f1); border-radius: 12px 0 12px 12px; flex-direction: row-reverse; }
.qa-mine-actions { display: grid; gap: 8px; }
.qa-reply-form { display: flex; gap: 8px; align-items: flex-start; }
.qa-reply-form textarea { flex: 1 1 auto; min-height: 40px; }
.qa-title-input { font-weight: 400; }

/* Course-creation wizard (questionnaire) */
.wizard-landing { display: grid; gap: 12px; justify-items: start; padding: 8px 0; }
.wizard { display: grid; gap: 16px; }
.wizard-step-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 400; margin: 0; }
.wizard-progress { display: flex; gap: 6px; }
.wizard-dot { flex: 1 1 auto; height: 5px; border-radius: 999px; background: var(--line); }
.wizard-dot.active { background: var(--teal); }
.wizard-dot.done { background: var(--teal); opacity: .5; }
.wizard-body { display: grid; gap: 10px; min-height: 150px; align-content: start; }
.wizard-q { margin: 0; font-size: 20px; font-weight: 400; letter-spacing: -.01em; }
.wizard-hint { margin: -4px 0 4px; }
.wizard-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 400; margin-top: 6px; }
.wizard-input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font-size: 15px; box-sizing: border-box; }
.wizard-textarea { min-height: 110px; resize: vertical; }
.wizard-emoji { width: 90px; font-size: 22px; text-align: center; }
.wizard-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wizard-chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 16px; font-weight: 400; font-size: 13px; cursor: pointer; }
.wizard-chip.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.wizard-footer { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.wizard-spacer { flex: 1 1 auto; }
.wizard-summary { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--teal-soft); }
.wizard-summary-row { display: flex; gap: 12px; }
.wizard-summary-k { flex: 0 0 90px; color: var(--muted); font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; }
.wizard-summary-v { flex: 1 1 auto; font-size: 14px; }
.wizard-resume { margin-top: 8px; }

/* Quiz question types (builder + taking) */
.q-type-label { font-size: 11px; color: var(--muted); font-weight: 400; text-transform: uppercase; letter-spacing: .03em; }
.q-type { margin-bottom: 4px; }
.q-body { display: grid; gap: 8px; }
.q-accepted, .answer-text { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 14px; }
.ai-gen { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 6px 0; background: var(--teal-soft, #f9f8f7); }
.ai-gen summary { cursor: pointer; font-weight: 400; font-size: 13px; }
.ai-gen textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 13px; resize: vertical; margin: 8px 0; }
.ai-gen .ai-count-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.ai-gen .ai-count-label input { width: 64px; }
.ai-gen #ai-generate { margin-left: 10px; }
.q-pairs, .q-order { display: grid; gap: 6px; }
.q-pair { display: flex; gap: 7px; align-items: center; }
.q-pair-left, .q-pair-right { flex: 1; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 13px; }
.q-pair-arrow { flex: 0 0 auto; color: var(--muted); font-size: 13px; }
.q-order-row { display: flex; gap: 7px; align-items: center; }
.q-order-num { flex: 0 0 auto; width: 22px; text-align: right; color: var(--muted); font-size: 12px; font-weight: 400; }
.q-order-input { flex: 1; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 13px; }
.q-add-row { width: max-content; font-size: 12px; padding: 5px 10px; }
/* Image question types (builder + taking) */
.q-images { display: grid; gap: 8px; }
.q-image-pair { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.q-image-file { flex: 1 1 160px; font-size: 12px; }
.q-image-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.q-image-answer, .q-image-accepted, .q-image-prompt { flex: 1 1 150px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 13px; }
.answer-img-label, .match-row .match-prompt { font-size: 14px; }
.quiz-image { max-width: 220px; max-height: 160px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); display: block; }
.answer-img-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.answer-img-input { flex: 1 1 160px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; }

/* Continue with Google (social login) */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted, #69635d); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line, #e7e5e4); }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; box-sizing: border-box;
  border: 1px solid var(--line, #dcdad8); border-radius: 10px; background: var(--paper); color: var(--ink, #433f3c); font-weight: 400; font-size: 14px;
  padding: 11px 14px; text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s; }
.google-btn:hover { background: var(--surface-subtle, #f9f8f7); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.google-btn svg { flex: 0 0 auto; }
.match-row .quiz-image { flex: 0 0 auto; }

/* Essay (open_ended) + gradebook + result feedback */
.answer-essay { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 14px; resize: vertical; }
.assess-badge { display: inline-block; font-size: 11px; font-weight: 400; padding: 3px 9px; border-radius: 999px; margin: 4px 0; }
.assess-badge.pending { background: #fff4e0; color: #9a6400; }
.assess-badge.pass { background: #e3f6ea; color: #1c7a45; }
.assess-badge.fail { background: #fde7e7; color: #b13535; }
.gradebook-h { font-size: 13px; margin: 14px 0 6px; }
.gradebook-row { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; display: grid; gap: 8px; }
.gradebook-row-head { display: grid; gap: 2px; }
.gradebook-score { font-size: 12px; font-weight: 400; }
.gradebook-score.pass { color: #1c7a45; }
.gradebook-score.fail { color: #b13535; }
.grade-sheet { display: grid; gap: 12px; border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 12px; }
.grade-essay { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--teal-soft, #f9f8f7); }
.grade-prompt { font-weight: 400; font-size: 13px; margin: 0; }
.grade-answer { margin: 0; padding: 8px 11px; border-left: 3px solid var(--teal, #c2410c); background: var(--paper); border-radius: 4px; font-size: 13px; white-space: pre-wrap; }
.grade-controls { display: flex; gap: 16px; }
.grade-radio { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.grade-radio input { width: auto; }
.grade-feedback { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 13px; }
.attempt-result { display: grid; gap: 8px; margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.result-essay { display: grid; gap: 4px; }
.result-feedback { font-size: 12px; color: var(--muted); margin: 0; }

/* Course Builder (sequential sections → lessons with text + video) */
.builder { display: grid; gap: 14px; }
.builder-input { box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 14px; }
.builder-standalone-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.builder-standalone-head h3 { margin: 0; }
.builder-section { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; background: var(--teal-soft, #f9f8f7); }
.builder-section-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.builder-section-tag { font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
.builder-section-title { flex: 1 1 220px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 15px; font-weight: 400; }
.builder-drip-label { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.builder-drip { width: 64px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; text-align: center; }
.builder-drip-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.builder-drip-tag { font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.builder-drip-mode, .builder-drip-prereq, .builder-drip-date { box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 13px; background: var(--paper); }
.builder-drip-detail { display: inline-flex; align-items: center; gap: 6px; }

/* Trainer course-performance report table */
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.report-table th, .report-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.report-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 400; }
.report-table tr:hover td { background: var(--teal-soft, #f9f8f7); }
.report-table td:first-child { white-space: normal; font-weight: 400; }

/* Certificate template theming (per-course accent + signatory) */
.certificate-sheet { --cert-accent: #c2410c; }
.certificate-sheet .cert-eyebrow, .certificate-sheet .cert-course { color: var(--cert-accent); }
.cert-signatory { margin-top: 20px; display: inline-grid; gap: 2px; justify-items: center; }
.cert-sign-name { font-weight: 400; border-top: 2px solid var(--cert-accent, #c2410c); padding-top: 6px; min-width: 180px; text-align: center; }
.cert-sign-title { font-size: 12px; color: var(--muted, #69635d); }
/* Certificate builder form + mini preview */
.cert-preview { border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-align: center; background: var(--paper); display: grid; gap: 4px; --cert-accent: #c2410c; }
.cert-preview .cp-eyebrow { font-size: 11px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--cert-accent); }
.cert-preview .cp-name { font-size: 18px; font-weight: 400; }
.cert-preview .cp-course { font-weight: 400; color: var(--cert-accent); }
.cert-preview .cp-sign { margin-top: 10px; font-size: 12px; }
.cert-preview .cp-sign b { display: inline-block; border-top: 2px solid var(--cert-accent); padding-top: 4px; }
.builder-lessons { display: grid; gap: 10px; }
.builder-lesson { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 8px; background: var(--paper); }
.builder-lesson-row { display: flex; align-items: center; gap: 8px; }
.builder-lesson-tag { font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.builder-lesson-title { flex: 1; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; font-weight: 400; }
.builder-minutes { width: 56px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: 13px; text-align: center; }
.builder-min-tag { font-size: 11px; color: var(--muted); }
.builder-lesson-text { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 13px; resize: vertical; }
.builder-media-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.builder-media { font-size: 12px; color: var(--ink, inherit); background: var(--teal-soft, #f6f3f1); border-radius: 6px; padding: 5px 9px; }
.builder-upload { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.builder-file { font-size: 12px; flex: 1 1 200px; }
.builder-upload progress { flex: 1 1 120px; height: 8px; }
.builder-add-lesson, .builder-add-section { display: flex; gap: 8px; }
.builder-add-lesson .builder-input, .builder-add-section .builder-input { flex: 1; }
.builder-add-section { margin-top: 2px; }

/* Lesson text shown to enrolled learners alongside the video */
.lesson-text { display: grid; gap: 6px; margin: 6px 0; padding: 10px 12px; border-left: 3px solid var(--teal, #c2410c); background: var(--teal-soft, #f9f8f7); border-radius: 6px; }
.lesson-text-label { font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.lesson-text p { margin: 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }

/* Session avatar badge (logged-in identity in public site header) */
.session-avatar-wrap { position: relative; display: inline-flex; }
.session-avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--teal, #c2410c); color: #fff; font-weight: 400; font-size: 14px; letter-spacing: .02em;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.session-avatar:hover { filter: brightness(1.08); }
.session-avatar:focus-visible { outline: 2px solid var(--teal, #c2410c); outline-offset: 2px; }
.session-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px; z-index: 50;
  background: var(--paper); border: 1px solid var(--line, #e7e5e4); border-radius: 12px; padding: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14); display: grid; gap: 2px; }
.session-menu-name { font-weight: 400; font-size: 13px; padding: 4px 8px 0; }
.session-menu-role { font-size: 11px; color: var(--muted, #69635d); padding: 0 8px 6px; border-bottom: 1px solid var(--line, #f1eeeb); margin-bottom: 4px; }
.session-menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 13px; padding: 8px; border-radius: 8px; color: var(--ink, #27231f); text-decoration: none; }
.session-menu-item:hover { background: var(--teal-soft, #f6f3f1); }
.session-menu-item.danger { color: #b13535; }
.session-menu-item.danger:hover { background: #fdecec; }
.course-hero-tagline { font-size: 1rem; font-weight: 400; color: var(--course-accent, var(--teal)); margin: .25rem 0; }
.course-hero.layout-spotlight, .profile-hero.layout-spotlight { text-align: center; }
.course-hero.layout-minimal .enrol-card, .profile-hero.layout-minimal { box-shadow: none; }
.course-hero.design-dark, .profile-hero.design-dark { background: var(--ink); color: var(--ivory); border-radius: 16px; padding: 1.5rem; }
.course-hero.design-dark .lead, .profile-hero.design-dark .lead,
.course-hero.design-dark .subtle, .profile-hero.design-dark .subtle { color: #d6d3d0; }

/* --- Policy pages: lists + footer policy nav (2026-06-13 Razorpay readiness) --- */
.policy-list { margin: .5rem 0 .25rem; padding-left: 1.2rem; display: grid; gap: .35rem; }
.policy-list li { line-height: 1.5; }
.footer-policies { margin-top: .35rem; opacity: .9; }
.footer-policies a { font-size: .78rem; }

/* --- Course progress + completion (2026-06-13 Batch 1) --- */
.course-progress-bar { height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; margin: .4rem 0; }
.course-progress-fill { height: 100%; background: var(--teal); border-radius: 6px; transition: width .3s ease; }
.outline-button.is-complete { background: var(--success); color: #fff; border-color: var(--success); }

/* --- Free preview + announcements (2026-06-14 Batch 2) --- */
.inline-check { display: flex; align-items: center; gap: .5rem; }
.preview-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.preview-row .video-frame { flex-basis: 100%; margin-top: .5rem; }
.preview-section h2 { color: var(--teal); }

/* --- Discovery: rating breakdown, recommendations, category (2026-06-14 Batch 3) --- */
.rating-breakdown { display: grid; gap: .3rem; margin: .5rem 0 1rem; }
.rating-row { display: grid; grid-template-columns: 2.5rem 1fr 2rem; align-items: center; gap: .5rem; }
.rating-track { height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; }
.rating-fill { height: 100%; background: var(--gold); }
.rating-count { text-align: right; font-size: .72rem; color: var(--muted); }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; margin-top: .5rem; }
.rec-card { display: grid; gap: .25rem; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; }
.rec-card:hover { border-color: var(--teal); }
.category-badge { background: var(--teal-soft); color: var(--teal); }
.filters select { width: 100%; padding: .4rem; margin-top: .2rem; }

/* --- Coupons + notifications (2026-06-14 Batch 4) --- */
.coupon-row { display: flex; gap: .5rem; margin-top: .5rem; }
.coupon-input { flex: 1; padding: .45rem; border: 1px solid var(--line); border-radius: 8px; }
.timeline-item.unread { border-left: 3px solid var(--teal); padding-left: .7rem; }
#notif-unread:empty { display: none; }
#notif-unread { background: var(--danger); color: #fff; margin-left: .4rem; }

/* --- Gamification + prerequisites (2026-06-14 Batch 5) --- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin-top: .5rem; }
.achievement { display: grid; gap: .15rem; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.achievement.locked { opacity: .45; filter: grayscale(1); }
.achievement.earned { border-color: var(--gold); background: var(--gold-soft); }
.achievement-icon { font-size: 1.6rem; line-height: 1; }
.achievements-heading { margin: 1rem 0 .25rem; }
.prereq-note { color: var(--danger); }

/* --- Certificate download + lesson notes (2026-06-14 Batch 6) --- */
.certificate-page { max-width: 820px; margin: 2rem auto; padding: 1rem; }
.certificate-sheet { border: 6px double var(--gold); border-radius: 12px; padding: 3rem 2rem; text-align: center; background: var(--paper); }
.cert-logo { width: 64px; height: 64px; }
.cert-eyebrow { letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 400; margin: .5rem 0; }
.cert-line { color: var(--muted); margin: .4rem 0; }
.cert-name { font-size: 1.65rem; margin: .3rem 0; }
.cert-course { color: var(--teal); margin: .3rem 0 1rem; }
.cert-meta { color: var(--muted); font-size: .78rem; }
.cert-verify { color: var(--muted); font-size: .7rem; margin-top: 1rem; }
.cert-actions { display: flex; gap: .75rem; justify-content: center; margin-top: 1.5rem; }
@media print { .print-hide { display: none !important; } body { background: var(--paper); } }
.lesson-notes { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--ivory); display: grid; gap: .75rem; }
.lesson-notes h4 { margin: 0; color: var(--teal); }
.lesson-note { padding: .5rem .7rem; background: var(--paper); border-radius: 8px; }

/* --- Instructor analytics + payouts (2026-06-14 Batch 7) --- */
.status-pill.rejected { background: #fff0ec; color: var(--danger); }
.status-pill.requested { background: var(--gold-soft); color: #76530c; }
.chart-title { margin: 1.25rem 0 .5rem; font-size: 12px; color: var(--teal); }
.bar-chart { display: grid; gap: .5rem; }
.bar-row { display: grid; grid-template-columns: 64px 1fr 90px; align-items: center; gap: .6rem; }
.bar-label { font-size: 11px; color: var(--muted); }
.bar-track { height: 14px; background: var(--ivory); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--teal); border-radius: 999px; }
.bar-value { font-size: 11px; font-weight: 400; text-align: right; }
.inline-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin: 1rem 0; }
.inline-form label { display: grid; gap: .3rem; font-size: 12px; color: var(--muted); }
.inline-form input { padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; }
#payout-summary .wallet-balance { font-size: 1.4rem; margin: 0; }

/* --- Course discussion forum (2026-06-14 Batch 8) --- */
.course-discussion { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--ivory); display: grid; gap: .75rem; }
.course-discussion h4 { margin: 0; color: var(--teal); }
.discussion-list { display: grid; gap: .6rem; }
.discussion-post { padding: .6rem .8rem; background: var(--paper); border-radius: 10px; }
.discussion-post p { margin: .4rem 0 0; white-space: pre-wrap; }
.discussion-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: 12px; }
.discussion-head .subtle { margin-left: auto; }
.discussion-reply { margin-left: 1.5rem; border-left: 3px solid var(--teal-soft); }
.discussion-actions { display: flex; gap: .75rem; margin-top: .4rem; }
.discussion-form, .discussion-reply-form { display: grid; gap: .5rem; }
.discussion-form textarea, .discussion-reply-form textarea { width: 100%; min-height: 60px; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }

/* Teacher-approval discoverability (added 20260616) */
.nav-badge { display: inline-block; margin-left: 8px; background: var(--danger); color: #fff; border-radius: 999px; min-width: 20px; padding: 1px 7px; font-size: 11px; font-weight: 400; text-align: center; vertical-align: middle; }
.approval-callout { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--teal-soft); border: 1px solid var(--teal); border-radius: 14px; padding: 16px 18px; margin: 0 0 18px; }
.approval-callout:hover { background: #ffedd5; }
.approval-callout-icon { font-size: 21px; line-height: 1; }
.approval-callout-text { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.approval-callout-text strong { font-size: 13px; }
.approval-callout-action { color: var(--teal); font-weight: 400; white-space: nowrap; }
.stat-card.needs-action { outline: 2px solid #dec58f; background: #fffaf0; cursor: pointer; }
.stat-card.needs-action:hover { background: #fff6e3; }

/* Inline teacher approvals on the overview (added 20260616) */
.approval-inline { border: 1px solid var(--teal); background: var(--teal-soft); margin-bottom: 18px; }
.approval-inline > h2 { margin-top: 0; }
#operations-overview-approvals .application-review { background: var(--paper); }

/* Admin control centre: KYC verification + user/course management (20260621) */
.status-pill.approved, .status-pill.active, .status-pill.published { background: #e3f4ec; color: var(--success); }
.status-pill.suspended, .status-pill.retired { background: #fff0ec; color: var(--danger); }
.status-pill.draft { background: #f4f1ee; color: #6c6660; }
.reveal-line { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; word-break: break-all; min-height: 18px; }
.reveal-line:empty { display: none; }
.record-actions { flex-wrap: wrap; gap: 8px; }
.create-user-block { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 1rem; background: var(--teal-soft); }
.create-user-block > summary { cursor: pointer; font-weight: 400; color: var(--ink); }
.create-user-block[open] > summary { margin-bottom: .5rem; }
.status-pill.pending { background: var(--gold-soft); color: #76530c; }

/* === Admin dashboard refresh (scoped to .admin-control) — crisp, professional === */
.admin-control .dashboard-title { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.admin-control .admin-lead { color: var(--muted); font-size: 12px; line-height: 1.55; }
.admin-control .stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 14px;
  margin-bottom: 4px;
}
.admin-control .stat-card {
  position: relative;
  padding: 16px 18px 15px;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  overflow: hidden;
}
.admin-control .stat-card::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 0; width: 3px;
  background: var(--teal); opacity: 0; transition: opacity .16s ease;
}
.admin-control .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.admin-control .stat-card:hover::before { opacity: .6; }
.admin-control .stat-card .stat-label {
  font-size: 11px; font-weight: 400; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
}
.admin-control .stat-card .stat-value {
  font-family: var(--font-sans); font-weight: 400; font-size: 21px; line-height: 1.05;
  color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.015em;
}
.admin-control .stat-card .stat-meta { font-size: 11px; font-weight: 400; color: var(--muted); }
.admin-control .stat-card.is-money .stat-value { color: var(--teal-deep); }
.admin-control .stat-card.is-money::before { background: var(--teal); opacity: .45; }
.admin-control .stat-card.is-flag .stat-value { color: var(--danger); }
.admin-control .stat-card.is-flag::before { background: var(--danger); opacity: .55; }
.admin-control .stat-card.needs-action { border-color: #e6c980; background: #fffdf6; outline: none; }
.admin-control .stat-card.needs-action::before { background: var(--gold); opacity: .75; }
.admin-control .stat-card.needs-action .stat-value { color: #8a6d1e; }
.admin-control .stat-card.needs-action:hover { background: #fffaef; }
/* Panels: a touch more elevation + breathing room to match the cards */
.admin-control .dashboard-section.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
}
.admin-control .panel-head h2, .admin-control .dashboard-section.panel > h2 {
  font-size: 14px; letter-spacing: -.01em;
}
/* Users page — multi-select checkboxes + bulk action bar */
.admin-control .dashboard-record.selectable { position: relative; padding-left: 46px; }
.admin-control .user-select { position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; cursor: pointer; accent-color: var(--teal); }
.admin-control .bulk-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-sm);
}
.admin-control .bulk-all { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; font-size: 12px; color: var(--ink); cursor: pointer; }
.admin-control .bulk-all input { width: 17px; height: 17px; accent-color: var(--teal); cursor: pointer; }
.admin-control .bulk-count { font-size: 12px; color: var(--muted); font-weight: 400; }
.admin-control .bulk-spacer { flex: 1 1 auto; }
.admin-control .bulk-bar button { font-size: 12px; padding: 7px 14px; }
.admin-control .bulk-bar button:disabled { opacity: .45; cursor: not-allowed; }

/* ============================================================
   Design system v2 — industry-grade refinement (site-wide)
   Visual-only: tokens above + the rules below lift every page
   without changing any page's HTML or layout structure.
   ============================================================ */

/* Keyboard accessibility — a clear, consistent focus ring everywhere. */
a:focus-visible, [tabindex]:focus-visible, summary:focus-visible,
.text-link:focus-visible, .tile:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible, .primary-link:focus-visible, .outline-link:focus-visible,
.outline-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, .28);
}

/* Buttons — slightly crisper weight and a calmer resting shadow. */
.primary-link, .outline-link, .outline-button, button { font-weight: 400; }
.primary-link, button { box-shadow: 0 1px 2px rgba(28, 25, 23, .10); }
.outline-link, .outline-button { box-shadow: none; }

/* Header — refined hairline + lift the brand mark. */
.site-header { border-bottom-color: var(--line); }
.brand img { border-radius: 9px; }

/* Sidebar nav — softer item radius, clearer selected state. */
.dashboard-nav a { border-radius: var(--radius-sm); transition: background .14s ease, color .14s ease; }
.dashboard-nav a.selected { font-weight: 400; }

/* Status pills — tighter, more premium. */
.status-pill { padding: 4px 10px; border-radius: 7px; letter-spacing: .05em; font-size: 11px; }

/* Marketing course tiles — refined corners + a subtle hover lift. */
.tile { border-radius: var(--radius); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.tile-cover { border-radius: var(--radius) var(--radius) 0 0; }

/* Feature + audience cards — consistent radius and elevation. */
.feature-grid article { border-radius: var(--radius); }
.audience-card, .choice-card, .login-card { border-radius: var(--radius-lg); }

/* Section headings — a hair more editorial contrast. */
.section-head h2 { letter-spacing: -.02em; }
.eyebrow { letter-spacing: .14em; }

/* Tables and record rows read cleaner on the lifted panels. */
.dashboard-record { padding: 16px 0; }
table th { color: var(--muted); font-weight: 400; }

/* === Admin: Control status + Background work + Contract cards (20260622) ===
   Bring these panels up to the same card language as the overview metrics. */
.admin-control .control-grid, .admin-control .work-grid {
  grid-template-columns: repeat(auto-fit, minmax(204px, 1fr));
  gap: 14px;
}
.admin-control .control-card, .admin-control .work-card {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.admin-control .control-card::before, .admin-control .work-card::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 0; width: 3px;
  background: var(--teal); opacity: 0; transition: opacity .16s ease;
}
.admin-control .control-card:hover, .admin-control .work-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong);
}
.admin-control .control-card:hover::before, .admin-control .work-card:hover::before { opacity: .5; }
.admin-control .control-label {
  font-size: 11px; font-weight: 400; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.admin-control .control-value {
  font-size: 12px; font-weight: 400; line-height: 1.4; color: var(--ink);
  overflow-wrap: break-word; word-break: break-word;
}
.admin-control .control-status {
  justify-self: start;
  font-size: 11px; font-weight: 400; padding: 4px 12px; border-radius: 999px;
  text-transform: capitalize; letter-spacing: .01em;
}
.admin-control .control-status.is-ok { background: #e3f4ec; color: var(--success); }
.admin-control .control-status.is-warn { background: var(--gold-soft); color: #8a6611; }
.admin-control .control-status.is-off { background: #f4f1ee; color: #6c6660; }
/* Background work */
.admin-control .work-card > strong { font-size: 12px; font-weight: 400; line-height: 1.3; color: var(--ink); }
.admin-control .work-count {
  font: 700 30px/1.05 var(--font-sans); color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -.015em;
}
.admin-control .work-card > .subtle { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.admin-control .work-card.needs-action { border-color: #e6c980; background: #fffdf6; }
.admin-control .work-card.needs-action::before { background: var(--gold); opacity: .75; }
.admin-control .work-card.needs-action .work-count { color: #8a6d1e; }
/* Contract / transaction records */
.admin-control .contract-record, .admin-control .transaction-record { gap: 6px; padding: 18px 0; }
.admin-control .contract-record .subtle, .admin-control .transaction-record .subtle { font-size: 12px; line-height: 1.5; }

/* Bunny.net configuration panel */
.admin-control .bunny-status { padding: 12px 14px; border-radius: 10px; font-weight: 400; font-size: 12px; margin-bottom: 16px; }
.admin-control .bunny-status.is-ok { background: #e3f4ec; color: var(--success); }
.admin-control .bunny-status.is-off { background: var(--gold-soft); color: #8a6611; }
.admin-control .bunny-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-control .bunny-readonly { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.admin-control .bunny-readonly .subtle { font-size: 12px; }
.admin-control .bunny-checklist { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--teal-soft); }
.admin-control .bunny-checklist > summary { cursor: pointer; font-weight: 400; color: var(--ink); }
.admin-control .bunny-checklist ul { margin: 10px 0 0; padding-left: 20px; line-height: 1.7; font-size: 12px; }

/* Teacher: quiz / exam builder + course-launch checklist */
.question-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; display: grid; gap: 8px; background: var(--surface, #fff); }
.question-row legend { font-weight: 400; font-size: 12px; color: var(--muted); padding: 0 6px; }
.question-row label { display: grid; gap: 4px; font-size: 12px; }
.q-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-option { display: flex; align-items: center; gap: 8px; }
.q-option input[type="radio"] { flex: 0 0 auto; width: 16px; height: 16px; }
.q-option .q-opt { flex: 1 1 auto; }
.q-points-label { max-width: 120px; }
.text-button { align-self: start; background: none; border: none; color: var(--danger); font-weight: 400; font-size: 12px; cursor: pointer; padding: 2px 0; }
.launch-checklist { margin: 12px 0 4px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--teal-soft); }
.launch-checklist .checklist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.launch-checklist .check-ok { color: var(--success, #15803d); font-weight: 400; }
.launch-checklist .check-pending { color: var(--muted); }
.record-list { display: grid; gap: 8px; margin-top: 10px; }
.launch-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.launch-actions button[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 640px) { .q-options { grid-template-columns: 1fr; } }

/* Teacher: student roster + progress */
.student-row { display: grid; gap: 8px; }
.progress-track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress-fill { display: block; height: 100%; background: var(--teal); border-radius: 999px; min-width: 2px; }

/* Teacher: course reviews + reply */
.review-card { display: grid; gap: 8px; }
.review-card .badge { letter-spacing: 1px; color: #d97706; }
.review-reply { border-left: 3px solid var(--teal); padding: 6px 0 6px 12px; background: var(--teal-soft); border-radius: 0 8px 8px 0; }
.review-reply strong { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.reply-form { display: grid; gap: 8px; }
.reply-form textarea { min-height: 60px; }

/* Lesson resources (teacher list + student downloads) */
.resource-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.resource-downloads a { text-decoration: none; }

/* Teacher: curriculum order + drip scheduling */
.curriculum-editor { display: grid; gap: 10px; margin-top: 10px; }
.curriculum-module { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface, #fff); }
.curriculum-module-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.curriculum-module-head strong { flex: 1 1 auto; }
.curriculum-controls { display: flex; align-items: center; gap: 6px; }
.drip-input { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.drip-input input { width: 64px; }
.drag-handle { color: var(--muted); cursor: grab; letter-spacing: -2px; }
.curriculum-topics { display: grid; gap: 6px; margin: 8px 0 0 22px; }
.curriculum-topic { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--teal-soft); }
.curriculum-topic .topic-name { flex: 1 1 auto; }
.lesson-locked { color: var(--muted); font-size: 12px; font-weight: 400; }

/* Assignments (teacher grading + student submission) */
.assignment-card { display: grid; gap: 8px; }
.submission-list { display: grid; gap: 8px; margin-top: 8px; }
.submission-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--teal-soft); display: grid; gap: 6px; }
.grade-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grade-form input[type="number"] { width: 110px; }
.grade-form input:not([type="number"]) { flex: 1 1 160px; }
.assignment-student { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; margin-top: 8px; }
.assignment-submit { display: grid; gap: 8px; }
.assignment-submit textarea { min-height: 64px; }
.grade-result { color: var(--success, #15803d); font-weight: 400; }

/* Course bundles */
.bundle-courses { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.bundle-courses legend { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 6px; }
.bundle-course-option { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.bundle-course-option input { width: 16px; height: 16px; }

/* Affiliate / referral */
.affiliate-row { gap: 8px; align-items: center; margin-top: 10px; }
.affiliate-link { flex: 1 1 auto; font-family: ui-monospace, monospace; font-size: 12px; }

/* Teams & seats (B2B) */
.member-row { gap: 8px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); }
.member-row span { flex: 1 1 auto; }
.assign-seat-form { display: flex; gap: 8px; margin-top: 8px; }
.assign-seat-form input { flex: 1 1 auto; }


/* ======================================================================
   Opt-in dark theme — toggled via data-theme="dark" on <html> (shared.js).
   Default (no attribute) stays light, so no user is surprised.
   ====================================================================== */
:root[data-theme="dark"] {
  --ink: #f5f5f4;
  --ink-soft: #d6d3d1;
  --muted: #a8a29e;
  --teal: #fb923c;
  --teal-bright: #fdba74;
  --teal-vivid: #f97316;
  --teal-deep: #c2410c;
  --teal-soft: #3a2416;
  --gold: #fbbf24;
  --gold-soft: #2c2413;
  --ivory: #171412;
  --paper: #211d1a;
  --surface-subtle: #1c1917;
  --surface-alt: #2a2420;
  --line: #36302b;
  --line-strong: #4a423b;
  --danger: #f87171;
  --success: #4ade80;
  --ring: rgba(251, 146, 60, .25);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .35);
  --shadow: 0 8px 24px rgba(0, 0, 0, .5);
  --shadow-lg: 0 22px 55px rgba(0, 0, 0, .6);
  --shadow-hover: 0 2px 6px rgba(0, 0, 0, .4), 0 16px 36px rgba(0, 0, 0, .55);
}
/* Sections whose backgrounds are hardcoded-light or reuse --ink as a dark
   fill need explicit dark overrides so they don't invert wrongly. */
:root[data-theme="dark"] .home-hero { background: radial-gradient(circle at 88% 10%, rgba(216, 168, 74, .10), transparent 30%), linear-gradient(135deg, #201c19, #161412); }
:root[data-theme="dark"] .launch-readiness { background: radial-gradient(circle at 94% 0%, rgba(216, 168, 74, .10), transparent 21rem), linear-gradient(135deg, #201c19, #161412); }
:root[data-theme="dark"] .teacher-hero { background: linear-gradient(135deg, #1f1b18, #161412); }
:root[data-theme="dark"] .outcome-strip { background: linear-gradient(140deg, #14110f, #201d1a 62%, #27231f); }
:root[data-theme="dark"] .audience-card.dark { background: #27231f; }
:root[data-theme="dark"] .dashboard-message.success { background: #123026; }
:root[data-theme="dark"] .dashboard-message.failed,
:root[data-theme="dark"] .status-pill.refunded,
:root[data-theme="dark"] .status-pill.failed,
:root[data-theme="dark"] .status-pill.cancelled,
:root[data-theme="dark"] .status-pill.rejected,
:root[data-theme="dark"] .status-pill.suspended,
:root[data-theme="dark"] .status-pill.retired { background: #3a1e1a; }
:root[data-theme="dark"] .work-card.needs-action,
:root[data-theme="dark"] .stat-card.needs-action { background: #2c2413; }
/* --teal is lightened in dark for link/accent contrast, which is too light to
   hold white button text. Darken the filled-button fill only (white AA 5.2). */
:root[data-theme="dark"] button:not(.outline-button):not(.ghost):not(.decline-button),
:root[data-theme="dark"] .primary-link { background: #c2410c; border-color: #c2410c; color: #fff; }
:root[data-theme="dark"] button:not(.outline-button):not(.ghost):not(.decline-button):hover,
:root[data-theme="dark"] .primary-link:hover { background: #9a3412; border-color: #9a3412; }

/* Floating theme toggle (added to <body> by shared.js on every page). */
.theme-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 40px; height: 40px; padding: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--teal); color: var(--teal); background: var(--surface-subtle); }

/* Skeleton loaders. */
@keyframes fc-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton-wrap { display: block; }
.skeleton {
  display: block; border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-subtle) 25%, var(--line) 37%, var(--surface-subtle) 63%);
  background-size: 800px 100%; animation: fc-shimmer 1.4s ease-in-out infinite;
}
.skeleton-line { height: 12px; margin: 8px 0; width: 80%; }
.skeleton-card { height: 84px; margin: 10px 0; }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }


/* ---- Learning streak card ---- */
.streak-card h3 { margin: 0 0 6px; }
.streak-week { display: flex; gap: 6px; margin: 10px 0; }
.streak-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line-strong); display: inline-block; }
.streak-dot.on { background: var(--teal); }
.streak-dot.future { background: var(--line); opacity: .5; }
.streak-goal { font-size: 12px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.streak-goal select { width: auto; padding: 6px 10px; }

/* ---- Peer review ---- */
.peer-box { margin-top: 10px; display: grid; gap: 8px; }
.peer-box blockquote.grade-answer { margin: 0; }
.peer-box textarea { min-height: 70px; }

/* ---- Course cart ---- */
.cart-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 60; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 10px 14px; max-width: min(680px, calc(100vw - 24px)); }
.cart-bar.pop { outline: 3px solid var(--teal-soft); }
.cart-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cart-summary { background: none; border: 0; font-weight: 400; color: var(--ink); font-size: 13.5px; }
.cart-currency { width: auto; padding: 6px 8px; font-size: 12px; }
.cart-estimate { font-size: 11.5px; color: var(--muted); }
.cart-checkout { background: var(--teal); color: #fff; border: 0; border-radius: 10px; font-weight: 400; padding: 9px 18px; }
.cart-checkout:disabled { opacity: .7; }
.cart-list { margin-top: 10px; display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.cart-row { display: flex; gap: 10px; justify-content: space-between; align-items: center; font-size: 12.5px; }
.cart-note { margin: 6px 0 0; font-size: 11.5px; color: var(--danger); }
.cart-add { margin-top: 6px; font-size: 12px; }

/* ---- Offline indicator ---- */
.offline-pill { position: fixed; left: 14px; bottom: 14px; z-index: 80; background: #b45309; color: #fff; font-size: 12px; font-weight: 400; padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow); }


/* ======================================================================
   Growth pack (20260716-growth) — automations, broadcasts, integrations,
   admin self-heal, student momentum + leaderboard, discussion reactions
   and the cart order-bump. Additive only; colours come from the tokens
   above so the dark theme ([data-theme="dark"]) works automatically.
   ====================================================================== */

/* Workflow (automation) list + builder */
.wf-toolbar { display: flex; justify-content: flex-start; margin-bottom: 12px; }
.wf-table-scroll { overflow-x: auto; }
.wf-table td { white-space: normal; vertical-align: top; }
.wf-table td .subtle { font-size: 11.5px; }
.wf-cell-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.wf-cell-actions button { font-size: 11.5px; padding: 5px 10px; }
.wf-builder { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-subtle); margin: 12px 0; }
.wf-builder h3 { margin-bottom: 10px; }
.wf-builder h4 { margin-top: 6px; }
.wf-trigger-config { display: grid; gap: 8px; }
.wf-trigger-config:empty { display: none; }
.wf-trigger-config label { display: grid; gap: 4px; font-size: 12px; font-weight: 400; }
.wf-steps { display: grid; gap: 10px; margin: 6px 0; }
.wf-step { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; display: grid; gap: 8px; background: var(--paper); }
.wf-step legend { font-weight: 400; font-size: 12px; color: var(--muted); padding: 0 6px; }
.wf-step label { display: grid; gap: 4px; font-size: 12px; }
.wf-step-controls { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.wf-step-move { padding: 3px 9px; font-size: 12px; line-height: 1.3; }
.wf-hint { font-size: 11.5px; }
.wf-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.wf-add-row select { width: auto; }
.wf-actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.wf-runs { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.wf-runs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.wf-run { padding: 12px 0; }

/* Extra status-pill states used by automations, broadcasts and webhooks */
.status-pill.paused, .status-pill.scheduled, .status-pill.in-flight,
.status-pill.sending, .status-pill.queued { background: var(--gold-soft); color: #76530c; }
.status-pill.archived, .status-pill.disabled { background: var(--surface-alt); color: var(--muted); }
.status-pill.sent, .status-pill.completed, .status-pill.ok { background: #e3f4ec; color: var(--success); }
:root[data-theme="dark"] .status-pill.sent,
:root[data-theme="dark"] .status-pill.completed,
:root[data-theme="dark"] .status-pill.ok { background: #123026; }
:root[data-theme="dark"] .status-pill.paused,
:root[data-theme="dark"] .status-pill.scheduled,
:root[data-theme="dark"] .status-pill.in-flight,
:root[data-theme="dark"] .status-pill.sending,
:root[data-theme="dark"] .status-pill.queued { color: var(--gold); }

/* Broadcast compose */
.broadcast-form { margin-bottom: 18px; }
.broadcast-audience { font-size: 12px; font-weight: 400; color: var(--teal); min-height: 18px; margin: 0; }
.broadcast-history { margin-top: 10px; }

/* Summary chips (automation runs + self-heal triage) */
.triage-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.triage-chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--surface-alt); color: var(--ink-soft); font-size: 12px; font-weight: 400; }
.chip-danger { background: #fff0ec; color: var(--danger); }
:root[data-theme="dark"] .chip-danger { background: #3a1e1a; }

/* One-time token / secret reveal (integrations) */
.reveal-box { border: 1px dashed var(--gold); border-radius: 12px; padding: 12px 14px; background: var(--gold-soft); margin: 12px 0; display: grid; gap: 8px; }
.reveal-box .reveal-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.reveal-box input { flex: 1 1 220px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.webhook-deliveries { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }

/* Admin self-heal (Diagnostics tab) */
.selfheal-table td { vertical-align: top; }
.selfheal-detail { white-space: normal; max-width: 380px; overflow-wrap: break-word; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); margin-right: 7px; }
.status-dot.is-ok { background: var(--success); }
.status-dot.is-warn { background: var(--gold); }
.status-dot.is-fail { background: var(--danger); }

/* Student momentum card (home panel) */
.momentum-card { margin-bottom: 14px; }
.momentum-stats { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.momentum-points { font: 700 28px/1.05 var(--font-sans); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.015em; }
.momentum-level { font-size: 12.5px; font-weight: 400; color: var(--teal); }
.momentum-track { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.momentum-fill { display: block; height: 100%; background: var(--teal); border-radius: 999px; min-width: 2px; transition: width .4s ease; }
.momentum-badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.badge-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-deep); font-size: 12px; font-weight: 400; cursor: help; }
:root[data-theme="dark"] .badge-chip { color: var(--teal-bright); }
.badge-chip:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 2px; }
.momentum-link { color: var(--teal); margin-top: 4px; }

/* Student leaderboard panel */
.lb-switch { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.lb-switch .outline-button { font-size: 12px; padding: 7px 14px; }
.lb-switch .outline-button.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.lb-table td { white-space: normal; }
.lb-you td { background: var(--teal-soft); font-weight: 400; }
.lb-me-line { margin-top: 10px; font-weight: 400; }
.lb-me-line:empty { display: none; }
.lb-privacy { margin-top: 14px; }

/* Student privacy panel: email preferences */
.prefs-heading { margin: 4px 0 8px; }

/* Discussion reactions */
.reaction-bar { display: flex; gap: 6px; margin-top: 8px; }
.reaction-chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 3px 10px; font-size: 12px; line-height: 1.5; color: var(--ink-soft); box-shadow: none; transition: border-color .14s ease, background .14s ease; }
.reaction-chip:hover { border-color: var(--teal); background: var(--teal-soft); }
.reaction-chip.active { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-deep); font-weight: 400; }
:root[data-theme="dark"] .reaction-chip.active { color: var(--teal-bright); }

/* Cart order-bump ("You might also like") */
.cart-upsell { border-top: 1px dashed var(--line-strong); margin-top: 4px; padding-top: 8px; }
.cart-upsell-title { margin: 0 0 4px; font-size: 11px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cart-upsell-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: 12.5px; padding: 3px 0; }
.cart-upsell-info .subtle { font-size: 12px; }
.cart-upsell-add { font-size: 11.5px; padding: 5px 10px; }

/* Respect reduced-motion for every animated growth-pack element. */
@media (prefers-reduced-motion: reduce) {
  .momentum-fill, .reaction-chip, .wf-table tr, .lb-switch .outline-button { transition: none; }
}


/* ======================================================================
   Gap-closure pack (20260716-gaps) — email A/B testing, community feed,
   level-gated drip, lead capture + leads viewer, post-purchase upsell
   and the AI copilot buttons. Additive only; colours come from the
   tokens above so the dark theme ([data-theme="dark"]) works automatically.
   ====================================================================== */

/* A/B subject-line testing (broadcast compose + history) */
.ab-block { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px 14px; display: grid; gap: 8px; }
.ab-block[hidden] { display: none; }
.ab-fields { display: grid; gap: 10px; }
.ab-hint { font-size: 11.5px; margin: 0; }
.ab-subject-b { font-size: 11.5px; margin: 4px 0; }
.status-pill.ab-testing { background: var(--gold-soft); color: #76530c; }
.status-pill.ab-winner { background: var(--teal-soft); color: var(--teal-deep); }
:root[data-theme="dark"] .status-pill.ab-testing { color: var(--gold); }
:root[data-theme="dark"] .status-pill.ab-winner { color: var(--teal-bright); }

/* AI copilot (broadcast compose + automation builder) */
.ai-draft-row { margin: 2px 0 6px; display: grid; gap: 8px; justify-items: start; }
.ai-draft-btn { font-size: 12px; }
.ai-draft-panel { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px 14px; background: var(--surface-subtle); display: grid; gap: 8px; width: 100%; }
.ai-draft-panel label { display: grid; gap: 4px; font-size: 12px; font-weight: 400; }
.ai-draft-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ai-note { margin: 0; font-size: 11.5px; }
.ai-note:empty { display: none; }

/* Leads viewer (teacher Broadcasts tab + admin console) */
.leads-bar { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 10px; }
.leads-bar label { display: grid; gap: 4px; font-size: 12px; font-weight: 400; }
.leads-bar select { min-width: 220px; }
.leads-export { font-size: 12px; text-decoration: none; }
.leads-table td { white-space: normal; overflow-wrap: anywhere; }

/* Lead capture (public course page, signed-out visitors) */
.lead-capture { border-top: 1px dashed var(--line-strong); margin-top: 12px; padding-top: 12px; display: grid; gap: 8px; }
.lead-capture-title { margin: 0; font-size: 13px; }
.lead-capture-form { display: grid; gap: 8px; }
.lead-capture-form input { width: 100%; }
.lead-msg { margin: 0; font-size: 12px; }
.lead-msg:empty { display: none; }

/* Post-purchase upsell dialog */
.upsell-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(28, 25, 23, .55); display: grid; place-items: center; padding: 18px; }
.upsell-dialog { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 22px 24px; max-width: 420px; width: 100%; display: grid; gap: 10px; }
.upsell-title { margin: 0; font-size: 19px; }
.upsell-line { margin: 0; }
.upsell-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* Community feed (student + teacher + admin/moderator) */
.community-composer { margin-bottom: 16px; }
.community-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.community-count { font-variant-numeric: tabular-nums; font-size: 11.5px; }
.community-feed { display: grid; gap: 12px; }
.community-post { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--paper); display: grid; gap: 8px; }
.community-post.is-pinned { border-color: var(--gold); background: var(--gold-soft); }
:root[data-theme="dark"] .community-post.is-pinned { background: var(--surface-subtle); }
.community-post-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.community-pin { font-size: 11px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; color: #76530c; }
:root[data-theme="dark"] .community-pin { color: var(--gold); }
.community-author-wrap { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.community-author { font-size: 13.5px; }
.role-chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 400; letter-spacing: .03em; text-transform: uppercase; background: var(--surface-alt); color: var(--ink-soft); }
.role-chip.role-trainer { background: var(--teal-soft); color: var(--teal-deep); }
.role-chip.role-admin, .role-chip.role-moderator { background: var(--gold-soft); color: #76530c; }
:root[data-theme="dark"] .role-chip.role-trainer { color: var(--teal-bright); }
:root[data-theme="dark"] .role-chip.role-admin, :root[data-theme="dark"] .role-chip.role-moderator { color: var(--gold); }
.level-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 10.5px; font-weight: 400; }
.community-time { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.community-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.community-post-foot { display: grid; gap: 6px; }
.community-reactions { align-items: center; flex-wrap: wrap; }
.reaction-emoji { margin-right: 4px; }
.reaction-count { font-variant-numeric: tabular-nums; font-weight: 400; }
.reaction-count:empty { display: none; }
.community-total { font-size: 11.5px; margin-left: 4px; }
.community-total:empty { display: none; }
.community-post-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.community-remove { color: var(--danger); }
.community-comments-toggle { justify-self: start; }
.community-comments { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; display: grid; gap: 10px; }
.community-comment { border-left: 2px solid var(--line-strong); padding-left: 10px; display: grid; gap: 4px; }
.community-comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.community-comment .community-remove { justify-self: start; font-size: 11.5px; }
.community-comment-form { display: grid; gap: 8px; }
.community-comment-form textarea { width: 100%; }
.community-comment-form button { justify-self: start; }
.community-more { margin-top: 12px; display: flex; justify-content: center; }

/* Keyboard focus + reduced motion for the gap-closure elements */
.reaction-chip:focus-visible, .community-post button:focus-visible,
.upsell-dialog a:focus-visible, .upsell-dialog button:focus-visible,
.lead-capture-form button:focus-visible, .ai-draft-btn:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .upsell-overlay, .upsell-dialog, .community-post { transition: none; animation: none; }
}


/* ======================================================================
   Course Studio wizard (20260716-wizard)
   Full-screen guided course flow + grouped teacher nav + small responsive
   fixes. Additive only — nothing above this block changes behaviour.
   ====================================================================== */

/* --- Grouped dashboard navigation ------------------------------------ */
.dashboard-nav .nav-group { display: grid; gap: 2px; margin-bottom: 14px; }
.dashboard-nav .nav-group-label {
  margin: 0 0 4px;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.dashboard-nav .nav-primary {
  font-weight: 400;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
}
.panel-head-split { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-head-split h2 { margin: 0; }

/* Wide data tables scroll inside their host instead of the page. */
#report-table, #lb-table { overflow-x: auto; max-width: 100%; }

/* --- Overlay shell ---------------------------------------------------- */
body.cw-lock { overflow: hidden; }
.cw-overlay [hidden] { display: none !important; }
.cw-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  flex-direction: column;
  background: var(--ivory);
  color: var(--ink);
  overflow: hidden;
}
.cw-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 2;
}
.cw-head-title { display: grid; gap: 1px; min-width: 0; }
.cw-eyebrow {
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--teal);
}
.cw-course-title {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}
.cw-step-label {
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  white-space: nowrap;
}
.cw-close {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 400;
  font-size: 13px;
  cursor: pointer;
}
.cw-close:hover { background: var(--surface-alt); }

.cw-dots { display: none; gap: 5px; justify-content: center; padding: 8px 16px 0; }
.cw-dot { width: 22px; height: 5px; border-radius: 999px; background: var(--line); transition: background .2s; }
.cw-dot.active { background: var(--teal); }
.cw-dot.done { background: var(--teal); opacity: .45; }

.cw-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
}

/* --- Progress rail ---------------------------------------------------- */
.cw-rail {
  border-right: 1px solid var(--line);
  background: var(--paper);
  padding: 18px 12px;
  overflow-y: auto;
}
.cw-rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cw-rail-step {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  min-height: 42px;
}
.cw-rail-step:hover:not(:disabled) { background: var(--surface-alt); color: var(--ink); }
.cw-rail-step:disabled { opacity: .45; cursor: not-allowed; }
.cw-rail-step.active { background: var(--teal-soft); color: var(--teal); }
.cw-rail-num {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 400;
}
.cw-rail-step.active .cw-rail-num { border-color: var(--teal); background: var(--teal); color: #fff; }
.cw-rail-step.done .cw-rail-num { border-color: var(--teal); color: var(--teal); }

/* --- Body + footer ----------------------------------------------------- */
.cw-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cw-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 26px clamp(16px, 4vw, 44px) 40px;
  display: grid;
  gap: 14px;
  align-content: start;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}
.cw-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px clamp(16px, 4vw, 44px);
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.cw-spacer { flex: 1 1 auto; }
.cw-msg { font-size: 12.5px; font-weight: 400; color: var(--success); min-width: 0; }
.cw-msg.failed { color: var(--danger); }
.cw-next, .cw-back { min-height: 44px; }

.cw-q { margin: 0; font-size: 22px; font-weight: 400; letter-spacing: -.01em; }
.cw-hint { margin: -6px 0 4px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.cw-microhint { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.cw-note {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  background: var(--gold-soft);
  font-size: 12.5px;
  line-height: 1.5;
}

/* --- Fields + suggest button ------------------------------------------- */
.cw-field { display: grid; gap: 6px; }
.cw-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  font-weight: 400;
}
.cw-input-row { display: flex; align-items: flex-start; gap: 8px; }
.cw-input-row > .cw-input { flex: 1 1 auto; min-width: 0; }
.cw-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  background: var(--paper);
  color: var(--ink);
}
.cw-textarea { min-height: 96px; resize: vertical; }
.cw-count { max-width: 84px; text-align: center; }
.cw-price { max-width: 180px; }
.cw-file { font-size: 12px; }
.cw-suggest-wrap { position: relative; display: grid; gap: 6px; flex: 0 0 auto; }
.cw-suggest {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  font-size: 17px;
  cursor: pointer;
  line-height: 1;
}
.cw-suggest:hover { background: var(--teal-soft); border-color: var(--teal); }
.cw-suggest.busy { animation: cw-pulse 1s ease-in-out infinite; }
@keyframes cw-pulse { 50% { opacity: .5; } }
.cw-suggest-box {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  width: min(420px, 78vw);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}
.cw-suggest-text { margin: 0; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.cw-suggest-actions { display: flex; gap: 8px; }

.cw-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cw-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cw-chip {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 400;
  font-size: 13px;
  cursor: pointer;
  min-height: 42px;
}
.cw-chip.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.cw-chip:disabled { opacity: .55; cursor: not-allowed; }
.cw-check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; padding: 4px 0; }

/* --- Cards, outline & lesson content ----------------------------------- */
.cw-section-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 16px;
  display: grid;
  gap: 12px;
}
.cw-mini-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-subtle);
  padding: 14px;
  display: grid;
  gap: 9px;
  align-content: start;
}
.cw-section-head, .cw-lesson-row { display: flex; align-items: center; gap: 10px; }
.cw-section-title { font-weight: 400; }
.cw-lesson-list { display: grid; gap: 8px; padding-left: 6px; }
.cw-tag {
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 6px;
  padding: 4px 8px;
  white-space: nowrap;
}
.cw-tag.soft { color: var(--muted); background: var(--surface-alt); }
.cw-move { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.cw-icon-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 14px;
  cursor: pointer;
}
.cw-icon-btn:hover { background: var(--surface-alt); }
.cw-add-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cw-add-row .cw-input { flex: 1 1 220px; }
.cw-add-section { padding-top: 4px; }
.cw-ai-outline { display: grid; gap: 10px; justify-items: start; }
.cw-ai-outline-results {
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  width: 100%;
  background: var(--surface-subtle);
}

.cw-content-section { margin: 10px 0 0; font-size: 14px; font-weight: 400; }
.cw-lesson-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}
.cw-lesson-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cw-lesson-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cw-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 400;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface-alt);
  color: var(--ink-soft);
  white-space: nowrap;
}
.cw-pill.ok { background: var(--teal-soft); color: var(--teal); }
.cw-pill.warn { background: var(--gold-soft); color: var(--gold); }
.cw-pill.soft { background: var(--surface-subtle); color: var(--muted); }
.cw-pill.big { font-size: 13px; padding: 8px 16px; }
.cw-media-list { display: grid; gap: 6px; }
.cw-media-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  background: var(--surface-subtle);
  border-radius: 9px;
  padding: 7px 11px;
}
.cw-media-title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.cw-drop {
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--surface-subtle);
  transition: border-color .15s, background .15s;
}
.cw-drop.over { border-color: var(--teal); background: var(--teal-soft); }
.cw-drop.busy { opacity: .75; }
.cw-drop-hint { font-size: 12.5px; color: var(--muted); }
.cw-drop progress { flex: 1 1 140px; height: 8px; }
.cw-resource-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cw-resource-row .cw-file { flex: 1 1 200px; }

/* --- Assessments step --------------------------------------------------- */
.cw-qdraft-list { display: grid; gap: 8px; }
.cw-qdraft {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--surface-subtle);
}
.cw-qdraft-prompt { flex: 1 1 240px; font-size: 13.5px; padding: 8px 10px; }
.cw-manual-q {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
  background: var(--paper);
}
.cw-manual-q summary { cursor: pointer; font-weight: 400; font-size: 13.5px; }
.cw-option-row { display: flex; align-items: center; gap: 8px; }
.cw-option-row .cw-input { flex: 1 1 auto; }
.cw-deep-link { justify-self: start; text-align: left; font-size: 13px; }

/* --- Engagement + review ------------------------------------------------- */
.cw-template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cw-template { position: relative; }
.cw-template-icon { font-size: 22px; }
.cw-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cw-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--paper);
  font-size: 13.5px;
}
.cw-check-row.ok { border-color: var(--teal-soft); }
.cw-check-row.todo { border-left: 3px solid var(--gold); }
.cw-check-mark { font-weight: 400; color: var(--muted); }
.cw-check-row.ok .cw-check-mark { color: var(--teal); }
.cw-check-label { flex: 1 1 auto; min-width: 0; }
.cw-fix { flex: 0 0 auto; font-weight: 400; }
.cw-summary {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--teal-soft);
  padding: 14px 16px;
  display: grid;
  gap: 8px;
}
.cw-summary-row { display: flex; gap: 12px; font-size: 13.5px; }
.cw-summary-k {
  flex: 0 0 110px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding-top: 2px;
}
.cw-summary-v { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.cw-review-actions { display: grid; gap: 10px; justify-items: start; padding-top: 6px; }
.cw-publish { font-size: 15px; }
.cw-publish:disabled { opacity: .5; cursor: not-allowed; }

/* --- Accessibility & motion ---------------------------------------------- */
.cw-overlay button:focus-visible,
.cw-overlay input:focus-visible,
.cw-overlay select:focus-visible,
.cw-overlay textarea:focus-visible,
.dashboard-nav a:focus-visible,
#new-course-btn:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .cw-dot, .cw-drop, .cw-suggest.busy { transition: none; animation: none; }
}

/* --- Dark theme touch-ups (tokens cover most of it) ----------------------- */
:root[data-theme="dark"] .cw-overlay { background: var(--ivory); }
:root[data-theme="dark"] .cw-chip.active { color: #1c1917; }
:root[data-theme="dark"] .cw-rail-step.active .cw-rail-num { color: #1c1917; }

/* --- Responsive: tablet ---------------------------------------------------- */
@media (max-width: 880px) {
  .cw-shell { grid-template-columns: minmax(0, 1fr); }
  .cw-rail { display: none; }
  .cw-dots { display: flex; }
  .cw-grid-4 { grid-template-columns: 1fr 1fr; }
  .cw-template-grid { grid-template-columns: 1fr; }
  .cw-body { padding: 18px 16px 32px; }
}

/* --- Responsive: phones (down to 360px) ------------------------------------ */
@media (max-width: 580px) {
  .cw-head { padding: 10px 12px; gap: 8px; }
  .cw-course-title { max-width: 34vw; font-size: 13.5px; }
  .cw-step-label { font-size: 10px; letter-spacing: .03em; }
  .cw-close { padding: 8px 12px; font-size: 12px; }
  .cw-q { font-size: 18px; }
  .cw-grid-2, .cw-grid-4 { grid-template-columns: 1fr; }
  .cw-foot { flex-wrap: wrap; padding: 10px 12px; }
  .cw-msg { order: 3; flex: 1 1 100%; }
  .cw-next { flex: 1 1 auto; }
  .cw-section-head, .cw-lesson-row { flex-wrap: wrap; }
  .cw-suggest-box { width: min(420px, calc(100vw - 48px)); }
  .cw-add-row .cw-input { flex: 1 1 100%; }
  .cw-summary-k { flex-basis: 84px; }
  .wizard-resume { width: 100%; }
}

/* ======================================================================
   Interactive video Q&A (20260716-ivq)
   Learner: questions pinned to a lesson-video timestamp pause playback and
   require an answer before resuming. Trainer: authoring editor per video.
   Token-driven so it inherits light/dark automatically.
   ====================================================================== */

/* --- Learner overlay ---------------------------------------------------- */
.ivq-stage { position: relative; margin-top: 9px; }
.ivq-stage > .video-frame { margin-top: 0; display: block; }
.ivq-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(28, 25, 23, .78);
  backdrop-filter: blur(2px);
  border-radius: var(--radius-sm);
  z-index: 5;
  animation: ivq-fade .18s ease-out;
}
@keyframes ivq-fade { from { opacity: 0; } to { opacity: 1; } }
.ivq-panel {
  width: min(560px, 100%);
  max-height: 100%;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding: 18px 18px 16px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.ivq-badge {
  justify-self: start;
  font-size: 10.5px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
}
.ivq-badge.required { background: var(--gold-soft); color: var(--gold); }
.ivq-q { font-size: 16px; line-height: 1.35; margin: 0; }
.ivq-meta { font-size: 11.5px; color: var(--muted); }
.ivq-options { display: grid; gap: 8px; margin-top: 2px; }
.ivq-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.ivq-option:hover { border-color: var(--teal); }
.ivq-option input { margin-top: 2px; accent-color: var(--teal); flex: none; }
.ivq-option:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.ivq-option:has(input:focus-visible) { outline: 2px solid var(--teal-bright); outline-offset: 2px; }
.ivq-option-text { font-size: 13px; line-height: 1.45; }
.ivq-option.ivq-correct { border-color: var(--success); background: var(--teal-soft); }
.ivq-option.ivq-wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.ivq-feedback {
  margin: 2px 0 0;
  display: grid;
  gap: 4px;
  font-size: 12.5px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
}
.ivq-feedback.ok { background: var(--teal-soft); color: var(--success); }
.ivq-feedback.bad { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.ivq-feedback.warn { background: var(--gold-soft); color: var(--gold); }
.ivq-feedback strong { font-weight: 400; }
.ivq-explain { color: var(--ink-soft); font-weight: 400; }
.ivq-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

/* --- Trainer authoring editor ------------------------------------------- */
.builder-media { display: flex; flex-direction: column; gap: 8px; }
.builder-media-name { font-size: 12.5px; }
.ivq-editor { display: grid; gap: 8px; }
.ivq-toggle { width: max-content; }
.ivq-editor-body {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
}
.ivq-hint { margin: 0; font-size: 11.5px; }
.ivq-list { display: grid; gap: 6px; }
.ivq-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.ivq-row-info { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ivq-ts {
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  font-size: 11.5px;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 1px 7px;
  border-radius: 999px;
  flex: none;
}
.ivq-row-q { font-size: 12.5px; overflow-wrap: anywhere; }
.ivq-row-type { font-size: 11px; color: var(--muted); }
.ivq-row-actions { display: flex; gap: 6px; flex: none; }
.ivq-form { display: grid; gap: 10px; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ivq-form-title { font-size: 13px; margin: 0; }
.ivq-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ivq-field { display: grid; gap: 4px; }
.ivq-field .wizard-label { font-size: 11px; }
.ivq-opt-rows { display: grid; gap: 6px; }
.ivq-opt-row { display: flex; align-items: center; gap: 8px; }
.ivq-opt-row input[type="radio"], .ivq-opt-row input[type="checkbox"] { accent-color: var(--teal); flex: none; }
.ivq-opt-row .builder-input { flex: 1 1 auto; }
.ivq-add-opt { width: max-content; }
.ivq-opt-del { flex: none; font-size: 15px; line-height: 1; padding: 4px 8px; }
.text-button.danger { color: var(--danger); }
.ivq-form-actions { display: flex; gap: 8px; align-items: center; }

@media (max-width: 580px) {
  .ivq-form-grid { grid-template-columns: 1fr; }
  .ivq-row { flex-direction: column; align-items: stretch; }
  .ivq-row-actions { justify-content: flex-end; }
  .ivq-panel { padding: 14px; }
  .ivq-q { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .ivq-overlay { animation: none; }
  .ivq-option { transition: none; }
}

/* ======================================================================
   PREMIUM ELEVATION v2 (2026-07-18) — additive layer over the base system.
   Type scale, motion (aurora/reveal/hover), nav, logo, login. All motion is
   prefers-reduced-motion gated. No external resources (CSP-safe).
   ====================================================================== */

/* --- Fluid display type ------------------------------------------------ */
.home-hero h1, .hero-copy h1 { font-size: clamp(40px, 2.4rem + 3.2vw, 68px); letter-spacing: -.025em; line-height: 1.02; }
.section-head h2, .center-head h2 { letter-spacing: -.02em; }
.lead { font-size: clamp(15px, .9rem + .35vw, 18px); line-height: 1.6; }
.eyebrow { font-size: 12px; letter-spacing: .16em; }

/* --- Content width cap on ultrawide ----------------------------------- */
.section > .center-head, .section > .section-head { max-width: var(--content-max); margin-inline: auto; }

/* --- Nav polish: 14px links + animated underline + sticky blur --------- */
.desktop-nav a, .header-actions a, .header-actions .text-link { font-size: 14px; font-weight: 400; }
.desktop-nav a { position: relative; }
.desktop-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: var(--teal); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform var(--dur-2) var(--ease); }
.desktop-nav a:hover::after, .desktop-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-header.is-stuck { backdrop-filter: saturate(1.4) blur(10px); background: color-mix(in srgb, var(--paper) 82%, transparent); }

/* --- Card hover lift (standardised) ----------------------------------- */
.course-card, .ai-card, .feature-card, .choice-card, .audience-card, .readiness-grid article, .course-tile {
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .course-card:hover, .ai-card:hover, .feature-card:hover, .choice-card:hover, .audience-card:hover, .readiness-grid article:hover, .course-tile:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--line-strong);
  }
}

/* --- Primary-button feedback + brand gradient ------------------------- */
.solid, .primary-link, button.primary, .form-stack button[type="submit"], .cta-actions .solid {
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease), filter var(--dur-2) var(--ease);
}
@media (prefers-reduced-motion: no-preference) {
  .solid:hover, .primary-link:hover, button.primary:hover, .form-stack button[type="submit"]:hover, .cta-actions .solid:hover { transform: translateY(-1px); box-shadow: var(--shadow-brand); }
  .solid:active, .primary-link:active, button.primary:active { transform: translateY(1px) scale(.99); }
}

/* --- Hero aurora (signature depth) ------------------------------------ */
.home-hero { position: relative; overflow: hidden; }
.home-hero > * { position: relative; z-index: 1; }
.home-hero::before, .home-hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(64px); opacity: .18; z-index: 0; pointer-events: none;
}
.home-hero::before { width: 460px; height: 460px; top: -140px; right: -80px; background: var(--teal-vivid); }
.home-hero::after { width: 380px; height: 380px; bottom: -160px; left: -60px; background: var(--gold); opacity: .14; }
@media (prefers-reduced-motion: no-preference) {
  .home-hero::before { animation: aurora-a 22s var(--ease) infinite alternate; }
  .home-hero::after { animation: aurora-b 26s var(--ease) infinite alternate; }
}
@keyframes aurora-a { to { transform: translate(-34px, 26px) scale(1.08); } }
@keyframes aurora-b { to { transform: translate(30px, -22px) scale(1.06); } }

/* --- Reveal-on-scroll (JS adds .is-in; .js gate keeps no-JS visible) --- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1 !important; transform: none !important; } }

/* --- Brand logo (inline SVG) ------------------------------------------ */
.brand-logo { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo svg { width: 34px; height: 34px; flex: none; }
.brand-logo .brand-word { font-family: var(--font-display); font-weight: 400; font-size: 19px; letter-spacing: -.02em; color: var(--ink); }
.brand-logo .brand-word b { color: var(--teal); font-weight: 400; }

/* --- Login: branded gradient panel ------------------------------------ */
.auth-promise { background: var(--grad-brand-deep); color: #fff; border-radius: var(--radius-lg); padding: clamp(32px, 4vw, 54px); position: relative; overflow: hidden; }
.auth-promise::after { content: ""; position: absolute; width: 340px; height: 340px; right: -120px; bottom: -140px; border-radius: 50%; background: rgba(255,255,255,.10); filter: blur(50px); }
.auth-promise > * { position: relative; z-index: 1; }
.auth-promise h1, .auth-promise h2, .auth-promise p, .auth-promise .lead, .auth-promise li { color: #fff; }
.auth-promise .lead, .auth-promise p { color: rgba(255,255,255,.85); }
.auth-promise .auth-list span::before, .auth-promise li::before { color: #fff; }
.login-card { box-shadow: var(--shadow-lg); border-radius: var(--radius-lg); }

/* --- Account security: two-factor (MFA) enrolment panel ---------------- */
.mfa-status { padding: 12px 14px; border-radius: 10px; font-weight: 400; font-size: 12px; margin-bottom: 16px; }
.mfa-status:empty { display: none; }
.mfa-status.is-on { background: #e3f4ec; color: var(--success); }
.mfa-status.is-off { background: var(--gold-soft); color: #8a6611; }
:root[data-theme="dark"] .mfa-status.is-on { background: #123026; }
:root[data-theme="dark"] .mfa-status.is-off { color: var(--gold); }
/* The key and URI are entered by hand, so make one click select the whole value. */
.mfa-key, .mfa-uri { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; user-select: all; overflow-wrap: break-word; }
.mfa-key { letter-spacing: 1px; }
.mfa-uri { font-size: 12px; }


/* ======================================================================
   Community UI (20260721-community)
   Surfaces the v2.5.12 community backend in the feed: body search, the
   "edited" tag, threaded replies and inline author editing. Additive —
   the pre-existing community rules above are untouched.
   ====================================================================== */

/* Feed search (drives ?q= on /api/community/feed) */
.community-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.community-search-input { flex: 1 1 220px; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13px; }
.community-search-input::-webkit-search-cancel-button { cursor: pointer; }

/* The `hidden` property needs help here: the base `button` rule and the two
   layout rules below set `display`, and an author rule beats the UA's
   [hidden] { display: none } — same reason .ab-block[hidden] exists above.
   Without these the comment panel never collapses and "Load more" shows even
   when there is no next page (clicking it re-appends page one). */
.community-search-clear[hidden] { display: none; }
.community-comments[hidden] { display: none; }
.community-more[hidden] { display: none; }

/* "Edited" tag — sits with the author group, ahead of the flush-right time */
.community-edited { font-size: 11px; font-style: italic; color: var(--muted); }

/* Threaded replies: each level reuses the comment rule's left rail */
.community-replies { display: grid; gap: 10px; margin-top: 8px; }
.community-comment-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.community-comment-actions .text-button { font-size: 11.5px; }
.community-reply-form { margin-top: 8px; }

/* Inline author editing (PATCH post/comment) */
.community-edit-form { display: grid; gap: 8px; }
.community-edit-form textarea { width: 100%; }
.community-edit-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.community-search-input:focus-visible, .community-search button:focus-visible,
.community-comment button:focus-visible,
.community-edit-form button:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 2px; }

@media (max-width: 560px) {
  .community-search-input { flex: 1 1 auto; }
  .community-replies { margin-left: -4px; }
}
