/* Scribe - base / reset / typography */
*, *::before, *::after { box-sizing: border-box; }
/* hidden скрывает всегда: класс с display (.pill, .btn, .modal-wrap) перебивал браузерное [hidden], и элемент
   был виден - так «готово к озвучке ✓» стояла у неподготовленного текста. Заплатки вида X[hidden] больше не нужны. */
[hidden] { display: none !important; }
* { margin: 0; }
/* Место под полосу прокрутки занято всегда: иначе длинная страница или вкладка («Сценарий» в проекте) включала полосу,
   и всё сдвигалось влево на её ширину, а короткая - возвращала обратно (Саша, 2026-10-22). */
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; scrollbar-gutter: stable; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
}

/* atmospheric glow - тёплый коралл сверху, ирис снизу */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(1100px 480px at 82% -8%, var(--glow-1), transparent 56%),
    radial-gradient(900px 480px at 4% -4%, var(--glow-2), transparent 55%);
  pointer-events: none; z-index: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -.015em;
  color: var(--text);
}
h1 { font-size: var(--fs-2xl); letter-spacing: -.025em; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p { line-height: 1.6; }

a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: #aaa3cf; }

button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-glow); color: #fff; }

/* helpers */
.mono { font-family: var(--font-mono); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.eyebrow { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .14em; color: var(--text-dim); }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 3px solid var(--bg); }
*::-webkit-scrollbar-track { background: transparent; }

/* tooltip (JS-free, no title attr); на тач/узких - выключен (§7 скила) */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong);
  padding: .3rem .55rem; border-radius: 6px; font-size: var(--fs-xs); white-space: nowrap;
  box-shadow: var(--shadow-2); opacity: 0; pointer-events: none; transition: var(--t-fast); z-index: 80;
}
[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (hover: none), (max-width: 900px) { [data-tip]::after { display: none; } }
