/* ── Design tokens (guide-local copy for path-depth independence) ── */
:root {
  --bg:             #0C0C0A;
  --bg-surface:     #131311;
  --bg-raised:      #1A1A17;
  --text-primary:   #E8E4D8;
  --text-secondary: #8C8679;
  --text-muted:     #524F49;
  --accent:         #9AA8B8;
  --accent-warm:    #B8A88A;
  --border:         #252520;
  --border-soft:    #1E1E1B;

  --ease-hover:   cubic-bezier(0.4, 0, 0.2, 1);
  --dur-hover:    200ms;
  --dur-reveal:   600ms;

  --topbar-h:     60px;
  --sidebar-w:    272px;
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: 0.22;
  mix-blend-mode: overlay;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

p { margin: 0 0 1.25rem; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color var(--dur-hover) var(--ease-hover); }
a:hover { color: var(--text-primary); }

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

/* ── Top bar ────────────────────────────────────── */
.guide-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.guide-topbar__left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.guide-topbar__right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.guide-topbar__title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.guide-topbar__back {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--dur-hover) var(--ease-hover);
}

.guide-topbar__back:hover { color: var(--accent); }

.guide-topbar__search {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--dur-hover) var(--ease-hover);
}

.guide-topbar__search:hover { color: var(--accent); }

.guide-topbar__search svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.guide-progress-pill {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  min-width: 40px;
  text-align: center;
}

/* Sidebar toggle (hamburger) */
.guide-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
  color: var(--text-primary);
}

.guide-sidebar-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: currentColor;
  transition: transform var(--dur-hover) var(--ease-hover),
              opacity var(--dur-hover) var(--ease-hover);
}

/* ── Sidebar ────────────────────────────────────── */
.guide-sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--border);
  background: var(--bg);
  z-index: 150;
  transition: transform var(--dur-hover) var(--ease-hover);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.guide-sidebar::-webkit-scrollbar { width: 4px; }
.guide-sidebar::-webkit-scrollbar-track { background: transparent; }
.guide-sidebar::-webkit-scrollbar-thumb { background: var(--border); }

.guide-sidebar__inner {
  padding: 1.25rem 0 3rem;
}

/* Sidebar overlay (mobile) */
.guide-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(12, 12, 10, 0.7);
  opacity: 0;
  transition: opacity var(--dur-hover) var(--ease-hover);
  pointer-events: none;
}

.guide-sidebar-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Sidebar tree items ──────────────────────────── */
.sidebar-track {
  margin-bottom: 0.25rem;
}

.sidebar-track__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  transition: color var(--dur-hover) var(--ease-hover),
              background-color var(--dur-hover) var(--ease-hover);
}

.sidebar-track__header:hover { color: var(--text-primary); background: var(--bg-surface); }

.sidebar-track__arrow {
  font-size: 0.6rem;
  transition: transform var(--dur-hover) var(--ease-hover);
  color: var(--text-muted);
}

.sidebar-track.open .sidebar-track__arrow { transform: rotate(180deg); }

.sidebar-track__modules {
  display: none;
  flex-direction: column;
}

.sidebar-track.open .sidebar-track__modules { display: flex; }

.sidebar-module {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.25rem 0.45rem 1.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur-hover) var(--ease-hover),
              background-color var(--dur-hover) var(--ease-hover);
  border-left: 2px solid transparent;
  line-height: 1.3;
}

.sidebar-module:hover {
  color: var(--text-secondary);
  background: var(--bg-surface);
}

.sidebar-module.current {
  color: var(--text-primary);
  border-left-color: var(--accent);
  background: var(--bg-surface);
}

.sidebar-module__check {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0;
  flex-shrink: 0;
  width: 12px;
  text-align: center;
}

.sidebar-module__check.done { opacity: 1; color: var(--accent); }

.sidebar-module__title { flex: 1; }

/* ── Main content area ──────────────────────────── */
.guide-main {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  min-height: 100vh;
}

/* Guide without sidebar (landing page) */
.guide-main--full {
  margin-left: 0;
}

.guide-content {
  max-width: 680px;
  padding: 3.5rem 2.5rem 5rem;
}

/* ── Module page content ────────────────────────── */
.module-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

.module-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.module-section {
  margin-bottom: 3rem;
}

.module-section h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-soft);
}

.module-section .coming-soon {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.04em;
}

.module-section ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.module-section ul li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.module-section ul li:last-child { margin-bottom: 0; }

.module-section .concept {
  margin-bottom: 1.5rem;
}

.module-section .concept strong {
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.module-section .misconception {
  margin-bottom: 1.25rem;
}

.module-section .misconception:last-child { margin-bottom: 0; }

.module-section .resource-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.module-section .resource-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.module-section .resource-list li:last-child { border-bottom: none; }

.governance-lens {
  border-left: 3px solid var(--accent-warm);
  background: var(--bg-surface);
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

.governance-lens .module-eyebrow {
  color: var(--accent-warm);
  margin-bottom: 0.75rem;
}

.module-section .resource-list .rid {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-right: 0.5rem;
}

.module-next-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-decoration: none;
  margin-top: 0.25rem;
}

.module-next-link:hover { color: var(--text-primary); }

.module-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  margin-top: 3rem;
}

.module-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--dur-hover) var(--ease-hover);
}

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

/* ── Mark Complete button ────────────────────────── */
.btn-complete {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: none;
  border: 1px solid var(--border);
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: border-color var(--dur-hover) var(--ease-hover),
              color var(--dur-hover) var(--ease-hover);
  border-radius: 2px;
  margin: 2.5rem 0;
}

.btn-complete:hover { border-color: var(--accent); color: var(--accent); }

.btn-complete.is-complete {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Ghost button ────────────────────────────────── */
.btn-ghost {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 0.6rem 1.25rem;
  border-radius: 2px;
  text-decoration: none;
  transition: border-color var(--dur-hover) var(--ease-hover),
              color var(--dur-hover) var(--ease-hover);
  cursor: pointer;
  background: transparent;
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── Tags / pills ────────────────────────────────── */
.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: 0.04em;
}

.tag--accent {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Section label / meta ────────────────────────── */
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 1.5rem;
}

.meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Progress bar ─────────────────────────────────── */
.progress-bar-wrap {
  height: 2px;
  background: var(--border);
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 400ms var(--ease-hover);
}

/* ── Track grid (landing) ────────────────────────── */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  margin-top: 2.5rem;
}

.track-card {
  background: var(--bg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background-color var(--dur-hover) var(--ease-hover);
}

.track-card:hover { background: var(--bg-surface); }

.track-card__number {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.track-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}

.track-card__desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.track-card__meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: auto;
}

.track-card__progress-wrap {
  margin-top: 0.25rem;
}

/* ── Quiz ────────────────────────────────────────── */
.quiz-form {
  margin-top: 3rem;
}

.quiz-question {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.quiz-question:last-of-type { border-bottom: none; padding-bottom: 0; }

.quiz-question__label {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: block;
}

.quiz-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.quiz-option {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 2px;
  cursor: pointer;
  background: none;
  transition: border-color var(--dur-hover) var(--ease-hover),
              color var(--dur-hover) var(--ease-hover),
              background-color var(--dur-hover) var(--ease-hover);
  white-space: nowrap;
}

.quiz-option:hover { border-color: var(--accent); color: var(--accent); }

.quiz-option.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(154, 168, 184, 0.08);
}

.quiz-result {
  display: none;
  margin-top: 2.5rem;
  padding: 2rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.quiz-result.visible { display: block; }

.quiz-result__label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.quiz-result__track {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

/* ── Catalog ──────────────────────────────────────── */
.catalog-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.catalog-filter-select,
.catalog-search {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.45rem 0.85rem;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.04em;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color var(--dur-hover) var(--ease-hover);
}

.catalog-filter-select:hover,
.catalog-filter-select:focus,
.catalog-search:hover,
.catalog-search:focus {
  border-color: var(--accent);
  color: var(--text-primary);
}

.catalog-search {
  flex: 1 1 200px;
  min-width: 160px;
}

.catalog-search::placeholder { color: var(--text-muted); }

.catalog-clear {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.45rem 0.5rem;
  transition: color var(--dur-hover) var(--ease-hover);
}

.catalog-clear:hover { color: var(--accent); }

.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.catalog-item {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.catalog-item:first-child { padding-top: 0; }

.catalog-item__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.catalog-item__title a { color: var(--text-primary); }
.catalog-item__title a:hover { color: var(--accent); }

.catalog-item__meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.6rem;
}

.catalog-item__description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.catalog-empty {
  padding: 4rem 0;
  text-align: center;
}

.catalog-empty__text {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Glossary ─────────────────────────────────────── */
.glossary-alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.glossary-alpha-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--dur-hover) var(--ease-hover),
              color var(--dur-hover) var(--ease-hover);
}

.glossary-alpha-btn:hover { border-color: var(--accent); color: var(--accent); }
.glossary-alpha-btn.has-terms { color: var(--text-secondary); border-color: var(--border-soft); }

.glossary-group {
  margin-bottom: 2.5rem;
}

.glossary-group__letter {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.glossary-term-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-soft);
}

.glossary-term-row:last-child { border-bottom: none; }

.glossary-term-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.glossary-term-def {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Hover tooltip for glossary terms in module content */
.glossary-term {
  border-bottom: 1px dashed var(--text-muted);
  cursor: help;
  position: relative;
}

.glossary-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  max-width: 300px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  z-index: 300;
  pointer-events: none;
}

.glossary-term:hover .glossary-tooltip { display: block; }

/* ── Progress dashboard ───────────────────────────── */
.progress-global {
  margin-bottom: 3rem;
  padding: 2rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.progress-global__number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.progress-global__label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.progress-track-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.progress-track-row:last-child { border-bottom: none; }

.progress-track-row__info {
  flex: 1;
  min-width: 0;
}

.progress-track-row__title {
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-track-row__bar {
  flex: 0 0 160px;
}

.progress-track-row__pct {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 36px;
  text-align: right;
}

/* ── Landing page ────────────────────────────────── */
.guide-hero {
  padding: 5rem 2.5rem 4rem;
  max-width: 760px;
}

.guide-hero__eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: block;
}

.guide-hero__eyebrow a {
  color: var(--text-muted);
}

.guide-hero__eyebrow a:hover { color: var(--accent); }

.guide-hero__title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 1.25rem;
}

.guide-hero__body {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.guide-hero__progress {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0;
}

.guide-hero__progress-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 960px) {
  .guide-sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
    box-shadow: none;
  }

  .guide-sidebar.open {
    transform: translateX(0);
  }

  .guide-sidebar-overlay {
    display: block;
  }

  .guide-main {
    margin-left: 0;
  }

  .guide-sidebar-toggle {
    display: flex;
  }
}

@media (max-width: 640px) {
  .guide-content {
    padding: 2rem 1.25rem 4rem;
  }

  .guide-hero {
    padding: 3rem 1.25rem 3rem;
  }

  .catalog-filter-select { width: 100%; }
  .catalog-filters { flex-direction: column; align-items: stretch; }

  .progress-track-row { flex-wrap: wrap; }
  .progress-track-row__bar { flex: 1 1 100%; order: 3; }

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

  .quiz-options { flex-direction: column; }
  .quiz-option { text-align: left; }
}

/* ── Link utils ──────────────────────────────────── */
.link-underline {
  position: relative;
  color: var(--text-primary);
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--dur-hover) var(--ease-hover);
}

.link-underline:hover::after { width: 100%; }
.link-underline:hover { color: var(--text-primary); }

.link-mono {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.link-mono:hover { color: var(--text-primary); }

.link-back {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--dur-hover) var(--ease-hover);
}

.link-back:hover { color: var(--accent); }

/* ── Footer (guide) ──────────────────────────────── */
.guide-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.guide-footer__copy {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.guide-footer__links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
