.mindmap-page {
  --mm-bg: #171a1e;
  --mm-panel: #22262c;
  --mm-line: #393e46;
  --mm-text: #f5f5f2;
  --mm-muted: #aeb4bf;
  --mm-gold: #efc66d;
  --mm-mint: #89d6b7;
  --mm-coral: #f29581;
  --mm-lilac: #b7a1f0;
  color: var(--mm-text);
  background: var(--mm-bg);
  font-size: 16px;
  line-height: 1.5;
  scrollbar-color: #727b89 var(--mm-bg);
  scrollbar-width: auto;
}
.mindmap-page [hidden] { display: none !important; }
.mindmap-page :is(button, a, summary, label) { cursor: pointer; }
.mindmap-page :is(button, a, summary, input, [tabindex]):focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 4px; }
.mindmap-page button { -webkit-tap-highlight-color: transparent; }
.mm-mint { --branch: var(--mm-mint); --branch-bg: #21352f; }
.mm-gold { --branch: var(--mm-gold); --branch-bg: #363022; }
.mm-coral { --branch: var(--mm-coral); --branch-bg: #3a2926; }
.mm-lilac { --branch: var(--mm-lilac); --branch-bg: #2e293e; }
.mm-article { padding: 0 28px 24px; }
.mm-intro { max-width: 1600px; margin: 0 auto; padding: 22px 0 26px; }
.mm-intro > div:first-child { display: flex; align-items: center; gap: 22px; }
.mm-back { color: var(--mm-muted); font-size: 12px; padding: 5px 0; transition: color 180ms; }
.mm-back:hover { color: var(--mm-gold); }
.mm-intro-tag { padding-left: 22px; border-left: 1px solid var(--mm-line); font-size: 10px; font-weight: 700; letter-spacing: .13em; color: var(--mm-gold); }
.mm-intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 14px; }
.mm-intro h1 { font-size: clamp(27px, 2.7vw, 40px); line-height: 1.2; letter-spacing: -.025em; }
.mm-intro h1 > span { color: var(--mm-gold); }
.mm-intro p { margin-top: 10px; color: var(--mm-muted); font-size: 15px; }
.mm-course-facts { display: flex; gap: 16px; white-space: nowrap; padding-bottom: 3px; color: var(--mm-muted); font-size: 12px; }
.mm-course-facts strong { color: var(--mm-text); font-family: var(--display); font-size: 17px; font-weight: 400; margin-right: 4px; }
.mm-workspace { position: relative; max-width: 1600px; margin: 0 auto; border: 1px solid var(--mm-line); border-radius: 12px; overflow: hidden; background: #1a1e23; isolation: isolate; scroll-margin-top: 94px; }
.mm-toolbar { position: relative; z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 60px; padding: 8px 16px; background: #20242a; border-bottom: 1px solid var(--mm-line); }
.mm-branch-nav { display: flex; align-items: center; gap: 6px; }
.mm-chip { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 12px; border: 1px solid transparent; border-radius: 6px; color: #ced2d9; background: transparent; font-size: 12px; font-weight: 700; transition: border-color 180ms, background 180ms, color 180ms; }
.mm-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--branch); }
.mm-chip:hover, .mm-chip.is-active { background: var(--branch-bg); color: var(--branch); border-color: var(--branch); }
.mm-toolbar-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.mm-text-button { border: 0; background: none; color: var(--mm-muted); min-height: 36px; padding: 6px; font-size: 12px; }
.mm-text-button:hover { color: var(--mm-text); }
.mm-fullscreen { display: grid; place-items: center; height: 36px; width: 36px; border: 1px solid var(--mm-line); border-radius: 6px; background: transparent; color: var(--mm-muted); font-size: 25px; }
.mm-fullscreen:hover, .mm-fullscreen[aria-pressed="true"] { color: var(--mm-gold); border-color: var(--mm-gold); }
.mm-map-shell { position: relative; height: max(530px, calc(100svh - 286px)); min-height: 530px; overflow: hidden; }
.mm-viewport { position: absolute; inset: 0; overflow: hidden; background-image: radial-gradient(#89929e26 .75px, transparent .75px); background-size: 22px 22px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.mm-viewport:focus-visible { outline-offset: -4px !important; }
.mm-viewport.is-dragging, .mm-viewport.is-dragging * { cursor: grabbing !important; }
.mm-scene { position: absolute; top: 0; left: 0; width: 0; height: 0; transform-origin: 0 0; will-change: transform; }
.mm-scene.is-moving { transition: transform 420ms var(--ease-out); }
.mm-connections { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.mm-connections path { fill: none; stroke: var(--branch); stroke-width: 1.8px; opacity: .64; vector-effect: non-scaling-stroke; transition: d 350ms var(--ease-out), opacity 250ms; }
.mm-node { position: absolute; left: 0; top: 0; width: 290px; border-radius: 10px; transition: transform 350ms var(--ease-out); color: var(--mm-text); }
.mm-node.is-entering { animation: mm-appear 350ms var(--ease-out); }
.mm-node-button { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 17px 20px; border: 1px solid var(--branch); border-radius: inherit; background: var(--branch-bg); text-align: left; transition: box-shadow 180ms, filter 180ms; }
.mm-node-button:hover { filter: brightness(1.16); box-shadow: 0 0 0 3px color-mix(in srgb, var(--branch) 12%, transparent); }
.mm-node-button:active { filter: brightness(1.3); }
.mm-node-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.mm-node-meta { display: block; margin-bottom: 7px; color: var(--branch); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.mm-node-title { display: block; font-size: 21px; font-weight: 700; line-height: 1.3; }
.mm-node-toggle { display: grid; place-items: center; flex: 0 0 23px; height: 23px; border: 1px solid color-mix(in srgb, var(--branch) 50%, transparent); border-radius: 50%; color: var(--branch); font-size: 17px; line-height: 1; }
.mm-node-count { display: block; margin-top: 7px; color: var(--mm-muted); font-size: 11px; }
.mm-node.is-selected > .mm-node-button { box-shadow: 0 0 0 4px color-mix(in srgb, var(--branch) 17%, transparent); }
.mm-node-root { width: 235px; padding: 26px 28px 24px; border: 1px solid #f6d58f; background: var(--mm-gold); color: #27251e; box-shadow: 0 12px 45px #0003; }
.mm-node-root small { display: block; margin-bottom: 11px; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.mm-node-root strong { display: block; font-family: var(--display); font-size: 28px; font-weight: 400; line-height: 1.16; }
.mm-node-root > span { display: block; margin-top: 13px; color: #564b33; font-size: 12px; }
.mm-node-module { width: 372px; display: flex; align-items: stretch; background: #22262c; border: 1px solid #585444; border-radius: 8px; }
.mm-node-module > .mm-node-button { min-height: 61px; padding: 11px 9px 11px 14px; flex: 1; width: auto; border: 0; background: transparent; box-shadow: none; }
.mm-node-module .mm-node-title { font-size: 18px; line-height: 1.35; }
.mm-node-module .mm-node-toggle { flex-basis: 20px; width: 20px; height: 20px; font-size: 14px; }
.mm-node-module .mm-node-index { color: var(--branch); font-size: 11px; font-weight: 700; }
.mm-node-module .mm-node-copy { flex-direction: row; align-items: center; gap: 10px; }
.mm-node-module.is-selected, .mm-node-module:hover { border-color: var(--branch); }
.mm-node-module.is-selected > .mm-node-button { box-shadow: none; }
.mm-node-module.is-complete { border-color: #97cfa7; }
.mm-node-module.is-complete .mm-node-index { color: #97cfa7; }
.mm-node-check { position: relative; display: grid; place-items: center; flex: 0 0 34px; margin: 6px 5px 6px 0; }
.mm-node-check input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; }
.mm-node-check > span { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #8c939e; border-radius: 4px; }
.mm-node-check:hover > span { border-color: #fff; }
.mm-node-check input:checked + span { color: #202a20; border-color: #97cfa7; background: #97cfa7; }
.mm-node-check input:checked + span::after { content: "✓"; font-size: 13px; font-weight: 700; }
.mm-node-check input:focus-visible + span { outline: 3px solid var(--mm-gold); outline-offset: 5px; }
.mm-node-leaf { width: 360px; padding: 15px 20px; border: 1px solid #464c55; border-left: 3px solid var(--branch); border-radius: 7px; background: #22262c; font-size: 17px; line-height: 1.45; user-select: text; -webkit-user-select: text; cursor: text; }
.mm-node-leaf .mm-node-title { font-size: 18px; }
.mm-node-leaf p { margin-top: 8px; color: var(--mm-muted); font-size: 15px; }
.mm-node-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; padding: 8px 12px; border: 1px solid var(--branch); border-radius: 5px; color: var(--branch); font-size: 15px; font-weight: 700; text-decoration: none; transition: background 180ms; }
.mm-node-link:hover { background: var(--branch-bg); }
.mm-source-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--mm-mint); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.mm-source-link:hover { color: var(--mm-text); }
.mm-node-leaf .mm-lesson-index { display: block; margin-bottom: 5px; color: var(--branch); font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.mm-map-label { position: absolute; top: 20px; left: 22px; display: flex; flex-direction: column; gap: 5px; pointer-events: none; color: #9fa7b3; font-size: 8px; letter-spacing: .2em; }
.mm-map-label > span:last-child { font-family: var(--display); font-size: 25px; color: #727b89; letter-spacing: -.04em; }
.mm-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mm-zoom-controls, .mm-pan-controls { position: absolute; z-index: 3; bottom: 18px; display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid #4a5059; border-radius: 8px; background: #23282ef2; box-shadow: 0 4px 20px #0002; }
.mm-zoom-controls { right: 18px; }
.mm-pan-controls { left: 18px; }
.mm-zoom-controls button, .mm-pan-controls button { min-width: 36px; height: 36px; border: 0; border-radius: 4px; background: transparent; font-size: 21px; color: var(--mm-text); }
.mm-zoom-controls button:hover, .mm-pan-controls button:hover { background: #ffffff15; color: var(--mm-gold); }
.mm-zoom-controls button:disabled { opacity: .3; cursor: default; }
.mm-zoom-controls [data-fit] { padding: 0 12px; font-size: 12px; font-weight: 700; }
.mm-zoom-controls [data-fit] > span { font-size: 18px; margin-left: 8px; }
.mm-zoom-value { min-width: 42px; text-align: center; color: var(--mm-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.mm-control-divider { width: 1px; height: 21px; margin-inline: 5px; background: var(--mm-line); }
.mm-workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; padding: 10px 18px; border-top: 1px solid var(--mm-line); background: #20242a; }
.mm-workspace-footer p { color: var(--mm-muted); font-size: 11px; }
.mm-progress { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #c8ced6; white-space: nowrap; }
.mm-progress-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mm-gold); }
.mm-progress progress { width: 60px; height: 3px; border: 0; border-radius: 2px; overflow: hidden; background: var(--mm-line); accent-color: var(--mm-gold); }
.mm-progress progress::-webkit-progress-bar { background: var(--mm-line); }
.mm-progress progress::-webkit-progress-value { background: var(--mm-gold); transition: width 200ms; }
.mm-progress progress::-moz-progress-bar { background: var(--mm-gold); }
.mm-bottom-note { display: flex; justify-content: space-between; gap: 20px; max-width: 1600px; margin: 15px auto 0; font-size: 11px; color: var(--mm-muted); }
.mm-bottom-note p { max-width: 800px; }
.mm-bottom-note a { flex-shrink: 0; color: var(--mm-gold); padding: 0 0 10px; }
.mm-bottom-note a:hover { text-decoration: underline; text-underline-offset: 4px; }
.mm-bottom-note a span { margin-left: 9px; }
.mm-outline { padding: 32px; max-width: 1000px; margin: auto; }
.mm-outline h2 { font-size: 28px; }
.mm-outline-intro { color: var(--mm-muted); margin-top: 14px; }
.mm-outline ul { list-style: none; padding-left: 24px; }
.mm-outline > ul { padding-left: 0; }
.mm-outline li { margin: 12px 0; }
.mm-outline summary { padding: 12px 0; font-weight: 700; }
.mm-outline summary small { margin-left: 14px; color: var(--mm-gold); font-size: 11px; }
.mm-outline li[data-kind="lesson"] { padding: 8px 0 8px 14px; border-left: 1px solid var(--mm-line); color: #ced3da; }
.mm-source-note { color: var(--mm-muted); margin: 7px 0 18px; }
.mm-source-check { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; color: var(--mm-mint); font-size: 13px; }
.mm-source-check input { accent-color: var(--mm-mint); width: 17px; height: 17px; }
.mm-workspace.is-expanded { position: fixed; inset: 12px; max-width: none; width: auto; margin: 0; z-index: 50; display: flex; flex-direction: column; }
.mm-workspace.is-expanded .mm-map-shell { flex: 1; min-height: 0; height: auto; }
.mm-workspace.is-expanded .mm-outline { flex: 1; overflow-y: auto; width: 100%; scrollbar-color: #727b89 var(--mm-bg); scrollbar-width: thin; }
.mm-workspace.is-expanded .mm-toolbar, .mm-workspace.is-expanded .mm-workspace-footer { flex-shrink: 0; }
body.mm-expanded { overflow: hidden; }
@keyframes mm-appear { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 1600px) { .mm-map-shell { min-height: 680px; } }
@media (max-width: 1100px) {
  .mm-course-facts { display: none; }
  .mm-chip { padding-inline: 8px; font-size: 11px; }
  .mm-article { padding-inline: 18px; }
}
@media (max-width: 760px) {
  .mm-article { padding: 0 12px 20px; }
  .mm-intro { padding: 16px 4px 20px; }
  .mm-intro > div:first-child { gap: 12px; }
  .mm-intro-tag { font-size: 8px; letter-spacing: .1em; padding-left: 12px; }
  .mm-intro-row { margin-top: 12px; }
  .mm-intro h1 { font-size: 27px; max-width: 440px; }
  .mm-intro p { font-size: 13px; max-width: 370px; }
  .mm-toolbar { align-items: stretch; flex-wrap: wrap; padding: 6px 10px; gap: 2px; }
  .mm-branch-nav { width: 100%; justify-content: space-between; gap: 0; }
  .mm-chip { font-size: 10px; min-height: 38px; padding-inline: 5px; gap: 5px; }
  .mm-chip i { width: 5px; height: 5px; }
  .mm-toolbar-actions { width: 100%; justify-content: space-between; border-top: 1px solid #ffffff08; padding-top: 3px; }
  .mm-text-button { font-size: 10px; }
  .mm-fullscreen { width: 30px; height: 30px; align-self: center; font-size: 21px; }
  .mm-map-shell { min-height: 350px; height: calc(100svh - 400px); }
  .mm-workspace-footer { align-items: flex-start; flex-direction: column; padding: 11px 13px; gap: 8px; }
  .mm-workspace-footer p { font-size: 10px; }
  .mm-progress { font-size: 10px; }
  .mm-map-label { top: 16px; left: 15px; font-size: 7px; }
  .mm-map-label span:last-child { font-size: 20px; }
  .mm-pan-controls { bottom: 70px; left: 12px; }
  .mm-zoom-controls { bottom: 14px; right: 12px; }
  .mm-pan-controls button { min-width: 29px; height: 29px; font-size: 17px; }
  .mm-bottom-note { padding-inline: 4px; flex-direction: column; gap: 10px; font-size: 10px; }
  .mm-outline { padding: 22px 16px; }
  .mm-outline h2 { font-size: 23px; }
  .mm-outline ul { padding-left: 13px; }
  .mm-outline summary small { display: block; margin-left: 0; }
  .mm-outline summary { font-size: 15px; }
  .mm-outline li[data-kind="lesson"] { font-size: 14px; }
  .mm-workspace.is-expanded { inset: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.mindmap-page) { scroll-behavior: auto; }
  .mindmap-page *, .mindmap-page *::before, .mindmap-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .mm-node, .mm-node-button, .mm-chip, .mm-node-check > span { border: 1px solid ButtonText; }
  .mm-connections path { stroke: CanvasText; }
  .mm-node-check input:checked + span { color: HighlightText; background: Highlight; }
}
@media print {
  .mindmap-page { color: #111; background: white; --mm-text: #111; --mm-muted: #444; --mm-line: #aaa; }
  .mindmap-page .site-header, .mindmap-page .site-footer, .mm-toolbar, .mm-map-shell, .mm-workspace-footer, .mm-source-check { display: none !important; }
  .mm-outline[hidden] { display: block !important; }
  .mm-workspace { border: 0; background: white; }
  .mm-outline details { break-inside: avoid; }
}
