:root {
  --bg: #070707;
  --panel: #121212;
  --panel-soft: #1a1a1a;
  --text: #f7f1e8;
  --muted: #b9aea0;
  --line: #2b2926;
  --field: #0b0b0b;
  --media-bg: #090909;
  --header-bg: rgba(7, 7, 7, .88);
  --overlay: rgba(0, 0, 0, .54);
  --hover-soft: rgba(255, 255, 255, .06);
  --hero-overlay: linear-gradient(90deg, rgba(7,7,7,.98) 0%, rgba(7,7,7,.78) 58%, rgba(7,7,7,.25) 100%);
  --accent: #c8342e;
  --accent-2: #d7aa5b;
  --success: #57b56c;
  --error: #d65b5b;
  --max: 1180px;
}

body.theme-light {
  --bg: #f6f2eb;
  --panel: #fffaf2;
  --panel-soft: #f0e7dc;
  --text: #181512;
  --muted: #6d6257;
  --line: #ded2c4;
  --field: #fffdf8;
  --media-bg: #eee5da;
  --header-bg: rgba(246, 242, 235, .9);
  --overlay: rgba(255, 250, 242, .72);
  --hover-soft: rgba(24, 21, 18, .06);
  --hero-overlay: linear-gradient(90deg, rgba(246,242,235,.98) 0%, rgba(246,242,235,.86) 58%, rgba(246,242,235,.42) 100%);
  --accent: #b3312c;
  --accent-2: #9a6a19;
  --success: #357f49;
  --error: #b74242;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 52px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 4px;
}

.brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  line-height: 1.2;
}

.brand-domain {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.brand-copy em {
  color: var(--accent-2);
  font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive;
  font-size: 16px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  align-items: center;
  grid-template-columns: 16px auto;
  gap: 4px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  grid-column: 1;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.nav-toggle strong {
  grid-column: 2;
  grid-row: 1 / 4;
  margin-left: 6px;
  font-size: 13px;
}

.admin-menu {
  position: relative;
}

.admin-menu summary {
  cursor: pointer;
  list-style: none;
}

.admin-menu summary::-webkit-details-marker {
  display: none;
}

.admin-menu summary::after {
  content: "▾";
  margin-left: 6px;
  color: var(--accent-2);
  font-size: 11px;
}

.admin-menu div {
  position: absolute;
  right: 0;
  top: calc(100% + 14px);
  z-index: 40;
  display: grid;
  min-width: 220px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}

.admin-menu div a {
  padding: 11px 12px;
  color: var(--muted);
}

.admin-menu div a:hover {
  background: var(--hover-soft);
  color: var(--text);
}

.admin-menu-submenu {
  display: block;
  border-top: 1px solid var(--line);
}

.admin-menu-submenu summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text);
  font-weight: 800;
}

.admin-menu-submenu summary::after {
  margin-left: auto;
}

.admin-menu .admin-menu-submenu > div {
  position: static;
  display: grid;
  min-width: 0;
  margin: 0 0 6px;
  padding: 0 0 0 10px;
  border: 0;
  box-shadow: none;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.button.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .22);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
  align-items: end;
  gap: clamp(32px, 5vw, 72px);
  min-height: calc(100vh - 74px);
  padding: clamp(56px, 8vw, 110px) clamp(18px, 5vw, 72px);
  background:
    var(--hero-overlay),
    url("https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.master-hero {
  align-items: center;
  background-position: center;
  background-size: cover;
}

.hero-copy {
  max-width: 720px;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(48px, 5.2vw, 76px);
  line-height: 1;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: .98;
}

h1 {
  max-width: 980px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4.8vw, 62px);
  font-weight: 500;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 500;
}

h3 {
  font-size: 25px;
  line-height: 1.1;
}

.lead,
.page-head p,
.course-hero p,
.section-title p {
  color: var(--muted);
  font-size: clamp(16px, 1.55vw, 19px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.checkout-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.hero-media {
  min-height: 360px;
  display: flex;
  align-items: end;
}

.video-frame {
  width: 100%;
  min-height: 260px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, .16);
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.75)),
    url("https://images.unsplash.com/photo-1551836022-d5d88e9218df?auto=format&fit=crop&w=1200&q=80") center/cover;
  background-position: center;
  background-size: cover;
}

.video-frame-player {
  position: relative;
  display: block;
  min-height: 0;
  padding: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050505;
}

.video-frame-player iframe,
.video-frame-player video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.video-frame small,
.course-body span,
.progress-card span,
.post-list span,
.pricing-grid span,
.instructor-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.play {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: rgba(255,255,255,.92);
  color: #101010;
  border-radius: 50%;
}

.goal-finder {
  max-width: 620px;
  margin-top: 34px;
  padding: 22px;
  background: var(--overlay);
  border: 1px solid rgba(255, 255, 255, .16);
}

.goal-finder strong {
  display: block;
  margin-bottom: 14px;
  font-size: 20px;
}

.goal-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.goal-options label {
  margin: 0;
}

.goal-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.goal-options span {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.goal-options input:checked + span {
  border-color: var(--accent-2);
  background: rgba(215, 170, 91, .16);
}

.band,
.page-head,
.course-hero,
.lesson-list,
.dashboard-grid,
.admin-grid,
.admin-list,
.post-list,
.pricing-grid,
.newsletter-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(38px, 5.2vw, 68px) 18px;
}

.page-head {
  padding-top: clamp(44px, 6vw, 76px);
  padding-bottom: clamp(28px, 4vw, 46px);
}

.section-title {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(280px, .55fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 34px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.section-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) 18px 18px;
}

.section-head p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.access-page-head h1 {
  max-width: 900px;
  font-size: clamp(38px, 4.8vw, 62px);
  line-height: 1.02;
}

.access-model-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px clamp(32px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.access-model-grid article {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.access-model-grid span {
  display: block;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.access-model-grid h2 {
  margin: 10px 0 14px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
}

.access-model-grid p,
.access-model-grid li {
  color: var(--muted);
  line-height: 1.55;
}

.access-model-grid ul {
  margin: 18px 0 0;
  padding-left: 20px;
}

.access-model-grid li + li {
  margin-top: 8px;
}

.book-hero,
.book-chapter {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(44px, 6vw, 76px) 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.book-hero h1 {
  max-width: 760px;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.06;
}

.book-hero p {
  max-width: 820px;
  color: var(--muted);
  font-size: clamp(16px, 1.55vw, 19px);
  line-height: 1.55;
}

.book-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 16px;
  max-width: 520px;
  margin: 24px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.book-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.book-meta strong {
  color: var(--text);
}

.book-cover {
  justify-self: center;
  max-width: 360px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.book-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 936;
  object-fit: cover;
}

.book-purchase {
  max-width: 520px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.book-purchase > p:first-child {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.book-purchase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.book-shop-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 180px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .28);
  color: #111;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.book-shop-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .24);
}

.book-shop-amazon {
  background: #fff;
}

.book-shop-bod {
  background: #e9f2f5;
}

.book-shop-wordmark {
  color: #111;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.book-shop-amazon .book-shop-wordmark {
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.book-shop-amazon .book-shop-wordmark span {
  font-size: 13px;
  font-weight: 800;
}

.book-shop-bod .book-shop-wordmark {
  color: #087b83;
}

.book-shop-bod .book-shop-wordmark span {
  display: block;
  margin-top: 2px;
  color: #34444a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.book-shop-arrow {
  color: #555;
  font-size: 19px;
  font-weight: 700;
}

.affiliate-notice {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px !important;
  line-height: 1.45;
}

.book-code-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  max-width: 640px;
  margin-top: 24px;
}

.book-code-form label {
  margin: 0;
}

.book-code-form .help-text {
  grid-column: 1 / -1;
  margin: 0;
}

.book-grid,
.book-download-list {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px clamp(44px, 6vw, 76px);
  display: grid;
  gap: 16px;
}

.book-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  grid-auto-rows: 1fr;
}

.book-grid article,
.book-download-list article {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.book-grid article {
  display: grid;
  gap: 12px;
}

.book-chapter-card {
  grid-template-rows: auto auto minmax(7.75em, 1fr) auto;
  min-height: 360px;
}

.book-grid span,
.book-download-list span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.book-grid h2 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 900;
  line-height: 1.12;
}

.book-grid p,
.book-download-list p {
  color: var(--muted);
  line-height: 1.55;
}

.book-chapter-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.book-chapter-action {
  align-self: end;
  width: 100%;
  justify-content: center;
}

.book-download-list article {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.book-chapter {
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.admin-homepage {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px 18px;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px clamp(48px, 7vw, 92px);
}

.admin-dashboard a {
  display: grid;
  gap: 12px;
  min-height: 150px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.admin-dashboard span {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
}

.admin-dashboard p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-summary,
.stat-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 24px;
}

.dashboard-summary article,
.stat-grid article {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.dashboard-summary span,
.stat-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-summary strong,
.stat-grid strong {
  display: block;
  color: var(--text);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
}

.dashboard-summary p,
.stat-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.admin-stat-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0 24px 24px;
}

.admin-accordion {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px clamp(48px, 7vw, 92px);
}

.admin-accordion.single > details:not([open]) {
  display: none;
}

.admin-accordion.single .admin-section summary {
  cursor: default;
}

.admin-accordion.single .admin-section summary::after {
  display: none;
}

.admin-section {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.admin-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}

.admin-section summary::-webkit-details-marker {
  display: none;
}

.admin-section summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .18);
  color: var(--accent-2);
  font-size: 22px;
  line-height: 1;
}

.admin-section[open] summary {
  border-bottom: 1px solid var(--line);
}

.admin-section[open] summary::after {
  content: "−";
}

.admin-section summary span {
  display: block;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
}

.admin-section summary small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.admin-section > .form-card,
.admin-section > .admin-list.inner {
  margin: 22px;
}

.admin-list.inner {
  padding: 0;
}

.admin-stat-columns .admin-list.inner {
  padding: 18px;
}

.analytics-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0 24px 24px;
}

.analytics-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--panel-soft, var(--panel));
}

.analytics-card-wide {
  grid-column: 1 / -1;
}

.analytics-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.analytics-card-heading .eyebrow {
  margin: 0 0 4px;
}

.analytics-card h2 {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.2;
}

.analytics-card-note,
.chart-legend {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-key {
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.chart-key-download {
  background: var(--accent-2);
}

.chart-list {
  display: grid;
  gap: 12px;
}

.chart-list-dense {
  gap: 8px;
}

.chart-bar-row,
.chart-dual-row {
  display: grid;
  grid-template-columns: minmax(74px, .9fr) minmax(0, 3.2fr) 44px;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chart-bar-row > :first-child,
.chart-dual-row time {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-bar-row strong,
.chart-dual-row > strong {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chart-track {
  display: block;
  height: 8px;
  overflow: hidden;
  background: var(--hover-soft);
}

.chart-fill {
  display: block;
  width: var(--chart-value, 0%);
  min-width: 0;
  height: 100%;
  background: var(--accent);
  transition: width .4s ease;
}

.chart-fill-open,
.chart-fill-positive {
  background: #1c8d95;
}

.chart-fill-download,
.chart-fill-accent {
  background: var(--accent-2);
}

.chart-fill-muted {
  background: #77828b;
}

.chart-fill-warning {
  background: #c76c28;
}

.chart-dual-tracks {
  display: grid;
  gap: 3px;
}

/* Attachment analytics uses dedicated row components so generic admin list flex rules cannot affect its data layout. */
.attachment-analytics .stat-grid {
  max-width: none;
}

.attachment-analytics-grid {
  grid-template-columns: minmax(230px, .8fr) minmax(0, 1.2fr);
  gap: 34px;
  padding: 8px 24px 28px;
}

.attachment-analytics-grid > :nth-child(3) {
  grid-column: 1 / -1;
}

.attachment-analytics .admin-list.inner {
  min-width: 0;
  padding: 0;
}

.attachment-analytics .admin-list.inner h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

.attachment-analytics .admin-list.inner article {
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.attachment-analytics .admin-list.inner article:last-of-type {
  border-bottom: 0;
}

.attachment-stat-day {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 3px 14px;
  align-items: baseline;
}

.attachment-stat-day time,
.attachment-access-row time,
.attachment-context,
.attachment-metrics small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.attachment-stat-day time {
  grid-row: span 2;
  color: var(--accent-2);
  font-weight: 800;
}

.attachment-stat-day strong {
  color: var(--text);
  font-size: 15px;
}

.attachment-stat-day span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.attachment-activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  align-items: center;
}

.attachment-activity-row p,
.attachment-access-row p {
  min-width: 0;
  margin: 0;
}

.attachment-activity-row p:first-child,
.attachment-access-row p {
  display: grid;
  gap: 3px;
}

.attachment-activity-row strong,
.attachment-access-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-activity-row .attachment-context,
.attachment-access-row .attachment-context {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-metrics {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
}

.attachment-metrics span {
  display: inline;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.attachment-metrics b {
  color: var(--accent-2);
}

.attachment-activity-row .button {
  width: auto;
  min-height: 34px;
  white-space: nowrap;
}

.attachment-access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, .8fr) auto;
  gap: 12px 18px;
  align-items: center;
}

.attachment-access-row strong {
  color: var(--accent-2);
}

.admin-homepage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.admin-homepage-grid .wide {
  grid-column: 1 / -1;
}

.admin-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 22px;
}

.course-grid.wide {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px 80px;
}

.course-card,
.progress-card,
.post-list article,
.pricing-grid div,
.newsletter-benefits div,
.instructor-card,
.form-card,
.module-block {
  background: var(--panel);
  border: 1px solid var(--line);
}

.course-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.home-community-feed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-community-feed article {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.home-community-feed small {
  color: var(--muted);
  font-size: 13px;
}

.home-community-feed h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 22px;
  line-height: 1.16;
}

.home-community-feed h3 a:hover {
  color: var(--accent-2);
}

.home-community-feed p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.feed-link {
  color: var(--accent-2);
  font-weight: 900;
}

.role-entry-grid,
.pricing-overview-grid,
.explain-grid,
.free-start-grid,
.community-steps,
.decision-grid {
  display: grid;
  gap: 18px;
}

.role-entry-grid,
.pricing-overview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.free-start-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.4fr);
  gap: 28px;
  align-items: start;
}

.free-start-grid,
.explain-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.community-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.decision-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.role-entry-grid a,
.free-start-grid a,
.pricing-overview-grid article,
.free-start-grid article,
.explain-grid article,
.community-steps article,
.decision-grid a {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 22px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
}

.role-entry-grid a:hover,
.free-start-grid a:hover,
.decision-grid a:hover,
.pricing-overview-grid article.is-highlighted {
  border-color: var(--accent-2);
}

.role-entry-grid span,
.pricing-overview-grid span,
.explain-grid span,
.decision-grid span {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.role-entry-grid strong,
.free-start-grid strong,
.community-steps strong,
.decision-grid strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.role-entry-grid p,
.free-start-grid span,
.pricing-overview-grid p,
.explain-grid p,
.community-steps span,
.decision-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.pricing-overview-grid .pricing-intro {
  color: var(--muted);
}

.pricing-overview-grid .pricing-intro b {
  color: var(--accent-2);
}

.pricing-overview-grid strong {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.pricing-overview-grid ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

/* Desktop homepage: later sections gently slide over the preceding one. */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .home-stack-stage {
    position: -webkit-sticky;
    position: sticky;
    top: 72px;
    z-index: 1;
    isolation: isolate;
  }

  .home-stack-stage + .home-stack-stage {
    margin-top: -28px;
  }

  .home-stack-stage > .home-layer {
    position: relative;
    z-index: 1;
    background: var(--panel);
    border-top: 1px solid var(--line);
    box-shadow: 0 -18px 38px rgba(0, 0, 0, .32);
  }
}

@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  .home-stack-stage > .home-layer {
    background: var(--panel);
    border-top: 1px solid var(--line);
  }
}

.community-steps strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #0b0b0b;
  background: var(--accent-2);
}

.course-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  padding: 12px;
  background-color: var(--media-bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.lightbox-trigger {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.course-image img,
.lightbox-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 54px);
  background: rgba(0, 0, 0, .88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  max-width: min(1100px, 96vw);
  max-height: 88vh;
  margin: 0;
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: var(--media-bg);
  border: 1px solid var(--line);
}

.lightbox figcaption {
  margin-top: 12px;
  color: var(--text);
  font-weight: 800;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .24);
  background: var(--overlay);
  color: white;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.course-body {
  flex: 1;
  padding: 22px;
}

.course-body h3 {
  margin: 8px 0 12px;
}

.course-body p,
.module-block p,
.progress-card p,
.post-list p,
.pricing-grid p,
.lesson-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.course-body a {
  color: var(--accent-2);
  font-weight: 800;
}

.sponsor-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 4px 0 14px;
  padding: 6px 10px;
  border: 1px solid rgba(215, 170, 91, .42);
  background: rgba(215, 170, 91, .12);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

.access-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 2px 8px 14px 0;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .16);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sponsor-banner {
  display: flex;
  gap: 18px;
  align-items: center;
  max-width: 760px;
  margin: 24px 0 0;
  padding: 18px;
  background: rgba(215, 170, 91, .10);
  border: 1px solid rgba(215, 170, 91, .35);
}

.sponsor-banner img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  background: rgba(255, 255, 255, .92);
  padding: 8px;
}

.sponsor-banner span,
.sponsor-banner a,
.sponsor-note {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

.sponsor-banner strong {
  display: block;
  margin: 4px 0;
  font-size: 19px;
}

.sponsor-banner p {
  margin: 0;
  font-size: 15px;
}

.sponsor-banner a {
  display: inline-flex;
  margin-top: 10px;
}

.sponsor-note {
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid rgba(215, 170, 91, .35);
  background: rgba(215, 170, 91, .10);
}

.sponsor-note a {
  color: var(--accent-2);
  margin-left: 8px;
  text-decoration: underline;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-strip div {
  min-height: 150px;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.feature-strip strong,
.feature-strip span {
  display: block;
}

.feature-strip span {
  margin-top: 12px;
  color: var(--muted);
}

.expert-carousel-band {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(52px, 7vw, 92px) 18px;
}

.expert-carousel {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}

.expert-slide {
  position: relative;
  display: none;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
  padding: clamp(24px, 5vw, 52px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}

.expert-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.expert-slide .expert-photo,
.expert-slide > div:not(.expert-photo) {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.expert-slide.is-active {
  display: grid;
  opacity: 1;
  pointer-events: auto;
}

.expert-photo {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  background: var(--media-bg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.expert-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.expert-photo span {
  color: var(--accent-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(80px, 12vw, 140px);
}

.expert-slide h3 {
  margin: 10px 0 12px;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: .98;
}

.expert-slide span,
.expert-slide strong {
  color: var(--accent-2);
}

.expert-slide p {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.expert-dots {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 22px;
  display: flex;
  gap: 8px;
}

.expert-directory {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px clamp(48px, 7vw, 92px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.expert-directory-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.expert-directory-card:hover {
  border-color: rgba(215, 170, 91, .5);
}

.expert-directory-card h2 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 24px;
  font-weight: 900;
}

.expert-directory-card p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.45;
}

.expert-directory-card strong {
  color: var(--accent-2);
}

.expert-photo.small {
  max-width: 110px;
}

.expert-photo.small span {
  font-size: 56px;
}

.expert-profile {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 92px) 18px;
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
}

.expert-profile-photo {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  background: var(--media-bg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.expert-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.expert-profile-photo span {
  color: var(--accent-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(90px, 14vw, 160px);
}

.expert-profile-copy h2 {
  margin: 14px 0;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
}

.expert-profile-copy strong {
  display: block;
  margin-bottom: 18px;
  color: var(--accent-2);
}

.expert-profile-copy p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.expert-profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.expert-dots button {
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, .24);
  cursor: pointer;
}

.expert-dots button.is-active {
  background: var(--accent-2);
}

.membership-band {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) 18px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(280px, .75fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.membership-band p,
.newsletter-band p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.membership-band ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.membership-band li {
  padding: 18px 0 18px 34px;
  border-bottom: 1px solid var(--line);
  position: relative;
  color: var(--text);
  line-height: 1.45;
}

.membership-band li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 23px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
}

.newsletter-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .5fr);
  gap: 28px;
  align-items: end;
  padding: clamp(48px, 7vw, 90px) clamp(18px, 5vw, 72px);
  background: var(--panel-soft);
  border-top: 1px solid var(--line);
}

.newsletter-band form {
  display: flex;
  gap: 10px;
}

.newsletter-band input {
  flex: 1;
}

.newsletter-page {
  display: grid;
  grid-template-columns: minmax(320px, .52fr) minmax(0, 1fr);
  gap: 22px;
  padding-top: 0;
}

.newsletter-benefits {
  display: grid;
  gap: 14px;
}

.newsletter-benefits div {
  padding: 24px;
}

.newsletter-benefits strong,
.newsletter-benefits span {
  display: block;
}

.newsletter-benefits span {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.newsletter-admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px;
}

.newsletter-admin-stats div {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--field);
}

.newsletter-admin-stats strong,
.newsletter-admin-stats span {
  display: block;
}

.newsletter-admin-stats strong {
  font-size: 32px;
  color: var(--accent-2);
}

.newsletter-admin-stats span {
  margin-top: 6px;
  color: var(--muted);
}

.newsletter-subscriber-list > div {
  align-items: flex-start;
  flex-direction: column;
}

.page-head.compact {
  padding-bottom: 18px;
}

.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.price {
  color: var(--accent-2);
  font-weight: 900;
}

.instructor-card {
  align-self: end;
  padding: 28px;
}

.instructor-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.instructor-photo {
  display: block;
  width: 96px;
  height: 96px;
  margin-bottom: 18px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.lesson-list {
  padding-top: 0;
}

.module-block {
  margin-bottom: 18px;
  padding: 26px;
  overflow: visible;
}

.module-head {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 18px;
}

.module-image {
  min-height: 140px;
  background-color: var(--media-bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border: 1px solid var(--line);
}

.module-block h2 {
  font-size: clamp(32px, 3.8vw, 56px);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.module-block p {
  display: block;
  max-height: none;
  overflow: visible;
}

.module-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0;
  color: var(--text);
}

.module-meta strong {
  font-size: 15px;
}

.module-meta span {
  color: var(--muted);
  font-size: 14px;
}

.lesson-expert {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.module-lessons {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.module-lessons-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 78px;
  padding: 15px 0;
  cursor: pointer;
  list-style: none;
}

.module-lessons-toggle::-webkit-details-marker {
  display: none;
}

.module-lessons-summary,
.module-lessons-action,
.lesson-row-main {
  display: flex;
  align-items: center;
}

.module-lessons-summary {
  gap: 12px;
  flex-wrap: wrap;
}

.module-lessons-kicker {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.module-lessons-summary strong {
  font-size: 17px;
}

.module-lessons-summary > span:last-child,
.module-lessons-action,
.lesson-duration,
.lesson-number,
.module-lessons-empty {
  color: var(--muted);
}

.module-lessons-action {
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.module-lessons-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  transition: transform .18s ease;
}

.module-lessons[open] .module-lessons-chevron {
  transform: rotate(225deg) translateY(-1px);
}

.module-lessons-body {
  padding-bottom: 10px;
}

.module-lessons-empty {
  margin: 0;
  padding: 8px 0 18px;
}

.lesson-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .018);
  color: var(--text);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.lesson-row:hover,
.lesson-row:focus-visible {
  border-color: var(--accent-2);
  background: rgba(215, 170, 91, .1);
  outline: 0;
  transform: translateX(3px);
}

.lesson-row-main {
  min-width: 0;
  gap: 12px;
}

.lesson-row-main > span:last-child {
  min-width: 0;
}

.lesson-row-main strong,
.lesson-number {
  display: block;
}

.lesson-row-main strong {
  overflow-wrap: anywhere;
}

.lesson-number {
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.lesson-status {
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent-2);
  border-radius: 50%;
  color: var(--accent-2);
  font-size: 11px;
}

.lesson-row.is-complete .lesson-status {
  background: var(--accent-2);
  color: #12100d;
}

.lesson-duration {
  flex: 0 0 auto;
  font-size: 13px;
  white-space: nowrap;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  min-height: calc(100vh - 74px);
}

.player {
  background: #000;
}

.player iframe,
.player video,
.video-placeholder {
  width: 100%;
  height: 100%;
  min-height: 560px;
  border: 0;
}

.player video {
  display: block;
  background: #000;
  object-fit: contain;
}

.video-placeholder {
  display: grid;
  place-items: center;
  gap: 18px;
  align-content: center;
  background:
    linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.7)),
    url("https://images.unsplash.com/photo-1505751172876-fa1923c5c528?auto=format&fit=crop&w=1500&q=80") center/cover;
}

.video-placeholder span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: white;
  color: black;
}

.lesson-panel {
  padding: clamp(28px, 5vw, 54px);
  background: var(--panel);
  border-left: 1px solid var(--line);
}

.lesson-panel h1 {
  font-size: clamp(34px, 4vw, 54px);
}

.lesson-content {
  margin: 26px 0;
  color: var(--text);
  line-height: 1.7;
}

.auth {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(50px, 8vw, 110px) 18px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 34px;
}

.account-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px clamp(48px, 7vw, 92px);
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.legal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 18px clamp(48px, 7vw, 92px);
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.form-card {
  padding: 26px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
}

.check input {
  width: auto;
  min-height: auto;
}

.dashboard-grid,
.admin-grid,
.post-list,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.progress-card,
.post-list article,
.pricing-grid div {
  padding: 24px;
}

.community-layout,
.community-detail {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px clamp(48px, 7vw, 92px);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.community-sidebar,
.community-composer,
.community-detail-card,
.comment-list article {
  background: var(--panel);
  border: 1px solid var(--line);
}

.community-sidebar {
  padding: 18px;
  position: sticky;
  top: 96px;
}

.community-sidebar h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.community-sidebar a,
.community-tabs a {
  display: block;
  padding: 12px;
  border: 1px solid transparent;
  color: var(--muted);
}

.community-sidebar a.is-active,
.community-tabs a.is-active {
  border-color: rgba(215, 170, 91, .42);
  background: rgba(215, 170, 91, .10);
  color: var(--text);
}

.community-sidebar strong,
.community-sidebar span,
.community-card-footer span,
.comment-list span,
.community-detail-card > span {
  display: block;
}

.community-sidebar span,
.community-card-footer span,
.comment-list span,
.community-detail-card > span {
  color: var(--muted);
  font-size: 13px;
}

.community-main {
  display: grid;
  gap: 14px;
}

.community-filter-drawer,
.community-composer {
  background: var(--panel);
  border: 1px solid var(--line);
}

.community-filter-drawer summary,
.community-composer summary {
  padding: 14px 16px;
  cursor: pointer;
  color: var(--accent-2);
  font-weight: 900;
  list-style: none;
}

.community-filter-drawer summary::-webkit-details-marker,
.community-composer summary::-webkit-details-marker {
  display: none;
}

.community-filter-drawer summary::after,
.community-composer summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}

.community-filter-drawer[open] summary::after,
.community-composer[open] summary::after {
  content: "–";
}

.community-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.community-tabs a {
  min-width: 120px;
  text-align: center;
  background: var(--panel);
  border-color: var(--line);
}

.community-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  gap: 10px;
  align-items: end;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.community-search label {
  margin: 0;
}

.community-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.community-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(215, 170, 91, .36);
  background: rgba(215, 170, 91, .09);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.rich-editor {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: -6px 0 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.rich-editor-source {
  display: none !important;
}

.stable-admin-editor {
  min-height: 520px;
  line-height: 1.7;
  white-space: pre-wrap;
  resize: vertical;
}

.stable-editor {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: -6px 0 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.stable-editor .stable-admin-editor {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.rich-toolbar button,
.rich-upload-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.rich-upload-button input {
  display: none;
}

.rich-toolbar button:hover,
.rich-upload-button:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.rich-editor-surface {
  display: block !important;
  align-self: stretch;
  flex: 1 0 auto;
  width: 100%;
  min-width: 0;
  min-height: 180px;
  padding: 14px;
  color: var(--text);
  line-height: 1.65;
  outline: none;
  column-count: auto !important;
  column-width: auto !important;
  white-space: normal;
  writing-mode: horizontal-tb;
  word-break: normal;
  overflow-wrap: anywhere;
}

.rich-editor-surface:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.rich-editor-surface * {
  max-width: 100%;
  column-count: auto !important;
  column-width: auto !important;
  float: none !important;
  position: static !important;
}

.rich-editor-surface > * {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  clear: both !important;
}

.rich-editor-surface p,
.rich-editor-surface div,
.rich-editor-surface blockquote,
.rich-editor-surface ul,
.rich-editor-surface ol,
.rich-editor-surface table,
.rich-editor-surface tbody,
.rich-editor-surface tr,
.rich-editor-surface td,
.rich-editor-surface th,
.rich-editor-surface h2,
.rich-editor-surface h3 {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 14px;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

.rich-editor-surface span {
  display: inline;
}

.rich-editor-surface strong,
.rich-editor-surface b,
.rich-editor-surface em,
.rich-editor-surface i,
.rich-editor-surface u,
.rich-editor-surface a {
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

.rich-editor-surface img,
.rich-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
}

.rich-content img {
  cursor: zoom-in;
}

.rich-content {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.72;
}

.rich-content p,
.rich-content ul,
.rich-content ol,
.rich-content blockquote {
  margin: 0 0 16px;
}

.rich-content h2,
.rich-content h3 {
  margin: 24px 0 12px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.15;
}

.rich-content h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.rich-content h3 {
  font-size: clamp(22px, 2.4vw, 28px);
}

.rich-content a {
  color: var(--accent-2);
  text-decoration: underline;
}

.community-composer .form-card {
  border: 0;
  border-top: 1px solid var(--line);
}

.community-feed {
  padding: 0;
  grid-template-columns: 1fr;
  gap: 14px;
}

.community-feed article {
  display: grid;
  gap: 9px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color .18s ease, background .18s ease;
}

.community-feed article:hover {
  border-color: rgba(215, 170, 91, .44);
  background: var(--panel-soft);
}

.community-feed h2 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 900;
  line-height: 1.18;
}

.community-feed h2 a:hover {
  color: var(--accent-2);
}

.community-feed p {
  margin: 0;
}

.community-preview-image {
  display: block;
  width: 100%;
  height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--media-bg);
}

.community-preview-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--accent-2);
  font-size: 13px;
}

.community-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.community-card-footer a {
  color: var(--accent-2);
  font-weight: 900;
}

.community-login-note {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
}

.community-login-note a {
  color: var(--accent-2);
  font-weight: 900;
}

.community-detail {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.community-detail-card,
.comment-list {
  padding: clamp(22px, 4vw, 38px);
}

.community-detail-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.community-detail-nav [data-community-back]::before {
  content: "←";
  margin-right: 8px;
}

.community-detail-card h1 {
  margin: 12px 0 18px;
  font-size: clamp(32px, 4vw, 52px);
}

.share-panel {
  margin: 0 0 20px;
  padding: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.share-panel strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
}

.share-panel div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-panel a,
.share-panel button {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  width: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.share-icon span {
  font-size: 14px;
  line-height: 1;
}

.share-panel a:hover,
.share-panel button:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.link-preview-list {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.link-preview-card {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  min-height: 0;
  height: 148px;
  max-width: 820px;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.link-preview-card:hover {
  border-color: var(--accent-2);
  transform: translateY(-1px);
}

.link-preview-image {
  display: block;
  height: 148px;
  overflow: hidden;
  background: #0b0b0b;
  border-right: 1px solid var(--line);
}

.link-preview-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 148px;
  object-fit: cover;
}

.link-preview-body {
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 16px;
}

.link-preview-body small {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.link-preview-body strong {
  color: var(--text);
  font-size: 19px;
  line-height: 1.15;
}

.link-preview-body span {
  color: var(--muted);
  line-height: 1.45;
}

.community-attachments {
  margin: 28px 0;
  display: grid;
  gap: 12px;
}

.community-attachments h2 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 900;
}

.community-attachments article {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.community-attachment-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.community-attachments strong {
  display: block;
  color: var(--text);
}

.community-attachments p {
  margin: 6px 0 0;
  color: var(--muted);
}

.community-attachments span {
  display: block;
  margin-top: 6px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.use-case-detail {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.use-case-detail div {
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.use-case-detail strong {
  color: var(--accent-2);
}

.comment-list {
  display: grid;
  gap: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.comment-list h2 {
  font-size: 28px;
}

.comment-list article {
  padding: 16px;
}

.community-ad-slot {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 250px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.community-ad-slot > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.community-ad-slot .adsbygoogle {
  width: 100%;
  min-height: 220px;
  overflow: hidden;
}

.ad-settings-status {
  display: grid;
  gap: 10px;
  padding: 16px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.ad-settings-status.is-ready {
  border-color: var(--accent-2);
}

.ad-settings-status > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ad-settings-status span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}

.ad-settings-status .is-passed {
  color: var(--accent-2);
}

.ad-settings-status .is-missing {
  color: #d85c54;
}

.ad-settings-status p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.progress-card h2 {
  margin: 10px 0 22px;
  font-size: 31px;
}

.progress {
  height: 9px;
  background: var(--panel-soft);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  background: var(--accent-2);
}

.certificate {
  max-width: 900px;
  margin: 70px auto;
  padding: clamp(44px, 8vw, 90px);
  text-align: center;
  border: 1px solid var(--accent-2);
  background: var(--panel);
}

.certificate h1 {
  margin: 12px auto;
}

.certificate h2 {
  margin-top: 24px;
  color: var(--accent-2);
}

.admin-list {
  padding-top: 0;
}

.admin-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.admin-list strong,
.admin-list span {
  min-width: 0;
}

.admin-list span {
  color: var(--muted);
}

.row-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.row-actions form {
  margin: 0;
}

.inline-select-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}

.inline-select-form select {
  min-width: 240px;
}

.inline-select-form input {
  width: auto;
  min-width: 170px;
}

.inline-select-form button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.row-actions a,
.row-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.row-actions button {
  color: #ffb7b7;
}

.help-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.sponsor-admin-box {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid rgba(215, 170, 91, .28);
  background: rgba(215, 170, 91, .08);
}

.video-admin-box {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
}

.sponsor-admin-box h3,
.video-admin-box h3 {
  margin-bottom: 16px;
  font-size: 22px;
}

.media-picker-field {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.media-picker-field > label {
  margin: 0;
}

.media-picker-preview {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px solid var(--line);
  background: var(--field);
  overflow: hidden;
}

.media-picker-preview img,
.media-picker-preview video,
.media-picker-thumb img,
.media-picker-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-picker-empty,
.media-picker-file {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.media-picker-file strong,
.media-picker-file span {
  display: block;
}

.media-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-picker-actions input[type="file"] {
  display: none;
}

.media-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  padding: clamp(18px, 4vw, 52px);
  background: rgba(0, 0, 0, .82);
  overflow: auto;
}

.media-picker-modal[hidden] {
  display: none;
}

.media-picker-dialog {
  max-width: 1120px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

.media-picker-dialog header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.media-picker-dialog header button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
}

.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  padding: 18px;
}

.media-picker-item {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.media-picker-item:hover {
  border-color: var(--accent-2);
}

.media-picker-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  background: var(--media-bg);
  overflow: hidden;
}

.media-picker-item small {
  color: var(--muted);
}

.media-meta-editor {
  margin-top: 12px;
}

.media-meta-editor summary {
  color: var(--accent-2);
  cursor: pointer;
  font-weight: 800;
}

.inline-media-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.inline-media-meta label {
  margin: 0;
}

.inline-media-meta button,
.inline-media-meta label:nth-child(5) {
  grid-column: 1 / -1;
}

code {
  padding: 2px 5px;
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--accent-2);
  overflow-wrap: anywhere;
}

.flash {
  max-width: var(--max);
  margin: 18px auto 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.flash.success {
  border-color: var(--success);
}

.flash.error {
  border-color: var(--error);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 42px clamp(18px, 4vw, 52px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.install-body {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(7,7,7,.95), rgba(7,7,7,.78)),
    url("https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.install-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 22px;
}

.install-card {
  width: min(680px, 100%);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

@media (max-width: 900px) {
  .home-stack-stage.is-mobile-reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 360ms ease-out, transform 360ms ease-out;
  }

  .home-stack-stage.is-mobile-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .site-header {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    padding: 12px 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand-copy {
    overflow: hidden;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .role-entry-grid,
  .pricing-overview-grid,
  .free-start-layout,
  .free-start-grid,
  .explain-grid,
  .community-steps,
  .decision-grid {
    grid-template-columns: 1fr;
  }

  .role-entry-grid,
  .pricing-overview-grid,
  .decision-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }

  .role-entry-grid > *,
  .pricing-overview-grid > *,
  .decision-grid > * {
    flex: 0 0 min(86vw, 360px);
    scroll-snap-align: start;
  }

  .nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 8px 14px 14px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
  }

  .nav.is-open {
    display: grid;
  }

  .nav > a,
  .nav .admin-menu,
  .nav .user-chip {
    min-height: 44px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-menu div {
    position: static;
    margin-top: 10px;
  }

  .admin-section summary {
    align-items: flex-start;
  }

  .admin-section > .form-card,
  .admin-section > .admin-list.inner {
    margin: 14px;
  }

  .hero,
  .section-title,
  .course-hero,
  .community-layout,
  .community-detail,
  .book-hero,
  .book-chapter,
  .expert-directory,
  .expert-profile,
  .player-layout,
  .auth,
  .account-grid,
  .membership-band,
  .newsletter-band {
    grid-template-columns: 1fr;
  }

  .course-grid,
  .access-model-grid,
  .dashboard-grid,
  .dashboard-summary,
  .stat-grid,
  .analytics-chart-grid,
  .admin-stat-columns,
  .admin-grid,
  .admin-dashboard,
  .post-list,
  .pricing-grid,
  .feature-strip,
  .newsletter-page,
  .newsletter-admin-stats,
  .community-search {
    grid-template-columns: 1fr;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-chapter-card {
    min-height: 0;
  }

  .book-download-list article,
  .book-code-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .book-download-list article {
    flex-direction: column;
  }

  .community-attachments article {
    flex-direction: column;
    align-items: stretch;
  }

  .community-sidebar {
    position: static;
    order: 2;
  }

  .community-main {
    order: 1;
  }

  .expert-slide {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .expert-photo {
    max-width: 220px;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    min-height: 260px;
  }

  .player iframe,
  .player video,
  .video-placeholder {
    min-height: 320px;
  }

  .goal-options,
  .admin-homepage-grid,
  .admin-split {
    grid-template-columns: 1fr;
  }

  .newsletter-band form {
    display: grid;
  }

  .sponsor-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-head {
    grid-template-columns: 1fr;
  }

  .lesson-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .footer {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .book-purchase-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .book-shop-button {
    width: 100%;
  }

  body {
    overflow-x: hidden;
  }

  .site-header {
    gap: 12px;
    padding: 12px 14px;
  }

  .brand {
    width: auto;
    flex: 1;
    gap: 10px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .role-entry-grid a,
  .free-start-grid a,
  .pricing-overview-grid article,
  .free-start-grid article,
  .explain-grid article,
  .community-steps article,
  .decision-grid a {
    padding: 16px;
  }

  .role-entry-grid strong,
  .free-start-grid strong,
  .community-steps strong,
  .decision-grid strong {
    font-size: 19px;
  }

  .pricing-overview-grid strong {
    font-size: 32px;
  }

  .brand-domain {
    font-size: 14px;
  }

  .brand-copy small {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-copy em {
    font-size: 13px;
  }

  .nav {
    display: none;
    width: auto;
    grid-template-columns: 1fr;
    gap: 0;
    font-size: 13px;
  }

  .nav.is-open {
    display: grid;
  }

  .nav > a,
  .admin-menu summary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 42px;
    padding: 11px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    text-align: left;
  }

  .user-chip {
    justify-content: flex-start;
    min-height: 42px;
    padding: 11px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
  }

  .user-chip > span:last-child {
    display: inline;
  }

  .nav .button.small {
    min-height: 42px;
    padding: 0 12px;
    justify-content: center;
  }

  .admin-menu {
    width: 100%;
  }

  .admin-menu div {
    width: min(100%, 360px);
    grid-template-columns: 1fr;
    max-height: 55vh;
    overflow-y: auto;
  }

  .hero {
    min-height: auto;
    padding: 34px 16px 42px;
    background:
      var(--hero-overlay),
      url("https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&w=1000&q=74") center/cover;
  }

  h1 {
    font-size: 32px;
    line-height: 1.04;
  }

  .hero h1 {
    max-width: 11ch;
    font-size: 38px;
    line-height: 1.04;
  }

  h2 {
    font-size: 31px;
    line-height: 1.04;
  }

  h3 {
    font-size: 22px;
  }

  .lead,
  .page-head p,
  .course-hero p,
  .section-title p {
    font-size: 16px;
  }

  .hero-actions,
  .checkout-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .button,
  .button.small,
  .button.ghost {
    width: 100%;
    min-height: 48px;
  }

  .hero-media {
    min-height: 220px;
  }

  .video-frame {
    min-height: 220px;
    padding: 18px;
  }

  .goal-finder {
    padding: 16px;
  }

  .goal-options {
    gap: 8px;
  }

  .goal-options span {
    min-height: 46px;
    font-size: 13px;
  }

  .band,
  .page-head,
  .course-hero,
  .community-layout,
  .community-detail,
  .expert-directory,
  .expert-profile,
  .lesson-list,
  .dashboard-grid,
  .admin-grid,
  .admin-list,
  .post-list,
  .pricing-grid,
  .newsletter-page,
  .expert-carousel-band,
  .membership-band {
    padding: 34px 14px;
  }

  .community-head {
    padding: 26px 14px 18px;
  }

  .community-head h1 {
    font-size: 34px;
    line-height: 1.08;
  }

  .community-head p {
    font-size: 15px;
    line-height: 1.5;
  }

  .community-layout {
    padding-top: 0;
    gap: 14px;
  }

  .community-feed {
    padding: 0;
  }

  .community-feed article {
    padding: 16px;
  }

  .community-feed h2 {
    font-size: 22px;
  }

  .community-preview-image {
    height: 180px;
  }

  .community-sidebar {
    padding: 14px;
  }

  .community-sidebar h2 {
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 18px;
  }

  .community-sidebar a {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .expert-directory-card {
    grid-template-columns: 80px minmax(0, 1fr);
    padding: 14px;
  }

  .expert-photo.small {
    max-width: 80px;
  }

  .expert-directory-card h2 {
    font-size: 20px;
  }

  .expert-profile-photo {
    max-width: 260px;
  }

  .community-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .community-card-footer {
    display: grid;
  }

  .community-detail-card,
  .comment-list {
    padding: 18px;
  }

  .community-detail-card h1 {
    font-size: 30px;
    line-height: 1.12;
  }

  .share-panel {
    padding: 12px;
  }

  .share-panel strong {
    margin-bottom: 8px;
  }

  .share-panel div {
    gap: 8px;
  }

  .share-panel a,
  .share-panel button {
    width: 38px;
    min-height: 38px;
  }

  .link-preview-card {
    grid-template-columns: 1fr;
    height: auto;
    max-width: 100%;
  }

  .link-preview-image {
    height: 180px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .link-preview-image img {
    max-height: 180px;
  }

  .section-title {
    gap: 16px;
    margin-bottom: 22px;
  }

  .course-grid.wide {
    padding: 0 14px 44px;
  }

  .section-head {
    padding: 28px 14px 14px;
  }

  .access-model-grid {
    padding: 0 14px 34px;
  }

  .access-model-grid article {
    padding: 20px 18px;
  }

  .course-grid {
    gap: 14px;
  }

  .band > .course-grid:not(.wide),
  .home-community-feed {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding: 2px 0 12px;
    scrollbar-width: none;
  }

  .band > .course-grid:not(.wide)::-webkit-scrollbar,
  .home-community-feed::-webkit-scrollbar {
    display: none;
  }

  .band > .course-grid:not(.wide) > .course-card,
  .home-community-feed > article {
    flex: 0 0 min(82vw, 360px);
    scroll-snap-align: start;
  }

  .course-image {
    aspect-ratio: 16 / 10;
    padding: 8px;
  }

  .course-body,
  .progress-card,
  .post-list article,
  .pricing-grid div,
  .newsletter-benefits div,
  .instructor-card,
  .form-card,
  .module-block {
    padding: 18px;
  }

  .course-body p {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .course-body .module-block p {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
    max-height: none;
    overflow: visible;
  }

  .access-pill,
  .sponsor-pill {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .expert-carousel-band {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .expert-slide {
    padding: 18px;
    gap: 18px;
  }

  .expert-photo {
    width: min(190px, 70vw);
    max-width: 190px;
  }

  .expert-slide h3 {
    font-size: 31px;
  }

  .expert-slide p {
    font-size: 16px;
    -webkit-line-clamp: 6;
  }

  .expert-dots {
    position: static;
    padding: 0 18px 18px;
  }

  .expert-dots button {
    flex: 1;
    height: 5px;
  }

  .feature-strip div {
    min-height: auto;
    padding: 20px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .membership-band li {
    padding-left: 28px;
  }

  .newsletter-band {
    padding: 34px 14px;
  }

  .course-hero {
    gap: 16px;
  }

  .sponsor-banner {
    padding: 14px;
  }

  .sponsor-banner img {
    width: 62px;
    height: 62px;
  }

  .instructor-card {
    align-self: stretch;
  }

  .instructor-card strong {
    font-size: 24px;
  }

  .module-head {
    gap: 14px;
  }

  .module-image {
    min-height: 180px;
  }

  .lesson-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .lesson-row small {
    white-space: normal;
  }

  .module-lessons-toggle {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
  }

  .module-lessons-action {
    width: 100%;
    justify-content: space-between;
    color: var(--accent-2);
  }

  .lesson-duration {
    align-self: center;
    text-align: right;
  }

  .player-layout {
    min-height: auto;
  }

  .player iframe,
  .player video,
  .video-placeholder {
    min-height: 240px;
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .lesson-panel {
    padding: 22px 18px 92px;
  }

  .lesson-panel h1 {
    font-size: 32px;
  }

  .lesson-panel form {
    position: sticky;
    bottom: 12px;
    z-index: 12;
    margin: 20px 0 0;
  }

  .lesson-panel form .button {
    box-shadow: 0 14px 34px rgba(0, 0, 0, .42);
  }

  .auth {
    padding: 34px 14px;
    gap: 20px;
  }

  .account-grid {
    padding: 0 14px 40px;
  }

  .legal-page {
    padding: 0 14px 40px;
    font-size: 16px;
  }

  input,
  textarea,
  select {
    min-height: 48px;
    font-size: 16px;
  }

  .check {
    align-items: flex-start;
  }

  .check input {
    margin-top: 3px;
  }

  .admin-dashboard {
    gap: 12px;
    padding: 0 14px 40px;
  }

  .dashboard-summary,
  .stat-grid,
  .admin-stat-columns {
    gap: 12px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .admin-dashboard a {
    min-height: 112px;
    padding: 18px;
  }

  .admin-dashboard span {
    font-size: 21px;
  }

  .admin-accordion {
    padding: 0 14px 40px;
  }

  .admin-section summary {
    min-height: 62px;
    padding: 14px 16px;
  }

  .admin-section summary span {
    font-size: 19px;
  }

  .admin-section summary small {
    font-size: 13px;
  }

  .admin-section > .form-card,
  .admin-section > .admin-list.inner,
  .admin-split,
  .newsletter-admin-stats {
    margin: 12px;
  }

  .admin-homepage-grid {
    gap: 12px;
  }

  .admin-list > div {
    align-items: stretch;
  }

  .row-actions,
  .inline-select-form {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .row-actions a,
  .row-actions button,
  .inline-select-form button {
    width: 100%;
    min-height: 42px;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }

  .footer {
    padding: 30px 14px;
  }

  .footer-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .analytics-chart-grid {
    grid-template-columns: 1fr;
    padding: 0 14px 18px;
  }

  .analytics-card-wide {
    grid-column: auto;
  }

  .attachment-analytics-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 8px 14px 22px;
  }

  .attachment-analytics-grid > :nth-child(3) {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .analytics-card {
    padding: 16px;
  }

  .analytics-card-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .chart-bar-row,
  .chart-dual-row {
    grid-template-columns: minmax(62px, .8fr) minmax(0, 2fr) 38px;
    gap: 8px;
  }

  .attachment-stat-day {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .attachment-stat-day time {
    grid-row: auto;
  }

  .attachment-activity-row,
  .attachment-access-row {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
  }

  .attachment-activity-row .button {
    width: 100%;
  }

  .attachment-access-row time {
    font-size: 12px;
  }
}
