/* Палитра: только синий и белый на тёмном. Меняется здесь, в одном месте. */
:root {
  --night: #071330;      /* фон */
  --deep: #0d1f4a;       /* панели */
  --line: #24407f;       /* границы */
  --blue: #3d86ff;       /* акцент */
  --sky: #a9c8ff;        /* второстепенный текст */
  --white: #ffffff;
  --display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --text: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--white);
  font: 400 1.1875rem/1.6 var(--text);   /* 19px: крупный читаемый текст */
}
.wrap { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.narrow { max-width: 44rem; }

a { color: var(--sky); text-underline-offset: .18em; }
a:hover { color: var(--white); }
:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--white); color: var(--night); padding: .5rem 1rem; z-index: 10; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 1rem; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5.2vw, 3.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 3.5rem; }
h3 { font-size: 1.2rem; font-weight: 500; margin-top: 2rem; }
p, ul, ol { margin: 0 0 1.15rem; }
li { margin-bottom: .45rem; }
.lead { font-size: 1.35rem; line-height: 1.5; color: var(--sky); }
.small, .note, .updated { font-size: 1rem; color: var(--sky); }
.updated { margin-top: 3rem; }

/* Шапка */
.top { border-bottom: 1px solid var(--line); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; padding: 1rem 0; }
.logo { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--white); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.top nav a { color: var(--white); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.top nav a:hover, .top nav a[aria-current] { border-bottom-color: var(--blue); }

/* Кнопка */
.button {
  display: inline-block; background: var(--blue); color: var(--white); text-decoration: none;
  font-weight: 600; padding: .9rem 1.5rem; border-radius: 999px; border: 2px solid var(--blue);
}
.button:hover { background: var(--white); color: var(--night); border-color: var(--white); }
.button.ghost { background: transparent; border-color: var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Hero: слева смысл, справа шкала «цена = вероятность» */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; }
.scale { background: var(--deep); border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.75rem; }
.scale-q { font-weight: 600; margin-bottom: 1.25rem; }
.scale-num { font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 9vw, 5rem); line-height: 1; }
.scale-num small { font-size: .35em; font-weight: 500; color: var(--sky); margin-left: .4em; }
.scale input[type=range] { width: 100%; margin: 1.5rem 0 .25rem; accent-color: var(--blue); height: 2rem; }
.scale-ends { display: flex; justify-content: space-between; font-size: .95rem; color: var(--sky); }
.scale-out { margin: 1.25rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.scale-out b { color: var(--white); }
.scale-tag { font-size: .95rem; color: var(--sky); margin: 0 0 .5rem; }

/* Секции */
.section { padding: 3.5rem 0; }
.section > .wrap > h2:first-child { margin-top: 0; }
.band { background: var(--deep); border-block: 1px solid var(--line); }
.two { display: grid; gap: 1.5rem 3rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two h3 { margin-top: 0; }

/* Вопросы */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.25rem 3rem 1.25rem 0; position: relative;
  font-weight: 600; font-size: 1.3rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .25rem; top: 1rem;
  font: 500 1.75rem/1 var(--display); color: var(--blue);
}
.faq details[open] summary::after { content: "–"; }
.faq .answer { max-width: 44rem; padding-bottom: 1rem; }

/* Статусы: различаются не только цветом, но и рамкой и текстом */
.status { display: inline-block; padding: .2rem .8rem; border-radius: 999px; font-size: 1rem; font-weight: 600; border: 2px solid var(--white); white-space: nowrap; }
.status-open { background: var(--white); color: var(--night); }
.status-close_only, .status-frontend, .status-partial { border-color: var(--blue); color: var(--white); }
.status-blocked { border-style: dashed; border-color: var(--sky); color: var(--sky); }

/* Таблицы */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
th, td { text-align: left; padding: .85rem 1rem .85rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 1rem; font-weight: 500; color: var(--sky); }
tbody th { font-weight: 600; }
td .note { margin-top: .4rem; max-width: 34rem; }

/* Статья */
.article { padding: 3rem 0 1rem; }
.crumbs { font-size: 1rem; color: var(--sky); margin-bottom: 1.5rem; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.5rem 3.5rem; margin: 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: .1rem; width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center; border: 2px solid var(--blue); border-radius: 50%;
  font: 700 1rem var(--display);
}
.steps h3 { margin: 0 0 .4rem; }
.warn { border-left: 4px solid var(--blue); background: var(--deep); padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 .5rem .5rem 0; }
.warn p:last-child { margin: 0; }
.draft { border: 2px dashed var(--sky); padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: .5rem; color: var(--sky); }
.draft::before { content: "Черновик: заполнить после реального прохода"; display: block; font-weight: 600; color: var(--white); margin-bottom: .4rem; }
.draft p:last-child, .draft ul:last-child { margin-bottom: 0; }

/* Калькулятор */
.calc { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; margin-top: 2rem; }
.calc label { display: block; font-weight: 600; margin: 0 0 .4rem; }
.calc .field { margin-bottom: 1.25rem; }
.calc input, .calc select {
  width: 100%; font: inherit; color: var(--white); background: var(--deep);
  border: 2px solid var(--line); border-radius: .6rem; padding: .7rem .9rem;
}
.calc input:focus, .calc select:focus { border-color: var(--blue); outline: none; }
.calc .hint { font-size: 1rem; color: var(--sky); margin: .35rem 0 0; }
.result { background: var(--deep); border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.5rem 1.75rem; }
.result dl { margin: 0; }
.result div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.result div:last-child { border: 0; }
.result dt { color: var(--sky); }
.result dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.result .big dd { font-family: var(--display); font-size: 1.5rem; }

/* Подвал */
.bottom { border-top: 1px solid var(--line); margin-top: 4rem; padding: 2.5rem 0; font-size: 1rem; color: var(--sky); }
.bottom p { max-width: 52rem; }
.bottom strong { color: var(--white); }

@media (max-width: 800px) {
  body { font-size: 1.125rem; }
  .hero-grid, .two, .calc { grid-template-columns: 1fr; }
  .hero-grid { gap: 2rem; }
  .faq summary { font-size: 1.15rem; }
  .status { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Узкая колонка текста выравнивается по левому краю общей сетки, а не по центру */
.wrap.narrow { max-width: none; }
.wrap.narrow > * { max-width: 44rem; }

/* Оглавление длинных страниц */
.toc { background: var(--deep); border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem 1.5rem; margin: 2rem 0; }
.toc-title { font-weight: 600; margin: 0 0 .5rem; }
.toc ol { margin: 0; padding-left: 1.4rem; }
.toc li { margin: .25rem 0; }
h2[id] { scroll-margin-top: 1.5rem; }
/* Пример с расчётом */
.example { border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.example p:last-child, .example ul:last-child { margin-bottom: 0; }
.example-title { font-weight: 600; color: var(--white); margin-bottom: .5rem; }
.faq-block details:first-of-type { border-top: 1px solid var(--line); }

/* Уведомление о cookie */
.cookie { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 20; max-width: 40rem; margin: 0 auto;
  display: flex; gap: 1rem; align-items: center; background: var(--deep); border: 1px solid var(--line);
  border-radius: 1rem; padding: 1rem 1.25rem; box-shadow: 0 10px 30px rgba(0,0,0,.35); font-size: 1rem; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0; flex: 1; }
.cookie .button { padding: .6rem 1.1rem; flex: none; }
@media (max-width: 520px) { .cookie { flex-direction: column; align-items: stretch; } }
