[hidden] { display: none !important; } /* атрибут hidden сильнее display у классов: фильтр запросов, служебные контейнеры SSE */
:root {
  --bg: #FFFFFF;         /* основная область */
  --panel: #F4F4F2;      /* сайдбар */
  --tile: #FAFAF9;       /* плитки сводки */
  --line: #E6E6E3;       /* границы */
  --line-soft: #EFEFED;  /* разделители строк */
  --selected: #E8E8E5;   /* выбранная запись в сайдбаре, переключатель */
  --chip: #F0F0EE;       /* пузырь пользователя, пилюли, фон сегментов */
  --ink: #1C1C1A;        /* основной текст */
  --ink-2: #5C5C58;      /* вторичный текст, иконки */
  --muted: #6E6E69;      /* подписи, заголовки разделов */
  --placeholder: #8F8F8A;
  --accent: #2F6FD6;     /* ссылки, выбранный чип, точка статуса */
  --accent-hover: #2457B0;
  --accent-soft: #E8F0FC;
  --up: #B4432F;         /* рост цены */
  --down: #2E7D4F;       /* снижение цены, «поиск завершён» */
  --radius-xs: 6px; --radius-s: 8px; --radius-m: 10px; --radius-l: 12px;
  --font-sans: 'Golos Text', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --surface: #FFFFFF;    /* поля, чипы, активный сегмент */
  --input-line: #DCDCD8; /* рамка поля ввода */
  --input-focus: #BDBDB8;
  --chip-hover-line: #CFCFCA;
  --avatar: #D4D4D0;
  --disabled: #B5B5B0;   /* неактивная стрелка «вперёд» */
  --btn-bg: #1C1C1A;     /* основная кнопка */
  --btn-ink: #FFFFFF;
  --btn-hover: #33332F;
  --bar: #C9C9C4;        /* полоски динамики, прошлые годы */
  --scrim: rgba(28,28,26,.24);
  color-scheme: light;
}

/* Тёмная тема: те же переменные (PROMPT.md, раздел 12). По умолчанию следует системе,
   переключатель в сайдбаре ставит data-theme на <html>. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1F1F1E;
    --panel: #262624;
    --tile: #2A2A28;
    --line: #3A3A37;
    --line-soft: #32322F;
    --selected: #363633;
    --chip: #30302D;
    --ink: #ECECE8;
    --ink-2: #B5B5AE;
    --muted: #9A9A93;
    --placeholder: #7E7E78;
    --accent: #5B93E8;
    --accent-hover: #7FAAF0;
    --accent-soft: #233149;
    --up: #E07A63;
    --down: #5CB880;
    --surface: #2A2A28;
    --input-line: #45453F;
    --input-focus: #5E5E57;
    --chip-hover-line: #4E4E48;
    --avatar: #45453F;
    --disabled: #55554F;
    --btn-bg: #ECECE8;
    --btn-ink: #1F1F1E;
    --btn-hover: #FFFFFF;
    --bar: #4A4A44;
    --scrim: rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1F1F1E;
  --panel: #262624;
  --tile: #2A2A28;
  --line: #3A3A37;
  --line-soft: #32322F;
  --selected: #363633;
  --chip: #30302D;
  --ink: #ECECE8;
  --ink-2: #B5B5AE;
  --muted: #9A9A93;
  --placeholder: #7E7E78;
  --accent: #5B93E8;
  --accent-hover: #7FAAF0;
  --accent-soft: #233149;
  --up: #E07A63;
  --down: #5CB880;
  --surface: #2A2A28;
  --input-line: #45453F;
  --input-focus: #5E5E57;
  --chip-hover-line: #4E4E48;
  --avatar: #45453F;
  --disabled: #55554F;
  --btn-bg: #ECECE8;
  --btn-ink: #1F1F1E;
  --btn-hover: #FFFFFF;
  --bar: #4A4A44;
  --scrim: rgba(0,0,0,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
::placeholder { color: var(--placeholder); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; font-size: .94em; }
.mob { display: none !important; }

/* Кнопки-иконки 36 px */
.ib { width: 36px; height: 36px; border: 0; border-radius: var(--radius-s); background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; }
.ib:hover { background: var(--chip); color: var(--ink); }
.ib.sm { width: 28px; height: 28px; border-radius: var(--radius-xs); color: var(--muted); }
.ib.xs { width: 24px; height: 24px; color: var(--placeholder); }
.ib.xs:hover { background: transparent; color: var(--ink-2); }
.fwd { color: var(--disabled); }

/* Каркас */
.app { height: 100dvh; display: flex; flex-direction: column; }
.topbar { height: 44px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.seg { display: flex; gap: 2px; margin-left: 6px; padding: 2px; background: var(--chip); border-radius: var(--radius-s); }
.seg button { width: 34px; height: 30px; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.tb-title { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; }
.tb-icon { display: flex; color: var(--ink-2); }
.tb-title .name { display: flex; align-items: center; height: 32px; padding: 0 6px; font-size: 14px; font-weight: 500; min-width: 0; }
.tb-title .name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title .name.muted { color: var(--ink-2); }
.pill { height: 24px; padding: 0 10px; border-radius: var(--radius-xs); background: var(--chip); color: var(--ink-2); font-size: 12px; display: flex; align-items: center; flex: none; }
.frame { flex: 1; min-height: 0; display: flex; }

/* Сайдбар 280 px */
.sidebar { width: 280px; flex: none; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; padding: 12px 10px; overflow-y: auto; }
#nav:checked ~ .app .sidebar { display: none; }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--placeholder); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px; border-radius: var(--radius-xs); color: var(--ink); font-size: 14px; }
.nav a.cur { background: var(--selected); font-weight: 500; }
.nav a.more { color: var(--ink-2); }
.nav a:hover, .list a:hover { background: var(--selected); color: var(--ink); }
.nav a[aria-disabled="true"] { cursor: default; }
.group { display: flex; flex-direction: column; gap: 2px; }
.group-h { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 8px; color: var(--muted); font-size: 13px; }
.group-actions { display: flex; gap: 2px; }
.list { display: flex; flex-direction: column; gap: 2px; }
.list a { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: var(--radius-xs); color: var(--ink); font-size: 14px; white-space: nowrap; overflow: hidden; }
.list a.cur { background: var(--selected); }
.list a span:last-child { overflow: hidden; text-overflow: ellipsis; }
.ring { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--placeholder); flex: none; }
.empty-list { padding: 4px 8px; color: var(--placeholder); font-size: 13px; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px 6px 2px; }
.me form { display: flex; margin: 0; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--avatar); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; }
.who { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scrim { display: none; }

/* Курсы на сегодня: над пользователем внизу сайдбара */
.rates { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.rates + .me { margin-top: 0; }
.rates dl { margin: 0; padding: 0 8px; display: flex; flex-direction: column; }
.rates dl div { display: flex; justify-content: space-between; align-items: baseline; height: 24px; font-size: 13px; }
.rates dt { color: var(--ink-2); }
.rates dd { margin: 0; color: var(--ink); }
.rates-src { padding: 2px 8px 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.rates-src a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.rates-src a:hover { color: var(--ink-2); }

/* Основная область: колонка 640 px */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 28px 24px 8px; }
.col { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 22px; }

/* Сообщения */
.u { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bubble { max-width: 80%; background: var(--chip); border-radius: var(--radius-l); padding: 10px 14px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--placeholder); }
.a { display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.6; }
.a p { margin: 0; }
.why { font-size: 13px; color: var(--muted); line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chips.center { justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.chip:hover { border-color: var(--chip-hover-line); }
.chip.sel { background: var(--accent-soft); border-color: var(--accent); font-weight: 500; }
.chip .check { display: none; color: var(--accent); }
.chip.sel .check { display: flex; }
.chips.answered .chip { pointer-events: none; }
.chips.answered .chip:not(.sel) { opacity: .55; }
.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.dot.ok { background: var(--down); }
.dot.err { background: var(--up); }
.err-text { color: var(--ink-2); }

/* Ответ */
.answer { display: flex; flex-direction: column; gap: 12px; }
.answer p { margin: 0; }
.answer ol, .answer ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.answer strong { font-weight: 600; }
.answer-stream:empty { display: none; }

/* Пустой чат */
.hero { flex: 1 0 auto; width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 48px 0 24px; text-align: center; }
.hero-in { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero-logo { font-size: 30px; margin-bottom: 6px; }
.h { margin: 0; font-size: 34px; font-weight: 600; line-height: 1.1; letter-spacing: -.03em; }
.sub { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }

/* Поле ввода */
.composer { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; padding: 4px 24px 14px; }
.composer-in { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 6px; }
.box { display: flex; align-items: flex-end; gap: 8px; margin: 0; border: 1px solid var(--input-line); border-radius: var(--radius-l); background: var(--surface); padding: 6px 6px 6px 14px; }
.box:focus-within { border-color: var(--input-focus); }
.box textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: transparent; font-size: 15px; line-height: 1.5; padding: 8px 0; max-height: 220px; }
.send { width: 36px; height: 36px; flex: none; border: 0; border-radius: var(--radius-s); background: transparent; color: var(--placeholder); display: flex; align-items: center; justify-content: center; padding: 0; }
.box:has(textarea:not(:placeholder-shown)) .send { color: var(--ink); }
.app:has(.pending) .send { pointer-events: none; opacity: .4; }
.under { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 0 4px; font-size: 13px; color: var(--ink-2); }
.under-l { display: flex; align-items: center; gap: 2px; }
.under-r { display: flex; align-items: center; gap: 12px; }
.under .status { color: var(--ink-2); gap: 6px; }
.region { height: 32px; padding: 0 8px; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--ink-2); font-size: 13px; display: flex; align-items: center; gap: 5px; }
.down { position: absolute; top: -40px; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); padding: 0; }
.down[hidden] { display: none; }

/* Вход */
.auth { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; font-size: 15px; }
.auth .in { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 28px; margin-top: auto; }
.auth-head { display: flex; flex-direction: column; gap: 14px; }
.brand { font-size: 23px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field input { height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); font-size: 15px; outline: 0; }
.field input:focus { border-color: var(--accent); }
.form-err { font-size: 14px; color: var(--up); }
.btn { height: 44px; margin-top: 4px; border: 0; border-radius: var(--radius-m); background: var(--btn-bg); color: var(--btn-ink); font-size: 15px; font-weight: 500; }
.btn:hover { background: var(--btn-hover); }
.auth-switch { font-size: 14px; color: var(--ink-2); }
.auth-switch a { font-weight: 500; }
.auth-hint { margin: 0; font-size: 13px; color: var(--muted); }
.foot { margin-top: auto; padding-top: 48px; font-size: 12px; color: var(--muted); text-align: center; }

/* Логотип PriceTap: знак-столбики и слово. Появляется один раз при открытии страницы. */
.logo { display: inline-flex; align-items: center; gap: .45em; line-height: 1; }
.mk { display: block; flex: none; overflow: visible; }
.mk-tile { fill: var(--accent); }
.mk-bar { fill: #FFFFFF; transform-box: fill-box; transform-origin: bottom; }
.mk-intro .mk-tile { transform-box: fill-box; transform-origin: center; animation: mk-pop .45s cubic-bezier(.3,1.4,.5,1) both; }
.mk-intro .mk-bar { animation: mk-grow .5s cubic-bezier(.2,.9,.3,1.15) both; }
.mk-intro .b1 { animation-delay: .25s; } .mk-intro .b2 { animation-delay: .37s; } .mk-intro .b3 { animation-delay: .49s; }
.mk-think .mk-bar { animation: mk-think 1.4s ease-in-out infinite; }
.mk-think .b2 { animation-delay: .18s; } .mk-think .b3 { animation-delay: .36s; }
.status-mk { display: flex; flex: none; }
.wm { font-weight: 700; letter-spacing: -.035em; white-space: nowrap; }
.wm .tap { color: var(--accent); }
.wm .ch { display: inline-block; animation: mk-rise .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes mk-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes mk-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes mk-think { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes mk-rise { from { opacity: 0; transform: translateY(.45em); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mk-tile, .mk-bar, .wm .ch { animation: none !important; } }

/* Ссылки в ответе: подчёркивание выезжает слева при наведении */
.answer a { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0% 1.5px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .3s ease; padding-bottom: 1px; }
.answer a:hover, .answer a:focus-visible { background-size: 100% 1.5px; }
@media (prefers-reduced-motion: reduce) { .answer a { transition: none; } }

/* Калькулятор: кнопки как у iPhone, заголовок как у окна macOS. Цвета одинаковы в обеих темах. */
.calc { position: fixed; right: 24px; bottom: 96px; z-index: 30; width: 312px; border-radius: 12px; overflow: hidden; background: #000; color: #FFFFFF; font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; box-shadow: 0 16px 48px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.1); user-select: none; -webkit-user-select: none; }
.calc[hidden] { display: none; }
.calc:focus { outline: none; }
.calc-bar { position: relative; height: 32px; display: flex; align-items: center; padding: 0 12px; background: #2B2B2B; cursor: grab; touch-action: none; }
.calc.dragging .calc-bar { cursor: grabbing; }
.lights { position: relative; z-index: 1; display: flex; gap: 8px; }
.light { width: 12px; height: 12px; padding: 0; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: transparent; cursor: default; }
.light svg { width: 8px; height: 8px; }
.light.close { background: #FF5F57; box-shadow: inset 0 0 0 .5px #E0443E; }
.light.min { background: #FEBC2E; box-shadow: inset 0 0 0 .5px #DEA123; }
.lights:hover .light, .light:focus-visible { color: rgba(0,0,0,.6); }
.calc-title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #B5B5B5; pointer-events: none; }
.calc.min .calc-body { display: none; }
.calc-body { padding: 4px 14px 16px; }
.calc-display { display: block; height: 88px; overflow: hidden; text-align: right; white-space: nowrap; font-size: 64px; font-weight: 300; line-height: 96px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 62px); grid-auto-rows: 62px; gap: 12px; justify-content: space-between; }
.calc-keys button { border: 0; border-radius: 999px; background: #333333; color: #FFFFFF; font-family: inherit; font-size: 28px; font-weight: 400; transition: filter .1s; }
.calc-keys button:active { filter: brightness(1.4); }
.calc-keys .fn { background: #A5A5A5; color: #000; font-size: 24px; font-weight: 500; }
.calc-keys .op { background: #FF9F0A; font-size: 32px; }
.calc-keys .op.on { background: #FFFFFF; color: #FF9F0A; }
.calc-keys .zero { grid-column: span 2; text-align: left; padding-left: 24px; }

/* Телефон 390 px по design/Mobile.dc.html */
@media (max-width: 760px) {
  .desk { display: none !important; }
  .mob { display: flex !important; }
  .topbar { height: 60px; padding: 8px 8px 8px 4px; gap: 8px; }
  .topbar .ib { width: 44px; height: 44px; color: var(--ink); }
  .mtitle { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block !important; }
  .sidebar { display: flex; position: fixed; inset: 0 auto 0 0; z-index: 20; transform: translateX(-100%); transition: transform .2s ease; }
  #nav:checked ~ .app .sidebar { display: flex; transform: none; }
  #nav:checked ~ .app .scrim { display: block; position: fixed; inset: 0; z-index: 10; background: var(--scrim); }
  .nav a, .list a { height: 44px; }
  .ib.sm, .ib.xs { width: 44px; height: 44px; }
  .search { height: 44px; }
  .search input { font-size: 16px; }
  .scroll { padding: 16px 16px 12px; }
  .col { gap: 20px; }
  .bubble { max-width: 85%; border-radius: 18px 18px 4px 18px; line-height: 1.45; }
  .chips { gap: 8px; }
  .chip { height: auto; min-height: 44px; padding: 0 14px; border-radius: 999px; font-size: 14px; }
  .composer { padding: 8px 12px 16px; border-top: 1px solid var(--line); }
  .box { border-color: var(--line); border-radius: 16px; }
  .box textarea { font-size: 16px; padding: 10px 0; }
  .send { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #FFFFFF; }
  .box:has(textarea:not(:placeholder-shown)) .send { color: #FFFFFF; }
  .under { display: none; }
  .down { top: -52px; width: 44px; height: 44px; }
  .h { font-size: 28px; }
  .calc { left: 16px; right: 16px; width: auto; bottom: 96px; }
  .calc-keys { grid-template-columns: repeat(4, 1fr); grid-auto-rows: auto; }
  .calc-keys button { aspect-ratio: 1; min-height: 44px; }
  .calc-keys .zero { aspect-ratio: auto; }
}

/* Фича 010: рабочий интерфейс — переключатель «Чат | Таблица», меню «Ещё», окно «Поделиться», страницы. */
.seg a { width: 34px; height: 30px; border-radius: var(--radius-xs); color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.seg button:disabled { color: var(--disabled); cursor: default; }
.menu { position: relative; flex: none; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: 40px; z-index: 30; min-width: 220px; padding: 6px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.menu-list a, .menu-list button { display: flex; align-items: center; height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--chip); color: var(--ink); }
.menu-list hr { border: 0; border-top: 1px solid var(--line-soft); margin: 4px 0; }
.danger { color: var(--up) !important; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; align-self: flex-start; }
.dlg { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 0; width: min(480px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 16px 48px rgba(0,0,0,.18); }
.dlg::backdrop { background: var(--scrim); }
.dlg-in { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }
.dlg-h { display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); color: var(--ink); font-size: 13px; }
.btn.sm { height: 36px; margin: 0; padding: 0 14px; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--btn-ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--chip); }
.col.wide { max-width: 1040px; }
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-h h1 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.3; }
.sec { margin: 0; font-size: 15px; font-weight: 600; }
.card { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-l); }
.card h2 { margin: 0; font-size: 15px; font-weight: 600; }
.card p { margin: 0; }
.notice { font-size: 14px; color: var(--down); }
.shares { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.shares li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.shares form { margin-left: auto; }
.find { display: flex; gap: 8px; }
.find input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--input-line); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); font-size: 15px; outline: 0; }
.find input:focus { border-color: var(--input-focus); }
.find .btn.sm { height: 40px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.4; }
.tbl th, .tbl td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font-weight: 500; color: var(--muted); background: var(--tile); white-space: nowrap; }
.tbl th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.tbl th[aria-sort] button::after { content: " ↑"; }
.tbl th[aria-sort="descending"] button::after { content: " ↓"; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .sub { color: var(--muted); font-size: 12px; }
.tbl .nowrap { white-space: nowrap; }
.shared { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.shared .topbar { justify-content: space-between; padding: 0 16px; }
.shared-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
span.region { cursor: default; }
@media (max-width: 640px) {
  .page-h { flex-wrap: wrap; }
  .find { flex-direction: column; }
}

/* Фича 011: прикреплённый файл и позиции из него. */
.attach { display: flex; align-items: center; gap: 6px; margin: 0; }
.attach label { cursor: pointer; }
.attach-busy { display: none; font-size: 13px; color: var(--muted); }
.attach.busy .attach-busy { display: inline; }
.attach.busy label { opacity: .5; pointer-events: none; }
.positions { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.positions form { margin: 0; }
.pos { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); font: inherit; text-align: left; }
button.pos { cursor: pointer; }
button.pos:hover { border-color: var(--chip-hover-line); background: var(--tile); }
.pos-name { font-weight: 500; font-size: 14px; }
.pos-qty { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pos-spec { font-size: 13px; color: var(--muted); line-height: 1.45; }

/* Фича 014: оценка ответа. Кнопки — в строке под ответом, форма «что не так» — на всю ширину под ней. */
.meta { flex-wrap: wrap; }
.fb { display: contents; }
.ib.xs.on { color: var(--accent); }
.fb-thanks { color: var(--muted); }
.fb-why { flex-basis: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); font-size: 14px; color: var(--ink); }
.fb-q { margin: 0; font-weight: 500; }
.fb-why .chip { cursor: pointer; }
.fb-why .chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); font-weight: 500; }
.fb-why .chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.fb-why textarea { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); font-size: 14px; line-height: 1.45; resize: vertical; outline: 0; }
.fb-why textarea:focus { border-color: var(--accent); }
.fb-act { display: flex; justify-content: flex-end; }
@media (max-width: 760px) { .fb-why textarea { font-size: 16px; } }
