/* Формулник — дизайн-система «одного окна», вариант «Ясный» (раздел «Д» в PLAN, макет — docs/design/).
   Основа — shadcn/ui, классический стиль (MIT): белый фон, тонкие линии, чёрные основные кнопки, зелёный — «Сделать»
   и всё, что «проверено» и «готово». Светлая тема по умолчанию, тёмная — кнопкой в шапке (data-theme="dark").
   Formulnik "one box" design system, the "Clear" variant (PLAN section «Д», mockup in docs/design/), after shadcn/ui (MIT).
   Light by default, dark via the header button (data-theme="dark"). */
/* Шрифты со своего сервера (SIL OFL 1.1): Inter и JetBrains Mono, только кириллица и латиница, вариативные веса.
   Self-hosted fonts (SIL OFL 1.1): Inter and JetBrains Mono, Cyrillic + Latin only, variable weights. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/v2/fonts/inter-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/v2/fonts/inter-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/v2/fonts/jbmono-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/v2/fonts/jbmono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ================================================================ токены / tokens */
:root {
  /* светлая тема: текст и плашки не ниже WCAG AA 4,5:1 (тест test_v2_contrast) / light theme meets WCAG AA 4.5:1 */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-h: var(--font);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs: 16px; --w-h: 700; --w-b: 500; --ls-h: -.032em;
  --bg: #ffffff; --bg-2: #fafafa; --surface: #ffffff; --surface-2: #f4f4f5; --surface-3: #e9e9ec;
  --line: #e4e4e7; --line-2: #d4d4d8;
  --text: #09090b; --text-2: #52525b; --muted: #6b6b74;
  --brand: #15803d; --brand-2: #166534; --brand-ink: #166534; --brand-soft: #ecfdf3; --brand-soft-2: #d1fadf;
  --primary: #18181b; --primary-2: #27272a; --on-primary: #fafafa;
  --cta: #15803d; --cta-2: #166534; --on-cta: #ffffff;
  --amber: #a2470a; --amber-soft: #fef6e7; --amber-line: #f6d7a0;
  --red: #c02626; --red-soft: #fef2f2;
  --blue: #2257d6; --blue-soft: #eff4ff;
  --teal: #0f766e; --teal-soft: #ecfdf9;
  --violet: #6d32d9; --violet-soft: #f4f0ff;
  --shadow-1: 0 1px 2px rgba(9, 9, 11, .05);
  --shadow-2: 0 4px 12px -2px rgba(9, 9, 11, .08), 0 1px 3px rgba(9, 9, 11, .05);
  --shadow-3: 0 24px 60px -20px rgba(9, 9, 11, .22), 0 4px 14px rgba(9, 9, 11, .05);
  --r-btn: 10px; --r-chip: 999px; --r-badge: 7px; --r-1: 8px; --r-2: 10px; --r-3: 14px; --r-4: 20px; --r-box: 20px; --r-inp: 10px;
  --top-bg: rgba(255, 255, 255, .82);
  --ask-bg: #f4f4f5; --ask-fg: #09090b;
  --fbox-bg: #0b0b0d; --fbox-fg: #f4f4f5; --fbox-line: transparent;
  --hero-h1: 60px; --page-w: 1200px;
  --logo-bg: linear-gradient(145deg, #22c55e, #15803d);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #09090b; --bg-2: #0c0c0f; --surface: #111113; --surface-2: #19191c; --surface-3: #232327;
  --line: #26262b; --line-2: #34343a;
  --text: #fafafa; --text-2: #b4b4bb; --muted: #8b8b94;
  --brand: #22c55e; --brand-2: #16a34a; --brand-ink: #86efac; --brand-soft: #0f2a1a; --brand-soft-2: #14381f;
  --primary: #fafafa; --primary-2: #e4e4e7; --on-primary: #09090b;
  --cta: #22c55e; --cta-2: #16a34a; --on-cta: #04210f;
  --amber: #fbbf24; --amber-soft: #2b2110; --amber-line: #5c4415;
  --red: #f87171; --red-soft: #2c1414;
  --blue: #7aa2ff; --blue-soft: #131f3d;
  --teal: #2dd4bf; --teal-soft: #0f2a27;
  --violet: #b197fc; --violet-soft: #21193d;
  --shadow-1: none; --shadow-2: 0 8px 24px -10px rgba(0, 0, 0, .7); --shadow-3: 0 30px 70px -30px rgba(0, 0, 0, .9);
  --top-bg: rgba(9, 9, 11, .8);
  --ask-bg: #1c1c20; --ask-fg: #fafafa;
  --fbox-bg: #000000; --fbox-line: #26262b;
  color-scheme: dark;
}

/* ================================================================ основа / base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--w-b) var(--fs)/1.6 var(--font); letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-h); font-weight: var(--w-h); letter-spacing: var(--ls-h); line-height: 1.15; }
p { margin: 0; }
.svg { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.t2 { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
::selection { background: var(--brand-soft-2); }

/* ================================================================ каркас / shell */
.shell { min-height: 100vh; }
.main-col { min-width: 0; }
.top { position: sticky; top: 0; z-index: 30; background: var(--top-bg); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line); }
.top-in { max-width: var(--page-w); margin: 0 auto; padding: 0 28px; height: 64px; display: flex; align-items: center; gap: 26px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-h); font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: -.03em; white-space: nowrap; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px;
  background: var(--logo-bg); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14), 0 2px 6px -2px rgba(22, 163, 74, .5); }
.nav { display: flex; gap: 2px; }
.nav a { text-decoration: none; padding: 7px 12px; border-radius: var(--r-1); color: var(--text-2); font-weight: 550; font-size: 15px; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.quota { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); padding: 6px 12px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; white-space: nowrap; }
.quota-dots { display: flex; gap: 3px; }
.quota-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); display: block; }
.quota-dots i.off { background: var(--line-2); }
.icon-btn { width: 36px; height: 36px; border-radius: var(--r-1); display: grid; place-items: center; border: 0; background: transparent; color: var(--text-2); flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: 13px; text-decoration: none; }
main { min-height: calc(100vh - 140px); overflow-wrap: break-word; }   /* длинное слово рвётся, только если не влезает / long words break only when they would overflow */
.wrap { max-width: var(--page-w); margin: 0 auto; padding: 0 28px; }
.wrap-n { max-width: 880px; margin: 0 auto; padding: 0 28px; }

/* боковая панель — только в «Офисе» на широком экране / sidebar — only in "Office" on wide screens */
.side { display: none; }
.side-in { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; overflow-y: auto; }
.side .logo { padding: 6px 8px 14px; }
.side-new { margin: 0 0 10px; width: 100%; justify-content: flex-start; }
.side a.si { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-1); text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 14.5px; }
.side a.si:hover { background: var(--surface-2); color: var(--text); }
.side a.si[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.side .si .svg { width: 18px; height: 18px; }
.side-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 10px 6px; }
.side-hist a { display: block; padding: 6px 10px; border-radius: var(--r-1); font-size: 13.5px; color: var(--text-2); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-hist a:hover { background: var(--surface-2); color: var(--text); }
.side-hist .empty { font-size: 13px; color: var(--muted); padding: 2px 10px; }
.side-foot { margin-top: auto; padding-top: 12px; display: grid; gap: 8px; }
.side-q { padding: 12px; border-radius: var(--r-2); background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.side-q b { display: block; color: var(--text); font-size: 14px; margin-bottom: 6px; }
.side-q .bar { margin-top: 8px; }

/* подвал: перелинковка для поисковиков / footer: internal links for search engines */
.foot { border-top: 1px solid var(--line); margin-top: 96px; background: var(--bg-2); }
.foot-in { max-width: var(--page-w); margin: 0 auto; padding: 44px 28px 36px; }
.foot-cols { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
.foot-cols h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.foot-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-cols a { color: var(--text-2); text-decoration: none; font-size: 14.5px; }
.foot-cols a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.foot-about p { color: var(--text-2); font-size: 14.5px; margin-top: 12px; max-width: 300px; }
.foot-bot { display: flex; gap: 10px 24px; flex-wrap: wrap; align-items: center; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.foot-bot a { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tabbar { display: none; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 70; width: max-content; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: var(--r-2); background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px; box-shadow: var(--shadow-3); transition: all .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
/* плашки «Вышла новая версия» и «Поставить как приложение» (update.js, У1) — внизу, не перекрывают задачу
   the «new version» and «install the app» banners (update.js) — at the bottom, never over a running task */
.upd { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  width: max-content; max-width: calc(100vw - 32px); padding: 10px 12px 10px 16px; border-radius: var(--r-2); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-3); color: var(--text); font-size: 14px; }
.upd[hidden] { display: none; }
.upd-t { display: flex; flex-direction: column; min-width: 0; max-width: 420px; }
.upd-top { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-l { color: var(--text-2); font-weight: 600; white-space: nowrap; }

/* ================================================================ кнопки, метки / buttons, badges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r-btn); padding: 10px 18px;
  font-weight: 650; font-size: 15px; line-height: 1.3; text-decoration: none; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .08s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-2); }
.btn-cta { background: var(--cta); color: var(--on-cta); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--cta) 80%, transparent); }
.btn-cta:hover { background: var(--cta-2); }
.btn-soft { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-1); }
.btn-soft:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.btn-sm { padding: 7px 13px; font-size: 14px; }
.btn-xs { padding: 4px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-wrap { white-space: normal; text-align: left; }   /* длинная надпись переносится / a long label wraps */
/* имена файлов и задачи без пробелов («Продажи_за_сентябрь_2026….xlsx») переносятся в любом месте
   names without spaces wrap anywhere */
.filecard b, .ask-b, .ask-f, .box-file, .hi b, .tpl h3, .res-h h2 { overflow-wrap: anywhere; min-width: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: var(--r-badge); font-size: 12.5px; font-weight: 650; white-space: nowrap; line-height: 1.5; }
.b-green { background: var(--brand-soft); color: var(--brand-ink); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.b-teal { background: var(--teal-soft); color: var(--teal); }
.b-gray { background: var(--surface-2); color: var(--text-2); }
/* К6: «Посчитано тремя движками» рядом с «Проверено»; на узком экране — на новой строке / next to «Verified» */
.b-eng3 { margin: 0 0 0 6px; }
@media (max-width: 480px) { .b-eng3 { margin: 6px 0 0; } }
.b-violet { background: var(--violet-soft); color: var(--violet); }
.b-line { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 8px 14px; border-radius: var(--r-chip); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 14.5px; font-weight: 550; color: var(--text-2); text-align: left; transition: box-shadow .15s, background .15s; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-1); color: var(--text); }
.chip .k { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.chip .k .svg { width: 14px; height: 14px; }
.chip.on { background: var(--brand-soft); color: var(--brand-ink); box-shadow: inset 0 0 0 1.5px var(--brand); }
.kind { width: 42px; height: 42px; border-radius: var(--r-2); display: grid; place-items: center; flex: none; }
.kind .svg { width: 21px; height: 21px; }
.k-formula { background: var(--brand-soft); color: var(--brand); }
.k-table { background: var(--teal-soft); color: var(--teal); }
.k-doc { background: var(--blue-soft); color: var(--blue); }
.k-file { background: var(--amber-soft); color: var(--amber); }
.k-pdf { background: var(--red-soft); color: var(--red); }
.k-macro { background: var(--violet-soft); color: var(--violet); }
.kbd { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 -2px 0 var(--line-2), inset 0 0 0 1px var(--line-2);
  font-size: 12.5px; font-weight: 700; font-family: var(--mono); color: var(--text); }

/* ================================================================ карточки / cards */
.card { background: var(--surface); border-radius: var(--r-3); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.card-p { padding: 24px; }
.card-h { display: flex; align-items: center; gap: 8px 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h3 { font-size: 18px; }
.sec-t { font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.hr { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.grid2 > *, .doc-l > *, .stack > * { min-width: 0; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-w { display: flex; flex-wrap: wrap; gap: 8px; }
.spacer { flex: 1; }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-2); background: var(--surface-2); color: var(--text-2); font-size: 14.5px; }
.note .svg { margin-top: 3px; }
.note-g { background: var(--brand-soft); color: var(--brand-ink); }
.note-a { background: var(--amber-soft); color: var(--amber); }
.note-a b, .note-g b { color: inherit; }
.note a { color: inherit; font-weight: 700; }

/* ================================================================ главная / home */
.hero { position: relative; padding: 76px 0 30px; text-align: center; isolation: isolate; }
.hero-bg { position: absolute; inset: 0 0 -80px; z-index: -1; pointer-events: none; overflow: hidden; }
/* «Ясный»: тонкая сетка, тающая к краям / "Clear": a fine grid fading to the edges */
.hero-bg::before { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; background-position: center top; opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 30%, transparent 75%); }
.hero-bg::after { content: ""; position: absolute; left: 50%; top: 26%; width: 760px; height: 360px; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 16%, transparent), transparent); filter: blur(10px); }
.hero-badge { display: inline-flex; gap: 8px; align-items: center; padding: 5px 14px 5px 6px; border-radius: 999px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 24px; }
.hero-badge .dot { padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.hero h1 { font-size: var(--hero-h1); font-weight: 800; letter-spacing: -.045em; line-height: 1.04; max-width: 920px; margin: 0 auto; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-sub { font-size: 19px; color: var(--text-2); max-width: 680px; margin: 20px auto 0; line-height: 1.55; }

/* одно окно / the one box */
.box { max-width: 820px; margin: 36px auto 0; text-align: left; background: var(--surface); border-radius: var(--r-box);
  box-shadow: var(--shadow-3), inset 0 0 0 1px var(--line); padding: 8px; position: relative; transition: box-shadow .2s; }
.box:focus-within { box-shadow: var(--shadow-3), inset 0 0 0 1px var(--line-2), 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.box.drag { box-shadow: var(--shadow-3), inset 0 0 0 2px var(--brand); background: var(--brand-soft); }
.box textarea { width: 100%; min-height: 104px; resize: none; border: 0; outline: 0; background: transparent; padding: 14px 16px 6px;
  font-size: 19px; font-weight: 500; line-height: 1.5; letter-spacing: -.012em; }
.box textarea:focus-visible { outline: 0; }
.box textarea::placeholder { color: var(--muted); }
.box-bar { display: flex; align-items: center; gap: 6px; padding: 4px 4px 2px 6px; }
.box-bar .btn-ghost { padding: 8px 12px; font-size: 14.5px; font-weight: 600; }
.box-hint { font-size: 13px; color: var(--muted); }
.box-file { display: flex; align-items: center; gap: 10px; margin: 6px 10px 0; padding: 7px 10px; border-radius: var(--r-2); background: var(--surface-2); width: max-content; max-width: calc(100% - 20px); font-size: 14.5px; font-weight: 600; }
.profile-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: var(--r-chip); background: var(--surface-2); color: var(--text-2);
  font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.profile-pill:hover { background: var(--surface-3); color: var(--text); }
.mic { width: 42px; height: 42px; border-radius: var(--r-btn); display: grid; place-items: center; border: 0; background: var(--surface-2); color: var(--text); flex: none; }
.mic:hover { background: var(--surface-3); }
.mic.rec { background: var(--red); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--red) 20%, transparent); } }
.mic-st { margin: 4px 12px 2px; font-size: 14px; color: var(--muted); }
.mic-st:empty { display: none; }
.box .go { padding: 11px 20px; }
.tries { max-width: 820px; margin: 18px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tries-l { font-size: 13.5px; color: var(--muted); font-weight: 600; width: 100%; text-align: center; margin-bottom: 2px; }
/* Ж2: старт под роль и «Ваши дела — пора сделать» на главной / Zh2: role starts and due cases on the home page */
.starts { max-width: 820px; margin: 16px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.card.start { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; text-align: left; text-decoration: none; color: var(--text); font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--surface); }
.card.start:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.card.start .kind { width: 30px; height: 30px; flex: none; }
.card.start b { display: block; font-size: 14.5px; line-height: 1.3; }
.card.start small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.due { max-width: 820px; margin: 16px auto 0; display: grid; gap: 8px; }
.due .tries-l { display: flex; gap: 6px; align-items: center; justify-content: center; }
.due-i { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--amber-line, var(--line)); border-radius: 12px; background: var(--amber-soft, var(--surface)); }
.due-i .kind { width: 28px; height: 28px; flex: none; }
.due-t { flex: 1; min-width: 0; font-size: 14px; }
.trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; margin: 28px auto 0; color: var(--text-2); font-size: 14px; font-weight: 550; }
.trust span { display: inline-flex; gap: 7px; align-items: center; }
.trust .svg { color: var(--brand); }
.deco { display: none; }

/* быстрые плитки — видны в «Офисе» / quick tiles — shown in "Office" */
.quick { display: none; }
.quick button { text-align: left; border: 0; padding: 16px; border-radius: var(--r-3); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
  display: flex; gap: 12px; align-items: flex-start; transition: box-shadow .15s; }
.quick button:hover { box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-2); }
.quick b { display: block; font-size: 15px; }
.quick small { display: block; color: var(--text-2); font-size: 13px; margin-top: 2px; font-weight: 500; }

/* секции главной / home sections */
.sec { margin-top: 112px; }
.sec-h { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.sec-h .over { display: inline-block; font-size: 13px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.sec-h h2 { font-size: 40px; letter-spacing: -.04em; }
.sec-h p { color: var(--text-2); font-size: 18px; margin-top: 12px; }
.outs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.out { padding: 16px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; border: 0; text-align: left; transition: transform .15s, box-shadow .15s; }
.out:hover { transform: translateY(-2px); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-2); }
.out h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.out p { font-size: 14.5px; color: var(--text-2); }
.out-prev { height: 148px; border-radius: var(--r-2); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; position: relative; padding: 12px; }
.out-go { margin-top: auto; font-size: 14px; font-weight: 650; color: var(--brand-ink); display: flex; gap: 6px; align-items: center; }
/* мини-картинки результатов / tiny result pictures */
.mp-fx { display: flex; gap: 6px; align-items: center; height: 26px; padding: 0 8px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font: 600 10.5px/1 var(--mono); color: var(--text); white-space: nowrap; overflow: hidden; }
.mp-fx i { font-style: italic; color: var(--muted); font-family: Georgia, serif; }
.mp-fx b { color: var(--brand); font-weight: 700; }
.mp-grid { display: grid; gap: 1px; margin-top: 8px; background: var(--line); border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.mp-grid span { background: var(--surface); height: 17px; font: 600 9.5px/17px var(--font); padding: 0 5px; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.mp-grid span.h { background: var(--surface-2); color: var(--muted); font-weight: 700; }
.mp-grid span.g { background: var(--brand-soft); color: var(--brand-ink); }
.mp-grid span.y { background: var(--amber-soft); color: var(--amber); }
.mp-grid span.r { background: var(--red-soft); color: var(--red); text-decoration: line-through; }
.mp-grid span.s { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--text); font-weight: 800; text-align: right; }
.mp-grid span.n { text-align: right; }
.mp-ok { position: absolute; right: 10px; bottom: 10px; }
.mp-paper { width: 72%; margin: 0 auto; height: 160px; background: #fff; border-radius: 4px; box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .35); padding: 12px 12px; }
.mp-paper i { display: block; height: 5px; border-radius: 3px; background: #e5e5e5; margin: 6px 0; }
.mp-paper i.t { width: 60%; height: 7px; margin: 2px auto 10px; background: #cfcfcf; }
.mp-paper i.m { background: #ffe9a6; width: 70%; }
.mp-tabs { display: flex; gap: 3px; margin-top: 6px; }
.mp-tabs span { font: 700 9px/1 var(--font); padding: 4px 7px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.mp-tabs span.on { background: var(--surface); color: var(--brand-ink); box-shadow: inset 0 2px 0 var(--brand); }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how-i { padding: 24px; position: relative; }
.how-n { width: 32px; height: 32px; border-radius: var(--r-1); background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800; font-size: 15px; margin-bottom: 16px; }
.how-i h3 { font-size: 19px; margin-bottom: 6px; }
.how-i p { color: var(--text-2); font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-radius: var(--r-3); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.stat { padding: 26px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--font-h); font-size: 38px; font-weight: 800; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { display: block; color: var(--text-2); font-size: 14.5px; margin-top: 8px; }
.tstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tcard { padding: 12px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.tcard:hover { box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-2); transform: translateY(-2px); }
.tcard h3 { font-size: 16px; }
.tcard p { font-size: 13.5px; color: var(--text-2); }
.tcard .meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; font-size: 13px; color: var(--muted); }
.thumb { height: 112px; border-radius: var(--r-2); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); padding: 10px; overflow: hidden; position: relative; }
.thumb .tg { display: grid; gap: 1px; background: var(--line); border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.thumb .tg i { height: 13px; background: var(--surface); display: block; }
.thumb .tg i.h { background: var(--th, var(--brand)); opacity: .85; }
.thumb .tg i.f { background: var(--brand-soft); }
.thumb .tt { position: absolute; left: 10px; bottom: 8px; display: flex; gap: 3px; }
.thumb .tt span { width: 26px; height: 7px; border-radius: 3px; background: var(--surface-3); }
.thumb .tt span:first-child { background: var(--th, var(--brand)); opacity: .7; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vs-col { padding: 26px; }
.vs-col ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.vs-col li { display: flex; gap: 10px; color: var(--text-2); font-size: 15.5px; }
.vs-col li .svg { margin-top: 4px; }
.vs-col.no .svg { color: var(--muted); }
.vs-col.yes { box-shadow: var(--shadow-2), inset 0 0 0 1.5px var(--brand); }
.vs-col.yes .svg { color: var(--brand); }
.faqs { max-width: 820px; margin: 0 auto; }
.cta { margin-top: 96px; padding: 48px; border-radius: var(--r-4); background: var(--primary); color: var(--on-primary); display: flex; align-items: center; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta h2 { font-size: 34px; letter-spacing: -.04em; }
.cta p { opacity: .75; margin-top: 8px; font-size: 17px; }
.cta .btn { margin-left: auto; background: var(--on-primary); color: var(--primary); }
.cta .btn:hover { opacity: .92; }

/* ================================================================ мини-лист / mini spreadsheet */
.sheet { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; font-variant-numeric: tabular-nums; background: var(--surface); }
.sheet th, .sheet td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; white-space: nowrap; height: 32px; }
.sheet thead th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; text-align: center; padding: 4px 8px; height: 26px; }
.sheet tbody th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; width: 34px; text-align: center; padding: 4px; }
.sheet td.num { text-align: right; }
.sheet td.hd { font-weight: 700; background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.sheet td.hl { background: var(--brand-soft); }
.sheet td.hl-y { background: var(--amber-soft); }
.sheet td.hl-r { background: var(--red-soft); color: var(--red); }
.sheet td.hl-b { background: var(--blue-soft); }
.sheet td.add { background: color-mix(in srgb, var(--brand-soft) 70%, var(--surface)); }
.sheet td.sel { box-shadow: inset 0 0 0 2px var(--brand); background: var(--surface); font-weight: 800; }
.sheet td.dim { color: var(--muted); }
.sheet-w { border-radius: var(--r-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); position: relative; }
.sheet-w .sheet { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.fx { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.fx b { font-family: var(--mono); color: var(--muted); font-size: 12.5px; padding-right: 10px; border-right: 1px solid var(--line); }
.fx .fxi { font-style: italic; font-family: Georgia, serif; color: var(--muted); }
.fx code { font-family: var(--mono); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs-s { display: flex; gap: 2px; padding: 6px 8px 0; background: var(--surface-2); border-top: 1px solid var(--line); overflow: hidden; }
.tabs-s span { padding: 6px 14px; font-size: 12.5px; font-weight: 650; color: var(--muted); border-radius: 6px 6px 0 0; white-space: nowrap; }
.tabs-s span.on { background: var(--surface); color: var(--brand-ink); box-shadow: inset 0 2px 0 var(--brand); }
/* Ж2: просмотр книги — вкладки листов кнопками, строка формулы, ячейки по нажатию / Zh2: the workbook viewer */
.tabs-s button { padding: 6px 14px; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--muted); background: none; border: 0; border-radius: 6px 6px 0 0; white-space: nowrap; cursor: pointer; }
.tabs-s button.on { background: var(--surface); color: var(--brand-ink); box-shadow: inset 0 2px 0 var(--brand); }
.book .tabs-s { overflow-x: auto; scrollbar-width: thin; }
.book .sheet td { cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.fxbar { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--surface); font-size: 13.5px; }
.fxbar .fx-a { min-width: 40px; font-weight: 700; color: var(--muted); font-family: var(--mono); }
.fxbar .fx-i { font-style: italic; color: var(--brand-ink); font-weight: 700; }
.fxbar code { font-family: var(--mono); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.book .sheet-w { border-top-left-radius: 0; border-top-right-radius: 0; }
.scroll-x { overflow-x: auto; }

/* ================================================================ поток задачи / task flow */
.flow { padding: 36px 0 0; max-width: 1080px; }
.ask { display: flex; gap: 12px; align-items: flex-start; justify-content: flex-end; margin-bottom: 22px; }
.ask-b { background: var(--ask-bg); color: var(--ask-fg); padding: 12px 18px; border-radius: 18px 18px 6px 18px; max-width: 640px; font-size: 16.5px; font-weight: 550; }
.ask-f { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 5px 10px; border-radius: 8px; background: color-mix(in srgb, var(--ask-fg) 8%, transparent); font-size: 13.5px; }
.me { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 800; font-size: 12px; color: var(--text-2); flex: none; }
.ans { display: flex; gap: 14px; align-items: flex-start; }
.ans-av { width: 34px; height: 34px; border-radius: 9px; background: var(--logo-bg); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.ans-body { flex: 1; min-width: 0; }
.und { padding: 26px; }
.und-h { display: flex; gap: 14px; align-items: center; }
.und-h h2 { font-size: 24px; }
.ass { margin-top: 18px; border-radius: var(--r-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.ass-r { display: grid; grid-template-columns: 200px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ass-r:nth-child(odd) { background: var(--bg-2); }
.ass-r:last-child { border-bottom: 0; }
.ass-r .l { color: var(--muted); font-size: 14.5px; font-weight: 600; }
.ass-r .v { font-weight: 650; }
.q { margin-top: 20px; }
.q-t { font-weight: 700; font-size: 16px; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.q-why { font-weight: 500; font-size: 14px; color: var(--muted); }
.act { display: flex; gap: 10px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.prog ol { list-style: none; padding: 0; margin: 0; }
.prog li { display: flex; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px dashed var(--line); font-weight: 600; }
.prog li:last-child { border-bottom: 0; }
.prog .st { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--muted); }
.prog li.done .st { background: var(--brand); color: #fff; }
.prog li.now .st { background: var(--brand-soft); color: var(--brand); }
.prog li.now .st::after { content: ""; width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid var(--brand); border-right-color: transparent; animation: spin .8s linear infinite; }
.prog li.wait { color: var(--muted); }
.prog .d { margin-left: auto; font-size: 13.5px; color: var(--muted); font-weight: 550; font-variant-numeric: tabular-nums; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #a3e635)); border-radius: 99px; transition: width .6s; }
.bar.shine i { background-size: 200% 100%; animation: shine 1.6s linear infinite; background-image: linear-gradient(90deg, var(--brand), #6ee7a0, var(--brand)); }
@keyframes shine { to { background-position: -200% 0; } }

/* ================================================================ результат / result */
.res-h { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.res-h h2 { font-size: 26px; }
.res-h .row { flex-wrap: wrap; }
.ptabs { display: inline-flex; padding: 3px; border-radius: calc(var(--r-btn) + 3px); background: var(--surface-2); gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ptabs button { flex: none; white-space: nowrap; }
.ptabs button { border: 0; background: transparent; padding: 6px 13px; border-radius: var(--r-btn); font-size: 14px; font-weight: 600; color: var(--text-2); }
.ptabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.fbox { margin-top: 14px; padding: 20px 22px; border-radius: var(--r-3); background: var(--fbox-bg); color: var(--fbox-fg); box-shadow: inset 0 0 0 1px var(--fbox-line);
  font-family: var(--mono); font-size: 18px; line-height: 1.65; overflow-wrap: anywhere; position: relative; }
.fbox span { white-space: nowrap; }
.fbox .p1 { color: #8fb8ff; } .fbox .p2 { color: #ffd479; } .fbox .p3 { color: #c4a1ff; } .fbox .p4 { color: #7ee2a8; } .fbox .pf { color: inherit; font-weight: 700; }
.fbox-cap { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; flex-wrap: wrap; gap: 10px; }
.part { display: grid; grid-template-columns: 12px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.part:last-child { border-bottom: 0; }
.part i { width: 12px; height: 12px; border-radius: 3px; margin-top: 6px; }
.part code { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.part p { color: var(--text-2); font-size: 15px; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.s3 { padding: 14px; border-radius: var(--r-2); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.s3 b { display: block; margin: 10px 0 2px; font-size: 15px; }
.s3 p { font-size: 13.5px; color: var(--text-2); }
.s3-pic { height: 88px; border-radius: var(--r-1); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; position: relative; }
.s3-pic .sheet { table-layout: fixed; }
.big-n { font-family: var(--font-h); font-size: 40px; font-weight: 800; letter-spacing: -.045em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ok-l ul { list-style: none; padding: 0; margin: 0; }
.ok-l li { position: relative; padding-left: 28px; margin: 8px 0; font-size: 15px; color: var(--text-2); }
.ok-l li > .svg:first-child { position: absolute; left: 0; top: 4px; color: var(--brand); }
.ok-l li.w > .svg:first-child { color: var(--amber); }
.tweak { display: flex; gap: 8px; padding: 5px 5px 5px 14px; border-radius: var(--r-btn); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); align-items: center; }
.tweak:focus-within { box-shadow: inset 0 0 0 1.5px var(--brand); }
.tweak input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; min-width: 0; }
.fb { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================================================================ документ / document */
.doc-l { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 20px; align-items: start; }
.fld { margin-bottom: 14px; }
.fld label { display: block; font-size: 13.5px; font-weight: 650; color: var(--text-2); margin-bottom: 6px; }
.inp { width: 100%; padding: 10px 13px; border-radius: var(--r-inp); border: 0; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--surface); font-size: 15.5px; font-weight: 500; }
.inp:focus { outline: 0; box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.inp-ok { box-shadow: inset 0 0 0 1.5px var(--brand); background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); }
.fld small { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--brand-ink); font-weight: 600; }
fieldset.party { border: 0; margin: 0 0 14px; padding: 14px; border-radius: var(--r-2); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
fieldset.party legend { font-weight: 700; font-size: 15px; padding: 0; float: left; width: 100%; margin-bottom: 8px; }
fieldset.party details summary { cursor: pointer; font-size: 14px; font-weight: 650; color: var(--brand-ink); margin: 2px 0 8px; }
.item-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.4fr); gap: 0 8px; padding: 12px 12px 4px; border-radius: var(--r-2); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 8px; }
.item-row .w2 { grid-column: 1 / -1; }
.item-row .fld { margin-bottom: 8px; }
.item-row label { font-size: 12.5px; }
.doc-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.paper-w { background: var(--surface-3); border-radius: var(--r-3); padding: 28px; display: flex; justify-content: center; position: sticky; top: 84px; }
.paper { width: 100%; max-width: 620px; aspect-ratio: 1 / 1.3; background: #fff; color: #1b1b1b; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .35); padding: 46px 52px;
  font: 400 12.5px/1.55 "Times New Roman", Georgia, serif; border-radius: 3px; }
.paper h4 { text-align: center; font: 700 15px/1.3 "Times New Roman", Georgia, serif; margin-bottom: 4px; letter-spacing: 0; }
.paper .c { text-align: center; color: #555; margin-bottom: 18px; }
.paper table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 11.5px; }
.paper td, .paper th { border: 1px solid #999; padding: 4px 6px; }
.paper th { background: #f2f2f2; }
.paper mark { background: #fff1b8; padding: 0 2px; border-radius: 2px; }
.paper .sig { display: flex; justify-content: space-between; margin-top: 30px; }
.paper .r { text-align: right; }
.paper .ph { color: #aaa; }
/* счёт: банк получателя, как в файле (фаза 3) / invoice: the payee bank block as in the file */
.paper table.bank { margin: 0 0 16px; }
.paper table.bank td { vertical-align: top; width: 62%; }
.paper table.bank td + td { width: 38%; }
.paper table.bank small { display: block; color: #777; font-size: 10px; }
/* ИНН по названию: варианты из ЕГРЮЛ / INN by name: register candidates */
.inn-pick { display: grid; gap: 6px; margin: 0 0 10px; }
.inn-c { display: grid; gap: 2px; text-align: left; border: 0; padding: 10px 12px; min-height: 44px; border-radius: var(--r-2); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: 14px; }
.inn-c:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }
.inn-c span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
/* «Дальше» на экранах результата (фаза 3) / «next» on result screens */
.next { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.next .row-w .btn { min-height: 44px; }
/* длинные подписи («Товарная накладная ТОРГ-12 по этому счёту») переносятся, а не раздвигают экран на 375 px (18.10)
   long labels wrap instead of widening a 375 px screen */
.next .row-w .btn { max-width: 100%; white-space: normal; text-align: left; height: auto; }
/* реестр документов / the document registry */
/* Н4: у счёта до 5 кнопок — они строкой под названием, иначе название сжимается в букву (найдено на проде 18.10)
   N4: an invoice has up to 5 buttons — they go on a row under the name, otherwise the name collapses */
.hi.doc-r { grid-template-columns: 42px minmax(0, 1fr) auto; }
.hi.doc-r > .row { grid-column: 2 / -1; justify-content: flex-start !important; }
.doc-sum { white-space: nowrap; font-variant-numeric: tabular-nums; }
.paid { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); min-height: 44px; padding: 0 6px; cursor: pointer; }
.paid input { width: 20px; height: 20px; }
.sum3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.sum3 div { padding: 14px 16px; border-radius: var(--r-2); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.sum3 b { font-family: var(--font-h); font-size: 24px; display: block; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
/* Г4: остаток по неделям столбиками, разрыв — красным / G4: weekly balance bars, the gap in red */
.mo-w { display: flex; gap: 4px; align-items: flex-end; height: 74px; margin-top: 6px; }
.mo-w span { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mo-w i { display: block; width: 100%; max-width: 26px; border-radius: 3px 3px 0 0; background: var(--brand); opacity: .55; }
.mo-w i.neg { background: var(--red); opacity: 1; }
.mo-w small { font-size: 11px; color: var(--muted); }
.sum3 span { font-size: 13.5px; color: var(--text-2); font-weight: 600; }

/* ================================================================ ваш файл / your file */
.filecard { display: flex; gap: 14px; align-items: center; padding: 16px 20px; flex-wrap: wrap; }
.filecard > div { flex: 1 1 240px; }
.fileic { width: 46px; height: 54px; border-radius: 8px; background: linear-gradient(160deg, #22a85e, #0c6e39); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 11.5px; position: relative; flex: none; letter-spacing: .02em; }
.fileic::after { content: ""; position: absolute; right: 0; top: 0; border-left: 12px solid rgba(255, 255, 255, .35); border-bottom: 12px solid transparent; border-top-right-radius: 8px; }
.fileic.pdf { background: linear-gradient(160deg, #e35d5d, #b03030); }
.fileic.doc { background: linear-gradient(160deg, #3d7bf0, #1f4fb8); }
.finds { display: grid; gap: 10px; }
.find { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.find .ic { width: 38px; height: 38px; border-radius: var(--r-2); display: grid; place-items: center; }
.find > div > b { display: block; font-size: 16px; }
.find p { font-size: 14px; color: var(--text-2); }
.qa { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qa button { text-align: left; border: 0; padding: 13px; border-radius: var(--r-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: flex; gap: 12px; align-items: center; font-weight: 650; font-size: 14.5px; }
.qa button:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }
.qa button .kind { width: 34px; height: 34px; }
.plan ol { list-style: none; padding: 0; margin: 0; }
.plan li { display: grid; grid-template-columns: 32px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.plan li:last-child { border-bottom: 0; }
/* Ж3: шаги плана галочками, ссылки на изменённые ячейки / Zh3: plan steps with checkboxes, links to changed cells */
.plan li.off { opacity: .55; }
.plan .n input { width: 18px; height: 18px; margin: 0; }
.cell-a { font: inherit; font-family: var(--mono); font-size: 13.5px; background: none; border: 0; padding: 0; color: var(--brand-ink); text-decoration: underline; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.dot-y { font-style: normal; font-size: 9px; color: var(--amber); vertical-align: 2px; }
.plan .n { width: 32px; height: 32px; border-radius: var(--r-1); background: var(--surface-2); display: grid; place-items: center; font-weight: 800; }
.plan p { color: var(--text-2); font-size: 15px; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 10px 12px; border-radius: var(--r-2); background: var(--amber-soft); color: var(--amber); font-size: 14.5px; font-weight: 650; width: max-content; max-width: 100%; }
.check input { width: 18px; height: 18px; accent-color: var(--amber); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.legend i { display: inline-block; width: 13px; height: 13px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }
.risk { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
/* документ Word: риски и правки редакций (Н7) / Word: edition risks and redlines */
.wrisks { display: grid; gap: 8px; margin-top: 14px; }
.wrisk { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-2); font-size: 14.5px; line-height: 1.45; min-width: 0; }
.wrisk > div { min-width: 0; overflow-wrap: anywhere; }
.wrisk .lv { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; border: 1.5px solid currentColor; margin-top: 1px; }
.wrisk small { display: block; font-size: 12.5px; margin-top: 2px; opacity: .85; }
.wr-h { background: var(--red-soft); color: var(--red); }
.wr-m { background: var(--amber-soft); color: var(--amber); }
.wr-ok { background: var(--brand-soft); color: var(--brand-ink); }
.wfinds { display: grid; gap: 8px; margin-top: 12px; }
.wfind { display: flex; justify-content: space-between; align-items: center; gap: 4px 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-2); }
.wfind span { color: var(--muted); font-size: 13.5px; }
.wchs { display: grid; gap: 10px; margin-top: 10px; }
.wch { border: 1px solid var(--line); border-radius: var(--r-2); padding: 10px 12px; min-width: 0; }
.wch-w { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.redl { margin-top: 4px; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.redl del { background: var(--red-soft); color: var(--red); text-decoration: line-through; }
.redl ins { background: var(--brand-soft); color: var(--brand-ink); text-decoration: underline; }
.vers { display: grid; gap: 0; }
.ver { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ver:last-child { border-bottom: 0; }
.ver b { display: block; }
.ver span { font-size: 13.5px; color: var(--muted); }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; margin-top: 16px; padding: 30px 16px; border-radius: var(--r-3);
  border: 2px dashed var(--line-2); background: var(--bg-2); color: var(--text-2); font-size: 14.5px; }
.dropzone .svg { width: 28px; height: 28px; color: var(--brand); }
.dropzone b { font-size: 17px; color: var(--text); }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }

/* ================================================================ страницы / pages */
.page-h { padding: 48px 0 24px; }
.page-h h1 { font-size: 44px; font-weight: 800; letter-spacing: -.045em; }
.page-h p { color: var(--text-2); font-size: 18px; margin-top: 10px; max-width: 760px; }
.page-h.c { text-align: center; }
.page-h.c p { margin-left: auto; margin-right: auto; }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13.5px; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs .svg { width: 13px; height: 13px; }
.search { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: var(--r-btn); background: var(--surface); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); max-width: 720px; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; padding: 8px 0; min-width: 0; }
.lib-l { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; margin-top: 26px; align-items: start; }
.lib-l > *, .acc-l > *, .tpl-l > *, .art-l > * { min-width: 0; }   /* прокручиваемые ряды не распирают сетку / scroll rows never widen the grid */
.cats { position: sticky; top: 84px; display: grid; gap: 2px; }
.cats button { border: 0; background: transparent; text-align: left; padding: 7px 10px; border-radius: var(--r-1); font-size: 14.5px; font-weight: 550; color: var(--text-2); display: flex; justify-content: space-between; }
.cats button:hover { background: var(--surface-2); color: var(--text); }
.cats button.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; }
.cats button small { color: var(--muted); font-weight: 600; }
.seg { display: inline-flex; padding: 3px; border-radius: calc(var(--r-btn) + 3px); background: var(--surface-2); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: var(--r-btn); font-size: 14px; font-weight: 600; color: var(--text-2); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.lib { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.tpl { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.tpl h3 { font-size: 16.5px; }
.tpl h3 a { text-decoration: none; }
.tpl h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tpl p { font-size: 13.5px; color: var(--text-2); }
.tpl-f { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.tpl-f .btn { flex: 1; }
.hist-d { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 24px 0 10px; text-transform: uppercase; letter-spacing: .07em; }
.hi { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.hi:last-child { border-bottom: 0; }
.hi b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hi span { font-size: 13.5px; color: var(--muted); }
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 10px; }
.price { padding: 28px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.price.hot { box-shadow: var(--shadow-3), inset 0 0 0 2px var(--brand); }
.price h3 { font-size: 18px; }
.price .pv { font-family: var(--font-h); font-size: 44px; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.price .pv small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.price ul { list-style: none; padding: 0; margin: 0; }
.price li { display: flex; gap: 10px; margin: 9px 0; font-size: 15px; color: var(--text-2); }
.price li .svg { color: var(--brand); margin-top: 4px; }
.price .btn { margin-top: auto; }
.hot-l { position: absolute; top: -11px; left: 24px; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pack { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; }
.pack b { font-family: var(--font-h); font-size: 20px; }
.gloss { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px; }
.gl { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 14px; }
.gl b { font-size: 15.5px; }
.gl p { color: var(--text-2); font-size: 14.5px; }
.faq { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.faq:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--text-2); margin-top: 8px; }
.helps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.help-c { padding: 20px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.help-c:hover { box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-2); }
.help-c h3 { font-size: 17px; }
.help-c p { font-size: 14.5px; color: var(--text-2); }

/* страница образца / template page */
.tpl-l { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; margin-top: 8px; }
.tpl-l .sheet-w { box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
.inside { display: grid; gap: 12px; }
.inside > div { display: flex; gap: 12px; align-items: flex-start; }
.inside b { display: block; font-size: 15px; }
.inside span { font-size: 14px; color: var(--text-2); }

/* вход / sign in */
.auth { max-width: 440px; margin: 56px auto 0; }
.auth .card { padding: 32px; }
.auth h1 { font-size: 30px; letter-spacing: -.04em; text-align: center; }
.auth .sub { text-align: center; color: var(--text-2); margin-top: 8px; font-size: 15.5px; }
.code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 18px; }
.code input { text-align: center; font: 700 24px/1 var(--mono); padding: 12px 0; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 13.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.idp { display: grid; gap: 8px; }
.idp .btn { justify-content: flex-start; }
.idp .lg { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; }

/* кабинет / account */
.acc-l { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 8px; }
.acc-nav { display: grid; gap: 2px; position: sticky; top: 84px; }
.acc-nav a { padding: 8px 12px; border-radius: var(--r-1); text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 14.5px; display: flex; gap: 10px; align-items: center; }
.acc-nav a.on, .acc-nav a:hover { background: var(--surface-2); color: var(--text); }
.usage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.usage > div { padding: 16px; border-radius: var(--r-2); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.usage b { font-family: var(--font-h); font-size: 26px; letter-spacing: -.03em; }
.usage span { display: block; font-size: 13.5px; color: var(--text-2); margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 10px 16px; font-size: 15px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; }

/* статья (SEO) / article (SEO) */
.art-l { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; }
.art { max-width: 760px; }
.art h1 { font-size: 42px; letter-spacing: -.045em; margin-top: 14px; }
.art .lead { font-size: 19px; color: var(--text-2); margin-top: 14px; }
.art h2 { font-size: 26px; margin: 44px 0 12px; letter-spacing: -.03em; }
.art p, .art li { font-size: 16.5px; color: var(--text-2); line-height: 1.7; }
.art p + p { margin-top: 12px; }
.art code { font-family: var(--mono); font-size: .9em; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--text); }
.short { margin-top: 22px; padding: 18px 20px; border-radius: var(--r-3); background: var(--brand-soft); color: var(--brand-ink); }
.short b { color: inherit; }
.args { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.args td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.args td:first-child { font-family: var(--mono); font-weight: 700; color: var(--text); white-space: nowrap; width: 1%; }
.ebox { margin-top: 20px; padding: 18px; border-radius: var(--r-3); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.ebox .box { margin: 12px 0 0; max-width: none; box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
.ebox .box textarea { min-height: 70px; font-size: 17px; }
.toc { position: sticky; top: 84px; font-size: 14px; }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); color: var(--text-2); text-decoration: none; }
.toc a:hover, .toc a.on { border-color: var(--brand); color: var(--text); }
.rel { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* 404 */
.nf { text-align: center; padding: 72px 0 0; }
.nf .big { font-family: var(--font-h); font-size: 120px; font-weight: 800; letter-spacing: -.06em; line-height: 1; color: var(--surface-3); }

/* ================================================================ окно поверх / modal */
.modal-bg { position: fixed; inset: 0; background: rgba(9, 9, 11, .45); backdrop-filter: blur(3px); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
/* высокое окно (оплата, «каждый месяц» на телефоне) прокручивается целиком: «center» в сетке срезал бы верх и низ
   a tall dialog scrolls as a whole: grid «center» would clip its top and bottom */
.modal-bg { overflow-y: auto; overscroll-behavior: contain; }
.modal-bg > .modal { margin: auto 0; }
.modal { width: 100%; max-width: 620px; background: var(--surface); border-radius: var(--r-4); box-shadow: var(--shadow-3), inset 0 0 0 1px var(--line); padding: 28px; animation: pop .18s; }
.modal h2 { font-size: 26px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.opt { text-align: left; border: 0; padding: 12px; border-radius: var(--r-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); display: flex; gap: 12px; align-items: center; font-weight: 650; font-size: 15px; }
.opt:hover { box-shadow: inset 0 0 0 1px var(--text-2); }
.opt.on { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.opt small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.opt .kind { width: 36px; height: 36px; }

/* ================================================================ вошедшим: боковая панель с недавними задачами (из «Офиса»)
   signed-in users: a sidebar with recent tasks (from the "Office" variant), wide screens only */
@media (min-width: 1280px) {
  .signed .shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  .signed .side { display: block; background: var(--bg-2); border-right: 1px solid var(--line); }
  .signed .top .logo { display: none; }
  .signed .crumb-top { display: flex; }
}
.crumb-top { display: none; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.crumb-top b { color: var(--text); font-weight: 650; }

/* коллаж результатов вокруг окна (из «Тёплого») — только на широком экране / result collage around the box, wide screens */
@media (min-width: 1360px) {
  .deco { display: block; position: absolute; z-index: 1; width: 214px; padding: 11px 13px; border-radius: var(--r-3); background: var(--surface);
    box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); font-size: 12.5px; font-weight: 650; text-align: left; animation: float 7s ease-in-out infinite; }
  .deco.d1 { left: calc(50% - 680px); top: 250px; transform: rotate(-3deg); }
  .deco.d2 { right: calc(50% - 670px); top: 232px; transform: rotate(2deg); animation-delay: -2s; }
  .deco.d3 { right: calc(50% - 680px); top: 452px; transform: rotate(-2deg); animation-delay: -4s; }
  .deco.d4 { left: calc(50% - 690px); top: 482px; transform: rotate(2deg); animation-delay: -3s; }
}
/* у вошедшего боковая панель съедает 248 px — коллажу нужна колонка ≥ 1360 px, иначе он вылезает за экран
   (нашла самопроверка test_v2_layout) / with the sidebar the collage needs a ≥ 1360 px column or it overflows */
@media (max-width: 1607px) { .signed .deco { display: none; } }
@keyframes float { 50% { translate: 0 -6px; } }
.deco .mp-fx { width: 100%; }
.deco .row { margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .deco, .bar.shine i { animation: none; } * { scroll-behavior: auto !important; } }

/* ================================================================ адаптив / responsive */
@media (max-width: 1100px) {
  .outs, .tstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2, .doc-l, .tpl-l, .art-l { grid-template-columns: 1fr; }
  .lib-l, .acc-l { grid-template-columns: 1fr; }
  .cats { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .cats button { padding: 6px 12px; border-radius: var(--r-chip); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; }
  .cats button small { display: none; }
  .acc-nav { position: static; display: flex; flex-wrap: wrap; }
  .toc { display: none; }
  /* планшет 721–1100 px: меню остаётся, только плотнее; подпись лимита — точками (раньше меню пропадало, аудит 08.10)
     tablet 721–1100 px: the menu stays, just tighter; the quota shows as dots (the menu used to vanish) */
  .top-in { gap: 14px; padding: 0 20px; }
  .nav a { padding: 7px 8px; font-size: 14.5px; }
  .quota .lbl { display: none; }
  .paper-w { position: static; }
  .foot-cols { grid-template-columns: repeat(3, 1fr); }
  .foot-about { grid-column: 1 / -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 720px) {
  body { font-size: 15.5px; padding-bottom: 76px; }
  :root { --hero-h1: 34px; }
  .top-in { padding: 0 16px; gap: 10px; height: 56px; }
  .nav { display: none; }   /* на телефоне — нижнее меню / phones use the bottom bar */
  .wrap, .wrap-n { padding: 0 16px; }
  .quota .lbl, .top-right .hide-m { display: none; }
  .hero { padding: 28px 0 8px; }
  .hero-sub .long { display: none; }
  .hero-badge { font-size: 12px; margin-bottom: 16px; }
  .hero-badge .long { display: none; }
  .hero-badge .dt { display: none; }   /* на телефоне — значок и одна фраза, без переносов / phones: icon and one phrase */
  .cats { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  .cats button { flex: none; }
  .hero-sub { font-size: 16px; margin-top: 12px; }
  .box { margin-top: 22px; padding: 6px; }
  .box textarea { font-size: 17px; min-height: 96px; padding: 12px 12px 4px; }
  .box-hint, .box-bar .btn-ghost .lbl { display: none; }
  .profile-pill span { display: none; }
  .tries { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: 14px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
  .starts { grid-template-columns: minmax(0, 1fr); }
  .due-i { flex-wrap: wrap; }
  .due-t { flex: 1 1 100%; }
  .tries-l { display: none; }
  .tries .chip { flex: none; }
  .trust { justify-content: flex-start; gap: 6px 14px; font-size: 13px; }
  .quick button { padding: 12px; }
  .how, .outs, .vs, .lib, .prices, .packs, .gloss, .steps3, .qa, .sum3, .opts, .tstrip, .helps, .usage { grid-template-columns: 1fr; }
  .tstrip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tcard p { display: none; }
  .sec { margin-top: 64px; }
  .sec-h { margin-bottom: 22px; }
  .sec-h h2 { font-size: 27px; }
  .sec-h p { font-size: 16px; }
  .how-i { padding: 18px; display: grid; grid-template-columns: 32px 1fr; gap: 0 14px; }
  .how-i .how-n { grid-row: span 2; margin: 0; }
  .stat { padding: 18px 16px; }
  .stat b { font-size: 28px; }
  .cta { padding: 26px 22px; margin-top: 64px; }
  .cta h2 { font-size: 24px; }
  .cta .btn { margin-left: 0; }
  .card-p, .und { padding: 18px; }
  .ass-r { grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 14px; }
  .ass-r .l { grid-column: 1 / -1; font-size: 13px; }
  .und-h h2, .res-h h2 { font-size: 21px; }
  .res-h { flex-wrap: wrap; }
  .res-h > .kind, .und-h > .kind { display: none; }
  .res-h > div { flex: 1 1 100% !important; }   /* перебивает встроенный flex:1 — заголовок не сжимается в столбик / beats inline flex:1 */
  .fbox { font-size: 15px; padding: 16px; }
  .ptabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .ptabs button { flex: none; }
  .ask-b { font-size: 15px; }
  .ans-av, .me { display: none; }
  .flow { padding-top: 20px; }
  .page-h { padding: 22px 0 14px; }
  .page-h p { font-size: 16px; }
  .hi { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 12px 14px; gap: 12px; }
  .hi .hide-m { display: none; }
  .hi.doc-r { grid-template-columns: 38px minmax(0, 1fr) auto; }
  /* цели касания не меньше 44 px на телефоне (фаза 3) / touch targets of at least 44 px on phones */
  .btn, .btn-sm, .btn-xs, .chip, .seg button, .ptabs button, .fbox-sw button, .acts .btn, .act .btn { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .hi.doc-r > .row { grid-column: 1 / -1; justify-content: flex-start !important; }
  .paper { padding: 24px 22px; font-size: 10.5px; aspect-ratio: auto; }
  /* таблицы листа не шире листа: в Linux Chromium (как на Android) строки счёта давали +2–4 px (фаза 5, 16.10)
     sheet tables never wider than the sheet: Linux Chromium (Android-like fonts) overflowed by 2–4 px */
  .paper table { table-layout: fixed; }
  .paper table:not(.bank) th:first-child { width: 8%; }
  .paper table:not(.bank) th:nth-child(2) { width: 34%; }
  .paper td, .paper th { padding: 3px 3px; overflow-wrap: anywhere; word-break: break-word; }
  .paper-w { padding: 14px; }
  .find { grid-template-columns: 36px 1fr; }
  .find > .badge:not(.ic), .find .btn { grid-column: 2; justify-self: start; }   /* значок-кружок (.ic) — в первом столбце / the round icon stays in column 1 */
  .plan li { grid-template-columns: 32px minmax(0, 1fr); }
  .plan li > .badge { grid-column: 2; justify-self: start; }
  .ver { grid-template-columns: 36px minmax(0, 1fr); }
  .ver .btn { grid-column: 2; justify-self: start; }
  .gl { grid-template-columns: 1fr; gap: 2px; }
  .item-row { grid-template-columns: 1fr 1fr; }
  .item-row .w2 { grid-column: 1 / -1; }
  .badge { white-space: normal; }
  .foot { margin-top: 56px; }
  .foot-in { padding: 28px 16px 24px; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
  .auth { margin-top: 24px; }
  .auth .card { padding: 22px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .art h1 { font-size: 30px; }
  .art h2 { font-size: 22px; margin-top: 32px; }
  .art p, .art li { font-size: 16px; }
  .nf .big { font-size: 84px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface);
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; font-size: 11px; font-weight: 650; color: var(--muted); padding: 5px 0; border-radius: 10px; }
  .tabbar a .svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--brand); }
  .tabbar a.make { color: var(--text); }
  .tabbar a.make span.pl { width: 46px; height: 28px; border-radius: 99px; background: var(--cta); color: var(--on-cta); display: grid; place-items: center; }
  .tabbar a.make span.pl .svg { width: 18px; height: 18px; }
  .modal { padding: 20px; }
  .modal-bg { place-items: start center; padding: 12px 12px 96px; }
  .toast { bottom: 86px; }
  .upd { bottom: 82px; left: 16px; right: 16px; transform: none; width: auto; max-width: none; }
  .upd-t { flex: 1 1 100%; max-width: none; }
  .upd-top { white-space: normal; }
  .sheet { font-size: 12.5px; }
}

/* ================================================================ рабочая версия: вставка таблицы, недавние, фокус, вход
   live version: pasted table, recent tasks, focus ring, sign-in */
.box-table { margin: 6px 10px 0; padding: 10px 12px; border-radius: var(--r-2); background: var(--teal-soft); }
.box-table .sheet { font-size: 12.5px; }
.box-table .sheet th, .box-table .sheet td { height: 26px; padding: 3px 8px; }
.tries.recent { margin-top: 10px; }
.tries.recent .chip { font-size: 14px; padding: 7px 12px; }
.box-hint .kbd { font-size: 11px; padding: 0 5px; }
/* видимая рамка фокуса с клавиатуры / visible keyboard focus ring */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
h2[tabindex="-1"]:focus { outline: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); margin: 10px 0 0; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.consent a { color: var(--text); }
.btn[disabled], button[disabled] { opacity: .55; cursor: default; }

/* ================================================================ фаза 2 «Проще»: одна карточка результата, меню-пилюли, поиск «/»
   phase 2 «Simpler»: one result card, pill menus, «/» search (макет / mockup: docs/audit/src/app/app.css) */
.menu-wrap { position: relative; display: inline-flex; }
.pop { position: absolute; z-index: 45; top: calc(100% + 6px); text-align: left; background: var(--surface); border-radius: var(--r-3);
  box-shadow: var(--shadow-3), inset 0 0 0 1px var(--line); padding: 6px; width: 300px; max-width: calc(100vw - 32px); animation: pop .14s; }
.pop-r { right: 0; } .pop-l { left: 0; }
.pop.pop-up { top: auto; bottom: calc(100% + 6px); }
.pop-h { font-size: 12.5px; color: var(--muted); padding: 6px 10px 8px; line-height: 1.45; white-space: normal; }
.pop .pi { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px;
  text-align: left; font-size: 14.5px; font-weight: 600; color: var(--text); text-decoration: none; white-space: normal; cursor: pointer; }
.pop .pi:hover { background: var(--surface-2); }
.pop .pi small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.pop .pi.on { background: var(--brand-soft); color: var(--brand-ink); }
.pop-list { list-style: none; margin: 0; padding: 4px 6px 6px; display: grid; gap: 7px; font-size: 14px; color: var(--text-2); font-weight: 500; white-space: normal; }
.pop-list li { display: flex; gap: 8px; align-items: flex-start; }
.pop-list li .svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--brand); }
.pop-list li.w .svg { color: var(--amber); }
button.quota { cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; border: 0; }
button.quota:hover { color: var(--text); }
.badge[data-act="pop"] { border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 650; }
.profile-pill { border: 0; cursor: pointer; font-family: inherit; }
.profile-pill .svg:last-child { width: 14px; height: 14px; opacity: .7; }
.search-btn { display: flex; align-items: center; gap: 8px; border: 0; padding: 6px 8px 6px 12px; border-radius: 9px; background: var(--surface-2);
  color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.search-btn:hover { color: var(--text); }
.search-btn .svg { width: 16px; height: 16px; }

.res1 { max-width: 860px; margin: 0 auto; }
.res-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.res h2 { margin-top: 14px; font-size: 22px; }
.fbox.fbox-s { padding-right: 96px; }
.fbox-sw { position: absolute; top: 12px; right: 12px; display: inline-flex; background: rgba(255, 255, 255, .08); border-radius: 8px; padding: 2px; }
.fbox-sw button { border: 0; background: transparent; color: #b4b4bd; font: 700 12px var(--font); padding: 4px 9px; border-radius: 6px; cursor: pointer; }
.fbox-sw button.on { background: #f4f4f5; color: #09090b; }
/* «Понял так» и отказ рецепта под заголовком результата (15.10) / «understood as» and the recipe refusal */
.und-l { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.und-l b { color: var(--text); font-weight: 650; margin-right: 2px; }
.und-l span { background: var(--surface-2, #f3f4f6); border-radius: 8px; padding: 1px 8px; overflow-wrap: anywhere; }
.und-l i { font-style: normal; color: var(--muted); font-family: var(--mono, ui-monospace, monospace); font-size: 13px; }
.und-miss { margin-top: 8px; font-size: 14px; color: var(--text-2); display: flex; gap: 6px; align-items: flex-start; }
.und-miss svg { flex: none; margin-top: 2px; }
.answer { display: flex; align-items: baseline; gap: 6px 10px; flex-wrap: wrap; margin-top: 14px; font-size: 15px; color: var(--text-2); }
.answer b { font-size: 26px; color: var(--text); letter-spacing: -.02em; }
.answer span { font-size: 13.5px; color: var(--muted); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.seg-w { display: flex; width: 100%; margin-top: 18px; }
.seg-w button { flex: 1 1 0; white-space: nowrap; }
.seg-w { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-w::-webkit-scrollbar { display: none; }
.tabp { padding: 16px 2px 4px; }
.how3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: s; }
.how3 li { background: var(--surface-2); border-radius: var(--r-2); padding: 12px 14px; font-size: 14px; color: var(--text-2); counter-increment: s; }
.how3 li::before { content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 800; font-size: 12px; margin-bottom: 6px; color: var(--text); }
.how3 b { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 2px; }
.res .tweak { margin-top: 14px; }
.fb-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--text-2); flex-wrap: wrap; }
.plan-strip { display: flex; gap: 10px 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-3); background: var(--surface-2); flex-wrap: wrap; }
.stages { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.stg { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: var(--r-chip); background: var(--surface-2); font-size: 14px; font-weight: 600; }
.stg b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-size: 11.5px; }
.kit { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.kit li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--text-2); }
.kit li .svg { flex: none; margin-top: 2px; color: var(--brand); }
.kit li > span { min-width: 0; overflow-wrap: anywhere; }
.kit li .mono { white-space: normal; }
.find:has(> .fixbox) { grid-template-columns: 22px 38px 1fr auto; }
.fixbox { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; cursor: pointer; }
/* Н3: шаг очистки — галочка без значка; спорная строка разметки — текст и выбор категории
   N3: a cleaning step is a checkbox without an icon; a doubtful label row is text plus a category pick */
.find.n3, .find.n3:has(> .fixbox) { grid-template-columns: 22px minmax(0, 1fr) auto; }
.find.n3l { grid-template-columns: minmax(0, 1fr) auto; }
.n3g { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 14px; color: var(--text); }
.n3g > span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .find.n3, .find.n3:has(> .fixbox) { grid-template-columns: 22px minmax(0, 1fr); }
  .find.n3 > .badge, .find.n3:has(> .fixbox) > .badge:last-child { grid-column: 2; justify-self: start; }
  .find.n3l { grid-template-columns: minmax(0, 1fr); }
  .find.n3l select { max-width: 100% !important; width: 100%; }
}
.badge-ell { max-width: 100%; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.two .opt small { display: block; }
@media (max-width: 720px) { .two { grid-template-columns: minmax(0, 1fr); } }
.req-line { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r-2); background: var(--surface-2);
  font-size: 14.5px; margin-bottom: 14px; }
.req-line b { overflow-wrap: anywhere; }
.plan-strip > .svg { color: var(--brand); flex: none; }
.plan-strip > div { flex: 1 1 220px; min-width: 0; }

.pal { place-items: start center; padding: 96px 16px 16px; z-index: 60; }
.pal-b { width: 100%; max-width: 640px; background: var(--surface); border-radius: var(--r-4); box-shadow: var(--shadow-3), inset 0 0 0 1px var(--line); overflow: hidden; animation: pop .14s; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.pal-in > .svg { color: var(--muted); }
.pal-in input { flex: 1; border: 0; background: transparent; font-size: 17px; min-width: 0; color: var(--text); font-family: inherit; }
.pal-in input:focus { outline: none; }
#palRes { max-height: min(60vh, 520px); overflow-y: auto; }
.pal-g { padding: 6px 8px; }
.pal-g h5 { margin: 6px 10px 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.pal-i { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 9px 10px; border-radius: 9px; text-align: left;
  font-size: 14.5px; font-weight: 600; color: var(--text); cursor: pointer; font-family: inherit; }
.pal-i > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-i > .svg { flex: none; color: var(--muted); }
.pal-i:hover, .pal-i.on { background: var(--surface-2); }
.pal-i small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
.pal-f { display: flex; gap: 14px; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }

@media (min-width: 1280px) { .signed .top .nav { display: none; } }   /* у вошедшего меню — в боковой панели / the sidebar holds the menu */
@media (max-width: 1100px) { .search-btn .lbl { display: none; } }
@media (max-width: 720px) {
  .search-btn { display: none; }                 /* на телефоне «Найти» — в нижнем меню / phones: «Find» in the bottom bar */
  .res h2 { font-size: 19px; margin-top: 10px; }
  .fbox.fbox-s { padding: 44px 14px 14px; }
  .answer b { font-size: 22px; }
  .how3 { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .how3 li { padding: 10px 12px; }
  .acts .btn { flex: 1 1 auto; }
  .acts .hide-s { display: none; }
  .seg-w button { padding: 7px 6px; font-size: 13.5px; }
  .pal { padding: 0; place-items: stretch; }
  .pal-b { border-radius: 0; max-width: none; min-height: 100%; }
  #palRes { max-height: none; }
  .pal-f .hide-m { display: none; }
  .lib .thumb { display: none; }                      /* каталог на телефоне — без миниатюр, короче вдвое / no thumbs on phones */
  .lib { gap: 10px; }
  .find:has(> .fixbox) { grid-template-columns: 22px 36px 1fr; }
  .find:has(> .fixbox) > .badge:last-child { grid-column: 3; justify-self: start; }
  .res-top .profile-pill span { display: inline; }   /* в карточке место есть / the card has room for the label */
  /* меню на телефоне — лист над нижним меню, чтобы не уходить за край / phone menus are sheets above the bottom bar */
  .pop, .pop.pop-up { position: fixed; left: 8px; right: 8px; top: auto; bottom: 76px; width: auto; max-width: none; max-height: calc(100vh - 150px);
    overflow-y: auto; box-shadow: 0 -8px 40px rgba(9, 9, 11, .25), inset 0 0 0 1px var(--line); z-index: 55; }
}

/* фаза 2 плана 15.10: главная — программа строкой, примеры по ролям, кто стоит за сервисом, цели шапки ≥ 44 px
   phase 2: the program on its own line, role examples, who runs the service, header targets ≥ 44 px */
.where { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 12px auto 0; font-size: 14px; color: var(--text-2); font-weight: 550; }
.where .profile-pill { min-height: 44px; }
.where .profile-pill span { display: inline; }
.where .pop { left: 50%; right: auto; transform: translateX(-50%); }
.tries .chip .role { font-weight: 700; color: var(--text); margin-right: 2px; }
.trust .seller { color: var(--text); flex-basis: 100%; justify-content: center; align-items: flex-start; }
.trust .seller > span { display: inline; }
.trust a { color: var(--text-2); }
.box-tip { max-width: 820px; margin: 10px auto 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.box-tip .svg { width: 15px; height: 15px; vertical-align: -3px; margin: 0 3px 0 0; color: var(--brand); }
.quota .lbl-s { display: none; }
.top .logo, .top .nav a, .top .quota, .top .btn-sm, .top .search-btn { min-height: 44px; }
.top .nav a { display: inline-flex; align-items: center; }
.top .icon-btn { width: 44px; height: 44px; }
.top .avatar { width: 44px; height: 44px; font-size: 15px; }
.top .btn-sm { min-width: 44px; justify-content: center; }
@media (max-width: 720px) {
  .quota .lbl-s { display: inline; }
  .quota-dots { display: none; }
  .top .btn-sm { padding: 7px 11px; }
  .trust .seller { justify-content: flex-start; }
  /* три примера по ролям — столбиком, без прокрутки вбок / role examples stacked, no sideways scroll */
  .tries.roles { flex-direction: column; flex-wrap: nowrap; overflow: visible; margin: 14px 0 0; padding: 0; }
  .tries.roles .chip { white-space: normal; text-align: left; justify-content: flex-start; min-height: 44px; }
  .where { justify-content: flex-start; }
  .where .pop { transform: none; }
}


/* MOffice: реклама и лицензия в подписке (moffice.py) / MOffice promo and licence */
.mo-promo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: center; padding: 28px; overflow: hidden;
  background: linear-gradient(110deg, color-mix(in srgb, #153852 9%, transparent), transparent 55%), var(--surface); }
.mo-promo-p { max-width: 1040px; margin: 48px auto 0; }
.mo-promo .mo-txt { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mo-promo h2 { font-size: 28px; letter-spacing: -.035em; line-height: 1.15; }
.mo-promo p { color: var(--text-2); font-size: 16px; }
.mo-promo ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; font-size: 15px; }
.mo-promo li { display: flex; gap: 8px; align-items: flex-start; }
.mo-promo li .svg { color: var(--brand); margin-top: 3px; flex: none; }
.mo-pic { display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 22px 50px -24px rgba(9, 9, 11, .45), inset 0 0 0 1px var(--line); }
.mo-pic img { display: block; width: 100%; height: auto; }
.btn-mo { background: #153852; color: #fff; }
.btn-mo:hover { background: #0f2a3e; color: #fff; }
.mo-hint { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); margin-top: 10px; }
.mo-hint .svg { margin-top: 2px; flex: none; }
.mo-hint a { font-weight: 700; }
:root[data-theme="dark"] .btn-mo { background: #8cc1ea; color: #07131c; }
:root[data-theme="dark"] .btn-mo:hover { background: #b4d8f3; color: #07131c; }
@media (max-width: 720px) { .mo-promo { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 18px; } .mo-promo h2 { font-size: 23px; } .mo-pic { order: -1; } }

/* Ш1 «Каталог под спрос»: роли на главной и в каталоге, подборка «чаще всего ищут», спрос на карточке
   Sh1: audience switch on the home page and in the catalog, the "most searched" strip, demand on cards */
.home-roles { display: flex; flex-wrap: wrap; justify-content: center; width: max-content; max-width: 100%; margin: 0 auto 12px; }   /* Л1: 7 ролей — переносом, без прокрутки / 7 roles wrap */
.home-roles button { white-space: nowrap; }
.lib-roles { margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.lib-roles button { white-space: nowrap; }
.dem { margin-left: auto; font-size: 12.5px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pick { padding: 16px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.pick:hover { box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-2); transform: translateY(-2px); }
.pick h3 { font-size: 17px; }
.pick p { font-size: 14px; color: var(--text-2); }
@media (max-width: 900px) { .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .picks { grid-template-columns: minmax(0, 1fr); } }
.lib-types { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.lib-types button { white-space: nowrap; }
.tpl > .row { flex-wrap: wrap; row-gap: 4px; }
.tpl .dem { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.thumb-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-radius: var(--r-1); box-shadow: inset 0 0 0 1px var(--line); background: #fff; }

/* версии «Моего файла»: Скачать · MOffice · Вернуть; на телефоне кнопки — второй строкой (И2)
   «My file» versions: Download · MOffice · Restore; on a phone the buttons wrap to a second row */
.hi.hi-ver { grid-template-columns: 44px minmax(0, 1fr) auto auto auto; }
@media (max-width: 720px) {
  .hi.hi-ver { grid-template-columns: 38px repeat(3, auto); justify-content: start; }
  .hi.hi-ver > div { grid-column: 2 / -1; }
  .hi.hi-ver > .btn, .hi.hi-ver > span:last-child { grid-row: 2; }
  .hi.hi-ver > .btn:first-of-type { grid-column: 2; }
}
/* черновик формулы в карточке работы (Н1, 18.10): жёлтая рамка, пока идёт пересчёт / the formula draft while the recalc runs */
.draft { margin-top: 16px; padding: 14px; border: 1px dashed var(--amber-line); border-radius: 12px; background: var(--amber-soft); }
.draft .fbox { overflow-x: auto; }
/* готовые инструменты в окне (Н1): калькуляторы, учёба, практикум, комплекты / ready-made tools in the box */
.tk-form { margin-top: 16px; }
.tk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.tf { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; font-weight: 600; min-width: 0; }
.tf .inp { font-weight: 400; }
.tf-c { flex-direction: row; align-items: center; gap: 8px; grid-column: 1 / -1; }
.tf-h { font-weight: 400; font-size: 13px; }
.tf:has(table), .tf:has(textarea) { grid-column: 1 / -1; }
.tk-rows { border-collapse: collapse; width: 100%; }
.tk-rows th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted, #71717a); padding: 0 6px 4px 0; }
.tk-rows td { padding: 0 6px 6px 0; min-width: 110px; }
/* таблица ответа калькулятора (график отпусков и др.) / the calculator answer table */
.tk-tab { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.tk-tab th, .tk-tab td { border-bottom: 1px solid var(--line); padding: 6px 10px 6px 0; text-align: left; white-space: nowrap; }
.tk-tab th { font-size: 12.5px; font-weight: 600; color: var(--muted, #71717a); }
.tk-party { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; }
.tk-res { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.tk-steps { margin: 8px 0 0 18px; display: grid; gap: 6px; font-size: 15px; }
.tk-list { display: grid; gap: 10px; margin-top: 14px; }
.tk-item { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: transparent; font: inherit; color: inherit; }
button.tk-item { cursor: pointer; }
button.tk-item:hover { border-color: var(--line-2); }
@media (max-width: 640px) { .tk-grid, .tk-party { grid-template-columns: minmax(0, 1fr); } }

/* Н4 «Бухгалтеру»: сверка, QR счёта, вставка позиций, действия реестра / N4: reconciliation, invoice QR, pasted items, registry */
.sheet td.st-dif { color: var(--amber); font-weight: 600; }
.sheet td.st-miss { color: var(--red); font-weight: 600; }
.sheet td.st-late { color: var(--blue); }
.sheet td.st-dif, .sheet td.st-miss, .sheet td.st-late, .sheet td.wrap { white-space: normal; min-width: 240px; height: auto; }
.qr-pv { display: flex; gap: 12px; align-items: center; margin: 12px 0 4px; font-size: 11px; color: #555; }
.qr-pv img { width: 96px; height: 96px; image-rendering: pixelated; flex: none; background: #fff; }
.qr-no { font-size: 11px; color: #8a5a00; margin: 10px 0 0; }
.paste-b { margin-top: 10px; }
.paste-b textarea { font-size: 14px; }
.reg-x { grid-column: 1 / -1; padding: 4px 16px 16px 58px; }
@media (max-width: 640px) { .reg-x { padding: 4px 12px 14px; } }

/* ================================================================ поля на телефоне / fields on phones
   Safari на iPhone увеличивает страницу при фокусе на поле со шрифтом меньше 16 px (front 8): до 720 px — не меньше 16 px.
   iOS Safari zooms in on focus when a field's font is under 16 px: at 720 px and below every text field is 16 px. */
@media (max-width: 720px) {
  input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color]), textarea, select { font-size: 16px !important; }
}

/* Н5: дашборд, прогноз, отчёт — показатели, предпросмотр диаграмм (SVG), форма допущений
   N5: KPIs, chart previews (SVG) and the assumptions form */
.n5kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.n5kpi div { padding: 12px 14px; border-radius: var(--r-2); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.n5kpi span { display: block; font-size: 13px; color: var(--text-2); font-weight: 600; overflow-wrap: anywhere; }
.n5kpi b { display: block; font-family: var(--font-h); font-size: 22px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.n5grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.n5grid > .card:first-child { grid-column: 1 / -1; }
.n5svg { width: 100%; height: auto; max-height: 300px; display: block; margin-top: 6px; }
.n5svg text { fill: var(--text-2); font-size: 11px; font-family: var(--font); }
.n5leg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text-2); margin-top: 4px; }
.n5leg i, .n5pie i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.n5bars { display: grid; gap: 6px; margin-top: 8px; }
.n5bars div { display: grid; grid-template-columns: minmax(70px, 34%) 1fr auto; align-items: center; gap: 8px; font-size: 13.5px; }
.n5bars span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.n5bars b { height: 14px; border-radius: 4px; background: var(--brand); display: block; }
.n5bars em { font-style: normal; font-variant-numeric: tabular-nums; font-weight: 600; }
.n5pie { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.n5pie ul { list-style: none; display: grid; gap: 4px; font-size: 13.5px; min-width: 0; }
.n5pie li b { font-variant-numeric: tabular-nums; }
.n5form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.n5form label span { display: block; font-size: 13px; color: var(--text-2); font-weight: 600; margin-bottom: 3px; }
.n5form .inp { width: 100%; }
.paper.n5rep { aspect-ratio: auto; padding: 28px 30px; max-width: none; font: 14px/1.5 Arial, sans-serif; }
.paper.n5rep h3 { font-size: 18px; margin-bottom: 10px; }
.paper.n5rep p { margin-bottom: 8px; }
.paper .n5svg text { fill: #555; }
.paper .n5leg { color: #555; }
.paper .sec-t { color: #1b1b1b; }
@media (max-width: 720px) {
  .n5grid, .n5form { grid-template-columns: 1fr; }
  .paper.n5rep { padding: 18px; }
}

/* ================================================================ Л1 (19.10): дела, избранное / deeds, favourites */
.deeds { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0 4px; font-size: 14px; }
.deeds .chip { padding: 6px 12px; font-size: 14px; }
.deed-w { display: grid; gap: 12px; margin: 14px 0 6px; }
.card.deed { padding: 16px 18px; box-shadow: inset 0 0 0 2px var(--violet, #6d32d9), var(--shadow-1); }
.card.deed h3 { margin-top: 8px; font-size: 18px; }
.card.deed p { color: var(--text-2); margin-top: 4px; }
.deed-l { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.deed-l a { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; text-decoration: none; color: var(--text); flex-wrap: wrap; }
.deed-l a:hover { color: var(--brand-ink); }
.card.tpl { position: relative; }
.fav { position: absolute; top: 8px; right: 8px; z-index: 1; border: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface, #fff); color: var(--muted); box-shadow: var(--shadow-1); cursor: pointer; }
.fav .svg { width: 18px; height: 18px; }
.fav.on { color: #d99a00; }
.fav.on .svg { fill: currentColor; }

/* ================================================================ «Мои дела» (трек «Дл», 24.10) / «My cases» */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.dl-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; cursor: pointer; min-width: 0; }
.dl-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.dl-card h3 { font-size: 16px; margin: 0; overflow-wrap: anywhere; }
.dl-card .kind { flex: none; }
.dl-new { cursor: default; border-style: dashed; }
.dl-new:hover { box-shadow: none; }
.dl-next { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-2); padding: 8px 10px; font-size: 14px; overflow-wrap: anywhere; }
.dl-due-i { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.dl-due-i > span { flex: 1; }
.dl-two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; margin-top: 20px; align-items: start; }
.dl-tl { border-left: 2px solid var(--line); padding-left: 16px; display: flex; flex-direction: column; gap: 14px; }
.dl-v { position: relative; min-width: 0; overflow-wrap: anywhere; }
.dl-v::before { content: ""; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); }
.dl-v.first::before { border-color: var(--brand); background: var(--brand-soft); }
.dl-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.dl-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--text-2); }
.dl-form label.chk { flex-direction: row; align-items: center; gap: 8px; }
.dl-form input:not([type="checkbox"]), .dl-form select { min-width: 0; }
.dl-repeat { margin-top: 14px; border: 1px solid var(--brand-soft-2); background: var(--brand-soft); border-radius: var(--r-3); padding: 12px 14px; }
.dl-words { margin-top: 10px; }
.dl-ask { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.dl-ask select { max-width: 100%; }
/* Ав3 «Закрыть месяц»: шаги с отметкой / close-the-month steps */
.cl-step { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.cl-step:first-of-type { border-top: 0; }
.cl-step > b { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--faint); }
.cl-step.ok > b { background: var(--ok-soft); color: var(--ok); }
.cl-step > div { min-width: 0; }
.cl-t { font-weight: 650; font-size: 14.5px; }
@media (max-width: 760px) {
  .dl-grid, .dl-two { grid-template-columns: minmax(0, 1fr); }
  .dl-due-i .btn { width: 100%; justify-content: center; }
}
