/* True Hair Education hub. One stylesheet, no build step.
   Layout and flow follow a calm member hub pattern: centered logo home, big tab buttons,
   accordion course cards, slim lesson nav, header band, 740px reading column.
   Brand: Brenda's logo, #8B6C4F brown, warm neutrals. One plain readable sans (DM Sans). */

:root {
  --accent: #8b6c4f;        /* fills, borders, buttons (white text on it is 4.8:1) */
  --accent-ink: #7a5d43;    /* accent colored TEXT, AA on every background we use */
  --accent-dark: #6b5240;
  --accent-tint: #f4ece4;
  --accent-soft: #e9dccf;
  --check-line: #a0846b;    /* checkbox and control borders, 3:1 on white */

  --ink: #2b231d;
  --text: #3d3028;
  --muted: #6b5d52;
  --line: #ebe2d9;
  --line-strong: #d9cbbd;
  --card: #ffffff;
  --field: #faf7f3;
  --bg: #f8f4ef;
  --bg-grad: linear-gradient(170deg, #f5eadf 0%, #efdfcf 14%, #f8f4ef 34%, #f8f4ef 66%, #f3e6d8 86%, #ecdbca 100%);
  --band-grad: linear-gradient(180deg, #fcfaf7 0%, #f4e9de 100%);

  --ok: #2f6b45;
  --ok-tint: #e8f2eb;
  --error: #a3312a;
  --error-tint: #fbecea;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-card: 14px;
  --radius-lg: 16px;
  --radius-tab: 20px;
  --shadow-card: 0 1px 4px rgba(42, 31, 20, 0.06);
  --shadow-raised: 0 2px 8px rgba(42, 31, 20, 0.06), 0 8px 24px rgba(42, 31, 20, 0.08);
  --shadow-player: 0 4px 20px rgba(42, 31, 20, 0.15);

  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --content: 740px;
  --max: 1100px;
  --gutter: 1.25rem;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-wrap: break-word;
}
html { background: var(--bg); }
body.grad { background: var(--bg-grad); }
img, svg, video { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: 1.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { padding-left: 1.25em; }
@media (min-width: 40em) { h1 { font-size: 2.25rem; } }

:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; border-radius: 4px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 0.75rem; color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.loading { color: var(--muted); padding: 1.5rem 0; text-align: center; }
[hidden] { display: none !important; }

svg { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.875rem; padding: 0.7rem 1.6rem;
  background: var(--accent); color: #fff; border: 2px solid var(--accent);
  border-radius: 99px; font-weight: 600; font-size: 0.95rem; line-height: 1.2;
  text-decoration: none; text-align: center;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--accent-tint); color: var(--ink); border-color: var(--check-line); }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 2.5rem; padding: 0.45rem 1.1rem; font-size: 0.875rem; }
.link-btn {
  background: none; border: 0; padding: 0; color: var(--accent-ink); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- demo ribbon ---------- */
.demo-ribbon {
  background: var(--ink); color: #fff; text-align: center;
  font-size: 0.8rem; padding: 0.4rem var(--gutter); line-height: 1.4;
}
.demo-ribbon .link-btn { color: #fff; margin-left: 0.4rem; }

/* ---------- account chip (home) ---------- */
.acct { position: absolute; top: 1rem; right: 1rem; z-index: 20; }
.demo-on .acct { top: 2.6rem; }
.acct-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #fff; border: 1px solid var(--line); border-radius: 99px;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem; min-height: 2.75rem;
  font-weight: 600; font-size: 0.9rem; color: var(--ink); box-shadow: var(--shadow-card);
}
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 0.85rem; line-height: 1;
}
.avatar.lg { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
.avatar.sm { width: 1.75rem; height: 1.75rem; font-size: 0.75rem; }
.avatar.member { background: var(--accent-soft); color: var(--ink); }
.acct-btn .caret { width: 0.8em; height: 0.8em; color: var(--muted); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 0.4rem); min-width: 11rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-raised); padding: 0.35rem; list-style: none; margin: 0;
}
.acct-menu a, .acct-menu button {
  display: block; width: 100%; text-align: left; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; background: none; border: 0; font-size: 0.92rem; font-weight: 500;
}
.acct-menu a:hover, .acct-menu button:hover { background: var(--accent-tint); }

/* ---------- home ---------- */
.home { position: relative; min-height: 100vh; display: flex; flex-direction: column; }
.home-hero { text-align: center; padding: 4.75rem var(--gutter) 1.75rem; }
@media (max-width: 40em) { .home-hero { padding-top: 5.25rem; } }
.home-hero .logo { width: min(220px, 52vw); display: block; margin: 0 auto; }
.home-hero .hello { margin: 1.1rem 0 0; color: var(--muted); font-size: 1.02rem; }
.home-main { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 var(--gutter) 2rem; flex: 1; }

.news { display: grid; gap: 0.65rem; max-width: 760px; margin: 0 auto 1.25rem; }
.news-row {
  display: flex; align-items: center; gap: 0.85rem;
  background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.75rem 1rem; color: var(--text); text-decoration: none; font-size: 0.93rem; line-height: 1.45;
}
.news-row:hover { background: #fff; color: var(--ink); }
.news-row .tag {
  flex: none; background: var(--accent-tint); color: var(--accent-ink);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 0.25rem 0.6rem; border-radius: 99px;
}
.news-row .txt { flex: 1; min-width: 0; }
.news-row .arr { flex: none; color: var(--accent-ink); }
@media (max-width: 30em) {
  .news-row { display: grid; grid-template-columns: 1fr auto; column-gap: 0.75rem; row-gap: 0.4rem; }
  .news-row .tag { justify-self: start; }
  .news-row .txt { grid-column: 1; }
  .news-row .arr { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

.tabs-big { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0 0 1.25rem; }
.tab-big {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 6.5rem; padding: 1rem 0.5rem;
  background: rgba(255, 255, 255, 0.8); border: 2px solid var(--line-strong); border-radius: var(--radius-tab);
  color: var(--ink); font-weight: 600; font-size: 1.05rem; line-height: 1.2;
}
.tab-big svg { width: 1.6rem; height: 1.6rem; color: var(--accent); }
.tab-big:hover { border-color: var(--accent); background: #fff; }
.tab-big[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-big[aria-selected="true"] svg { color: #fff; }
.tab-big .count { font-size: 0.78rem; font-weight: 500; opacity: 0.85; }
@media (max-width: 40em) {
  .tabs-big { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .tab-big { min-height: 5.5rem; font-size: 1rem; }
}

.panel-stack { display: grid; gap: 0.9rem; }
.panel-empty { text-align: center; background: rgba(255,255,255,.8); border-radius: var(--radius-lg); padding: 2rem 1.25rem; color: var(--muted); }

/* parent cards (accordion) */
.pcard { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); overflow: hidden; }
.pcard-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
  width: 100%; padding: 0.9rem 1.1rem 0.9rem 0.9rem; background: none; border: 0; text-align: left;
  color: var(--ink); text-decoration: none;
}
a.pcard-head:hover, button.pcard-head:hover { background: #fdfbf9; color: var(--ink); }
.pcard-thumb { width: 7.5rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); display: block; background: var(--accent-tint); }
.pcard-title { display: block; font-weight: 600; font-size: 1.08rem; line-height: 1.3; }
.pcard-meta { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--muted); font-size: 0.85rem; line-height: 1.45; margin-top: 0.15rem; }
.pcard-chev { color: var(--accent); width: 1.3rem; height: 1.3rem; transition: transform 0.2s; }
.pcard-head[aria-expanded="true"] .pcard-chev { transform: rotate(180deg); }
.pcard-body { border-top: 1px solid var(--line); padding: 0.5rem 0.6rem 0.75rem; }
.pcard .price { color: var(--accent-ink); font-weight: 600; }
@media (max-width: 30em) {
  .pcard-head { grid-template-columns: auto 1fr auto; gap: 0.75rem; padding: 0.75rem 0.85rem 0.75rem 0.75rem; }
  .pcard-thumb { width: 5.25rem; }
  .pcard-title { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.bar { display: block; height: 5px; background: var(--accent-tint); border-radius: 99px; overflow: hidden; margin-top: 0.45rem; max-width: 16rem; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

.mod-label {
  margin: 0.75rem 0.85rem 0.15rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted);
}
.mlinks { list-style: none; margin: 0; padding: 0; }
.mlink {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.65rem 0.85rem; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-size: 0.93rem; font-weight: 500; line-height: 1.4;
}
.mlink:hover { background: var(--accent-tint); color: var(--ink); }
.mlink .txt { flex: 1; min-width: 0; }
.mlink .dur { color: var(--muted); font-size: 0.8rem; font-weight: 400; margin-left: 0.4rem; white-space: nowrap; }
.mlink .arr { color: var(--accent-ink); flex: none; }
.mlink.resume { background: var(--accent-tint); color: var(--ink); font-weight: 600; margin-bottom: 0.25rem; }
.mlink.resume .lbl { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent-ink); }
.tick {
  display: inline-grid; place-items: center; flex: none; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  border: 2px solid var(--check-line); color: transparent;
}
.tick svg { width: 0.8rem; height: 0.8rem; }
.is-done .tick { background: var(--accent); border-color: var(--accent); color: #fff; }

.site-foot { text-align: center; padding: 2rem var(--gutter) 2.5rem; font-size: 0.85rem; color: var(--muted); }
.site-foot a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot .sep { margin: 0 0.35rem; color: var(--muted); }
.site-foot p { margin: 0.35rem 0 0; }
.site-foot.lined { border-top: 1px solid var(--line); margin-top: 2rem; }

/* ---------- slim top nav (inner pages) ---------- */
.topnav {
  position: relative; background: #fff; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.75rem;
  min-height: 3.75rem; padding: 0.35rem var(--gutter);
}
.topnav .back {
  justify-self: start; display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--muted); font-weight: 600; font-size: 0.9rem; text-decoration: none; padding: 0.5rem 0;
}
.topnav .back:hover { color: var(--ink); }
.topnav .mark img { height: 2.25rem; width: auto; display: block; }
.topnav .right { justify-self: end; display: flex; align-items: center; gap: 0.5rem; }
@media (max-width: 26em) { .topnav .back .long { display: none; } }

.progress-top { position: sticky; top: 0; z-index: 30; background: #fff; text-align: center; }
.progress-top .txt { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); padding: 0.3rem 0 0.25rem; }
.progress-top .track { display: block; height: 4px; background: var(--accent-tint); }
.progress-top .track span { display: block; height: 100%; background: var(--accent); transition: width 0.3s; }

/* ---------- header band ---------- */
.band { background: var(--band-grad); text-align: center; padding: 2.5rem var(--gutter) 2.25rem; border-bottom: 1px solid var(--line); }
.band-label { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 0.6rem; }
.band h1 { max-width: 46rem; margin: 0 auto 0.5rem; }
.band-sub { max-width: 38rem; margin: 0 auto; color: var(--muted); font-size: 1.02rem; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45rem; margin-top: 0.9rem; }
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--accent-tint); color: var(--accent-ink); border-radius: 99px;
  padding: 0.25rem 0.75rem; font-size: 0.8rem; font-weight: 600; line-height: 1.4;
}
.badge svg { width: 0.85rem; height: 0.85rem; }
.badge.solid { background: var(--accent); color: #fff; }
.badge.line { background: #fff; border: 1px solid var(--line-strong); color: var(--muted); }
.badge.ok { background: var(--ok-tint); color: var(--ok); }

/* ---------- page body: 740 column + side ---------- */
.page { max-width: var(--max); margin: 0 auto; padding: 2rem var(--gutter) 1rem; display: flex; gap: 2.5rem; align-items: flex-start; }
.page.solo { justify-content: center; }
.main { flex: 1 1 auto; min-width: 0; max-width: var(--content); }
.page.solo .main { margin: 0 auto; }
.side { flex: 0 0 15rem; position: sticky; top: 4.5rem; max-height: calc(100vh - 5.5rem); overflow: auto; padding-bottom: 1rem; }
@media (max-width: 63.99em) { .side.toc-only { display: none; } .page { display: block; } .main { margin: 0 auto; } }

.side-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.6rem; }
.toc { list-style: none; margin: 0 0 1.25rem; padding: 0; border-left: 2px solid var(--line); }
.toc a {
  display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.4rem 0.5rem 0.4rem 0.9rem; margin-left: -2px;
  border-left: 2px solid transparent; color: var(--muted); font-size: 0.88rem; line-height: 1.4; text-decoration: none;
}
.toc a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.toc a[aria-current="page"], .toc a[aria-current="true"] { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
.toc .tick { width: 1.05rem; height: 1.05rem; margin-top: 0.1rem; }
.toc .tick svg { width: 0.65rem; height: 0.65rem; }
.toc-mod { font-size: 0.8rem; font-weight: 600; color: var(--ink); margin: 1rem 0 0.35rem; }
.toc-mod:first-of-type { margin-top: 0; }

/* ---------- section cards ---------- */
.card { background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow-card); border: 1px solid var(--line); padding: 1.6rem 1.75rem; margin: 0 0 1.25rem; }
.card.tint { background: #fbf6f0; }
.card-label { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 0.4rem; }
.card > h2:first-child, .card-label + h2 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
@media (max-width: 30em) { .card { padding: 1.25rem 1.1rem; } }
.prose h2 { font-size: 1.15rem; margin-top: 1.5rem; }
.prose h2.card-label, h2.card-label { font-size: 0.75rem; margin: 0 0 0.6rem; line-height: 1.4; }
.prose blockquote { margin: 1.25rem 0; padding: 0.8rem 1rem; border-left: 3px solid var(--accent); background: #fbf6f0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink); }
.prose li { margin-bottom: 0.3rem; }
.signoff { font-weight: 600; color: var(--ink); }

.cta-box { background: var(--accent-tint); border-radius: var(--radius); padding: 1.5rem 1.25rem; text-align: center; margin: 0 0 1.25rem; }
.cta-box p { color: var(--ink); font-weight: 500; margin-bottom: 0.9rem; }
.cta-box .sub { display: block; font-weight: 400; color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; }
.cta-box .alt { margin: 0.9rem 0 0; font-size: 0.88rem; font-weight: 400; }

/* pill tabs */
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.pill {
  display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0.4rem 1.1rem;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 99px;
  color: var(--ink); font-weight: 600; font-size: 0.88rem; text-decoration: none;
}
.pill:hover { border-color: var(--accent); color: var(--ink); }
.pill[aria-current="page"], .pill[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill .tick { width: 1rem; height: 1rem; margin-right: 0.35rem; border-width: 1.5px; }
.pill[aria-current="page"] .tick { border-color: #fff; }
.pill.is-done[aria-current="page"] .tick { background: #fff; color: var(--accent); }
.pill .tick svg { width: 0.6rem; height: 0.6rem; }

/* ---------- lesson ---------- */
.player { position: relative; aspect-ratio: 16 / 9; background: #1f1915; border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-player); margin: 0 0 1.25rem; }
.player video { width: 100%; height: 100%; display: block; background: #1f1915; }
.player-demo { position: absolute; inset: 0; }
.player-demo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-demo .inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; color: #fff; text-align: center; padding: 1rem; }
.play-circle { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.play-circle svg { width: 1.6rem; height: 1.6rem; margin-left: 0.2rem; }
.player-demo .label { font-size: 0.88rem; font-weight: 500; background: rgba(0,0,0,.35); padding: 0.25rem 0.75rem; border-radius: 99px; }

.check-row {
  display: flex; align-items: flex-start; gap: 0.85rem; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 1rem 1.25rem; margin: 0 0 1.25rem;
  box-shadow: var(--shadow-card); color: var(--text);
}
.check-row:hover { border-color: var(--check-line); }
.check-row .box {
  flex: none; width: 1.5rem; height: 1.5rem; border: 2px solid var(--check-line); border-radius: 6px;
  display: grid; place-items: center; color: transparent; margin-top: 0.05rem; background: #fff;
}
.check-row .box svg { width: 1rem; height: 1rem; }
.check-row[aria-pressed="true"] .box { background: var(--accent); border-color: var(--accent); color: #fff; }
.check-row strong { display: block; color: var(--ink); font-weight: 600; }
.check-row .sub { display: block; color: var(--muted); font-size: 0.88rem; }

.dl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.dl-list a {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-weight: 500;
}
.dl-list a:hover { background: var(--accent-tint); border-color: var(--line-strong); }
.dl-list svg { color: var(--accent); }
.dl-list .txt { flex: 1; min-width: 0; }
.dl-list .meta { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 400; }

.prev-link { text-align: center; font-size: 0.9rem; margin: 0 0 1.5rem; }

/* course drawer (under 64em the "In this course" list slides in from the right) */
.lessons-btn { display: none; }
.drawer-head { display: none; }
@media (max-width: 63.99em) {
  .lessons-btn { display: inline-flex; }
  .side.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(22rem, 88vw); max-height: none; z-index: 60;
    background: #fff; box-shadow: -8px 0 32px rgba(42,31,20,.18); padding: 1rem 1.25rem 2rem;
    transform: translateX(105%); transition: transform 0.25s; visibility: hidden; overflow: auto;
  }
  .side.drawer.open { transform: none; visibility: visible; }
  .drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
  .page.course { display: block; }
  .side .desk { display: none; }
}
.drawer-backdrop { position: fixed; inset: 0; background: rgba(31, 25, 21, 0.4); z-index: 55; }
.icon-btn { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); }

/* ---------- offer ---------- */
.hero-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-card); box-shadow: var(--shadow-player); margin: 0 0 1.25rem; background: var(--accent-tint); }
.learn-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.learn-list li { display: flex; gap: 0.65rem; align-items: flex-start; }
.learn-list svg { color: var(--accent); margin-top: 0.2rem; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.rows li { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 0.8rem 1rem; }
.rows details summary { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; list-style: none; }
.rows details summary::-webkit-details-marker { display: none; }
.rows .r-title { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); line-height: 1.35; }
.rows .r-count { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.rows .chev { color: var(--accent); transition: transform 0.2s; }
.rows details[open] .chev { transform: rotate(180deg); }
.rows ol { margin: 0.6rem 0 0.1rem; padding-left: 1.3em; color: var(--text); font-size: 0.92rem; }
.rows ol li { border: 0; padding: 0.15rem 0; }

.choice-group { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.6rem; }
.choice-group legend { font-weight: 600; color: var(--ink); margin-bottom: 0.6rem; padding: 0; }
.choice { display: flex; gap: 0.75rem; align-items: flex-start; border: 2px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1rem; cursor: pointer; background: #fff; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--accent); background: #fdf9f5; }
.choice input { width: 1.2rem; height: 1.2rem; margin: 0.2rem 0 0; accent-color: var(--accent); flex: none; }
.choice .c-title { display: block; font-weight: 600; color: var(--ink); }
.choice .c-amount { display: block; font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.choice .c-note { display: block; color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.solo-price { font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1.2; margin: 0 0 0.2rem; }
.fine { color: var(--muted); font-size: 0.82rem; text-align: center; margin: 0.75rem 0 0; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 0.85rem 0; font-weight: 600; color: var(--ink); list-style-position: inside; }
.faq details p { margin: 0 0 1rem; }

/* ---------- community ---------- */
.composer label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 0.4rem; }
.textarea, .input {
  display: block; width: 100%; background: var(--field); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 0.75rem 0.9rem; color: var(--ink); line-height: 1.5;
}
.textarea { min-height: 6rem; resize: vertical; }
.textarea:focus, .input:focus { outline: 3px solid var(--accent-ink); outline-offset: 1px; background: #fff; }
.input[aria-invalid="true"] { border-color: var(--error); }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 0.75rem; flex-wrap: wrap; }
.composer-foot .hint { margin: 0; }

.post { padding: 1.35rem 1.5rem; }
@media (max-width: 30em) { .post { padding: 1.1rem 1rem; } }
.post.pinned { border-color: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow-card); }
.post-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.75rem; }
.post-head .who { flex: 1; min-width: 0; line-height: 1.3; }
.post-head .name { font-weight: 600; color: var(--ink); }
.post-head .when { display: block; color: var(--muted); font-size: 0.8rem; }
.post-head .badge { margin-left: 0.35rem; font-size: 0.72rem; padding: 0.1rem 0.55rem; vertical-align: 0.1em; }
.post-head .when .badge { margin: 0 0.4rem 0 0; }
.post h2 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.post-body > :last-child { margin-bottom: 0; }
.post-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.act {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.5rem; padding: 0.35rem 0.85rem;
  background: none; border: 1px solid transparent; border-radius: 99px; color: var(--muted); font-weight: 600; font-size: 0.86rem;
}
.act:hover { background: var(--accent-tint); color: var(--ink); }
.act[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-tint); }
.act[aria-pressed="true"] svg path { fill: currentColor; }
.act.danger:hover { color: var(--error); background: var(--error-tint); }
.comments { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.comment { display: flex; gap: 0.6rem; align-items: flex-start; }
.comment .bubble { flex: 1; min-width: 0; background: var(--field); border-radius: var(--radius); padding: 0.55rem 0.8rem; font-size: 0.93rem; }
.comment .name { font-weight: 600; color: var(--ink); font-size: 0.86rem; }
.comment .when { color: var(--muted); font-size: 0.76rem; margin-left: 0.35rem; }
.comment p { margin: 0.1rem 0 0; }
.comment .act { min-height: 2rem; padding: 0.15rem 0.5rem; font-size: 0.78rem; margin-top: 0.15rem; }
.comment-form { display: flex; gap: 0.5rem; margin-top: 0.75rem; align-items: flex-start; }
.comment-form .input { flex: 1; min-width: 0; padding: 0.55rem 0.8rem; }
.comment-form .btn { flex: none; }

.replay-tools { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.replay-tools .input { flex: 1 1 14rem; }
.replay-tools .count { color: var(--muted); font-size: 0.88rem; }
.replay-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 40em) { .replay-grid { grid-template-columns: 1fr; } }
.replay { background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-raised); overflow: hidden; }
.replay a { display: block; color: inherit; text-decoration: none; }
.rp-poster { position: relative; aspect-ratio: 16 / 9; background: #2b231d; color: #fff; }
.rp-poster img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(0.5); }
.rp-poster .over { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 1rem; }
.rp-poster .eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; }
.rp-poster .t { font-weight: 600; font-size: 1.05rem; line-height: 1.3; margin-right: 3.5rem; }
.rp-poster .play-circle { position: absolute; right: 1rem; bottom: 1rem; width: 2.75rem; height: 2.75rem; }
.rp-poster .play-circle svg { width: 1.1rem; height: 1.1rem; }
.rp-info { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 1rem; font-size: 0.85rem; color: var(--muted); }
.rp-info .done { color: var(--accent-ink); font-weight: 600; }
.replay a:hover .t { text-decoration: underline; }

/* ---------- auth + account (single centered card) ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 3rem var(--gutter) 1.5rem; }
.auth-logo { width: min(180px, 50vw); display: block; margin: 0 auto 1.5rem; }
.auth-card { width: 100%; max-width: 27.5rem; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); padding: 2rem 1.75rem; }
.auth-card.wide { max-width: 32rem; }
.auth-card h1 { font-size: 1.6rem; text-align: center; margin-bottom: 0.35rem; }
.auth-card .intro { text-align: center; color: var(--muted); margin-bottom: 1.5rem; }
.auth-card .mail-icon { display: block; width: 3rem; height: 3rem; margin: 0 auto 0.75rem; color: var(--accent); }
@media (max-width: 30em) { .auth-card { padding: 1.5rem 1.1rem; } }
.auth .site-foot { padding-top: 1.5rem; }

.field { margin: 0 0 1.1rem; }
.field-label, .field label { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.hint { display: block; color: var(--muted); font-size: 0.84rem; margin-top: 0.4rem; line-height: 1.45; }
.error-text { color: var(--error); font-size: 0.88rem; font-weight: 500; margin: 0.4rem 0 0; }
.readonly { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem 0.9rem; color: var(--ink); overflow-wrap: anywhere; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.center { text-align: center; }
.stack { display: grid; gap: 0.75rem; }

.purchases { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.purchase { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.9rem; }
.purchase .p-top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: flex-start; }
.purchase .p-title { font-weight: 600; color: var(--ink); line-height: 1.35; }
.purchase .p-meta { display: block; color: var(--muted); font-size: 0.84rem; margin-top: 0.15rem; }
.purchase .badge { flex: none; font-size: 0.72rem; }

/* ---------- notices, toast, dialog ---------- */
.notice { border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0 0 1rem; font-size: 0.92rem; line-height: 1.5; }
.notice-ok { background: var(--ok-tint); color: var(--ok); }
.notice-error { background: var(--error-tint); color: var(--error); }
.notice-info { background: var(--accent-tint); color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 90;
  background: var(--ink); color: #fff; padding: 0.75rem 1.1rem; border-radius: var(--radius);
  box-shadow: var(--shadow-raised); font-size: 0.92rem; max-width: calc(100vw - 2rem); width: max-content; text-align: center;
}
.hub-dialog { border: 0; border-radius: var(--radius-lg); padding: 1.75rem 1.5rem 1.5rem; max-width: min(28rem, calc(100vw - 2rem)); box-shadow: var(--shadow-raised); color: var(--text); }
.hub-dialog::backdrop { background: rgba(31, 25, 21, 0.45); }
.hub-dialog h2 { font-size: 1.25rem; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }

/* ---------- friendly error state ---------- */
.error-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 1.75rem 1.5rem; margin: 1rem auto; max-width: 32rem; text-align: center; }
.error-card .error-title { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin: 0 0 0.4rem; }
.error-card p { color: var(--text); }
.error-card .btn { margin-top: 0.4rem; }
.error-card:focus { outline: none; }

/* ---------- "Quiz" label in lesson lists ---------- */
.qtag { display: inline-block; vertical-align: 0.1em; margin-left: 0.4rem; padding: 0.05rem 0.45rem; border-radius: 99px; background: var(--accent-tint); color: var(--accent-ink); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.5; white-space: nowrap; }
.pill[aria-current="page"] .qtag { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- video not uploaded yet ---------- */
.video-soon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; text-align: center; aspect-ratio: 16 / 9; background: var(--accent-tint); border: 1px dashed var(--line-strong); border-radius: var(--radius-card); padding: 1.25rem; margin: 0 0 1.25rem; color: var(--text); }
.video-soon .vs-icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%; background: #fff; color: var(--accent-ink); }
.video-soon .vs-icon svg { width: 1.4rem; height: 1.4rem; }
.video-soon .vs-title { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin: 0; }
.video-soon p { margin: 0; max-width: 26rem; font-size: 0.92rem; }
@media (max-width: 30em) { .video-soon { aspect-ratio: auto; min-height: 12rem; } }

/* ---------- quiz ---------- */
.quiz-intro { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 1rem; }
.quiz-form { margin: 0 0 1.25rem; }
.q-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 1.35rem 1.5rem; margin: 0 0 1rem; }
.q-card fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-card legend { padding: 0; margin: 0 0 0.85rem; font-weight: 600; color: var(--ink); font-size: 1.02rem; line-height: 1.45; }
.q-card legend .q-num { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 0.25rem; }
.q-card.missing { border-color: var(--error); }
.q-card .error-text { margin: 0.6rem 0 0; }
.q-choices { display: grid; gap: 0.5rem; }
.q-choice { display: flex; gap: 0.7rem; align-items: flex-start; border: 2px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.9rem; background: #fff; cursor: pointer; color: var(--text); line-height: 1.45; }
.q-choice:hover { border-color: var(--line-strong); }
.q-choice:has(input:checked) { border-color: var(--accent); background: #fdf9f5; color: var(--ink); }
.q-choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.q-choice input { width: 1.15rem; height: 1.15rem; margin: 0.15rem 0 0; accent-color: var(--accent); flex: none; }
.quiz-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.quiz-submit .error-text { margin: 0; }

.q-result { background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow-card); border: 1px solid var(--line); padding: 1.6rem 1.5rem; margin: 0 0 1rem; text-align: center; }
.q-result:focus { outline: none; }
.q-result .score { font-size: 2.6rem; font-weight: 700; color: var(--ink); line-height: 1.1; margin: 0.35rem 0 0.25rem; }
.q-result .verdict { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; padding: 0.25rem 0.8rem; border-radius: 99px; font-size: 0.9rem; }
.q-result .verdict svg { width: 0.95rem; height: 0.95rem; }
.q-result.pass .verdict { background: var(--ok-tint); color: var(--ok); }
.q-result.notyet .verdict { background: var(--accent-tint); color: var(--accent-ink); }
.q-result .r-sub { color: var(--muted); margin: 0.6rem 0 1rem; }
.q-result .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }

.q-review { margin: 0 0 1.25rem; }
.q-review .q-card { padding: 1.2rem 1.35rem; }
.q-review .q-head { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0 0 0.7rem; }
.q-review .q-head .q-text { font-weight: 600; color: var(--ink); line-height: 1.45; }
.q-mark { flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; margin-top: 0.05rem; }
.q-mark svg { width: 0.9rem; height: 0.9rem; }
.q-card.right .q-mark { background: var(--ok-tint); color: var(--ok); }
.q-card.wrong .q-mark { background: var(--error-tint); color: var(--error); }
.q-ans { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.q-ans li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.55rem 0.8rem; font-size: 0.93rem; color: var(--text); }
.q-ans li .who { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.q-ans li.is-correct { border-color: var(--ok); background: var(--ok-tint); color: var(--ink); }
.q-ans li.is-correct .who { color: var(--ok); }
.q-ans li.is-wrong { border-color: var(--error); background: var(--error-tint); color: var(--ink); }
.q-ans li.is-wrong .who { color: var(--error); }
.q-feedback { margin: 0.7rem 0 0; padding: 0.6rem 0.8rem; border-left: 3px solid var(--accent); background: #fbf6f0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 0.92rem; color: var(--text); }
@media (max-width: 30em) { .q-card, .q-result { padding: 1.1rem 1rem; } }
