/* ============================================================
   Шпаргалка «СДВГ и обучение» — инженерный журнал / ЦУП
   Палитра: navy #102A43, paper #F7F3EA, signal #F26B3A,
   mint #74C69D, ink #172B3A
   ============================================================ */

:root {
  --navy: #102A43;
  --navy-deep: #0B1F33;
  --navy-panel: #16344F;
  --paper: #F7F3EA;
  --sand: #EEE6D6;
  --signal: #F26B3A;
  --signal-deep: #D14F22;
  --mint: #74C69D;
  --mint-deep: #2F7D57;
  --ink: #172B3A;
  --muted: #4A5D70;
  --muted-dark: #A9BCCF;
  --line: rgba(23, 43, 58, .16);
  --line-dark: rgba(247, 243, 234, .18);
  --warn: #E9B44C;
  --danger: #E2574C;
  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  --wrap: 1180px;
  --r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.12; font-weight: 800; }
p { margin: 0 0 .9em; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

::selection { background: var(--signal); color: var(--paper); }

/* Фокус — заметный везде */
:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
  border-radius: 3px;
}
.section--dark :focus-visible,
.topbar :focus-visible,
.pdlg :focus-visible {
  outline-color: var(--mint);
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 300;
  background: var(--signal);
  color: var(--ink);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--r);
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

/* ------------------- Шапка ------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 42, 67, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}
.topbar__in {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  font-weight: 800;
  letter-spacing: .02em;
  flex-shrink: 0;
}
.brand__mark { width: 30px; height: 30px; }
.brand__txt b { color: var(--signal); padding-inline: 2px; }
.topnav {
  display: flex;
  gap: 4px;
  margin-inline: auto;
}
.topnav a {
  color: var(--muted-dark);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 600;
  padding: 8px 11px;
  border-radius: var(--r);
  transition: color .15s ease, background .15s ease;
}
.topnav a:hover { color: var(--paper); background: rgba(247, 243, 234, .08); }

/* ------------------- Кнопки ------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: var(--r);
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: .98rem;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:active { transform: translateY(1px); }

.btn--signal {
  background: var(--signal);
  color: var(--ink);
  border-color: var(--signal);
}
.btn--signal:hover { background: var(--signal-deep); border-color: var(--signal-deep); color: #fff; }

.btn--ghost {
  background: transparent;
  border-color: currentColor;
}
.section--dark .btn--ghost, .topbar .btn--ghost, .pdlg .btn--ghost { color: var(--paper); }
.btn--ghost:hover { background: rgba(23, 43, 58, .07); }
.section--dark .btn--ghost:hover, .pdlg .btn--ghost:hover { background: rgba(247, 243, 234, .1); }

.btn--text {
  background: transparent;
  color: var(--muted);
  padding-inline: 10px;
}
.section--dark .btn--text, .pdlg .btn--text { color: var(--muted-dark); }
.btn--text:hover { color: var(--ink); }
.section--dark .btn--text:hover, .pdlg .btn--text:hover { color: var(--paper); }

.btn--l { min-height: 52px; padding: 14px 26px; font-size: 1.04rem; }
.btn--s { min-height: 40px; padding: 8px 14px; font-size: .88rem; }
.btn[disabled] { opacity: .42; cursor: not-allowed; transform: none; }

/* ------------------- Секции ------------------- */
.section { padding-block: clamp(64px, 9vw, 110px); position: relative; }
.section--paper { background: var(--paper); }
.section--sand { background: var(--sand); }
.section--dark {
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(242, 107, 58, .10), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--paper);
}
.section--navy { background: var(--navy); color: var(--paper); }

.blueprint {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(247, 243, 234, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 243, 234, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 90%);
}
.section--dark > .wrap, .section--navy > .wrap { position: relative; }

/* Заголовки секций */
.sec-head { max-width: 760px; margin-bottom: clamp(34px, 5vw, 54px); }
.sec-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 14px;
}
.sec-tag span {
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 1px 9px 0;
  line-height: 1.15;
}
.sec-tag--light { color: var(--mint); }
.sec-tag--light span { background: transparent; color: var(--paper); border-color: var(--paper); }
.sec-title {
  font-size: clamp(1.85rem, 3.6vw, 2.9rem);
  letter-spacing: -.015em;
  margin-bottom: 16px;
}
.sec-lead { font-size: clamp(1rem, 1.5vw, 1.14rem); color: var(--muted); }
.section--dark .sec-lead, .section--navy .sec-lead { color: var(--muted-dark); }

/* ------------------- Первый экран ------------------- */
.hero { padding-block: clamp(56px, 8vw, 96px) clamp(64px, 9vw, 110px); }
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mint);
  border: 1px solid var(--line-dark);
  border-radius: 100px;
  padding: 8px 16px;
  margin-bottom: 26px;
}
.kicker__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(242, 107, 58, .5);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(242, 107, 58, .55); }
  70%, 100% { box-shadow: 0 0 0 12px rgba(242, 107, 58, 0); }
}
.hero__title {
  font-size: clamp(2.35rem, 5.2vw, 4.1rem);
  letter-spacing: -.02em;
  margin-bottom: 22px;
}
.hero__title .hl { color: var(--signal); }
.lead {
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  color: var(--muted-dark);
  max-width: 34em;
  margin-bottom: 30px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.hero__note {
  font-size: .86rem;
  color: var(--muted-dark);
  border-left: 3px solid var(--signal);
  padding-left: 14px;
  max-width: 44em;
  margin-bottom: 0;
}

/* SVG-маршрут */
.hero__vis { max-width: 560px; margin-inline: auto; width: 100%; }
.route { width: 100%; height: auto; overflow: visible; }
.route__orbit {
  fill: none;
  stroke: rgba(247, 243, 234, .16);
  stroke-width: 1;
  stroke-dasharray: 3 7;
}
.route__orbit--2 { stroke: rgba(116, 198, 157, .22); }
.route__line {
  stroke: var(--signal);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 12 9;
  animation: routeFlow 3.2s linear infinite;
}
@keyframes routeFlow { to { stroke-dashoffset: -84; } }
.route__dot { fill: var(--navy-panel); stroke: var(--mint); stroke-width: 2; }
.route__core { fill: var(--signal); }
.route__label {
  fill: var(--paper);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: .12em;
  text-anchor: middle;
}
.route__sub {
  fill: var(--muted-dark);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-anchor: middle;
  text-transform: uppercase;
}
.route__stamp {
  fill: rgba(247, 243, 234, .34);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
}
.rocket__body { fill: none; stroke: var(--paper); stroke-width: 2.4; }
.rocket__win { fill: none; stroke: var(--mint); stroke-width: 2; }
.rocket__fin { fill: none; stroke: var(--paper); stroke-width: 2; stroke-linejoin: round; }
.rocket__flame { fill: var(--signal); opacity: .9; transform-origin: 415px 46px; animation: flick 1.6s ease-in-out infinite; }
@keyframes flick { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.18); } }

/* ------------------- Вкладки ------------------- */
.tabs__list {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 26px;
}
.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1.5px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--muted);
  min-height: 48px;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.tabs__tab:hover { color: var(--ink); background: rgba(23, 43, 58, .04); }
.tabs__tab.is-active { color: var(--ink); border-bottom-color: var(--signal); }
.tabs__num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: .06em;
  color: var(--signal);
}
.section--dark .tabs__list { border-bottom-color: var(--line-dark); }
.section--dark .tabs__tab { color: var(--muted-dark); }
.section--dark .tabs__tab:hover { color: var(--paper); background: rgba(247, 243, 234, .06); }
.section--dark .tabs__tab.is-active { color: var(--paper); border-bottom-color: var(--mint); }
.section--dark .tabs__num { color: var(--mint); }
.tabs__list--wrap { flex-wrap: wrap; border-bottom: none; gap: 10px; }
.tabs__list--wrap .tabs__tab {
  border: 1.5px solid var(--line-dark);
  border-radius: 100px;
  margin-bottom: 0;
  padding: 9px 18px;
}
.tabs__list--wrap .tabs__tab.is-active { background: var(--signal); border-color: var(--signal); color: var(--ink); }

.tabs__panel { animation: panelIn .28s ease both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: start;
}
.panel-title { font-size: 1.35rem; margin-bottom: 14px; }

.ticks li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .34em;
  width: 16px; height: 16px;
  border: 1.6px solid var(--mint-deep);
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 44%, var(--mint-deep) 44%, var(--mint-deep) 56%, transparent 56%) center/9px 9px no-repeat;
}
.ticks--dark li::before { border-color: var(--mint); background: linear-gradient(45deg, transparent 44%, var(--mint) 44%, var(--mint) 56%, transparent 56%) center/9px 9px no-repeat; }
.ticks b { font-weight: 800; }

.verdict {
  background: var(--sand);
  border-left: 4px solid var(--signal);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 16px 18px;
  margin-top: 20px;
}
.verdict__label {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--signal-deep);
  margin-bottom: 6px;
}
.verdict p { margin-bottom: 0; }

.scheme {
  background: var(--navy);
  color: var(--paper);
  border-radius: var(--r);
  padding: 24px;
  margin: 0;
}
.scheme__cap {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 16px;
}
.scheme__chain { display: grid; gap: 0; }
.scheme__chain li {
  position: relative;
  padding: 10px 0 10px 34px;
  font-weight: 700;
}
.scheme__chain li::before {
  content: counter(list-item, decimal-leading-zero);
  position: absolute;
  left: 0; top: 10px;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  color: var(--signal);
}
.scheme__chain li::after {
  content: "";
  position: absolute;
  left: 10px; top: 34px;
  bottom: -2px;
  width: 1.5px;
  background: var(--line-dark);
}
.scheme__chain li:last-child::after { display: none; }
.scheme__chain li:last-child { color: var(--mint); }

.compare-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 30px;
  padding: 16px 20px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  color: var(--muted);
  font-size: .98rem;
}
.compare-note svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--signal); margin-top: 2px; }
.compare-note p { margin: 0; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-weight: 700;
  color: var(--signal-deep);
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
}
.link-arrow svg { width: 15px; height: 15px; transition: transform .15s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ------------------- Протокол «зависания» ------------------- */
.proto {
  background: rgba(247, 243, 234, .04);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  padding: clamp(22px, 4vw, 40px);
}
.proto__rail { margin-bottom: 24px; }
.proto__progress {
  height: 4px;
  background: rgba(247, 243, 234, .14);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}
.proto__progress-bar {
  display: block;
  height: 100%;
  width: 20%;
  background: var(--signal);
  border-radius: 4px;
  transition: width .3s ease;
}
.proto__dots { display: flex; justify-content: space-between; }
.proto__dots li {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.6px solid rgba(247, 243, 234, .4);
  transition: background .2s ease, border-color .2s ease;
}
.proto__dots li.is-active { background: var(--signal); border-color: var(--signal); }
.proto__dots li.is-done { background: var(--mint); border-color: var(--mint); }

.proto__step { animation: panelIn .25s ease both; }
.proto__stepnum {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 10px;
}
.proto__step h3 { font-size: 1.5rem; margin-bottom: 14px; }
.proto__step > p { color: var(--muted-dark); max-width: 46em; }

.say {
  margin: 0 0 14px;
  padding: 16px 20px;
  background: rgba(116, 198, 157, .1);
  border-left: 4px solid var(--mint);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--paper);
}
.say--card { background: rgba(116, 198, 157, .12); }
.ticks--dark { margin-top: 14px; color: var(--muted-dark); }

.ladder-preview { counter-reset: lad; margin: 14px 0; }
.ladder-preview li {
  position: relative;
  padding: 8px 0 8px 42px;
  border-bottom: 1px dashed var(--line-dark);
}
.ladder-preview li:last-child { border-bottom: none; }
.ladder-preview li::before {
  counter-increment: lad;
  content: counter(lad, decimal-leading-zero);
  position: absolute;
  left: 0; top: 8px;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  color: var(--signal);
  border: 1.4px solid var(--signal);
  border-radius: 4px;
  padding: 1px 5px;
}
.ladder-preview b { color: var(--paper); }

.ok { color: var(--mint); }
.warn { color: var(--warn); }
.proto__aftermark {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--muted-dark);
  border-top: 1px dashed var(--line-dark);
  padding-top: 14px;
}
.proto__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
  border-top: 1px solid var(--line-dark);
  padding-top: 22px;
}
.proto__controls .btn--text { margin-left: auto; }

.stress-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 18px 20px;
  border: 1.5px solid rgba(226, 183, 76, .45);
  background: rgba(226, 183, 76, .08);
  border-radius: var(--r);
}
.stress-note svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--warn); margin-top: 2px; }
.stress-note p { margin: 0; color: var(--paper); }

/* ------------------- Режимы дня ------------------- */
.mode__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  background: var(--navy);
  color: var(--paper);
  border-radius: 100px;
  padding: 6px 14px;
}
.chip--outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.chip--mint { background: var(--mint-deep); }
.mode__when { color: var(--muted); margin-bottom: 18px; }
.blocks3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  counter-reset: blk;
  margin-bottom: 18px;
}
.blocks3 li {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 40px 18px 18px;
  counter-increment: blk;
}
.blocks3 li::before {
  content: counter(blk, upper-alpha);
  position: absolute;
  top: 12px; left: 16px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--signal);
  line-height: 1;
}
.mode__total {
  font-weight: 700;
  color: var(--ink);
  border-left: 4px solid var(--mint-deep);
  padding-left: 14px;
  margin-bottom: 0;
}
.rule-banner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 28px;
  background: var(--navy);
  color: var(--paper);
  border-radius: 10px;
  padding: clamp(20px, 3vw, 30px);
}
.rule-banner svg { width: 34px; height: 34px; flex-shrink: 0; color: var(--mint); }
.rule-banner p { margin: 0; }
.rule-banner b { color: var(--mint); }

/* ------------------- До / после (аккордеон) ------------------- */
.accordion { display: grid; gap: 12px; }
.acc-item {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .15s ease;
}
.acc-item:has(.acc-item__btn[aria-expanded="true"]) { border-color: var(--ink); }
.acc-item__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 58px;
  background: none;
  border: none;
  text-align: left;
  padding: 16px 20px;
}
.acc-item__was {
  font-weight: 800;
  font-size: 1.08rem;
  text-decoration: line-through;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
}
.acc-item__arrow {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  transition: transform .2s ease, background .2s ease;
}
.acc-item__arrow svg { width: 16px; height: 16px; }
.acc-item__btn[aria-expanded="true"] .acc-item__arrow { transform: rotate(180deg); background: var(--signal); border-color: var(--signal); color: var(--ink); }
.acc-item__body { padding: 0 20px; }
.acc-item__body > div { padding-bottom: 18px; }
.became {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  border-top: 1.5px dashed var(--line);
  padding-top: 16px;
}
.became__tag {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #fff;
  background: var(--mint-deep);
  border-radius: 4px;
  padding: 4px 8px;
  margin-top: 3px;
}
.became p { margin: 0; }
.acc-hint { margin-top: 18px; color: var(--muted); font-size: .92rem; }

/* ------------------- Предметы ------------------- */
.subj__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: start;
}
.subj h3 { font-size: 1.3rem; margin-bottom: 12px; }
.subj__col > p { color: var(--muted-dark); }
.subj__col--card {
  background: rgba(247, 243, 234, .05);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  padding: 22px;
}
.mini-cap {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 12px;
}
.mini-cap--ink { color: var(--signal-deep); }
.mini-note { font-size: .9rem; color: var(--muted-dark); margin-top: 12px; margin-bottom: 0; }
.mini-note--warn { color: var(--warn); font-weight: 600; }
.steps-list { counter-reset: stp; margin: 8px 0 14px; }
.steps-list li {
  position: relative;
  padding: 7px 0 7px 36px;
  color: var(--muted-dark);
}
.steps-list li b { color: var(--paper); }
.steps-list li::before {
  counter-increment: stp;
  content: counter(stp, decimal-leading-zero);
  position: absolute;
  left: 0; top: 7px;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  color: var(--signal);
}
.steps-list--card li { color: var(--muted-dark); }
.steps-list--card li b { color: var(--paper); }

.limit-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 26px;
  border: 1.5px solid var(--line-dark);
  border-radius: var(--r);
  padding: 18px 20px;
  color: var(--muted-dark);
}
.limit-note svg { width: 26px; height: 26px; flex-shrink: 0; color: var(--signal); margin-top: 2px; }
.limit-note p { margin: 0; }
.limit-note b { color: var(--paper); }

/* ------------------- Шесть недель ------------------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: none;
  margin-bottom: 40px;
}
.timeline__step {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 46px 20px 20px;
}
.timeline__num {
  position: absolute;
  top: 0; left: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: .04em;
  color: var(--paper);
  background: var(--navy);
  border-radius: 4px 0 var(--r) 0;
  padding: 4px 12px 2px;
  line-height: 1.1;
}
.timeline__step:nth-child(4) .timeline__num, .timeline__step:nth-child(5) .timeline__num, .timeline__step:nth-child(6) .timeline__num { background: var(--signal-deep); }
.timeline__step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.timeline__step p { margin: 0; color: var(--muted); font-size: .94rem; }

.mission {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 44px);
  background: var(--navy);
  color: var(--paper);
  border-radius: 12px;
  padding: clamp(24px, 4vw, 44px);
  align-items: start;
}
.mission__intro h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 12px; }
.mission__intro p { color: var(--muted-dark); }
.mission__safe {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--mint) !important;
  font-size: .92rem;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 0;
}
.mission__safe svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.mission__list { display: grid; gap: 12px; }
.mission__list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted-dark);
}
.mission__list li b { color: var(--paper); }
.mission__list li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--signal);
}

/* ------------------- Сценарии ------------------- */
.scn-search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 560px;
  background: rgba(247, 243, 234, .06);
  border: 1.5px solid var(--line-dark);
  border-radius: 100px;
  padding: 4px 20px;
  margin-bottom: 26px;
}
.scn-search svg { width: 18px; height: 18px; color: var(--mint); flex-shrink: 0; }
.scn-search input {
  flex: 1;
  min-height: 44px;
  background: none;
  border: none;
  color: var(--paper);
  font: inherit;
  font-size: .98rem;
}
.scn-search input::placeholder { color: var(--muted-dark); }
.scn-search input:focus { outline: none; }
.scn-search:focus-within { border-color: var(--mint); }

.scn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.scn {
  position: relative;
  background: rgba(247, 243, 234, .05);
  border: 1.5px solid var(--line-dark);
  border-radius: var(--r);
  padding: 18px;
  text-align: left;
  transition: border-color .15s ease, background .15s ease;
  min-height: 76px;
}
.scn:hover { border-color: var(--mint); background: rgba(116, 198, 157, .07); }
.scn__title { display: block; font-weight: 800; font-size: 1rem; padding-right: 26px; }
.scn::after {
  content: "+";
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--signal);
  transition: transform .2s ease;
}
.scn[aria-expanded="true"]::after { transform: rotate(45deg); }
.scn__body { display: block; margin-top: 14px; }
.scn__do, .scn__avoid { display: block; padding-left: 14px; margin-bottom: 10px; font-size: .93rem; }
.scn__do { border-left: 3px solid var(--mint); color: var(--paper); }
.scn__avoid { border-left: 3px solid var(--danger); color: var(--muted-dark); margin-bottom: 0; }
.scn-empty { margin-top: 20px; color: var(--muted-dark); }

/* ------------------- Школа ------------------- */
.school-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}
.school-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: var(--r);
  padding: 22px;
}
.school-card--accent { border-top-color: var(--signal); }
.school-card h3 { font-size: 1.12rem; margin-bottom: 12px; }
.school-card .ticks li { font-size: .95rem; }

.copybox {
  background: var(--sand);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: clamp(22px, 4vw, 36px);
}
.copybox__head h3 { font-size: 1.3rem; margin-bottom: 6px; }
.copybox__head p { color: var(--muted); margin-bottom: 18px; }
.copybox__text {
  margin: 0 0 20px;
  background: #fff;
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  font-size: .96rem;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-line;
}
.copybox__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.copybox__status { margin: 0; font-weight: 700; color: var(--mint-deep); }
.copybox__status.is-error { color: var(--danger); }

/* ------------------- Печать — CTA ------------------- */
.print-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.print-cta__actions { display: grid; gap: 14px; justify-items: start; }
.print-cta__hint { margin: 0; color: var(--muted-dark); font-size: .9rem; max-width: 30em; }

/* ------------------- Доказательная база ------------------- */
.ev-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.ev-card {
  border-radius: var(--r);
  padding: 22px;
  background: #fff;
  border: 1.5px solid var(--line);
}
.ev-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.ev-card .ticks li { font-size: .94rem; }
.ev-card--strong { border-top: 4px solid var(--mint-deep); }
.ev-card--add { border-top: 4px solid var(--navy); }
.ev-card--no { border-top: 4px solid var(--signal); }
.ev-note { margin: 14px 0 0; font-size: .88rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; }

.src-details {
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  margin-bottom: 26px;
}
.src-details summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 14px 20px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.src-details summary::-webkit-details-marker { display: none; }
.src-details summary::before {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--signal);
  margin-right: 12px;
  transition: transform .2s ease;
}
.src-details[open] summary::before { transform: rotate(45deg); }
.src-list { padding: 0 20px 18px 46px; }
.src-list li { list-style: disc; margin-bottom: 8px; font-size: .93rem; color: var(--muted); }
.src-list a { color: var(--signal-deep); font-weight: 600; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.src-list a:hover { color: var(--ink); }

.med-note {
  background: var(--navy);
  color: var(--paper);
  border-radius: 10px;
  padding: clamp(20px, 3vw, 30px);
}
.med-note h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--mint); }
.med-note p { margin: 0; color: var(--muted-dark); font-size: .94rem; }

/* ------------------- Футер ------------------- */
.footer {
  background: var(--navy-deep);
  color: var(--muted-dark);
  border-top: 1px solid var(--line-dark);
  padding-block: 40px;
}
.footer__in { display: grid; gap: 22px; }
.footer__brand { display: flex; gap: 14px; align-items: flex-start; max-width: 560px; }
.footer__brand .brand__mark { width: 34px; height: 34px; color: var(--paper); flex-shrink: 0; }
.footer__brand p { margin: 0; font-size: .92rem; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer__nav a { color: var(--muted-dark); text-decoration: none; font-size: .92rem; font-weight: 600; }
.footer__nav a:hover { color: var(--paper); }
.footer__fine { margin: 0; font-size: .82rem; color: rgba(169, 188, 207, .65); }

/* ------------------- Мобильная панель ------------------- */
.mobile-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 120;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0));
  background: rgba(11, 31, 51, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-dark);
}
.mobile-bar__btn { width: 100%; }

/* ------------------- Модальное окно протокола ------------------- */
.pdlg {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(620px, calc(100vw - 32px));
  width: 100%;
  margin: auto;
  color: var(--paper);
}
.pdlg::backdrop { background: rgba(11, 31, 51, .72); backdrop-filter: blur(4px); }
.pdlg[open] { animation: dlgIn .22s ease both; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.pdlg__in {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  border: 1px solid var(--line-dark);
  border-radius: 14px;
  padding: clamp(20px, 4vw, 32px);
}
.pdlg__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.pdlg__head h2 { font-size: 1.5rem; }
.pdlg__close {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(247, 243, 234, .06);
  border: 1.5px solid var(--line-dark);
  border-radius: 50%;
  color: var(--paper);
  transition: background .15s ease;
}
.pdlg__close:hover { background: var(--signal); color: var(--ink); }
.pdlg__close svg { width: 18px; height: 18px; }
.pstep { animation: panelIn .25s ease both; }
.pstep__num {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 12px;
}
.pstep p { color: var(--muted-dark); }
.stress-inline {
  border-top: 1px dashed var(--line-dark);
  padding-top: 12px;
  font-size: .9rem;
}
.pdlg__progress { display: flex; gap: 8px; margin: 20px 0; }
.pdlg__progress span {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgba(247, 243, 234, .15);
}
.pdlg__progress span.is-active { background: var(--signal); }
.pdlg__progress span.is-done { background: var(--mint); }
.pdlg__controls { display: flex; flex-wrap: wrap; gap: 10px; }
.pdlg__controls .btn--signal { margin-left: auto; }

/* ------------------- Тост ------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 250;
  background: var(--ink);
  color: var(--paper);
  border-left: 4px solid var(--mint);
  border-radius: var(--r);
  padding: 13px 20px;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(11, 31, 51, .4);
  animation: toastIn .25s ease both;
  max-width: min(480px, calc(100vw - 32px));
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast.is-error { border-left-color: var(--danger); }

/* ------------------- Появление при скролле ------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ------------------- Печатная версия ------------------- */
.print-only { display: none; }

@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .topbar, main, .footer, .mobile-bar, .pdlg, .toast { display: none !important; }
  .print-only { display: block; }
  .print-only h1 { font-size: 20pt; margin-bottom: 4pt; }
  .print-sub { font-size: 9.5pt; color: #333; margin-bottom: 14pt; }
  .print-only h2 {
    font-size: 12.5pt;
    margin: 14pt 0 6pt;
    padding-top: 6pt;
    border-top: 1.5pt solid #000;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
  }
  .print-table th, .print-table td {
    border: 1pt solid #000;
    padding: 4pt 6pt;
    text-align: left;
    vertical-align: top;
  }
  .print-table th { background: #eee; }
  .print-ol { padding-left: 16pt; }
  .print-ol li { list-style: decimal; margin-bottom: 3pt; }
  .print-note { font-size: 8.5pt; color: #333; margin: 4pt 0 0; }
  .print-diary td { height: 16pt; }
}

/* ------------------- Адаптив ------------------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__vis { order: -1; max-width: 440px; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .school-grid { grid-template-columns: 1fr; }
  .ev-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .topnav { display: none; }
  .panel-grid, .subj__grid, .mission, .print-cta { grid-template-columns: 1fr; }
  .blocks3 { grid-template-columns: 1fr; }
  .tabs__list { overflow-x: auto; scrollbar-width: none; }
  .tabs__list::-webkit-scrollbar { display: none; }
  .tabs__tab { flex-shrink: 0; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .kicker { font-size: .68rem; letter-spacing: .12em; padding: 7px 13px; }
  .hero__cta .btn { width: 100%; }
  .timeline { grid-template-columns: 1fr; }
  .scn-grid { grid-template-columns: 1fr; }
  .proto__controls .btn--text { margin-left: 0; width: 100%; }
  .proto__controls .btn { flex: 1; }
  .copybox__actions .btn { width: 100%; }
  .became { grid-template-columns: 1fr; gap: 8px; }
  .became__tag { justify-self: start; margin-top: 0; }
  .mobile-bar { display: block; }
  body { padding-bottom: 74px; }
  .topbar__in { min-height: 56px; }
  .topbar .btn { display: none; }
}

/* ------------------- Уменьшенная анимация ------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .route__line { animation: none; }
}

/* ============================================================
   Тулбар инструментов семьи (Пульт / Итоги / Тетрадь / Олимпиада)
   ============================================================ */
.toolsbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px var(--gutter, 20px) 0;
}
.toolsbar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--sand);
  border: 1.6px solid var(--ink);
  border-radius: var(--r);
  padding: 6px 12px;
  text-decoration: none;
  transition: background .15s ease, transform .1s ease;
}
.toolsbar a:hover { background: var(--mint); }
.toolsbar a:active { transform: scale(.97); }
@media (max-width: 640px) {
  .toolsbar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; scrollbar-width: none; }
  .toolsbar::-webkit-scrollbar { display: none; }
  .toolsbar a { white-space: nowrap; }
}
