/* Основной вариант: входящие решения и строка пилота (B), шкала шести недель (C), роли (A).
   Монохром и крупная типографика; радужный акцент — только у второго пилота; даты на шкале — моноширинным. */
:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --ink: #0d0f14;
  --muted: #5b6270;
  --faint: #9aa0ab;
  --line: #e6e8ed;
  --hover: #eceef2;
  --primary: #0d0f14;
  --primary-ink: #ffffff;
  --risk: #d33a2c;
  --risk-soft: #fde8e5;
  --warn: #b8730c;
  --warn-soft: #fbefd9;
  --ok: #1d8752;
  --ok-soft: #e0f3e8;
  --info: #3653d1;
  --info-soft: #e7ebfc;
  --bar: #1d2129;
  --bar-ink: #ffffff;
  --away: #e7d6a8;
  --away-ink: #82621a;
  --prism: conic-gradient(from 200deg, #45d4cf, #7f74ff, #f17fca, #ffbe5c, #45d4cf);
  --shadow: 0 1px 2px rgba(13, 15, 20, .04), 0 12px 32px rgba(13, 15, 20, .08);
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --body: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c10; --surface: #15171c; --ink: #eef0f4; --muted: #9ba2ae; --faint: #636a77; --line: #24272f; --hover: #1c1f26;
    --primary: #f2f3f6; --primary-ink: #0b0c10; --risk: #ff6d60; --risk-soft: #3a1714; --warn: #f0b04a; --warn-soft: #33260e;
    --ok: #4fca8c; --ok-soft: #10291c; --info: #93a5ff; --info-soft: #1b2143; --bar: #dfe3ea; --bar-ink: #0b0c10;
    --away: #5a4a22; --away-ink: #e9cf8a; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c10; --surface: #15171c; --ink: #eef0f4; --muted: #9ba2ae; --faint: #636a77; --line: #24272f; --hover: #1c1f26;
  --primary: #f2f3f6; --primary-ink: #0b0c10; --risk: #ff6d60; --risk-soft: #3a1714; --warn: #f0b04a; --warn-soft: #33260e;
  --ok: #4fca8c; --ok-soft: #10291c; --info: #93a5ff; --info-soft: #1b2143; --bar: #dfe3ea; --bar-ink: #0b0c10;
  --away: #5a4a22; --away-ink: #e9cf8a; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
svg { width: 18px; height: 18px; flex: none; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font: 600 34px/1.08 var(--display); letter-spacing: -.035em; }
h2 { font: 600 18px/1.25 var(--display); letter-spacing: -.02em; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Полоса прототипа — не часть продукта */
.proto-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: #ecebf8; color: #4b3fa6; font-size: 13px; border-bottom: 1px dashed #4b3fa6; }
.proto-bar .seg { display: inline-flex; border: 1px solid #4b3fa6; border-radius: 999px; overflow: hidden; }
.proto-bar .seg button { border: 0; background: transparent; padding: 3px 10px; color: #4b3fa6; cursor: pointer; font-size: 13px; }
.proto-bar .seg button[aria-pressed="true"] { background: #4b3fa6; color: #ecebf8; }
.proto-bar .links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.proto-bar .links a { color: #4b3fa6; font-weight: 600; text-decoration: none; }

/* Шапка */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding-block: 12px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); }
.logo { display: flex; align-items: center; gap: 8px; font: 600 16px var(--display); letter-spacing: -.03em; text-decoration: none; }
.logo i { width: 22px; height: 22px; border-radius: 7px; background: var(--prism); display: block; transform: rotate(45deg) scale(.78); }
.tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.tabs a { padding: 7px 16px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.tabs a[aria-current="page"] { background: var(--primary); color: var(--primary-ink); }
.n { font-size: 12px; min-width: 18px; height: 18px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--risk); color: #fff; padding-inline: 5px; line-height: 1; }
.top .right { justify-self: end; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.ava { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--hover); color: var(--muted); font-size: 13px; font-weight: 600; flex: none; text-decoration: none; }
a.ava:hover { background: var(--line); }
.ava.lg { width: 56px; height: 56px; font: 600 20px var(--display); }

.main { padding-block: 8px 140px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.wrap.wide { max-width: 1440px; }
.wrap.narrow { max-width: 720px; }
.hero { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: flex-end; padding-top: 12px; }
.hero .grow { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.sub { color: var(--muted); }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }

/* Кнопки, тоны */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border-radius: 999px; border: 0; background: var(--hover); color: var(--ink); font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .12s ease, background .12s ease; }
.btn:hover { background: var(--line); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { opacity: .9; }
.btn.ghost { background: transparent; color: var(--muted); padding-inline: 10px; }
.btn.ghost:hover { color: var(--ink); background: var(--hover); }
.btn kbd, .k { font: 11px var(--body); color: inherit; opacity: .55; border: 1px solid currentColor; border-radius: 5px; padding: 0 5px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tone { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tone::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.tone.risk { color: var(--risk); } .tone.risk::before { background: var(--risk); }
.tone.warn { color: var(--warn); } .tone.warn::before { background: var(--warn); }
.tone.ready { color: var(--ok); } .tone.ready::before { background: var(--ok); }
.tone.check { color: var(--info); } .tone.check::before { background: var(--info); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--hover); color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.pill.risk { background: var(--risk-soft); color: var(--risk); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.info { background: var(--info-soft); color: var(--info); }
.srcs { display: flex; flex-wrap: wrap; gap: 6px; }
.src { font-size: 12px; color: var(--faint); }
.src + .src::before { content: "·"; margin-right: 6px; }

/* Входящие */
.inbox { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.list { display: flex; flex-direction: column; gap: 6px; }
.item { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 0; background: transparent; text-align: left; cursor: pointer; width: 100%; transition: background .12s ease; }
.item:hover { background: var(--hover); }
.item[aria-current="true"] { background: var(--surface); box-shadow: var(--shadow); }
.item .why { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item.done { opacity: .45; }
.item.done h3 { text-decoration: line-through; }
.decision { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.decision h2 { font-size: 24px; line-height: 1.15; }
.block { display: flex; flex-direction: column; gap: 10px; }
.label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.lines { display: flex; flex-direction: column; }
.line { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.line:first-child { border-top: 0; }
.line .grow { flex: 1; min-width: 0; }
.line b { white-space: nowrap; }
a.line:hover { color: var(--info); }
.opts { display: flex; flex-direction: column; gap: 6px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--bg); cursor: pointer; border: 1.5px solid transparent; text-align: left; width: 100%; }
.opt[aria-checked="true"] { border-color: var(--ink); background: var(--surface); }
.opt .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opt .grow small { color: var(--muted); }
.opt b { font: 600 15px var(--display); letter-spacing: -.02em; white-space: nowrap; }
.opt .tag { min-width: 64px; text-align: right; color: var(--muted); font: 500 12px var(--mono); white-space: nowrap; }
.opt[aria-checked="true"] .tag { color: var(--ink); }
button.link { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.draft { padding: 16px 18px; border-radius: 14px; background: var(--bg); white-space: pre-line; line-height: 1.55; }
.draft[contenteditable="true"]:focus { outline: 2px solid var(--info); }
.empty { padding: 48px 28px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; background: var(--surface); border-radius: var(--r); }
.empty .big { font: 600 44px/1 var(--display); letter-spacing: -.04em; }
.preview { border-radius: 16px; border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.made { color: var(--faint); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.made a { color: var(--info); }
.who { display: flex; flex-wrap: wrap; gap: 6px; }
.who button { border: 0; border-radius: 999px; padding: 6px 12px; background: var(--hover); cursor: pointer; }
.who button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }

/* Люди и карточки */
.seg2 { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--hover); }
.seg2 button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.seg2 button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.tile { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: 16px; background: var(--surface); text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
.tile:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.tile .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile .meta { color: var(--muted); font-size: 13.5px; }
.card { background: var(--surface); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.two > div { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.meter { height: 8px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.meter i.over { background: var(--risk); }
.big { font: 600 34px/1.05 var(--display); letter-spacing: -.035em; }
.big small { font: 400 15px var(--body); color: var(--muted); letter-spacing: 0; }
.strike { text-decoration: line-through; color: var(--faint); font: 400 15px var(--body); letter-spacing: 0; }
.menu { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); overflow: hidden; }
.menu a { display: flex; align-items: center; gap: 12px; padding: 16px 18px; text-decoration: none; border-top: 1px solid var(--line); }
.menu a:first-child { border-top: 0; }
.menu a:hover { background: var(--hover); }
.menu a .grow { flex: 1; display: flex; flex-direction: column; }
.menu a small { color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { color: var(--muted); font-size: 13.5px; }
.input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.input:focus { border-color: var(--ink); outline: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.steps-mini { display: flex; gap: 6px; }
.steps-mini span { width: 30px; height: 4px; border-radius: 4px; background: var(--line); }
.steps-mini span.on { background: var(--ink); }

/* Шкала шести недель */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.board { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.tl { overflow-x: auto; background: var(--surface); border-radius: var(--r); }
.tl-inner { min-width: 860px; }
.tl-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); border-top: 1px solid var(--line); }
.tl-row:first-child { border-top: 0; }
.tl-row.sec { background: var(--bg); }
.tl-row.sec .lab { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding-block: 5px; }
.lab { padding: 9px 14px; font-size: 13.5px; display: flex; flex-direction: column; justify-content: center; min-width: 0; border-right: 1px solid var(--line); }
.lab small { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track { position: relative; min-height: 44px; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / 6) 100%; }
.tl-row.sec .track { min-height: 24px; }
.weeks-h { display: grid; grid-template-columns: repeat(6, 1fr); }
.weeks-h span { padding: 9px 10px; font: 500 12px var(--mono); color: var(--muted); border-left: 1px solid var(--line); }
.weeks-h span:first-child { border-left: 0; }
.today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--info); left: calc(100% / 60); z-index: 2; pointer-events: none; }
.hol { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--line) 0 3px, transparent 3px 7px); pointer-events: none; }
.bar { position: absolute; top: 9px; height: 26px; border-radius: 8px; background: var(--bar); color: var(--bar-ink); font-size: 12px; display: flex; align-items: center; padding-inline: 8px; white-space: nowrap; overflow: hidden; transition: left .35s ease, width .35s ease; }
.bar.warn { background: var(--warn); color: #fff; }
.bar.gap { background: repeating-linear-gradient(135deg, var(--away) 0 5px, transparent 5px 10px); color: var(--away-ink); border: 1px dashed var(--away-ink); }
.bar.ghost { background: transparent; border: 1.5px dashed var(--faint); color: var(--muted); }
.bar.more::after { content: "→"; margin-left: auto; padding-left: 6px; }
.tend { position: absolute; top: 13px; font: 500 11.5px var(--mono); color: var(--muted); white-space: nowrap; transition: left .35s ease; }
.promise { position: absolute; top: 4px; bottom: 4px; width: 2px; background: var(--risk); transition: left .35s ease; }
.promise.ok { background: var(--ok); }
.promise span { position: absolute; top: -2px; left: 6px; font: 500 11px var(--mono); color: var(--risk); white-space: nowrap; background: var(--surface); padding-inline: 3px; border-radius: 3px; }
.promise.ok span { color: var(--ok); }
.away { position: absolute; top: 9px; height: 26px; border-radius: 8px; background: var(--away); color: var(--away-ink); font-size: 12px; display: flex; align-items: center; padding-inline: 8px; white-space: nowrap; overflow: hidden; }
.away.req { background: transparent; border: 1.5px dashed var(--away-ink); }
.heat { position: absolute; top: 6px; bottom: 6px; border-radius: 6px; background: var(--risk-soft); color: var(--risk); font: 500 11.5px var(--mono); display: flex; align-items: center; padding-inline: 8px; }
.pin { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; border: 2px solid var(--surface); z-index: 3; transition: left .35s ease; }
.pin.risk { background: var(--risk); color: #fff; } .pin.warn { background: var(--warn); color: #fff; } .pin.ok { background: var(--ok); color: #fff; }
.pin.small { width: 20px; height: 20px; font-size: 10px; background: var(--hover); color: var(--muted); border-color: var(--line); cursor: pointer; }
.clash { position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 4; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--risk); color: #fff; font-size: 12px; font-weight: 600; border: 0; cursor: pointer; box-shadow: 0 0 0 4px color-mix(in srgb, var(--risk) 22%, transparent); white-space: nowrap; }
.clash.warn { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 22%, transparent); }
.clash.done { background: var(--ok); box-shadow: none; }
.clash b { width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 11px; }
.side { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; }
.side .close { display: none; }
.clist { display: flex; flex-direction: column; gap: 8px; }
.citem { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--bg); border: 0; text-align: left; cursor: pointer; width: 100%; }
.citem:hover { background: var(--hover); }
.citem .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.citem small { color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 6px; background: var(--faint); }
.dot.risk { background: var(--risk); } .dot.warn { background: var(--warn); } .dot.ok { background: var(--ok); }
.note { font-size: 12.5px; color: var(--faint); }
.agenda { display: none; }

/* Ряды с мини-шкалой: «Команда» сотрудника */
.rows { background: var(--surface); border-radius: var(--r); overflow: hidden; }
.r { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.r:first-child { border-top: 0; }
.r .name { display: flex; flex-direction: column; min-width: 0; }
.r .name small { color: var(--muted); }
.mini { position: relative; height: 22px; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / 6) 100%; border-radius: 4px; min-width: 0; }
.mini .away { top: 3px; height: 16px; font-size: 10.5px; padding-inline: 5px; border-radius: 4px; }

/* Календарь заявки */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { text-align: center; font-size: 12px; color: var(--faint); }
.cal button { aspect-ratio: 1 / 1; max-width: 100%; border: 0; border-radius: 10px; background: var(--bg); cursor: pointer; }
.cal button:hover { background: var(--hover); }
.cal button.we { color: var(--faint); background: transparent; }
.cal button.hol { color: var(--risk); background: transparent; }
.cal button.in { background: var(--hover); border-radius: 0; }
.cal button.edge { background: var(--primary); color: var(--primary-ink); border-radius: 10px; }
.cal button { position: relative; }
.cal button.busy::after { content: ""; position: absolute; left: 50%; bottom: 14%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--muted); }
.cal .blank { aspect-ratio: 1 / 1; }

/* Страницы по ссылке */
.public { max-width: 560px; margin: 0 auto; padding-block: 32px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 18px; }
.preview-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--info-soft); color: var(--info); font-size: 14px; }
.preview-bar a { margin-left: auto; color: var(--info); font-weight: 600; }
.plain { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); overflow: hidden; }
.plain > * { padding: 14px 18px; border-top: 1px solid var(--line); }
.plain > *:first-child { border-top: 0; }
button.choice { border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; display: flex; flex-direction: column; }
button.choice:first-child { border-top: 0; }
button.choice:hover { background: var(--hover); }
button.choice small { color: var(--muted); }

/* Строка пилота */
.pilot { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  width: min(680px, calc(100vw - 40px)); display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 999px; cursor: text;
  border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--prism) border-box; box-shadow: var(--shadow); color: var(--muted); }
.pilot > span:not(.spark) { flex: 1; text-align: left; }
.spark { width: 34px; height: 34px; border-radius: 50%; background: var(--prism); display: grid; place-items: center; color: #fff; flex: none; }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(8, 10, 14, .38); backdrop-filter: blur(3px); }
.cmd { position: fixed; z-index: 41; left: 50%; top: 14vh; transform: translateX(-50%); width: min(680px, calc(100vw - 32px)); max-height: 76vh; overflow: auto;
  border-radius: 22px; box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; gap: 6px;
  border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--prism) border-box; }
.cmd .cfield { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.cmd input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 18px; padding: 8px 2px; }
.cmd .res { padding: 6px 8px 10px; display: flex; flex-direction: column; gap: 10px; }
.cmd .hint { color: var(--faint); font-size: 13px; padding-inline: 8px; }
.sug { display: flex; flex-direction: column; }
.sug button { border: 0; background: transparent; text-align: left; padding: 10px; border-radius: 10px; cursor: pointer; display: flex; gap: 10px; align-items: center; color: var(--ink); }
.sug button:hover { background: var(--hover); }
.sug .k2 { color: var(--faint); font-size: 12.5px; margin-left: auto; }
.answer { background: var(--bg); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.answer .date { font: 600 30px/1 var(--display); letter-spacing: -.03em; }
.toast { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: 14px; max-width: calc(100vw - 32px); }

/* Узкий десктоп: панель шкалы — шторкой */
.bottom { display: none; }
@media (max-width: 1199px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 35; top: auto; bottom: 0; left: 0; right: 0; max-height: 82vh; border-radius: 22px 22px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .side.idle { display: none; }
  .side .close { display: inline-flex; align-self: flex-end; }
}
/* Телефон */
@media (max-width: 899px) {
  h1 { font-size: 27px; }
  .top { grid-template-columns: 1fr auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .top .tabs, .top .date { display: none; }
  .main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  .inbox, .two { grid-template-columns: minmax(0, 1fr); }
  .inbox .list { display: none; }
  .inbox.show-list .list { display: flex; }
  .inbox.show-list .decision { display: none; }
  .decision { padding: 20px; touch-action: pan-y; }
  .decision h2 { font-size: 21px; }
  .tl, .board .legend { display: none; }
  .agenda { display: flex; flex-direction: column; gap: 18px; }
  .strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
  .strip a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; font: 500 10.5px var(--mono); color: var(--muted); }
  .strip a i { height: 8px; border-radius: 4px; background: var(--line); display: block; }
  .strip a i.risk { background: var(--risk); } .strip a i.warn { background: var(--warn); }
  .wk { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 70px; }
  .wk-h { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
  .wk-h b { font: 600 13px var(--mono); }
  .ev { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
  .ev .evk { width: 74px; flex: none; color: var(--faint); font: 500 11px var(--mono); padding-top: 3px; text-transform: uppercase; }
  .r { grid-template-columns: minmax(0, 1fr); }
  .pilot { display: none; }
  .bottom { display: grid; grid-template-columns: 1fr 1fr 72px 1fr; align-items: center; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
    height: calc(68px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bottom.three { grid-template-columns: repeat(3, 1fr); }
  .bottom.four { grid-template-columns: repeat(4, 1fr); }
  .bottom a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--faint); text-decoration: none; position: relative; }
  .bottom a svg { width: 22px; height: 22px; }
  .bottom a[aria-current="page"] { color: var(--ink); }
  .bottom a .n { position: absolute; top: -4px; left: calc(50% + 6px); }
  .bottom .spark { width: 54px; height: 54px; justify-self: center; border: 0; cursor: pointer; box-shadow: var(--shadow); }
  .bottom .spark svg { width: 24px; height: 24px; }
  .cmd { top: auto; bottom: 0; left: 0; transform: none; width: 100%; border-radius: 22px 22px 0 0; max-height: 88vh; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .desktop-only { display: none !important; }
}
@media (min-width: 900px) { .phone-only { display: none !important; } }

/* Варианты ссылками: выбор работает и без JS. */
a.opt { text-decoration: none; color: inherit; }
a.line { text-decoration: none; color: inherit; }
.row-actions form { display: contents; }
