/* ==========================================================================
   BagpipeLessons.com Studio — Design System v2 (Aug 2026)
   Light-first with dark mode. Inter + system sans.
   ========================================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Light theme (default) */
  --bg: #faf8f4;
  --bg-alt: #f3efe8;
  --surface: #ffffff;
  --surface-hover: #fdfcfa;
  --ink: #16233b;
  --ink-soft: #47536b;
  --ink-muted: #7a8499;
  --border: #e7e1d5;
  --border-strong: #d8d0c0;
  --accent: #2f6fed;
  --accent-soft: #e8effd;
  --accent-hover: #1e5cd8;
  --cta: #12294b;
  --cta-hover: #1d3f73;
  --gold: #b98a2e;
  --gold-soft: #faf3e3;
  --green: #14935c;
  --green-soft: #e3f5ec;
  --panel-dark: #101a2e;
  --panel-dark-2: #1a2642;
  --shadow-sm: 0 1px 2px rgba(22,35,59,0.05);
  --shadow-md: 0 6px 24px -8px rgba(22,35,59,0.12);
  --shadow-lg: 0 24px 64px -24px rgba(22,35,59,0.25);
  --mark-bg: #fdeeb8;
  --mark-ink: #4a3a08;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'SF Mono', 'Cascadia Code', ui-monospace, Menlo, Consolas, monospace;
  --max: 1160px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px; --r-pill: 999px;
}

html[data-theme="dark"] {
  --bg: #0d1423;
  --bg-alt: #0a101d;
  --surface: #131d33;
  --surface-hover: #18243d;
  --ink: #f2f5fb;
  --ink-soft: #b7c1d9;
  --ink-muted: #71809f;
  --border: #223052;
  --border-strong: #2e3f68;
  --accent: #6b9dff;
  --accent-soft: #17284d;
  --accent-hover: #8cb2ff;
  --cta: #3d5f8f;
  --cta-hover: #4b73ab;
  --gold: #d4a853;
  --gold-soft: #2a2410;
  --green: #34d399;
  --green-soft: #0d2b21;
  --panel-dark: #0a101d;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 6px 24px -8px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 64px -24px rgba(0,0,0,0.7);
  --mark-bg: #6b5716;
  --mark-ink: #fdeeb8;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
mark { background: var(--mark-bg); color: var(--mark-ink); border-radius: 3px; padding: 0 2px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Eyebrow labels (mono, like the reference) ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--r-pill);
  padding: 5px 14px;
  margin-bottom: 18px;
}
.eyebrow.gold { color: var(--gold); background: var(--gold-soft); }
.eyebrow.plain { background: none; padding: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  height: 66px; display: flex; align-items: center; gap: 10px;
}
.brand {
  font-weight: 800; font-size: 17.5px; color: var(--ink);
  display: flex; align-items: center; gap: 9px; margin-right: 10px; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.brand .studio { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links > a, .nav-drop > button {
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  padding: 8px 13px; border-radius: var(--r-pill); border: none; background: none;
  font-family: var(--font); cursor: pointer; white-space: nowrap;
}
.nav-links > a:hover, .nav-drop > button:hover { color: var(--ink); background: var(--bg-alt); }
.nav-links > a.active { color: var(--accent); background: var(--accent-soft); }
.nav-drop { position: relative; }
.nav-drop > button::after { content: ' ▾'; font-size: 11px; opacity: 0.6; }
.nav-drop-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  padding: 8px; min-width: 250px; z-index: 300;
}
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { display: block; }
.nav-drop-menu a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
}
.nav-drop-menu a:hover { background: var(--bg-alt); color: var(--ink); }
.nav-drop-menu a .count { font-size: 11.5px; color: var(--ink-muted); font-family: var(--mono); }
.nav-search-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-muted); font-family: var(--font); font-size: 13.5px;
  padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer;
  transition: border-color .15s;
}
.nav-search-btn:hover { border-color: var(--accent); color: var(--ink-soft); }
.nav-search-btn kbd {
  font-family: var(--mono); font-size: 11px; border: 1px solid var(--border-strong);
  border-radius: 4px; padding: 1px 5px; color: var(--ink-muted);
}
.theme-toggle {
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { border-color: var(--accent); }
.nav-links > a.nav-cta, .nav-cta {
  background: var(--cta); color: #fff !important; font-weight: 700; font-size: 13.5px;
  padding: 9px 18px; border-radius: var(--r-pill); white-space: nowrap;
}
.nav-links > a.nav-cta:hover, .nav-cta:hover { background: var(--cta-hover); color: #fff; }

/* ---------- Hero ---------- */
.hero { padding: 84px 24px 64px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -40% -20%;
  background:
    radial-gradient(ellipse at 22% 20%, color-mix(in srgb, var(--accent) 7%, transparent) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 10%, color-mix(in srgb, var(--gold) 8%, transparent) 0%, transparent 50%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 {
  font-size: clamp(34px, 5vw, 56px); font-weight: 800; color: var(--ink);
  letter-spacing: -0.025em; line-height: 1.12; max-width: 820px; margin: 0 auto 20px;
}
.hero h1 .hl { color: var(--accent); }
.hero .sub { font-size: 19px; color: var(--ink-soft); max-width: 660px; margin: 0 auto 38px; }

/* Big search */
.big-search { max-width: 680px; margin: 0 auto 18px; position: relative; }
.big-search .search-ic {
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
  color: var(--ink-muted); font-size: 18px; pointer-events: none;
}
.big-search input {
  width: 100%; font-family: var(--font); font-size: 17.5px;
  padding: 19px 150px 19px 54px;
  border-radius: var(--r-pill); border: 2px solid var(--border-strong);
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-md); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.big-search input::placeholder { color: var(--ink-muted); }
.big-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-md); }
.big-search .go {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: var(--accent); border: none; color: #fff; font-family: var(--font);
  font-weight: 700; font-size: 14.5px; padding: 12px 24px; border-radius: var(--r-pill);
  cursor: pointer;
}
.big-search .go:hover { background: var(--accent-hover); }
.popular { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.popular .lbl { font-size: 13px; color: var(--ink-muted); margin-right: 2px; }
.chip {
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--border); background: var(--surface);
  padding: 6px 14px; border-radius: var(--r-pill); cursor: pointer; font-family: var(--font);
  transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Stats */
.stats { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 24px 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 18px 30px; text-align: center; min-width: 160px; box-shadow: var(--shadow-sm);
}
.stat .num { font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.stat .num .accent { color: var(--accent); }
.stat .lab { font-size: 12.5px; color: var(--ink-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1.18; margin-bottom: 14px; }
.section-head p { font-size: 17px; color: var(--ink-soft); }
.section-head.left { text-align: left; max-width: none; margin-left: 0; margin-right: 0; }

/* Topic cards */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.topic-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 26px 24px; display: block; color: var(--ink-soft);
  box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); color: var(--ink-soft); }
.topic-card .ic {
  width: 46px; height: 46px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--accent-soft); margin-bottom: 16px;
}
.topic-card h3 { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 6px; letter-spacing: -0.01em; }
.topic-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 14px; }
.topic-card .meta { font-family: var(--mono); font-size: 11.5px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.topic-card .arrow { position: absolute; top: 24px; right: 22px; color: var(--ink-muted); transition: all .18s; }
.topic-card:hover .arrow { color: var(--accent); transform: translateX(3px); }

/* Session cards */
.session-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column; color: var(--ink-soft);
  box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.session-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); color: var(--ink-soft); }
.session-card .thumb {
  aspect-ratio: 16/8.2; position: relative; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--panel-dark) 0%, #1d2b4a 100%);
}
.session-card .thumb .play {
  width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.14);
  border: 1.5px solid rgba(255,255,255,0.35); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; padding-left: 3px; backdrop-filter: blur(4px);
}
.session-card .thumb .dur {
  position: absolute; bottom: 10px; right: 10px; font-family: var(--mono); font-size: 11px;
  background: rgba(0,0,0,0.55); color: #fff; border-radius: 5px; padding: 3px 8px;
}
.session-card .thumb .cat-tag {
  position: absolute; top: 10px; left: 10px; font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: #ffd98a;
  background: rgba(0,0,0,0.45); padding: 4px 9px; border-radius: 5px;
}
.session-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.session-card h3 { font-size: 16.5px; font-weight: 700; color: var(--ink); line-height: 1.35; letter-spacing: -0.01em; margin-bottom: 8px; }
.session-card p { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); margin-bottom: 14px; flex: 1; }
.session-card .foot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-muted); }
.session-card .foot .lv { background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 11px; padding: 3px 9px; border-radius: var(--r-pill); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  padding: 4px 11px; border-radius: var(--r-pill); letter-spacing: 0.04em; text-transform: uppercase;
}
.badge.live { background: var(--gold-soft); color: var(--gold); }
.badge.video { background: var(--accent-soft); color: var(--accent); }
.badge.level { background: var(--green-soft); color: var(--green); }

/* ---------- Short Version box ---------- */
.short-version {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: var(--r-md); padding: 28px 30px; margin: 0 0 34px;
  box-shadow: var(--shadow-sm);
}
.short-version h2 {
  font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.short-version h2 .zap { color: var(--accent); }
.short-version .sv-item { margin-bottom: 14px; font-size: 15.5px; line-height: 1.65; }
.short-version .sv-item:last-child { margin-bottom: 0; }
.short-version .sv-item b, .short-version .sv-item strong { color: var(--ink); }

/* ---------- Dark contrast panel (like reference) ---------- */
.dark-panel {
  background: var(--panel-dark); border-radius: var(--r-xl);
  padding: 56px 48px; color: #b7c1d9; position: relative; overflow: hidden;
}
.dark-panel::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 0%, rgba(107,157,255,0.12) 0%, transparent 55%);
  pointer-events: none;
}
.dark-panel > * { position: relative; }
.dark-panel h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -0.02em; text-align: center; margin-bottom: 12px; }
.dark-panel .lead { text-align: center; max-width: 620px; margin: 0 auto 36px; font-size: 16.5px; }
.dark-panel .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dp-card { border-radius: var(--r-lg); padding: 28px; }
.dp-card.problem { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.dp-card.solution { background: #fff; color: var(--ink-soft); }
.dp-card .dp-tag {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  display: inline-block; padding: 4px 12px; border-radius: var(--r-pill); margin-bottom: 18px;
}
.dp-card.problem .dp-tag { background: rgba(255,255,255,0.1); color: #9fb0d4; }
.dp-card.solution .dp-tag { background: var(--accent-soft); color: var(--accent); }
.dp-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 16px; }
.dp-card.problem h3 { color: #fff; }
.dp-card.solution h3 { color: #16233b; }
.dp-li { display: flex; gap: 12px; margin-bottom: 13px; font-size: 14.5px; line-height: 1.55; }
.dp-li .x { color: #8291b3; flex-shrink: 0; margin-top: 1px; }
.dp-li .check { color: var(--green); flex-shrink: 0; font-weight: 800; margin-top: 1px; }
.dp-card.solution .dp-li { color: #47536b; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font); font-weight: 700; font-size: 15px; cursor: pointer;
  padding: 14px 30px; border-radius: var(--r-pill); border: none; transition: all .15s;
}
.btn.primary { background: var(--cta); color: #fff; box-shadow: 0 6px 20px -6px rgba(18,41,75,0.35); }
.btn.primary:hover { background: var(--cta-hover); transform: translateY(-1px); color: #fff; }
.btn.blue { background: var(--accent); color: #fff; }
.btn.blue:hover { background: var(--accent-hover); color: #fff; }
.btn.ghost { background: none; border: 1.5px solid var(--border-strong); color: var(--ink-soft); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Breadcrumb ---------- */
.crumb { padding: 20px 0 4px; font-size: 13px; color: var(--ink-muted); }
.crumb a { color: var(--ink-muted); font-weight: 500; }
.crumb a:hover { color: var(--accent); }
.crumb .sep { margin: 0 8px; opacity: 0.5; }

/* ---------- Lesson page ---------- */
.lesson-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 44px; padding: 18px 0 80px; }
.lesson-head { margin: 10px 0 26px; }
.lesson-head .meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; font-size: 13px; color: var(--ink-muted); }
.lesson-head h1 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1.18; }

.video-shell {
  background: linear-gradient(135deg, var(--panel-dark) 0%, #1d2b4a 100%);
  border-radius: var(--r-lg); aspect-ratio: 16/9; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  margin-bottom: 12px; overflow: hidden; border: 1px solid var(--border);
}
.video-shell .zoom-chip {
  position: absolute; top: 14px; left: 14px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; color: #8ec1ff;
  background: rgba(45,140,255,0.15); border: 1px solid rgba(45,140,255,0.3);
  padding: 4px 10px; border-radius: 5px;
}
.video-shell .big-play {
  width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.4); color: #fff; font-size: 26px;
  display: flex; align-items: center; justify-content: center; padding-left: 5px;
  cursor: pointer; transition: all .2s; backdrop-filter: blur(6px);
}
.video-shell .big-play:hover { background: rgba(255,255,255,0.22); transform: scale(1.05); }
.video-shell .vtitle { color: #dfe7f7; font-size: 15px; font-weight: 600; max-width: 70%; text-align: center; }
.video-shell .vnote { color: #71809f; font-size: 12px; font-family: var(--mono); }
.video-shell .jump-flag {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 600;
  border-radius: var(--r-pill); padding: 7px 18px; display: none; white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.embed-note { font-size: 12.5px; color: var(--ink-muted); margin-bottom: 30px; display: flex; gap: 8px; align-items: center; }

/* Chapters */
.chapters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 26px; margin-bottom: 34px; }
.chapters h2 { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.chapter-row {
  display: flex; align-items: baseline; gap: 12px; padding: 3px 10px; border-radius: var(--r-sm);
  cursor: pointer; transition: background .12s; line-height: 1.35;
}
.chapter-row:hover { background: var(--accent-soft); }
.chapter-row.active { background: var(--accent-soft); outline: 1.5px solid var(--accent); }
.chapter-row .t {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--accent);
  min-width: 62px; text-align: right;
}
.chapter-row .c { font-size: 14.5px; color: var(--ink-soft); font-weight: 500; }

.ts-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border: 1px solid transparent;
  border-radius: var(--r-pill); padding: 3px 11px; cursor: pointer; transition: all .12s;
}
.ts-chip:hover { border-color: var(--accent); }

/* Prose */
.prose h2 { font-size: 23px; font-weight: 800; color: var(--ink); letter-spacing: -0.015em; margin: 42px 0 16px; }
.prose h3 { font-size: 18px; font-weight: 700; color: var(--ink); margin: 28px 0 10px; }
.prose p { margin-bottom: 16px; line-height: 1.75; font-size: 16px; }
.prose blockquote {
  border-left: 4px solid var(--gold); background: var(--gold-soft);
  padding: 18px 24px; border-radius: 0 var(--r-md) var(--r-md) 0; margin: 22px 0;
  font-size: 16.5px; font-style: italic; color: var(--ink);
}
.prose blockquote .qt { display: block; margin-top: 8px; font-style: normal; }

/* Takeaways */
.takeaways { background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); border-radius: var(--r-lg); padding: 26px 28px; margin: 26px 0; }
.takeaways h2 { font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.tk { display: flex; gap: 12px; margin-bottom: 11px; font-size: 15px; line-height: 1.6; }
.tk:last-child { margin-bottom: 0; }
.tk .check {
  flex-shrink: 0; width: 21px; height: 21px; border-radius: 50%; background: var(--green);
  color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 2px;
}

/* Q&A */
.qa-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px 22px; margin-bottom: 14px; }
.qa-card .q { font-weight: 700; color: var(--ink); font-size: 15.5px; margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; }
.qa-card .q .qmark { color: var(--accent); font-weight: 800; flex-shrink: 0; }
.qa-card .a { font-size: 14.5px; line-height: 1.65; margin-bottom: 10px; }
.qa-card .ts-chip { font-size: 11px; }

/* Sidebar */
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.side-card h3 { font-size: 14.5px; font-weight: 800; color: var(--ink); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.05em; font-size: 12.5px; }
.side-link { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--ink-soft); font-weight: 500; line-height: 1.4; }
.side-link:last-child { border-bottom: none; }
.side-link:hover { color: var(--accent); }
.side-link .k { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.side-cta { text-align: center; background: linear-gradient(135deg, var(--accent-soft), var(--gold-soft)); }
.side-cta p { font-size: 14px; margin-bottom: 14px; }
.side-search-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; justify-content: center;
  border: 1.5px dashed var(--border-strong); background: none; color: var(--ink-muted);
  font-family: var(--font); font-size: 13.5px; font-weight: 600; padding: 12px; border-radius: var(--r-md); cursor: pointer;
}
.side-search-btn:hover { border-color: var(--accent); color: var(--accent); }
.lesson-sidebar { position: sticky; top: 86px; align-self: start; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 8px; }

/* ---------- Topic page hero ---------- */
.topic-hero { padding: 64px 24px 40px; text-align: center; }
.topic-hero .ic-big {
  width: 74px; height: 74px; border-radius: var(--r-lg); background: var(--accent-soft);
  font-size: 36px; display: flex; align-items: center; justify-content: center; margin: 0 auto 22px;
}
.topic-hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; color: var(--ink); letter-spacing: -0.02em; margin-bottom: 14px; }
.topic-hero p { font-size: 17.5px; max-width: 640px; margin: 0 auto; }
.topic-hero .full-note { margin-top: 18px; font-size: 13.5px; color: var(--ink-muted); font-family: var(--mono); }

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 500; display: none;
  background: color-mix(in srgb, var(--ink) 40%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 8vh 20px 20px;
}
.search-overlay.open { display: flex; justify-content: center; align-items: flex-start; }
.search-modal {
  width: 100%; max-width: 760px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column;
  max-height: 82vh;
}
.search-modal .sm-input-row { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.search-modal .sm-input-row .ic { color: var(--accent); font-size: 19px; }
.search-modal input {
  flex: 1; border: none; outline: none; background: none; color: var(--ink);
  font-family: var(--font); font-size: 18px; font-weight: 500;
}
.search-modal input::placeholder { color: var(--ink-muted); }
.search-modal .esc {
  font-family: var(--mono); font-size: 11px; color: var(--ink-muted);
  border: 1px solid var(--border-strong); border-radius: 4px; padding: 3px 7px; cursor: pointer; background: none;
}
.sm-results { overflow-y: auto; padding: 10px 12px 18px; }
.sm-hint { padding: 26px 22px; }
.sm-hint .h-title { font-size: 13px; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.07em; margin: 14px 0 10px; }
.sm-group-title {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted); padding: 14px 12px 8px;
}
.sm-item {
  display: block; padding: 12px 14px; border-radius: var(--r-md); color: var(--ink-soft);
  border: 1px solid transparent;
}
.sm-item:hover, .sm-item.sel { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink-soft); }
.sm-item .t-row { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; flex-wrap: wrap; }
.sm-item .ti { font-weight: 700; color: var(--ink); font-size: 15px; }
.sm-item .cat { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.07em; }
.sm-item .ex { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.sm-item .moment-row { display: flex; gap: 10px; align-items: flex-start; }
.sm-item .moment-row .ts-chip { flex-shrink: 0; margin-top: 2px; }
.sm-empty { text-align: center; padding: 40px 20px; }
.sm-empty .big { font-size: 30px; margin-bottom: 10px; }
.sm-empty p { color: var(--ink-muted); font-size: 14.5px; margin-bottom: 16px; }
.sm-count { font-size: 12px; color: var(--ink-muted); padding: 10px 14px 0; font-family: var(--mono); }

/* ---------- Library filters ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 34px; }
.fchip {
  font-family: var(--font); font-size: 13.5px; font-weight: 600; cursor: pointer;
  color: var(--ink-soft); border: 1px solid var(--border); background: var(--surface);
  padding: 8px 16px; border-radius: var(--r-pill); transition: all .15s;
}
.fchip:hover { border-color: var(--accent); color: var(--accent); }
.fchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Path cards ---------- */
.path-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 28px 26px; position: relative; box-shadow: var(--shadow-sm); display: block; color: var(--ink-soft);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.path-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); color: var(--ink-soft); }
.path-card .step-num {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--accent); background: var(--accent-soft); display: inline-block;
  padding: 4px 12px; border-radius: var(--r-pill); margin-bottom: 16px; text-transform: uppercase;
}
.path-card h3 { font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.01em; }
.path-card p { font-size: 14.5px; line-height: 1.6; }
.path-card ol { margin: 14px 0 0 18px; font-size: 14px; }
.path-card ol li { margin-bottom: 7px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: 72px 24px; }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; color: var(--ink); letter-spacing: -0.02em; margin-bottom: 14px; }
.cta-band p { font-size: 17px; max-width: 560px; margin: 0 auto 30px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 44px 24px 34px; }
.foot-inner { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-brand { font-weight: 800; font-size: 17px; color: var(--ink); margin-bottom: 8px; }
.foot-brand .studio { color: var(--gold); }
.foot-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); margin-bottom: 12px; }
.foot-col a { display: block; font-size: 14px; color: var(--ink-soft); padding: 4px 0; }
.foot-col a:hover { color: var(--accent); }
.foot-note { max-width: var(--max); margin: 30px auto 0; padding-top: 22px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--ink-muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600;
  padding: 12px 24px; border-radius: var(--r-pill); box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 600; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Prototype banner */
.proto-note {
  background: var(--gold-soft); border-bottom: 1px solid var(--border);
  text-align: center; font-size: 12.5px; padding: 7px 16px; color: var(--gold); font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-sidebar { position: static; }
  .dark-panel .duo { grid-template-columns: 1fr; }
  .nav-links > a:not(.nav-cta) { display: none; }
  .nav-drop { display: none; }
}
@media (max-width: 640px) {
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .big-search input { padding-right: 60px; }
  .big-search .go { padding: 10px 14px; font-size: 13px; }
  .stats { gap: 8px; }
  .stat { padding: 12px 18px; min-width: 120px; }
  .dark-panel { padding: 36px 22px; }
}

/* ==========================================================================
   v3 additions — join modal, locked content, mobile nav, preview pages
   ========================================================================== */

/* ---------- Join / Login modal ---------- */
.join-overlay {
  position: fixed; inset: 0; z-index: 700; display: none;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  padding: 20px;
}
.join-overlay.open { display: flex; align-items: center; justify-content: center; }
.join-modal {
  width: 100%; max-width: 480px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 38px 36px 32px; position: relative;
  text-align: center; max-height: 92vh; overflow-y: auto;
}
.join-modal .close-x {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border-radius: 50%; border: 1px solid var(--border); background: none;
  color: var(--ink-muted); font-size: 15px; cursor: pointer;
}
.join-modal .close-x:hover { color: var(--ink); border-color: var(--border-strong); }
.join-modal .lock-ic {
  width: 62px; height: 62px; border-radius: 50%; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin: 0 auto 18px;
}
.join-modal h3 { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 10px; line-height: 1.25; }
.join-modal .sub { font-size: 15px; color: var(--ink-soft); margin-bottom: 20px; }
.join-perks { text-align: left; margin: 0 auto 24px; max-width: 360px; }
.join-perks .dp-li { font-size: 14px; margin-bottom: 10px; color: var(--ink-soft); }
.join-modal .btn { width: 100%; justify-content: center; margin-bottom: 10px; }
.join-modal .fine { font-size: 12px; color: var(--ink-muted); margin-top: 8px; }

/* ---------- Locked (members-only) content ---------- */
.locked-wrap { position: relative; border-radius: var(--r-lg); overflow: hidden; margin: 26px 0; }
.locked-content { filter: blur(7px); pointer-events: none; user-select: none; max-height: 430px; overflow: hidden; opacity: 0.75; }
.locked-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 20%, transparent) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 55%, var(--bg) 100%);
  padding: 24px;
}
.locked-overlay .lk { font-size: 30px; }
.locked-overlay h3 { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.locked-overlay p { font-size: 14px; color: var(--ink-soft); max-width: 400px; }

/* Locked video shell */
.video-shell.locked { cursor: pointer; }
.video-shell.locked .big-play { background: rgba(255,255,255,0.1); }
.video-shell .lock-badge {
  position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: #ffd98a; background: rgba(0,0,0,0.45); border: 1px solid rgba(255,217,138,0.35);
  padding: 4px 10px; border-radius: 5px;
}
.video-shell.locked:hover .big-play { transform: scale(1.06); background: rgba(255,255,255,0.2); }

/* Preview login line inside Short Version */
.sv-login {
  margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border-strong);
  font-size: 14px; color: var(--ink-soft);
}
.sv-login a { font-weight: 700; }

/* Chapter lock */
.chapter-row .lk { font-size: 11px; opacity: 0.55; margin-left: auto; }

/* View switcher in the demo bar */
.proto-note { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.proto-note .vswitch {
  font-size: 12px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 3px 12px; border-radius: var(--r-pill); white-space: nowrap;
}
.proto-note .vswitch:hover { border-color: var(--accent); }

/* Preview CTA band on lesson previews */
.preview-cta {
  background: var(--panel-dark); border-radius: var(--r-xl); color: #b7c1d9;
  padding: 44px 36px; text-align: center; margin: 40px 0 10px; position: relative; overflow: hidden;
}
.preview-cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(107,157,255,0.15) 0%, transparent 60%); pointer-events: none; }
.preview-cta > * { position: relative; }
.preview-cta h2 { color: #fff; font-size: clamp(21px, 2.6vw, 28px); font-weight: 800; letter-spacing: -0.015em; margin-bottom: 10px; }
.preview-cta p { font-size: 15px; max-width: 460px; margin: 0 auto 22px; }
.preview-cta .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Mobile nav ---------- */
.nav-burger {
  display: none; width: 40px; height: 40px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  font-size: 17px; color: var(--ink); align-items: center; justify-content: center; flex-shrink: 0;
}
.mobile-menu {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 400;
  background: var(--bg); overflow-y: auto; padding: 18px 22px 40px;
}
.mobile-menu.open { display: block; }
.mobile-menu .mm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mobile-menu .mm-close {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); font-size: 16px; cursor: pointer; color: var(--ink);
}
.mobile-menu a.mm-link {
  display: block; padding: 14px 6px; font-size: 17px; font-weight: 700; color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.mobile-menu .mm-sub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin: 20px 0 6px; }
.mobile-menu a.mm-topic { display: block; padding: 9px 6px; font-size: 15px; font-weight: 500; color: var(--ink-soft); }
.mobile-menu .mm-cta { margin-top: 22px; width: 100%; justify-content: center; }

@media (max-width: 1000px) {
  .nav-burger { display: inline-flex; }
  .nav-links > a:not(.nav-cta) { display: none; }
  .nav-links > a.nav-cta { display: none; }  /* lives in mobile menu instead */
  .nav-search-btn span.lbl { display: none; }
  .nav-search-btn { padding: 8px 12px; }
  .nav-search-btn kbd { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .hero { padding: 56px 18px 44px; }
  .hero .sub { font-size: 16.5px; }
  .container { padding: 0 18px; }
  .section { padding: 52px 0; }
  .short-version { padding: 22px 20px; }
  .short-version h2 { font-size: 19px; }
  .chapters { padding: 18px 16px; }
  .chapter-row { gap: 10px; }
  .chapter-row .t { min-width: 48px; font-size: 11.5px; }
  .join-modal { padding: 30px 22px 26px; }
  .lesson-head h1 { font-size: 25px; }
  .video-shell .big-play { width: 60px; height: 60px; font-size: 20px; }
  .video-shell .vtitle { font-size: 13px; max-width: 85%; }
  .stats { padding: 4px 14px 12px; }
  .stat { min-width: calc(50% - 8px); padding: 12px 10px; }
  .stat .num { font-size: 22px; }
  .search-overlay { padding: 4vh 10px 10px; }
  .search-modal input { font-size: 16px; }
  .foot-inner { flex-direction: column; gap: 22px; }
  .cta-band { padding: 52px 18px; }
}

/* Narrow-phone nav fit */
@media (max-width: 640px) {
  .nav-inner { gap: 6px; padding: 0 12px; height: 58px; }
  .brand { font-size: 14px; margin-right: 2px; gap: 6px; }
  .brand .dot { width: 8px; height: 8px; }
  .theme-toggle { width: 34px; height: 34px; font-size: 14px; flex-shrink: 0; }
  .nav-burger { width: 36px; height: 36px; flex-shrink: 0; }
  .nav-search-btn { padding: 7px 10px; flex-shrink: 0; }
}

/* ==========================================================================
   v4 — Inner Circle Player + full transcript section
   ========================================================================== */
.icp-wrap { margin-bottom: 12px; }
.icp {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border);
  background: #0b1120; outline: none; box-shadow: var(--shadow-md);
}
.icp-stage { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #101a2e 0%, #1d2b4a 100%); }
.icp-media { position: absolute; inset: 0; }
.icp-media iframe, .icp-media video { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; display: block; }
.icp-poster {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; text-align: center; cursor: pointer; z-index: 2;
  background:
    radial-gradient(ellipse at 25% 20%, rgba(87,140,255,0.15) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(212,168,83,0.10) 0%, transparent 50%),
    linear-gradient(135deg, #101a2e 0%, #1d2b4a 100%);
  transition: opacity .3s;
}
.icp-poster.hide { opacity: 0; pointer-events: none; }
.icp-kicker {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #ffd98a; background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,217,138,0.3); padding: 4px 12px; border-radius: 5px;
}
.icp-title { color: #eef2fb; font-size: 17px; font-weight: 700; max-width: 72%; line-height: 1.4; }
.icp-sub { color: #71809f; font-size: 12px; font-family: var(--mono); }
.icp-bigplay {
  width: 78px; height: 78px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.13); color: #fff; font-size: 26px; padding-left: 6px;
  cursor: pointer; backdrop-filter: blur(6px); transition: all .2s;
}
.icp-bigplay:hover { background: rgba(255,255,255,0.24); transform: scale(1.06); }
.icp-flash {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
  padding: 7px 18px; border-radius: var(--r-pill); opacity: 0; transition: all .25s;
  pointer-events: none; white-space: nowrap; z-index: 3; box-shadow: var(--shadow-md);
}
.icp-flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.icp-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: #0b1120; border-top: 1px solid rgba(255,255,255,0.07);
}
.icp-btn {
  border: none; background: none; color: #c6d2ea; font-size: 15px; cursor: pointer;
  width: 34px; height: 34px; border-radius: var(--r-sm); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--font);
}
.icp-btn:hover { background: rgba(255,255,255,0.09); color: #fff; }
.icp-rate { font-size: 12.5px; font-weight: 700; width: auto; padding: 0 8px; font-family: var(--mono); }
.icp-time { font-family: var(--mono); font-size: 11.5px; color: #8fa0c4; flex-shrink: 0; min-width: 44px; text-align: center; }
.icp-rail { position: relative; flex: 1; height: 20px; cursor: pointer; }
.icp-rail::before { content: ''; position: absolute; top: 8px; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.14); }
.icp-prog { position: absolute; top: 8px; left: 0; height: 4px; border-radius: 4px; background: var(--accent); width: 0; }
.icp-knob {
  position: absolute; top: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; left: 0; transform: translateX(-50%); box-shadow: 0 1px 5px rgba(0,0,0,0.5);
  pointer-events: none;
}
.icp-mark {
  position: absolute; top: 7px; width: 5px; height: 6px; border-radius: 2px;
  background: rgba(255,217,138,0.85); transform: translateX(-50%); pointer-events: auto;
}
.icp.playing .icp-stage { cursor: pointer; }
.icp:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.icp:fullscreen .icp-stage { flex: 1; aspect-ratio: auto; }

/* ---------- Full transcript ---------- */
.transcript { margin: 40px 0 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.tr-head { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tr-head h2 { font-size: 18px; font-weight: 800; color: var(--ink); margin-right: auto; }
.tr-filter {
  border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--bg);
  padding: 8px 16px; font-family: var(--font); font-size: 13.5px; color: var(--ink); outline: none; width: 220px; max-width: 100%;
}
.tr-filter:focus { border-color: var(--accent); }
.tr-body { padding: 10px 24px 20px; position: relative; }
.tr-body.collapsed { max-height: 420px; overflow: hidden; }
.tr-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 140px; display: flex;
  align-items: flex-end; justify-content: center; padding-bottom: 20px;
  background: linear-gradient(180deg, transparent 0%, var(--surface) 75%);
}
.tr-p { display: flex; gap: 14px; padding: 7px 0; align-items: baseline; }
.tr-p .tr-t {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border: none; border-radius: var(--r-pill);
  padding: 2px 10px; cursor: pointer; flex-shrink: 0; min-width: 58px;
}
.tr-p .tr-t:hover { outline: 1.5px solid var(--accent); }
.tr-p .tx { font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); }
.tr-p.is-member .tx::before {
  content: 'MEMBER'; font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--gold); background: var(--gold-soft);
  border-radius: 4px; padding: 2px 7px; margin-right: 8px; vertical-align: 1px;
}
.tr-note { font-size: 12.5px; color: var(--ink-muted); padding: 0 24px 18px; }
@media (max-width: 640px) {
  .tr-head { padding: 16px; } .tr-body { padding: 8px 16px 16px; }
  .tr-filter { width: 100%; }
  .icp-time { min-width: 38px; font-size: 11px; }
  .icp-bar { gap: 7px; padding: 8px 10px; }
  .icp-bigplay { width: 62px; height: 62px; font-size: 21px; }
  .icp-title { font-size: 13.5px; }
}

/* ==========================================================================
   v5 — full library rows, WP content, zoom embed
   ========================================================================== */
.row-list { max-width: none; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--border); color: var(--ink-soft); transition: background .12s; }
.row-item:last-child { border-bottom: none; }
.row-item:hover { background: var(--accent-soft); color: var(--ink-soft); }
.row-item .ri-ic { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--bg-alt); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.row-item .ri-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.row-item .ri-title { font-weight: 600; color: var(--ink); font-size: 14.5px; line-height: 1.4; }
.row-item .ri-meta { font-size: 12px; color: var(--ink-muted); }
.row-item .ri-arrow { color: var(--ink-muted); flex-shrink: 0; }
.row-item:hover .ri-arrow { color: var(--accent); }

.zoom-embed { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); background: #000; margin-bottom: 12px; }
.zoom-embed iframe { display: block; width: 100%; aspect-ratio: 16/9; height: auto; border: 0; }

.wp-content img { border-radius: var(--r-md); margin: 14px 0; height: auto; }
.wp-content iframe { max-width: 100%; border: 0; border-radius: var(--r-md); }
.wp-content iframe[src*="zoom"], .wp-content iframe[src*="vimeo"], .wp-content iframe[src*="youtube"] { width: 100%; aspect-ratio: 16/9; height: auto; }
.wp-content .audio-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; margin: 12px 0; }
.wp-content .audio-block audio { width: 100%; display: block; }
.wp-content .wp-figure { margin: 18px 0; }
.wp-content .wp-figure figcaption { font-size: 13px; color: var(--ink-muted); margin-top: 6px; }
.wp-content a { word-break: break-word; }
.wp-content h1, .wp-content h2 { font-size: 22px; font-weight: 800; color: var(--ink); margin: 32px 0 12px; }
.wp-content h3, .wp-content h4 { font-size: 17.5px; font-weight: 700; color: var(--ink); margin: 22px 0 8px; }
.wp-content ul, .wp-content ol { margin: 0 0 16px 22px; }
.wp-content li { margin-bottom: 6px; }
.wp-content table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.wp-content td, .wp-content th { border: 1px solid var(--border); padding: 8px 10px; }
@media (max-width: 640px) { .row-item { padding: 11px 14px; } }

/* v9 — guides + courses */
.gmoments { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 28px; }
.gmoment { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--ink-soft); transition: border-color .15s, transform .15s; }
.gmoment:hover { border-color: var(--accent); transform: translateY(-1px); color: var(--ink-soft); }
.gmoment .ts-chip { flex-shrink: 0; margin-top: 2px; }
.gm-body { display: flex; flex-direction: column; min-width: 0; }
.gm-label { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.gm-src { font-size: 11.5px; color: var(--ink-muted); margin-top: 2px; }
.course-steps { display: flex; flex-direction: column; gap: 12px; }
.course-step { display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 22px; color: var(--ink-soft); box-shadow: var(--shadow-sm); transition: transform .15s, border-color .15s, box-shadow .15s; }
.course-step:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-md); color: var(--ink-soft); }
.cs-num { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.cs-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cs-title { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.cs-why { font-size: 13.5px; color: var(--ink-soft); margin-top: 3px; }
.cs-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
@media (max-width: 700px) { .gmoments { grid-template-columns: 1fr; } .course-step { padding: 14px 16px; gap: 12px; } }

/* ---------- Inner Circle Audio Player (tune pages) ---------- */
.ica {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--border); background: #0b1120; box-shadow: var(--shadow-md); outline: none;
}
.ica-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 4px; }
.ica-play {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  border: 2px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.12);
  color: #fff; font-size: 18px; padding-left: 4px; transition: all .2s;
}
.ica-play:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.05); }
.ica.playing .ica-play { background: var(--accent); border-color: var(--accent); }
.ica-titles { display: flex; flex-direction: column; gap: 3px; min-width: 0; margin-right: auto; }
.ica-kicker {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #ffd98a;
}
.ica-title { color: #eef2fb; font-size: 15px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ica-skip { font-family: var(--mono); font-size: 11px; width: auto; padding: 0 8px; }
.ica-bar { display: flex; align-items: center; gap: 12px; padding: 6px 16px 14px; }
.ica-flash {
  position: absolute; top: 14px; right: 14px; transform: translateY(-6px);
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 6px 14px; border-radius: var(--r-pill); opacity: 0; transition: all .25s;
  pointer-events: none; white-space: nowrap; z-index: 3; box-shadow: var(--shadow-md);
}
.ica-flash.show { opacity: 1; transform: translateY(0); }
.audio-stack { display: flex; flex-direction: column; gap: 14px; margin: 26px 0; }
.audio-locked {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer;
  border-radius: var(--r-lg); border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--panel-dark) 0%, #1d2b4a 100%); box-shadow: var(--shadow-md);
}
.audio-locked .alk-play {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; border: 2px solid rgba(255,255,255,0.35); color: rgba(255,255,255,0.8); font-size: 17px;
}
.audio-locked .alk-t { display: flex; flex-direction: column; gap: 3px; margin-right: auto; min-width: 0; }
.audio-locked .alk-k { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #ffd98a; }
.audio-locked .alk-n { color: #eef2fb; font-size: 15px; font-weight: 700; }
.audio-locked .alk-lock { font-size: 13px; color: #ffd98a; font-weight: 700; white-space: nowrap; }
.audio-locked:hover { border-color: var(--accent); }

/* ---------- Download cards (tune pages) ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0 6px; }
@media (max-width: 1000px) { .dl-grid { grid-template-columns: repeat(2, 1fr); } }
.dl-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm); transition: all .18s; cursor: pointer;
}
.dl-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.dl-card .ic { font-size: 24px; flex-shrink: 0; }
.dl-card .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-card .n { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.dl-card .k { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.dl-card.locked { opacity: 0.85; }
.dl-card.locked .n::after { content: ' 🔒'; font-size: 11px; }

/* ---------- Bonus sheet content (tune pages) ---------- */
.bonus-sheet {
  margin: 36px 0; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--gold-soft); overflow: hidden;
}
html[data-theme="dark"] .bonus-sheet { background: rgba(212,168,83,0.07); }
.bonus-sheet .bs-head {
  display: flex; align-items: center; gap: 10px; padding: 18px 26px 0;
}
.bonus-sheet .bs-head h2 { font-size: 19px; font-weight: 800; color: var(--ink); }
.bonus-sheet .bs-badge {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold);
  padding: 3px 10px; border-radius: var(--r-pill); margin-left: auto; white-space: nowrap;
}
.bonus-sheet .bs-body { padding: 6px 26px 22px; }
.bonus-sheet h3 { font-size: 15.5px; font-weight: 800; color: var(--ink); margin: 18px 0 6px; }
.bonus-sheet p { font-size: 15px; line-height: 1.75; color: var(--ink-soft); }

/* ---------- Tunes index ---------- */
.tune-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 18px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  transition: all .16s;
}
.tune-row:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.tune-row .tn-ic { font-size: 19px; flex-shrink: 0; }
.tune-row .tn-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-right: auto; }
.tune-row .tn-title { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.tune-row .tn-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tune-row .tn-badges { display: flex; gap: 5px; flex-shrink: 0; }
.tune-row .tn-b { font-size: 12px; opacity: 0.75; }
.tune-group { margin: 34px 0 10px; }
.tune-group h2 { font-size: 21px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.tune-group .tg-sub { font-size: 13.5px; color: var(--ink-muted); margin-bottom: 14px; }
.tune-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 800px) { .tune-list { grid-template-columns: 1fr; } .dl-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Phase 4: Home page — hero type-ahead ---------- */
.big-search { position: relative; }
.hero-suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; text-align: left; display: none;
}
.hero-suggest.open { display: block; }
.hs-group { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); padding: 12px 18px 6px; }
.hs-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; text-decoration: none; transition: background .12s; }
.hs-item:hover { background: var(--accent-soft); }
.hs-item .ic { flex-shrink: 0; font-size: 15px; }
.hs-item .t { min-width: 0; }
.hs-item .n { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-item .n mark { background: var(--mark-bg); color: var(--mark-ink); border-radius: 3px; padding: 0 2px; }
.hs-item .k { display: block; font-size: 11.5px; color: var(--ink-muted); font-family: var(--mono); }
.hs-item .ts { margin-left: auto; flex-shrink: 0; font-family: var(--mono); font-size: 11px; color: var(--accent); font-weight: 700; }
.hs-more { display: block; text-align: center; padding: 11px; font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; border-top: 1px solid var(--border); cursor: pointer; background: none; width: 100%; border-left: 0; border-right: 0; border-bottom: 0; font-family: var(--font); }
.hs-more:hover { background: var(--accent-soft); }
.hero-suggest.demo { pointer-events: none; }

/* ---------- Continue watching row ---------- */
.continue-sec { display: none; }
.continue-sec.has-items { display: block; }
.cw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cw-card {
  display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 16px 18px 14px; box-shadow: var(--shadow-sm); transition: all .18s;
}
.cw-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cw-kind { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.cw-title { display: block; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.4; margin: 5px 0 12px; min-height: 42px; }
.cw-bar { position: relative; height: 5px; border-radius: 4px; background: var(--bg-alt); overflow: hidden; }
.cw-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); }
.cw-meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); margin-top: 8px; }
.cw-meta .done { color: var(--green); font-weight: 700; }

/* ---------- Playlists (Jori recommends) ---------- */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.pl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.pl-card .pl-ic { font-size: 26px; }
.pl-card h3 { font-size: 18px; font-weight: 800; color: var(--ink); margin: 10px 0 4px; }
.pl-card .pl-sub { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 14px; }
.pl-step { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: var(--r-sm); text-decoration: none; transition: background .12s; }
.pl-step:hover { background: var(--accent-soft); }
.pl-step .num { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--accent); flex-shrink: 0; width: 18px; }
.pl-step .t { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.pl-step .k { margin-left: auto; flex-shrink: 0; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); text-transform: uppercase; }

/* ---------- Testimonial strip ---------- */
.testi-sec { background: var(--bg-alt); }
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.testi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.testi .stars { color: var(--gold); font-size: 13px; letter-spacing: 2px; margin-bottom: 10px; }
.testi p { font-size: 15px; line-height: 1.65; color: var(--ink-soft); flex: 1; }
.testi .who { margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--ink); }
.testi .who span { display: block; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }

/* ---------- Scroll reveal (motion polish) ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Phase 4 fix: let the hero type-ahead dropdown escape the hero (the ::before glow is clipped via clip-path instead) */
.hero { overflow: visible; }
.hero::before { inset: 0; background:
    radial-gradient(ellipse at 22% 20%, color-mix(in srgb, var(--accent) 7%, transparent) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 10%, color-mix(in srgb, var(--gold) 8%, transparent) 0%, transparent 50%); }
.hero-suggest { z-index: 60; }

/* ---------- Phase 5: member action buttons ---------- */
.ic-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ic-act {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 700; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  transition: all .16s;
}
.ic-act:hover { border-color: var(--accent); color: var(--accent); }
.ic-act.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ---------- Phase 5: My Library ---------- */
.ml-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 22px; }
.ml-tab {
  padding: 10px 18px; cursor: pointer; font-family: var(--font); font-size: 14px; font-weight: 700;
  color: var(--ink-soft); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-pill); transition: all .16s;
}
.ml-tab:hover { border-color: var(--accent); }
.ml-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ml-tab .ml-n { font-family: var(--mono); font-size: 11px; opacity: 0.75; margin-left: 3px; }
.ml-panel { display: none; }
.ml-panel.on { display: block; }
.ml-empty {
  padding: 44px 30px; text-align: center; font-size: 15px; color: var(--ink-muted); line-height: 1.65;
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-lg);
}
.ml-note { font-size: 12.5px; color: var(--ink-muted); margin-top: 26px; line-height: 1.6; }

/* ---------- Phase 5: suggested for you ---------- */
.suggest-block { margin: 40px 0 6px; }
.suggest-block h2 { font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.sg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sg-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  transition: all .16s;
}
.sg-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.sg-why { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.sg-title { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.sg-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); }
@media (max-width: 700px) { .sg-grid { grid-template-columns: 1fr; } }

/* ---------- Phase 5: comments ---------- */
.comments { margin: 40px 0 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.cm-head-bar { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.cm-head-bar h2 { font-size: 18px; font-weight: 800; color: var(--ink); margin-right: auto; }
.cm-count { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }
.cm-form { padding: 18px 24px; border-bottom: 1px solid var(--border); }
.cm-form textarea {
  width: 100%; min-height: 74px; resize: vertical; padding: 12px 14px; font-family: var(--font);
  font-size: 14.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); outline: none;
}
.cm-form textarea:focus { border-color: var(--accent); }
.cm-form .row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.cm-form .hint { font-size: 12px; color: var(--ink-muted); margin-right: auto; line-height: 1.5; }
.cm-list { padding: 8px 24px 18px; }
.cm { padding: 14px 0; border-bottom: 1px solid var(--border); }
.cm:last-child { border-bottom: 0; }
.cm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cm-avatar {
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.cm-who { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.cm-when { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); }
.cm-body { font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); white-space: pre-wrap; }
.cm-empty { padding: 22px 0 14px; font-size: 14px; color: var(--ink-muted); }

/* Phase 5 fix: nav gained "My Library" — tighten spacing below 1560px so nothing clips */
@media (max-width: 1560px) {
  .nav-links > a, .nav-drop > button { padding: 8px 10px; font-size: 13.5px; }
  .nav-search-btn .lbl { display: none; }
}

/* ---------- v16: captions ---------- */
.icp-cc {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  max-width: 86%; text-align: center; pointer-events: none; z-index: 2;
  color: #fff; font-size: 17px; line-height: 1.45; font-weight: 600;
}
.icp-cc:not(:empty) { background: rgba(0,0,0,0.72); padding: 6px 14px; border-radius: 8px; }
.icp-ccbtn { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; border: 1.5px solid transparent; }
.icp-ccbtn.on { color: #ffd98a; border-color: #ffd98a; border-radius: 6px; }
.icp:fullscreen .icp-cc { font-size: 26px; bottom: 74px; }

/* ---------- v16: excerpt player ---------- */
.icp-exoverlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; z-index: 4; background: rgba(9,14,26,0.82); backdrop-filter: blur(3px); }
.icp-exoverlay.show { display: flex; }
.exov-card { text-align: center; padding: 20px; }
.exov-k { color: #ffd98a; font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px; }
.exov-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.exov-btn { font-size: 14px; }
.exov-link { display: inline-block; margin-top: 14px; color: #8fa0c4; font-size: 13px; text-decoration: none; }
.exov-link:hover { color: #fff; }
.ex-toolbar { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; flex-wrap: wrap; }
.ex-toolbar .hint { font-size: 12.5px; color: var(--ink-muted); margin-left: auto; }
#exAutoBtn { border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-soft); font-family: var(--font); font-weight: 700; font-size: 13px; padding: 8px 16px; border-radius: var(--r-pill); cursor: pointer; }
#exAutoBtn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ex-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 26px; }
.ex-item {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  padding: 11px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); font-family: var(--font); transition: all .15s; width: 100%;
}
.ex-item:hover { border-color: var(--accent); }
.ex-item.on { border-color: var(--accent); background: var(--accent-soft); }
.ex-num { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--accent); flex-shrink: 0; width: 20px; }
.ex-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-right: auto; }
.ex-label { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.ex-src { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); }
.ex-play { color: var(--ink-muted); flex-shrink: 0; }
.ex-item.on .ex-play { color: var(--accent); }

/* guide quotes were crowded — breathing room */
.prose blockquote, main > blockquote { margin: 22px 0 !important; }
main blockquote + blockquote { margin-top: 26px !important; }

/* ---------- v16: course + guide context bars ---------- */
.ctx-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; margin: 0 0 18px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--r-md); font-size: 13.5px;
}
.ctx-bar .k { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.ctx-bar .t { font-weight: 700; color: var(--ink); margin-right: auto; }
.ctx-bar a { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.ctx-bar a:hover { text-decoration: underline; }
.ctx-bar.gold { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.ctx-bar.gold .k { color: var(--gold); }
.ctx-bar.gold a { color: var(--gold); }

/* ---------- v16: posted date ---------- */
.posted-date { font-weight: 600; }

/* ---------- v16: archive ---------- */
.arch-year { margin: 34px 0 8px; }
.arch-year h2 { font-size: 24px; font-weight: 800; color: var(--ink); }
.arch-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.arch-month { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); text-decoration: none; transition: all .15s; }
.arch-month:hover { border-color: var(--accent); }
.arch-month .m { font-weight: 700; color: var(--ink); margin-right: auto; }
.arch-month .n { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); }
.arch-list { margin: 8px 0 20px; }

/* ---------- v16: community / profile ---------- */
.prof-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .prof-grid { grid-template-columns: 1fr; } }
.prof-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.prof-card h3 { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.prof-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.prof-row:last-child { border-bottom: 0; }
.prof-row .lbl { color: var(--ink-soft); margin-right: auto; }
.prof-row .val { font-weight: 700; color: var(--ink); }
.prof-input { width: 100%; padding: 11px 14px; font-family: var(--font); font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--r-md); outline: none; }
.prof-input:focus { border-color: var(--accent); }
.vis-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.vis-row:last-child { border-bottom: 0; }
.vis-row .t { font-size: 14px; color: var(--ink); font-weight: 600; }
.vis-row .d { font-size: 12px; color: var(--ink-muted); }
.vis-row .tt { display: flex; flex-direction: column; gap: 1px; margin-right: auto; }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl { position: absolute; inset: 0; border-radius: 24px; background: var(--border-strong); transition: .2s; }
.switch .sl::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + .sl { background: var(--green); }
.switch input:checked + .sl::before { transform: translateX(20px); }
.lvl-badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); vertical-align: 2px; }
.pts-big { font-size: 42px; font-weight: 800; color: var(--ink); line-height: 1; }
.pts-sub { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; }
.lvl-track { position: relative; height: 8px; border-radius: 6px; background: var(--bg-alt); margin: 16px 0 6px; overflow: hidden; }
.lvl-track i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 6px; }
.cm-like { border: none; background: none; cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--ink-muted); padding: 3px 8px; border-radius: var(--r-pill); }
.cm-like.on { color: var(--cta); font-weight: 700; }
.cm-like:hover { background: var(--accent-soft); }
.cm-who-link { cursor: pointer; color: var(--ink); text-decoration: none; }
.cm-who-link:hover { color: var(--accent); text-decoration: underline; }
.like-act.on { background: var(--accent-soft); border-color: var(--cta); color: var(--cta); }
.stat-note { font-size: 12.5px; color: var(--ink-muted); background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); border-radius: var(--r-md); padding: 10px 16px; margin: 14px 0 22px; line-height: 1.6; }
html[data-theme="dark"] .stat-note { background: rgba(212,168,83,0.08); }
.board { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.board .bd-head { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 800; color: var(--ink); font-size: 15.5px; }
.board .bd-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
.board .bd-row:last-child { border-bottom: 0; }
.board .bd-rank { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-muted); width: 22px; }
.board .bd-name { font-weight: 700; color: var(--ink); margin-right: auto; }
.board .bd-val { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }
.board .bd-skel { color: var(--ink-muted); font-size: 13px; padding: 14px 20px 18px; line-height: 1.6; }

/* ---------- v16: events ---------- */
.ev-list { display: flex; flex-direction: column; gap: 12px; }
.ev-card { display: flex; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 20px; box-shadow: var(--shadow-sm); }
.ev-date { flex-shrink: 0; width: 64px; text-align: center; background: var(--accent-soft); border-radius: var(--r-md); padding: 9px 4px; }
.ev-date .mo { font-family: var(--mono); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); display: block; }
.ev-date .da { font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.15; }
.ev-body { min-width: 0; margin-right: auto; }
.ev-title { font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.ev-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); margin-top: 3px; }
.ev-live { font-family: var(--mono); font-size: 11px; font-weight: 800; color: #d5382e; border: 1px solid #f0b9b5; background: #fdf0ef; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; }
html[data-theme="dark"] .ev-live { background: rgba(213,56,46,0.12); border-color: rgba(213,56,46,0.4); }
.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }

/* ---------- v17: share row ---------- */
.share-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.sh-lbl { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.sh-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; cursor: pointer; text-decoration: none;
  font-family: var(--font); font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); transition: all .15s;
}
.sh-btn:hover { border-color: var(--accent); color: var(--accent); }
.fb-ic { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; background: #1877f2; color: #fff; font-weight: 800; font-size: 11px; }

/* ---------- v17: ask bubble + modal ---------- */
.ask-bubble {
  position: absolute; z-index: 900; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 19px; font-weight: 800; border: 2px solid #fff;
  box-shadow: var(--shadow-lg); transition: transform .12s; font-family: var(--font);
}
.ask-bubble:hover { transform: scale(1.12); background: var(--accent-hover); }
.ask-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(9,14,26,0.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.ask-modal { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 24px 26px; }
.ask-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ask-head h3 { font-size: 19px; font-weight: 800; color: var(--ink); }
.ask-quote {
  margin: 8px 0 6px !important; padding: 12px 16px; font-size: 14px; line-height: 1.6; color: var(--ink-soft);
  background: var(--gold-soft); border-left: 3px solid var(--gold); border-radius: 0 var(--r-md) var(--r-md) 0; font-style: italic;
}
html[data-theme="dark"] .ask-quote { background: rgba(212,168,83,0.08); }
.ask-src { font-family: var(--mono); font-size: 11px; color: var(--accent); font-weight: 700; margin: 2px 0 10px; }
.ask-modal textarea, .q-ansform textarea {
  width: 100%; min-height: 84px; resize: vertical; padding: 12px 14px; margin-top: 8px;
  font-family: var(--font); font-size: 14.5px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--r-md); outline: none;
}
.ask-modal textarea:focus, .q-ansform textarea:focus { border-color: var(--accent); }
.ask-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.ask-foot .hint { font-size: 12px; color: var(--ink-muted); margin-right: auto; line-height: 1.5; }

/* ---------- v17: question cards ---------- */
.q-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 22px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.q-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.q-src { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--accent); text-decoration: none; margin: 4px 0 8px; }
.q-src:hover { text-decoration: underline; }
.q-text { font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.55; margin: 4px 0 10px; }
.q-answers { border-top: 1px solid var(--border); padding-top: 6px; }
.q-answers.collapsed-q { display: none; }
.q-ans { padding: 10px 0 8px 14px; border-left: 2px solid var(--border); margin: 8px 0; }
.q-ansform { display: flex; gap: 10px; align-items: flex-end; margin-top: 8px; }
.q-ansform textarea { min-height: 52px; margin-top: 0; }
.q-toggle { border: none; background: none; cursor: pointer; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--accent); padding: 6px 0 0; }
.q-toggle:hover { text-decoration: underline; }

/* ---------- v18: Scottish color palettes (on top of light/dark) ---------- */
/* Caledonian Blue is the default (current look). Each palette re-tints accent + gold + light bg. */
html[data-palette="heather"] { --accent: #7c5cd6; --accent-soft: #efe9fb; --accent-hover: #6847c4; --gold: #b0699a; --gold-soft: #f9eef5; }
html[data-palette="heather"][data-theme="dark"] { --accent-soft: rgba(124,92,214,0.16); --gold-soft: rgba(176,105,154,0.12); }
html[data-palette="machair"] { --accent: #1e7f56; --accent-soft: #e5f4ec; --accent-hover: #166943; --gold: #c2892e; --gold-soft: #faf3e3; }
html[data-palette="machair"][data-theme="dark"] { --accent-soft: rgba(30,127,86,0.18); }
html[data-palette="islay"] { --accent: #b3592a; --accent-soft: #f9ece4; --accent-hover: #9c4a20; --gold: #8c7147; --gold-soft: #f5f0e6; }
html[data-palette="islay"][data-theme="dark"] { --accent-soft: rgba(179,89,42,0.16); }
html[data-palette="northsea"] { --accent: #0e7d8a; --accent-soft: #e3f2f4; --accent-hover: #0a6570; --gold: #b98a2e; }
html[data-palette="northsea"][data-theme="dark"] { --accent-soft: rgba(14,125,138,0.18); }
.pal-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.pal-swatch {
  display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px 14px;
  font-family: var(--font); font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--r-pill);
}
.pal-swatch.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pal-dot { width: 14px; height: 14px; border-radius: 50%; }

/* ---------- v18: search filter chips ---------- */
.sf-row { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 22px 4px; border-bottom: 1px solid var(--border); }
.sf-chip {
  padding: 6px 13px; cursor: pointer; font-family: var(--font); font-size: 12px; font-weight: 700;
  color: var(--ink-soft); background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--r-pill);
}
.sf-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* hero type-ahead: two-line labels so video moments aren't cut off */
.hs-item .n { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }

/* ---------- v18: floating mini-player ---------- */
.icp-wrap.icp-float .icp {
  position: fixed; bottom: 16px; right: 16px; width: 400px; max-width: calc(100vw - 24px);
  z-index: 950; box-shadow: 0 18px 60px -12px rgba(9,14,26,0.55); border-radius: var(--r-md);
}
.icp-float-close { display: none; }
.icp-wrap.icp-float .icp-float-close {
  display: flex; align-items: center; justify-content: center;
  position: fixed; right: 8px; bottom: calc(16px + 225px - 10px); z-index: 960;
  width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(9,14,26,0.9); color: #fff; font-size: 12px; box-shadow: var(--shadow-md);
}
@media (max-width: 640px) { .icp-wrap.icp-float .icp { width: calc(100vw - 20px); right: 10px; bottom: 10px; } }

/* ---------- v18: gift ---------- */
.gift-n { font-family: var(--mono); font-size: 11px; color: var(--gold); margin-left: 4px; }
.gift-banner { background: linear-gradient(90deg, #b98a2e, #d4a853); color: #241a05; }
.gift-banner-in { max-width: var(--max); margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13.5px; font-weight: 700; }
.gift-banner-in span { margin-right: auto; }

/* ---------- v18: inspiration quote card ---------- */
.insp-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: var(--r-lg); padding: 22px 24px 16px; box-shadow: var(--shadow-sm); }
.insp-mark { position: absolute; top: 2px; right: 16px; font-size: 64px; line-height: 1; color: var(--gold); opacity: 0.18; font-family: Georgia, serif; }
.insp-q { font-size: 16.5px; line-height: 1.6; color: var(--ink); font-weight: 600; font-style: italic; }
.insp-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.insp-src { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); text-decoration: none; }
.insp-src:hover { color: var(--accent); }

/* ---------- v18: nav avatar + welcome ---------- */
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); background-size: cover; background-position: center;
  color: var(--accent); font-size: 13px; font-weight: 800; text-decoration: none; border: 2px solid var(--border-strong);
}
.nav-avatar:hover { border-color: var(--accent); }
.pf-avatar-row { display: flex; align-items: center; gap: 16px; }
#pfAvatarPreview {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); background-size: cover; background-position: center;
  color: var(--accent); font-size: 26px; font-weight: 800; border: 2px solid var(--border-strong);
}
.cm-avatar { background-size: cover; background-position: center; }

/* ---------- v18: add-to-calendar ---------- */
.ev-add { display: flex; gap: 6px; flex-wrap: wrap; }
.ev-add a, .ev-add .sh-btn { font-size: 11px; padding: 5px 10px; }

/* ---------- v18: mobile density (less white space, tighter type on phones) ---------- */
@media (max-width: 640px) {
  .hero { padding: 34px 14px 28px; }
  .hero h1 { font-size: 27px; line-height: 1.2; }
  .hero .sub { font-size: 14.5px; margin-bottom: 20px; }
  .section { padding: 30px 0; }
  .section-head { margin-bottom: 14px; }
  .section-head h2 { font-size: 21px; }
  .section-head p { font-size: 13.5px; }
  .topic-hero { padding: 26px 14px 20px; }
  .topic-hero h1 { font-size: 24px; }
  .topic-hero p { font-size: 14px; }
  .stats { gap: 8px; padding: 4px 10px 10px; }
  .stat { padding: 10px 14px; min-width: 128px; }
  .stat .num { font-size: 21px; }
  .container { padding: 0 12px; }
  .lesson-head h1 { font-size: 22px; }
  .short-version { padding: 14px 16px; }
  .sv-item { font-size: 14px; }
  .prose p, .cm-body, .tr-p .tx { font-size: 14px; line-height: 1.6; }
  .session-card .body { padding: 12px 14px; }
  .session-card h3 { font-size: 15px; }
  .pl-card, .prof-card, .testi { padding: 16px; }
  .grid { gap: 10px; }
  .cw-grid { gap: 10px; }
  .ev-card { padding: 12px 14px; gap: 10px; }
  footer { padding-top: 26px; }
  .foot-inner { gap: 18px; }
}

/* v18: real video thumbnails on cards */
.thumb.has-img { background-size: cover; background-position: center; }
.thumb.has-img::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,14,26,0.15) 0%, rgba(9,14,26,0.55) 100%); }
.thumb.has-img > * { position: relative; z-index: 1; }
@media (max-width: 1600px) { .nav-links { gap: 0; } .nav-links > a, .nav-drop > button { padding: 8px 9px; } }


/* ============ v19 (9-2-26): the notes round ============ */

/* Player poster with a real video frame behind the title */
.icp-poster.has-thumb { background-size: cover; background-position: center; }
.icp-poster.has-thumb .icp-title, .icp-poster.has-thumb .icp-kicker, .icp-poster.has-thumb .icp-sub { text-shadow: 0 1px 10px rgba(0,0,0,.65); }

/* Audio-only "listen" mode (proposal 08) */
.icp.audio-only video { visibility: hidden; }
.icp.audio-only .icp-stage::after {
  content: '🎧 Audio mode — the class keeps playing with the screen dark. Tap 🎧 again for video.';
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #cfd8ea; font-size: 14.5px; padding: 24px; text-align: center;
}
.icp-btn.on { color: var(--gold); }

/* Excerpt toolbar prev/next */
.ex-toolbar #exPrevBtn, .ex-toolbar #exNextBtn {
  background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); cursor: pointer;
}
.ex-toolbar #exPrevBtn:hover, .ex-toolbar #exNextBtn:hover { border-color: var(--accent); color: var(--accent); }
.ex-item .ex-label { white-space: normal; }

/* Hero quick choices */
.hero-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 860px; margin: 22px auto 0; }
.hc-card {
  display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color .12s, transform .12s, box-shadow .12s;
}
.hc-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.hc-ic { font-size: 20px; }
.hc-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hc-t b { font-size: 13.5px; color: var(--ink); }
.hc-t small { font-size: 11.5px; color: var(--ink-muted); line-height: 1.3; }
@media (max-width: 900px) { .hero-choices { grid-template-columns: 1fr 1fr; } }

/* Search filter chips look like checkboxes now (pick any mix) */
.sf-chip .cb {
  display: inline-block; width: 13px; height: 13px; border: 1.5px solid var(--line-strong, var(--line));
  border-radius: 4px; margin-right: 6px; vertical-align: -2px; position: relative;
}
.sf-chip.on .cb { background: var(--accent); border-color: var(--accent); }
.sf-chip.on .cb::after { content: '✓'; position: absolute; inset: -3px 0 0 1px; color: #fff; font-size: 11px; font-weight: 800; }

/* Ask-the-library answer box (proposal 06) */
.ans-box { border: 1.5px solid var(--gold); background: var(--gold-soft); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 14px; }
.ans-k { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.ans-x { font-size: 14px; line-height: 1.65; color: var(--ink); }
.ans-srcs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ans-src { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.ans-src:hover { border-color: var(--accent); }

/* Course progress (proposal 02) */
.course-prog .cp-part { color: var(--accent); }
.course-prog .cp-done { color: #2e7d32; }

/* Jori's replies stand out (proposal 10) */
.cm-jori { border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: var(--r-sm); padding-left: 10px; }
.cm-avatar.jori { background: var(--gold); color: #fff; }
.jori-badge {
  font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: #fff; background: var(--gold); border-radius: 999px; padding: 2.5px 9px;
}

/* Start-your-journey card (proposal 01) */
.journey-card { background: var(--card); border: 1.5px solid var(--accent); border-radius: var(--r-lg, 14px); padding: 20px 22px; box-shadow: var(--shadow-md); }
.journey-card.done { border-color: #2e7d32; }
.journey-card .jc-k { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.journey-card h3 { font-size: 19px; margin: 0 0 6px; }
.journey-card p { font-size: 14px; color: var(--ink-soft); margin: 0 0 10px; }
.jc-q { margin: 10px 0; }
.jc-lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.jc-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.jc-opt.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.jc-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.jc-change { background: none; border: none; font: inherit; font-size: 12px; color: var(--ink-muted); text-decoration: underline; cursor: pointer; }
.journey-card .btn[disabled] { opacity: .45; pointer-events: none; }

/* Blurred rest-of-write-up on tune previews */
.blur-more { position: relative; cursor: pointer; }
.blur-more p { filter: blur(6px); user-select: none; }
.blur-more .blur-cta {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 14px; color: var(--ink); padding: 20px;
}

/* Bottom tab bar on phones (proposal 07) */
.bottom-tabs { display: none; }
@media (max-width: 860px) {
  .bottom-tabs {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 18px rgba(10, 20, 40, .10);
  }
  body { padding-bottom: 64px; }
  .bt-item {
    display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px 4px;
    font: inherit; font-size: 11px; font-weight: 700; color: var(--ink-muted); background: none; border: none; border-radius: 10px; cursor: pointer;
  }
  .bt-item.on, .bt-item:hover { color: var(--accent); background: var(--accent-soft); }
  .bt-ic { font-size: 18px; line-height: 1.2; }
  .icp-wrap.icp-float .icp { bottom: 74px; }
}

/* Palettes color the whole site: the deep navy surfaces follow the scheme too */
:root { --navy-1: #101a2e; --navy-2: #1d2b4a; }
html[data-palette="heather"] { --navy-1: #191330; --navy-2: #2b204d; }
html[data-palette="machair"] { --navy-1: #0e2419; --navy-2: #1b3d2c; }
html[data-palette="islay"] { --navy-1: #26160d; --navy-2: #40281a; }
html[data-palette="northsea"] { --navy-1: #0a2126; --navy-2: #15373f; }
.icp-stage { background: linear-gradient(135deg, var(--navy-1) 0%, var(--navy-2) 100%); }
.thumb { background: linear-gradient(135deg, var(--navy-2), var(--navy-1)); }
.dark-panel { background: linear-gradient(150deg, var(--navy-1), var(--navy-2)); }

/* ---------- v20: brand logo ---------- */
.brandlogo { height: 24px; width: auto; display: inline-block; vertical-align: middle; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.lg-dark { display: none; }
html[data-theme="dark"] .lg-light { display: none; }
html[data-theme="dark"] .lg-dark { display: inline-block; }
@media (max-width: 560px) { .brandlogo { height: 19px; } }
/* v20: stat roll-up */
.stat { opacity: 0; transform: translateY(6px); transition: opacity .6s ease, transform .6s ease; }
.stat.statin { opacity: 1; transform: none; }

/* ---------- v20: tunes browser + requests ---------- */
.tunes-controls { max-width: 980px; margin: 0 auto 22px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.tc-row { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0; flex-wrap: wrap; }
.tc-lbl { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); padding-top: 7px; min-width: 74px; }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.tchip { border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-soft); font: 600 13px var(--font); padding: 6px 12px; border-radius: var(--r-pill); cursor: pointer; }
.tchip:hover { border-color: var(--accent); color: var(--accent); }
.tchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tchip .tc-n { opacity: .65; font-weight: 500; margin-left: 3px; }
.tg-count { font-size: 14px; color: var(--ink-muted); font-weight: 600; }
.req-form { display: flex; gap: 8px; }
.req-form input { flex: 1; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md); font: 500 14px var(--font); background: var(--surface); color: var(--ink); }
.req-item { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.req-item .rq-t { flex: 1; font-weight: 600; font-size: 14px; color: var(--ink); }
.rq-vote { border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--r-pill); padding: 4px 12px; font: 700 13px var(--font); color: var(--ink-soft); cursor: pointer; }
.rq-vote.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.req-empty { font-size: 13.5px; color: var(--ink-muted); padding: 10px 2px; }

/* ---------- v20: master index + playlist descriptions ---------- */
.idx-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 22px; }
@media (max-width: 720px) { .idx-list { grid-template-columns: 1fr; } }
.ev-idx { display: flex; flex-direction: column; padding: 7px 6px; border-radius: var(--r-sm); text-decoration: none; border-bottom: 1px solid var(--border); }
.ev-idx:hover { background: var(--surface-hover); }
.ev-idx .ei-t { font-weight: 600; font-size: 13.5px; color: var(--ink); line-height: 1.3; }
.ev-idx .ei-m { font-size: 11.5px; color: var(--ink-muted); margin-top: 1px; }
.ri-desc { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.45; }

/* ---------- v20: timezone + subscribe + next-live ---------- */
.tzbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.tz-now { font-size: 12.5px; color: var(--ink-muted); font-weight: 600; }
.tz-select { padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); font: 600 12.5px var(--font); background: var(--surface); color: var(--ink-soft); }
.cal-subscribe { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 6px; padding: 12px 14px; background: var(--accent-soft); border-radius: var(--r-md); }
.cal-subscribe .cs-lbl { font-size: 13px; color: var(--ink-soft); font-weight: 600; flex: 1; min-width: 240px; }
.ev-tlink { color: inherit; text-decoration: none; }
.ev-tlink:hover { color: var(--accent); text-decoration: underline; }
.next-live { max-width: 880px; margin: 0 auto; text-align: center; background: var(--panel-dark); color: #fff; border-radius: var(--r-xl); padding: 40px 28px; box-shadow: var(--shadow-md); }
.next-live .nl-k { font-size: 11.5px; letter-spacing: .14em; font-weight: 800; color: #9db4dd; }
.next-live .nl-title { font-size: 26px; font-weight: 800; margin-top: 10px; line-height: 1.25; }
.next-live .nl-when { font-size: 15px; color: #c6d4ef; margin-top: 8px; }
.next-live .nl-count { font-size: 13px; color: #9db4dd; margin-top: 6px; font-weight: 700; }
.next-live .sh-btn { background: rgba(255,255,255,0.08); color: #dbe6fb; border-color: rgba(255,255,255,0.2); }

/* ---------- v20: continue watching + what's new + map + print ---------- */
.cw-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cw-card { display: flex; flex-direction: column; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; text-decoration: none; box-shadow: var(--shadow-sm); }
.cw-card:hover { border-color: var(--accent); }
.cw-t { font-weight: 700; font-size: 13.5px; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cw-bar { height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; }
.cw-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.cw-m { font-size: 11.5px; color: var(--ink-muted); font-weight: 600; }
.new-strip { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 22px auto 0; max-width: 620px; padding: 10px 16px; background: var(--gold-soft); border: 1px solid var(--gold); border-radius: var(--r-pill); color: var(--ink); text-decoration: none; font-size: 13.5px; }
.new-strip:hover { box-shadow: var(--shadow-sm); }
.wmap-wrap { position: relative; background: var(--panel-dark); border-radius: var(--r-lg); padding: 10px; }
.wmap-wrap svg { width: 100%; height: auto; display: block; }
.wm-dot { fill: #3c5a8f; }
.wm-me { fill: var(--gold); stroke: #fff; stroke-width: 0.25; }
.wmap-tip { position: absolute; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; padding: 5px 9px; font-size: 12px; }
#icPrintSheet { display: none; }

/* v20: nav crowding fix */
.brand { flex-shrink: 0; }
@media (max-width: 1380px) { .nav .brand .studio { display: none; } }

/* ---------- v21 ---------- */
.share-row .sh-btn { white-space: nowrap; }
.gift-n { display: inline; white-space: nowrap; }
.mf-files { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 12px; }
.mf-file { font-size: 12.5px; color: var(--ink-soft); background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 4px 11px; }
.mf-group h2 { font-size: 17px; }

/* ---------- v21: map + onboarding + designed print ---------- */
.wm-glow { fill: rgba(212,168,83,0.28); }
#icOnboard { position: fixed; inset: 0; z-index: 9999; background: rgba(10,16,30,0.66); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 18px; }
.ob-card { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); max-width: 440px; width: 100%; padding: 28px 28px 24px; text-align: center; }
.ob-hero { font-size: 40px; }
.ob-card h2 { font-size: 21px; margin: 8px 0 6px; color: var(--ink); }
.ob-card p { font-size: 14px; color: var(--ink-soft); }
.ob-lbl { display: block; text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-muted); margin: 16px 0 5px; }
.ob-card input[type=text] { width: 100%; padding: 11px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md); font: 500 14.5px var(--font); background: var(--surface); color: var(--ink); }
.ob-check { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-size: 13.5px; color: var(--ink); font-weight: 600; margin-top: 14px; }
.ob-check input { margin-top: 3px; }
.ob-sub { font-size: 12px; color: var(--ink-muted); font-weight: 500; }
.ob-btns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
#icPrintSheet { display: none; }
@media print {
  html.ic-print body > *:not(#icPrintSheet) { display: none !important; }
  html.ic-print #icPrintSheet { display: block !important; font-family: Helvetica, Arial, sans-serif; color: #16233b;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html.ic-print #icPrintSheet .ps-band { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: #12294b; border-radius: 10px; padding: 12px 18px; margin-bottom: 16px; }
  html.ic-print #icPrintSheet .ps-logo { height: 20px; width: auto; }
  html.ic-print #icPrintSheet .ps-kicker { color: #bcd0ef; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
  html.ic-print #icPrintSheet .ps-title { font-size: 23px; margin: 0 0 14px; color: #12294b; line-height: 1.2; }
  html.ic-print #icPrintSheet .short-version { background: #eef3f9; border-left: 4px solid #2f6fed; border-radius: 8px; padding: 12px 16px; margin: 0 0 14px; }
  html.ic-print #icPrintSheet .takeaways { background: #faf3e3; border-left: 4px solid #b98a2e; border-radius: 8px; padding: 12px 16px; margin: 0 0 14px; }
  html.ic-print #icPrintSheet .chapters { border: 1px solid #d8d0c0; border-radius: 8px; padding: 12px 16px; }
  html.ic-print #icPrintSheet h2, html.ic-print #icPrintSheet h3 { font-size: 14px; margin: 0 0 8px; color: #12294b; text-transform: uppercase; letter-spacing: .04em; }
  html.ic-print #icPrintSheet li, html.ic-print #icPrintSheet p { font-size: 11.5px; line-height: 1.55; }
  html.ic-print #icPrintSheet a { color: #16233b; text-decoration: none; }
  html.ic-print #icPrintSheet video, html.ic-print #icPrintSheet button, html.ic-print #icPrintSheet .sh-btn { display: none !important; }
  html.ic-print #icPrintSheet .ps-foot { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    margin-top: 18px; padding-top: 10px; border-top: 2px solid #12294b; font-size: 11px; color: #47536b; }
}

/* ============ v22 (9-2-26): the V21 notes round ============ */

/* Inline links inside content read as links: bold + underlined, site-wide */
.prose a, .tk a, blockquote a, .cm-body a, .tr-p .tx a, .sv-item a, .bs-body a, .ml-note a, .stat-note a,
.q-text a, .about-txt a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* Appearance chooser (light / dark / color schemes) */
#icAppear { position: fixed; inset: 0; background: rgba(10, 16, 30, .55); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
#icAppear .ap-card { background: var(--surface, var(--card, #fff)); border-radius: 16px; padding: 22px 24px; max-width: 430px; width: 100%; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
#icAppear .ap-k { font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
#icAppear .ap-row { display: flex; flex-wrap: wrap; gap: 8px; }
#icAppear .ap-opt { font: 700 13.5px var(--font); border: 1.5px solid var(--border, var(--line)); background: none; color: var(--ink); border-radius: 999px; padding: 8px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
#icAppear .ap-opt.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
#icAppear .ap-dot { width: 13px; height: 13px; border-radius: 50%; display: inline-block; }
#icAppear .ap-close { margin-top: 16px; width: 100%; font: 700 14px var(--font); border: none; border-radius: 10px; padding: 11px; background: var(--accent); color: #fff; cursor: pointer; }

/* Join banner for signed-out visitors */
.join-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex; align-items: center; gap: 14px; padding: 10px 18px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--panel-dark, #101a2e); color: #eef2fb; box-shadow: 0 -6px 22px rgba(8, 14, 28, .35); }
.join-bar .jb-t { flex: 1; font-size: 13.5px; line-height: 1.45; }
.join-bar .jb-cta { flex-shrink: 0; background: #fff; color: #12294b; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 9px 18px; text-decoration: none; }
.join-bar .jb-x { background: none; border: none; color: #9fb4d8; font-size: 15px; cursor: pointer; padding: 4px 6px; }
@media (max-width: 860px) { .join-bar { bottom: 56px; } body.has-join-bar { padding-bottom: 120px; } }
@media (min-width: 861px) { body.has-join-bar { padding-bottom: 64px; } }

/* Welcome-back hero quote */
.hero-inspire { max-width: 640px; margin: 14px auto 0; font-style: italic; font-size: 14.5px; color: var(--gold); }

/* One-line, tidier action + share rows */
.ic-actions, .share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ic-actions .ic-act, .share-row .sh-btn { white-space: nowrap; padding: 7px 13px; font-size: 12.5px; }

/* Add-to-calendar popup */
.ev-add { position: relative; }
.cal-pop { display: none; position: absolute; z-index: 30; background: var(--surface, var(--card, #fff)); border: 1px solid var(--border, var(--line)); border-radius: 12px; box-shadow: 0 14px 40px rgba(10, 20, 40, .18); padding: 10px; min-width: 190px; }
.cal-pop.open { display: flex; flex-direction: column; gap: 6px; }
.cal-pop a { white-space: nowrap; }

/* Onboarding extras */
.ob-avrow { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.ob-av { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft) center/cover no-repeat; border: 1.5px solid var(--border, var(--line)); }
.ob-av.has { border-color: var(--accent); }
.ob-upl { cursor: pointer; }
.ob-pals { display: flex; gap: 8px; margin-top: 6px; }
.ob-pal { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid transparent; cursor: pointer; }
.ob-pal.on { border-color: var(--ink); }

/* About-me block on member pages */
.mb-aboutrow { display: flex; gap: 14px; align-items: flex-start; }
.mb-av { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft) center/cover no-repeat; flex-shrink: 0; border: 2px solid var(--border, var(--line)); }
.mb-bio { font-size: 14px; line-height: 1.65; margin: 0 0 6px; white-space: pre-wrap; }
.mb-loc { font-size: 12.5px; color: var(--ink-muted); font-weight: 600; }

/* Members don't see the sales pitches; visitors do */
body.is-member .cta-public { display: none !important; }

/* v24: tidy action/share rows + share popup */
.share-row { position: relative; margin-top: 6px; }
.share-pop { top: 100%; left: 0; margin-top: 6px; }
.ic-actions { margin: 10px 0 2px; padding: 8px 10px; background: var(--surface, var(--card,#fff)); border: 1px solid var(--border, var(--line)); border-radius: 12px; width: fit-content; max-width: 100%; }
.ic-actions .ic-act { border: none; background: none; }
/* related-guide chips: same-topic first, labeled */
.rel-first { outline: 1.5px solid var(--accent); }
/* excerpt quote styling */
.ex-label.is-quote { font-style: italic; }
.ex-label.is-quote::before { content: '“'; } .ex-label.is-quote::after { content: '”'; }
.ex-kicker-note { font-size: 11px; color: var(--ink-muted); }

/* v25 audit: the player bar must never widen the page on phones */
.icp, .icp-wrap { max-width: 100%; min-width: 0; }
.icp-rail { min-width: 40px; }
.icp-bar { min-width: 0; overflow: hidden; }
@media (max-width: 640px) {
  .icp-bar { gap: 6px; padding: 8px 8px; }
  .icp-btn { padding: 4px 6px; font-size: 11px; }
  .icp-time { font-size: 11px; }
  #icpFit { display: none !important; }
  .icp-bar .icp-time:nth-of-type(2) { display: none; }
}
/* sidebar guide notes were 10px — readable minimum */
.sg-why { font-size: 11.5px !important; }
/* v25 audit: audio player must fit phones */
.ica { min-width: 0; max-width: 100%; }
.ica-titles { min-width: 0; overflow: hidden; }
.ica-title, .ica-kicker { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
@media (max-width: 640px) {
  .ica-head { flex-wrap: wrap; gap: 6px; }
  .ica-titles { flex: 1 1 100%; order: -1; }
  .ica-title, .ica-kicker { white-space: normal; }
  .ica-skip, .ica-rate { padding: 4px 8px; font-size: 11px; }
}
/* v25 audit: old-post images/iframes carry fixed width attributes — never let them widen the column */
.lesson-layout > main, .lesson-layout > aside, .grid > *, .duo > *, .split > * { min-width: 0; }
@media (max-width: 1000px) { .lesson-layout { grid-template-columns: minmax(0, 1fr); } }
.wp-content img, .prose img, .wp-content iframe, .prose iframe, .wp-content video, .wp-content table { max-width: 100%; }
.wp-content table { display: block; overflow-x: auto; }
.wp-content pre { max-width: 100%; overflow-x: auto; }
.wp-content a, .prose a { overflow-wrap: anywhere; }
.wp-content strong, .wp-content b, .wp-content code, .wp-content p { overflow-wrap: anywhere; }
/* v25 audit: no text under 11px anywhere */
.cat-tag, .ica-kicker, .alk-k { font-size: 11px !important; }
/* v25 audit (code review): aliases for variables a few later blocks referenced but never defined */
:root { --card: var(--surface); --line: var(--border); --line-strong: var(--border-strong); }
body.not-member .member-only { display: none !important; }
/* overlays above the floating player; appearance chooser above the nav */
.icp-wrap.icp-float .icp { z-index: 300 !important; }
#icAppear { z-index: 800 !important; }
.icp-wrap.icp-float .icp-float-close { position: absolute; top: 6px; right: 6px; bottom: auto; left: auto; z-index: 6; width: 32px; height: 32px; font-size: 14px; }
/* focus rings for the keyboard */
.icp:focus-visible, .ica:focus-visible, .chapter-row:focus-visible, .video-shell.locked:focus-visible, .tr-t:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* labels inside the player never spill out of the stage */
.icp-flash, .jump-flag, .ica-flash { max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.toast { max-width: calc(100vw - 32px); white-space: normal !important; text-align: center; }
/* saved / watched / liked states stay visible */
.ic-actions .ic-act.on { background: var(--gold-soft, #fff4d6) !important; border: 1px solid var(--gold, #b98a2e) !important; }
/* comfortable tap targets on touch screens */
@media (pointer: coarse) {
  .tr-p .tr-t, .chapter-row, .ts-chip, .cm-like, .jb-x, .icp-btn, .theme-toggle, .nav-burger, .chip, .sh-btn, .ic-act, .sf-chip { min-height: 40px; }
  .chapter-row { align-items: center; }
}
/* readable meta text (AA contrast) */
:root { --ink-muted: #66708a; }
html[data-theme="dark"] { --ink-muted: #8592ad; }
/* v25 audit: live-class cards on phones — Zoom button sits on its own full-width row instead of a squeezed pill */
.ev-card > .btn.primary { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 640px) {
  .ev-card { flex-wrap: wrap; }
  .ev-card > .btn.primary { flex: 1 1 100%; text-align: center; margin-top: 4px; }
  .ev-date { flex-shrink: 0; }
  .ev-body { flex: 1 1 0; min-width: 0; }
}

/* v26: resume chip over the poster + in the bar */
.icp-resume { margin-top: 12px; padding: 8px 16px; border: 1px solid rgba(255,255,255,0.34); border-radius: 999px; background: rgba(10,18,34,0.72); color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; backdrop-filter: blur(4px); }
.icp-resume:hover { background: rgba(10,18,34,0.9); border-color: rgba(255,255,255,0.55); }
.icp-resume-bar { font-weight: 600; }

/* v26: classes with a replay up but no transcript yet stay out of the browse lists until asked for */
body:not(.show-awaiting) .awaiting-tx { display: none; }
.awaiting-toggle { display: inline-block; margin: 10px 0 2px; padding: 6px 13px; border: 1px dashed var(--line); border-radius: 999px; background: transparent; color: var(--ink-muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.awaiting-toggle:hover { color: var(--ink); border-color: var(--ink-muted); }

/* v26: unobtrusive footer utility links */
.foot-note .ic-report, .foot-note .foot-guide { color: inherit; opacity: .78; text-decoration: underline; text-underline-offset: 2px; }
.foot-note .ic-report:hover, .foot-note .foot-guide:hover { opacity: 1; }
.ob-guide { margin-top: 12px; text-align: center; font-size: 13px; }
.ob-guide a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.ob-guide a:hover { color: var(--accent); }


/* ================= v31: membership gating ================= */
/* .blur-gate  — blurred only for visitors; a click opens the join modal.
   .blur-always — always blurred (preview twins are only ever served to visitors). */
.blur-always,
body.not-member .blur-gate {
  filter: blur(6px);
  -webkit-filter: blur(6px);
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
.blur-always *,
body.not-member .blur-gate * { pointer-events: none !important; }
.blur-always a, .blur-always button,
body.not-member .blur-gate a,
body.not-member .blur-gate button { text-decoration: none; }

/* A short line from me that sits above a blurred block. */
.gate-note {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--panel-2, rgba(47,111,237,0.06));
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 11px 14px;
  margin: 0 0 14px;
}
.gate-note b { color: var(--ink); }
.gate-note a { color: var(--accent); font-weight: 800; }

/* Show/hide by membership. */
body.not-member .member-only { display: none !important; }
body.is-member  .visitor-only { display: none !important; }

/* The visitor placeholder that stands in for a member-only page. */
.gate-placeholder {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-xl, 18px);
  padding: 34px 26px 30px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(16,24,40,.06));
}
.gate-placeholder .gp-ic { font-size: 40px; line-height: 1; }
.gate-placeholder h2 { font-size: 23px; font-weight: 800; margin: 12px 0 8px; }
.gate-placeholder > p { font-size: 15px; line-height: 1.7; color: var(--ink-soft); margin: 0 auto 16px; max-width: 560px; }
.gate-placeholder .gp-list { text-align: left; max-width: 460px; margin: 0 auto 20px; display: grid; gap: 8px; }
.gate-placeholder .gp-list span { display: flex; gap: 9px; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); }
.gate-placeholder .gp-list span i { font-style: normal; color: var(--accent); font-weight: 800; }
.gate-placeholder .gp-sign { font-size: 14px; color: var(--ink-muted); margin-top: 16px; font-style: italic; }

/* Compact "next live class" card (the full schedule lives on live.html). */
.next-live.nl-compact { text-align: left; padding: 22px 24px; }
.next-live.nl-compact .nl-title { font-size: 20px; }
.next-live .nl-links { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 560px) {
  .next-live .nl-links { flex-direction: column; align-items: stretch; }
  .next-live .nl-links .btn, .next-live .nl-links .sh-btn { width: 100%; justify-content: center; text-align: center; }
}

/* Member files: plain text links, one per line. */
.mf-list { display: block; margin: 4px 0 12px; }
.mf-list .mf-file { display: block; font-size: 14px; line-height: 1.85; color: var(--accent); background: none; border: 0; border-radius: 0; padding: 0; text-decoration: none; overflow-wrap: anywhere; }
.mf-list .mf-file:hover { text-decoration: underline; }


/* ================= v32: layout, member sidebar, samples ================= */

/* Rule: the "next live class" card is a LIGHT card that matches the page. */
.next-live {
  max-width: none; margin: 0; text-align: left;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 24px 26px; box-shadow: var(--shadow-sm);
}
.next-live .nl-k { color: var(--accent); }
.next-live .nl-title { color: var(--ink); }
.next-live .nl-title a { color: inherit; }
.next-live .nl-when { color: var(--ink-soft); }
.next-live .nl-count { color: var(--ink-muted); }
.next-live .sh-btn { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.next-live .sh-btn:hover { background: var(--surface-hover); }
.next-live.nl-compact { padding: 22px 24px; }

/* Home: the four "ways to start" boxes run the full width of the container. */
.hero-choices { max-width: var(--max); width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hc-card { padding: 14px 16px; }
@media (max-width: 900px) { .hero-choices { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .hero-choices { grid-template-columns: 1fr; } }

/* Home: member main column + right sidebar (stacks on mobile). */
.hm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
body.not-member .hm-grid { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 980px) { .hm-grid { grid-template-columns: minmax(0, 1fr); } }
.hm-main { min-width: 0; }
body.is-member .hm-main .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { body.is-member .hm-main .grid.cols-3 { grid-template-columns: minmax(0, 1fr); } }
.hm-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.side-card h3 { font-size: 15.5px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.side-card .next-live { padding: 0; border: 0; box-shadow: none; background: transparent; }
.side-card .next-live .nl-title { font-size: 17px; }
.side-links { display: flex; flex-direction: column; }
.side-links a { display: block; padding: 8px 0; font-size: 14px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--border); }
.side-links a:last-child { border-bottom: 0; }
.side-links a:hover { color: var(--accent); }
.nl-more { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.nl-more .nlm-k { font-size: 11.5px; letter-spacing: .12em; font-weight: 800; color: var(--ink-muted); text-transform: uppercase; }
.nl-more a { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); padding: 6px 0; }
.nl-more a:hover { color: var(--accent); }
.nl-more .nlm-when { display: block; font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.side-how { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.side-how b { color: var(--ink); display: block; font-size: 14px; margin-top: 10px; }
.side-how b:first-child { margin-top: 0; }

/* Labelled samples (Dashboard + Profile as a visitor sees them). */
.sample-banner {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--gold-soft); border: 1px solid var(--gold); border-radius: var(--r-lg);
  padding: 14px 18px; margin-bottom: 20px;
}
.sample-banner .sb-t { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.sample-banner .sb-t small { display: block; font-weight: 500; font-size: 13px; color: var(--ink-soft); }
.sample-tag {
  display: inline-block; font: 700 10.5px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold);
  border-radius: var(--r-pill); padding: 1px 9px; margin-left: 8px; vertical-align: 2px;
}
body.is-member .sample-tag, body.is-member .sample-banner { display: none !important; }
body.not-member .is-sample { position: relative; }
body.not-member .is-sample input,
body.not-member .is-sample textarea,
body.not-member .is-sample select,
body.not-member .is-sample button:not(.sb-join) { pointer-events: none; }

/* Scrambled placeholder rows behind the blur (visitors only). */
.scram-board .bd-row .bd-name { font-weight: 700; }
.gate-line { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 10px; }

/* Full-width, left-aligned event pages. */
.ev-wide { max-width: var(--max); }
.ev-head-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: space-between; }

/* Member home: headings sit left, above the cards, next to the sidebar. */
.hm-main .section-head { text-align: left; }
.hm-main .section-head p { margin-left: 0; margin-right: 0; }

/* Event pages run the full width of the container, left-justified. */
.ev-hero p { max-width: none; margin-left: 0; margin-right: 0; }
.ev-hero .ev-front { text-align: left; }
.ev-hero .evf-btns { justify-content: flex-start; }
.topic-hero.ev-hero .tzbar { justify-content: flex-start; }
.ev-hero .ev-add { justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
.ev-list .ev-card .sh-btn { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 640px) {
  .ev-list .ev-card { flex-wrap: wrap; }
  .ev-list .ev-card .sh-btn { width: 100%; justify-content: center; text-align: center; }
}

.hm-main .section-head { max-width: none; margin-left: 0; margin-right: 0; }

.ev-here { display: inline-block; font: 700 10.5px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: var(--r-pill); padding: 1px 9px; margin-left: 8px; vertical-align: 2px; }


/* ==========================================================================
   v33 — nav sizing, full-page colour schemes, shared member sidebar,
          member-map online dots, the headshot editor and the sample tour.
   ========================================================================== */

/* ---- 1. the nav CTA is exactly as tall as the search button beside it ---- */
:root { --navbtn-h: 38px; }
.nav-search-btn,
.nav-links > a.nav-cta,
.nav-cta {
  height: var(--navbtn-h);
  padding-top: 0; padding-bottom: 0;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; font-size: 13.5px;
}
.nav-links > a.nav-cta, .nav-cta { padding-left: 18px; padding-right: 18px; }
@media (max-width: 640px) { :root { --navbtn-h: 34px; } }

/* ---- 2. colour schemes re-skin the whole page, not only the buttons ---- */
/* Caledonian Blue is the default look, spelled out so switching back is exact. */
html[data-palette="caledonian"] {
  --bg: #faf8f4; --bg-alt: #f3efe8; --surface: #ffffff; --surface-hover: #fdfcfa;
  --ink: #16233b; --ink-soft: #47536b; --ink-muted: #7a8499;
  --border: #e7e1d5; --border-strong: #d8d0c0;
  --cta: #12294b; --cta-hover: #1d3f73; --panel-dark: #101a2e; --panel-dark-2: #1a2642;
}
html[data-palette="heather"] {
  --bg: #f4eefc; --bg-alt: #e7dcf7; --surface: #fffdff; --surface-hover: #faf6ff;
  --ink: #201736; --ink-soft: #4b4166; --ink-muted: #7d759a;
  --border: #ded0f1; --border-strong: #c8b4e7;
  --cta: #2b1f52; --cta-hover: #45356f; --panel-dark: #191330; --panel-dark-2: #2b204d;
}
html[data-palette="machair"] {
  --bg: #ecf7f0; --bg-alt: #daece0; --surface: #fbfffc; --surface-hover: #f4fbf6;
  --ink: #112a1e; --ink-soft: #3f584a; --ink-muted: #728a7d;
  --border: #cbe4d4; --border-strong: #aed3bd;
  --cta: #123b2a; --cta-hover: #1e5c43; --panel-dark: #0e2419; --panel-dark-2: #1b3d2c;
}
html[data-palette="islay"] {
  --bg: #f8efe0; --bg-alt: #eee0c9; --surface: #fffcf6; --surface-hover: #fff8ee;
  --ink: #2a1c11; --ink-soft: #57463a; --ink-muted: #8a7869;
  --border: #e3d1b6; --border-strong: #cfb492;
  --cta: #3a2313; --cta-hover: #57351f; --panel-dark: #26160d; --panel-dark-2: #40281a;
}
html[data-palette="northsea"] {
  --bg: #e9f5f8; --bg-alt: #d7eaef; --surface: #fbfeff; --surface-hover: #f3fbfc;
  --ink: #0f262a; --ink-soft: #3c565b; --ink-muted: #6f888d;
  --border: #c6e0e6; --border-strong: #a8cdd5;
  --cta: #0d3238; --cta-hover: #164c55; --panel-dark: #0a2126; --panel-dark-2: #15373f;
}
/* the same schemes in dark mode — tinted, never flat black */
html[data-palette="caledonian"][data-theme="dark"] {
  --bg: #0d1423; --bg-alt: #0a101d; --surface: #131d33; --surface-hover: #18243d;
  --border: #223052; --border-strong: #2e3f68;
}
html[data-palette="heather"][data-theme="dark"] {
  --bg: #130f22; --bg-alt: #0e0b1a; --surface: #1c1633; --surface-hover: #241c40;
  --border: #2e2450; --border-strong: #3d3068; --ink: #f3f0fb; --ink-soft: #c2b9dd;
}
html[data-palette="machair"][data-theme="dark"] {
  --bg: #091710; --bg-alt: #06110b; --surface: #10241a; --surface-hover: #163021;
  --border: #1e3d2c; --border-strong: #2a5240; --ink: #eef8f1; --ink-soft: #b3ccbd;
}
html[data-palette="islay"][data-theme="dark"] {
  --bg: #19100a; --bg-alt: #120b06; --surface: #251810; --surface-hover: #2f1f15;
  --border: #3d2a1c; --border-strong: #553c28; --ink: #faf3ec; --ink-soft: #d0bcaa;
}
html[data-palette="northsea"][data-theme="dark"] {
  --bg: #08171a; --bg-alt: #051114; --surface: #0f2429; --surface-hover: #143036;
  --border: #1c3d44; --border-strong: #275159; --ink: #eef8f9; --ink-soft: #b1cbcf;
}

/* ---- 3. a third, softer light theme: Grey ---- */
html[data-theme="grey"] {
  --bg: #eceef1; --bg-alt: #e2e5ea; --surface: #f7f8fa; --surface-hover: #ffffff;
  --ink: #1b1f27; --ink-soft: #454b57; --ink-muted: #767d8b;
  --border: #d5d9df; --border-strong: #c0c6cf;
  --shadow-sm: 0 1px 2px rgba(20,24,32,0.06);
  --shadow-md: 0 6px 24px -8px rgba(20,24,32,0.16);
}
html[data-theme="grey"][data-palette="heather"]  { --bg: #eeecf2; --bg-alt: #e5e1ee; --surface: #f8f7fb; --border: #d8d2e4; }
html[data-theme="grey"][data-palette="machair"]  { --bg: #eaeeeb; --bg-alt: #e0e7e2; --surface: #f7faf8; --border: #d2ded6; }
html[data-theme="grey"][data-palette="islay"]    { --bg: #efece8; --bg-alt: #e6e1da; --surface: #faf8f5; --border: #ded6cb; }
html[data-theme="grey"][data-palette="northsea"] { --bg: #e9eeef; --bg-alt: #dfe7e9; --surface: #f6f9fa; --border: #d0dcde; }

/* ---- 4. the shared member sidebar on the hub pages ---- */
.pg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.pg-grid > .pg-main { min-width: 0; }
.pg-grid .container { max-width: none; padding: 0; }
.pg-wrap > .container { padding-top: 4px; }
@media (max-width: 980px) { .pg-grid { grid-template-columns: minmax(0, 1fr); } }
body.not-member .pg-grid.side-members-only { grid-template-columns: minmax(0, 1fr); }
.hm-side .side-card .btn { width: 100%; justify-content: center; }
.side-join { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }

/* ---- 5. member map: online dots, and the whole card greyed for visitors ---- */
.wm-online { fill: #16c47f; stroke: #ffffff; stroke-width: 0.22; }
.wm-online-glow { fill: rgba(22,196,127,0.30); }
.wm-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--ink-muted); margin-top: 10px; }
.wm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wm-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.wm-legend i.on { background: #16c47f; }
.wm-legend i.pin { background: var(--gold); }
body.not-member .map-locked { position: relative; cursor: pointer; }
body.not-member .map-locked .wmap-wrap,
body.not-member .map-locked p,
body.not-member .map-locked .wm-legend { filter: grayscale(1) saturate(0.15) brightness(0.92); opacity: 0.5; }
body.not-member .map-locked .wmap-wrap { pointer-events: none; }
body.not-member .map-locked::after {
  content: '🔒 The member map is for members — join to see the pins';
  position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%);
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink);
  font-size: 13.5px; font-weight: 700; padding: 10px 18px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-md); white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis;
}

/* ---- 6. the headshot editor (zoom + re-centre, 320×320 crop) ---- */
#icCrop { position: fixed; inset: 0; z-index: 4000; background: rgba(10,16,29,0.72); display: flex; align-items: center; justify-content: center; padding: 20px; }
#icCrop .cr-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 22px; width: 100%; max-width: 400px; }
#icCrop h3 { font-size: 17px; color: var(--ink); margin-bottom: 4px; }
#icCrop p.cr-h { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }
#icCrop .cr-stage { position: relative; width: 100%; max-width: 320px; margin: 0 auto; aspect-ratio: 1 / 1; border-radius: var(--r-md); overflow: hidden; background: var(--bg-alt); touch-action: none; cursor: grab; }
#icCrop .cr-stage.dragging { cursor: grabbing; }
#icCrop canvas { width: 100%; height: 100%; display: block; }
#icCrop .cr-ring { position: absolute; inset: 0; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0,0,0,0.001); border-radius: var(--r-md); }
#icCrop .cr-ring::after { content: ''; position: absolute; inset: 6%; border: 2px dashed rgba(255,255,255,0.85); border-radius: 50%; }
#icCrop .cr-zoom { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 12.5px; color: var(--ink-muted); }
#icCrop .cr-zoom input { flex: 1; }
#icCrop .cr-btns { display: flex; gap: 10px; margin-top: 16px; }
#icCrop .cr-btns .btn { flex: 1; justify-content: center; }

/* ---- 7. the looping walkthrough on the sample dashboard ---- */
.ic-spot { position: fixed; z-index: 3500; border: 2px solid var(--accent); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(10,16,29,0.42); pointer-events: none; transition: all .45s cubic-bezier(.4,0,.2,1); }
.ic-spot-tip { position: fixed; z-index: 3501; background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 12px 16px; max-width: 280px; font-size: 13.5px; font-weight: 600; transition: all .45s cubic-bezier(.4,0,.2,1); }
.ic-spot-tip b { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.ic-spot-tip .st-x { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--ink-muted); cursor: pointer; pointer-events: auto; background: none; border: 0; padding: 0; font-family: var(--font); }
@media (prefers-reduced-motion: reduce) { .ic-spot, .ic-spot-tip { transition: none; } }

/* ---- 8. seeded boards + the Q&A activity widgets ---- */
.bd-row .bd-jori { font-weight: 800; color: var(--ink); }
.bd-seed-note { font-size: 12px; color: var(--ink-muted); padding: 8px 2px 0; }
.board .bd-row a.bd-name { text-decoration: none; color: var(--ink); }
.board .bd-row a.bd-name:hover { color: var(--accent); }
.qa-recent .bd-row { align-items: flex-start; }
.qa-recent .bd-sub { display: block; font-size: 12px; color: var(--ink-muted); font-weight: 500; }

.lib-browse-row { display: flex; justify-content: center; margin-top: 34px; }

/* v33 (screenshot pass): the little profile circle in the toolbar sits inside
   .nav-links, where ".nav-links > a" was stripping its background and border —
   so it rendered as a bare letter. Same specificity fight, settled here. */
.nav-links > a.nav-avatar {
  width: 32px; height: 32px; padding: 0; border-radius: 50%;
  background: var(--accent-soft); background-size: cover; background-position: center;
  border: 2px solid var(--border-strong); color: var(--accent); font-size: 13px; font-weight: 800;
}
.nav-links > a.nav-avatar:hover { background-color: var(--accent-soft); border-color: var(--accent); }

/* ==========================================================================
   v34 — toolbar sizing and spacing, the member-map base layer, and the
          visitor block at the top of every live-class page.
   ========================================================================== */

/* ---- 1. the three toolbar controls are the same height, with real air ----
   The search pill, the profile circle and the Dashboard / Log in button were
   38px tall and 2px apart. They are 32px on desktop, 30px on a phone, and the
   gap between them is 14px (12px of margin on top of the 2px .nav-links gap). */
:root { --navbtn-h: 32px; --navbtn-gap: 14px; }
@media (max-width: 640px) { :root { --navbtn-h: 30px; } }

.nav-search-btn,
.nav-links > a.nav-cta,
.nav-cta,
.nav-links > a.nav-avatar,
.nav-avatar {
  height: var(--navbtn-h);
  min-height: var(--navbtn-h);
  box-sizing: border-box;
}
.nav-links > a.nav-avatar, .nav-avatar { width: var(--navbtn-h); }
/* The profile circle stays a desktop control: at 390px the toolbar already
   carries the search pill, the Dashboard button and the menu, and a fourth
   control pushed the row past the screen edge. */
.nav-search-btn { padding-top: 0; padding-bottom: 0; }

.nav-links > .nav-search-btn,
.nav-links > a.nav-avatar,
.nav-links > .nav-avatar,
.nav-links > a.nav-cta,
.nav-links > .nav-cta,
.nav-links > .nav-burger { margin-left: var(--navbtn-gap); }

/* ---- 2. the member map draws a base layer of anonymous member dots ---- */
.wm-base { fill: #f4ead2; opacity: 0.5; }
body.not-member .wm-base { fill: #ffffff; opacity: 0.72; }
/* Visitors still get the greyed, desaturated card — lifted just enough that
   the base dots read through it, so the map still says "hundreds of pipers". */
body.not-member .map-locked .wmap-wrap { filter: grayscale(1) saturate(0.15) brightness(0.98); opacity: 0.78; }

/* ---- 3. the visitor block at the top of a live-class page ---- */
.ev-gate {
  margin: 14px 0 4px; padding: 14px 18px;
  border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  background: var(--bg-alt);
}
.ev-gate p { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--ink); }
.ev-gate .ev-gate-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
