:root {
  --paper: #f6f7f4;
  --surface: #ffffff;
  --muted: #edf0ea;
  --muted-2: #e2e7de;
  --ink: #1f2421;
  --ink-2: #626b63;
  --ink-3: #748075;
  --line: #dfe5db;
  --line-strong: #cbd4c7;
  --accent: #6f8a74;
  --accent-strong: #35523f;
  --accent-soft: #e5eee6;
  --danger: #8f5b52;
  --danger-soft: #f3e9e6;
  --code-bg: #eef1eb;
  --code-ink: #242923;
  --radius: 10px;
  --radius-sm: 7px;
  --sans: "Golos Text", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow: 0 1px 2px rgba(31, 36, 33, .04), 0 8px 24px rgba(31, 36, 33, .04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, pre, kbd { font-family: var(--mono); }
::selection { background: #dce6d7; color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.1rem, 4vw, 3rem); }
h2 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.35em; }
li { margin: .35em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { top: 12px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 250, 246, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1440px; margin: 0 auto; padding: 0 22px;
  height: 64px; display: flex; align-items: center; gap: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--accent-strong); color: #fff;
  font-family: var(--serif); font-size: 18px; line-height: 1;
}
.brand-text { font-family: var(--serif); font-size: 20px; letter-spacing: -.02em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; height: 38px;
}
.search input {
  border: 0; background: transparent; outline: none; width: 210px;
  padding: 0 12px; font-size: 14px;
}
.search input::placeholder { color: var(--ink-3); }
.search button {
  border: 0; background: transparent; color: var(--ink-2);
  padding: 0 12px; height: 100%; font-size: 16px;
}
.search button:hover { color: var(--accent-strong); background: var(--muted); }
.search-large { height: 46px; max-width: 620px; }
.search-large input { width: 100%; font-size: 16px; }
.search-large button { padding: 0 18px; border-left: 1px solid var(--line); }

.user-menu { position: relative; }
.user-button {
  display: flex; align-items: center; gap: 9px;
  background: transparent; border: 1px solid transparent;
  border-radius: 9px; padding: 4px 8px 4px 4px; text-align: left;
}
.user-button:hover { background: var(--muted); border-color: var(--line); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong);
  font-weight: 600; font-size: 13px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta strong { font-size: 13px; font-weight: 600; }
.user-meta small { font-size: 11px; color: var(--ink-2); }
.user-popover {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 190px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px;
}
.user-menu.open .user-popover { display: block; }
.user-popover a, .user-popover button {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 6px; border: 0; background: transparent;
  font-size: 14px; color: var(--ink);
}
.user-popover a:hover, .user-popover button:hover { background: var(--muted); text-decoration: none; }
.user-popover form { margin: 0; }
.menu-toggle {
  display: none; background: transparent; border: 1px solid var(--line);
  border-radius: 8px; width: 38px; height: 38px; font-size: 18px;
}
.mobile-search {
  display: none; width: 38px; height: 38px; place-items: center;
  border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2);
  font-size: 20px; line-height: 1;
}
.mobile-search:hover { background: var(--muted); color: var(--ink); text-decoration: none; }

/* ---------- buttons / pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 10px 16px; background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 500; line-height: 1.2;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--ink-3); background: var(--muted); }
.btn-primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: #43503f; border-color: #43503f; color: #fff; }
.btn-ghost { background: transparent; }
.btn-small { padding: 6px 10px; font-size: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--muted); border: 1px solid var(--line);
  color: var(--ink-2); font-size: 12px; line-height: 1.5; white-space: nowrap;
}
.pill-ok { background: var(--accent-soft); border-color: #d3dfce; color: var(--accent-strong); }
.text-link { color: var(--accent-strong); font-size: 14px; font-weight: 500; }
.text-link:hover { text-decoration: underline; }
.locked { color: var(--ink-3); }
.lock { font-size: 11px; opacity: .75; }
.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .015em;
  color: var(--ink-2); margin-bottom: 10px;
}
.eyebrow::before {
  content: ""; width: 16px; height: 1px; background: var(--accent); flex: none;
}
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 70ch; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.notice {
  padding: 11px 14px; border-radius: var(--radius-sm); margin: 0 0 18px;
  font-size: 14px; border: 1px solid var(--line);
}
.notice-ok { background: var(--accent-soft); border-color: #d3dfce; color: var(--accent-strong); }
.notice-error { background: var(--danger-soft); border-color: #e8cdc7; color: var(--danger); }

/* ---------- layout ---------- */
.app { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 286px minmax(0, 1fr); }
.main { min-width: 0; padding: 40px 48px 72px; max-width: 1120px; }
.main-wide { max-width: 1180px; margin: 0 auto; padding: 48px 28px 80px; }
.narrow { max-width: 760px; }
.section { margin-top: 64px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { margin-bottom: 0; }
.page-head { margin-bottom: 28px; }
.page-head h1 { margin-bottom: .3em; }

/* ---------- sidebar ---------- */
.sidebar {
  position: sticky; top: 64px; align-self: start;
  height: calc(100vh - 64px); overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 26px 18px 40px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.45), transparent 220px);
  scrollbar-width: thin;
}
.sidebar-head { padding: 0 6px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.sidebar-course { display: block; font-family: var(--serif); font-size: 17px; line-height: 1.3; color: var(--ink); }
.sidebar-course:hover { text-decoration: none; color: var(--accent-strong); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 7px; color: var(--ink-2); font-size: 14px;
}
.nav-link:hover { background: var(--muted); color: var(--ink); text-decoration: none; }
.nav-link.active { background: var(--surface); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.nav-section {
  margin: 22px 10px 7px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: .015em; font-weight: 600; color: var(--ink-3);
}
.nav-block { margin: 2px 0; }
.nav-block summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 7px; color: var(--ink-2); font-size: 13px; font-weight: 500;
}
.nav-block summary::-webkit-details-marker { display: none; }
.nav-block summary::before { content: "›"; color: var(--ink-3); transition: transform .15s ease; }
.nav-block[open] summary::before { transform: rotate(90deg); }
.nav-block summary:hover { background: var(--muted); color: var(--ink); }
.nav-block summary small { margin-left: auto; color: var(--ink-3); font-weight: 400; }
.nav-works { margin: 2px 0 8px 10px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav-work { margin: 1px 0; }
.nav-work > a {
  display: block; padding: 5px 8px; border-radius: 6px;
  color: var(--ink-2); font-size: 13px; line-height: 1.35;
}
.nav-work > a:hover { background: var(--muted); color: var(--ink); text-decoration: none; }
.nav-work.current > a { color: var(--ink); font-weight: 600; }
.nav-sub { display: flex; gap: 4px; margin: 2px 0 6px 8px; }
.nav-sub a {
  padding: 3px 7px; border-radius: 5px; font-size: 11px; color: var(--ink-3);
  border: 1px solid transparent;
}
.nav-sub a:hover { background: var(--muted); color: var(--ink); text-decoration: none; }
.nav-sub a.active { color: var(--accent-strong); border-color: #d3dfce; background: var(--accent-soft); }
.badge {
  margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent-strong); color: #fff; font-size: 10px; line-height: 18px; text-align: center;
}
.nav-logout { margin: 2px 0 0; }
.nav-logout button {
  width: 100%; text-align: left; background: transparent; border: 0;
  padding: 8px 10px; border-radius: 7px; color: var(--ink-2); font-size: 14px;
}
.nav-logout button:hover { background: var(--muted); color: var(--ink); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 26px 28px; display: flex; justify-content: space-between; gap: 18px;
  max-width: 1440px; margin-left: auto; margin-right: auto;
  color: var(--ink-2); font-size: 13px;
}
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--ink); }

/* ---------- home ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 48px; align-items: center; padding: 26px 0 12px;
}
.hero h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); margin-bottom: .12em; }
.hero .lead { font-size: 1.16rem; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-note { display: flex; align-items: center; gap: 9px; margin-top: 22px; color: var(--ink-2); font-size: 13px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.hero-card::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 160px; height: 160px;
  border-radius: 50%; background: var(--accent-soft); opacity: .55;
}
.hero-card h2 { font-size: 1.55rem; margin-bottom: .2em; }
.hero-card p { color: var(--ink-2); font-size: 14px; }
.hero-card-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 22px; position: relative; z-index: 1; }
.hero-card-list span {
  font-size: 12px; padding: 4px 9px; border-radius: 999px;
  background: var(--muted); color: var(--ink-2); border: 1px solid var(--line);
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step-num { font-family: var(--serif); font-size: 1.6rem; color: var(--accent); display: block; margin-bottom: 8px; }
.step-card h3 { margin-bottom: .35em; }
.step-card p { color: var(--ink-2); font-size: 14px; margin: 0; }
.blocks-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.block-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; color: var(--ink);
  transition: border-color .15s ease, transform .15s ease;
}
.block-card:hover { text-decoration: none; border-color: var(--line-strong); transform: translateY(-1px); }
.block-card h3 { margin-bottom: .4em; }
.block-card p { color: var(--ink-2); font-size: 14px; min-height: 3.3em; }
.block-meta { font-size: 13px; color: var(--accent-strong); }

/* ---------- course / block ---------- */
.course-hero {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  gap: 40px; align-items: start; padding: 12px 0 8px; border-bottom: 1px solid var(--line);
}
.course-aside { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; font-size: 14px; }
.course-aside p { color: var(--ink-2); }
.course-list { display: grid; gap: 16px; }
.course-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 26px; color: var(--ink);
}
.course-card:hover { text-decoration: none; border-color: var(--line-strong); }
.course-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.course-card h2 { margin: .2em 0 .35em; }
.course-card p { color: var(--ink-2); }
.course-card-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--ink-2); font-size: 13px; margin: 16px 0; }
.program-block { margin-top: 34px; }
.program-block-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.program-block-head h3 { margin: .15em 0 .35em; }
.program-block-head p { color: var(--ink-2); font-size: 14px; margin: 0; max-width: 70ch; }
.program-list { display: flex; flex-direction: column; }
.program-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.program-num { font-family: var(--serif); font-size: 1.25rem; color: var(--ink-3); }
.program-title { font-weight: 600; font-size: 16px; color: var(--ink); }
.program-goal { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.program-links { display: flex; gap: 12px; font-size: 13px; white-space: nowrap; padding-top: 2px; }
.work-list { display: flex; flex-direction: column; }
.work-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.work-num { font-family: var(--serif); font-size: 1.35rem; color: var(--ink-3); }
.work-row-title { font-weight: 600; font-size: 16px; color: var(--ink); }
.work-row-main p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.work-row-links { display: flex; gap: 14px; font-size: 13px; white-space: nowrap; }

/* ---------- work ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 7px; color: var(--ink-3); font-size: 12px; margin-bottom: 20px; }
.crumbs a { color: var(--ink-2); }
.work-head { margin-bottom: 20px; }
.work-head h1 { margin-bottom: .2em; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 22px 0 28px; }
.tab {
  padding: 10px 16px; border-bottom: 2px solid transparent; color: var(--ink-2);
  font-size: 14px; font-weight: 500; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.active { color: var(--ink); border-bottom-color: var(--accent-strong); }
.prose { max-width: 78ch; }
.prose h2 { font-size: 1.45rem; margin-top: 2.1em; padding-top: .2em; }
.prose h3 { font-size: 1.1rem; margin-top: 1.6em; }
.prose p, .prose li { color: #36352e; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li::marker { color: var(--ink-3); }
.prose > .content-section:first-child h2 { margin-top: 0; }
.content-section { margin-bottom: 2.2rem; }
.content-section h2 { scroll-margin-top: 84px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: #c9c3b6; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose blockquote {
  margin: 1.4em 0; padding: 14px 18px; border-left: 3px solid var(--accent);
  background: var(--surface); color: var(--ink-2); border-radius: 0 8px 8px 0;
}
.prose code {
  background: var(--code-bg); border: 1px solid var(--muted-2);
  padding: 1px 5px; border-radius: 5px; font-size: .88em;
}
.prose pre {
  background: var(--code-bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px; overflow-x: auto;
  font-size: 13.5px; line-height: 1.55; margin: 1.2em 0; position: relative;
}
.prose pre code { background: transparent; border: 0; padding: 0; font-size: inherit; }
.chroma { background: transparent !important; }
.highlight { margin: 1.2em 0; }
.highlight pre { margin: 0; }
.code-copy {
  position: absolute; top: 8px; right: 8px; border: 1px solid var(--line);
  background: rgba(255,255,255,.75); color: var(--ink-2); border-radius: 5px;
  font-size: 10px; padding: 3px 7px; opacity: 0; transition: opacity .15s ease;
}
pre:hover .code-copy { opacity: 1; }
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.prose table, .data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose table th, .data-table th {
  text-align: left; font-weight: 600; color: var(--ink-2); background: var(--muted);
  padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.prose table td, .data-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose table tr:last-child td, .data-table tr:last-child td { border-bottom: 0; }
.prose table code { white-space: nowrap; }
.next-cta {
  display: flex; align-items: center; gap: 16px; margin-top: 36px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.tasks .content-section ol > li { margin: .9em 0; padding-left: .2em; }
.tasks .content-section ol > li > p { margin: .25em 0; }
.tasks .content-section ol > li > pre { margin: .7em 0; }
.checkpoint { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.checkpoint h2 { margin-top: 0; }
.memo-details, .reference, .telegram-copy {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 0 0 18px; padding: 0;
}
.memo-details summary, .reference summary, .telegram-copy > summary {
  cursor: pointer; padding: 13px 16px; font-size: 14px; font-weight: 500;
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.memo-details summary::-webkit-details-marker, .reference summary::-webkit-details-marker, .telegram-copy > summary::-webkit-details-marker { display: none; }
.memo-details[open] summary, .reference[open] summary, .telegram-copy[open] > summary { border-bottom: 1px solid var(--line); }
.memo-details .table-wrap { margin: 0; border: 0; border-radius: 0 0 var(--radius) var(--radius); }
.reference { padding-bottom: 8px; }
.reference h3, .reference pre, .reference p, .reference ul { margin-left: 16px; margin-right: 16px; }
.task-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 24px; }
.task-actions .telegram-copy { margin: 0; flex: 1 1 320px; }
.telegram-copy > summary { padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.telegram-copy[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.copy-box { padding: 14px; }
.copy-box textarea {
  width: 100%; min-height: 180px; resize: vertical;
  background: var(--muted); border: 1px solid var(--line); border-radius: 6px;
  padding: 12px; font-family: var(--mono); font-size: 12px; line-height: 1.5;
}
.copy-box .btn { margin-top: 10px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.pager a:hover { text-decoration: none; border-color: var(--line-strong); }
.pager span { font-size: 12px; color: var(--ink-2); }
.pager strong { font-size: 14px; font-weight: 600; }
.pager-next { text-align: right; }

/* ---------- search ---------- */
.search-results { display: flex; flex-direction: column; }
.search-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.search-row-head { display: flex; flex-direction: column; gap: 3px; }
.search-title { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.search-row p { color: var(--ink-2); font-size: 14px; margin: 8px 0; }
.search-links { display: flex; gap: 14px; font-size: 13px; }
.empty { padding: 40px; text-align: center; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ---------- auth ---------- */
.auth-page { display: flex; justify-content: center; padding: 40px 0; }
.auth-card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 34px; box-shadow: var(--shadow); }
.auth-card-wide { max-width: 560px; }
.auth-card h1 { font-size: 2rem; margin-bottom: .3em; }
.auth-card h2 { font-size: 1.15rem; }
.auth-switch { margin: 18px 0 0; font-size: 14px; color: var(--ink-2); }
.auth-switch a { font-weight: 500; }
.auth-step { margin: 22px 0; padding: 18px; background: var(--muted); border-radius: var(--radius-sm); }
.identity-chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 14px 0 18px;
  background: var(--accent-soft); border: 1px solid #d3dfce; color: var(--accent-strong);
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
}
.dev-code { margin: 14px 0; padding: 12px 14px; background: var(--muted); border: 1px dashed var(--line-strong); border-radius: 7px; font-size: 14px; }
.dev-code strong { font-family: var(--mono); letter-spacing: .12em; }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.form input, .form select, .form textarea {
  border: 1px solid var(--line-strong); border-radius: 7px; background: var(--paper);
  padding: 10px 12px; font-size: 15px; color: var(--ink); outline: none;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(111, 138, 116, .16); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 14px; }
.form-row label { flex: 1 1 180px; }
.form .check { flex-direction: row; align-items: flex-start; gap: 9px; font-weight: 400; color: var(--ink-2); line-height: 1.45; }
.form .check input { margin-top: 3px; width: 16px; height: 16px; }
.filter-row { margin: 0 0 20px; }
.filter-row label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.filter-row select, .inline-form select { border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); padding: 7px 10px; }
.inline-form { display: flex; align-items: center; gap: 6px; margin: 0; }

/* ---------- panels / settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 1.2rem; margin-bottom: .6em; }
.panel p:last-child { margin-bottom: 0; }
.definition { margin: 0; display: flex; flex-direction: column; gap: 9px; }
.definition > div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; font-size: 14px; }
.definition dt { color: var(--ink-2); }
.definition dd { margin: 0; }
.method-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.method-row:last-child { border-bottom: 0; }
.method-row p { margin: 2px 0 0; }
.quick-links { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.totp-setup { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px; }
.secret { display: inline-block; margin-top: 6px; padding: 7px 10px; background: var(--muted); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; word-break: break-all; }

/* ---------- staff ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 26px; }
.stat-card { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.stat-card:hover { text-decoration: none; border-color: var(--line-strong); }
.stat-num { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--accent-strong); }
.stat-card span:last-child { font-size: 12px; color: var(--ink-2); }
.request-list { display: flex; flex-direction: column; }
.request-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.request-name { font-weight: 600; }
.request-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--ink-2); font-size: 12px; margin-top: 3px; }
.request-actions { display: flex; gap: 8px; flex-shrink: 0; }
.request-actions form { margin: 0; }
.data-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.data-table th { background: var(--muted); }
.data-table td { font-size: 13px; }

/* ---------- typography helpers ---------- */
.prose > h2:first-child { margin-top: 0; }
.prose ol > li > p:first-child { margin-top: 0; }
.prose .task-example { color: var(--ink-2); }
.mono { font-family: var(--mono); }
.center { text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .app { grid-template-columns: 250px minmax(0, 1fr); }
  .main { padding: 32px 30px 60px; }
  .sidebar { padding-left: 16px; padding-right: 14px; }
  .hero { gap: 30px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .topbar-inner { height: 58px; padding: 0 16px; gap: 12px; }
  .brand-text { font-size: 18px; }
  .search input { width: 140px; }
  .user-meta { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .app { display: block; }
  .sidebar {
    display: none; position: fixed; z-index: 50; top: 58px; left: 0;
    width: min(86vw, 330px); height: calc(100vh - 58px);
    background: var(--paper); border-right: 1px solid var(--line);
    box-shadow: 0 20px 60px rgba(31,36,33,.18);
  }
  .sidebar.open { display: block; }
  .main { padding: 26px 18px 56px; }
  .main-wide { padding: 32px 18px 60px; }
  .hero, .course-hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.5rem, 10vw, 3.6rem); }
  .steps, .blocks-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .section { margin-top: 44px; }
  .program-row { grid-template-columns: 36px minmax(0, 1fr); }
  .program-links { grid-column: 2; padding-top: 0; }
  .work-row { grid-template-columns: 38px minmax(0, 1fr); }
  .work-row-links { grid-column: 2; }
  .footer { flex-direction: column; padding: 22px 18px; }
  .auth-page { padding: 20px 0; }
  .auth-card { padding: 26px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .request-row { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .search { display: none; }
  .mobile-search { display: inline-grid; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .topbar-actions .btn-primary { display: none; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
  .task-actions { align-items: stretch; }
  .task-actions .telegram-copy { flex: 1 1 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero-card { padding: 20px; }
  .method-row { align-items: flex-start; }
}

/* ---------- print ---------- */
@media print {
  .topbar, .sidebar, .footer, .tabs, .task-actions, .pager, .next-cta, .crumbs, .menu-toggle { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .app { display: block; }
  .main { max-width: none; padding: 0; }
  .prose { max-width: none; }
  .content-section { break-inside: avoid; }
  .memo-details, .reference, .telegram-copy { border: 0; }
  .memo-details > summary, .reference > summary, .telegram-copy > summary { display: none; }
  .memo-details .table-wrap, .reference { display: block; }
  a { color: #000; text-decoration: none; }
  .work-head { margin-bottom: 12pt; }
}

/* ---------- portal / progress ---------- */
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 0 6px 16px; margin-bottom: 14px; border-bottom: 1px solid var(--line);
}
.sidebar-user .avatar { width: 36px; height: 36px; font-size: 14px; }
.sidebar-user-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sidebar-user-meta strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-meta small { font-size: 11px; color: var(--ink-2); }
.sidebar-user.guest .avatar { background: var(--muted); color: var(--ink-3); }
.sidebar-progress { padding: 0 6px 14px; margin-bottom: 6px; }
.progress-label { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--ink-2); margin-bottom: 6px; }
.progress-label strong { color: var(--ink); font-weight: 600; }
.progress {
  display: block; width: 100%; height: 8px; border: 0; border-radius: 999px;
  background: var(--muted-2); overflow: hidden; appearance: none; color: var(--accent);
}
.progress::-webkit-progress-bar { background: var(--muted-2); border-radius: 999px; }
.progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.progress-lg { height: 12px; }
.nav-dashboard { background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; color: var(--ink); font-weight: 500; }
.nav-dashboard:hover { border-color: var(--line-strong); }
.nav-check { float: right; color: var(--accent); font-size: 11px; margin-left: 6px; }

.portal-hero {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 34px; align-items: stretch; padding: 10px 0 4px;
}
.portal-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.5rem); margin-bottom: .18em; }
.progress-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center;
}
.progress-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.progress-card-top strong { font-family: var(--serif); font-size: 2.2rem; line-height: 1; color: var(--accent-strong); }
.progress-card-top span { font-size: 12px; color: var(--ink-2); }
.progress-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.progress-stats div { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.progress-stats strong { font-family: var(--serif); font-size: 1.35rem; line-height: 1; }
.progress-stats span { font-size: 11px; color: var(--ink-2); }
.continue-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 24px 26px;
}
.continue-card h3 { margin: .2em 0 .35em; font-size: 1.4rem; }
.continue-card p { color: var(--ink-2); font-size: 14px; margin: 0 0 10px; max-width: 70ch; }
.continue-links { display: flex; gap: 8px; flex-shrink: 0; }
.work-badge { font-size: 12px; letter-spacing: .015em; color: var(--accent-strong); font-weight: 600; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.module-card {
  display: flex; flex-direction: column; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; color: var(--ink); transition: border-color .15s ease, transform .15s ease;
}
.module-card:hover { text-decoration: none; border-color: var(--line-strong); transform: translateY(-1px); }
.module-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.module-num { font-size: 12px; letter-spacing: .015em; color: var(--ink-2); font-weight: 600; }
.module-card h3 { margin: .5em 0 .35em; font-size: 1.25rem; }
.module-card p { color: var(--ink-2); font-size: 14px; min-height: 3.2em; }
.module-card .progress { margin: 6px 0 15px; }
.module-head-progress { display: flex; align-items: center; gap: 10px; }
.next-list { display: flex; flex-direction: column; }
.next-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.next-num { font-family: var(--serif); font-size: 1.2rem; color: var(--ink-3); }
.next-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.next-main a { font-weight: 600; color: var(--ink); }
.next-main span { font-size: 12px; color: var(--ink-2); }
.next-links { display: flex; gap: 14px; font-size: 13px; white-space: nowrap; }
.lesson-state {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--ink-3);
  font-family: var(--serif); font-size: 14px; flex-shrink: 0;
}
.lesson-state.done { background: var(--accent-soft); border-color: #d3dfce; color: var(--accent-strong); }
.lesson-state.started { border-color: var(--accent); color: var(--accent-strong); }
.lesson-row .lesson-state { margin-top: 2px; }
.lesson-steps { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.lesson-step { padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; }
.lesson-step.active { background: var(--surface); border-color: var(--line); color: var(--ink); }
.lesson-step.done { color: var(--accent-strong); background: var(--accent-soft); border-color: #d3dfce; }
.lesson-step-line { width: 24px; height: 1px; background: var(--line-strong); }
.complete-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  margin: 28px 0 10px; padding: 20px 22px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.complete-panel strong { display: block; font-size: 15px; }
.complete-panel p { color: var(--ink-2); font-size: 13px; margin: 4px 0 0; max-width: 60ch; }
.complete-panel.is-done { background: var(--accent-soft); border-color: #d3dfce; }
.complete-panel form { margin: 0; flex-shrink: 0; }
.block-progress { max-width: 420px; margin-top: 18px; }

@media (max-width: 1100px) {
  .portal-hero { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .continue-card { flex-direction: column; align-items: flex-start; }
  .continue-links { width: 100%; }
  .next-row { grid-template-columns: 32px minmax(0, 1fr); }
  .next-links { grid-column: 2; }
  .complete-panel { flex-direction: column; align-items: flex-start; }
  .lesson-steps { gap: 6px; }
  .lesson-step-line { width: 12px; }
}

/* ---------- task board ---------- */
.tasks .content-section ol {
  counter-reset: task; list-style: none; padding-left: 0; margin: 1.2em 0;
}
.tasks .content-section ol > li {
  counter-increment: task; position: relative;
  margin: 10px 0; padding: 15px 18px 15px 58px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .15s ease, transform .15s ease;
}
.tasks .content-section ol > li:hover { border-color: var(--line-strong); }
.tasks .content-section ol > li::before {
  content: counter(task); position: absolute; left: 16px; top: 15px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--muted); border: 1px solid var(--line);
  font-family: var(--serif); font-size: 13px; color: var(--ink-2);
}
.tasks .content-section ol > li > p { margin: 4px 0; font-size: 14px; color: var(--ink-2); }
.tasks .content-section ol > li > p:first-child { margin-top: 0; font-size: 15px; color: var(--ink); font-weight: 600; line-height: 1.45; }
.tasks .content-section ol > li > pre { margin: 9px 0; }
.tasks .content-section ol > li > ul, .tasks .content-section ol > li > ol { margin: 6px 0; }
.tasks .content-section ol > li code { background: var(--code-bg); }
.tasks .checkpoint ol > li { padding-left: 18px; }
.tasks .checkpoint ol > li::before { display: none; }
.module-progress { width: 150px; }
@media (max-width: 860px) { .module-head-progress .module-progress { display: none; } }
.top-link { font-size: 13px; color: var(--ink-2); padding: 7px 10px; border-radius: 7px; white-space: nowrap; }
.top-link:hover { background: var(--muted); color: var(--ink); text-decoration: none; }
@media (max-width: 860px) { .top-link { display: none; } }

/* Distinctive structural touches: a faint drafting grid behind the portal hero,
   and a module spine on the dashboard cards. */
.portal-hero {
  border-radius: 18px;
  padding: 8px 0;
}
.module-card { border-top: 3px solid var(--accent); }
.module-card:nth-child(2) { border-top-color: #9aa7a0; }
@media (max-width: 860px) { .portal-hero { padding: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ---------- module landing ---------- */
.module-hero {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 36px; align-items: start; padding: 10px 0 28px; border-bottom: 1px solid var(--line);
}
.module-hero h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.module-progress-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; box-shadow: var(--shadow);
}
.module-progress-card .progress { margin: 14px 0 12px; }
.module-progress-card .progress-card-top { margin-bottom: 0; }
.outcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.outcome-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px;
}
.outcome-check {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; flex: none; margin-top: 2px;
}
.outcome-card p { margin: 0; font-size: 14px; color: var(--ink-2); }
.term-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.term-title { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px;
  background: var(--muted); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px;
}
.chip-code { font-family: var(--mono); font-size: 11.5px; color: var(--ink); }
.module-route { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.route-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 16px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line);
}
.route-main { min-width: 0; }
.route-title { display: block; font-weight: 600; color: var(--ink); font-size: 15px; }
.route-main p { margin: 3px 0 0; color: var(--ink-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.route-time { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.route-links { display: flex; gap: 12px; font-size: 13px; white-space: nowrap; }
.module-final {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 26px;
}
.module-final h2 { margin: .25em 0 .4em; }
.module-final p { color: var(--ink-2); margin: 0; max-width: 70ch; }
.module-final .btn { flex-shrink: 0; }
.module-next { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }
@media (max-width: 1100px) {
  .module-hero { grid-template-columns: 1fr; }
  .outcome-grid, .term-groups { grid-template-columns: 1fr; }
  .module-final { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 860px) {
  .route-row { grid-template-columns: 30px minmax(0, 1fr); }
  .route-time { grid-column: 2; }
  .route-links { grid-column: 2; }
}

/* ---------- lesson shell ---------- */
.lesson-intro {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 28px; margin: 0 0 32px; padding: 22px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.lesson-intro h2 { font-size: 1.25rem; margin-bottom: .5em; }
.lesson-intro .outcome-list { margin-bottom: 0; }
.lesson-intro-side { border-left: 1px solid var(--line); padding-left: 24px; }
.outcome-list { list-style: none; padding: 0; margin: 0 0 16px; }
.outcome-list li { position: relative; padding-left: 20px; margin: 6px 0; font-size: 14px; color: var(--ink-2); }
.outcome-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-strong); font-size: 12px; }
.lesson-summary {
  margin-top: 38px; padding: 24px; background: var(--accent-soft);
  border: 1px solid #d3dfce; border-radius: var(--radius);
}
.lesson-summary h2 { font-size: 1.3rem; margin-bottom: .7em; }
.lesson-summary .hero-actions { margin-top: 18px; }
.task-intro {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin: 0 0 22px; padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.task-intro p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 70ch; }
@media (max-width: 860px) {
  .lesson-intro { grid-template-columns: 1fr; padding: 18px; }
  .lesson-intro-side { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 16px; }
  .task-intro { align-items: flex-start; flex-direction: column; }
}
.module-map {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--radius);
  padding: 20px 22px; max-width: 80ch;
}
.module-map p { margin: 0; color: var(--ink-2); }
.requirement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.requirement { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.requirement p { margin: 0; font-size: 14px; color: var(--ink-2); }
.requirement-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 7px; }
.glossary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.glossary-card { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 16px 18px; }
.glossary-card h3 { font-family: var(--sans); font-size: 14px; font-weight: 600; margin: 0 0 5px; }
.glossary-card p { margin: 0; font-size: 13px; color: var(--ink-2); }
.assessment { margin-top: 30px; padding: 20px 22px; background: var(--muted); border: 1px solid var(--line); border-radius: var(--radius); }
.assessment p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 80ch; }
@media (max-width: 860px) {
  .requirement-grid, .glossary-grid { grid-template-columns: 1fr; }
}
.lesson-toc {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0 0 26px; padding: 10px 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
}
.lesson-toc-label { font-size: 11px; font-weight: 600; color: var(--ink-3); margin-right: 4px; }
.lesson-toc a { font-size: 12px; color: var(--ink-2); padding: 3px 7px; border-radius: 5px; }
.lesson-toc a:hover { background: var(--muted); color: var(--ink); text-decoration: none; }
.content-section h2 { scroll-margin-top: 84px; }
