/* Хаб поддержки v2 — система «Лаборатория» (slova.erosheve.ru): бумага, чернила, рамки вместо теней, один красный акцент. */

@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexSans-Regular.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexSans-Medium.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexSans-SemiBold.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexSans-Bold.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexMono-Regular.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/IBMPlexMono-Medium.woff2) format('woff2'); }

/* ---------- токены: «Лаборатория» дословно из slova/app/html/index.html ---------- */
:root {
  --paper: #f7f6f2; --ink: #14181f; --card: #ffffff; --line: #d9d6cc; --line2: #ece9e0;
  --muted: #6b7280; --muted2: #9ca3af; --text2: #3f4650;
  --red: #DC3049; --red-h: #b3213a; --green: #1f7a4d;
  --dark: #14181f; --dark-ink: #ffffff; --dark-muted: #c7cbd1; --dark-muted2: #9ca3af;
  --der: #4a80c9; --die: #c23832; --das: #daa520;
  --sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', Menlo, monospace;
  --r: 6px; --r8: 8px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);

  /* поверх системы — только для текста и состояний хаба (проверено на AA 4.5:1 к paper/card) */
  --fg-muted: #5d6470;          /* вторичный текст: --muted на бумаге даёт 4.47, чуть ниже AA */
  --red-t: #c0233c; --green-t: #1f7a4d; --amber-t: #8a6508; --blue-t: #3d6eb0;
  --hl-sum: rgba(218,165,32,.22); --hl-sum-u: #b48612;
  --hl-date: rgba(74,128,201,.16); --hl-date-u: #3d6eb0;
  --hl-prom: rgba(220,48,73,.11); --hl-prom-u: #DC3049;
  --hl-link-u: #1f7a4d;
  --hl-ph: rgba(220,48,73,.16);
  --sel: rgba(220,48,73,.18);
  --shade: rgba(20,24,31,.32);
  --pop-shadow: 0 10px 30px -8px rgba(20,24,31,.22), 0 2px 6px -2px rgba(20,24,31,.10);
  --top: 56px;
  --ease: cubic-bezier(.2,.8,.2,1);
}
html[data-theme="dark"] {
  --paper: #14181f; --ink: #e5e7eb; --card: #1b2029; --line: #2a303a; --line2: #232830;
  --muted: #9ca3af; --muted2: #6b7280; --text2: #c7cbd1;
  --dark: #0b0e13; --dark-ink: #f3f4f6; --dark-muted: #c7cbd1; --dark-muted2: #9ca3af;
  --green: #4fb383;
  --fg-muted: #9ca3af;
  --red-t: #f06a7e; --green-t: #4fb383; --amber-t: #e0b647; --blue-t: #7fa7dd;
  --hl-sum: rgba(218,165,32,.20); --hl-sum-u: #e0b647;
  --hl-date: rgba(74,128,201,.24); --hl-date-u: #7fa7dd;
  --hl-prom: rgba(220,48,73,.20); --hl-prom-u: #f06a7e;
  --hl-link-u: #4fb383;
  --hl-ph: rgba(240,106,126,.24);
  --sel: rgba(220,48,73,.35);
  --shade: rgba(0,0,0,.55);
  --pop-shadow: 0 12px 32px -8px rgba(0,0,0,.6), 0 2px 6px -2px rgba(0,0,0,.4);
  color-scheme: dark;
}
html[data-theme="light"] { color-scheme: light; }

/* ---------- основа ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; min-height: 100vh; font-feature-settings: 'kern'; }
body.booting { visibility: hidden; }
::selection { background: var(--sel); }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 3px solid var(--paper); }
a { color: var(--red-t); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--red-h); }
html[data-theme="dark"] a:hover { color: #ff8a9b; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; }
input, textarea, select { font: inherit; color: var(--ink); caret-color: var(--red); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r); }
.skip:focus { top: 10px; color: var(--paper); }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
svg.i.i20 { width: 20px; height: 20px; }
svg.i.i14 { width: 14px; height: 14px; }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.meta { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); letter-spacing: .02em; }
.up { text-transform: uppercase; }
kbd { font-family: var(--mono); font-size: 10px; font-weight: 400; color: inherit; opacity: .7; border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; line-height: 15px; display: inline-block; }
.spacer { flex: 1 1 auto; }
.only-phone { display: none !important; }
.t-phone { display: none; }

/* ---------- кнопки, поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r); font-size: 14px; font-weight: 600;
  white-space: nowrap; border: 1.5px solid transparent; transition: background .15s, color .15s, border-color .15s, opacity .15s; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #2a303a; }
html[data-theme="dark"] .btn.primary { background: #e5e7eb; color: #14181f; }
html[data-theme="dark"] .btn.primary:hover { background: #fff; }
.btn.primary:disabled, html[data-theme="dark"] .btn.primary:disabled { background: var(--line); color: var(--fg-muted); }
.btn.armed, html[data-theme="dark"] .btn.armed { background: var(--red); color: #fff; }
.btn.armed:hover, html[data-theme="dark"] .btn.armed:hover { background: var(--red-h); }
.btn.outline { border-color: var(--line); color: var(--ink); font-weight: 500; background: var(--card); }
.btn.outline:hover { border-color: var(--ink); }
.btn.ghost { color: var(--fg-muted); font-weight: 500; padding: 0 10px; }
.btn.ghost:hover { color: var(--ink); background: var(--line2); }
.btn.danger { color: var(--red-t); border-color: color-mix(in srgb, var(--red) 45%, var(--line)); background: var(--card); font-weight: 500; }
.btn.danger:hover { border-color: var(--red); }
.btn.xs { height: 30px; font-size: 13px; padding: 0 10px; gap: 6px; }
.btn.sm { height: 34px; font-size: 13px; padding: 0 12px; }
.btn.big { height: 48px; font-size: 15px; padding: 0 22px; }
.btn kbd { margin-left: 2px; }
.btn:disabled { opacity: .5; }
.btn.busy { pointer-events: none; opacity: .7; }
.iconbtn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: var(--r); color: var(--fg-muted); flex: none; }
.iconbtn:hover { background: var(--line2); color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--text2); }
.input, .textarea, select.input { width: 100%; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--card); padding: 0 12px; height: 40px; font-size: 14px; transition: border-color .15s; }
.textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; min-height: 72px; }
.input:focus, .textarea:focus { border-color: var(--ink); }
.input::placeholder, .textarea::placeholder { color: var(--fg-muted); opacity: .85; }
.hint { font-size: 13px; color: var(--fg-muted); line-height: 1.5; }
.err { font-size: 13px; color: var(--red-t); line-height: 1.45; }
.ok-t { color: var(--green-t); }
.bad-t { color: var(--red-t); }
.amber-t { color: var(--amber-t); }

.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--text2); border: 1px solid var(--line);
  border-radius: 4px; padding: 2px 8px; white-space: nowrap; background: var(--card); line-height: 16px; }
.chip svg.i { width: 13px; height: 13px; }
.chip.plain { background: transparent; border-color: transparent; padding-left: 0; padding-right: 0; color: var(--fg-muted); }
.chip.risk { color: var(--red-t); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); background: transparent; }
.chip.ok { color: var(--green-t); border-color: color-mix(in srgb, var(--green) 40%, var(--line)); background: transparent; }
.chip.warn { color: var(--amber-t); border-color: color-mix(in srgb, var(--das) 50%, var(--line)); background: transparent; }
button.chip:hover { border-color: var(--ink); color: var(--ink); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); display: inline-block; flex: none; }
.ava { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--ink); color: var(--paper); flex: none; line-height: 1; }
.ava.soft { background: var(--line2); color: var(--ink); border: 1px solid var(--line); }
.ava.xs { width: 18px; height: 18px; font-size: 10px; }
.ava.sm { width: 24px; height: 24px; font-size: 11px; }
.ava.lg { width: 40px; height: 40px; font-size: 14px; }

.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; flex: none; background: var(--card); }
.seg > * { height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500; color: var(--fg-muted); border-right: 1.5px solid var(--line); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.seg > *:last-child { border-right: 0; }
.seg > *:hover { color: var(--ink); }
.seg .n { font-family: var(--mono); font-size: 11px; opacity: .8; }
.seg > .on, .seg > [aria-selected="true"], .seg > [aria-checked="true"] { background: var(--ink); color: var(--paper); }

/* ---------- шапка ---------- */
.app { min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px; padding: 0 20px; height: var(--top); padding-top: var(--sat); }
.logo { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo i { color: var(--red); font-style: normal; }
.nav { display: flex; gap: 2px; }
.nav a { height: 34px; padding: 0 11px; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; color: var(--fg-muted); border-radius: var(--r); white-space: nowrap; }
.nav a svg { color: var(--muted2); }
.nav a:hover { color: var(--ink); background: var(--line2); }
.nav a.on { color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.nav a.on svg { color: var(--ink); }
.nav .n { font-family: var(--mono); font-size: 11px; color: var(--paper); background: var(--red); border-radius: 9px; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; }
.nav .n:empty { display: none; }
.search { position: relative; width: 230px; flex: 0 1 230px; }
.search input { width: 100%; height: 34px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--card); padding: 0 34px 0 32px; font-family: var(--mono); font-size: 12px; transition: border-color .15s; }
.search input:focus { border-color: var(--ink); }
.search input::placeholder { color: var(--fg-muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search svg { position: absolute; left: 10px; top: 9px; color: var(--muted2); pointer-events: none; }
.search kbd { position: absolute; right: 8px; top: 8px; color: var(--fg-muted); border-color: var(--line); opacity: 1; }
.mode { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--amber-t); border: 1px dashed color-mix(in srgb, var(--das) 60%, var(--line)); border-radius: 4px; padding: 3px 8px; white-space: nowrap; }
.mode.live { color: var(--green-t); border-style: solid; border-color: color-mix(in srgb, var(--green) 50%, var(--line)); }
.conn { display: inline-grid; place-items: center; width: 14px; height: 14px; }
.conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent); transition: background .3s, box-shadow .3s; }
.conn.slow i { background: var(--das); box-shadow: 0 0 0 3px color-mix(in srgb, var(--das) 22%, transparent); }
.conn.off i { background: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 22%, transparent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--red) 0%, transparent); } }
.theme { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; flex: none; }
.theme button { width: 32px; height: 30px; display: grid; place-items: center; color: var(--muted2); }
.theme button:hover { color: var(--ink); }
.theme button[aria-checked="true"] { color: var(--ink); background: var(--line2); }
.me-btn { display: flex; align-items: center; gap: 10px; flex: none; text-align: left; padding: 4px 8px 4px 4px; border-radius: var(--r8); }
.me-btn:hover { background: var(--line2); }
.me-btn .txt { display: flex; flex-direction: column; }
.me-nm { font-size: 13px; font-weight: 600; line-height: 1.25; }
.me-rl { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); line-height: 1.3; }
.menu { position: fixed; z-index: 90; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r8); padding: 6px; box-shadow: var(--pop-shadow);
  display: flex; flex-direction: column; animation: pop .16s var(--ease); }
.menu > a, .menu > button { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--r); font-size: 14px; color: var(--ink); text-align: left; width: 100%; }
.menu > a:hover, .menu > button:hover, .menu > a:focus-visible, .menu > button:focus-visible { background: var(--line2); color: var(--ink); outline: none; }
.menu > * svg { color: var(--fg-muted); }
.menu kbd { margin-left: auto; color: var(--fg-muted); }
.menu .sep { height: 1px; background: var(--line2); margin: 6px 4px; }
.menu .mh { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); padding: 6px 10px 4px; }
.menu .on::after { content: ''; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.offline { position: sticky; top: var(--top); z-index: 25; background: var(--red); color: #fff; font-size: 13px; padding: 8px 20px; text-align: center; }

.main { outline: none; }

/* ---------- раскладка «Входящих» ---------- */
.shell { display: grid; grid-template-columns: 320px minmax(0, 1fr) 320px; min-height: calc(100vh - var(--top)); transition: grid-template-columns .28s var(--ease); }
.shell.qclosed { grid-template-columns: 56px minmax(0, 1fr) 320px; }
.shell.noconv { grid-template-columns: 320px minmax(0, 1fr); }
.shell.noconv.qclosed { grid-template-columns: 56px minmax(0, 1fr); }

/* очередь (как вариант A) */
.queue { border-right: 1px solid var(--line); position: sticky; top: var(--top); height: calc(100vh - var(--top)); display: flex; flex-direction: column; min-width: 0; background: var(--paper); z-index: 20; }
.qhead { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 6px 16px; gap: 8px; }
.qhead h2 { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; display: flex; gap: 8px; align-items: baseline; }
.qhead h2 .n { font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--fg-muted); }
.secs { display: flex; flex-direction: column; padding: 2px 8px 8px; gap: 1px; }
.secs a { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: var(--r); font-size: 14px; color: var(--text2); }
.secs a svg { color: var(--muted2); }
.secs a:hover { background: var(--line2); color: var(--ink); }
.secs a.on { background: var(--card); color: var(--ink); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); }
.secs a.on svg { color: var(--ink); }
.secs .n { font-family: var(--mono); font-size: 12px; color: var(--fg-muted); }
.secs a.on .n { color: var(--ink); }
.chfilter { display: flex; gap: 4px; padding: 6px 16px 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line2); }
.chfilter button { height: 28px; min-width: 28px; padding: 0 8px; border-radius: 14px; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 5px; color: var(--fg-muted); font-family: var(--mono); font-size: 11px; background: var(--card); }
.chfilter button:hover { color: var(--ink); border-color: var(--muted2); }
.chfilter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.qlist { list-style: none; margin: 0; padding: 8px 8px 24px; overflow-y: auto; flex: 1 1 auto; overscroll-behavior: contain; }
.qi { display: grid; grid-template-columns: 18px minmax(0,1fr) auto; gap: 3px 10px; padding: 11px 10px; border-radius: var(--r8); border: 1px solid transparent; cursor: pointer; width: 100%; text-align: left; color: var(--ink); position: relative; transition: background .12s; }
.qi:hover { background: var(--line2); color: var(--ink); }
.qi.on { background: var(--card); border-color: var(--line); }
.qi.kb { box-shadow: inset 0 0 0 1.5px var(--ink); }
.qi .ch { grid-row: 1 / 4; color: var(--fg-muted); padding-top: 2px; }
.qi .nm { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; min-width: 0; }
.qi .nm span { overflow: hidden; text-overflow: ellipsis; }
.qi .tm { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); white-space: nowrap; text-align: right; }
.qi .tm.late { color: var(--red-t); }
.qi .tm.warm { color: var(--amber-t); }
.qi .sb { grid-column: 2 / 4; font-size: 13px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi .ft { grid-column: 2 / 4; display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 2px; }
.qi .ft .lb { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi .ft .sp { flex: 1 1 auto; }
.qi .ft .chip { padding: 0 6px; font-size: 10.5px; }
.qi.pending { opacity: .55; }
.qi.pending .sb::before { content: 'выполняется · '; color: var(--fg-muted); font-family: var(--mono); font-size: 11px; }
.qi .as { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); white-space: nowrap; }
.qempty { padding: 28px 18px; text-align: center; color: var(--fg-muted); font-size: 13px; line-height: 1.6; }
.qempty svg { width: 28px; height: 28px; color: var(--muted2); display: block; margin: 0 auto 10px; stroke-width: 1.3; }
.qfoot { border-top: 1px solid var(--line2); padding: 10px 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.qfoot .r { font-size: 13px; color: var(--fg-muted); display: flex; justify-content: space-between; }
.qfoot .r .mono { font-size: 12px; color: var(--text2); }
.qrail { display: none; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0 16px; overflow-y: auto; }
.qrail button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r); color: var(--fg-muted); position: relative; flex: none; }
.qrail button:hover { background: var(--line2); color: var(--ink); }
.qrail button.on { color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.qrail button .dot { position: absolute; top: 6px; right: 6px; width: 5px; height: 5px; }
.qrail .sep { width: 20px; height: 1px; background: var(--line); margin: 6px 0; flex: none; }
.shell.qclosed .queue .qhead h2, .shell.qclosed .queue .secs, .shell.qclosed .queue .chfilter, .shell.qclosed .queue .qlist, .shell.qclosed .queue .qfoot { display: none; }
.shell.qclosed .queue .qhead { padding: 12px 8px; justify-content: center; }
.shell.qclosed .queue .qrail { display: flex; }

/* центр: экран ответа (как вариант B) */
.focus { min-width: 0; padding: 26px 40px 0; }
.col { max-width: 720px; margin: 0 auto; }
.progress { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.ticks { display: flex; gap: 4px; flex: 1 1 auto; min-width: 0; }
.ticks i { height: 3px; flex: 1 1 0; background: var(--line); border-radius: 2px; transition: background .25s; }
.ticks i.d { background: var(--muted2); }
.ticks i.c { background: var(--ink); }
.ticks.bar { height: 3px; background: var(--line); border-radius: 2px; position: relative; }
.ticks.bar b { position: absolute; top: 0; bottom: 0; background: var(--ink); border-radius: 2px; }
.progress .pg { font-family: var(--mono); font-size: 12px; color: var(--fg-muted); white-space: nowrap; }
.progress .pg b { color: var(--ink); font-weight: 500; }
.stepper { display: inline-flex; gap: 4px; }
.stepper button { height: 30px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: var(--r); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); background: var(--card); }
.stepper button:hover { border-color: var(--ink); }
.stepper button:disabled { opacity: .4; border-color: var(--line); }
.stepper kbd { opacity: .6; border: 0; padding: 0; font-size: 11px; }

.rhead { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.rline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rhead h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.14; text-wrap: balance; }
.rhead .from { font-size: 14px; color: var(--fg-muted); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.rhead .from b { color: var(--ink); font-weight: 600; }
.rhead .from .mono { font-size: 12px; }
.assign { position: relative; }
.assign .chip { cursor: pointer; }
.assign .chip .ava { margin: -1px 0 -1px -4px; }

.thread { display: flex; flex-direction: column; margin-bottom: 28px; }
.earlier { border-top: 1px solid var(--line2); }
.earlier > summary { list-style: none; cursor: pointer; padding: 12px 0; font-size: 13px; color: var(--fg-muted); display: flex; align-items: center; gap: 8px; border-radius: var(--r); }
.earlier > summary::-webkit-details-marker { display: none; }
.earlier > summary:hover { color: var(--ink); }
.earlier > summary svg { transition: transform .2s var(--ease); }
.earlier[open] > summary svg { transform: rotate(90deg); }
.old { padding: 12px 0 16px; border-top: 1px dashed var(--line2); display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.old .hd { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.old .hd b { font-size: 13px; font-weight: 600; }
.old .tx p { margin: 0 0 .6em; } .old .tx p:last-child { margin: 0; }
.old .tx { margin: 0; font-size: 14px; color: var(--text2); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.old.out .ava { background: var(--ink); color: var(--paper); }
.latest { border-top: 1px solid var(--line2); padding-top: 20px; }
.latest + .latest { margin-top: 18px; }
.latest .hd { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; align-items: baseline; }
.latest .tx { font-size: 18px; line-height: 1.6; color: var(--ink); max-width: 64ch; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.latest .tx p { margin: 0 0 .7em; } .latest .tx p:last-child { margin: 0; }
.latest.out .tx { font-size: 15px; color: var(--text2); }
.more { font-size: 13px; margin-top: 8px; display: inline-flex; gap: 6px; align-items: center; }
.attach { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.attach span { display: inline-flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--text2); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 10px; background: var(--card); }

/* «что поменял / запомнить?» */
.after { border: 1px solid var(--line); border-radius: var(--r8); background: var(--card); margin-bottom: 24px; overflow: hidden; animation: rise .35s var(--ease); }
.after .ah { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line2); font-size: 14px; font-weight: 600; flex-wrap: wrap; }
.after .ah .ok { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green-t); }
.after .ah .meta { font-weight: 400; }
.dif { padding: 16px 20px; font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text2); }
.dif del { color: var(--red-t); background: var(--hl-prom); text-decoration-thickness: 1.5px; border-radius: 2px; }
.dif ins { color: var(--green-t); background: color-mix(in srgb, var(--green) 12%, transparent); text-decoration: none; border-radius: 2px; box-shadow: inset 0 -1.5px var(--green); }
.rule { padding: 16px 20px 18px; border-top: 1px solid var(--line2); display: flex; flex-direction: column; gap: 10px; }
.rule h3 { margin: 0; font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.rule h3 svg { color: var(--red); }
.rule .pair { display: grid; grid-template-columns: 56px 1fr; gap: 8px 12px; align-items: start; }
.rule .pair label { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); padding-top: 11px; text-transform: uppercase; letter-spacing: .02em; }
.rule .pair .textarea { min-height: 44px; font-size: 14px; }
.rule .pair .textarea[readonly] { background: var(--paper); border-color: var(--line2); }
.rule .btns, .btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rule .src { font-size: 12px; }
.thinking { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--fg-muted); }
.thinking .sp3 { display: inline-flex; gap: 3px; }
.thinking .sp3 i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted2); animation: blink 1.2s infinite both; }
.thinking .sp3 i:nth-child(2) { animation-delay: .15s; } .thinking .sp3 i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* черновик */
.draft { background: var(--card); border: 1px solid var(--line); border-radius: var(--r8); transition: border-color .2s; }
.draft:focus-within { border-color: var(--muted2); }
.draft .dh { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.draft .dh .t { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.draft .dh .t svg { color: var(--fg-muted); }
.draft .saved { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); transition: opacity .3s; }
.conf { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); }
.conf .bars { display: inline-flex; gap: 2px; }
.conf .bars i { width: 4px; height: 10px; border-radius: 1px; background: var(--line); }
.conf .bars i.f { background: var(--green); }
.conf b { color: var(--green-t); font-weight: 500; }
.conf.mid .bars i.f { background: var(--das); } .conf.mid b { color: var(--amber-t); }
.conf.lo .bars i.f { background: var(--red); } .conf.lo b { color: var(--red-t); }
.instr { padding: 10px 20px; font-size: 13px; color: var(--fg-muted); border-bottom: 1px solid var(--line2); display: flex; gap: 8px; align-items: baseline; }
.instr b { color: var(--text2); font-weight: 500; }
.editor { position: relative; }
.editor .hl, .editor textarea { font-family: var(--sans); font-size: 16px; line-height: 1.65; padding: 18px 20px 10px; margin: 0; border: 0; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; letter-spacing: normal; tab-size: 4; }
.editor .hl { position: absolute; inset: 0; color: transparent; pointer-events: none; overflow: hidden; }
.editor textarea { position: relative; display: block; width: 100%; min-height: 120px; resize: none; background: transparent; color: var(--ink); overflow: hidden; }
.editor textarea::placeholder { color: var(--fg-muted); }
.editor mark { color: transparent; border-radius: 3px; padding: 1px 0; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.editor mark.m-sum { background: var(--hl-sum); text-decoration-color: var(--hl-sum-u); }
.editor mark.m-date { background: var(--hl-date); text-decoration-color: var(--hl-date-u); }
.editor mark.m-promise { background: var(--hl-prom); text-decoration-color: var(--hl-prom-u); text-decoration-style: dotted; }
.editor mark.m-link { background: transparent; text-decoration-color: var(--hl-link-u); }
.editor mark.m-ph { background: var(--hl-ph); text-decoration: underline wavy var(--red); text-underline-offset: 4px; }
.dfoot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 6px 20px 14px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; }
.legend span { display: inline-flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.signline { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); margin-left: auto; }
.signline b { color: var(--text2); font-weight: 500; }
.check { border-top: 1px solid var(--line2); padding: 14px 20px 16px; }
.check h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.check ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check li label { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 14px; color: var(--text2); cursor: pointer; line-height: 1.45; }
.check input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1.5px solid var(--muted2); border-radius: 4px; margin: 2px 0 0; display: grid; place-items: center; background: var(--card); cursor: pointer; }
.check input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ''; width: 8px; height: 4px; border: 2px solid var(--paper); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.check input:checked + span { color: var(--fg-muted); text-decoration: line-through; text-decoration-color: var(--line); }
.sources { border-top: 1px solid var(--line2); padding: 12px 20px 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sources .lbl { font-size: 12px; color: var(--fg-muted); margin-right: 4px; }
.sources button.chip { cursor: pointer; }
.sources .chip.int { color: var(--blue-t); border-color: color-mix(in srgb, var(--der) 45%, var(--line)); background: transparent; }
.rewrite { border-top: 1px solid var(--line2); padding: 14px 20px 16px; display: flex; gap: 8px; }
.rewrite .input { flex: 1 1 auto; background: var(--paper); }
.dstate { padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.dstate p { margin: 0; color: var(--text2); font-size: 14px; line-height: 1.55; }
.warnbox { margin: 0 0 14px; font-size: 13px; color: var(--text2); display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--red) 35%, var(--line)); border-radius: var(--r8); background: color-mix(in srgb, var(--red) 5%, var(--card)); }
.warnbox svg { color: var(--red); margin-top: 2px; }
.warnbox.soft { border-color: var(--line); background: var(--card); }
.warnbox.soft svg { color: var(--fg-muted); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; position: sticky; bottom: 0; z-index: 5; background: var(--paper); padding: 14px 0 18px; border-top: 1px solid transparent; transition: border-color .2s; }
.actions.stuck { border-top-color: var(--line); }
.actions .btn.outline { padding: 0 12px; font-size: 13px; gap: 7px; height: 40px; }
.actions .btn.ghost { padding: 0 8px; font-size: 13px; gap: 6px; height: 40px; }
.actions .sp { flex: 1 1 auto; }
.actions .why-line { flex: 1 0 100%; order: 9; font-size: 12px; padding-top: 4px; }
.actions .why-line:empty { display: none; }
.nextrow { margin: 26px 0 0; padding: 16px 0 40px; border-top: 1px solid var(--line2); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.nextrow .peek { min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: right; }
.nextrow .peek b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nextrow .nx { display: flex; gap: 14px; align-items: center; min-width: 0; padding: 8px 0; color: var(--ink); }
.nextrow .nx:hover { color: var(--ink); }
.nextrow .nx:hover b { color: var(--red-t); }
.nextrow .nx svg { transition: transform .2s var(--ease); }
.nextrow .nx:hover svg { transform: translateX(3px); }
.nextrow .pv { font-size: 13px; color: var(--fg-muted); display: inline-flex; gap: 6px; align-items: center; }
.nextrow .pv:hover { color: var(--ink); }

/* пустой центр */
.idle { min-height: calc(100vh - var(--top) - 60px); display: grid; place-items: center; padding: 40px; }
.idle .ibox { max-width: 460px; text-align: left; display: flex; flex-direction: column; gap: 18px; }
.idle h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.idle p { margin: 0; color: var(--text2); font-size: 15px; line-height: 1.6; }
.idle .facts { display: flex; gap: 22px; flex-wrap: wrap; }
.idle .facts div { display: flex; flex-direction: column; gap: 2px; }
.idle .facts b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.idle .start { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r8); background: var(--card); color: var(--ink); text-align: left; transition: border-color .15s; }
.idle .start:hover { border-color: var(--ink); color: var(--ink); }
.idle .start .t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.idle .start .t b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idle .keys { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--fg-muted); }
.idle .keys kbd { margin-right: 4px; }
.calm { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--green-t); background: var(--card); }
.calm svg { width: 24px; height: 24px; }

/* карточка клиента справа */
.client { border-left: 1px solid var(--line); padding: 24px 22px 40px; position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; overscroll-behavior: contain; }
.client .id { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.client h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.client .contact { font-family: var(--mono); font-size: 12px; color: var(--fg-muted); line-height: 1.7; overflow-wrap: anywhere; }
.client .who-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.csec { padding: 16px 0; border-top: 1px solid var(--line2); }
.csec:first-of-type { border-top: 0; }
.csec h3 { margin: 0 0 10px; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .03em; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.csec h3 button { text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 12px; color: var(--fg-muted); display: inline-flex; gap: 5px; align-items: center; padding: 2px 6px; border-radius: 4px; }
.csec h3 button:hover { color: var(--ink); background: var(--line2); }
.kv { display: grid; grid-template-columns: 76px 1fr; gap: 8px 12px; font-size: 13px; color: var(--text2); align-items: baseline; }
.kv .k { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); }
.kv .v { overflow-wrap: anywhere; line-height: 1.5; }
.kv .v.none { color: var(--fg-muted); }
.hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hist li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; font-size: 13px; color: var(--text2); }
.hist li svg { color: var(--muted2); margin-top: 2px; width: 14px; height: 14px; }
.hist li .m { display: block; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); margin-top: 1px; }
.hist a { color: var(--ink); }
.hist a:hover { color: var(--red-t); }
.links { display: flex; flex-direction: column; gap: 6px; }
.links a { font-size: 13px; display: inline-flex; gap: 8px; align-items: center; }
.cnote { min-height: 76px; font-size: 13px; }
.notestate { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); margin-top: 6px; min-height: 14px; }
.journal summary { cursor: pointer; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .03em; list-style: none; display: flex; gap: 6px; align-items: center; }
.journal summary::-webkit-details-marker { display: none; }
.journal summary svg { transition: transform .2s; }
.journal[open] summary svg { transform: rotate(90deg); }
.ev { font-size: 12px; color: var(--text2); display: grid; grid-template-columns: 74px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line2); }
.ev .meta { font-size: 10.5px; }
.ev b { font-weight: 500; }
.clientmini { display: none; }

/* ---------- страницы: сводка, отсеянное, база знаний, профиль ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 32px 32px 80px; }
.page.narrow { max-width: 860px; }
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.phead h1 { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.phead p { margin: 6px 0 0; color: var(--fg-muted); font-size: 14px; max-width: 62ch; line-height: 1.55; }
.box { border: 1px solid var(--line); border-radius: var(--r8); background: var(--card); margin-bottom: 18px; }
.box > .hd { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.box > .hd h2 { margin: 0; font-size: 15px; font-weight: 600; }
.box > .hd .meta { font-size: 11px; }
.box .empty { padding: 26px 18px; color: var(--fg-muted); font-size: 14px; line-height: 1.6; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 10px 12px; font-size: 14px; font-weight: 500; color: var(--fg-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: baseline; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .on, .tabs [aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .n { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); }

/* сводка */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { border: 1px solid var(--line); border-radius: var(--r8); background: var(--card); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile .k { font-size: 13px; color: var(--fg-muted); }
.tile .v { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tile .v small { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--text2); }
.tile .v small.bad-t { color: var(--red-t); }
.tile .s { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); line-height: 1.5; }
.tile .who-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.tile .who-row span { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text2); }
.tile .who-row b { font-variant-numeric: tabular-nums; }
.charts { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; margin-bottom: 26px; }
.chart { border: 1px solid var(--line); border-radius: var(--r8); background: var(--card); padding: 16px 18px; min-width: 0; }
.chart h2 { margin: 0 0 4px; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chart .lg { display: inline-flex; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); font-weight: 400; }
.chart .lg i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: -1px; }
.days { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 14px; border-bottom: 1px solid var(--line); position: relative; }
.days .d { flex: 1 1 0; display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; position: relative; cursor: default; }
.days .d i { width: min(12px, 40%); border-radius: 3px 3px 0 0; min-height: 2px; transition: opacity .15s; }
.days .d i.in { background: var(--ink); }
.days .d i.cl { background: var(--muted2); }
.days:hover .d i { opacity: .45; }
.days .d:hover i { opacity: 1; }
.days .d .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 11px; padding: 6px 8px; border-radius: var(--r); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 3; }
.days .d:hover .tip, .days .d:focus-visible .tip { opacity: 1; }
.dlabels { display: flex; gap: 6px; margin-top: 6px; }
.dlabels span { flex: 1 1 0; text-align: center; font-family: var(--mono); font-size: 10px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; }
.hbars { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.hbars .r { display: grid; grid-template-columns: 130px 1fr 28px; gap: 10px; align-items: center; font-size: 13px; color: var(--text2); }
.hbars .r span:first-child { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbars .r svg { color: var(--fg-muted); }
.hbars .track { height: 8px; background: var(--line2); border-radius: 4px; overflow: hidden; }
.hbars .track b { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.hbars .r .n { font-family: var(--mono); font-size: 12px; text-align: right; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters .fchip { height: 32px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--r); font-size: 13px; font-weight: 500; color: var(--text2); display: inline-flex; align-items: center; gap: 7px; background: var(--card); white-space: nowrap; }
.filters .fchip:hover { border-color: var(--muted2); color: var(--ink); }
.filters .fchip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); }
.filters .fchip .n { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); }
.filters select.input { width: auto; height: 32px; font-size: 13px; padding: 0 30px 0 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--fg-muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: lowercase; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.tbl tbody tr { cursor: pointer; transition: background .12s; position: relative; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--line2) 60%, transparent); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .ch { font-family: var(--mono); font-size: 12px; color: var(--text2); white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tbl .ch svg { color: var(--fg-muted); }
.tbl .cl a { color: var(--ink); font-weight: 600; }
.tbl .cl a:hover { color: var(--red-t); }
.tbl .cl a::after { content: ''; position: absolute; inset: 0; }
.tbl .cl .s, .tbl .sm .s { display: block; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); margin-top: 2px; }
.tbl .sm b { font-weight: 500; display: block; }
.tbl .sm .t { color: var(--text2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tbl .wt { font-family: var(--mono); font-size: 12px; white-space: nowrap; text-align: right; }
.tbl td.as { white-space: nowrap; font-size: 13px; color: var(--text2); }
.tbl td.as .ava { margin-right: 6px; vertical-align: -6px; }

/* отсеянное */
.nrow { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line2); font-size: 14px; }
.nrow:last-child { border-bottom: 0; }
.nrow .nwho { display: flex; flex-direction: column; gap: 1px; padding: 0; min-width: 0; }
.nrow .nwho a { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nrow .nwho a:hover { color: var(--red-t); }
.nrow .nwho .mono { font-size: 11px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nrow .sj { color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nrow .why { font-family: var(--mono); font-size: 11px; color: var(--fg-muted); }
.nrow.sample { background: color-mix(in srgb, var(--paper) 50%, var(--card)); }
.groups details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.groups details > summary h2 { margin: 0; font-size: 15px; font-weight: 600; }
.groups details:not([open]) > summary { border-bottom: 0 !important; }
.groups details > summary::-webkit-details-marker { display: none; }
.groups details > summary svg { transition: transform .2s; color: var(--fg-muted); }
.groups details[open] > summary svg.chev { transform: rotate(90deg); }

/* база знаний */
.rl { padding: 14px 18px; border-bottom: 1px solid var(--line2); display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: start; }
.rl:last-child { border-bottom: 0; }
.rl .tx { font-size: 14px; line-height: 1.6; color: var(--ink); }
.rl .tx b { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .02em; margin-right: 6px; }
.rl .o { grid-column: 1; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); }
.rl .btns { grid-row: 1 / 3; grid-column: 2; }
.rl.off .tx { color: var(--fg-muted); text-decoration: line-through; text-decoration-color: var(--line); }
.rl .edit { grid-column: 1 / 3; }
.md { padding: 6px 22px 22px; font-size: 15px; line-height: 1.65; color: var(--text2); max-width: 78ch; }
.md h2 { font-size: 19px; color: var(--ink); margin: 26px 0 8px; letter-spacing: -0.01em; }
.md h3 { font-size: 16px; color: var(--ink); margin: 20px 0 6px; }
.md p { margin: 0 0 10px; }
.md ul { margin: 0 0 12px; padding-left: 20px; }
.md li { margin: 3px 0; }
.md code { font-family: var(--mono); font-size: 13px; background: var(--line2); padding: 1px 5px; border-radius: 3px; }
.md .o { color: var(--fg-muted); font-family: var(--mono); font-size: 12px; }
.md b { color: var(--ink); }
.kbedit { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.kbedit .textarea { min-height: 60vh; font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.conflict { border: 1px solid color-mix(in srgb, var(--red) 40%, var(--line)); border-radius: var(--r8); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: color-mix(in srgb, var(--red) 4%, var(--card)); }
.conflict pre { margin: 0; max-height: 40vh; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.55; white-space: pre-wrap; color: var(--text2); background: var(--paper); border: 1px solid var(--line2); border-radius: var(--r); padding: 10px 12px; }

/* профиль */
.prof { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px 40px; }
.prof h2 { margin: 0; font-size: 15px; font-weight: 600; }
.prof .lead { font-size: 13px; color: var(--fg-muted); margin: 4px 0 0; line-height: 1.5; }
.prof .sec { border-top: 1px solid var(--line2); padding-top: 22px; }
.prof .card { display: flex; gap: 16px; align-items: center; }
.prof .card .nm { font-size: 20px; font-weight: 600; }
.prof .sig { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--r8); font-size: 14px; color: var(--text2); background: var(--card); }
.prof .sig .meta { display: block; margin-bottom: 4px; }
.themecards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 520px; }
.themecards button { border: 1.5px solid var(--line); border-radius: var(--r8); padding: 10px; display: flex; flex-direction: column; gap: 8px; text-align: left; font-size: 13px; font-weight: 500; background: var(--card); }
.themecards button:hover { border-color: var(--muted2); }
.themecards button[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); }
.themecards .sw { height: 54px; border-radius: 5px; border: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.themecards .sw i { display: block; }
.themecards .sw .l { background: #f7f6f2; position: relative; }
.themecards .sw .d { background: #14181f; position: relative; }
.themecards .sw i::after { content: ''; position: absolute; left: 8px; right: 8px; top: 12px; height: 4px; border-radius: 2px; background: currentColor; box-shadow: 0 9px 0 currentColor, 0 18px 0 currentColor; opacity: .5; }
.themecards .sw .l { color: #14181f; } .themecards .sw .d { color: #e5e7eb; }
.pwform { display: flex; flex-direction: column; gap: 14px; max-width: 380px; }
.keys { width: 100%; border-collapse: collapse; font-size: 14px; }
.keys td { padding: 7px 0; border-bottom: 1px dashed var(--line2); color: var(--text2); vertical-align: top; }
.keys td:first-child { width: 132px; white-space: nowrap; }
.keys kbd { font-size: 11px; padding: 1px 6px; opacity: 1; color: var(--ink); border-color: var(--line); background: var(--card); margin-right: 3px; }

/* ---------- вход ---------- */
.login { min-height: 100vh; display: grid; grid-template-rows: 1fr auto; padding: 24px 16px calc(24px + var(--sab)); }
.login .wrap { align-self: center; justify-self: center; width: 100%; max-width: 380px; }
.login .logo { font-size: 30px; display: inline-block; margin-bottom: 6px; }
.login .tag { color: var(--fg-muted); font-size: 14px; margin: 0 0 30px; line-height: 1.55; }
.login form { display: flex; flex-direction: column; gap: 16px; }
.login .btn { height: 46px; font-size: 15px; margin-top: 4px; }
.login .input { height: 44px; font-size: 15px; }
.login .pw { position: relative; }
.login .pw .input { padding-right: 76px; }
.login .pw button { position: absolute; right: 6px; top: 6px; height: 32px; padding: 0 10px; font-size: 12px; color: var(--fg-muted); border-radius: 4px; font-family: var(--mono); }
.login .pw button:hover { color: var(--ink); background: var(--line2); }
.login .err { min-height: 20px; }
.login .foot { justify-self: center; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); text-align: center; line-height: 1.7; }
.login .lines { position: fixed; inset: 0; pointer-events: none; z-index: -1; background-image: linear-gradient(var(--line2) 1px, transparent 1px); background-size: 100% 32px; mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, transparent 40%, #000 100%); -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, transparent 40%, #000 100%); opacity: .7; }
.shake { animation: shake .36s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- тосты отмены ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column-reverse; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 24px); pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: var(--paper); border-radius: var(--r8); padding: 8px 8px 8px 14px; display: flex; align-items: center; gap: 14px; font-size: 14px; box-shadow: var(--pop-shadow);
  min-height: 48px; max-width: 560px; animation: tin .3s var(--ease); position: relative; overflow: hidden; }
.toast.out { animation: tout .22s ease-in forwards; }
.toast .tx { min-width: 0; line-height: 1.35; padding: 4px 0; }
.toast .tx small { display: block; font-family: var(--mono); font-size: 11px; opacity: .7; }
.toast .ring { width: 26px; height: 26px; flex: none; position: relative; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; }
.toast .ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.toast .ring circle { fill: none; stroke-width: 2; }
.toast .ring .bg { stroke: color-mix(in srgb, var(--paper) 22%, transparent); }
.toast .ring .fg { stroke: var(--paper); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.toast .undo { height: 32px; padding: 0 12px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--paper) 35%, transparent); color: var(--paper); font-weight: 600; font-size: 13px; display: inline-flex; gap: 8px; align-items: center; flex: none; }
.toast .undo:hover { background: color-mix(in srgb, var(--paper) 12%, transparent); }
.toast .undo:focus-visible { outline-color: var(--paper); }
.toast .close { width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r); opacity: .7; flex: none; }
.toast .close:hover { opacity: 1; background: color-mix(in srgb, var(--paper) 12%, transparent); }
.toast.bad { background: var(--red); color: #fff; }
.toast.bad .undo, .toast.bad .close { color: #fff; }
.toast.good .ic { color: #6fd3a2; }
html[data-theme="dark"] .toast.good .ic { color: var(--green); }
@keyframes tin { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes tout { to { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------- диалог и шторки ---------- */
.dlg { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--card); color: var(--ink); width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 760px); box-shadow: var(--pop-shadow); }
.dlg::backdrop { background: var(--shade); }
.dlg[open] { animation: pop .18s var(--ease); }
.dlg .dh { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px 22px; }
.dlg .dh h2 { margin: 0; font-size: 17px; font-weight: 600; }
.dlg .db { padding: 0 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.dlg .db pre { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap; color: var(--text2); background: var(--paper); border: 1px solid var(--line2); border-radius: var(--r); padding: 12px 14px; max-height: 56vh; overflow: auto; }
.choices { display: flex; flex-direction: column; gap: 6px; }
.choices button { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r); text-align: left; font-size: 14px; background: var(--card); }
.choices button:hover, .choices button:focus-visible { border-color: var(--ink); }
.choices button kbd { color: var(--fg-muted); }
.choices button .d { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); }
.shade { position: fixed; inset: 0; background: var(--shade); z-index: 70; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--paper); border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; max-height: 86vh; display: flex; flex-direction: column;
  z-index: 80; padding-bottom: var(--sab); animation: sheetin .32s var(--ease); }
.sheet.out { animation: sheetout .22s ease-in forwards; }
@keyframes sheetin { from { transform: translateY(100%); } }
@keyframes sheetout { to { transform: translateY(100%); } }
.sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 2px; flex: none; }
.sheet .sh { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px 8px 18px; flex: none; }
.sheet .sh h2 { margin: 0; font-size: 17px; font-weight: 600; }
.sheet .sbody { overflow-y: auto; padding: 0 8px 16px; overscroll-behavior: contain; }
.sheet .acts { display: flex; flex-direction: column; padding: 4px 16px 16px; gap: 8px; }
.sheet .acts .btn { width: 100%; justify-content: flex-start; height: 52px; font-size: 15px; }
.sheet .acts .btn .d { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--fg-muted); font-weight: 400; }
.sheet .navlist { display: flex; flex-direction: column; padding: 0 10px 12px; }
.sheet .navlist a, .sheet .navlist button { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 12px; border-radius: var(--r8); font-size: 16px; color: var(--ink); text-align: left; width: 100%; }
.sheet .navlist a.on { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.sheet .navlist svg { color: var(--fg-muted); width: 20px; height: 20px; }
.sheet .navlist .n { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--fg-muted); }
.mbar { display: none; }

/* ---------- средняя ширина ---------- */
@media (max-width: 1240px) {
  .shell, .shell.qclosed { grid-template-columns: 56px minmax(0, 1fr); }
  .shell.noconv { grid-template-columns: 320px minmax(0, 1fr); }
  .shell:not(.noconv) .queue .qhead h2, .shell:not(.noconv) .queue .secs, .shell:not(.noconv) .queue .chfilter, .shell:not(.noconv) .queue .qlist, .shell:not(.noconv) .queue .qfoot { display: none; }
  .shell:not(.noconv) .queue .qhead { padding: 12px 8px; justify-content: center; }
  .shell:not(.noconv) .queue .qrail { display: flex; }
  .shell.qpeek:not(.noconv) .queue { width: 320px; box-shadow: var(--pop-shadow); }
  .shell.qpeek:not(.noconv) .queue .qhead h2, .shell.qpeek:not(.noconv) .queue .secs, .shell.qpeek:not(.noconv) .queue .chfilter, .shell.qpeek:not(.noconv) .queue .qlist, .shell.qpeek:not(.noconv) .queue .qfoot { display: revert; }
  .shell.qpeek:not(.noconv) .queue .qlist, .shell.qpeek:not(.noconv) .queue .secs, .shell.qpeek:not(.noconv) .queue .chfilter, .shell.qpeek:not(.noconv) .queue .qfoot { display: flex; }
  .shell.qpeek:not(.noconv) .queue .qlist { display: block; }
  .shell.qpeek:not(.noconv) .queue .qhead { padding: 14px 10px 6px 16px; justify-content: space-between; }
  .shell.qpeek:not(.noconv) .queue .qrail { display: none; }
  .client { display: none; }
  .clientmini { display: block; margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--r8); background: var(--card); }
  .clientmini > summary { list-style: none; cursor: pointer; padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text2); border-radius: var(--r8); }
  .clientmini > summary::-webkit-details-marker { display: none; }
  .clientmini > summary .sum { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .clientmini > summary svg.chev { transition: transform .2s; color: var(--fg-muted); }
  .clientmini[open] > summary svg.chev { transform: rotate(90deg); }
  .clientmini .inner { padding: 0 16px 6px; border-top: 1px solid var(--line2); }
  .search { width: 180px; flex-basis: 180px; }
  .me-btn .txt { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts { grid-template-columns: 1fr; }
}
@media (max-width: 1020px) {
  .nav a span:not(.n) { display: none; }
  .nav a { padding: 0 10px; }
  .focus { padding: 22px 28px 0; }
  .tbl .hide-md { display: none; }
}

/* ---------- телефон ---------- */
@media (max-width: 760px) {
  :root { --top: 54px; }
  body { font-size: 15px; }
  .top { padding: 0 8px 0 16px; gap: 6px; }
  .top .nav, .top .theme, .top .search, .top .me-btn .txt, .top .mode { display: none; }
  .only-phone { display: inline-grid !important; }
  .t-phone { display: inline; } .t-desk { display: none; }
  .qi.kb { box-shadow: none; }
  .me-btn { padding: 3px; }
  .shell, .shell.qclosed, .shell.noconv { display: block; min-height: 0; }
  .shell:not(.noconv) .queue { display: none; }
  .shell.noconv .queue { position: static; height: auto; border-right: 0; }
  .shell.noconv .queue .qrail { display: none !important; }
  .shell.noconv .queue .qhead h2, .shell.noconv .queue .secs, .shell.noconv .queue .chfilter, .shell.noconv .queue .qlist, .shell.noconv .queue .qfoot { display: revert !important; }
  .shell.noconv .queue .secs { display: flex !important; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 4px 12px 10px; gap: 6px; }
  .shell.noconv .queue .secs::-webkit-scrollbar { display: none; }
  .shell.noconv .queue .secs a { flex: none; grid-template-columns: auto auto; height: 34px; border: 1.5px solid var(--line); background: var(--card); }
  .shell.noconv .queue .secs a svg { display: none; }
  .shell.noconv .queue .secs a.on { background: var(--ink); color: var(--paper); box-shadow: none; border-color: var(--ink); }
  .shell.noconv .queue .secs a.on .n { color: var(--paper); }
  .shell.noconv .queue .chfilter { display: flex !important; padding: 2px 16px 10px; }
  .shell.noconv .queue .qlist { padding: 4px 8px 24px; overflow: visible; }
  .shell.noconv .queue .qhead { padding: 16px 16px 8px; }
  .shell.noconv .queue .qhead h2 { font-size: 22px; }
  .shell.noconv .queue .qhead .iconbtn { display: none; }
  .shell.noconv .queue .qfoot { display: flex !important; }
  .shell.noconv .focus { display: none; }
  .focus { padding: 12px 16px calc(96px + var(--sab)); }
  .progress { margin-bottom: 18px; gap: 10px; }
  .progress .stepper { display: none; }
  .rhead { margin-bottom: 18px; }
  .rhead h1 { font-size: 24px; }
  .latest .tx { font-size: 17px; }
  .clientmini { margin-bottom: 18px; }
  .editor .hl, .editor textarea { padding: 16px 16px 8px; }
  .draft .dh, .check, .dfoot, .sources, .rewrite, .instr { padding-left: 16px; padding-right: 16px; }
  .signline { margin-left: 0; }
  .tgmark { display: none; }
  .actions, .nextrow { display: none; }
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; gap: 8px; align-items: center; padding: 10px 12px calc(10px + var(--sab)); background: var(--paper); border-top: 1px solid var(--line); }
  .mbar .btn.primary, .mbar .btn.armed { flex: 1 1 auto; height: 50px; font-size: 16px; }
  .mbar .sq { width: 50px; height: 50px; border: 1.5px solid var(--line); border-radius: var(--r); display: grid; place-items: center; flex: none; background: var(--card); color: var(--ink); }
  .mbar .sq:disabled { opacity: .4; }
  .mbar .mwhy { position: absolute; left: 0; right: 0; bottom: 100%; padding: 8px 16px; font-size: 13px; color: var(--red-t); background: var(--paper); border-top: 1px solid var(--line2); }
  .toasts { bottom: calc(84px + var(--sab)); width: calc(100vw - 24px); }
  .toast { width: 100%; max-width: none; }
  body:not(.has-mbar) .toasts { bottom: calc(16px + var(--sab)); }
  .page { padding: 20px 16px 60px; }
  .phead h1 { font-size: 26px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { padding: 12px 14px; }
  .tile .v { font-size: 24px; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line2); }
  .tbl td { padding: 0; border: 0; }
  .tbl td.chc { grid-column: 1; order: 0; }
  .tbl td.wt { grid-column: 2; grid-row: 1; }
  .tbl td.cl, .tbl td.sm { grid-column: 1 / 3; }
  .tbl td.rk, .tbl td.as { grid-column: 1 / 3; display: inline; }
  .nrow { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; }
  .nrow .sj, .nrow .why { grid-column: 1; }
  .nrow > :last-child { grid-column: 2; grid-row: 1 / 4; }
  .prof { grid-template-columns: 1fr; gap: 14px; }
  .prof .sec { padding-top: 18px; }
  .themecards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rl { grid-template-columns: 1fr; }
  .rl .btns { grid-row: auto; grid-column: 1; margin-left: -10px; }
  .tabs a, .tabs button { padding: 10px 9px; font-size: 13.5px; }
  .rule .pair { grid-template-columns: 1fr; gap: 4px; }
  .rule .pair label { padding-top: 4px; }
  .idle { display: none; }
  /* касание: цели не меньше 44 px (QA 02.10) */
  .top .iconbtn, .top .me-btn { min-width: 44px; min-height: 44px; }
  .shell.noconv .queue .secs a { height: 44px; }
  .shell.noconv .queue .chfilter { gap: 8px; }
  .shell.noconv .queue .chfilter button { height: 44px; min-width: 44px; border-radius: 22px; padding: 0 12px; }
  .assign .chip { min-height: 44px; padding-left: 12px; padding-right: 12px; }
  .earlier > summary, .clientmini .journal summary, .journal summary { min-height: 44px; }
  .check label { min-height: 44px; }
  .latest .more { display: inline-flex; align-items: center; min-height: 44px; }
  .qfoot a { display: inline-flex; align-items: center; min-height: 44px; }
  .links a { min-height: 44px; display: flex; align-items: center; }
  .csec h3 button[data-card] { min-height: 44px; }
  .swipe-l { animation: swl .26s var(--ease); } .swipe-r { animation: swr .26s var(--ease); }
}
@keyframes swl { from { opacity: .3; transform: translateX(28px); } }
@keyframes swr { from { opacity: .3; transform: translateX(-28px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn, .chip, .seg, .theme, .qi.on { border: 1px solid CanvasText; }
  .editor mark { forced-color-adjust: none; }
}
