:root,
[data-theme="cosmic"] {
  --bg: #06050c;
  --bg-elev: #0c0a18;
  --bg-card: #120f24;
  --bg-soft: rgba(255, 255, 255, 0.045);
  --ink: #fbfaff;
  --ink-2: #d5cfeb;
  --ink-muted: #9e96bd;
  --ink-faint: #6e668c;
  --cyan: #00f5d4;
  --green: #00ff87;
  --gold: #ffbe0b;
  --magenta: #ff2a85;
  --violet: #9d4edd;
  --accent: #00f5d4;
  --accent-soft: rgba(0, 245, 212, 0.12);
  --holo: linear-gradient(118deg, #00f5d4 0%, #38f9a8 15%, #ffbe0b 32%, #ff2a85 50%, #9d4edd 68%, #ff2a85 84%, #38f9a8 93%, #00f5d4 100%);
  --rule: rgba(255, 255, 255, 0.11);
  --rule-strong: rgba(0, 245, 212, 0.35);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg: #f7f5fb;
  --bg-elev: #efeaf7;
  --bg-card: #ffffff;
  --bg-soft: rgba(18, 15, 36, 0.045);
  --ink: #120e24;
  --ink-2: #2d2647;
  --ink-muted: #5e557d;
  --ink-faint: #877ea6;
  --cyan: #009e88;
  --green: #008a5e;
  --gold: #c97a00;
  --magenta: #d4196a;
  --violet: #7228b8;
  --accent: #009e88;
  --accent-soft: rgba(0, 158, 136, 0.11);
  --holo: linear-gradient(110deg, #00c4a7 0%, #ffbe0b 48%, #ff2a85 78%, #8338ec 100%);
  --rule: rgba(18, 14, 36, 0.11);
  --rule-strong: rgba(0, 158, 136, 0.35);
  --shadow: 0 14px 36px rgba(18, 14, 36, 0.08);
}

:root {
  --serif: 'Cormorant Garamond', Georgia, serif;
  --display: 'Syne', 'Plus Jakarta Sans', sans-serif;
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --sidebar-w: 300px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

/* Preview Mode Bar */
.preview-state-bar {
  background: #05040a;
  color: #fbfaff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 16px;
  font-size: 12px;
}
.preview-state-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.preview-state-label {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(251, 250, 255, 0.72);
  white-space: nowrap;
}
.preview-state-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.preview-chip {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(251, 250, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.preview-chip.active,
.preview-chip:hover {
  background: linear-gradient(120deg, #00f5d4, #00ff87);
  color: #06050c;
  border-color: transparent;
}

/* App Shell */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
.app.focus-mode {
  grid-template-columns: 0px 1fr;
}
.app.focus-mode .sidebar {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Sidebar */
.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 30;
}
.sidebar-top {
  padding: 20px 18px 14px;
  border-bottom: 1px solid var(--rule);
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand-star {
  color: var(--cyan);
  font-size: 15px;
}
.brand-name {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-muted);
}
.overview-link {
  color: var(--cyan);
  font-weight: 600;
}
.progress-card {
  margin-top: 14px;
  padding: 11px 12px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 7px;
}
.progress-count {
  color: var(--cyan);
  font-weight: 600;
}
.progress-bar {
  height: 5px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--holo);
  transition: width 0.35s ease;
}

.day-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 20px;
}
.week-group {
  margin-bottom: 14px;
}
.week-header {
  padding: 8px 10px 5px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.week-title {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--week-color, var(--cyan));
}
.week-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-muted);
}
.day-item {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 10px;
  margin-bottom: 2px;
  transition: background 0.15s ease;
}
.day-item:hover {
  background: var(--bg-soft);
}
.day-item.active {
  background: var(--bg-card);
  border: 1px solid var(--rule-strong);
}
.day-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.day-item.active .day-num {
  color: var(--cyan);
  font-weight: 600;
}
.day-title-wrap {
  min-width: 0;
}
.day-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-check {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: transparent;
}
.day-item.completed .day-check {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #06050c;
}
.day-lock-icon {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-soft);
}

.sidebar-foot {
  padding: 12px 14px;
  border-top: 1px solid var(--rule);
}
.sidebar-upgrade-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--holo);
  color: #06050c;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* Workspace & Topbar */
.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 24px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.crumb {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  border: 1px solid var(--rule);
}
.icon-btn:hover {
  color: var(--ink);
  background: var(--bg-soft);
}
.util-pill {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--bg-card);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.util-pill:hover {
  border-color: var(--cyan);
  color: var(--ink);
}

/* Lesson Shell */
.main {
  flex: 1;
  padding: 28px 24px 80px;
}
.lesson-shell {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Persistent Video + Cover Hero */
.lesson-video-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.day-hero-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.day-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--cyan);
  margin-bottom: 6px;
}
.day-h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.8vw, 52px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.day-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 23px);
  color: var(--ink-muted);
  margin-top: 4px;
}
#lessonSub[hidden],
.day-subtitle.is-hidden {
  display: none !important;
  margin: 0 !important;
}

/* Video + Cover Stage */
.video-stage-grid {
  display: grid;
  grid-template-columns: 1fr 225px;
  gap: 18px;
  align-items: stretch;
}
.video-player-card {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  position: relative;
}
.video-player-card iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.cover-side-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cover-side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Audio / Orientation Hero Card (for Day 0 and Day 22) */
.audio-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.audio-hero-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
}
.audio-hero-copy {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 58ch;
}

/* 3-Tab Switcher Directly Below Video */
.lesson-tab-bar {
  display: flex;
  gap: 8px;
  background: var(--bg-elev);
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  position: sticky;
  top: 57px;
  z-index: 15;
  backdrop-filter: blur(14px);
}
.lesson-tab-btn {
  flex: 1;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-muted);
  text-align: center;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.lesson-tab-btn:hover {
  color: var(--ink);
}
.lesson-tab-btn.active {
  background: var(--holo);
  color: #06050c;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(0, 245, 212, 0.28);
}

/* Tab Content Containers */
.lesson-tab-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Tab 1: Companion Guide Components */
.companion-summary-banner {
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.1), rgba(157, 78, 221, 0.1));
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.companion-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.companion-summary-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
}
.companion-meta-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.companion-meta-pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  color: var(--cyan);
}
.companion-summary-text {
  font-size: 15.5px;
  color: var(--ink-2);
}

.callout-trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.callout-box {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--callout-color, var(--cyan));
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.callout-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--callout-color, var(--cyan));
}
.callout-text {
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--ink-2);
}

/* Interactive Practice Steps Checklist */
.steps-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.steps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.steps-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
}
.steps-progress {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--cyan);
}
.step-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.step-row:hover {
  border-color: var(--cyan);
}
.step-row.done {
  border-color: rgba(0, 245, 212, 0.45);
  background: var(--accent-soft);
}
.step-check-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  margin-top: 2px;
}
.step-row.done .step-check-circle {
  background: var(--cyan);
  color: #06050c;
}
.step-content-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 3px;
}
.step-content-detail {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* Reflection Prompts Card */
.reflection-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.reflection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.reflection-title {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
}
.save-indicator {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cyan);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.save-indicator.visible {
  opacity: 1;
}
.q-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.q-label {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}
.q-textarea {
  width: 100%;
  min-height: 82px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 14px;
  resize: vertical;
}
.q-textarea:focus {
  outline: none;
  border-color: var(--cyan);
}

/* Collapsible Video Notes Drawer */
.companion-raw-drawer {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.companion-raw-drawer summary {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
  cursor: pointer;
}
.companion-raw-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-2);
}

/* Tab 2: The Lesson (Formatted with Callouts & Section Dividers) */
.lesson-article-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.lesson-lead-banner {
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.1), rgba(255, 42, 133, 0.08));
  border-left: 4px solid var(--cyan);
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 25px);
  line-height: 1.38;
  color: var(--ink);
}
.lesson-body-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.lesson-p {
  font-size: 16.5px;
  line-height: 1.78;
  color: var(--ink-2);
}
.lesson-pullquote-box {
  margin: 6px 0;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border-left: 3px solid var(--magenta);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink);
}
.lesson-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cyan);
  font-size: 12px;
  opacity: 0.65;
  margin: 4px 0;
}
.lesson-section-divider::before,
.lesson-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.somatic-anchor-callout {
  margin-top: 8px;
  padding: 22px 24px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(255, 190, 11, 0.1), rgba(0, 245, 212, 0.09));
  border: 1px solid rgba(255, 190, 11, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.somatic-anchor-kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
}
.somatic-anchor-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}
.somatic-anchor-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
}

/* Tab 3: The Science */
.science-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.science-quote-banner {
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.14), rgba(0, 245, 212, 0.08));
  border-left: 4px solid var(--violet);
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.4;
  color: var(--ink);
}
.studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.study-item {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.study-item:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.study-authors {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cyan);
}
.study-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.38;
  color: var(--ink);
}
.study-journal {
  font-size: 12px;
  color: var(--ink-muted);
}

/* Day Complete Footer */
.day-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--cyan);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
}
.complete-btn.is-complete {
  background: var(--holo);
  color: #06050c;
  border-color: transparent;
}
.day-pager {
  display: flex;
  gap: 8px;
}
.pager-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.pager-btn:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--ink);
}
.pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Locked Day Gate Card */
.locked-gate-card {
  background: var(--bg-card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 26px;
  align-items: center;
}
.locked-cover-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.locked-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.locked-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.1;
}
.locked-copy {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 48ch;
}
.locked-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.btn-primary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--holo);
  color: #06050c;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.btn-secondary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Journal Drawer & Modal */
.drawer {
  position: fixed;
  inset: 0;
  background: rgba(6, 5, 12, 0.72);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}
.drawer[hidden] {
  display: none;
}
.drawer-inner {
  width: min(560px, 100vw);
  height: 100%;
  background: var(--bg-elev);
  border-left: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}
.drawer-head {
  padding: 22px 24px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-kicker {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cyan);
}
.drawer-title {
  font-family: var(--serif);
  font-size: 26px;
}
.drawer-actions {
  display: flex;
  gap: 8px;
}
.ghost-btn {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  font-size: 12.5px;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.journal-entry {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--rule);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 5, 12, 0.78);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] {
  display: none;
}
.signup-modal {
  width: 100%;
  max-width: 410px;
  background: var(--bg-card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--rule);
}
.modal-title {
  font-family: var(--serif);
  font-size: 28px;
}
.modal-sub {
  font-size: 14px;
  color: var(--ink-muted);
}
.signup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.signup-input {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
}

.mobile-only {
  display: none;
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    width: min(300px, 86vw);
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-only {
    display: inline-flex;
  }
  .video-stage-grid {
    grid-template-columns: 1fr;
  }
  .cover-side-card {
    display: none;
  }
  .callout-trio-grid {
    grid-template-columns: 1fr;
  }
  .locked-gate-card {
    grid-template-columns: 1fr;
  }
  .locked-cover-wrap {
    max-width: 180px;
  }
  .main {
    padding: 18px 14px 64px;
  }
  .lesson-article-card,
  .science-card,
  .steps-card,
  .reflection-card {
    padding: 20px 16px;
  }
}


/* === Seamless Async Button Color Animation === */
@keyframes holoShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.sidebar-upgrade-btn,
.btn-primary-pill,
.complete-btn.is-complete,
.lesson-tab-btn.active {
  background: var(--holo);
  background-size: 340% 340%;
  animation: holoShift var(--btn-dur, 9.6s) ease-in-out infinite;
  animation-delay: var(--btn-delay, 0s);
}

/* === Subtle Cosmic Background Fades in Course App === */
:root body,
[data-theme="cosmic"] body {
  background-color: #06050c;
  background-image:
    radial-gradient(960px 600px at 22% 8%, rgba(0, 245, 212, 0.09), transparent 68%),
    radial-gradient(880px 580px at 86% 18%, rgba(255, 42, 133, 0.085), transparent 68%),
    radial-gradient(1050px 700px at 55% 58%, rgba(157, 78, 221, 0.08), transparent 72%),
    radial-gradient(860px 580px at 30% 90%, rgba(0, 255, 135, 0.06), transparent 70%);
  background-attachment: fixed;
}

/* === Compact Big Idea Section ABOVE the 3 Tab Toggles (~30% Smaller) === */
.lesson-big-idea {
  margin: -4px 0 2px;
}
.big-idea-card {
  position: relative;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.1) 0%, rgba(255, 42, 133, 0.075) 55%, rgba(157, 78, 221, 0.12) 100%);
  border: 1px solid var(--rule-strong);
  border-radius: 15px;
  padding: 15px 19px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}
.big-idea-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.big-idea-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.big-idea-title {
  font-family: var(--serif);
  font-size: clamp(19px, 2.2vw, 23px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}
.big-idea-summary {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.big-idea-quote {
  margin-top: 2px;
  padding: 8px 13px;
  border-radius: 10px;
  background: rgba(6, 5, 12, 0.38);
  border-left: 2.5px solid var(--gold);
  font-family: var(--serif);
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.38;
  color: var(--ink);
}
[data-theme="light"] .big-idea-quote {
  background: rgba(255, 255, 255, 0.72);
}

/* === Interactive Study Items & Smooth Cosmic Science Source Popup === */
.study-item {
  cursor: pointer;
  text-align: left;
}
.study-item-cta {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cosmic-source-modal {
  width: 100%;
  max-width: 520px;
  background:
    radial-gradient(420px 260px at 15% 10%, rgba(0, 245, 212, 0.16), transparent 70%),
    radial-gradient(380px 260px at 88% 85%, rgba(157, 78, 221, 0.18), transparent 70%),
    var(--bg-card);
  border: 1px solid var(--rule-strong);
  border-radius: 22px;
  padding: 26px 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.78), 0 0 38px rgba(0, 245, 212, 0.16);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: cosmicPopupIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cosmicPopupIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cosmic-source-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.cosmic-source-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}
.cosmic-source-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--gold);
}
.cosmic-source-summary {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.cosmic-source-application {
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  border-left: 3px solid var(--cyan);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}
.cosmic-source-application strong {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan);
  margin-bottom: 4px;
}
.cosmic-source-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
}
.cosmic-source-ext-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cosmic-source-ext-link:hover {
  color: var(--cyan);
}

/* === Highlighted Neuroscience/Somatic Terms & Cosmic Hover Tooltip === */
.glossary-term {
  position: relative;
  display: inline;
  color: var(--ink);
  background: linear-gradient(90deg, rgba(0, 245, 212, 0.14), rgba(157, 78, 221, 0.14));
  border-bottom: 1.5px dashed var(--cyan);
  border-radius: 4px;
  padding: 0 3px;
  cursor: help;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.glossary-term:hover,
.glossary-term:focus {
  background: linear-gradient(90deg, rgba(0, 245, 212, 0.28), rgba(255, 42, 133, 0.24));
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.25);
  outline: none;
}

.cosmic-glossary-tooltip {
  position: fixed;
  z-index: 500;
  width: min(320px, calc(100vw - 24px));
  padding: 13px 15px;
  border-radius: 14px;
  background:
    radial-gradient(220px 140px at 15% 15%, rgba(0, 245, 212, 0.2), transparent 70%),
    radial-gradient(200px 140px at 85% 85%, rgba(255, 42, 133, 0.18), transparent 70%),
    rgba(14, 10, 28, 0.96);
  border: 1px solid rgba(0, 245, 212, 0.55);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.78), 0 0 24px rgba(0, 245, 212, 0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}
.cosmic-glossary-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.cosmic-glossary-kicker {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #00f5d4;
  margin-bottom: 3px;
}
.cosmic-glossary-word {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 5px;
}
.cosmic-glossary-def {
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.48;
  color: #d6d0ec;
}


/* ==========================================================================
   MOBILE LAYOUT & RESPONSIVE FIXES FOR COURSE APP (t233u, t234u, t238u)
   - Global img max-width: 100% reset so images never overflow cards
   - Full-width YouTube player card on mobile matching Big Idea & Tab Bar width
   - Full-width gated lesson cover image on mobile (no empty right column)
   - Zero horizontal page overflow on 375px / 390px viewports
   ========================================================================== */

html, body {
  max-width: 100vw;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.workspace,
.main,
.lesson-shell,
.lesson-video-hero,
.video-stage-grid,
.video-player-card,
.lesson-big-idea,
.big-idea-card,
.lesson-tab-bar,
.lesson-tab-panels,
.tab-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.video-player-card {
  width: 100% !important;
  aspect-ratio: 16 / 9;
}

.video-player-card iframe,
.yt-frame {
  width: 100% !important;
  height: 100% !important;
  display: block;
  border: 0;
}

.topbar-left {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.crumb {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-right {
  flex-shrink: 0;
}

.locked-cover-wrap {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: #080612;
}

.locked-cover-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 20% !important;
  display: block;
}

[data-science-source] {
  white-space: normal !important;
  text-align: left;
  line-height: 1.35;
  max-width: 100%;
}

@media (max-width: 860px) {
  .locked-gate-card {
    grid-template-columns: 1fr !important;
    padding: 20px 16px !important;
    gap: 18px !important;
  }
  .locked-cover-wrap {
    max-width: 100% !important;
    width: 100% !important;
    aspect-ratio: 4 / 3;
  }
  .locked-gate-copy {
    min-width: 0;
    width: 100%;
  }
  .locked-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .locked-actions .btn-primary-pill,
  .locked-actions .btn-secondary-pill {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .preview-access-bar {
    padding: 6px 10px;
    gap: 4px;
  }
  .preview-chip {
    padding: 4px 8px;
    font-size: 10.5px;
  }
  .topbar {
    padding: 10px 12px;
    gap: 8px;
  }
  .util-pill {
    padding: 5px 10px;
    font-size: 11.5px;
  }
  .main {
    padding: 16px 12px 64px;
  }
  .lesson-tab-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    top: 52px;
  }
  .lesson-tab-btn {
    padding: 9px 4px;
    font-size: 11.5px;
    gap: 4px;
    text-align: center;
    white-space: nowrap;
  }
  .tab-num {
    display: none;
  }
  .day-footer-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 12px;
  }
  .complete-btn {
    width: 100%;
    justify-content: center;
  }
  .day-pager {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .pager-btn {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 10px 8px;
    font-size: 12px;
    text-align: center;
  }
}


/* ==========================================================================
   MOBILE TOPBAR & FOCUS/JOURNAL BUTTON CLEANUP (t241u)
   - Hide Focus button on mobile (sidebar is already off-canvas on <=860px)
   - Prevent .app.focus-mode from breaking mobile 1-column grid or locking drawer
   - Style Journal button as a clean icon+label pill with proper alignment
   ========================================================================== */

.util-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(17, 13, 34, 0.85);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.util-pill svg {
  color: var(--cyan);
  flex-shrink: 0;
}

.util-pill.is-active {
  border-color: var(--cyan);
  background: rgba(0, 245, 212, 0.14);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.22);
}

@media (max-width: 860px) {
  .desktop-only-pill,
  #focusBtn {
    display: none !important;
  }
  .app,
  .app.focus-mode {
    grid-template-columns: 1fr !important;
  }
  .app.focus-mode .sidebar {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .app.focus-mode .sidebar:not(.open) {
    transform: translateX(-100%) !important;
  }
  .app.focus-mode .sidebar.open {
    transform: translateX(0) !important;
  }
  .topbar {
    padding: 10px 14px;
    gap: 10px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(17, 13, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--ink);
  }
  .util-pill.journal-pill {
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
    border-color: rgba(0, 245, 212, 0.35);
    background: rgba(0, 245, 212, 0.09);
  }
  .drawer-head {
    padding: 16px 18px;
  }
  .drawer-body {
    padding: 16px 18px;
  }
}


/* ==========================================================================
   COURSE APP SEARCHABLE 37-TERM GLOSSARY DRAWER & LESSON GLOSSARY (t242u)
   ========================================================================== */

.sidebar-glossary-btn {
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 245, 212, 0.35);
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.1), rgba(157, 78, 221, 0.1));
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-glossary-btn:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.2);
}

.sidebar-glossary-count {
  color: var(--cyan);
  font-size: 10px;
}

.big-idea-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.big-idea-glossary-pill {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 212, 0.38);
  background: rgba(0, 245, 212, 0.1);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.big-idea-glossary-pill:hover {
  background: rgba(0, 245, 212, 0.2);
  border-color: var(--cyan);
}

.cosmic-glossary-tooltip.visible {
  pointer-events: auto;
}

.cosmic-glossary-more-btn {
  margin-top: 7px;
  padding-top: 6px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.glossary-drawer-controls {
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.glossary-drawer-search {
  width: 100%;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 212, 0.38);
  background: rgba(6, 5, 12, 0.85);
  color: var(--ink);
  font-size: 13px;
}

.glossary-drawer-search:focus {
  outline: none;
  border-color: var(--cyan);
}

.glossary-drawer-cats {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.glossary-drawer-cats::-webkit-scrollbar {
  display: none;
}

.glossary-cat-pill {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.glossary-cat-pill.active {
  background: linear-gradient(120deg, var(--cyan), var(--green));
  color: #06050c;
  border-color: transparent;
  font-weight: 700;
}

.app-glossary-entry {
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-glossary-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-glossary-cat {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
}

.app-glossary-day-tag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 245, 212, 0.14);
  color: var(--cyan);
}

.app-glossary-word {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}

.app-glossary-def {
  font-size: 13px;
  line-height: 1.48;
  color: var(--ink-2);
}

/* Inline Lesson Glossary inside The Science Tab */
.lesson-glossary-section {
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lesson-glossary-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lesson-glossary-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.lesson-glossary-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}

.lesson-glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.lesson-glossary-card {
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lesson-glossary-cat {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
}

.lesson-glossary-word {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}

.lesson-glossary-def {
  font-size: 12.5px;
  line-height: 1.46;
  color: var(--ink-2);
}

@media (max-width: 640px) {
  .lesson-glossary-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   +20% READABLE TYPOGRAPHY SCALE & NUMBERED PRACTICE STEPS (t247u-t249u)
   ========================================================================== */

html, body {
  font-size: 18.5px !important;
  line-height: 1.58 !important;
}

.day-title {
  font-size: 15.5px !important;
}

.day-sub {
  font-size: 13px !important;
}

.sidebar-glossary-btn {
  font-size: 13px !important;
  padding: 11px 14px !important;
}

.sidebar-glossary-count {
  font-size: 12px !important;
}

.util-pill {
  font-size: 13.5px !important;
}

.big-idea-kicker {
  font-size: 12.5px !important;
}

.big-idea-glossary-pill {
  font-size: 12px !important;
  padding: 5px 11px !important;
}

.big-idea-title {
  font-size: clamp(27px, 3.6vw, 36px) !important;
  line-height: 1.16 !important;
}

.big-idea-summary {
  font-size: 18px !important;
  line-height: 1.55 !important;
}

.big-idea-quote {
  font-size: 20px !important;
  line-height: 1.48 !important;
}

.tab-btn {
  font-size: 15px !important;
  padding: 12px 16px !important;
}

.companion-summary-title {
  font-size: 30px !important;
}

.companion-meta-pill {
  font-size: 12.5px !important;
}

.companion-summary-text {
  font-size: 18.5px !important;
  line-height: 1.55 !important;
}

.callout-label {
  font-size: 12.5px !important;
}

.callout-text {
  font-size: 16.5px !important;
  line-height: 1.52 !important;
}

.steps-title {
  font-size: 28px !important;
}

/* Non-checklist clean numbered practice steps */
.step-row {
  display: grid !important;
  grid-template-columns: 34px 1fr !important;
  gap: 14px !important;
  align-items: start !important;
  padding: 16px 18px !important;
  background: var(--bg-soft) !important;
  border: 1px solid var(--rule) !important;
  border-radius: 14px !important;
  cursor: default !important;
}

.step-row:hover {
  border-color: var(--rule) !important;
  background: var(--bg-soft) !important;
}

.step-num-badge {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(0, 245, 212, 0.14);
  border: 1.5px solid rgba(0, 245, 212, 0.45);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  margin-top: 1px;
}

.step-content-detail {
  font-size: 18px !important;
  line-height: 1.55 !important;
  color: var(--ink) !important;
}

.reflection-title {
  font-size: 27px !important;
}

.q-label {
  font-size: 17.5px !important;
  line-height: 1.48 !important;
}

.q-textarea {
  font-size: 17px !important;
  line-height: 1.52 !important;
}

.lesson-p {
  font-size: 19px !important;
  line-height: 1.68 !important;
}

.lesson-pullquote-box {
  font-size: 24px !important;
  line-height: 1.42 !important;
}

.science-quote-banner {
  font-size: 24px !important;
  line-height: 1.42 !important;
}

.study-authors {
  font-size: 13px !important;
}

.study-title {
  font-size: 18px !important;
}

.study-journal {
  font-size: 15px !important;
}

.app-glossary-cat,
.lesson-glossary-cat {
  font-size: 11.5px !important;
}

.app-glossary-word,
.lesson-glossary-word {
  font-size: 22px !important;
}

.app-glossary-def,
.lesson-glossary-def {
  font-size: 16px !important;
  line-height: 1.5 !important;
}

.glossary-drawer-search {
  font-size: 16px !important;
}

.glossary-cat-pill {
  font-size: 12px !important;
  padding: 6px 12px !important;
}


/* ==========================================================================
   MOBILE BUTTON, TAB & PAGER OVERFLOW FIXES (t250u)
   ========================================================================== */

.lesson-tabs-bar {
  display: flex !important;
  gap: 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.lesson-tab-btn {
  flex: 1 1 auto !important;
  text-align: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.pager-btn {
  white-space: normal !important;
  line-height: 1.3 !important;
  height: auto !important;
  min-height: 44px !important;
  padding: 10px 14px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word !important;
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 10px !important;
    gap: 6px !important;
  }
  .topbar-left {
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  .crumb {
    font-size: 12px !important;
  }
  .topbar-right {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  .util-pill {
    font-size: 11.5px !important;
    padding: 6px 10px !important;
    white-space: nowrap !important;
  }
  .big-idea-glossary-pill {
    font-size: 11px !important;
    padding: 4px 9px !important;
    white-space: nowrap !important;
  }
  .lesson-tab-btn {
    font-size: 12px !important;
    padding: 9px 6px !important;
  }
  .pager-pair {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .pager-btn {
    width: 100% !important;
    font-size: 13.5px !important;
    text-align: center !important;
    justify-content: center !important;
  }
  .complete-btn {
    width: 100% !important;
    font-size: 14.5px !important;
    padding: 12px 16px !important;
    white-space: nowrap !important;
  }
}

/* Compact single-statement Big Idea card (t252u) */
.big-idea-card {
  padding: 16px 20px !important;
}
.big-idea-kicker {
  margin-bottom: 6px !important;
}
.big-idea-title {
  margin: 0 !important;
  font-size: clamp(24px, 3.2vw, 32px) !important;
  line-height: 1.2 !important;
}


/* Production Member Sign-In & Unlock Toast */
.inline-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--cyan);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.modal-foot-note {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
  text-align: center;
}
.login-feedback {
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 42, 133, 0.12);
  border: 1px solid rgba(255, 42, 133, 0.35);
  color: #ffd0e5;
}
.login-feedback.is-success {
  background: rgba(0, 245, 212, 0.12);
  border-color: rgba(0, 245, 212, 0.4);
  color: #b8fff3;
}
.locked-signin-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-muted);
}
.member-status-pill {
  border-color: rgba(0, 245, 212, 0.38) !important;
  color: var(--cyan) !important;
}
.unlock-toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 200;
  background: rgba(12, 10, 24, 0.96);
  border: 1px solid rgba(0, 245, 212, 0.5);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65), 0 0 24px rgba(0, 245, 212, 0.22);
  color: #f7f5ff;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 13.5px;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 10px;
}
