/* ============ Font: Manrope, self-hosted (variable, 200–800) ============ */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("assets/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============ Tokens ============ */
:root {
  --bg: #F5F3F0;
  --surface: #FFFFFF;
  --ink: #131112;
  --ink-2: #4A4547;
  --ink-3: #6E676A;
  --line: #E4E0DC;
  --accent: #D8232A;          /* красный РЗТ */
  --accent-soft: #FBE9E9;
  --bad: #B01C22;             /* красный текст на --accent-soft */
  --warn: #8A5A0B;            /* жёлтый статус: текст */
  --warn-soft: #FBF1DC;       /* жёлтый статус: фон */
  --good: #1F9D55;
  --insight: #E2F1E6;         /* пастельно-зелёный фон блоков с выводами */
  --insight-ink: #1D7042;     /* зелёный номеров на белом и на пастельно-зелёном */
  --stage: #0E0B0C;           /* тёмная «сцена» для экранов РЗТ */
  --stage-2: #1A1517;
  --stage-line: #2A2326;
  --radius: 16px;
  --radius-s: 10px;
  --sidebar: 288px;
  --text: 720px;
  --wide: 1120px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* ============ Layout ============ */
.layout { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }

/* ---- Sidebar / TOC ---- */
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 32px 20px 32px 28px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 28px;
  scrollbar-width: thin;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.brand__name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand__sub { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }

.progress { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress__bar { height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

.toc { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc > li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px; padding: 6px 10px; margin: 1px 0; border-radius: 8px;
  font-size: 14px; line-height: 1.35; color: var(--ink-2); text-decoration: none;
  transition: background .15s, color .15s;
}
.toc > li > a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 11px; font-weight: 600; color: var(--ink-3); padding-top: 2px;
  font-variant-numeric: tabular-nums; min-width: 18px;
}
.toc a:hover { background: rgba(0,0,0,.04); color: var(--ink); }
.toc a.is-active { color: var(--ink); font-weight: 600; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.toc > li > a.is-active::before { color: var(--accent); }
.toc ul { list-style: none; margin: 0 0 6px; padding: 0 0 0 28px; display: none; }
.toc li.is-open > ul { display: block; }
.toc ul a { display: block; font-size: 13px; padding: 4px 10px; color: var(--ink-3); }
.toc ul a.is-active { background: none; box-shadow: none; color: var(--accent); }

/* group labels: Исследование / Дизайн / Результат */
.toc > li.toc__group {
  counter-increment: none; margin: 18px 0 6px; padding: 0 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.toc > li.toc__group:first-child { margin-top: 4px; }

/* items with sub-items: chevron button */
.toc > li.has-sub { position: relative; }
.toc > li.has-sub > a { padding-right: 40px; }
.toc__exp {
  position: absolute; top: 1px; right: 0; width: 36px; height: 32px;
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--ink-3); cursor: pointer; transition: background .15s, color .15s;
}
.toc__exp:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.toc__exp svg { transition: transform .2s ease; transform: rotate(-90deg); }
.toc li.is-open > .toc__exp svg { transform: none; }
.toc li.is-open > .toc__exp { color: var(--ink); }

/* focus + skip link */
.toc a:focus-visible, .toc__exp:focus-visible, .mbar__btn:focus-visible, .jump-note:focus-visible, .skip:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; transition: top .15s;
}
.skip:focus { top: 16px; }
main:focus { outline: none; }

/* note shown when the case opens straight on the design part */
.jump-note {
  display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin: 0 0 28px; padding: 12px 16px;
  border: 1px dashed var(--line); border-radius: var(--radius-s); background: var(--surface);
  font-size: 14px; color: var(--ink-2); text-decoration: none; transition: border-color .15s, color .15s;
}
.jump-note span { color: var(--accent); font-weight: 600; }
.jump-note:hover { border-color: var(--accent); color: var(--ink); }
.jump-note[hidden] { display: none; }

.sidebar__foot { margin-top: auto; font-size: 13px; color: var(--ink-3); display: grid; gap: 6px; }
.sidebar__foot a { text-decoration: none; }
.sidebar__foot a:hover { color: var(--ink); }

/* ---- Mobile bar ---- */
.mbar { display: none; }

/* ---- Content ---- */
.content { min-width: 0; padding: 0 56px 120px; }
.section { max-width: var(--wide); margin: 0 auto; padding-top: 112px; }
.section > *:not(.wide):not(.full) { max-width: var(--text); }
.wide { max-width: var(--wide); }

/* ============ Typography ============ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 16px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.025em; line-height: 1.12; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(38px, 5.2vw, 68px); letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 20px; }
h3 { font-size: 24px; margin: 64px 0 14px; letter-spacing: -.02em; }
h4 { font-size: 17px; margin: 0 0 8px; letter-spacing: -.01em; line-height: 1.3; }
p { margin: 0 0 16px; }
p, li, dd, figcaption { text-wrap: pretty; }
.lead { font-size: 20px; line-height: 1.55; color: var(--ink); }
.muted { color: var(--ink-3); }
.small { font-size: 14px; line-height: 1.55; }
strong { font-weight: 700; }

ul.list, ol.list { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 10px; }
ul.list li { position: relative; padding-left: 22px; }
ul.list li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 8px; height: 2px; background: var(--ink-3); }
ol.list { counter-reset: ol; }
ol.list li { counter-increment: ol; position: relative; padding-left: 36px; }
ol.list li::before {
  content: counter(ol); position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 700; display: grid; place-items: center;
}

/* ============ Hero ============ */
.hero { padding-top: 72px; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px;
  font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.tag--accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.hero h1 { max-width: var(--wide); }
.hero .lead { max-width: var(--text); margin-top: 24px; }

.meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 48px 0 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.meta div { padding: 20px 20px 20px 0; }
.meta div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.meta dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.meta dd { margin: 0; font-size: 15px; line-height: 1.45; font-weight: 500; }

.hero__shot { margin-top: 48px; }

/* ============ Slider (onboarding steps) ============ */
.slider { margin: 28px 0 0; }
.slider__viewport { position: relative; border-radius: 24px; overflow: hidden; background: var(--stage); }
.slider__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; outline: none;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__track:focus-visible { box-shadow: inset 0 0 0 3px var(--accent); }
.slider__slide { flex: 0 0 100%; scroll-snap-align: start; }
.slider__slide img { display: block; width: 100%; height: auto; }
.slider--fit .slider__slide { display: grid; place-items: center; padding: 40px 88px; }
.slider--fit .slider__slide img { width: auto; max-width: 100%; max-height: 640px; border-radius: 16px; }
.slider__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); color: var(--ink); box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: opacity .2s ease, transform .2s ease;
}
@media (hover: hover) { .slider__arrow:hover { transform: translateY(-50%) scale(1.06); } }
.slider__arrow:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.slider__arrow:disabled { opacity: 0; pointer-events: none; }
.slider__arrow--prev { left: 16px; }
.slider__arrow--next { right: 16px; }
.slider__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.slider__status { margin: 0; font-size: 14px; color: var(--ink-3); }
.slider__status b { color: var(--ink); }
.slider__dots { display: flex; gap: 4px; }
.slider__dot {
  width: 24px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
.slider__dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line);
  transition: background .2s ease, width .2s ease;
}
.slider__dot.is-active::before { width: 20px; border-radius: 99px; background: var(--accent); }
.slider__dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 6px; }
@media (max-width: 720px) {
  .slider__viewport { border-radius: 18px; }
  .slider__arrow { width: 36px; height: 36px; }
  .slider__arrow--prev { left: 8px; }
  .slider__arrow--next { right: 8px; }
  .slider--fit .slider__slide { padding: 20px 12px; }
}
@media (prefers-reduced-motion: reduce) { .slider__track { scroll-behavior: auto; } }

/* ============ Stage (dark frame for RZT screens) ============ */
.stage {
  background: var(--stage); border-radius: 24px; padding: 28px; position: relative; overflow: hidden;
  color: #EDE7E8;
}
.stage img { border-radius: 12px; position: relative; }
.stage--flush { padding: 0; }
.stage--flush img { border-radius: 0; }

/* Browser-like scroll frame for tall screens */
.frame {
  border-radius: 14px; overflow: hidden; background: var(--stage-2);
  border: 1px solid var(--stage-line); position: relative;
}
.frame__bar {
  height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 14px;
  background: #161214; border-bottom: 1px solid var(--stage-line);
}
.frame__bar i { width: 9px; height: 9px; border-radius: 50%; background: #3A3135; }
.frame__bar span { margin-left: 12px; font-size: 12px; color: #8C8387; }
.frame__scroll { max-height: 680px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3A3135 transparent; }
.frame__scroll img { border-radius: 0; width: 100%; }
.frame--device { box-shadow: 0 30px 60px -20px rgba(22,18,20,.35), 0 8px 20px rgba(22,18,20,.08); }

/* ============ Figures ============ */
figure { margin: 32px 0; }
figcaption { margin-top: 12px; font-size: 14px; color: var(--ink); display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.stage + figcaption, .stage figcaption { color: var(--ink); }
.paper {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; overflow: hidden;
}
.paper img { border-radius: 8px; }
.zoomable { cursor: zoom-in; }
.zoom-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0;
  font: 600 14px var(--font); color: var(--ink); cursor: pointer; white-space: nowrap;
  min-height: 24px;
}
.zoom-btn:hover { color: var(--accent); }
.zoom-btn svg { width: 16px; height: 16px; }

/* Peek: tall artifact preview with fade */
.peek { position: relative; max-height: 560px; overflow: hidden; cursor: zoom-in; }
.peek::after {
  content: "Открыть полностью"; position: absolute; left: 0; right: 0; bottom: 0; height: 160px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 20px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 75%);
  font: 700 14px var(--font); color: var(--ink);
}
@media (hover: hover) { .peek:hover::after { color: var(--accent); } }
.peek--dark { max-height: 640px; }
.peek--dark::after { background: linear-gradient(to bottom, transparent, var(--stage) 75%); color: #fff; }
@media (hover: hover) { .peek--dark:hover::after { color: #fff; text-decoration: underline; } }

/* UI-kit fragments in tabs */
.kit-tabs .tabs__panel figure { margin: 0; }
.kit-stack { display: grid; gap: 28px; }

/* ============ Cards / blocks ============ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
/* White backing for tinted card groups so pastel fills don't sit on the warm page bg */
.panel { background: var(--surface); border-radius: 24px; padding: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card__num { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 10px; font-variant-numeric: tabular-nums; }


/* Insight list */
.insights { display: grid; gap: 0; margin: 24px 0; border-top: 1px solid var(--line); }
.insight { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.insight__n { font-size: 13px; font-weight: 700; color: var(--accent); padding-top: 3px; font-variant-numeric: tabular-nums; }
.insight :is(h3, h4) { font-size: 18px; margin: 0 0 4px; letter-spacing: -.01em; }
.insight p { margin: 0; color: var(--ink); }
.insights--cards .insight p { color: var(--ink-2); }
/* Takeaways: highlighted block of key insights (conclusions of a research step).
   Equal cards, three per row (.insights--2: two per row) */
.takeaways { margin: 48px 0 16px; padding: 36px; background: var(--insight); border-radius: 24px; }
.takeaways__head { margin-bottom: 24px; }
.takeaways__head h4 { font-size: 32px; letter-spacing: -.025em; margin: 0; }
.insights--cards { grid-template-columns: repeat(3, 1fr); gap: 12px; border-top: 0; margin: 0; }
.insights--cards .insight { grid-template-columns: 1fr; align-content: start; gap: 12px; padding: 24px; background: var(--surface); border: 0; border-radius: var(--radius); }
.insights--cards .insight__n { padding-top: 0; font-size: 15px; color: var(--insight-ink); }
.insights--cards .insight :is(h3, h4) { font-size: 19px; line-height: 1.35; margin-bottom: 8px; }
.insights--cards .insight p { font-size: 15px; line-height: 1.55; }
.insights--2 { grid-template-columns: repeat(2, 1fr); }
/* joke card that fills the empty sixth slot */
.insights--cards .insight--joke { background: transparent; border: 1.5px dashed color-mix(in srgb, var(--insight-ink) 40%, transparent); place-content: center; justify-items: center; text-align: center; gap: 8px; }
.insight--joke .insight__emoji { font-size: 44px; line-height: 1; }
.insights--cards .insight--joke p { font-size: 17px; font-weight: 600; color: var(--insight-ink); }
@media (max-width: 1024px) { .insights--cards { grid-template-columns: repeat(2, 1fr); } .insights--cards > :last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* Audit criteria: what was checked */
ul.list.criteria { margin: 4px 0 32px; gap: 8px; }
ul.list--dots li { padding-left: 24px; }
ul.list--dots li::before { left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; }
@media (max-width: 720px) { .takeaways { padding: 20px; } .insights--cards { grid-template-columns: 1fr; } }

h2 + h3 { margin-top: 36px; }

/* Task statement (block «Проблема, задача, ограничения») */
.task { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 28px 32px; margin: 32px 0 0; }
.task p { margin: 0; font-size: 22px; line-height: 1.45; font-weight: 600; letter-spacing: -.01em; }

/* Callout */
.callout {
  margin: 28px 0; color: var(--ink);
  font-size: 19px; line-height: 1.55; font-weight: 700; letter-spacing: -.01em;
}
.callout__arrow { display: inline-block; margin: 0 .55em; color: var(--ink-3); font-weight: 500; }
.note {
  background: var(--surface); border: 1px dashed #CFC8C3; border-radius: var(--radius-s);
  padding: 14px 16px; font-size: 14px; color: var(--ink-2); margin: 20px 0;
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 32px 0; }
.stats--2 { grid-template-columns: repeat(2, 1fr); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; }
.stat__v { font-size: 40px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__v small { font-size: 20px; font-weight: 700; color: var(--ink-3); letter-spacing: -.02em; }
.stat__arrow { display: inline-block; margin: 0 .32em; font-weight: 600; }
.stat__l { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }

/* Process timeline */
/* Process chain (block «Рабочий процесс») */
.chain { list-style: none; padding: 0; margin: 32px 0 0; }
.chain__card {
  display: grid; grid-template-columns: 36px 1fr; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
}
.chain__num { font-size: 13px; font-weight: 700; color: var(--accent); padding-top: 3px; font-variant-numeric: tabular-nums; }
h3.card__title { font-size: 17px; margin: 0 0 8px; letter-spacing: -.01em; line-height: 1.3; text-wrap: balance; }
h3.chain__title { font-size: 18px; margin: 0 0 6px; letter-spacing: -.01em; line-height: 1.3; }
.chain__card p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.chain__why {
  position: relative; margin: 0; padding: 20px 0 26px 76px;
  color: var(--ink); font-size: 15px; line-height: 1.5;
}
.chain__why::before { content: ""; position: absolute; left: 33px; top: 0; bottom: 8px; width: 1px; background: #C9C2BD; }
.chain__why::after {
  content: ""; position: absolute; left: 29px; bottom: 9px; width: 8px; height: 8px;
  border-right: 1.5px solid #C9C2BD; border-bottom: 1.5px solid #C9C2BD; transform: rotate(45deg);
}

.steps { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 0; counter-reset: st; }
.steps li {
  counter-increment: st; display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start;
  padding: 18px 0; border-bottom: 1px solid var(--line); position: relative;
}
.steps li:first-child { border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(st, decimal-leading-zero); font-size: 28px; font-weight: 800; letter-spacing: -.04em;
  color: var(--ink); line-height: 1;
}
.steps b { display: block; font-size: 17px; margin-bottom: 2px; }
.steps span { color: var(--ink); font-size: 15px; }
.steps a { text-decoration: none; }
.steps a:hover b { color: var(--accent); }

/* Problem → solution */
.ps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0 8px; }
.ps__col { border-radius: var(--radius); padding: 22px 24px; }
.ps__col--p { background: var(--surface); border: 1px solid var(--line); }
.ps__col--s { background: var(--ink); color: #F4F0F1; border: 1px solid var(--ink); }
.ps__label {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.ps__col--p .ps__label { color: var(--bad); }
.ps__col--s .ps__label { color: var(--insight); }
.ps ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15.5px; line-height: 1.55; }
.ps li { padding-left: 18px; position: relative; }
.ps__col--p li::before { content: "–"; position: absolute; left: 0; color: var(--ink-3); }
.ps__col--s li::before { content: "→"; position: absolute; left: 0; color: var(--insight); }

/* Problem → solution by scenario (release page) */
.psr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 24px 0 8px; }
.psr__head, .psr__row { display: grid; grid-template-columns: 200px 1fr 1.35fr; gap: 32px; padding: 0 28px; }
.psr__head {
  padding-top: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.psr__head span:nth-child(2) { color: var(--bad); }
.psr__head span:last-child { color: var(--insight-ink); }
.psr__row { padding-top: 22px; padding-bottom: 22px; }
.psr__row + .psr__row { border-top: 1px solid var(--line); }
.psr__scn { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 700; }
.psr ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; align-content: start; font-size: 15.5px; line-height: 1.55; }
.psr li { padding-left: 18px; position: relative; }
.psr__p { color: var(--ink-2); }
.psr__p li::before { content: "–"; position: absolute; left: 0; color: var(--ink-3); }
.psr__s li::before { content: "→"; position: absolute; left: 0; color: var(--insight-ink); }
@media (max-width: 1024px) {
  .psr__head, .psr__row { grid-template-columns: 1fr 1fr; gap: 12px 24px; }
  .psr__head span:first-child { display: none; }
  .psr__scn { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .psr__head { display: none; }
  .psr__head, .psr__row { grid-template-columns: 1fr; padding-left: 20px; padding-right: 20px; }
  .psr ul::before {
    font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: -2px;
  }
  .psr .psr__p::before { content: "Проблемы"; color: var(--bad); }
  .psr .psr__s::before { content: "Решения"; color: var(--insight-ink); }
}

/* Flow: path by stages (#flow) */
.fl { display: grid; grid-template-columns: 64px repeat(5, minmax(0, 1fr)); grid-template-rows: auto auto auto; grid-auto-flow: column; gap: 8px; margin: 24px 0 12px; }
.fl__stage { display: contents; }
.fl__rl { align-self: center; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.fl__rl--now { color: var(--insight-ink); }
.fl__head { display: flex; align-items: baseline; gap: 8px; padding: 0 4px 4px; font-size: 15px; font-weight: 700; line-height: 1.3; }
.fl__n { flex: none; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.fl__cell { border-radius: var(--radius-s); padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.fl__cell p { margin: 0; }
.fl__cell--exit { background: var(--accent-soft); }
.fl__cell--warn { background: var(--warn-soft); }
.fl__cell--now { background: var(--insight); }
.fl__tag { display: inline-block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fl__cell--exit .fl__tag { color: var(--bad); }
.fl__cell--warn .fl__tag { color: var(--warn); }
@media (max-width: 1280px) {
  .fl { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-flow: row; gap: 8px 8px; }
  .fl__corner, .fl__rl { display: none; }
  .fl__head { grid-column: 1 / -1; padding-top: 12px; }
  .fl__cell::before { content: attr(data-side); display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
  .fl__cell--now::before { color: var(--insight-ink); }
}
@media (max-width: 720px) { .fl { grid-template-columns: 1fr; } }

/* Before / After */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 24px; overflow: hidden; background: var(--stage); margin: 16px 0 32px; }
.ba__side { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ba__side + .ba__side { border-left: 1px solid var(--stage-line); background: #151012; }
.ba__label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8C8387; display: flex; gap: 8px; align-items: center; }
.ba__label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5A5053; }
.ba__side--new .ba__label { color: var(--insight); }
.ba__side--new .ba__label::before { background: var(--good); box-shadow: 0 0 0 4px rgba(31,157,85,.25); }
.ba__imgs { display: flex; gap: 12px; align-items: flex-start; justify-content: center; flex: 1; }
.ba__imgs--col { flex-direction: column; align-items: stretch; }
.ba__imgs img { border-radius: 10px; min-width: 0; max-height: 520px; object-fit: contain; width: auto; }
.ba__imgs--col img { width: 100%; max-height: none; }
/* stacked variant for wide screenshots: было сверху, стало снизу */
.ba--stack { grid-template-columns: 1fr; }
.ba--stack .ba__side + .ba__side { border-left: 0; border-top: 1px solid var(--stage-line); }
.ba--stack .ba__side { padding: 24px 32px 30px; }
.ba--stack .ba__imgs--col { align-items: center; }
.ba--stack .ba__imgs--col img { max-width: 860px; }
/* Menu: old list vs new menu at the same visual scale (the new export is ~1.5x denser) */
.ba--menu .ba__imgs { align-items: flex-start; }
.ba--menu .ba__side:first-child img { width: 200px; max-height: none; }
.ba--menu .ba__side--new img { width: 236px; max-height: none; }
.ba__note { margin: 0; font-size: 13px; color: #8C8387; text-align: center; }
.menu-states { display: grid; grid-template-columns: 804fr 668fr 668fr 644fr; gap: 24px; align-items: start; margin: 16px 0 24px; }
.menu-states figure { margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.menu-states img { width: 100%; height: auto; border-radius: 10px; }
@media (max-width: 720px) {
  .menu-states { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 28px; }
  .menu-states figure { width: min(100%, calc(var(--w) * .4px)); }
}
.menu-states figcaption { margin: 0; color: #A8A1A4; }
/* Auth block */
.sub-h { margin: 40px 0 8px; font-size: 20px; }
.ba__imgs--modal img { max-width: 300px; }
.ba__imgs--pair img { max-width: calc(50% - 6px); }
.table-cap { margin: 28px 0 -12px; font-size: 14px; color: var(--ink-3); }
.table-cap b { color: var(--ink); }
.err-matrix td.err { color: var(--bad); font-weight: 600; }
.err-matrix td:first-child { font-weight: 600; }
.menu-icons { display: flex; justify-content: center; padding: 12px 20px; }
.menu-icons img { width: 100%; max-width: 860px; height: auto; }
.menu-header { display: grid; gap: 16px; padding: 20px; }
.menu-header img { width: 100%; height: auto; border-radius: 8px; }
#menu .grid-2 { margin: 8px 0 32px; }

/* Tabs (AS IS / TO BE) */
.tabs { margin: 28px 0; }
.tabs__head { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: 0; padding: 0; background: var(--surface); border-radius: 26px; margin-bottom: 16px; }
.tabs__btn {
  border: 0; background: none; height: 52px; padding: 0 26px; border-radius: 99px; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease-out;
  font: 600 16px var(--font); color: var(--ink-2);
}
.tabs__btn.is-active { background: var(--ink); color: #fff; }
.tabs__panel[hidden] { display: none; }
@media (max-width: 720px) {
  .tabs__btn { padding: 0 14px; }
}

/* Chart: paired bars */
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 36px 36px 24px; margin: 32px 0; }
.chart__head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 24px; flex-wrap: wrap; }
.chart__title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .l-old { background: var(--ink-3); }
.legend .l-new { background: var(--good); }
.bars { display: grid; gap: 0; }
.bar-row { display: grid; grid-template-columns: minmax(200px, 300px) 1fr 104px; gap: 28px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.bar-row:first-child { border-top: 0; }
.bar-row__label { font-size: 15px; line-height: 1.4; color: var(--ink); }
.bar-row__track { display: grid; gap: 4px; }
.bar { height: 12px; border-radius: 6px; background: #F0ECE9; position: relative; overflow: hidden; }
.bar > span { position: absolute; inset: 0 auto 0 0; border-radius: 5px; width: var(--w); transform-origin: left; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.bar--old > span { background: var(--ink-3); }
.bar--new > span { background: var(--good); }
.bar--down > span { background: var(--bad); }
.chart:not(.is-in) .bar > span { transform: scaleX(0); }
.bar-row__val { font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; line-height: 1.3; color: var(--ink-3); }
.bar-row__val b { color: var(--ink); font-size: 14px; }
.bar-row__val .down { color: var(--bad); background: var(--accent-soft); padding: 0 5px; border-radius: 4px; }
.bar-row--total { border-top: 2px solid var(--ink); padding-top: 20px; margin-top: 0; }
.bar-row--total .bar-row__label { font-weight: 700; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); background: #FAF9F7; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }

/* Воронка оценки: столбцы шагов, штриховка — отвал на шаге.
   Полосы метрик ниже стоят в той же сетке и охватывают свои шаги (--from / --to) */
.funnel { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.funnel__steps, .funnel__metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 12px; list-style: none; margin: 0; padding: 0; }
.funnel__step { display: flex; flex-direction: column; gap: 4px; }
.funnel__col { height: 200px; display: flex; flex-direction: column; justify-content: flex-end; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.funnel__bar { height: var(--h); background: color-mix(in srgb, var(--ink) 7%, var(--surface)); border-radius: 8px 8px 0 0; }
.funnel__drop {
  height: calc(var(--prev) - var(--h)); border-radius: 8px 8px 0 0;
  background: repeating-linear-gradient(-45deg, var(--ink-3) 0 1.5px, transparent 1.5px 7px);
}
.funnel__drop + .funnel__bar { border-radius: 0; }
.funnel__step:first-child .funnel__bar { border-radius: 8px 8px 0 0; }
.funnel__step--goal .funnel__bar { background: var(--good); }
.funnel__n { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.funnel__name { font-size: 15px; line-height: 1.3; hyphens: auto; }
.funnel__hint { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.funnel__metrics { row-gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.funnel__metric {
  grid-column: var(--from) / var(--to); display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius-s); background: var(--bg); font-size: 14px; line-height: 1.35;
}
.funnel__metric span { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.funnel__metric--main { background: var(--insight); color: var(--insight-ink); }
@media (max-width: 720px) {
  .funnel { padding: 18px 16px; }
  .funnel__steps, .funnel__metrics { grid-template-columns: 1fr; }
  .funnel__steps { row-gap: 18px; }
  .funnel__step { display: grid; grid-template-columns: 28px 1fr; column-gap: 8px; row-gap: 2px; }
  .funnel__col { grid-column: 1 / -1; order: 3; height: 20px; margin: 8px 0 0; flex-direction: row; justify-content: flex-start; border: 0; }
  .funnel__col .funnel__bar { order: -1; width: var(--h); height: 100%; border-radius: 6px 0 0 6px; }
  .funnel__step:first-child .funnel__bar { border-radius: 6px; }
  .funnel__drop { width: calc(var(--prev) - var(--h)); height: 100%; border-radius: 0 6px 6px 0; }
  .funnel__n { line-height: 1.6; }
  .funnel__name { grid-column: 2; }
  .funnel__hint { grid-column: 2; }
  .funnel__metric { grid-column: 1; flex-direction: column; gap: 2px; }
}
td.num.up { color: var(--insight-ink); font-size: 22px; line-height: 1; }

/* «Было → Стало»: карточки, проблема сверху, решение снизу, стрелка между ними.
   subgrid держит стрелки всех карточек ряда на одной линии */
.pairs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 32px 0 8px; }
.pair {
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 24px;
}
.pair p { margin: 0; }
.pair__label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pair__was { font-size: 15px; line-height: 1.5; color: var(--ink-3); }
.pair__now { font-size: 16px; line-height: 1.45; font-weight: 600; color: var(--ink); }
.pair__was .pair__label { color: var(--ink-3); }
.pair__now .pair__label { color: var(--insight-ink); }
.pair__arrow { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.pair__arrow::before, .pair__arrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pair__arrow i {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--insight); color: var(--insight-ink); font-style: normal; font-size: 16px; font-weight: 700; line-height: 1;
}
@media (max-width: 1024px) { .pairs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .pairs { grid-template-columns: 1fr; } }
.pairs.pairs--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .pairs.pairs--2 { grid-template-columns: 1fr; } }

/* Tree (IA) */
.tree { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 24px 0; }
.tree__col { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 13.5px; line-height: 1.4; }
.tree__col b { display: block; font-size: 15px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tree__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; color: var(--ink-2); }
.tree__col--home { background: var(--ink); color: #fff; border-color: var(--ink); }
.tree__col--home b { border-color: #333; }
.tree__col--home ul { color: #BDB6B9; }

/* Footer */
.end { margin-top: 140px; padding: 48px; border-radius: 28px; background: var(--ink); color: #fff; max-width: var(--wide); }
.end h2 { color: #fff; }
.end p { color: #BDB6B9; }
.end a.btn {
  display: inline-flex; align-items: center; height: 48px; padding: 0 22px; border-radius: 99px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 700;
}
.end__contacts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.end a.btn--ghost { background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.end a.btn--ghost:hover { box-shadow: inset 0 0 0 1px #fff; }
.end__top { display: inline-block; margin-top: 28px; font-size: 14px; color: #BDB6B9; text-decoration: none; }
.end__top:hover { color: #fff; }
@media (max-width: 720px) { .end a.btn { width: 100%; justify-content: center; } }

/* ============ Lightbox ============ */
.lb {
  position: fixed; inset: 0; z-index: 100; background: rgba(10,8,9,.94);
  display: none; flex-direction: column;
}
.lb.is-open { display: flex; }
.lb__bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: #D9D2D5; font-size: 14px; background: var(--stage); }
.lb__title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb__btn {
  height: 36px; min-width: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid #3A3135;
  background: #1A1517; color: #fff; font: 600 13px var(--font); cursor: pointer;
}
.lb__btn:hover { border-color: #6A5F63; }
.lb__view { flex: 1; overflow: auto; display: flex; }
.lb__view img { cursor: zoom-in; }
.lb__view img { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb__view.is-tall img { max-height: none; width: min(100%, 1400px); }
.lb__view.is-zoom img { cursor: grab; }
.lb__view.is-zoom img { max-width: none; max-height: none; height: auto; flex-shrink: 0; }
.lb__view.is-drag img { cursor: grabbing; }

/* ============ Reveal ============ */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .4s cubic-bezier(.2,.7,.2,1), transform .4s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
/* reduced motion + print: see the end of the file (must win over the responsive blocks) */

/* ============ Responsive ============ */
@media (max-width: 1280px) {
  .content { padding: 0 40px 100px; }
  .tree { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); z-index: 60; background: var(--bg);
    transform: translateX(-100%); transition: transform .25s ease, box-shadow .25s ease; box-shadow: none;
  }
  body.toc-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.2); }
  body.toc-open .scrim { opacity: 1; pointer-events: auto; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .mbar {
    display: flex; position: sticky; top: 0; z-index: 50; align-items: center; gap: 12px;
    height: 56px; padding: 0 16px; background: rgba(245,243,240,.92); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .mbar__btn { border: 1px solid var(--line); background: var(--surface); height: 36px; padding: 0 14px; border-radius: 99px; font: 600 13px var(--font); cursor: pointer; }
  .mbar__cur { font-size: 14px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .mbar .progress { position: absolute; left: 0; right: 0; bottom: -1px; }
  html { scroll-padding-top: 72px; }
  .content { padding: 0 24px 80px; }
  .section { padding-top: 80px; }
  .hero { padding-top: 40px; }
  .meta, .stats { grid-template-columns: repeat(2, 1fr); }
  .meta div:nth-child(3) { padding-left: 0; border-left: 0; }
  .meta div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .lead { font-size: 18px; }
  .content { padding: 0 16px 64px; }
  .grid-2, .grid-3, .ps, .ba { grid-template-columns: 1fr; }
  .ba__side + .ba__side { border-left: 0; border-top: 1px solid var(--stage-line); }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats.stats--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
  .stat { padding: 16px; }
  .stat__v { font-size: 30px; }
  .stage { padding: 14px; border-radius: 18px; }
  .bar-row { grid-template-columns: 1fr 72px; gap: 8px 12px; }
  .bar-row__label { grid-column: 1 / -1; }
  .chart { padding: 20px 16px 16px; }
  .tree { grid-template-columns: repeat(2, 1fr); }
  .end { padding: 28px; }
  h3 { margin-top: 48px; }
  .frame__scroll { max-height: 520px; }
  /* tables become stacked cards */
  .table-wrap { overflow: visible; border: 0; background: none; border-radius: 0; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: auto; }
  .table-wrap thead { display: none; }
  .table-wrap tr { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
  .table-wrap tr + tr { margin-top: 10px; }
  .table-wrap td { padding: 0; border: 0; }
  .table-wrap td + td { margin-top: 12px; }
  .table-wrap td:first-child { font-size: 16px; font-weight: 600; line-height: 1.35; }
  .table-wrap td + td::before {
    content: attr(data-label); display: block; margin-bottom: 4px;
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
  }
  .table-wrap td.num { display: flex; align-items: baseline; gap: 10px; white-space: normal; }
  .table-wrap td.num::before { margin: 0; }
}

/* ============ Hypothesis cards ============ */
.hyps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 12px; row-gap: 12px; margin: 28px auto 8px; }
/* subgrid: статус, гипотеза и dl каждой карточки лежат в общих строках ряда, поэтому разделители на одном уровне */
.hyp {
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 16px; align-content: start; padding: 24px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.hyp--ok,   .verdict--ok   { --hyp-c: var(--good);   --hyp-ink: var(--insight-ink); --hyp-bg: var(--insight); }
.hyp--warn, .verdict--warn { --hyp-c: #D9A23A;       --hyp-ink: var(--warn);        --hyp-bg: var(--warn-soft); }
.hyp--bad,  .verdict--bad  { --hyp-c: var(--bad);    --hyp-ink: var(--bad);         --hyp-bg: var(--accent-soft); }
.hyp__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hyp__status {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 10px; border-radius: 999px;
  background: var(--hyp-bg); color: var(--hyp-ink); font-size: 13px; font-weight: 700; line-height: 1.5;
}
.hyp__status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hyp-c); }
.hyp__group { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.hyp h4 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }
.hyp dl { display: grid; gap: 12px; align-content: start; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.hyp dl > div { display: grid; gap: 2px; }
.hyp dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.hyp dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.hyp dd a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.hyp dd a:hover { color: var(--accent); text-decoration-color: currentColor; }
@media (max-width: 720px) { .hyps { grid-template-columns: 1fr; } .hyp { padding: 20px; } }

/* Итоговые выводы: карточки в цветах итоговой таблицы */
.verdict { background: var(--hyp-bg); border-color: transparent; }
.verdict__label {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 13px; font-weight: 700; color: var(--hyp-ink);
}
.verdict__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hyp-c); }
.verdict p { color: var(--ink-2); }

/* Home: block order before / after */
.order { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0 12px; }
.order__col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.order__col--new { background: var(--ink); border-color: var(--ink); color: #fff; }
.order__title { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.order__col--new .order__title { color: var(--insight); }
.order ol { list-style: none; margin: 0; padding: 0; counter-reset: ord; }
.order li { counter-increment: ord; display: grid; grid-template-columns: 30px 1fr; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.order__col--new li { border-top-color: var(--stage-line); }
.order li::before { content: counter(ord, decimal-leading-zero); padding-top: 2px; font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.order li small { grid-column: 2; font-size: 13px; color: var(--ink-3); }
.order__col--new li small { color: #A8A1A4; }
#home .tabs__panel > .ps { margin-top: 20px; }
@media (max-width: 720px) { .order { grid-template-columns: 1fr; } }

/* Keep hyphenated terms (UI-кит, HADI-цикл) on one line */
.nowrap { white-space: nowrap; }

/* Very narrow phones (≈320): two columns no longer fit the longest word */
@media (max-width: 359px) {
  .meta, .stats, .tree { grid-template-columns: 1fr; }
  .meta div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Press feedback */
.mbar__btn, .lb__btn, .end a.btn { transition: transform .15s ease-out; }
.tabs__btn:active, .mbar__btn:active, .lb__btn:active, .end a.btn:active { transform: scale(.96); }
.slider__arrow:active { transform: translateY(-50%) scale(.96); }

/* Reduced motion and print. Kept last so it wins over the responsive blocks above.
   Print: IntersectionObserver never fires, so everything must be visible without it. */
@media (prefers-reduced-motion: reduce), print {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .bar > span { transition: none; }
  .chart:not(.is-in) .bar > span { transform: none; }
  .sidebar, .slider__arrow, .toc__exp svg { transition: none; }
}


/* Usability: hypothesis + status table */
.hyp-table td:last-child { white-space: nowrap; }
.hyp-table td:last-child .hyp__status { display: flex; }
@media (max-width: 720px) { .hyp-table td:last-child .hyp__status { display: inline-flex; } }
@media (min-width: 721px) { .table-wrap--fit { width: fit-content; max-width: 100%; } .hyp-table td:first-child { padding-right: 40px; } }

/* ============ Fix card (вторая итерация) ============ */
.fix { display: grid; gap: 20px; margin: 0 0 20px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.fix__head { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.fix__head h3 { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.fix__head h3 b { font-weight: 700; }
.fix__status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fix__was { opacity: .55; }
.fix__was::before { display: none; }
.fix__was { padding-left: 12px; text-decoration: line-through; text-decoration-thickness: 1px; }
.fix__now { display: inline-flex; align-items: center; gap: 8px; }
.fix__arrow { color: var(--ink-3); font-size: 15px; }
.fix__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.fix__step { display: grid; align-content: start; gap: 6px; padding: 16px 18px; background: var(--bg); border-radius: var(--radius-s); }
.fix__step dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.fix__step dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.fix__step--ok { background: var(--insight); }
.fix__step--ok dt { color: var(--insight-ink); display: flex; align-items: center; gap: 6px; }
.fix__step--ok dt::before { content: "✓"; font-size: 13px; letter-spacing: 0; }
.fix__step--ok dd { color: var(--ink); }
@media (max-width: 900px) { .fix__steps { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .fix { padding: 18px; gap: 16px; } .fix__head h3 { font-size: 17px; } }

@media (min-width: 721px) { .metrics-table { min-width: 760px; } }

/* ============ Round 128: no black cards, one label system ============ */
/* 1. Factoid: % no longer glued to the number */
.stat__v small { margin-left: .1em; }

/* 2. Green callout card */

/* 3. IA tree: home column is white like the rest */
.tree__col--home { background: var(--surface); color: var(--ink); border-color: var(--line); }
.tree__col--home b { border-color: var(--line); }
.tree__col--home ul { color: var(--ink-2); }

/* 4. ICE formula: inverted card */
.ice { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.ice__formula { font-size: clamp(18px, 2.2vw, 26px); font-weight: 700; letter-spacing: -.02em; }
.ice__key { color: var(--accent); }
.ice .muted { color: var(--ink-2); }
.ice b { color: var(--ink); }

/* 6. One label system for problem/solution and before/after everywhere:
      bigger, bolder, a coloured dot; red = problem / was, green = solution / now */
:root { --bad-on-dark: #FF6B6F; --good-on-dark: #5FD68E; }
.ps__label, .pair__label, .order__title, .fl__rl, .psr__head span, .fix__step dt, .ba__label {
  font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.ps__label, .pair__label, .order__title, .ba__label { display: flex; align-items: center; gap: 8px; }
.ps__label::before, .pair__label::before, .order__title::before, .ba__label::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: none;
}
/* problem / was */
.ps__col--p .ps__label, .pair__was .pair__label, .order__col:not(.order__col--new) .order__title,
.fl__rl:not(.fl__rl--now), .psr__head span:nth-child(2), .fix__step:first-child dt { color: var(--bad); }
.ba__side--old .ba__label { color: var(--bad-on-dark); }
/* solution / now */
.ps__col--s .ps__label, .pair__now .pair__label, .order__col--new .order__title,
.fl__rl--now, .psr__head span:last-child, .fix__step:nth-child(2) dt { color: var(--insight-ink); }
.ba__side--new .ba__label { color: var(--good-on-dark); }
.ba__side--new .ba__label::before { background: currentColor; box-shadow: 0 0 0 4px rgba(95,214,142,.22); }
.ba__side--old .ba__label::before { box-shadow: 0 0 0 4px rgba(255,107,111,.2); }

/* solution columns: white instead of black */
.ps__col--s { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.ps__col--s li::before { color: var(--insight-ink); }
.order__col--new { background: var(--surface); color: var(--ink); border-color: var(--line); }
.order__col--new li { border-top-color: var(--line); }

/* 8. Geek card */
.geek {
  position: relative; margin: 20px 0 28px; padding: 22px 26px 20px;
  background: var(--surface); border: 1.5px dashed #CFC8C3; border-radius: var(--radius);
}
.geek p { margin: 0; }
.lbl { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lbl::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lbl--good { color: var(--insight-ink); }
.lbl--warn { color: #E8A900; }

/* ============ Round 129 ============ */
/* 1. ICE key in black, like the rest of the formula */
.ice__key { color: var(--ink); }

/* 7. Big headings span the wide column instead of the text column */
.section > h2:not(.wide):not(.full) { max-width: var(--wide); text-wrap: pretty; }

/* 3. Key insight card: label + regular-weight text */

/* 5. Results under the chart: factoid-style cards "was → now" */
.shift { margin: 32px 0; }
.shift > .lbl { margin-bottom: 14px; }
.shift__grid + .lbl { margin-top: 32px; }
.shift__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.shift__grid--3 { grid-template-columns: repeat(3, 1fr); }
.shift__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.shift__v { display: flex; align-items: baseline; gap: .35em; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.shift__v span { font-size: 22px; font-weight: 700; color: var(--ink-3); }
.shift__v i { font-style: normal; font-size: 22px; font-weight: 500; color: var(--ink-3); margin: 0 .1em; }
.shift__v b { font-size: 34px; font-weight: 800; color: var(--insight-ink); }
.shift__l { margin-top: 12px; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.shift__n { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
@media (max-width: 1024px) { .shift__grid, .shift__grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .shift__grid, .shift__grid--3 { grid-template-columns: 1fr; } }

/* 10. Geek heading with a big emoji */
.geek-h { display: flex; align-items: center; gap: 14px; }
.geek-h__emoji { font-size: 44px; line-height: 1; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.geek { margin-top: 14px; }
.chart .legend span { white-space: nowrap; }

/* ============ Round 130 ============ */
/* 4. Tree-test chart: bars back, large numbers */
.bar-row { grid-template-columns: minmax(200px, 280px) 1fr 160px 60px; gap: 24px; padding: 18px 0; }
.bar-row__label { font-size: 16px; }
.bar-row__track { gap: 5px; }
.bar { height: 14px; border-radius: 7px; }
.bar > span { border-radius: 7px; }
.bar--old > span { background: #BDB5AF; }
.chart .legend .l-old { background: #BDB5AF; box-shadow: none; }
.chart .legend i { border-radius: 3px; }
.bar-row__val { display: flex; align-items: baseline; justify-content: flex-end; gap: .4em; white-space: nowrap; font-size: 16px; line-height: 1.2; }
.bar-row__old { font-weight: 600; color: var(--ink-3); }
.bar-row__val i { font-style: normal; color: var(--ink-3); }
.bar-row__val b { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.bar-row--down .bar-row__val b { color: var(--bad); }
.bar-row__delta {
  justify-self: end; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
  padding: 3px 9px; border-radius: 99px; background: var(--insight); color: var(--insight-ink);
}
.bar-row--down .bar-row__delta { background: var(--accent-soft); color: var(--bad); }
.bar-row--total .bar-row__val b { font-size: 26px; }
@media (max-width: 1024px) { .bar-row { grid-template-columns: minmax(160px, 220px) 1fr 140px 56px; gap: 16px; } }
@media (max-width: 720px) {
  .bar-row { grid-template-columns: 1fr auto auto; gap: 10px 12px; padding: 14px 0; }
  .bar-row__label { grid-column: 1 / -1; font-size: 15px; }
  .bar-row__val b { font-size: 19px; }
}

/* 5. Not a failure: yellow */
.shift__card--warn .shift__v b { color: var(--warn); }

/* Kit typography: whole image visible in the preview */
.stage--fit { display: flex; justify-content: center; padding: 24px; }
.stage--fit img { width: auto; max-width: 100%; max-height: min(720px, 78vh); }

/* ============ Round 300 ============ */
/* 2. Card sorting key insight: green block like AS IS, one wide white card */
.insights--cards:has(> :only-child) { grid-template-columns: 1fr; }
.takeaways--single { margin-top: 32px; }
/* 3. More air between chart rows */
.bar-row { padding: 26px 0; }
.bar-row--total { padding-top: 28px; }
@media (max-width: 720px) { .bar-row { padding: 20px 0; } }
/* 4. Brighter yellow instead of mustard */
.shift__card--warn .shift__v b { color: #E8A900; }

/* Links to the raw Pathway reports under each test */
.report-link { font-size: 15px; font-weight: 600; }
.report-link a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.report-link a:hover { text-decoration-thickness: 2px; }

/* h2: force the tail onto its own line */
.nl { display: block; }

/* ICE table: row colour = priority (colours sampled from the table images) */
.ice-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 12px; font-size: 14px; color: var(--ink-2); }
.ice-legend__title { color: var(--ink); font-weight: 600; }
.ice-legend span { white-space: nowrap; }
.ice-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; box-shadow: inset 0 0 0 1px rgba(19,17,18,.12); }
.ice-legend__low { background: #CCF4D2; }
.ice-legend__mid { background: #FFECBC; }
.ice-legend__high { background: #FFE1C2; }
.ice-legend__top { background: #FFC7C1; }
