/*
  RU: Стили рабочего макета «BizHub после плана 15.10.2026». Основа — макет 26.09 (токены Cartographic
      Quiet скопированы из web/static/css/site.css), дополнения — в конце файла и в styles-*.css экранов.
  EN: Styles for the working mockup "BizHub after the 2026-10-15 plan". Based on the 2026-09-26 mockup
      (Cartographic Quiet tokens copied from web/static/css/site.css); additions at the end and in screen styles-*.css.
*/
:root {
  --bg: #f0efe8;
  --bg-deep: #e5e4db;
  --surface: #f6f5ef;
  --elev: #f8f7f1;
  --ink: #1d3027;
  --ink-soft: #2a4036;
  --muted: #5c6b63;
  --line: rgba(29, 48, 39, 0.12);
  --line-strong: rgba(29, 48, 39, 0.22);
  --gold: #c1a35f;
  --gold-deep: #8f7536;
  --gold-soft: rgba(193, 163, 95, 0.18);
  --ok: #2f6b4f;
  --ok-soft: rgba(47, 107, 79, 0.12);
  --danger: #a33b3b;
  --danger-soft: rgba(163, 59, 59, 0.1);
  --warn: #8a5a10;
  --warn-soft: rgba(154, 100, 18, 0.13);
  --info: #2f5570;
  --info-soft: rgba(47, 85, 112, 0.11);
  --side: #1d3027;
  --side-ink: #e8ede8;
  --side-muted: #9fb0a6;
  --btn-bg: #1d3027;
  --btn-bg-hover: #2a4036;
  --btn-ink: #f8f6ee;
  --input: #fbfaf6;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Outfit", var(--font);
  --brand: "Fraunces", Georgia, serif;
  --r: 10px;
  --r-sm: 7px;
  --shadow: 0 1px 2px rgba(29, 48, 39, 0.06), 0 8px 24px rgba(29, 48, 39, 0.06);
  --shadow-lg: 0 18px 40px rgba(29, 48, 39, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

/*
  RU: Ночная тема: меняются значения ролей, а не имена — компоненты о теме не знают. Правило задано
      дважды (явный выбор и системная тёмная тема без явного выбора), как в контракте артефактов.
  EN: Night theme: role values change, names do not — components stay theme-agnostic. Declared twice
      (explicit choice and system dark without an explicit choice), per the artifact contract.
*/
:root[data-theme="dark"] {
  --bg: #131a16;
  --bg-deep: #0e1411;
  --surface: #18211c;
  --elev: #1e2822;
  --ink: #e8ede8;
  --ink-soft: #cfd8d0;
  --muted: #9aa79f;
  --line: rgba(232, 237, 232, 0.12);
  --line-strong: rgba(232, 237, 232, 0.24);
  --gold: #cbae69;
  --gold-deep: #d9c184;
  --gold-soft: rgba(203, 174, 105, 0.18);
  --ok: #6fbf92;
  --ok-soft: rgba(111, 191, 146, 0.14);
  --danger: #e2837a;
  --danger-soft: rgba(226, 131, 122, 0.14);
  --warn: #d9a441;
  --warn-soft: rgba(217, 164, 65, 0.15);
  --info: #8db8d6;
  --info-soft: rgba(141, 184, 214, 0.13);
  --side: #0f1613;
  --side-ink: #e8ede8;
  --side-muted: #8d9d94;
  --btn-bg: #2f4a3c;
  --btn-bg-hover: #3a5a49;
  --btn-ink: #f2f6f1;
  --input: #151d18;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; }
h2 { font-size: 18px; line-height: 1.3; }
h3 { font-size: 15px; line-height: 1.35; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-family: var(--brand); font-weight: 600; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* RU: Каркас: рейка слева, содержимое справа; на телефоне рейка уходит в нижнюю панель.
   EN: Frame: rail on the left, content on the right; on a phone the rail becomes a bottom bar. */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--side);
  color: var(--side-ink);
  padding: 18px 12px 14px;
  position: sticky; top: 0; height: 100vh; overflow: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { font-family: var(--brand); font-size: 23px; margin: 0 10px 2px; letter-spacing: -0.01em; }
.brand-sub { margin: 0 10px 16px; color: var(--side-muted); font-size: 12px; }
.nav-btn {
  display: flex; align-items: center; gap: 11px; width: 100%;
  text-align: left; background: none; border: 0; color: var(--side-ink);
  padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14.5px;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.06); }
.nav-btn[aria-current="page"] { background: rgba(193, 163, 95, 0.22); font-weight: 600; }
.nav-btn .ico { width: 18px; height: 18px; flex: none; opacity: 0.9; }
.nav-btn .count {
  margin-left: auto; font-size: 11.5px; background: var(--gold); color: #1d3027;
  border-radius: 999px; padding: 0 7px; font-weight: 700; line-height: 18px;
}
.side-sep { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 12px 8px; }
.side-label { color: var(--side-muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin: 6px 10px 4px; }
.nav-btn.aux { font-size: 13px; color: var(--side-muted); padding: 7px 10px; }
.nav-btn.aux[aria-current="page"] { color: var(--side-ink); }
.shift-mini { margin: 6px 6px 0; padding: 10px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 9px; font-size: 12.5px; color: var(--side-muted); }
.shift-mini .row { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--side-ink); }
.side-foot { margin-top: auto; padding: 10px; font-size: 12px; color: var(--side-muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px clamp(16px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px);
}
.org-pick { display: flex; align-items: center; gap: 8px; font-weight: 600; background: none; border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.org-pick .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.search {
  flex: 1 1 240px; min-width: 0; max-width: 480px;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); background: var(--input);
  border-radius: 8px; padding: 7px 10px; cursor: text; color: var(--muted);
}
.search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd { margin-left: auto; font-size: 11px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 0 6px; white-space: nowrap; }
.top-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 5px 10px; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-ink); }
.phase-pick { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.phase-pick select { border: 1px solid var(--line-strong); background: var(--input); border-radius: 7px; padding: 4px 6px; font-size: 12.5px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--gold-deep); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--ink); font-weight: 700; font-size: 12px; border: 0; cursor: pointer; }

.page { padding: clamp(16px, 3vw, 32px); max-width: 1320px; width: 100%; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .lede { color: var(--muted); max-width: 70ch; margin-top: 6px; }

/* RU: Сетки экранов. Минимумы подобраны так, чтобы на 390 px всё складывалось в одну колонку без прокрутки вбок.
   EN: Screen grids. Minimums are chosen so that at 390 px everything stacks into one column with no sideways scroll. */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }

.panel {
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  min-width: 0;
}
.panel.flat { box-shadow: none; }
.panel.tint { background: var(--surface); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head .sub { font-size: 12.5px; color: var(--muted); }
.eyebrow { font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }

.brief {
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, var(--gold-soft), transparent 70%);
  padding: 14px 18px; border-radius: 0 var(--r) var(--r) 0;
}
.brief p + p { margin-top: 6px; }

/* RU: Кнопки: одна залитая «главная» на дело, остальные контурные — правило экрана из плана.
   EN: Buttons: one filled "primary" per item, the rest outlined — a screen rule from the plan. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong); background: transparent;
  border-radius: 8px; padding: 7px 12px; cursor: pointer; font-size: 13.5px; font-weight: 500;
  white-space: nowrap; transition: background 0.15s;
}
.btn:hover { background: var(--gold-soft); }
.btn.primary { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.btn.primary:hover { background: var(--btn-bg-hover); }
.btn.gold { background: var(--gold); color: #1d3027; border-color: var(--gold); font-weight: 600; }
.btn.ghost { border-color: transparent; }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn[aria-pressed="true"] { background: var(--gold-soft); border-color: var(--gold); font-weight: 600; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; cursor: pointer; font-size: inherit; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 600;
  background: var(--gold-soft); color: var(--ink); white-space: nowrap;
}
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.plain { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.danger { background: var(--danger); }
.dot.idle { background: var(--line-strong); }

/* RU: Значок площадки — буквенный, без логотипов: макет не должен выглядеть чужим брендом.
   EN: Platform badge is lettered, without logos: the mockup must not look like someone else's brand. */
.pf {
  display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 5px;
  border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft);
}

/* RU: ИИ-сотрудник — монограмма в кольце; кольцо золотое, когда он работает сам.
   EN: AI employee — a monogram in a ring; the ring is gold when it acts on its own. */
.agent-ava {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--btn-bg); color: var(--gold); font-family: var(--brand); font-weight: 600; font-size: 15px;
  box-shadow: 0 0 0 2px var(--elev), 0 0 0 3px var(--line-strong);
}
.agent-ava.auto { box-shadow: 0 0 0 2px var(--elev), 0 0 0 3px var(--gold); }
.agent-ava.lg { width: 48px; height: 48px; font-size: 21px; }
.agent-ava.sm { width: 24px; height: 24px; font-size: 11.5px; }
.who { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }

/* RU: Список дел/записей: строка с действием справа; на телефоне действия переносятся вниз.
   EN: List of items/entries: a row with actions on the right; on a phone actions wrap below. */
.list { display: flex; flex-direction: column; }
.item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.item:first-child { border-top: 0; padding-top: 2px; }
.item .body { flex: 1; min-width: 0; }
.item .title { font-weight: 600; }
.item .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.item .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.item.done { opacity: 0.55; }
/* RU: Карточка решения: кнопки под текстом — черновик и цитата читаются во всю ширину панели.
   EN: Decision card: buttons below the text — the draft and quote read at full panel width. */
.item.appr { flex-direction: column; gap: 8px; }
.item.appr .body { width: 100%; }
.item.appr .acts { justify-content: flex-start; width: 100%; }
.quote { margin-top: 6px; padding: 8px 10px; background: var(--surface); border-radius: 7px; font-size: 13.5px; border: 1px solid var(--line); }
.draft { margin-top: 8px; padding: 9px 11px; border-radius: 7px; font-size: 13.5px; border: 1px dashed color-mix(in srgb, var(--gold) 70%, transparent); background: color-mix(in srgb, var(--gold-soft) 45%, transparent); }
.draft[contenteditable="true"] { outline: none; border-style: solid; background: var(--input); }

.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .v { font-family: var(--brand); font-size: 30px; line-height: 1.1; font-weight: 600; }
.kpi .v small { font-family: var(--font); font-size: 14px; color: var(--muted); font-weight: 500; }
.kpi .d { font-size: 13px; }
.src { font-size: 11.5px; color: var(--muted); margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 6px; }
.delta-up { color: var(--ok); font-weight: 600; }
.delta-down { color: var(--danger); font-weight: 600; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 9px 13px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-size: 14px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }

table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th, table.t td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
table.t th { font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 600; border-top: 0; }
.scroll-x { overflow-x: auto; }

/* RU: Лестница доверия: четыре ступени автономии, замок — там, где правило владельца или закон не позволяют выше.
   EN: Trust ladder: four autonomy steps, a lock where the owner rule or the law forbids going higher. */
.ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.ladder button { border: 0; border-left: 1px solid var(--line); background: none; padding: 6px 4px; font-size: 12px; cursor: pointer; color: var(--muted); line-height: 1.25; }
.ladder button:first-child { border-left: 0; }
.ladder button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-ink); font-weight: 600; }
.ladder button.locked { cursor: not-allowed; background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 7px); }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.progress.ok > i { background: var(--ok); }

/* RU: Конвейер «шаг → шаг»: показывает, кто делает шаг — модель, бот, API площадки или человек.
   EN: A "step → step" pipeline: shows who performs a step — a model, a bot, a platform API or a human. */
.pipe { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.pipe .st { position: relative; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; background: var(--surface); font-size: 13px; }
.pipe .st .k { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pipe .st .n { font-weight: 600; margin: 2px 0 4px; }
.pipe .st.auto { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.pipe .st.human { border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.pipe .st.blocked { border-style: dashed; opacity: 0.75; }

/* RU: Правая выдвижная панель — разговор, карточка агента, детали позиции; на телефоне во весь экран.
   EN: Right-side drawer — a conversation, an agent card, item details; full-screen on a phone. */
.scrim { position: fixed; inset: 0; background: rgba(15, 22, 19, 0.35); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw);
  background: var(--bg); border-left: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
  z-index: 41; display: flex; flex-direction: column; animation: slide 0.25s var(--ease);
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 16px 18px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.drawer-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.x { margin-left: auto; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; }

.modal {
  position: fixed; left: 50%; top: 12vh; transform: translateX(-50%);
  width: min(680px, calc(100vw - 24px)); max-height: 76vh; overflow: auto;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 42;
}
.cmd-input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 16px 18px; font-size: 16px; outline: none; }
.cmd-list { padding: 8px; }
.cmd-row { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.cmd-row:hover, .cmd-row.sel { background: var(--gold-soft); }
.cmd-row .kind { font-size: 11px; color: var(--muted); width: 72px; flex: none; text-transform: uppercase; letter-spacing: 0.05em; }

/* RU: Чат помощника: реплики и карточки плана; план — это действия из реестра, не свободный текст.
   EN: Assistant chat: messages and plan cards; a plan is a set of registry actions, not free text. */
.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82%; padding: 10px 13px; border-radius: 12px; font-size: 14px; }
.msg.me { align-self: flex-end; background: var(--btn-bg); color: var(--btn-ink); border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--elev); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.plan-step { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 13.5px; }
.plan-step:first-child { border-top: 0; }
.plan-step .n { width: 20px; height: 20px; border-radius: 50%; background: var(--gold-soft); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.composer { display: flex; gap: 8px; }
.composer input, .field input, .field textarea, .field select {
  flex: 1; min-width: 0; border: 1px solid var(--line-strong); background: var(--input); border-radius: 8px; padding: 9px 11px;
}
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.field textarea { min-height: 90px; resize: vertical; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--btn-bg); color: var(--btn-ink); padding: 10px 16px; border-radius: 9px;
  box-shadow: var(--shadow-lg); z-index: 60; font-size: 14px; display: flex; gap: 12px; align-items: center;
  max-width: calc(100vw - 24px);
}
.toast button { background: none; border: 0; color: var(--gold); font-weight: 700; cursor: pointer; }

/* RU: Режим «после фазы»: то, что появится позже выбранной фазы, приглушено и подписано номером фазы.
   EN: "After phase" mode: whatever arrives after the selected phase is dimmed and labelled with its phase. */
.future { position: relative; opacity: 0.38; filter: grayscale(0.7); pointer-events: none; }
.future::after {
  content: attr(data-phase-label);
  position: absolute; top: 6px; right: 6px;
  font: 700 10.5px/1 var(--font); letter-spacing: 0.04em;
  background: var(--ink); color: var(--bg); padding: 4px 6px; border-radius: 5px; opacity: 1;
}
.nav-btn.future::after { top: 50%; transform: translateY(-50%); right: 8px; background: var(--gold); color: #1d3027; }

/* RU: Режим «под капотом»: у элемента появляется плашка — кто это делает (модель, бот, API, человек) и где работает.
   EN: "Under the hood" mode: an element gets a tag — who does it (model, bot, API, human) and where it runs. */
.how { display: none; }
body.show-how .how, .how.always {
  display: inline-flex; align-items: center; gap: 5px; margin: 4px 4px 0 0;
  font-size: 11px; font-weight: 600; line-height: 1.2; padding: 3px 7px; border-radius: 5px;
  background: var(--info-soft); color: var(--info); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent);
}
body.show-how .how.m, .how.always.m { background: var(--gold-soft); color: var(--gold-deep); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
body.show-how .how.b, .how.always.b { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
body.show-how .how.h, .how.always.h { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }

/* RU: Рамка телефона для экрана «Телефон и Telegram».
   EN: Phone frame for the "Phone and Telegram" screen. */
.phone { width: 330px; max-width: 100%; border: 10px solid #1b231f; border-radius: 34px; background: var(--bg); overflow: hidden; box-shadow: var(--shadow-lg); }
.phone .scr { height: 600px; overflow: auto; display: flex; flex-direction: column; }
.tg-head { background: #24362d; color: #eef3ef; padding: 10px 14px; font-weight: 600; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.tg-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; background: color-mix(in srgb, var(--bg-deep) 70%, var(--bg)); flex: 1; }
.tg-msg { background: var(--elev); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 9px 11px; font-size: 13px; }
.tg-kb { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.tg-kb button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 6px; font-size: 12.5px; cursor: pointer; }
.tg-kb button.wide { grid-column: 1 / -1; }

.site-frame { border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: #f7f5ef; color: #1f2a24; }
.site-bar { display: flex; gap: 6px; align-items: center; padding: 7px 10px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.site-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); display: inline-block; }
.site-hero { padding: 22px 22px 16px; background: linear-gradient(135deg, #20352b, #2e4a3c); color: #f3f1e8; }
.site-hero h3 { font-size: 22px; font-family: var(--display); }
.site-sec { padding: 14px 22px; border-top: 1px solid rgba(0, 0, 0, 0.06); font-size: 13.5px; }
.site-sec .prices { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin-top: 6px; }
.hl-new { background: rgba(47, 107, 79, 0.16); border-radius: 4px; padding: 0 3px; }
.hl-old { background: rgba(163, 59, 59, 0.14); border-radius: 4px; padding: 0 3px; text-decoration: line-through; }

.photo { aspect-ratio: 4 / 3; border-radius: 8px; border: 1px solid var(--line); background: linear-gradient(135deg, #cfc9b6, #a9a38f); position: relative; overflow: hidden; }
.photo.p2 { background: linear-gradient(135deg, #3b4a41, #6b7d70); }
.photo.p3 { background: linear-gradient(135deg, #b8a57a, #7e6d45); }
.photo.p4 { background: linear-gradient(135deg, #5d6f78, #9aa8ad); }
.photo.gen { background: repeating-linear-gradient(45deg, #d9cfb4 0 8px, #cfc4a6 8px 16px); }
.photo .cap { position: absolute; left: 6px; bottom: 6px; font-size: 10.5px; font-weight: 700; background: rgba(0, 0, 0, 0.55); color: #fff; padding: 2px 6px; border-radius: 4px; }

.steps { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.steps span { font-size: 12px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted); }
.steps span.on { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.steps span.done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.check { display: flex; gap: 10px; align-items: center; padding: 7px 0; font-size: 14px; }
.check .st { width: 20px; text-align: center; }
.spin { width: 14px; height: 14px; border: 2px solid var(--line-strong); border-top-color: var(--gold-deep); border-radius: 50%; display: inline-block; animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.preset { border: 1px solid var(--line-strong); border-radius: 10px; padding: 14px; cursor: pointer; background: var(--elev); text-align: left; }
.preset[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }

.timeline { display: flex; flex-direction: column; gap: 0; }
.ph { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.ph:first-child { border-top: 0; }
.ph .code { font-family: var(--brand); font-size: 22px; font-weight: 600; }
.ph .days { font-size: 12px; color: var(--muted); }
.ph ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.ph ul li { margin: 2px 0; }

.bottom-bar { display: none; }

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

/* RU: Телефон: рейка скрыта, пять корней — в нижней панели; служебные экраны макета — в меню аватара.
   EN: Phone: the rail is hidden, five roots go to the bottom bar; mockup service screens go to the avatar menu. */
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .page { padding: 16px 16px 90px; }
  .topbar { padding: 8px 16px; }
  .top-tools .phase-pick span, .top-tools .toggle span.long { display: none; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .item { flex-wrap: wrap; }
  .item .acts { width: 100%; justify-content: flex-start; }
  .bottom-bar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--side); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-bar button { background: none; border: 0; color: var(--side-muted); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; cursor: pointer; }
  .bottom-bar button[aria-current="page"] { color: var(--gold); }
  .bottom-bar .ico { width: 20px; height: 20px; }
  .msg { max-width: 92%; }
  .ph { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* RU: Дополнения макета 15.10: подписи ступеней лестницы переносятся, а не обрезаются на узкой колонке.
   EN: 2026-10-15 mockup additions: ladder step labels wrap instead of being clipped in a narrow column. */
.ladder button { white-space: normal; overflow-wrap: anywhere; hyphens: auto; min-width: 0; }
