/* MagicT: «бумажная» визитка. Кремовый лист, моноширинный шрифт, тёмный контур и жёсткая тень у кнопок. */
:root{
  --paper:#f4ebe0; --sheet:#f9f2e8; --card:#fcf7ef; --card-2:#f6eee3;
  --line:#ddd3c5; --line-strong:#c6bbac;
  --ink:#1d1b18; --ink-2:#3a3530; --muted:#6f6961; --muted-2:#8b847a;
  --edge:#1d1b18; --on-pop:#1d1b18; --tool-line:#34302b;
  --green:#cfe3b2; --mint:#dff0de; --orange:#fcdcbd; --violet:#e7ddf5; --rose:#f8d5cf;
  --tile:#ebe3f1; --tile-line:#d5c8e2;
  --sheen:rgba(255,255,255,.45); --shade:rgba(70,52,28,.14); --grid:#e2d6c5; --road:#a99d8c; --pill:#fffaf2;
  --pop:1.5px 2.5px 0 var(--edge);
  --soft:inset 0 1px 0 var(--sheen),0 1px 0 rgba(80,60,35,.05),0 10px 22px rgba(80,60,35,.06);
  --font:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --paper:#151310; --sheet:#1c1916; --card:#262220; --card-2:#201d19;
    --line:#35302a; --line-strong:#4a433a;
    --ink:#efe7da; --ink-2:#d6cdbf; --muted:#a39a8d; --muted-2:#837b70;
    --edge:#070605; --tool-line:#070605;
    --green:#bfd89e; --mint:#bcdcc2; --orange:#f0c79f; --violet:#cdbfe6; --rose:#eab8b0;
    --tile:#2b2535; --tile-line:#43395a;
    --sheen:rgba(255,255,255,.04); --shade:rgba(0,0,0,.4); --grid:#2c2722; --road:#6a6055; --pill:#f3eadc;
    --soft:inset 0 1px 0 var(--sheen),0 10px 22px rgba(0,0,0,.25);
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --paper:#151310; --sheet:#1c1916; --card:#262220; --card-2:#201d19;
  --line:#35302a; --line-strong:#4a433a;
  --ink:#efe7da; --ink-2:#d6cdbf; --muted:#a39a8d; --muted-2:#837b70;
  --edge:#070605; --tool-line:#070605;
  --green:#bfd89e; --mint:#bcdcc2; --orange:#f0c79f; --violet:#cdbfe6; --rose:#eab8b0;
  --tile:#2b2535; --tile-line:#43395a;
  --sheen:rgba(255,255,255,.04); --shade:rgba(0,0,0,.4); --grid:#2c2722; --road:#6a6055; --pill:#f3eadc;
  --soft:inset 0 1px 0 var(--sheen),0 10px 22px rgba(0,0,0,.25);
  color-scheme:dark;
}

*{box-sizing:border-box}
html,body{margin:0}
body{font:400 13px/1.55 var(--font);color:var(--ink);background:var(--paper);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button{font:inherit;color:inherit;cursor:pointer}
a{color:inherit;text-decoration:none}
h1,h2,p{margin:0}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

.ic{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ic--fill{stroke:var(--edge);stroke-width:1.2}
.micro{font-size:10.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.muted{color:var(--muted);font-size:11.5px}

/* каркас */
.app{display:grid;grid-template-columns:232px minmax(0,1fr) 300px;grid-template-rows:auto minmax(0,1fr);grid-template-areas:"top top top" "side sheet rail";column-gap:12px;min-height:100vh;padding:0 12px 12px}

/* шапка */
.top{grid-area:top;display:flex;align-items:center;gap:14px;height:48px;padding:0 10px}
.brand{display:flex;align-items:center;gap:9px;font-size:17px;font-weight:800;letter-spacing:-.01em}
.brand mark{margin-left:1px;padding:0 5px;border-radius:3px;background:var(--green);color:var(--on-pop)}
.logo{width:26px;height:26px;flex:none}
.logo path{stroke:var(--edge);stroke-width:1.6;stroke-linejoin:round}
.nav{display:flex;gap:6px;margin-left:clamp(14px,11vw,180px)}
.nav__item{display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 14px;border:1.5px solid transparent;border-radius:8px;font-weight:600}
.nav__item:hover{background:var(--card-2)}
.nav__item.is-active{background:var(--green);color:var(--on-pop);border-color:var(--edge);box-shadow:inset 0 1px 0 rgba(255,255,255,.55),var(--pop)}
.top__right{display:flex;align-items:center;gap:8px;margin-left:auto}

.tool{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:30px;padding:0 11px;border:1px solid var(--tool-line);border-radius:8px;background:var(--card);box-shadow:0 1.5px 0 var(--tool-line);font-size:12px;font-weight:600;white-space:nowrap;transition:transform .08s,box-shadow .08s}
.tool:hover{transform:translateY(-1px);box-shadow:0 2.5px 0 var(--tool-line)}
.tool:active{transform:translateY(1.5px);box-shadow:none}
.tool--sq{width:32px;padding:0}
.tool.is-off{opacity:.4;pointer-events:none}

.btn-pop{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:34px;padding:0 14px;border:1.5px solid var(--edge);border-radius:8px;background:var(--green);color:var(--on-pop);font-weight:700;box-shadow:inset 0 1px 0 rgba(255,255,255,.55),var(--pop);transition:transform .08s,box-shadow .08s}
.btn-pop:hover{transform:translate(-.5px,-1px);box-shadow:inset 0 1px 0 rgba(255,255,255,.55),2.5px 4px 0 var(--edge)}
.btn-pop:active{transform:translate(1.5px,2.5px);box-shadow:none}
.btn-pop--alt{background:var(--pill)}
.btn-pop.is-off{opacity:.55;pointer-events:none}
.cta{min-height:30px}

/* дерево разделов */
.side{grid-area:side;display:flex;flex-direction:column;min-width:0;padding:14px 2px 0 10px}
.tree__root{display:flex;align-items:center;gap:9px;margin-bottom:14px;font-size:14px;font-weight:800}
.tree__root small,.fold__h small{margin-left:auto;font-size:10.5px;font-weight:400;color:var(--muted)}
.fold{margin-bottom:4px}
.fold__h{display:flex;align-items:center;gap:8px;padding:5px 4px;font-weight:600}
.fold__h .ic:first-child{color:var(--muted)}
.fold__list{list-style:none;margin:2px 0 8px 11px;padding:0 0 0 14px;border-left:1px solid var(--line-strong)}
.fold__list li{position:relative;margin:3px 0}
.fold__list li::before{content:"";position:absolute;left:-14px;top:50%;width:10px;border-top:1px solid var(--line-strong)}
.leaf{display:flex;align-items:center;gap:8px;padding:5px 9px;border:1.5px solid transparent;border-radius:7px}
.leaf .ic{color:var(--muted-2)}
.leaf:hover{background:var(--card-2)}
.leaf.is-active{background:var(--green);color:var(--on-pop);border-color:var(--edge);box-shadow:var(--pop);font-weight:700}
.leaf.is-active .ic{color:var(--on-pop)}
.progress{margin-top:auto;padding:11px 13px;border:1px solid var(--line);border-radius:12px;background:var(--sheet);box-shadow:var(--soft)}
.progress__row{display:flex;align-items:center;justify-content:space-between}
.bar{height:6px;margin-top:9px;border:1px solid var(--edge);border-radius:99px;background:var(--card);overflow:hidden}
.bar i{display:block;height:100%;background:var(--green);transition:width .3s}

/* лист */
.sheet{grid-area:sheet;display:flex;flex-direction:column;gap:10px;min-width:0;padding:14px 14px 12px;border:1px solid var(--line);border-radius:14px;background:var(--sheet) linear-gradient(var(--sheen),transparent 220px);box-shadow:var(--soft)}
.head{padding:2px 12px 0}
.crumbs{font-size:12px;color:var(--muted)}
.crumbs i{margin:0 6px;font-style:normal;color:var(--muted-2)}
.head__row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 14px;margin:6px 0 4px}
.title{font-size:30px;font-weight:800;line-height:1.15;letter-spacing:-.015em}
.sub{max-width:76ch;color:var(--muted);font-size:12.5px}
.pills{display:flex;flex-wrap:wrap;gap:8px}
.pill{display:inline-flex;align-items:center;height:23px;padding:0 10px;border:1px solid var(--edge);border-radius:99px;color:var(--on-pop);font-size:11px;font-weight:600;white-space:nowrap;box-shadow:1px 1.5px 0 var(--edge)}
.pill--orange{background:var(--orange)} .pill--green{background:var(--green)} .pill--violet{background:var(--violet)}

/* сцена */
.scene{position:relative;display:flex;flex:1 1 auto;flex-direction:column;border:1px solid var(--line);border-radius:12px;background:var(--card-2);container-type:inline-size;overflow:hidden}
.scene__bar{position:relative;z-index:2;display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:8px;padding:10px 10px 0}
.chips,.tools{display:flex;flex-wrap:wrap;gap:8px}
.chip{min-width:98px;padding:5px 10px 6px;border:1px solid var(--line-strong);border-radius:8px;background:var(--card);box-shadow:0 1px 0 var(--line-strong)}
.chip__l{display:block;font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.chip__v{font-size:14px;font-weight:800;font-variant-numeric:tabular-nums}
.scene__stage{position:relative;flex:1 1 auto;aspect-ratio:760/500}
.scene__stage svg{position:absolute;inset:0;width:100%;height:100%;font-family:var(--font)}
.scene__foot{display:flex;flex-direction:column;gap:10px;padding:0 10px 10px}
.legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:11px;color:var(--muted)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend i{width:9px;height:9px;border:1.5px solid var(--edge);border-radius:50%}
.note{padding:10px 14px 11px;border:1.5px solid var(--edge);border-radius:10px;background:var(--card);box-shadow:var(--pop);font-size:12.5px}
.note__h{display:flex;align-items:center;gap:8px;margin-bottom:6px;padding-bottom:6px;border-bottom:1px solid var(--line);font-size:10.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.note__hint{margin-top:4px;color:var(--muted);font-size:11.5px}
@container (min-width:770px){
  .scene__stage{aspect-ratio:auto;min-height:340px}
  .scene__stage svg{width:calc(100% - 130px)}
  .scene__foot{position:absolute;right:0;bottom:0;left:0;flex-direction:row;align-items:flex-end;justify-content:space-between;padding:12px 14px 14px;pointer-events:none}
  .note{width:300px;pointer-events:auto}
}

/* рисунок сцены */
.grid{fill:none;stroke:var(--grid);stroke-width:1}
.rd{fill:none;stroke:var(--road);stroke-width:2;stroke-dasharray:1 7;stroke-linecap:round}
.sh{fill:var(--shade)}
.ol{stroke:var(--edge);stroke-width:var(--sw,2px);stroke-linejoin:round}
.il{fill:none;stroke:var(--edge);stroke-width:1.5;stroke-linecap:round}
.dk{fill:none;stroke:var(--edge);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.dkf{fill:#fffaf2;stroke:var(--edge);stroke-width:2;stroke-linejoin:round}
.dkt{fill:#fffaf2;stroke:var(--edge);stroke-width:1.4;stroke-linejoin:round}
path.dkt{fill:none}
.slot{fill:var(--edge);opacity:.82}
.belt{fill:none;stroke:var(--edge);stroke-width:1.4;stroke-dasharray:5 9;opacity:.5;animation:belt 1.1s linear infinite}
@keyframes belt{to{stroke-dashoffset:-14}}
.is-paused .belt{animation-play-state:paused}
.ph{stroke:#e0704a;stroke-width:3.5;stroke-linecap:round}
.ft{font-weight:800;fill:var(--on-pop)}
.tk{stroke:var(--edge);stroke-width:1.8}
.pl-s{fill:var(--edge)}
.pl-b{fill:var(--pill);stroke:var(--edge);stroke-width:var(--sw,2px)}
.pl text{font-weight:700;fill:var(--on-pop)}
.node{transition:opacity .35s}
.node.hid{opacity:0}
.node.ghost{opacity:.22}

/* шаги под сценой */
.steps{padding:10px 12px 12px;border:1px solid var(--line);border-radius:12px;background:var(--card-2)}
.steps__h{display:flex;align-items:center;justify-content:space-between}
.stepper{display:flex;margin:10px 0 0;padding:0;list-style:none}
.stepper li{position:relative;flex:1;min-width:0;text-align:center}
.stepper li+li::before{content:"";position:absolute;top:13px;right:50%;left:-50%;border-top:1px solid var(--line-strong)}
.stepper a{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--muted)}
.dot{display:grid;place-items:center;width:27px;height:27px;border:1.5px solid var(--edge);border-radius:50%;background:var(--card);color:var(--ink);font-size:11px;font-weight:700;transition:transform .1s}
.stepper a:hover .dot{transform:translateY(-1px)}
.lbl{font-size:11px;overflow-wrap:anywhere}
.is-done .dot{background:var(--mint);color:var(--on-pop)}
.is-active .dot{background:var(--green);color:var(--on-pop);box-shadow:var(--pop)}
.is-active .lbl{color:var(--ink);font-weight:700}

/* правая колонка */
.rail{grid-area:rail;display:flex;flex-direction:column;gap:12px;min-width:0}
.card{padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--sheet) linear-gradient(var(--sheen),transparent 160px);box-shadow:var(--soft)}
.step{display:flex;flex:1 1 auto;flex-direction:column}
.step__top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tag{padding:2px 9px;border:1px solid var(--edge);border-radius:99px;background:var(--rose);color:var(--on-pop);font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;box-shadow:1px 1.5px 0 var(--edge)}
.step h2{margin:12px 0 10px;font-size:17px;font-weight:800;line-height:1.3}
.step p{margin-bottom:9px;color:var(--ink-2);font-size:12.5px}
.idea{display:flex;gap:10px;margin-top:4px;padding:10px 12px;border:1px solid var(--tile-line);border-radius:10px;background:var(--tile)}
.idea p{margin:3px 0 0}
.idea__ic{display:grid;flex:none;place-items:center;width:24px;height:24px;border:1px solid var(--edge);border-radius:6px;background:var(--pill);color:var(--on-pop)}
.svc{display:grid;gap:7px;margin:2px 0 12px;padding:0;list-style:none}
.svc li{padding:7px 10px 8px;border:1px solid var(--line-strong);border-radius:8px;background:var(--card);transition:transform .15s,box-shadow .15s,border-color .15s}
.svc li.is-on{border-color:var(--edge);box-shadow:var(--pop);transform:translate(-1px,-1px)}
.svc b{display:flex;align-items:center;gap:8px}
.svc b i{width:10px;height:10px;border:1.5px solid var(--edge);border-radius:3px}
.svc span{display:block;color:var(--muted);font-size:11.5px}
.contacts{display:grid;gap:9px;margin:4px 0 12px}
.warn{padding:7px 10px;border:1px dashed var(--line-strong);border-radius:8px;color:var(--muted);font-size:11.5px}
.step__nav{display:flex;gap:8px;margin-top:auto;padding-top:16px}
.step__nav .tool{height:36px;padding:0 9px}
.step__nav .btn-pop{flex:1;min-height:36px;padding:0 10px;gap:6px;font-size:12.5px;white-space:nowrap}
.keys{margin-top:10px;color:var(--muted-2);font-size:10.5px;text-align:center}
kbd{margin:0 1px;padding:0 4px;border:1px solid var(--line-strong);border-radius:4px;background:var(--card);font:inherit;font-size:10px}
.checks{display:grid;gap:8px;margin:11px 0 0;padding:0;list-style:none}
.checks li{display:flex;align-items:flex-start;gap:9px;color:var(--ink-2);font-size:12px}
.box{display:grid;flex:none;place-items:center;width:14px;height:14px;margin-top:2px;border:1.5px solid var(--edge);border-radius:3px;background:var(--card)}
.is-done .box{background:var(--green)}
.is-done .box::after{content:"";width:7px;height:4px;margin-top:-2px;border-bottom:2px solid var(--on-pop);border-left:2px solid var(--on-pop);transform:rotate(-45deg)}

.nojs{max-width:60ch;margin:40px auto;padding:0 16px}

/* ноутбук: колонки уже */
@media (max-width:1480px){
  .app{grid-template-columns:208px minmax(0,1fr) 284px}
}
/* планшет: без дерева */
@media (max-width:1180px){
  .app{grid-template-columns:minmax(0,1fr) 284px;grid-template-areas:"top top" "sheet rail"}
  .side{display:none}
  .nav{margin-left:14px}
}
/* телефон: одна колонка */
@media (max-width:860px){
  .app{grid-template-columns:minmax(0,1fr);grid-template-areas:"top" "sheet" "rail";row-gap:12px;padding:0 16px 20px}
  .top{padding:0;gap:8px}
  .nav{display:none}
  .sheet{padding:12px 10px 10px}
  .head{padding:2px 4px 0}
  .title{font-size:24px}
  .chips{display:grid;flex:1 1 100%;grid-template-columns:1fr 1fr}
  .chip{min-width:0}
  .lbl,.keys{display:none}
  .step__nav .tool,.step__nav .btn-pop{min-height:42px;height:auto}
  .tool{height:34px}
  .tool--sq{width:36px}
  .cta{min-height:34px}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important}
  .belt{animation:none}
}
