:root {
  --bg: #060606;
  --bg-2: #0F0F12;
  --paper: #0C0C0E;
  --ink: #F4F1EA;
  --muted: rgba(244, 241, 234, 0.58);
  --faint: rgba(244, 241, 234, 0.38);
  --line: rgba(244, 241, 234, 0.14);
  --line-strong: rgba(244, 241, 234, 0.24);
  --acc: #FF6B35;
  --acc-hot: #FF8254;
  --acc-ink: #160801;
  --forest: var(--acc);
  --forest-hover: var(--acc-hot);
  --forest-soft: color-mix(in srgb, var(--acc) 16%, transparent);
  --terra: var(--acc);
  --terra-soft: color-mix(in srgb, var(--acc) 16%, transparent);
  --ok: #3CB87A;
  --ok-soft: color-mix(in srgb, var(--ok) 16%, transparent);
  --danger: #E86A5C;
  --danger-soft: color-mix(in srgb, var(--danger) 16%, transparent);
  --shadow: 0 0 0 1px rgba(244, 241, 234, 0.06), 0 18px 40px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --r: 18px;
  --r-sm: 10px;
  --r-lg: 28px;
  --font-serif: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-sans: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-label: "Onest", "Golos Text", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --header-h: 82px;
  --max: 1180px;
  --read: 40rem;
  color-scheme: dark;
}


*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--forest); text-underline-offset: 3px; }
a:hover { color: var(--forest-hover); }
:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 200;
  background: var(--acc);
  color: var(--acc-ink);
  padding: 8px 12px;
  border-radius: 8px;
  /* Fully clipped until keyboard focus — a negative top left a 2px ink sliver. */
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
}
.skip-link:focus,
.skip-link:focus-visible {
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
  white-space: normal;
  pointer-events: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner, .footer-inner, .wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--acc);
  color: var(--acc-ink);
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 15px;
  display: grid;
  place-items: center;
  flex: none;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.brand-sub {
  display: block;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: -1px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 10px;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--ink);
  background: transparent;
}
.nav a[aria-current="page"] { color: var(--acc); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  border-radius: 1px;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

.progress-thin {
  height: 3px;
  background: var(--line);
}
.progress-thin > i {
  display: block;
  height: 100%;
  background: var(--acc);
  width: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--r);
  border: 1px solid transparent;
  text-decoration: none;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: var(--acc);
  color: var(--acc-ink);
  transition: background-color .3s cubic-bezier(.16,1,.3,1), transform .3s cubic-bezier(.16,1,.3,1), border-color .3s cubic-bezier(.16,1,.3,1), color .3s cubic-bezier(.16,1,.3,1);
}
.btn:hover { background: var(--acc-hot); color: var(--acc-ink); }
.btn-terra { background: var(--acc); color: var(--acc-ink); }
.btn-terra:hover { background: var(--acc-hot); color: var(--acc-ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--acc);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--acc) 14%, transparent); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Layout */
.page { padding: 40px 0 80px; min-height: calc(100vh - var(--header-h) - 180px); }
.page-narrow { width: min(var(--read), calc(100% - 40px)); margin-inline: auto; }
h1, h2, h3, .serif { font-family: var(--font-serif); letter-spacing: -0.04em; font-weight: 900; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.05; margin: 0 0 16px; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.15; margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 1.15rem; margin: 0 0 8px; font-weight: 700; letter-spacing: -0.03em; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 28px; max-width: 38rem; }
.kicker {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc);
  margin: 0 0 10px;
}

/* Hero */
.hero {
  padding: 56px 0 24px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.hero-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.hero-card li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
}
.step-n {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--forest-soft);
  color: var(--forest);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
}
.hero-card strong { display: block; }
.hero-card span { color: var(--muted); font-size: 14.5px; }

/* Sections */
.section { padding: 48px 0; }
.section-head { margin-bottom: 24px; max-width: 40rem; }
.grid-4, .grid-3, .grid-2 {
  display: grid;
  gap: 16px;
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 0 rgba(28,25,22,0.02);
}
.card p:last-child { margin-bottom: 0; }
.icon-dot {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--forest-soft);
  color: var(--forest);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  font-weight: 700;
}
.path-card { text-decoration: none; color: inherit; display: block; transition: transform .15s ease, border-color .15s ease; }
.path-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.path-card .n {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.note {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--muted);
  max-width: 46rem;
}
.author {
  display: flex;
  gap: 20px;
  align-items: center;
}
.author-ava {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--acc);
  color: var(--acc-ink);
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex: none;
}

/* Course home */
.continue {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 32px;
}
.bar {
  height: 8px;
  background: var(--bg-2);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 10px;
}
.bar > i { display: block; height: 100%; background: var(--forest); border-radius: inherit; }
.module { margin: 0 0 16px; }
.module > summary {
  list-style: none;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-weight: 650;
}
.module > summary::-webkit-details-marker { display: none; }
.module[open] > summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}
.module-body {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}
.lesson-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--line);
}
.lesson-row:hover { background: var(--bg); }
.dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--paper);
}
.dot.done { background: var(--forest); border-color: var(--forest); box-shadow: inset 0 0 0 3px var(--paper); }
.dot.next { border-color: var(--terra); background: var(--terra-soft); }
.dot.upcoming { border-style: dashed; }
.meta { color: var(--muted); font-size: 13.5px; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 650;
  background: var(--bg-2);
  color: var(--muted);
}
.badge-soon { background: var(--terra-soft); color: var(--acc); }

/* Lesson */
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--forest); text-decoration: underline; }
.player {
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  /* player background restyled in appendix */
  color: var(--ink);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  margin: 0 0 20px;
  position: relative;
  overflow: hidden;
}
.player .play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1.5px solid rgba(244,240,232,.45);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: rgba(255,255,255,.08);
}
.player h2 { color: inherit; font-size: clamp(1.3rem, 2.5vw, 1.8rem); margin: 0 0 8px; }
.player p { margin: 0; opacity: 0.85; font-size: 15px; }
.donor {
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14.5px;
  color: var(--muted);
  margin: 0 0 28px;
}
.donor strong { color: var(--ink); font-weight: 650; }
.chapters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.chapters span {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13.5px;
  color: var(--muted);
}
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.quote {
  border-left: 3px solid var(--acc);
  margin: 20px 0;
  padding: 4px 0 4px 16px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
}
.prompt {
  background: #0B0503;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 14.5px;
  font-family: var(--font-mono);
  white-space: pre-wrap;
  position: relative;
  margin: 16px 0 24px;
}
.prompt-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .65; margin-bottom: 8px; font-family: var(--font-label); }
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(244,241,234,.1);
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}
.task, .check, .notes-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  margin: 28px 0;
}
.task { border-left: 4px solid var(--forest); }
.check-item { margin: 0 0 18px; }
.check-item:last-child { margin: 0; }
.opts { display: grid; gap: 8px; margin-top: 8px; }
.opt {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  min-height: 48px;
}
.opt:hover { border-color: var(--line-strong); }
.opt.picked { border-color: var(--forest); background: var(--forest-soft); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--danger); background: var(--danger-soft); }
.explain { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.notes-box textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--bg);
  resize: vertical;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
}
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--forest); }
.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 8px;
}
.save-ok { font-size: 13px; color: var(--ok); min-height: 1.2em; }

/* Glossary / notebook / 404 */
.search {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 0 16px;
  background: var(--paper);
  margin: 0 0 20px;
}
.term {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.term h3 { margin: 0 0 4px; font-family: var(--font-sans); font-size: 1.05rem; letter-spacing: 0; }
.term p { margin: 0; color: var(--muted); }
.empty { color: var(--muted); padding: 24px 0; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14.5px;
}
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: inherit; }

.warn {
  background: var(--terra-soft);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  font-size: 14.5px;
}

@media (max-width: 900px) {
  .hero, .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
  .continue, .author { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .header-inner, .footer-inner, .wrap { width: min(var(--max), calc(100% - 28px)); }
  .page { padding: 28px 0 64px; }
  .hero, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 28px 0 8px; gap: 24px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 10px 14px 14px;
    flex-direction: column;
    align-items: stretch;
  }
  body.nav-open .nav { display: flex; }
  .nav a { min-height: 44px; display: flex; align-items: center; }
  .brand-sub { display: none; }
  .lesson-row { grid-template-columns: 28px 1fr; }
  .lesson-row .meta { grid-column: 2; }
  .lesson-nav .btn { flex: 1; }
}

/* ——— Round 2: visual quality pass ——— */
/* body background set in restyle appendix */

/* nav-cta restyled in appendix */

.hero {
  position: relative;
  padding: 72px 0 36px;
  gap: 56px;
  overflow: hidden;
}
/* hero-bgword restyled in appendix */
.kicker.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--forest-soft);
  margin-bottom: 16px;
}
.hero-meta {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}
.hero-visual { position: relative; }
.hero-stage {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-miniplayer {
  aspect-ratio: 16 / 9;
  /* miniplayer background restyled in appendix */
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 22px;
}
.hero-miniplayer .play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(244,240,232,.45);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: rgba(255,255,255,.08);
}
.hero-miniplayer strong { font-family: var(--font-serif); font-size: 1.2rem; letter-spacing: -0.03em; }
.hero-miniplayer span { opacity: .8; font-size: 13.5px; }
.hero-card { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.hero-stage .hero-card { padding: 20px 22px 22px; }

.path-section { padding: 12px 0 8px; overflow-x: clip; }
.path-groups { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 100%; }
.path-group { min-width: 0; width: 100%; }
.path-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 2px 2px; }
.path-group-head .kicker { margin: 0; }
.path-group-head p { margin: 0; font-size: 13px; color: var(--muted); }
.path-block-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

#video, #notes, #task, #check, #notebook-box { scroll-margin-top: calc(var(--header-h) + 56px); }
.path-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.path-rail li { flex: 1; min-width: 108px; scroll-snap-align: start; }
.path-rail a, .path-rail .path-step-static {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 8px 6px 12px;
  position: relative;
}
.path-rail li:not(:last-child) a::after,
.path-rail li:not(:last-child) .path-step-static::after {
  content: "";
  position: absolute;
  top: 22px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: var(--line-strong);
  z-index: 0;
}
.path-rail li.done:not(:last-child) a::after,
.path-rail li.done:not(:last-child) .path-step-static::after {
  background: var(--forest);
}
.path-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--paper);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  z-index: 1;
  margin-bottom: 8px;
}
.path-rail li.done .path-dot { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.path-rail li.current .path-dot { border-color: var(--acc); background: var(--terra-soft); color: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 20%, transparent); }
.path-rail li.soon .path-dot { border-style: dashed; color: var(--muted); }
.path-rail .path-label { font-size: 12.5px; font-weight: 650; line-height: 1.3; max-width: 9.5rem; }
.path-rail .path-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.path-card {
  position: relative;
  padding: 22px 22px 20px;
  overflow: hidden;
}
.path-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--forest);
  opacity: .35;
}
.path-card .n {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--forest);
}
.path-card .n em {
  font-style: normal;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--forest-soft);
  display: grid;
  place-items: center;
  font-size: 11px;
}
.path-card p { color: var(--muted); margin: 0 0 12px; }
.path-card .meta { margin: 0; }

.continue {
  align-items: center;
  gap: 24px;
  padding: 28px 30px;
}
.ring {
  width: 84px;
  height: 84px;
  flex: none;
  position: relative;
}
.ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.ring text, .ring .ring-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.prose { font-size: 1.05rem; line-height: 1.7; }
.prose h3 {
  margin: 32px 0 10px;
  padding-top: 6px;
  border-top: 1px solid transparent;
}
.prose p { margin: 0 0 14px; }
.callout {
  background: var(--bg-2);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--muted);
  margin: 18px 0 22px;
}

.lesson-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
  position: sticky;
  top: var(--header-h);
  z-index: 15;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 0;
}
.lesson-tabs a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 650;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.lesson-tabs a:hover { color: var(--ink); border-color: var(--line-strong); }

.lesson-dock {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .page-narrow { width: min(var(--read), calc(100% - 28px)); }
  .hero { padding-top: 36px; }
  /* hero-bgword stays visible, restyled below */
  .path-rail {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
    scroll-snap-type: none;
    gap: 4px 0;
  }
  .path-rail li { min-width: 0; flex: none; width: auto; }
  .path-rail li:not(:last-child) a::after,
  .path-rail li:not(:last-child) .path-step-static::after { display: none; }
  .path-rail .path-label { font-size: 11.5px; max-width: none; overflow-wrap: break-word; }
  .nav-cta { margin: 8px 0 0; text-align: center; }
  .lesson-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    margin: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  }
  .lesson-dock .btn:last-child { grid-column: 1 / -1; }
  .page-narrow.page:has(.lesson-dock) { padding-bottom: 230px; }
  .player { aspect-ratio: auto; min-height: 200px; padding: 28px 18px; }
  .player .play { width: 56px; height: 56px; }
  .player h2 { font-size: 1.25rem; }
  .lesson-tabs { margin-inline: -6px; padding-inline: 6px; }
  .continue { padding: 22px; }
  .ring { width: 72px; height: 72px; }
  .ring svg { width: 72px; height: 72px; }
}

/* ——— Round 3: visuals, tools, coming soon, deploy polish ——— */
.tools-strip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px 18px;
  margin: 0 0 24px;
  box-shadow: var(--shadow);
}
.tools-strip ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tools-strip li strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.tools-strip li span { color: var(--muted); font-size: 14.5px; }

.soon-block {
  margin: 36px 0 8px;
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
}
.soon-block h2 { margin: 0 0 8px; }
.soon-grid {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.soon-grid li {
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 16px 18px;
}
.soon-grid strong { display: block; margin-bottom: 4px; }
.soon-grid span { color: var(--muted); font-size: 14.5px; }

.lesson-stage { margin: 0 0 24px; }
.visual {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
}
.visual figcaption {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
.viz-steps, .viz-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.viz-steps { grid-template-columns: repeat(4, 1fr); }
.viz-steps.viz-steps { }
.viz-steps li, .viz-stack li, .viz-tile, .viz-pane {
  background: var(--bg);
  border-radius: 14px;
  padding: 14px 14px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.viz-steps li { flex-direction: column; }
.viz-num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--forest-soft);
  color: var(--forest);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 750;
}
.visual strong { display: block; margin: 0 0 4px; font-size: 15.5px; }
.visual p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.viz-compare, .viz-trio {
  display: grid;
  gap: 12px;
}
.viz-compare { grid-template-columns: 1fr 1fr; }
.viz-trio { grid-template-columns: repeat(3, 1fr); }
.viz-pane, .viz-tile { flex-direction: column; min-height: 100%; }
.viz-k {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--terra-soft);
  color: var(--acc);
  font-weight: 750;
  font-size: 12px;
  margin-bottom: 8px;
}
.viz-stack li {
  border-left: 3px solid var(--forest);
}
.video-soon {
  margin: 12px 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--forest-soft);
  color: var(--forest);
  font-size: 14.5px;
  text-align: center;
}

#visual, #video, #notes, #task, #check, #notebook-box { scroll-margin-top: calc(var(--header-h) + 56px); }

@media (max-width: 900px) {
  .tools-strip ul, .viz-steps, .viz-trio, .viz-compare, .soon-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .tools-strip ul, .viz-steps, .viz-trio, .viz-compare, .soon-grid {
    grid-template-columns: 1fr;
  }
  .visual { padding: 16px; }
}


/* ——— Restyle: dark theme in the nickvels.ru rhythm (own brand, own copy) ——— */
html { background: var(--bg); }
body {
  background:
    radial-gradient(900px 620px at 82% 8%, rgba(194, 65, 12, 0.38), transparent 58%),
    radial-gradient(640px 420px at 100% 0%, rgba(255, 130, 84, 0.22), transparent 50%),
    radial-gradient(720px 480px at 0% 100%, rgba(42, 16, 6, 0.55), transparent 60%),
    var(--bg);
}

.hero {
  min-height: calc(100svh - var(--header-h) - 24px);
  padding: 48px 0 88px;
  align-items: center;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.92;
  font-size: clamp(2.05rem, 4.8vw, 3.55rem);
  max-width: none;
  margin: 0 0 20px;
}
.hero .lede {
  font-size: 1.12rem;
  line-height: 1.5;
  max-width: 36rem;
  color: var(--muted);
}
.hero-bgword {
  position: absolute;
  left: -4%;
  bottom: -6%;
  top: auto;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(5.5rem, 18vw, 13rem);
  line-height: 0.76;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.055);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}
.hero { overflow: hidden; }
.hero > *:not(.hero-bgword) { position: relative; z-index: 1; }
.hero-bgword { position: absolute; z-index: 0; }
.kicker.pill {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: var(--acc);
}

.hero-stage {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-miniplayer,
.player {
  background:
    radial-gradient(900px 380px at 70% 0%, rgba(255, 130, 84, 0.45), transparent 55%),
    radial-gradient(700px 420px at 30% 110%, rgba(194, 65, 12, 0.55), transparent 60%),
    linear-gradient(165deg, #2A1006 0%, #0B0503 58%, #060606 100%);
  color: var(--ink);
}
.hero-miniplayer {
  border-radius: 0;
  aspect-ratio: auto;
  min-height: 148px;
  padding: 18px 22px 16px;
}
@media (min-width: 721px) {
  .hero-stage .hero-card { padding: 16px 20px 18px; }
  .hero-card ol { gap: 10px; }
}
.player { border-radius: var(--r-lg); }
.player .play,
.hero-miniplayer .play {
  border-color: rgba(244, 241, 234, 0.35);
  background: color-mix(in srgb, var(--acc) 18%, transparent);
  color: var(--ink);
}
.hero-miniplayer strong { font-family: var(--font-serif); font-weight: 700; letter-spacing: -0.03em; }

.card, .continue, .module > summary, .module-body, .tools-strip, .visual, .task, .check, .notes-box, .search, .donor, .chapters span {
  background: var(--paper);
  box-shadow: none;
}
.card {
  border-radius: var(--r);
  transition: transform .35s cubic-bezier(.16,1,.3,1), border-color .35s cubic-bezier(.16,1,.3,1), box-shadow .35s cubic-bezier(.16,1,.3,1);
}
.path-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--acc) 45%, var(--line));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.path-card::before { background: var(--acc); opacity: .85; width: 2px; }

.nav-cta {
  margin-left: 10px;
  background: var(--acc) !important;
  color: var(--acc-ink) !important;
  padding: 10px 16px !important;
  border-radius: var(--r) !important;
  font-family: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-cta:hover { background: var(--acc-hot) !important; color: var(--acc-ink) !important; }

.lesson-tabs a { border-radius: var(--r-sm); }
.badge { border-radius: var(--r-sm); font-family: var(--font-label); letter-spacing: 0.06em; text-transform: uppercase; font-size: 11px; }

.meta { color: var(--muted); }
.term h3 { font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; }

.notes-box textarea,
.search,
.opt {
  background: var(--bg);
  color: var(--ink);
}
.opt.picked { border-color: var(--acc); background: var(--forest-soft); }
.save-ok { color: var(--ok); }

.video-soon {
  background: var(--forest-soft);
  color: var(--ink);
}

.site-footer { color: var(--muted); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--acc); }

.path-block-title,
.tools-strip li strong,
.visual figcaption {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.03em;
}

@media (max-width: 720px) {
  .hero {
    min-height: 0;
    padding-top: 12px;
    padding-bottom: 72px;
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  /* offer (title + CTA) stays first on mobile; visual follows */
  .hero h1 { max-width: none; font-size: clamp(1.85rem, 11vw, 2.6rem); }
  .hero-bgword {
    display: block;
    left: -6%;
    bottom: auto;
    top: -0.15em;
    font-size: clamp(4.5rem, 28vw, 8rem);
    color: rgba(244, 241, 234, 0.05);
  }
  .nav-cta { margin: 8px 0 0; text-align: center; }
  .hero .btn-row .btn:first-child { flex: 1; }
}

/* ——— Lower page: premium bands (hero already set the bar) ——— */
.band {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
}
.band-tight { padding-top: 24px; }
.section-bgword {
  position: absolute;
  left: -2%;
  top: -0.12em;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(5.5rem, 18vw, 12rem);
  line-height: 0.76;
  letter-spacing: -0.07em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.045);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}
.band .wrap, .band .section-head, .band .stage-grid, .band .tool-grid { position: relative; z-index: 1; }
.section-head-display { margin-bottom: 40px; max-width: 40rem; }
.section-head-display h2 {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.95;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  max-width: 16ch;
}

/* Path rail sits in the same band as stages */
.path-section { padding: 8px 0 28px; }
.path-group-head { margin-bottom: 8px; }

.stage-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 22px;
  margin-top: 36px;
  align-items: stretch;
}
.stage {
  position: relative;
  background:
    radial-gradient(800px 280px at 100% 0%, rgba(255, 107, 53, 0.10), transparent 55%),
    linear-gradient(180deg, #141418 0%, #0C0C0E 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 28px 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform .35s cubic-bezier(.16,1,.3,1), border-color .35s cubic-bezier(.16,1,.3,1), box-shadow .35s cubic-bezier(.16,1,.3,1);
}
.stage:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--acc) 40%, var(--line));
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}
.stage--b {
  background:
    radial-gradient(700px 320px at 0% 100%, rgba(255, 130, 84, 0.14), transparent 50%),
    linear-gradient(180deg, #16120F 0%, #0C0C0E 100%);
}
.stage-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.stage-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--acc) 16%, transparent);
  color: var(--acc);
  flex: none;
}
.stage-icon .ico { width: 26px; height: 26px; }
.stage-num {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(3.6rem, 7vw, 5.6rem);
  line-height: 0.8;
  letter-spacing: -0.07em;
  color: rgba(244, 241, 234, 0.10);
}
.stage h3 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0 0 8px;
  max-width: 14ch;
}
.stage .stage-lead { color: var(--muted); margin: 0 0 18px; font-size: 15.5px; line-height: 1.5; }
.stage-mods {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  border-top: 1px solid var(--line);
  flex: 1;
}
.stage-mods a {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 10px 12px;
  align-items: baseline;
  padding: 11px 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
}
.stage-mods a:hover { color: var(--ink); }
.stage-mods a:hover strong { color: var(--acc); }
.stage-mods .idx {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--acc);
}
.stage-mods strong { font-weight: 650; font-size: 15px; }
.stage-mods .meta { text-align: right; }
.stage-mods .prog {
  grid-column: 2 / -1;
  height: 3px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin-top: -6px;
  margin-bottom: 2px;
}
.stage-mods .prog > i { display: block; height: 100%; background: var(--acc); border-radius: inherit; }
.stage .btn { align-self: flex-start; margin-top: auto; }

/* Tools */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tool-card {
  background:
    radial-gradient(500px 180px at 0% 0%, rgba(255, 107, 53, 0.10), transparent 60%),
    var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px 24px;
  min-height: 100%;
  transition: transform .35s cubic-bezier(.16,1,.3,1), border-color .35s cubic-bezier(.16,1,.3,1);
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--acc) 40%, var(--line));
}
.tool-card .ico-wrap {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--acc) 14%, transparent);
  color: var(--acc);
  margin-bottom: 18px;
}
.tool-card .ico { width: 24px; height: 24px; }
.tool-card strong {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.tool-card span { color: var(--muted); font-size: 15.5px; line-height: 1.45; }

/* Diploma note */
.note-premium {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  background:
    linear-gradient(180deg, #141418, #0C0C0E);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 26px;
}
.note-premium .ico-wrap {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--acc) 14%, transparent);
  color: var(--acc);
}
.note-premium h3 { margin: 0 0 6px; text-transform: none; letter-spacing: -0.03em; }
.note-premium p { margin: 0; color: var(--muted); }

/* Author */
.band-author { padding-top: 72px; padding-bottom: 72px; }
.author-premium {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 36px 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.author-mono {
  width: 168px;
  height: 168px;
  border-radius: 40px;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 3.2rem;
  letter-spacing: -0.05em;
  color: var(--acc-ink);
  background:
    radial-gradient(120px 80px at 30% 20%, #FF8254, transparent 55%),
    linear-gradient(160deg, #FF6B35 0%, #C2410C 100%);
  box-shadow: 0 0 80px rgba(255, 107, 53, 0.28);
  flex: none;
}
.author-premium h2 {
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.92;
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin: 0 0 16px;
  max-width: 12ch;
}
.author-premium .lede { margin-bottom: 22px; }
.author-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.author-facts li {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 12px;
}

/* CTA band */
.cta-band {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background:
    radial-gradient(800px 200px at 80% 0%, rgba(255, 107, 53, 0.16), transparent 55%),
    linear-gradient(180deg, #16120F, #0C0C0E);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 36px;
}
.cta-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cta-stats b {
  display: block;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(2.2rem, 4vw, 3rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: var(--acc);
}
.cta-stats b.ink { color: var(--ink); }
.cta-stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 12rem;
}

/* Support */
.band-support .support-box {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 1;
}
.band-support .lede { margin-bottom: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 96px;
  color: var(--muted);
  font-size: 14.5px;
  background: #070708;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px 32px;
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}
.footer-brand .brand {
  margin-bottom: 12px;
  display: inline-flex;
}
.footer-brand p { margin: 0; max-width: 22rem; line-height: 1.5; }
.footer-label {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.footer-col { list-style: none; margin: 0; padding: 0; }
.footer-col a, .footer-col li {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
}
.footer-col a:hover { color: var(--acc); }
.footer-legal {
  width: min(var(--max), calc(100% - 40px));
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

/* Lesson bottom + program */
.lesson-follow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 28px 0 8px;
  padding: 22px 22px;
  background: linear-gradient(180deg, #141418, #0C0C0E);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.lesson-follow p { margin: 6px 0 0; color: var(--muted); }
.task, .check, .notes-box {
  background:
    linear-gradient(180deg, #121216, #0C0C0E);
  box-shadow: none;
}
.prog-stage { margin: 8px 0 48px; }
.prog-stage > .stage-kicker-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.prog-stage > h2.stage-heading {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 0.95;
  margin: 0 0 22px;
  max-width: 16ch;
}
.prog-mod {
  background: linear-gradient(180deg, #141418, #0C0C0E);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin: 0 0 16px;
  overflow: hidden;
  transition: border-color .3s cubic-bezier(.16,1,.3,1);
}
.prog-mod:hover { border-color: color-mix(in srgb, var(--acc) 35%, var(--line)); }
.prog-mod-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  align-items: start;
  padding: 22px 24px 8px;
}
.prog-mod-head .prog-num {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 2.4rem;
  letter-spacing: -0.06em;
  line-height: 1;
  color: rgba(244, 241, 234, 0.16);
}
.prog-mod-head h2 {
  font-size: 1.25rem;
  text-transform: none;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 4px;
}
.prog-mod-head .lede { margin: 0 0 8px; font-size: 15px; }
.prog-mod .lesson-row { padding-inline: 24px; }
.prog-mod .lesson-row:last-child { margin-bottom: 8px; }

/* Assistant */
.assist-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px 0 14px;
  border: 0;
  border-radius: 18px;
  background: var(--acc);
  color: var(--acc-ink);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(255, 107, 53, 0.35);
}
.assist-fab .ico { width: 20px; height: 20px; }
.assist-fab:hover { background: var(--acc-hot); }
.assist-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 46;
  width: min(400px, calc(100vw - 32px));
  max-height: min(70vh, 640px);
  display: flex;
  flex-direction: column;
  background: #0C0C0E;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.assist-panel[hidden] { display: none !important; }
.assist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}
.assist-head h2 {
  margin: 0;
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: -0.03em;
}
.assist-close {
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.assist-lead {
  margin: 8px 16px 12px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}
.assist-log {
  flex: 1;
  overflow: auto;
  padding: 0 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.assist-msg {
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14.5px;
  line-height: 1.45;
}
.assist-msg.user {
  align-self: flex-end;
  background: color-mix(in srgb, var(--acc) 16%, transparent);
  color: var(--ink);
  max-width: 90%;
}
.assist-msg.bot {
  align-self: stretch;
  background: #141418;
  border: 1px solid var(--line);
}
.assist-msg a { color: var(--acc); }
.assist-msg a.btn { color: var(--acc-ink); }
.assist-msg a.btn:hover { color: var(--acc-ink); background: var(--acc-hot); }
.assist-msg a.btn-ghost { color: var(--ink); }
.assist-msg a.btn-ghost:hover { color: var(--acc); }
.assist-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.assist-suggest button, .assist-chip {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 550;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 10px;
  cursor: pointer;
  text-align: left;
}
.assist-suggest button:hover { border-color: var(--acc); color: var(--acc); }
.assist-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}
.assist-form input {
  flex: 1;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 0 12px;
  background: var(--bg);
  color: var(--ink);
}
.assist-form button { min-height: 48px; padding: 0 14px; border-radius: 14px; }

@media (max-width: 900px) {
  .stage-grid, .tool-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
  .author-premium { grid-template-columns: 1fr; gap: 24px; }
  .author-mono { width: 120px; height: 120px; font-size: 2.2rem; border-radius: 28px; }
}
@media (max-width: 720px) {
  .band { padding: 64px 0 56px; }
  .stage-grid, .tool-grid, .footer-grid, .author-premium, .note-premium { grid-template-columns: 1fr; }
  .cta-band, .lesson-follow, .band-support .support-box { flex-direction: column; align-items: flex-start; }
  .cta-band .btn, .lesson-follow .btn-row { width: 100%; }
  .footer-grid { width: min(var(--max), calc(100% - 28px)); }
  .footer-legal { width: min(var(--max), calc(100% - 28px)); }
  .assist-fab {
    right: 14px;
    bottom: 14px;
    width: 52px;
    min-height: 52px;
    padding: 0;
    justify-content: center;
    gap: 0;
    font-size: 0;
    letter-spacing: 0;
  }
  .assist-panel { right: 12px; left: 12px; width: auto; bottom: 76px; }
  body:has(.lesson-dock) .assist-fab { bottom: calc(148px + env(safe-area-inset-bottom)); }
  body:has(.lesson-dock) .assist-panel { bottom: calc(210px + env(safe-area-inset-bottom)); }
  body.assist-open .assist-panel { bottom: 16px; }
  body.assist-open:has(.lesson-dock) .assist-panel { bottom: calc(148px + env(safe-area-inset-bottom)); }
}
body.assist-open .assist-fab {
  opacity: 0;
  pointer-events: none;
}
body.assist-open .assist-panel { bottom: 20px; }
.assist-msg ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.assist-msg li { padding: 0; }
.assist-msg li p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }



/* Support buttons: author, Max, channel — icon + label, no raw URLs */
.support-actions { justify-content: flex-start; }
.support-link,
.footer-support {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.support-link .ico,
.footer-support .ico,
.btn-max .ico {
  width: 18px;
  height: 18px;
  flex: none;
}
.footer-support {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
}
.footer-support:hover { color: var(--acc); }
.footer-col .footer-support { display: inline-flex; }
.assist-msg .support-actions { margin-top: 10px; }
.assist-msg .support-actions .btn { min-height: 44px; padding: 0 14px; font-size: 12px; }
.author-premium .support-actions { margin-top: 22px; }
.band-support .support-actions { flex-shrink: 0; }

.max-gate {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  width: min(var(--read, 40rem), calc(100% - 40px));
  margin: 0 auto;
  padding: 80px 0 96px;
}
.max-gate .brand { margin-bottom: 28px; }
.max-gate h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.95;
}
.max-gate .lede { margin: 0 0 24px; max-width: 28rem; }
.max-gate .support-actions { margin-bottom: 20px; }
.max-gate .back { color: var(--muted); }
.max-gate .back:hover { color: var(--acc); }

/* ——— Сообщество, карта «как учиться», более плотная шапка ——— */
@media (max-width: 1080px) and (min-width: 721px) {
  .nav a { padding: 8px 8px; letter-spacing: 0.1em; }
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 10px 14px 14px;
    flex-direction: column;
    align-items: stretch;
    z-index: 40;
  }
  body.nav-open .nav { display: flex; }
  .nav a { min-height: 44px; display: flex; align-items: center; }
}

.howto {
  margin: 0 0 40px;
  padding: 28px 28px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  position: relative;
}
.howto-head { margin: 0 0 22px; max-width: 40rem; }
.howto-head .lede { margin: 8px 0 0; }
.howto-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}
.howto-steps {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 18px;
}
.howto-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}
.howto-steps .howto-n {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--acc);
  color: var(--acc-ink);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0;
}
.howto-steps strong {
  display: block;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 15px;
  margin: 2px 0 4px;
}
.howto-steps span { color: var(--muted); font-size: 14.5px; line-height: 1.45; }

.comm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 8px 0 0;
}
.comm-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  min-height: 148px;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 0 0 1px rgba(244, 241, 234, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.comm-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--acc) 55%, var(--line));
  color: var(--ink);
}
.comm-card .ico {
  width: 22px;
  height: 22px;
  color: var(--acc);
}
.comm-card strong {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.comm-card span { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.comm-more {
  margin: 18px 0 0;
  font-size: 14.5px;
}
.comm-more a { color: var(--acc); }
.comm-choose {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 28px;
}
.comm-choose article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.comm-choose h2 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  font-size: 1.15rem;
  line-height: 1.05;
}
.comm-choose p { margin: 0; color: var(--muted); }
.band-support .section-head-display { margin-bottom: 22px; }
.band-support .support-box { display: none; }

@media (max-width: 900px) {
  .howto-steps, .comm-grid, .comm-choose { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .howto { padding: 22px 18px 18px; }
  .howto-steps, .comm-grid, .comm-choose { grid-template-columns: 1fr; }
  .comm-card { min-height: 0; }
  .lesson-follow .btn-row { flex-wrap: wrap; }
}


/* Organic: FAQ, gifts, bonus, guides, breadcrumbs */
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
}
.crumbs li { display: inline; }
.crumbs li:not(:last-child)::after {
  content: "·";
  margin: 0 0.55em;
  color: var(--faint);
}
.crumbs [aria-current="page"] { color: var(--ink); }

.gift-band {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  align-items: center;
  justify-content: space-between;
  margin: 36px 0 28px;
  padding: 28px 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(1200px 180px at 0% 0%, color-mix(in srgb, var(--acc) 18%, transparent), transparent 70%),
    var(--bg-2);
}
.gift-band h2 { margin: 0 0 8px; font-family: var(--font-serif); font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.gift-band p { margin: 0; max-width: 40rem; color: var(--muted); }
.gift-copy { flex: 1 1 280px; }

.faq { margin: 36px 0 12px; }
.faq-list { display: grid; gap: 14px; margin-top: 16px; }
.faq-item {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.faq-item h3 { margin: 0 0 8px; font-size: 1.05rem; }
.faq-item p { margin: 0; color: var(--muted); }

.bonus-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.bonus-file {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: var(--paper);
  overflow-wrap: anywhere;
}
.bonus-file span { min-width: 0; }
.bonus-list, .faq, .faq-item, .library-slot, .gift-band, .guide-teaser { min-width: 0; overflow-wrap: anywhere; }
.bonus-file:hover { border-color: var(--line-strong); color: inherit; }
.bonus-file .ico { flex: 0 0 auto; margin-top: 2px; color: var(--acc); }
.bonus-file strong { display: block; }
.bonus-file .meta { display: block; margin-top: 4px; color: var(--muted); }

.library-slot {
  margin: 8px 0 28px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.library-slot h2 { margin: 0 0 8px; font-size: 1.25rem; }
.library-slot p { margin: 0 0 12px; color: var(--muted); }

.guide-index { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.guide-teaser {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: var(--paper);
}
.guide-teaser:hover { border-color: var(--line-strong); color: inherit; }
.guide-teaser strong { display: block; font-size: 1.15rem; margin-bottom: 8px; }
.guide-teaser span { display: block; color: var(--muted); }
.guide-teaser .meta { margin-top: 10px; color: var(--muted); }
.guide-next {
  margin-top: 36px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.guide-next h2 { margin: 0 0 8px; font-size: 1.25rem; }

.lesson-extras {
  margin: 28px 0 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.lesson-extras h3 { margin: 0 0 8px; }
.lesson-extras p { margin: 0 0 14px; color: var(--muted); }

@media (max-width: 720px) {
  .gift-band { padding: 22px 18px; }
  .bonus-file, .guide-teaser, .library-slot, .faq-item { padding-left: 14px; padding-right: 14px; }
}
