/* Изнанка — общий стиль прототипа.
   Цвет на странице несёт смысл: четыре потока (тепло, ветер, вода, пар) и чернила.
   Всё остальное нейтрально. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #121318;
  --ink-2: #4a4e5a;
  --ink-3: #6b7080;
  --line: #dde0e6;
  --line-soft: #eceef2;
  --body: #22252e;

  --heat: #f0441f;
  --heat-ink: #c2330f;
  --heat-wash: #fde7e1;
  --wind: #00a07e;
  --wind-ink: #00765d;
  --wind-wash: #dcf4ed;
  --water: #2b63f0;
  --water-ink: #1f4fc9;
  --water-wash: #e2eafd;
  --vapor: #7c4deb;
  --vapor-ink: #6236cf;
  --vapor-wash: #ece5fc;

  --font-display: "Geologica", "Golos Text", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, sans-serif;

  --measure: 68ch;
  --wide: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101115;
    --surface: #17191f;
    --ink: #edeef2;
    --ink-2: #b2b6c2;
    --ink-3: #8a8f9c;
    --line: #2a2d36;
    --line-soft: #1f2129;
    --body: #3b3f4c;
    --heat: #ff6a45;
    --heat-ink: #ff8a6b;
    --heat-wash: #3a1d16;
    --wind: #19c79d;
    --wind-ink: #4fdbb6;
    --wind-wash: #0f2e27;
    --water: #5b8bff;
    --water-ink: #8aaeff;
    --water-wash: #172340;
    --vapor: #a07bff;
    --vapor-ink: #bba0ff;
    --vapor-wash: #261d40;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #101115;
  --surface: #17191f;
  --ink: #edeef2;
  --ink-2: #b2b6c2;
  --ink-3: #8a8f9c;
  --line: #2a2d36;
  --line-soft: #1f2129;
  --body: #3b3f4c;
  --heat: #ff6a45;
  --heat-ink: #ff8a6b;
  --heat-wash: #3a1d16;
  --wind: #19c79d;
  --wind-ink: #4fdbb6;
  --wind-wash: #0f2e27;
  --water: #5b8bff;
  --water-ink: #8aaeff;
  --water-wash: #172340;
  --vapor: #a07bff;
  --vapor-ink: #bba0ff;
  --vapor-wash: #261d40;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--water);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

.num {
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Шапка ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 20px var(--gutter);
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.flows {
  display: inline-flex;
  gap: 3px;
}

.flows i {
  display: block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
}

.flows .heat { background: var(--heat); }
.flows .wind { background: var(--wind); }
.flows .water { background: var(--water); }
.flows .vapor { background: var(--vapor); }

.topbar nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
  color: var(--ink-2);
}

.topbar nav a {
  text-decoration: none;
}

.topbar nav a[aria-current="page"],
.topbar nav a:hover {
  color: var(--ink);
}

/* ---------- Главная ---------- */

.home-hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(24px, 6vw, 72px) var(--gutter) 0;
}

.home-hero h1 {
  font-size: clamp(40px, 7.4vw, 92px);
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 13ch;
}

.home-hero .lead {
  max-width: 46ch;
  margin-top: 24px;
  font-size: clamp(18px, 2vw, 21px);
  color: var(--ink-2);
}

.section-diagram {
  margin: clamp(32px, 6vw, 64px) auto 0;
  max-width: var(--wide);
  padding: 0 var(--gutter);
}

.diagram {
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 32px);
  box-shadow: 0 1px 2px rgb(18 19 24 / 0.04), 0 8px 24px -12px rgb(18 19 24 / 0.12);
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.dg-layers {
  position: relative;
  height: 20px;
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-3);
}

.dg-layers span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.diagram-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--ink-2);
}

.diagram-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.diagram-legend i {
  width: 18px;
  height: 4px;
  border-radius: 2px;
}

.flow-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 2 10;
  animation: flow 1.6s linear infinite;
}

.flow-line.slow { animation-duration: 2.8s; }

@keyframes flow {
  to { stroke-dashoffset: -24; }
}

.rain-drop {
  animation: rain 1.4s cubic-bezier(0.5, 0, 0.9, 0.6) infinite;
}

@keyframes rain {
  0% { transform: translateY(-30px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(46px); opacity: 0; }
}

.topics {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) 0;
}

.topics-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 8px;
}

.topics-head h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.topics-head p {
  margin: 0;
  color: var(--ink-2);
  max-width: 44ch;
}

.wave {
  margin-top: clamp(32px, 5vw, 56px);
}

.wave h3 {
  font-size: 15px;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-3);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.topic {
  display: grid;
  grid-template-columns: 2.4em 1fr auto;
  gap: 4px 16px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.topic .n {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.topic .t {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(19px, 2.2vw, 23px);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.topic .q {
  grid-column: 2;
  color: var(--ink-2);
  font-size: 16px;
}

.topic .meta {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-3);
  white-space: nowrap;
}

.topic a.t {
  text-decoration: none;
}

.topic a.t::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-left: 0.35em;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
  transform: translateY(-0.08em) rotate(45deg);
  transition: transform 0.3s var(--ease-out);
}

.topic a.t:hover::after {
  transform: translate(0.15em, -0.08em) rotate(45deg);
}

.topic.ready {
  position: relative;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: var(--radius);
  border-bottom-color: transparent;
  background: var(--wind-wash);
  transition: background-color 0.3s var(--ease-out);
}

.topic.ready[data-flow="heat"] { background: var(--heat-wash); }
.topic.ready[data-flow="vapor"] { background: var(--vapor-wash); }
.topic.ready[data-flow="water"] { background: var(--water-wash); }

.topic.ready[data-flow="heat"] .n,
.topic.ready[data-flow="heat"] .status-ready { color: var(--heat-ink); }
.topic.ready[data-flow="vapor"] .n,
.topic.ready[data-flow="vapor"] .status-ready { color: var(--vapor-ink); }
.topic.ready[data-flow="water"] .n,
.topic.ready[data-flow="water"] .status-ready { color: var(--water-ink); }

.topic.ready a.t::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.topic.ready .n {
  color: var(--wind-ink);
}

.topic.ready:hover {
  background: color-mix(in srgb, var(--wind) 22%, var(--wind-wash));
}

.diagram a {
  cursor: pointer;
}

.diagram a:hover .flow-line {
  stroke-width: 5;
}

.status-ready {
  color: var(--wind-ink);
  font-weight: 600;
}

.site-foot {
  max-width: var(--wide);
  margin: clamp(64px, 10vw, 120px) auto 0;
  padding: 28px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.site-foot p {
  margin: 0;
  max-width: 60ch;
}

/* ---------- Статья ---------- */

.article-head {
  position: relative;
  overflow: hidden;
  background: var(--wind-wash);
  color: var(--ink);
}

.article-head[data-flow="heat"] { background: var(--heat-wash); }
.article-head[data-flow="wind"] { background: var(--wind-wash); }
.article-head[data-flow="water"] { background: var(--water-wash); }
.article-head[data-flow="vapor"] { background: var(--vapor-wash); }

.article-head canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.article-head .inner {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(40px, 8vw, 104px) var(--gutter) clamp(40px, 7vw, 88px);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: clamp(20px, 4vw, 40px);
}

.crumbs a {
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

.article-head h1 {
  font-size: clamp(44px, 8.5vw, 104px);
  font-weight: 800;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.article-head .question {
  max-width: 30ch;
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.article-head .flows {
  margin-top: 28px;
}

.article-head .flows i {
  width: 28px;
  height: 5px;
}

.draft-note {
  max-width: var(--measure);
  margin: 28px auto 0;
  padding: 0 var(--gutter);
  font-size: 15px;
  color: var(--ink-3);
}

.prose {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.prose h2 {
  font-size: clamp(28px, 3.6vw, 38px);
  margin: clamp(56px, 8vw, 88px) 0 18px;
}

.prose h3 {
  font-size: 21px;
  margin: 36px 0 10px;
}

.prose ul,
.prose ol {
  padding-left: 1.2em;
  margin: 0 0 1.2em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose li::marker {
  color: var(--ink-3);
}

sup.ref {
  font-size: 0.68em;
  line-height: 0;
  margin-left: 1px;
  font-variant-numeric: tabular-nums;
}

sup.ref a {
  color: var(--ink-3);
  text-decoration: none;
  padding: 0 1px;
}

sup.ref a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.answer {
  margin-top: clamp(40px, 6vw, 64px);
  font-size: clamp(20px, 2.3vw, 23px);
  line-height: 1.5;
}

.answer p {
  margin-bottom: 0.8em;
}

.hl-heat { color: var(--heat-ink); font-weight: 600; }
.hl-wind { color: var(--wind-ink); font-weight: 600; }
.hl-water { color: var(--water-ink); font-weight: 600; }
.hl-vapor { color: var(--vapor-ink); font-weight: 600; }

.ways {
  list-style: none;
  padding: 0 !important;
  counter-reset: way;
}

.ways li {
  counter-increment: way;
  display: grid;
  grid-template-columns: 2.2em 1fr;
  gap: 0 12px;
  margin-bottom: 1.4em;
}

.ways li::before {
  content: counter(way);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  color: var(--wind-ink);
}

.ways strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 4px;
}

/* ---------- Таблица данных ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 8px 0 1.4em;
  -webkit-overflow-scrolling: touch;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.4;
}

table.data th,
table.data td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}

table.data th {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-3);
}

table.data td.v {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.perm-bar {
  display: block;
  height: 6px;
  margin-top: 6px;
  border-radius: 3px;
  background: var(--wind);
  min-width: 3px;
}

/* ---------- Симуляция ---------- */

.sim {
  max-width: var(--wide);
  margin: clamp(48px, 7vw, 80px) auto;
  padding: 0 var(--gutter);
}

.sim-card {
  background: var(--surface);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 1px 2px rgb(18 19 24 / 0.05), 0 16px 40px -20px rgb(18 19 24 / 0.22);
  overflow: hidden;
}

.sim-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 32px) 0;
}

.sim-top h2 {
  font-size: clamp(24px, 3vw, 32px);
  max-width: 18ch;
}

.readout {
  display: flex;
  gap: 28px;
  align-items: flex-end;
}

.readout .big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 7vw, 76px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--heat);
  font-variant-numeric: tabular-nums;
}

.readout .label {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink-2);
  max-width: 15ch;
}

.readout .mult {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sim-stage {
  position: relative;
  margin-top: 16px;
  height: clamp(260px, 34vw, 380px);
}

.sim-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.stage-label {
  position: absolute;
  top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}

.sim-controls {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px 40px;
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px) clamp(24px, 3vw, 32px);
  border-top: 1px solid var(--line-soft);
}

.sim-controls > * { min-width: 0; }

.control-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 0;
  margin: 0;
  padding: 0;
}

.segmented label {
  position: relative;
}

.segmented input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.segmented span {
  display: inline-flex;
  flex-direction: column;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}

.segmented span small {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.segmented input:hover + span {
  border-color: var(--ink-3);
}

.segmented input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.segmented input:checked + span small {
  color: var(--bg);
  opacity: 0.75;
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--water);
  outline-offset: 2px;
}

.wind-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.wind-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--wind-ink);
  font-variant-numeric: tabular-nums;
}

.wind-value small {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-3);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  background: transparent;
  cursor: pointer;
  margin: 4px 0 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--wind) var(--fill, 40%), var(--line) var(--fill, 40%));
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}

input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--wind);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--wind);
  box-shadow: 0 2px 6px rgb(18 19 24 / 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--wind);
  box-shadow: 0 2px 6px rgb(18 19 24 / 0.2);
}

.ticks {
  position: relative;
  height: 18px;
  margin: 0 13px;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.ticks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.ticks span:first-child {
  transform: translateX(-13px);
}

.ticks span:last-child {
  transform: translateX(calc(-100% + 13px));
}

.stage-hint {
  margin: 0;
  padding: 10px clamp(20px, 3vw, 32px) 14px;
  font-size: 13px;
  color: var(--ink-3);
}

.sim-stage canvas {
  cursor: ew-resize;
  touch-action: pan-y;
}

.jump {
  margin-top: 1.2em;
  font-size: 17px;
}

.jump a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--wind-wash);
  color: var(--wind-ink);
  font-weight: 600;
  text-decoration: none;
}

.jump a::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 2px solid currentColor;
}

.jump a:hover {
  background: color-mix(in srgb, var(--wind) 22%, var(--wind-wash));
}

.walk-toggle {
  margin-top: 18px;
}

.chart-block {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 40px;
  align-items: start;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart text {
  font-family: var(--font-body);
  font-size: 12px;
  fill: var(--ink-3);
}

.chart .curve {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
  transition: stroke 0.3s var(--ease-out);
}

.chart .curve.on {
  stroke: var(--wind);
  stroke-width: 3;
}

.chart .band {
  fill: var(--wind);
  opacity: 0.14;
}

.chart .curve-label {
  font-size: 12px;
  font-weight: 500;
}

.chart .curve-label.on {
  fill: var(--wind-ink);
  font-weight: 700;
}

.chart .dot {
  fill: var(--heat);
  stroke: var(--surface);
  stroke-width: 3;
}

.chart .grid {
  stroke: var(--line-soft);
  stroke-width: 1;
}

.sim-note {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-3);
  margin: 0;
}

.sim-note p {
  margin-bottom: 0.6em;
}

.sim-say {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 12px;
  min-height: 3em;
}

details.static {
  margin-top: 12px;
  font-size: 15px;
}

details.static summary {
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 500;
}

/* ---------- Проверить самому ---------- */

.check {
  list-style: none;
  padding: 0 !important;
}

.check li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 12px;
  margin-bottom: 1.1em;
}

.check li::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-top: 0.3em;
  border-radius: 5px;
  border: 2px solid var(--wind);
}

.myth {
  margin: 0 0 1.6em;
}

.myth dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  margin-bottom: 6px;
}

.myth dt s {
  text-decoration-color: var(--heat);
  text-decoration-thickness: 2px;
}

.myth dd {
  margin: 0;
}

.sources {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  padding-left: 1.6em !important;
}

.sources li {
  margin-bottom: 0.7em;
  overflow-wrap: anywhere;
}

.sources .kind {
  color: var(--ink-3);
}

.next {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: clamp(56px, 8vw, 88px) auto 0;
  padding: 0 var(--gutter);
}

.next a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.next .lbl {
  font-size: 15px;
  color: var(--ink-3);
}

.next .ttl {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.02em;
}

/* ---------- Адаптив ---------- */

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .topbar nav .hide-sm {
    display: none;
  }

  .topic {
    grid-template-columns: 2em 1fr;
  }

  .topic .meta {
    grid-column: 2;
    grid-row: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .dg-flow-labels,
  .dg-layers span:first-child {
    display: none;
  }

  .flow-line {
    stroke-width: 7;
    stroke-dasharray: 5 19;
  }


  .dg-layers {
    font-size: 13px;
  }

  .sim-controls,
  .chart-block {
    grid-template-columns: 1fr;
  }

  .readout {
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flow-line,
  .rain-drop {
    animation: none;
  }

  .topic, .segmented span, .wall-types span, .sim-card button {
    transition: none;
  }
}

.topic.ready[data-flow="heat"]:hover { background: color-mix(in srgb, var(--heat) 18%, var(--heat-wash)); }
.topic.ready[data-flow="vapor"]:hover { background: color-mix(in srgb, var(--vapor) 18%, var(--vapor-wash)); }
.topic.ready[data-flow="water"]:hover { background: color-mix(in srgb, var(--water) 18%, var(--water-wash)); }

.topic.ready + .topic.ready {
  margin-top: 6px;
}


/* Results stay with the controls on narrow screens and at larger text sizes. */
.readout {
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  gap: 16px 28px;
}
.readout > div { min-width: 0; max-width: 100%; }
.readout .big { line-height: 1.08; overflow-wrap: anywhere; }
.readout .mult { line-height: 1.15; overflow-wrap: anywhere; }
.segmented input + span { min-height: 44px; align-content: center; }
.segmented small { overflow-wrap: anywhere; }
.sim-current {
  position: sticky;
  top: 12px;
  z-index: 2;
  margin: 0 0 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.sim-current:empty { display: none; }
.stop-grid > *, .trip-grid > *, .wind-grid > *, .wp-grid > *, .mb-grid > *, .jk-grid > * { min-width: 0; }
.bn-list dd, .sim-note p, .bp-note { overflow-wrap: anywhere; }
.skip-link {
  position: fixed;
  inset: 8px auto auto 8px;
  z-index: 10;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--surface);
  transform: translateY(-160%);
  opacity: 0;
  pointer-events: none;
}
.skip-link:focus { transform: none; opacity: 1; pointer-events: auto; outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 480px) {
  .readout { width: 100%; align-items: flex-start; }
  .readout > div { flex: 1 1 160px; }
  .readout .big { font-size: clamp(36px, 11vw, 52px); }
  .readout .label { max-width: 26ch; }
}
