:root {
  --paper: #f5f6f8;
  --surface: #ffffff;
  --ink: #1c2430;
  --ink-2: #5a6472;
  --ink-3: #8a93a0;
  --line: #e1e4ea;
  --sea: #0f5f66;
  --sea-deep: #0b4a50;
  --sea-soft: #e3f0f0;
  --saffron: #e3a21a;
  --saffron-soft: #fff4dc;
  --ok: #1f8a4c;
  --ok-soft: #e4f4ea;
  --bad: #c2412d;
  --bad-soft: #fbe9e5;
  --chat: #e8eeec;
  --photo-bg: #dfe6e4;
  --device: #1c2430;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --on-sea: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12171d;
    --surface: #1a2129;
    --ink: #e6ebf0;
    --ink-2: #a3adb9;
    --ink-3: #75808c;
    --line: #2a333d;
    --sea: #4fb3b9;
    --sea-deep: #0f5f66;
    --sea-soft: #173236;
    --saffron: #f0b43a;
    --saffron-soft: #33290f;
    --ok: #4cc27f;
    --ok-soft: #173325;
    --bad: #f07a62;
    --bad-soft: #3a1d17;
    --chat: #0f171c;
    --photo-bg: #26323a;
    --device: #05080b;
    --on-sea: #08201f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font: 17px/1.65 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--sea); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; }
button { font: inherit; color: inherit; }
.muted { color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ---------- верхняя панель ---------- */
.d-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 max(20px, calc((100vw - 1240px) / 2)); background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.d-brand { font: 700 18px/1 var(--display); color: var(--sea); text-decoration: none; letter-spacing: .01em; white-space: nowrap; }
.d-sep { width: 1px; height: 22px; background: var(--line); }
.d-title { font-weight: 600; color: var(--ink); text-decoration: none; }
.d-nav-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.d-btn { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 10px; background: var(--sea); color: var(--on-sea); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.d-btn.ghost { background: none; color: var(--ink); border: 1px solid var(--line); }
.d-btn:hover { filter: brightness(1.06); }
.d-search-btn, .d-menu { display: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; cursor: pointer; place-items: center; color: var(--ink); }
.d-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.d-progress span { display: block; height: 100%; background: var(--sea); transform-origin: 0 50%; transform: scaleX(0); }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: var(--surface); }
.lang-switch button { border: 0; background: none; padding: 4px 9px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.lang-switch button.active { background: var(--sea); color: var(--on-sea); }

/* ---------- шапка с поиском ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; max-width: 1240px; margin: 0 auto; padding: 56px 20px 48px; }
.hero h1 { font: 700 clamp(28px, 4vw, 50px)/1.1 var(--display); letter-spacing: -0.005em; max-width: 16ch; }
.hero-lead { font-size: 19px; color: var(--ink-2); max-width: 46ch; margin: 20px 0 28px; }
.search { position: relative; display: flex; align-items: center; max-width: 560px; }
.search > svg { position: absolute; left: 18px; color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; height: 58px; padding: 0 52px 0 50px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); font: 500 17px var(--font); box-shadow: 0 1px 0 var(--line), 0 12px 30px -18px rgba(15, 95, 102, 0.45); transition: border-color 0.2s, box-shadow 0.2s; }
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sea) 18%, transparent); }
.search input::-webkit-search-cancel-button { display: none; }
.search-key { position: absolute; right: 16px; font: 400 14px var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; background: var(--paper); }
.results { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 50px -20px rgba(20, 30, 40, 0.35); max-height: min(60vh, 460px); overflow: auto; animation: drop 0.18s var(--ease); }
.results li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.results li.sel { background: var(--sea-soft); }
.results li b { font-size: 15.5px; }
.results .r-ch { font-size: 12.5px; color: var(--ink-3); align-self: center; }
.results .r-snip { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.results mark { background: var(--saffron-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.results li.none { display: block; cursor: default; color: var(--ink-2); font-size: 15px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; max-width: 580px; }
.quick a { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: border-color 0.15s, color 0.15s; }
.quick a:hover { border-color: var(--sea); color: var(--sea); }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 440px; border-radius: 28px; background: var(--sea-deep); background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1.2px, transparent 1.2px); background-size: 18px 18px; overflow: hidden; }
.hero-phone { width: 290px; height: 400px; font-size: 14px; line-height: 1.4; }
.hero-phone .phone { height: 100%; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55); }
.hero-phone .ph-body.fade { opacity: 0; transition: opacity 0.5s; }

/* ---------- раскладка ---------- */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; max-width: 1240px; margin: 0 auto; padding: 0 20px 40px; }
.content { min-width: 0; max-width: 880px; }
.fine { font-size: 14px; margin-top: 48px; }

.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; padding: 4px 8px 24px 0; font-size: 14.5px; overscroll-behavior: contain; scrollbar-width: thin; }
.toc-head { display: none; }
.toc ol, .toc ul { list-style: none; margin: 0; padding: 0; }
.toc > ol > li { margin-bottom: 4px; }
.toc a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; line-height: 1.35; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); background: var(--surface); }
.toc .toc-ch { font-weight: 600; color: var(--ink); }
.toc ul a { padding-left: 22px; font-size: 14px; }
.toc a.active { color: var(--sea); }
.toc ul a.active { border-left-color: var(--sea); background: var(--sea-soft); border-radius: 0 8px 8px 0; }

/* ---------- главы ---------- */
.chapter { padding-top: 32px; }
.chapter + .chapter { margin-top: 40px; border-top: 1px solid var(--line); }
.ch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.ch-head h2 { font: 700 clamp(22px, 2.6vw, 30px)/1.2 var(--display); letter-spacing: 0; }
.ch-open { font-size: 14.5px; font-weight: 600; white-space: nowrap; text-decoration: none; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.ch-open:hover { border-color: var(--sea); }
.sec { padding: 20px 0 8px; scroll-margin-top: 84px; border-radius: 12px; }
.sec h3 { position: relative; font: 700 21px/1.25 var(--font); letter-spacing: -0.01em; margin-bottom: 10px; }
.anchor { position: absolute; left: -24px; color: var(--ink-3); text-decoration: none; opacity: 0; transition: opacity 0.15s; font-weight: 500; }
.sec h3:hover .anchor { opacity: 1; }
.sec.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 30% { background: var(--sea-soft); box-shadow: 0 0 0 14px var(--sea-soft); } 100% { background: transparent; box-shadow: 0 0 0 14px transparent; } }

.prose > * { max-width: 68ch; }
.prose > .scene, .prose > .sim { max-width: none; }
.prose > p, .prose li, .prose dd { color: var(--ink); }
.prose p { margin: 0 0 14px; }
.prose h4 { font: 700 16.5px/1.3 var(--font); margin: 26px 0 8px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 5px 0; }
.prose li::marker { color: var(--ink-3); }
.prose code { font: 400 0.95em var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.prose kbd { font: 400 14px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--surface); }
.prose ol.steps { list-style: none; counter-reset: s; padding: 0; }
.prose ol.steps > li { counter-increment: s; position: relative; padding-left: 40px; margin: 10px 0; }
.prose ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--sea-soft); color: var(--sea); font: 700 14.5px/26px var(--fun); text-align: center; }
.prose ol.steps ul { margin-top: 6px; }

/* надписи кабинета — как маленькие кнопки */
.ui { display: inline; font-weight: 600; font-size: 0.9em; padding: 1px 7px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line); white-space: normal; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.note, .warn { margin: 18px 0; padding: 14px 16px 14px 18px; border-radius: 0 12px 12px 0; font-size: 16px; line-height: 1.55; }
.note { background: var(--sea-soft); border-left: 3px solid var(--sea); }
.warn { background: var(--saffron-soft); border-left: 3px solid var(--saffron); }

dl.map { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 10px 18px; margin: 12px 0 18px; }
dl.map dt { font-weight: 600; }
dl.map dd { margin: 0; color: var(--ink-2); }

.tbl { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 18px; display: block; overflow-x: auto; }
.tbl th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 13.5px; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.tbl td:first-child { min-width: 150px; }
.st { display: inline-block; margin: 2px 4px 2px 0; }
.st .ui { box-shadow: none; border: 0; font-size: 13px; }
.st.ok .ui { background: var(--ok-soft); color: var(--ok); }
.st.wait .ui { background: var(--saffron-soft); color: color-mix(in srgb, var(--saffron) 70%, var(--ink)); }
.st.bad .ui { background: var(--bad-soft); color: var(--bad); }

.example { margin: 16px 0 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.example-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.example pre { margin: 0; padding: 14px 16px; white-space: pre-wrap; font: 15px/1.6 var(--font); color: var(--ink); }

.cmds { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.cmd { position: relative; border: 1px solid var(--line); background: var(--surface); border-radius: 18px 18px 18px 4px; padding: 7px 14px; font-size: 15px; cursor: pointer; text-align: left; transition: border-color 0.15s, transform 0.15s var(--ease), background 0.2s; }
.cmd:hover { border-color: var(--sea); }
.cmd:active { transform: scale(0.97); }
.cmd.copied { background: var(--ok-soft); border-color: var(--ok); }
.example-head .cmd { border-radius: 8px; padding: 4px 10px; font-size: 13.5px; }

/* чек-лист быстрого старта */
.prose ol.checklist { list-style: none; padding: 0; margin: 20px 0 6px; }
.checklist > li { position: relative; padding: 12px 0 12px 46px; border-bottom: 1px dashed var(--line); transition: color 0.2s; }
.checklist > li > input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checklist .tick { position: absolute; left: 0; top: 12px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; font: 700 14px var(--font); color: var(--ink-2); transition: background 0.2s, border-color 0.2s; }
.checklist .tick .sr { position: static; width: auto; height: auto; clip: auto; }
.checklist > li > input:focus-visible + .tick { outline: 2px solid var(--sea); outline-offset: 2px; }
.checklist > li.done .tick { background: var(--sea); border-color: var(--sea); color: var(--on-sea); }
.checklist > li.done .tick .sr { display: none; }
.checklist > li.done .tick::after { content: ''; width: 9px; height: 15px; border: solid var(--on-sea); border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); animation: tick 0.25s var(--ease); }
.checklist > li.done > b { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--ink-3); }
.check-count { font-size: 14.5px; color: var(--ink-2); font-weight: 600; margin: 10px 0 18px !important; }
.check-count.all { color: var(--ok); }
@keyframes tick { from { transform: translateY(-2px) rotate(45deg) scale(0); } }

details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: 10px 0; }
details summary { cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 600; list-style: none; position: relative; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: ''; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border: solid var(--ink-3); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform 0.2s var(--ease); }
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details > p { margin: 0; padding: 0 16px 16px; color: var(--ink-2); }

/* ---------- сцены ---------- */
.scene { margin: 22px 0 26px; display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 14px; }
.stage-wrap { position: relative; }
.stage { position: relative; height: 360px; padding: 16px; border-radius: 18px; background: var(--sea-soft); background-image: radial-gradient(color-mix(in srgb, var(--sea) 16%, transparent) 1.1px, transparent 1.1px); background-size: 16px 16px; overflow: hidden; display: grid; gap: 14px; font-size: 12.5px; line-height: 1.4; }
.stage.l-wide { grid-template-columns: minmax(0, 1fr) 176px; }
.stage.l-split { grid-template-columns: minmax(0, 1fr) 210px; }
.stage.l-solo { grid-template-columns: minmax(0, 340px); justify-content: center; }
.caps { display: flex; flex-direction: column; margin: 0; }
.caps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.caps button { position: relative; width: 100%; display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; font-size: 14px; line-height: 1.35; color: var(--ink-2); overflow: hidden; }
.caps button:hover { background: var(--surface); }
.caps .n { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface); transition: background 0.25s, color 0.25s, border-color 0.25s; }
.caps button.done .n { background: var(--sea-soft); border-color: transparent; color: var(--sea); }
.caps button.on { color: var(--ink); background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.caps button.on .n { background: var(--sea); border-color: var(--sea); color: var(--on-sea); }
.caps .fill { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--sea); transform-origin: 0 50%; transform: scaleX(0); }
.caps button.run .fill { animation: fill 2.6s linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }
.ctrl { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-left: 4px; }
.play { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; }
.play:hover { border-color: var(--sea); color: var(--sea); }
.play .ico { width: 14px; text-align: center; font-size: 12px; }
.count { font-size: 12.5px; color: var(--ink-3); }

.stage.instant *, .stage.instant *::before, .stage.instant *::after { animation: none !important; transition: none !important; }

/* окно кабинета */
.win { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: 12px; box-shadow: 0 18px 40px -22px rgba(10, 40, 45, 0.5), 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; background: var(--paper); border-bottom: 1px solid var(--line); }
.win-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.win-bar span { margin-left: 8px; font-size: 10.5px; color: var(--ink-3); }
.win-body { flex: 1; display: grid; grid-template-columns: 88px minmax(0, 1fr); min-height: 0; }
.win-side { padding: 8px 6px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.win-side span { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 6px; font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; transition: background 0.2s; }
.win-side span.on { background: var(--sea-soft); color: var(--sea); font-weight: 600; }
.win-side span.ping::after { content: '1'; position: absolute; right: 4px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--saffron); color: #1c2430; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; animation: pop 0.35s var(--ease); }
.win-main { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.win-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.win-title { flex: 1; min-width: 0; font: 600 12.5px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--ink-2); white-space: nowrap; border-radius: 8px; padding: 2px; }
.sw-track { position: relative; width: 26px; height: 15px; border-radius: 8px; background: var(--line); transition: background 0.3s; flex: none; }
.sw-knob { position: absolute; left: 2px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.3s var(--ease); }
.sw.on .sw-track { background: var(--sea); }
.sw.on .sw-knob { transform: translateX(11px); }
.sw.on { color: var(--sea); font-weight: 600; }
.win-banner { margin: 8px 10px 0; padding: 6px 8px; border-radius: 6px; background: var(--bad-soft); color: var(--bad); font-size: 11px; }
.win-view { flex: 1; min-height: 0; overflow: hidden; padding: 10px; }
.win-view.enter, .enter { animation: enter 0.4s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

.form { display: flex; flex-direction: column; gap: 8px; }
.form label { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; color: var(--ink-2); font-weight: 500; }
.inp { display: block; min-height: 24px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; font-size: 11.5px; color: var(--ink); background: var(--surface); white-space: pre-wrap; }
.inp.area { min-height: 66px; }
.typing-caret::after { content: ''; display: inline-block; width: 1px; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--ink); animation: caret 0.8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.btn-p, .btn-s { align-self: flex-start; display: inline-block; padding: 5px 10px; border-radius: 7px; font-size: 11px; font-weight: 600; background: var(--sea); color: var(--on-sea); transition: transform 0.15s; }
.btn-s { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.pressed { transform: scale(0.93); }
.test { display: flex; gap: 6px; align-items: center; }
.test .inp { flex: 1; }
.test-reply .bub { display: inline-block; margin-top: 4px; }

.num-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.num-card { border: 1px solid var(--line); border-radius: 9px; padding: 9px; display: flex; flex-direction: column; gap: 6px; transition: border-color 0.3s, background 0.3s; }
.num-card.down { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); background: color-mix(in srgb, var(--bad-soft) 50%, var(--surface)); }
.num-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.role { font-size: 10px; font-weight: 700; color: var(--ink-2); }
.stat { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 10px; background: var(--paper); color: var(--ink-2); white-space: nowrap; }
.stat.ok { background: var(--ok-soft); color: var(--ok); }
.stat.wait { background: var(--saffron-soft); color: color-mix(in srgb, var(--saffron) 70%, var(--ink)); }
.stat.bad { background: var(--bad-soft); color: var(--bad); }
.stat.pop { animation: pop 0.35s var(--ease); }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
.num-phone { font: 400 14px var(--mono); }
.qr-wrap { margin-top: 10px; display: flex; justify-content: center; animation: enter 0.4s var(--ease); }
.qr { width: 110px; height: 110px; color: var(--ink); background: #fff; padding: 6px; border-radius: 8px; }
@media (prefers-color-scheme: dark) { .qr { color: #1c2430; } }

.files .frow { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.ficon, .x-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: #1f7a45; color: #fff; font-weight: 700; font-size: 12px; }
.fstat { display: block; font-size: 10.5px; color: var(--ink-3); }
.fstat.ok { color: var(--ok); font-weight: 600; animation: enter 0.35s var(--ease); }
.fbar { display: block; height: 3px; border-radius: 2px; background: var(--line); margin-top: 4px; overflow: hidden; }
.fbar i { display: block; height: 100%; width: 30%; background: var(--sea); animation: load 0.9s ease-in-out infinite alternate; }
.fbar.full i { width: 100%; animation: none; background: var(--ok); }
@keyframes load { to { transform: translateX(230%); } }

.lead-list { list-style: none; margin: 0; padding: 0; }
.lead { border: 1px solid var(--line); border-left: 3px solid var(--saffron); border-radius: 8px; padding: 8px 10px; }
.lead-h { display: flex; justify-content: space-between; align-items: center; }
.pill.new { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--saffron-soft); color: color-mix(in srgb, var(--saffron) 65%, var(--ink)); }
.lead-who { font-weight: 600; margin: 4px 0; }
.lead dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; margin: 0; font-size: 11px; }
.lead dt { color: var(--ink-3); }
.lead dd { margin: 0; }

/* телефон */
.phone { min-width: 0; height: 100%; display: flex; flex-direction: column; background: var(--chat); border: 6px solid var(--device); border-radius: 26px; overflow: hidden; box-shadow: 0 18px 40px -22px rgba(10, 40, 45, 0.6); }
.ph-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: var(--sea); color: var(--on-sea); }
.ph-head b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-head > div { min-width: 0; }
.ph-sub { display: block; font-size: 10px; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-sub.blink { animation: subblink 1.2s var(--ease); }
@keyframes subblink { 0%, 40% { background: rgba(255, 255, 255, 0.28); border-radius: 4px; } }
.ph-ava { flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.ph-body { flex: 1; min-height: 0; overflow: hidden; padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; }
.phone.dim { opacity: 0.35; filter: grayscale(1); transition: opacity 0.4s, filter 0.4s; }
.phone.self .ph-head { background: var(--ink-2); }
.phone.wide-ph { max-width: 340px; width: 100%; justify-self: center; }

.bub { position: relative; max-width: 86%; padding: 6px 8px 4px; border-radius: 10px; background: var(--surface); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); animation: bub 0.38s var(--ease) both; word-wrap: break-word; }
.bub.in { align-self: flex-start; border-top-left-radius: 3px; transform-origin: 0 100%; }
.bub.out { align-self: flex-end; border-top-right-radius: 3px; background: var(--sea-soft); transform-origin: 100% 100%; }
.bub.out.bot { background: var(--saffron-soft); box-shadow: inset 2px 0 0 var(--saffron); }
.bub.me { background: color-mix(in srgb, var(--sea) 22%, var(--surface)); }
.b-text { display: block; }
.b-meta { display: block; text-align: right; font-size: 9.5px; color: var(--ink-3); margin-top: 2px; }
.b-author { display: block; font-size: 10.5px; font-weight: 700; color: var(--sea); }
.b-quote { display: block; margin-bottom: 4px; padding: 3px 6px; border-left: 2px solid var(--sea); border-radius: 4px; background: rgba(0, 0, 0, 0.05); font-size: 10.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-quote b { display: block; color: var(--sea); }
.mention { color: var(--sea); font-weight: 700; background: color-mix(in srgb, var(--sea) 14%, transparent); border-radius: 4px; padding: 0 2px; }
@keyframes bub { from { opacity: 0; transform: translateY(6px) scale(0.92); } }
.bub.typing { display: flex; gap: 3px; padding: 9px 10px; }
.bub.typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); animation: dots 1s infinite; }
.bub.typing span:nth-child(2) { animation-delay: 0.15s; }
.bub.typing span:nth-child(3) { animation-delay: 0.3s; }
.bub.typing.rec span { background: var(--bad); }
@keyframes dots { 0%, 60%, 100% { transform: none; opacity: 0.5; } 30% { transform: translateY(-3px); opacity: 1; } }
.ph-note { align-self: center; font-size: 10px; color: var(--ink-3); background: color-mix(in srgb, var(--surface) 70%, transparent); border-radius: 8px; padding: 2px 8px; animation: enter 0.4s var(--ease); }

.wave { display: flex; align-items: center; gap: 6px; min-width: 150px; }
.wave .play { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--sea); color: #fff; font-size: 8px; padding-left: 1px; flex: none; }
.wave .bars { flex: 1; display: flex; align-items: center; gap: 2px; height: 20px; }
.wave .bars i { flex: 1; height: var(--h); border-radius: 1px; background: var(--ink-3); opacity: 0.6; }
.bub.playing .bars i { animation: bar 0.9s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.07s); background: var(--sea); opacity: 1; }
@keyframes bar { from { transform: scaleY(0.35); } }
.wave .len { font-size: 10px; color: var(--ink-3); }
.transcript { display: block; margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); font-style: italic; color: var(--ink-2); font-size: 11.5px; }

.bub.photo { padding: 4px 4px 4px; }
.b-photo svg { display: block; width: 120px; height: 120px; border-radius: 7px; margin-bottom: 4px; }

.cam { position: relative; margin: auto; width: 140px; height: 140px; border-radius: 14px; background: #0c1114; display: grid; place-items: center; overflow: hidden; }
.cam .qr { width: 96px; height: 96px; }
.cam::before { content: ''; position: absolute; inset: 14px; border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 10px; }
.cam .scan { position: absolute; left: 14px; right: 14px; height: 2px; background: #6ee7b7; box-shadow: 0 0 10px #6ee7b7; animation: scan 1.2s ease-in-out infinite alternate; }
@keyframes scan { from { top: 18px; } to { top: 120px; } }
.cam-ok { margin: auto; width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 32px; font-weight: 700; animation: pop 0.45s var(--ease); }
.menu-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 10px; overflow: hidden; animation: enter 0.35s var(--ease); }
.menu-list li { padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 11.5px; transition: background 0.2s; }
.menu-list li.big { color: var(--sea); font-weight: 600; }
.menu-list li.pressed { background: var(--sea-soft); transform: none; }
.wa-list { margin: auto; display: flex; gap: 14px; font-size: 22px; opacity: 0.6; }
.ph-plain .ph-head { background: var(--ink-2); }

/* таблица */
.sheet { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: 10px; box-shadow: 0 18px 40px -22px rgba(10, 40, 45, 0.5), 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent); overflow: hidden; }
.sh-name { display: flex; align-items: center; gap: 7px; padding: 8px 10px; font-weight: 600; border-bottom: 1px solid var(--line); }
.x-ico { width: 20px; height: 20px; font-size: 10px; border-radius: 4px; }
.g-ico { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; background: #188038; color: #fff; font-size: 12px; }
.sh-scroll { flex: 1; overflow: hidden; scroll-behavior: smooth; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.sheet th, .sheet td { border: 1px solid var(--line); padding: 5px 7px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; transition: background 0.25s; }
.sheet th { background: var(--paper); font-weight: 600; color: var(--ink-2); }
.sheet.g th { background: color-mix(in srgb, #188038 12%, var(--surface)); }
.sheet .rn { width: 22px; color: var(--ink-3); text-align: center; background: var(--paper); font-size: 10px; }
.sheet tr.scan td { background: var(--sea-soft); }
.sheet tr.hit td { background: var(--saffron-soft); }
.sheet tr.hit td:first-child { box-shadow: inset 3px 0 0 var(--saffron); }
.sheet td.changed { animation: changed 1.4s var(--ease); font-weight: 700; }
@keyframes changed { 0% { background: var(--saffron); color: #1c2430; } 100% { background: var(--saffron-soft); } }
.sheet tr.enter td { animation: rowin 0.5s var(--ease) both; }
@keyframes rowin { from { background: color-mix(in srgb, #188038 25%, var(--surface)); opacity: 0; transform: translateY(-4px); } }
.sheet.empty tbody::after { content: ''; }
.sheet.empty thead { opacity: 0.3; }
.sh-tabs { display: flex; gap: 2px; padding: 0 8px; border-top: 1px solid var(--line); background: var(--paper); }
.sh-tabs span { padding: 5px 10px; font-size: 10.5px; color: var(--ink-2); }
.sh-tabs span.on { background: var(--surface); color: #188038; font-weight: 700; box-shadow: inset 0 2px 0 #188038; }
.searching { box-shadow: 0 0 0 2px var(--sea), 0 18px 40px -22px rgba(10, 40, 45, 0.5); }

/* галерея фото */
.gallery { min-width: 0; background: var(--surface); border-radius: 10px; box-shadow: 0 18px 40px -22px rgba(10, 40, 45, 0.5), 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent); padding: 10px; }
.g-head { font-weight: 600; margin-bottom: 8px; }
.g-head span { color: var(--ink-3); font-weight: 500; }
.gallery ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery li { border-radius: 8px; padding: 4px; border: 1.5px solid transparent; transition: border-color 0.2s, background 0.2s, transform 0.25s var(--ease); }
.gallery li svg { display: block; width: 100%; aspect-ratio: 1; border-radius: 6px; }
.gallery li span { display: block; font-size: 10.5px; margin-top: 4px; line-height: 1.25; }
.gallery li.scan { background: var(--sea-soft); }
.gallery li.hit { border-color: var(--saffron); background: var(--saffron-soft); transform: translateY(-3px); }

/* журнал в Google Таблицу */
.log-left { min-width: 0; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.log-left .phone { flex: 1; min-height: 0; }
.log-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; border-radius: 8px; background: var(--surface); font-size: 11px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.chk i { width: 13px; height: 13px; border: 1.5px solid var(--ink-3); border-radius: 3px; display: grid; place-items: center; transition: background 0.2s; }
.chk.on i { background: var(--sea); border-color: var(--sea); }
.chk.on i::after { content: ''; width: 3px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.log-link { color: var(--sea); font-weight: 600; animation: enter 0.35s var(--ease); }
.stage.l-split:has(.log-left) { grid-template-columns: 200px minmax(0, 1fr); }

/* указатель и уведомление */
.cursor { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; opacity: 0; transform: translate(60%, 110%); transition: transform 0.6s var(--ease), opacity 0.3s; }
.cursor.show { opacity: 1; }
.cursor::after { content: ''; position: absolute; left: -9px; top: -9px; width: 22px; height: 22px; border-radius: 50%; background: var(--sea); opacity: 0; }
.cursor.press::after { animation: ripple 0.45s ease-out; }
@keyframes ripple { from { opacity: 0.45; transform: scale(0.3); } to { opacity: 0; transform: scale(1.6); } }
.notice { position: absolute; z-index: 6; top: 12px; left: 50%; width: min(360px, 86%); padding: 9px 12px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 92%, transparent); color: var(--paper); font-size: 11.5px; line-height: 1.4; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.5); transform: translateX(-50%); animation: notice 4s var(--ease) forwards; }
.notice b { display: block; font-size: 10px; opacity: 0.7; margin-bottom: 2px; }
.notice.static { animation: none; opacity: 0; }
@keyframes notice { 0% { transform: translate(-50%, -140%); } 12%, 82% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(-50%, -20%); opacity: 0; } }

/* ---------- тренажёр ---------- */
.sim { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin: 20px 0; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; }
.sim h4 { font: 700 18px var(--font); margin: 0 0 2px; }
.sim .muted { margin: 0 0 12px; font-size: 14.5px; }
.sim-group { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.sim-lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 10px; background: var(--paper); align-self: flex-start; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 5px 11px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: background 0.2s, color 0.2s; }
.seg input:checked + span { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.seg input:focus-visible + span { outline: 2px solid var(--sea); }
.sw-row { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; cursor: pointer; line-height: 1.4; padding: 3px 0; }
.sw-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw-row .sw-track { width: 34px; height: 20px; border-radius: 10px; margin-top: 1px; }
.sw-row .sw-knob { width: 16px; height: 16px; }
.sw-row input:checked + .sw-track { background: var(--sea); }
.sw-row input:checked + .sw-track .sw-knob { transform: translateX(14px); }
.sw-row input:focus-visible + .sw-track { outline: 2px solid var(--sea); outline-offset: 2px; }
.sw-row .ui { font-size: 0.86em; }
.time-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding-left: 44px; font-size: 14px; color: var(--ink-2); }
.time-row input { accent-color: var(--sea); }
.time-row output { font-weight: 700; color: var(--ink); min-width: 44px; }

.sim-result { position: sticky; top: 84px; align-self: start; border-radius: 14px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.sim-result.bump { animation: bump 0.45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.015); } }
.sim-head { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.sim-head .ph-ava { background: var(--sea-soft); color: var(--sea); }
.sim-head b { display: block; font-size: 14.5px; }
.sim-sub { display: block; font-size: 12.5px; color: var(--ink-2); }
.sim-sub .why { color: color-mix(in srgb, var(--saffron) 65%, var(--ink)); }
.sim-verdict { display: flex; align-items: center; gap: 10px; padding: 14px 14px 6px; }
.v-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; transition: background 0.3s; }
.v-text { font: 700 18px/1.2 var(--font); }
[data-v='yes'] .v-ico { background: var(--ok); }
[data-v='no'] .v-ico { background: var(--bad); }
[data-v='silent'] .v-ico { background: var(--saffron); }
.sim-fix { margin: 0; padding: 0 14px 10px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.chain { list-style: none; margin: 0; padding: 6px 14px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.chain li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); animation: chain 0.3s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.c-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.chain li.pass .c-dot { border-color: var(--ok); background: var(--ok); }
.chain li.pass .c-dot::after { content: ''; width: 3px; height: 6px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: translateY(-1px) rotate(45deg); }
.chain li.fail { color: var(--bad); font-weight: 700; }
.chain li.fail .c-dot { border-color: var(--bad); background: var(--bad); }
.chain li.skip { opacity: 0.45; }
@keyframes chain { from { opacity: 0; transform: translateX(-4px); } }

/* ---------- подвал ---------- */
.d-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; max-width: 1240px; margin: 0 auto; padding: 32px 20px 48px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.d-foot p { margin: 8px 0 0; }
.legal-links a { margin-right: 14px; }
.d-toast { position: fixed; z-index: 50; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 9px 16px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 14.5px; font-weight: 600; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.4); }
.d-toast.show { animation: toast 0.3s var(--ease); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } }
.to-top { position: fixed; z-index: 25; right: 20px; bottom: 24px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 18px; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.3); }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- узкие экраны ---------- */
@media (max-width: 1080px) {
  .scene { grid-template-columns: minmax(0, 1fr); }
  .caps ol { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; gap: 6px; padding-bottom: 2px; scrollbar-width: none; }
  .caps ol::-webkit-scrollbar { display: none; }
  .caps li { flex: 0 0 auto; max-width: 220px; scroll-snap-align: start; }
  .caps button { background: var(--surface); }
  .sim { grid-template-columns: minmax(0, 1fr); }
  .sim-result { position: static; order: -1; }
}
@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); max-height: none; padding: 16px; background: var(--paper); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform 0.3s var(--ease); }
  .toc.open { transform: none; box-shadow: 20px 0 50px -20px rgba(0, 0, 0, 0.4); }
  .toc-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 12px; }
  .toc-close { border: 0; background: none; font-size: 18px; cursor: pointer; padding: 6px; }
  body.toc-open::after { content: ''; position: fixed; inset: 0; z-index: 35; background: rgba(10, 15, 20, 0.35); }
  .d-menu { display: grid; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 36px; }
  .hero-visual { min-height: 380px; }
  .hero-phone { height: 340px; }
}
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .d-nav { gap: 8px; height: 58px; padding: 0 12px; }
  .d-sep, .d-btn, .d-title { display: none; }
  .d-brand { font-size: 16px; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .d-nav-end { gap: 6px; }
  .d-search-btn { display: grid; }
  .hero { padding: 28px 16px 32px; }
  .hero-lead { font-size: 17px; }
  .hero-visual { display: none; }
  .layout { padding: 0 16px 32px; }
  .d-foot { padding: 28px 16px 40px; }
  .ch-head { flex-direction: column; gap: 8px; }
  .stage { height: auto; padding: 12px; }
  .stage.l-wide, .stage.l-split, .stage.l-solo, .stage.l-split:has(.log-left) { grid-template-columns: minmax(0, 1fr); }
  .stage { gap: 10px; }
  .stage > .win, .stage > .sheet, .stage > .gallery { height: 196px; }
  .stage > .phone { height: 214px; }
  .stage.l-solo > .phone { height: 300px; }
  .log-left .phone { height: 170px; flex: none; }
  .stage > .log-left { height: auto; }
  dl.map { grid-template-columns: 1fr; gap: 2px; }
  dl.map dd { margin-bottom: 10px; }
  .anchor { display: none; }
  .time-row { padding-left: 0; }
  .sim { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .notice { animation: none; }
}

/* сцены: звонок, записная книжка, опрос */
.call-ring { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 26px; border-radius: 16px; background: var(--surface); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .3); animation: enter .35s var(--ease); }
.ring-ico { font-size: 28px; animation: ring .5s ease-in-out infinite alternate; }
@keyframes ring { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
.ph-note.call { color: var(--bad); font-weight: 600; }
.bub.reacted { margin-bottom: 12px; }
.b-react { position: absolute; bottom: -12px; left: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 5px; font-size: 12px; animation: pop .4s var(--ease); }
.sheet tr[data-kind] td:first-child { transition: box-shadow .3s; }
.nb-on tr[data-kind='title'] td { font-weight: 700; }
.nb-on tr[data-kind='pair'] td:first-child { box-shadow: inset 3px 0 0 #2f7a4f; }
.nb-on tr[data-kind='sec'] td:first-child { box-shadow: inset 3px 0 0 var(--saffron); }
.nb-on tr[data-kind='head'] td { background: var(--sea-soft); font-weight: 700; }
.nb-on tr[data-kind='note'] td:first-child { box-shadow: inset 3px 0 0 #7b2d8e; }
.nb-legend { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 10.5px; opacity: 0; transition: opacity .4s; }
.nb-on .nb-legend { opacity: 1; }
.nb-legend span { padding: 1px 7px; border-radius: 8px; background: var(--paper); border-left: 3px solid var(--line); }
.nb-legend [data-kind='pair'] { border-color: #2f7a4f; }
.nb-legend [data-kind='sec'] { border-color: var(--saffron); }
.nb-legend [data-kind='head'] { border-color: var(--sea); }
.nb-legend [data-kind='note'] { border-color: #7b2d8e; }
.poll-card { min-width: 0; background: var(--surface); border-radius: 12px; box-shadow: 0 18px 40px -22px rgba(10, 40, 45, .5), 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent); display: flex; flex-direction: column; overflow: hidden; }
.pc-head { padding: 9px 12px; font-weight: 700; border-bottom: 1px solid var(--line); }
.pc-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.pc-q { font-weight: 700; font-size: 13.5px; animation: enter .35s var(--ease); }
.pc-o { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; animation: enter .35s var(--ease); }
.pc-o b { color: var(--sea); }
.pc-o i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--paper); overflow: hidden; }
.pc-o em { display: block; height: 100%; background: var(--sea); border-radius: 3px; transition: width .4s var(--ease); }
.pc-f { font-size: 11px; color: var(--ink-3); }
