/* ГИПЕРВИЗИОН — стили сайта. Тёмная тема; цвет несут только данные (спектр). */

@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-300.woff") format("woff"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --bg: #0d1117;
  --bg-2: #121821;
  --panel: #161d28;
  --line: #252f3f;
  --line-2: #364358;
  --ink: #eaeef4;
  --ink-2: #aab4c2;
  --ink-3: #8894a6;
  --warn: #ffb02e;
  --spectrum-v: linear-gradient(180deg, rgb(138,61,255) 0%, rgb(47,139,255) 12%, rgb(25,211,208) 24%, rgb(59,220,106) 38%, rgb(215,229,58) 52%, rgb(255,176,46) 66%, rgb(255,90,60) 82%, rgb(196,38,58) 100%);
  --spectrum: linear-gradient(90deg, rgb(138,61,255) 0%, rgb(90,75,255) 6.7%, rgb(47,139,255) 11.7%, rgb(25,211,208) 16.7%, rgb(59,220,106) 21.7%, rgb(215,229,58) 28.3%, rgb(255,176,46) 33.3%, rgb(255,90,60) 40%, rgb(196,38,58) 50%, rgb(122,42,58) 60%, rgb(42,37,48) 100%);
  --f-display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink-2);
  font: 400 1.0625rem/1.62 var(--f-text);
  font-feature-settings: "calt", "kern", "tnum" 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.nums { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

h1, h2, h3, h4 { font-family: var(--f-display); color: var(--ink); margin: 0; font-weight: 300; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); line-height: .94; letter-spacing: -.04em; }
h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.04; letter-spacing: -.03em; }
h3 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -.015em; font-weight: 500; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.125rem, 1.7vw, 1.4rem); line-height: 1.5; color: var(--ink-2); max-width: 54ch; }
.measure { max-width: 62ch; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; line-height: 1.5; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 500 .9375rem/1 var(--f-text); border: 1px solid transparent; cursor: pointer; transition: background .2s, border-color .2s, color .2s; text-decoration: none !important; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: .875rem; }
.btn[disabled] { opacity: .4; cursor: default; }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: rgba(13,17,23,.72); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); border-bottom: 1px solid transparent; transition: border-color .25s, background .25s; }
.site-header.is-stuck { border-bottom-color: var(--line); background: rgba(13,17,23,.88); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font: 500 1.1875rem/1 var(--f-display); letter-spacing: -.01em; margin-right: auto; text-decoration: none !important; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--ink-2); font-size: .9375rem; text-decoration: none; padding: 6px 0; background: var(--spectrum) 0 100% / 0% 2px no-repeat; transition: color .2s, background-size .35s ease; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); background-size: 100% 2px; }
.nav-toggle { display: none; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: 10px; }
.nav-toggle svg { margin: auto; }
@media (max-width: 1080px) {
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0; padding: 8px var(--gut) 20px; background: rgba(13,17,23,.98); border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-toggle { display: inline-flex; }
  .site-header .btn { display: none; }
}

/* ---------- Первый экран ---------- */
.hero { padding: clamp(24px, 3.2vw, 44px) 0 clamp(24px, 3vw, 40px); }
.hero h1 { max-width: 12ch; }
.hero .lead { margin-top: clamp(16px, 2.4vw, 26px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(20px, 2.4vw, 30px); }
.hero-demo { padding: clamp(28px, 3.6vw, 48px) 0 clamp(32px, 5vw, 64px); }

/* единственный «выход» на загрузке: заголовок проявляется, прибор «включается» */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero .lead, .hero-cta { animation: rise .9s .12s cubic-bezier(.2,.7,.2,1) both; }
  .hero-viewer { animation: rise 1s .28s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---------- Просмотрщик спектра ---------- */
.viewer { margin: 0; display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); overflow: hidden; }
.viewer-scene { position: relative; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #090c11; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 16px; margin-top: auto; }
.jump button { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px 7px 11px; color: var(--ink-2); font: 400 .8125rem/1 var(--f-text); cursor: pointer; transition: border-color .2s, color .2s; }
.jump button:hover { border-color: var(--ink); color: var(--ink); }
.jump i { width: 10px; height: 10px; border-radius: 3px; }
.frame { position: relative; line-height: 0; }
.frame canvas { width: 100%; height: auto; aspect-ratio: 360 / 248; cursor: crosshair; touch-action: none; }
.frame canvas:focus-visible { outline-offset: -3px; }
.cursor { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; pointer-events: none; border: 1.5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.55), 0 0 18px rgba(0,0,0,.5); will-change: transform; }
.cursor::before, .cursor::after { content: ""; position: absolute; background: #fff; }
.cursor::before { left: 50%; top: -7px; bottom: -7px; width: 1.5px; margin-left: -.75px; mix-blend-mode: difference; }
.cursor::after { top: 50%; left: -7px; right: -7px; height: 1.5px; margin-top: -.75px; mix-blend-mode: difference; }
.cursor.is-pin { border-style: dashed; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-color: var(--ink-2); box-shadow: none; }
.cursor.is-pin::before, .cursor.is-pin::after { display: none; }
.cursor.is-pin[hidden] { display: none; }
.viewer-side { padding: clamp(18px, 2.4vw, 30px); display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.readout { min-height: 118px; }
.readout h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 300; letter-spacing: -.025em; line-height: 1.1; }
.readout .formula { color: var(--ink-3); margin: 4px 0 14px; font-size: .9375rem; }
.probs { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.probs li { display: grid; grid-template-columns: minmax(0, 11.5em) 1fr 3.4em; align-items: center; gap: 12px; font-size: .875rem; color: var(--ink-2); }
.probs .bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.probs .bar i { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .25s ease; }
.probs .pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.plot { width: 100%; height: auto; overflow: visible; }
.plot text { font: 400 11px var(--f-text); fill: var(--ink-3); }
.plot .grid line { stroke: var(--line); stroke-width: 1; }
.plot .axis-title { fill: var(--ink-3); }
.plot .curve { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot .curve-pin { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-dasharray: 5 4; stroke-linejoin: round; }
.plot-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .8125rem; color: var(--ink-3); min-height: 1.5em; margin-top: -6px; }
.plot-legend .sw { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--ink); vertical-align: middle; margin-right: 8px; }
.plot-legend .sw.dash { border-top: 2px dashed var(--ink-2); }
.hint { font-size: .8125rem; color: var(--ink-3); margin: auto 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.viewer figcaption { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 12px clamp(18px, 2.4vw, 30px); font-size: .8125rem; color: var(--ink-3); background: rgba(0,0,0,.14); }
.is-loading .frame canvas { opacity: 0; }
.frame canvas { transition: opacity .5s; }
@media (max-width: 900px) {
  .viewer { grid-template-columns: 1fr; }
  .viewer-scene { border-right: 0; border-bottom: 1px solid var(--line); }
  .readout { min-height: 0; }
}

/* ---------- Поддержка Фонда ---------- */
.support { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); padding: clamp(16px, 2vw, 28px) 0; }
.support .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 56px); }
.logos { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 28px); flex-wrap: wrap; }
.logos img { width: auto; max-width: 100%; }
.logos .logo-fasie { height: 60px; }
.logos .logo-putp { height: 96px; }
.logo-print { display: none; }
.support p { margin: 0; color: var(--ink); font-size: clamp(.9375rem, 1.25vw, 1.0625rem); line-height: 1.55; max-width: 74ch; }
@media (max-width: 900px) { .support .wrap { grid-template-columns: 1fr; } }

/* ---------- Секции ---------- */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section-head { max-width: 780px; margin-bottom: clamp(32px, 5vw, 64px); }
.section-head .lead { margin-top: 20px; }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Как это работает (scrollytelling) ---------- */
.scrolly { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.stage { position: sticky; top: calc(var(--header-h) + 24px); height: min(72vh, 640px); border: 1px solid var(--line); border-radius: 18px; background: #090c11; overflow: hidden; }
.stage-view { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 18px; }
.stage-view.is-on { opacity: 1; visibility: visible; }
.stage-view canvas { width: 100%; height: auto; border-radius: 8px; }
.stage-caption { color: var(--ink-3); font-size: .8125rem; margin: 0; }
.stage-split { display: grid; gap: 14px; }
.stage-split .plot { max-height: 230px; }
.steps { padding: 14vh 0; }
.step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; opacity: .32; transition: opacity .4s; }
.step.is-on { opacity: 1; }
.step h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 300; letter-spacing: -.025em; margin-bottom: 14px; }
.step p { max-width: 44ch; margin: 0; }
.bars { display: grid; gap: 16px; padding: 8px 6px; }
.bars .row { display: grid; grid-template-columns: 9.5em 1fr 4.4em; gap: 14px; align-items: center; color: var(--ink-2); font-size: .9375rem; }
.bars .track { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.bars .track i { display: block; height: 100%; width: 0; border-radius: 5px; transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.bars .val { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.big-metals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.big-metals div { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.big-metals b { display: block; font: 300 clamp(2rem, 4vw, 3rem)/1 var(--f-display); letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.big-metals span { font-size: .875rem; color: var(--ink-3); }
@media (max-width: 900px) {
  .scrolly { grid-template-columns: 1fr; gap: 0; }
  .stage { top: var(--header-h); height: 46vh; border-radius: 0 0 14px 14px; z-index: 5; margin: 0 calc(var(--gut) * -1); border-left: 0; border-right: 0; }
  .stage-view { padding: 10px 14px; gap: 8px; }
  .stage-view canvas { max-height: 30vh; width: auto; margin: 0 auto; }
  .stage-split .plot { max-height: 15vh; }
  .steps { padding: 4vh 0; }
  .step { min-height: 54vh; }
  .bars .row { grid-template-columns: 7.2em 1fr 3.8em; gap: 8px; font-size: .8125rem; }
}

/* ---------- Демо ---------- */
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.demo { border: 1px solid var(--line); border-radius: 18px; background: var(--bg); padding: clamp(18px, 2.2vw, 28px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.demo > h3 { font-size: 1.5rem; font-weight: 300; letter-spacing: -.02em; }
.demo > p { margin: -6px 0 0; font-size: .9375rem; }
.demo canvas { width: 100%; height: auto; border-radius: 10px; background: #090c11; }
.cube-views { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cube-views .stack { aspect-ratio: 520 / 250; }
.slider-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.slider-row output { font: 300 1.75rem/1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; min-width: 4.6ch; text-align: right; }
.slider-row .region { grid-column: 1 / -1; font-size: .8125rem; color: var(--ink-3); margin-top: -2px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: var(--spectrum); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--spectrum); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: var(--ink); border: 4px solid var(--bg); box-shadow: 0 0 0 1px var(--ink-3); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 4px solid var(--bg); box-shadow: 0 0 0 1px var(--ink-3); }
.map-wrap { position: relative; line-height: 0; }
.map-wrap canvas { cursor: crosshair; }
.map-tip { position: absolute; pointer-events: none; transform: translate(12px, 12px); background: rgba(9,12,17,.92); border: 1px solid var(--line-2); color: var(--ink); font: 500 .8125rem/1 var(--f-text); padding: 7px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; transition: opacity .12s; }
.map-tip.is-on { opacity: 1; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.legend button { width: 100%; display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; background: none; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; margin: 0 -8px; color: var(--ink-2); font: 400 .875rem/1.2 var(--f-text); cursor: pointer; text-align: left; }
.legend button:hover { border-color: var(--line-2); }
.legend button[aria-pressed="false"] { opacity: .38; }
.legend i { width: 14px; height: 14px; border-radius: 4px; }
.legend .pct { color: var(--ink); font-variant-numeric: tabular-nums; }
.estimate { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.estimate div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.estimate b { display: block; font: 300 2rem/1.1 var(--f-display); color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.estimate span { font-size: .8125rem; color: var(--ink-3); }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.demo-note { font-size: .8125rem; color: var(--ink-3); margin: 0; }
@media (max-width: 1000px) { .demo-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .legend { grid-template-columns: 1fr; } }

/* ---------- Устройство камеры ---------- */
.optics { list-style: none; margin: 0 0 clamp(24px, 3vw, 40px); padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.optics li { position: relative; text-align: center; }
.optics li:not(:last-child)::before { content: ""; position: absolute; top: 33px; left: calc(50% + 40px); right: calc(-50% + 40px); height: 2px; background: var(--line-2); }
.optics li:not(:last-child)::after { content: ""; position: absolute; top: 32px; left: calc(50% + 40px); width: 22px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, transparent, #fff, transparent); opacity: .85; animation: travel 3.2s linear infinite; animation-delay: calc(var(--i) * .45s); }
@keyframes travel { 0% { left: calc(50% + 40px); opacity: 0; } 12% { opacity: .9; } 88% { opacity: .9; } 100% { left: calc(150% - 62px); opacity: 0; } }
.optics button { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; background: none; border: 0; color: var(--ink-2); font: 500 .875rem/1.25 var(--f-text); cursor: pointer; padding: 0 4px; }
.optics .node { width: 68px; height: 68px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; background: var(--bg); transition: border-color .2s, background .2s, transform .2s; }
.optics .node svg { width: 34px; height: 34px; stroke: var(--ink-2); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.optics button:hover .node { border-color: var(--ink-2); }
.optics button[aria-pressed="true"] { color: var(--ink); }
.optics button[aria-pressed="true"] .node { border-color: var(--ink); background: var(--panel); transform: scale(1.06); }
.optics button[aria-pressed="true"] .node svg { stroke: var(--ink); }
.optics-detail { border-left: 3px solid; border-image: var(--spectrum-v) 1; padding: 6px 0 6px clamp(16px, 2vw, 28px); max-width: 70ch; min-height: 7.5em; }
.optics-detail h3 { margin-bottom: 8px; }
.optics-detail p { margin: 0; }
@media (max-width: 900px) {
  .optics { grid-template-columns: 1fr; gap: 4px; }
  .optics li { text-align: left; }
  .optics li:not(:last-child)::before { top: 72px; bottom: -6px; left: 33px; right: auto; width: 2px; height: auto; }
  .optics li:not(:last-child)::after { display: none; }
  .optics button { flex-direction: row; gap: 18px; padding: 6px 0; text-align: left; }
  .optics .node { width: 66px; height: 66px; flex: none; }
}

/* ---------- Минералы ---------- */
@media (max-width: 600px) { .minerals { grid-template-columns: 1fr; } }

/* ---------- Применение ---------- */
.uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.use { border-top: 1px solid var(--line-2); padding-top: 22px; }
.use h3 { font-weight: 300; font-size: 1.75rem; letter-spacing: -.025em; margin-bottom: 14px; }
.use p { font-size: 1rem; }
.use ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .9375rem; }
.use li { padding-left: 18px; position: relative; }
.use li::before { content: ""; position: absolute; left: 0; top: .68em; width: 8px; height: 2px; background: var(--ink-3); }
.disclaimer { margin-top: clamp(28px, 4vw, 48px); font-size: .875rem; color: var(--ink-3); max-width: 72ch; }
@media (max-width: 900px) { .uses { grid-template-columns: 1fr; } }

/* ---------- Дорожная карта ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: minmax(7.5em, 12em) minmax(0, 1fr) auto; gap: 8px clamp(16px, 4vw, 48px); align-items: baseline; padding: 22px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline time { color: var(--ink-3); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: 1.1875rem; font-weight: 500; margin-bottom: 4px; }
.timeline p { margin: 0; font-size: .9375rem; max-width: 62ch; }
.status { display: inline-flex; align-items: center; gap: 9px; font-size: .875rem; color: var(--ink-2); white-space: nowrap; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink-3); }
.status.done::before { background: rgb(59,220,106); border-color: rgb(59,220,106); }
.status.work::before { background: rgb(255,176,46); border-color: rgb(255,176,46); }
.trl { margin-top: clamp(24px, 3vw, 40px); max-width: 72ch; font-size: .9375rem; }
@media (max-width: 760px) { .timeline li { grid-template-columns: 1fr; } .status { margin-top: 6px; } }


/* ---------- Контакты и подвал ---------- */
.contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); }
.contacts dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; font-size: 1rem; }
.contacts dt { color: var(--ink-3); }
.contacts dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.contacts h3 { margin-bottom: 18px; }
.contacts .stack-links { display: grid; gap: 10px; justify-items: start; margin-top: 22px; }
@media (max-width: 800px) { .contacts { grid-template-columns: 1fr; } }
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: .875rem; color: var(--ink-3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; }
.site-footer p { margin: 0; max-width: 62ch; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); }

/* заглушки, которые нужно заменить перед публикацией (находит check.py) */
.todo { outline: 1px dashed var(--warn); outline-offset: 2px; color: var(--warn); border-radius: 3px; }

/* ---------- Внутренние страницы (партнёры, 404) ---------- */
.page-hero { padding: clamp(48px, 7vw, 104px) 0 clamp(24px, 4vw, 48px); }
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); max-width: 16ch; }
.page-hero .lead { margin-top: 24px; }
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 18px; }
.prose h3 { margin: 28px 0 8px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.doc-table th, .doc-table td { text-align: left; padding: 14px 12px 14px 0; border-top: 1px solid var(--line); vertical-align: top; }
.doc-table th { color: var(--ink-3); font-weight: 400; }
.doc-table td:first-child { color: var(--ink); }
.callout { border: 1px solid var(--line-2); border-radius: 14px; padding: 20px 24px; background: var(--bg-2); max-width: 70ch; font-size: .9375rem; }
.callout strong { color: var(--ink); font-weight: 600; }
.pipeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: p; max-width: 70ch; }
.pipeline li { display: grid; grid-template-columns: 2.2em 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); counter-increment: p; }
.pipeline li::before { content: counter(p); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pipeline b { color: var(--ink); font-weight: 500; display: block; }
.e404 { min-height: 70vh; display: grid; align-content: center; }
.e404 .spectrum-rule { height: 6px; border-radius: 3px; background: var(--spectrum); margin: 32px 0; max-width: 420px; }

/* ---------- Демо-кабинет ---------- */
.cab-top { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.cab-top .wrap { height: var(--header-h); display: flex; align-items: center; gap: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--warn); color: var(--warn); border-radius: 999px; padding: 4px 12px; font-size: .8125rem; font-weight: 500; }
.cab-login { max-width: 460px; margin: clamp(40px, 8vw, 96px) auto; }
.cab-login h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 16px; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { color: var(--ink-2); font-size: .875rem; }
.field input { height: 50px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); padding: 0 16px; font: 400 1rem var(--f-text); }
.field input:focus-visible { border-color: var(--ink); outline: none; }
.cab-app { display: none; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); padding: clamp(24px, 3vw, 40px) 0 80px; }
.cab-app.is-on { display: grid; }
.cab-side h2 { font-size: 1.25rem; font-weight: 500; margin-bottom: 14px; letter-spacing: -.01em; }
.cab-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cab-side ul button { width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: 12px; padding: 12px 14px; color: var(--ink-2); font: 400 .9375rem/1.3 var(--f-text); cursor: pointer; display: grid; gap: 2px; }
.cab-side ul button small { color: var(--ink-3); font-size: .8125rem; }
.cab-side ul button[aria-current="true"] { border-color: var(--line-2); background: var(--panel); color: var(--ink); }
.cab-main h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 6px; }
.cab-meta { color: var(--ink-3); font-size: .9375rem; margin-bottom: 24px; }
.cab-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(16px, 2vw, 28px); align-items: start; }
.cab-grid canvas { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.cab-table { width: 100%; border-collapse: collapse; font-size: .9375rem; margin: 18px 0; font-variant-numeric: tabular-nums; }
.cab-table th, .cab-table td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line); text-align: left; }
.cab-table th { color: var(--ink-3); font-weight: 400; }
.cab-table td:not(:first-child), .cab-table th:not(:first-child) { text-align: right; }
.cab-table .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 10px; vertical-align: -1px; }
.cab-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 900px) { .cab-app.is-on { grid-template-columns: 1fr; } .cab-grid { grid-template-columns: 1fr; } .cab-side ul { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }

/* ---------- Печать ---------- */
@media print {
  body { background: #fff; color: #111; font-size: 11pt; }
  .site-header, .cab-top, .logo-screen { display: none; }
  .logo-print { display: block !important; }
  .hero-viewer, .demo-grid, .scrolly, .optics, .nav-toggle, .skip, .hero-cta, .btn { display: none !important; }
  h1, h2, h3, a, .mineral .metals, .contacts dd { color: #111; }
  .section, .hero, .page-hero { padding: 16px 0; }
  .cab-app.is-on { display: block; }
  .cab-side { display: none; }
  .cab-grid canvas { max-width: 380px; }
  .cab-table th, .cab-table td { border-color: #bbb; color: #111; }
}

/* ---------- Движение по запросу пользователя ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .optics li::after { display: none; }
}

/* узкие экраны: шапка демо-кабинета не должна переноситься */
@media (max-width: 520px) {
  .cab-top .wrap { gap: 10px; }
  .cab-top .brand { font-size: 1rem; gap: 8px; }
  .cab-top .chip, .cab-top .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; font-size: .75rem; }
  .cab-top .brand { white-space: nowrap; }
}
@media (max-width: 400px) { .cab-top .brand { font-size: 0; gap: 0; } }

/* ---------- Обратная связь ---------- */
.form { display: grid; gap: 18px; max-width: 640px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form .row2 { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .875rem; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; box-sizing: border-box; font: inherit; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--ink-2); outline-offset: 1px; }
.req { color: var(--ink-3); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9375rem; color: var(--ink-2); line-height: 1.5; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line-2); }
.form-status[hidden] { display: none; }
.form-status.ok { border-color: #3fb68b; }
.form-status.err { border-color: #e0795a; }
.doc { max-width: 78ch; }
.doc h2 { font-size: 1.375rem; margin: 32px 0 12px; font-weight: 500; }
.doc p, .doc li { color: var(--ink-2); line-height: 1.6; }
