/* BrowserKit: общие стили сайта. Тема «янтарь»: петроль и янтарь, две схемы через light-dark(). */

@font-face {
  font-family: Geologica;
  src: url("fonts/geologica-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Geologica;
  src: url("fonts/geologica-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --bg: light-dark(#edf1ef, #06171b);
  --band: light-dark(#e2e9e6, #0a2026);
  --surface: light-dark(#ffffff, #0f2a31);
  --ink: light-dark(#0e2a30, #e9f1ed);
  --muted: light-dark(#48606a, #94acab);
  --line: light-dark(#c5d2cf, #1f4048);
  --amber: light-dark(#f2a413, #ffb833);
  --on-amber: #201400;
  --link: light-dark(#0a6470, #ffc65e);
  --halo: light-dark(rgb(242 164 19 / 0.28), rgb(255 184 51 / 0.2));
  --shadow: light-dark(rgb(14 42 48 / 0.14), rgb(0 0 0 / 0.5));
  --sans: Geologica, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 72rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 350 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, pre { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
strong { font-weight: 650; }
code, pre { font-family: var(--mono); font-size: 0.86em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.prose { max-width: 42rem; }
.prose > * + * { margin-top: 1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.45rem; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; padding: 0.5rem 0.9rem; background: var(--surface); border-radius: 8px; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.top .wrap { display: flex; align-items: center; gap: 0.5rem 1.25rem; min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; text-decoration: none; }
.brand svg { width: 1.6rem; height: 1.6rem; flex: none; }
.crumb { min-width: 0; overflow: hidden; color: var(--muted); font-weight: 400; white-space: nowrap; text-overflow: ellipsis; }
.crumb::before { content: "/"; margin-right: 0.55rem; color: var(--line); }
.top nav { margin-left: auto; }
.top nav ul { display: flex; gap: 0.25rem 1.3rem; padding: 0; list-style: none; font-size: 0.95rem; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { color: var(--link); }
.theme { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; }
.theme:hover { border-color: var(--amber); }
.theme svg { width: 1.2rem; height: 1.2rem; }
@media (max-width: 46rem) {
  .top nav { display: none; }
  .theme { margin-left: auto; }
}

/* Первый экран */
.hero { position: relative; padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(1.5rem, 4vw, 4rem); }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.4rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.028em; }
.lead { margin-top: 1.4rem; max-width: 34rem; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.4rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 1.4rem; border: 0; border-radius: 12px; background: var(--amber); color: var(--on-amber); font-weight: 650; text-decoration: none; box-shadow: 0 10px 30px -12px var(--halo), inset 0 -2px 0 rgb(0 0 0 / 0.12); transition: transform 0.15s; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.hero .note { margin-top: 1.3rem; max-width: 32rem; color: var(--muted); font-size: 0.92rem; }
@media (max-width: 56rem) {
  .hero .wrap { grid-template-columns: 1fr; }
}

/* Сцена с объёмной фигурой: общая часть */
.stage { position: relative; display: grid; place-items: center; }
.stage::before { content: ""; position: absolute; inset: 8% 4%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--halo), transparent); }
/* Главная: фигурка расширения из слоёв */
.piece-stage { height: clamp(18rem, 44vw, 30rem); perspective: 1100px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pulse .piece { animation: pulse 0.55s cubic-bezier(0.3, 0, 0.2, 1); }
.pulse::before { animation: glow 0.7s ease-out; }
@keyframes pulse { 35% { scale: 1.16; } 70% { scale: 0.97; } }
@keyframes glow { 35% { scale: 1.35; opacity: 1; } }
.piece { position: relative; width: clamp(13rem, 30vw, 20rem); aspect-ratio: 1; transform-style: preserve-3d; transform: rotateX(var(--rx, -14deg)) rotateY(var(--ry, 28deg)); }
.piece svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: translateZ(calc(var(--z, 0) * 1px)); }
.piece .slice { fill: color-mix(in srgb, var(--amber) 9%, transparent); stroke: color-mix(in srgb, var(--amber) 42%, transparent); stroke-width: 2.5; stroke-linejoin: round; }
.piece .face { fill: color-mix(in srgb, var(--amber) 34%, transparent); stroke: var(--amber); stroke-width: 4; stroke-linejoin: round; }
.piece .shine { fill: none; stroke: light-dark(rgb(255 255 255 / 0.8), rgb(255 240 200 / 0.5)); stroke-width: 5; stroke-linecap: round; }
.piece .core path { fill: var(--ink); }
.piece .core circle { fill: var(--amber); }

/* Страница расширения: спираль сообщений */
.helix-stage { height: min(clamp(24rem, 52vw, 33rem), 100svh - 12.5rem); perspective: 1200px; -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent), linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent), linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); -webkit-mask-composite: source-in; mask-composite: intersect; }
.helix { --step: 32deg; --rise: 2.6rem; --r: clamp(5rem, 16vw, 12.5rem); --w: max(var(--r) * 0.94, 12rem); --p: 0; position: relative; width: 0; height: 0; padding: 0; list-style: none; translate: 0 3.2rem; transform-style: preserve-3d; transform: translateY(calc(var(--p) * var(--rise))) rotateY(calc(var(--p) * var(--step) * -1)); }
.helix li {
  --phi: calc((var(--i) - var(--p)) * var(--step));
  --far: max(var(--i) - var(--p), var(--p) - var(--i));
  --front: clamp(0, cos(var(--phi)) * 1000, 1);
  position: absolute; left: 0; top: 0;
  width: var(--w);
  margin: -2.2rem 0 0 calc(var(--w) / -2);
  transform: rotateY(calc(var(--i) * var(--step))) translateY(calc(var(--i) * var(--rise) * -1)) translateZ(var(--r)) rotateY(calc(var(--phi) * -1)); /* последний поворот держит карточку лицом к зрителю */
  opacity: calc(clamp(0.3, cos(var(--phi)) * 1.5 + 0.3, 1) * clamp(0, (13 - var(--far)) / 4, 1));
}
.bubble { display: flow-root; color: rgb(from var(--ink) r g b / var(--front, 1)); padding: 0.55rem 0.8rem 0.5rem; border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; background: var(--surface); box-shadow: 0 14px 30px -18px var(--shadow); font-size: 0.86rem; line-height: 1.35; }
.bubble b { display: block; margin-bottom: 0.1rem; color: var(--link); font-size: 0.78rem; font-weight: 650; }
.bubble b, .bubble time, .bubble .att { opacity: var(--front, 1); }
.bubble time { float: right; margin: 0.25rem 0 0 0.6rem; color: var(--muted); font-size: 0.72rem; }
.mine .bubble { border-color: transparent; border-radius: 16px 16px 5px 16px; background: var(--amber); color: rgb(from var(--on-amber) r g b / var(--front, 1)); }
.mine .bubble b, .mine .bubble time { color: rgb(32 20 0 / 0.66); }
.att { display: inline-flex; align-items: center; gap: 0.4rem; }
.att svg { width: 1.05rem; height: 1.05rem; flex: none; }
.day { text-align: center; }
.day span { display: inline-block; padding: 0.2rem 0.75rem; border-radius: 999px; background: var(--band); color: var(--muted); font-size: 0.76rem; font-weight: 500; }
.readout { display: flex; align-items: center; gap: 1rem; margin: 0.4rem auto 0; max-width: 30rem; padding: 0.7rem 0.8rem 0.7rem 1.1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); font-size: 0.9rem; }
.readout dl { display: flex; gap: 0.3rem 1.5rem; flex-wrap: wrap; margin: 0; }
.readout dt { color: var(--muted); font-size: 0.78rem; }
.readout dd { font-weight: 650; font-variant-numeric: tabular-nums; }
/* Первый экран закреплён, пока прокрутка проходит чат: запас высоты у .run и есть этот путь. */
.scrub .wrap { align-items: stretch; }
.scrub .run::after { content: ""; display: block; height: 62rem; } /* не padding: липкий блок ходит только внутри содержимого */
.scrub .pin { position: sticky; top: 4.75rem; }
.scrub .run:first-child .pin { padding-top: clamp(0rem, 7vh, 4.5rem); }
@media (max-width: 56rem) {
  .scrub .run:first-child::after { content: none; }
  .scrub .run:first-child .pin { position: static; padding-top: 0; }
}
.no-3d .scrub .run::after { content: none; }
/* Без скрипта спираль остаётся обычным списком сообщений. */
.no-3d .helix-stage { height: 22rem; overflow: hidden; }
.no-3d .helix { width: min(100%, 22rem); height: auto; transform: none; display: grid; gap: 0.6rem; }
.no-3d .helix li { position: static; width: auto; margin: 0; transform: none; opacity: 1; }
.no-3d .readout { display: none; }

/* Секции */
.section { padding-block: clamp(3.2rem, 8vw, 6.5rem); }
.band { background: var(--band); }
.section h2 { max-width: 46rem; font-size: clamp(1.8rem, 3.8vw, 2.9rem); font-weight: 750; line-height: 1.08; letter-spacing: -0.022em; }
.section h2 + p { margin-top: 1.1rem; }
.section h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.intro { max-width: 40rem; font-size: 1.12rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); margin-top: 2.2rem; }
@media (max-width: 52rem) { .split { grid-template-columns: 1fr; } }
.plain { padding: 0; list-style: none; }
.plain li { position: relative; padding-left: 1.6rem; }
.plain li + li { margin-top: 0.6rem; }
.plain li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.7rem; height: 0.7rem; border-radius: 50% 50% 50% 2px; background: var(--amber); }
.plain.no li::before { border-radius: 2px; height: 3px; top: 0.8em; background: var(--muted); }

/* Окно с примером файла */
.file { margin-top: 2.2rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 30px 60px -40px var(--shadow); overflow: hidden; }
.file-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); }
/* Переключатель формата стоит над окном, а не внутри него: иначе он читается как часть картинки. */
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; max-width: 34rem; margin-top: 2rem; }
.tabs button { position: relative; display: grid; gap: 0.1rem; padding: 0.7rem 1rem 0.75rem; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 14px; background: var(--surface); text-align: left; cursor: pointer; transition: transform 0.12s, border-color 0.12s; }
.tabs b { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.02em; }
.tabs span { color: var(--muted); font-size: 0.82rem; line-height: 1.3; }
.tabs button:hover { border-color: var(--amber); transform: translateY(-2px); }
.tabs button[aria-selected="true"] { border-color: color-mix(in srgb, var(--amber) 70%, #000); background: var(--amber); color: var(--on-amber); transform: none; }
.tabs button[aria-selected="true"] span { color: var(--on-amber); opacity: 0.8; }
/* Язычок показывает, что окно ниже открыто в этом формате. */
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 1.2rem; bottom: -0.75rem; border: 0.5rem solid transparent; border-top-color: color-mix(in srgb, var(--amber) 70%, #000); border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .tabs button, .tabs button:hover { transition: none; transform: none; } }
@media (max-width: 30rem) { .tabs button { padding-inline: 0.7rem; } }
.tabs + .file { margin-top: 1rem; }
.file-name { color: var(--muted); font-family: var(--mono); font-size: 0.8rem; overflow-wrap: anywhere; }
.file-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.file-view { min-height: 21rem; padding: 1.2rem; overflow-x: auto; }
.file-view pre { line-height: 1.55; white-space: pre; }
.file-about { padding: 1.4rem 1.5rem; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--band) 45%, transparent); }
.file-about h3 { margin-bottom: 0.5rem; }
.file-about p + p { margin-top: 0.7rem; }
@media (max-width: 52rem) {
  .file-body { grid-template-columns: 1fr; }
  .file-about { border-left: 0; border-top: 1px solid var(--line); }
}
/* Копия HTML-отчёта: повторяет вид настоящего файла. */
.report { max-width: 30rem; font-size: 0.9rem; }
.report h4 { margin: 0 0 0.7rem; font-size: 1.15rem; }
.report .sum { margin-bottom: 0.9rem; padding: 0.6rem 0.9rem; border: 1px solid var(--line); border-radius: 8px; background: var(--band); font-size: 0.82rem; }
.report .date { margin: 0.9rem 0 0.5rem; color: var(--muted); font-size: 0.78rem; font-weight: 600; text-align: center; }
.report .msg { margin: 0.4rem 0; padding: 0.45rem 0.7rem; border-radius: 8px; background: var(--band); }
.report .msg small { display: block; color: var(--muted); font-size: 0.78rem; }
.report .msg small b { color: var(--ink); font-weight: 650; }
.report .msg small i { font-style: italic; }
.report img { display: block; width: min(100%, 15rem); height: auto; margin-top: 0.4rem; border-radius: 8px; }
.report audio { display: block; width: min(100%, 17rem); height: 2.4rem; margin-top: 0.3rem; }
.sheet { width: 100%; border-collapse: collapse; font-size: 0.8rem; white-space: nowrap; }
.sheet th, .sheet td { padding: 0.4rem 0.6rem; border: 1px solid var(--line); text-align: left; }
.sheet th { background: var(--band); font-weight: 600; }
.sheet td:nth-child(4) { white-space: normal; min-width: 15rem; }

/* Шаги: настоящая последовательность, поэтому с номерами */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; margin-top: 2.4rem; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 1rem; border-top: 3px solid var(--amber); }
.steps li::before { content: counter(step); display: block; margin-bottom: 0.4rem; font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
@media (max-width: 60rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .steps { grid-template-columns: 1fr; } }

/* Тарифы */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2.4rem; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 1.5rem 1.5rem 1.6rem; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.plan.best { border-color: transparent; background: var(--amber); color: var(--on-amber); box-shadow: 0 30px 60px -30px var(--halo); }
.plan.best .muted { color: rgb(32 20 0 / 0.7); }
.plan.best .plain li::before { background: var(--on-amber); }
.price { margin: 0.7rem 0 0.2rem; font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.plan ul { margin-top: 1.2rem; font-size: 0.96rem; }
@media (max-width: 56rem) { .plans { grid-template-columns: 1fr; } }
.pricelist { width: 100%; max-width: 44rem; margin-top: 2rem; border-collapse: collapse; }
.pricelist th, .pricelist td { padding: 0.85rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-weight: 350; }
.pricelist td:last-child { padding-left: 1.5rem; font-weight: 700; white-space: nowrap; text-align: right; }
.pricelist th span { display: block; color: var(--muted); font-size: 0.92rem; }

/* Вопросы */
.faq { margin-top: 2rem; max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.05rem 0; font-size: 1.1rem; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 0.7rem; height: 0.7rem; margin: 0.4rem 0.3rem 0 0; border-right: 2px solid var(--amber); border-bottom: 2px solid var(--amber); transform: rotate(45deg); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(225deg) translate(-0.2rem, -0.2rem); }
.faq details p { padding-bottom: 1.2rem; max-width: 40rem; }

/* Карточка расширения на главной */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-top: 2.2rem; padding: clamp(1.4rem, 3.5vw, 2.8rem); border: 1px solid var(--line); border-radius: 26px; background: var(--surface); color: inherit; text-decoration: none; box-shadow: 0 40px 70px -50px var(--shadow); transition: border-color 0.2s, transform 0.2s; }
a.product:hover { border-color: var(--amber); transform: translateY(-3px); }
.product h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 750; letter-spacing: -0.02em; }
.product p { margin-top: 0.8rem; }
.product .go { display: inline-block; margin-top: 1.3rem; color: var(--link); font-weight: 650; text-decoration: underline; text-underline-offset: 0.2em; }
.tag { display: inline-block; padding: 0.15rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.8rem; font-weight: 400; letter-spacing: 0; vertical-align: middle; }
.mini { display: grid; gap: 0.5rem; }
.mini .bubble { max-width: 85%; font-size: 0.9rem; }
.mini .mine { justify-self: end; }
@media (max-width: 52rem) { .product { grid-template-columns: 1fr; } }

/* Документы */
.doc { padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 8vw, 6rem); }
.doc h1 { max-width: 48rem; font-size: clamp(1.6rem, 4.4vw + 0.4rem, 3rem); hyphens: auto; font-weight: 800; line-height: 1.08; letter-spacing: -0.024em; }
.doc .prose { margin-top: 1.5rem; max-width: 46rem; }
.doc h2 { margin-top: 2.4rem; font-size: 1.4rem; font-weight: 700; line-height: 1.2; }
.doc h2 + * { margin-top: 0.8rem; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.doc th, .doc td { padding: 0.6rem 0.8rem 0.6rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc th { font-weight: 650; }
.doc td:last-child { white-space: nowrap; }
.doc code { padding: 0.1em 0.3em; border-radius: 4px; background: var(--band); }
.scroll { overflow-x: auto; }

/* Подвал */
.foot { padding-block: 3rem 3.5rem; border-top: 1px solid var(--line); font-size: 0.94rem; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
.foot-title { margin-bottom: 0.7rem; font-size: 0.94rem; font-weight: 650; }
.foot ul { padding: 0; list-style: none; }
.foot li + li { margin-top: 0.4rem; }
.foot address { font-style: normal; }
.foot .fine { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; }
@media (max-width: 46rem) { .foot .wrap { grid-template-columns: 1fr; } }

/* Смена темы: новая схема раскрывается кругом от кнопки */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: reveal 0.55s cubic-bezier(0.3, 0, 0.2, 1); }
@keyframes reveal { from { clip-path: circle(0 at var(--tx, 50%) var(--ty, 0)); } to { clip-path: circle(150vmax at var(--tx, 50%) var(--ty, 0)); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  ::view-transition-new(root) { animation: none; }
}
@media print {
  .top, .stage, .readout, .theme { display: none; }
  body { background: #fff; color: #000; }
}

/* Главная: четыре правила */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 5vw, 4.5rem); margin-top: 2.4rem; max-width: 60rem; }
.facts h3 { margin-bottom: 0.5rem; padding-top: 1rem; border-top: 3px solid var(--amber); }
@media (max-width: 46rem) { .facts { grid-template-columns: 1fr; } }

/* Статьи: путь в шапке ссылкой, подзаголовки, оглавление, врезка */
a.crumb { text-decoration: none; }
a.crumb:hover { color: var(--link); }
.doc .byline { margin-top: 0.8rem; }
.doc .lead { margin-top: 0; max-width: none; }
.doc h3 { margin-top: 1.8rem; font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.doc h3 + * { margin-top: 0.6rem; }
.toc { margin-top: 1.6rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.toc p { font-weight: 650; }
.toc ol { margin-top: 0.5rem; }
.toc li + li { margin-top: 0.3rem; }
.callout { padding: 1rem 1.2rem; border-left: 3px solid var(--amber); border-radius: 0 12px 12px 0; background: var(--surface); }
.doc table.even { table-layout: fixed; }
.doc table.even td { white-space: normal; }
@media (max-width: 34rem) {
  .doc table.even { font-size: 0.86rem; hyphens: auto; }
  .doc table.even th, .doc table.even td { padding-right: 0.5rem; }
}

/* Статьи: обложка, иллюстрации, скриншоты, призыв */
.doc figure { margin-top: 1.8rem; }
.doc figure img { display: block; width: 100%; height: auto; border-radius: 16px; }
.doc figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 0.92rem; }
.doc .cover { max-width: 46rem; margin-top: 1.4rem; }
.doc .cover + .prose { margin-top: 1.8rem; }
.doc .shot .file { margin-top: 0; max-width: 30rem; }
.doc .shot .file img { border-radius: 0; }
.shot-side { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); align-items: center; gap: 1rem 1.6rem; padding: 1.2rem; border-radius: 18px; background: var(--band); }
.shot-side img { border-radius: 12px; }
.doc .shot-side figcaption { margin-top: 0; }
@media (max-width: 40rem) {
  .shot-side { grid-template-columns: 1fr; }
  .shot-side img { max-width: 15rem; }
}
.cta { margin-top: 1.8rem; padding: clamp(1.3rem, 3vw, 2rem); border-radius: 20px; background: var(--amber); color: var(--on-amber); box-shadow: 0 30px 60px -30px var(--halo); }
.cta > * + * { margin-top: 0.7rem; }
.cta .cta-title { font-size: 1.35rem; font-weight: 750; line-height: 1.2; letter-spacing: -0.01em; }
.cta .button { margin-top: 0.4rem; background: #0e2a30; color: #edf1ef; box-shadow: none; }
.cta .button:focus-visible { outline-color: #0e2a30; }
