/* The screens' stylesheet (ticket 9): tokens, then components; the GigaChat window is in
   assistant.css. Pastel accents belong to a status, never to a block. */
@font-face { font-family: "Inter"; src: url("/slides/fonts/Inter-Regular.otf") format("opentype"); font-weight: 400; }
@font-face { font-family: "Inter"; src: url("/slides/fonts/Inter-Medium.otf") format("opentype"); font-weight: 500; }
@font-face { font-family: "Inter"; src: url("/slides/fonts/Inter-SemiBold.otf") format("opentype"); font-weight: 600; }
/* Source Serif 4 (OFL, Adobe): headings; one variable file covers 500–600 */
@font-face { font-family: "Source Serif 4"; src: url("/static/fonts/SourceSerif4Variable-Roman.ttf.woff2") format("woff2"); font-weight: 200 900; }

:root {
  --paper: #F3F5F8;   /* cold pale gray */
  --card: #FFFFFF;
  --line: #E4E8ED;
  --line-strong: #D3D9E0;
  --ink: #2B2F33;
  --muted: #656B73;

  /* status: background / mark / text on that background */
  --data-bg: #DDF1F1;  --data-mark: #6BBFC0;  --data-ink: #1D5C60;      /* светлая бирюза — подтверждено данными */
  --est-bg: #F4ECDD;   --est-mark: #CDB07C;   --est-ink: #66512B;       /* песок — оценка */
  --guess-bg: #ECEFF3; --guess-mark: #9AA3AD; --guess-ink: #4D5560;     /* серый с пунктиром — гипотеза */
  --ask-bg: #F9E7DD;   --ask-mark: #E0A283;   --ask-ink: #77422B;       /* персик — уточнить на встрече */
  --said-bg: #E4EEF8;  --said-mark: #8FB4D6;  --said-ink: #34567A;      /* светло-голубой — со слов менеджера */

  /* The accent: calm teal for the main buttons, links and focus (white on it: 4,5:1) */
  --accent: #0F8389;   --accent-hover: #0B6E74;   --accent-ink: #FFFFFF;   --link: #0B6E74;
  --accent-bright: #1AA3A6;  /* the loading bar: not text, so brighter */

  --font: "Inter", "Helvetica Neue", Arial, sans-serif;             /* interface and text, 400–500 */
  --font-head: "Source Serif 4", Georgia, "Times New Roman", serif; /* headings, 500–600 */
  --font-num: "Inter", "Helvetica Neue", Arial, sans-serif;         /* figures: 600, tabular */
  --t-xl: 28px; --t-l: 20px; --t-m: 16px; --t-s: 14px;
  --radius: 16px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--t-m)/1.5 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, p, ol, ul, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.page { max-width: 1120px; margin: 0 auto; padding: var(--s2) var(--s2) var(--s3); min-height: 100vh; display: flex; flex-direction: column; }
.page > * { flex: none; }
.muted { color: var(--muted); }
.small { font-size: var(--t-s); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.section-title { font: 600 var(--t-l)/1.5 var(--font-head); margin-bottom: var(--s1); }

/* Chips and dots: one per status */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-s); font-weight: 500;
  line-height: 1.5; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.chip.neutral { background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.data  { --bg: var(--data-bg);  --mark: var(--data-mark);  --tx: var(--data-ink); }
.est   { --bg: var(--est-bg);   --mark: var(--est-mark);   --tx: var(--est-ink); }
.guess { --bg: var(--guess-bg); --mark: var(--guess-mark); --tx: var(--guess-ink); }
.ask   { --bg: var(--ask-bg);   --mark: var(--ask-mark);   --tx: var(--ask-ink); }
.said  { --bg: var(--said-bg);  --mark: var(--said-mark);  --tx: var(--said-ink); }
.chip:is(.data, .est, .guess, .ask, .said) { background: var(--bg); color: var(--tx); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mark); flex: none; }
.note-line { display: flex; gap: 8px; align-items: center; font-size: var(--t-s); color: var(--tx);
  background: var(--bg); border-radius: 8px; padding: 2px 8px; width: fit-content; }

/* Buttons */
.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none; padding: 6px 16px; border-radius: 999px; white-space: nowrap; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600;
  text-decoration: none; padding: 5px 15px; border: 1px solid currentColor; border-radius: 999px; white-space: nowrap; }
.btn-secondary:hover { background: var(--data-bg); color: var(--accent-hover); }
.btn-quiet { color: var(--muted); font-size: var(--t-s); display: inline-flex; gap: 6px; align-items: center; }
.btn-quiet:hover { color: var(--ink); }
.info { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  color: var(--muted); font-size: 14px; line-height: 1; }
.info:hover, .info[aria-expanded="true"] { background: var(--paper); color: var(--ink); }

/* Popover: opens on click, closes on Esc or a click outside */
.pop { position: absolute; z-index: 20; width: 320px; background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: var(--s2); font-size: var(--t-s); box-shadow: none; }
.pop[hidden] { display: none; }
.pop dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.pop dt { color: var(--muted); } .pop dd { margin: 0; }
.pop .pop-title { font-weight: 600; margin-bottom: 4px; }
.pop p + p, .pop dl + p, .pop p + dl { margin-top: 8px; }

/* Side panel «Все данные о компании» */
.panel-veil { position: fixed; inset: 0; background: rgba(43, 43, 43, .16); z-index: 30; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--card);
  border-left: 1px solid var(--line); z-index: 31; overflow-y: auto; padding: var(--s3); }
.panel[hidden], .panel-veil[hidden] { display: none; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s2); }
.panel dl { display: grid; grid-template-columns: 180px 1fr; margin: 0; font-size: var(--t-s); }
.panel dt, .panel dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
.panel dt { color: var(--muted); }
.panel .src { display: block; color: var(--muted); }
.panel h3 { font-size: var(--t-m); font-weight: 600; margin: var(--s3) 0 var(--s1); }

@media (prefers-reduced-motion: no-preference) {
  .pop, .panel { animation: rise .12s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(4px); } }
}

/* ---------- Brief ---------- */
.topline { display: flex; justify-content: space-between; align-items: center; font-size: var(--t-s); color: var(--muted); margin-bottom: var(--s1); }
.topline a { text-decoration: none; } .topline a:hover { color: var(--ink); }
.brief-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s2); }
.brief-head h1 { font: 600 var(--t-xl)/1.25 var(--font-head); }
.brief-head .sub { color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 0 8px; }
.inn-copy { color: var(--muted); font-size: var(--t-s); cursor: copy; }
.inn-copy:hover { color: var(--ink); }
.head-actions { display: flex; align-items: center; gap: var(--s2); flex: none; padding-top: 2px; }
.seg-chip { cursor: pointer; }
.seg-chip::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); margin-left: 2px; opacity: .6; }

.brief-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); align-items: start; }
.col { display: grid; gap: var(--s2); align-content: start; }
@media (max-width: 1199px) { .brief-grid { grid-template-columns: 1fr; } }

.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s2); }
@media (max-width: 719px) { .figures { grid-template-columns: 1fr; } }
.figure { padding: 12px 14px; display: grid; align-content: start; gap: 2px; min-width: 0; }
.figure .label { display: flex; justify-content: space-between; align-items: flex-start; gap: 4px; font-size: var(--t-s); color: var(--muted); line-height: 1.5; }
.figure .num { font: 600 var(--t-l)/1.5 var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.figure .num small { font-size: var(--t-s); font-weight: 500; color: var(--muted); }
.figure .num.none { font-size: var(--t-s); font-weight: 500; color: var(--muted); white-space: normal; line-height: 1.5; padding: 3px 0; }
.figure .chip { justify-self: start; margin-top: 4px; font-size: var(--t-s); padding: 0 8px; }
.figure .note-line { margin-top: 4px; font-size: var(--t-s); line-height: 1.5; }

.facts { padding: 12px var(--s2); }
.facts li { display: flex; gap: 10px; align-items: baseline; font-size: var(--t-m); padding: 3px 0; }
.facts li .dot { transform: translateY(-2px); }
.facts .more { margin-top: var(--s1); display: flex; gap: var(--s1); flex-wrap: wrap; }
.facts .more .chip { cursor: pointer; }

.picks { padding: 0 var(--s2); }
.pick { border-bottom: 1px solid var(--line); }
.pick:last-child { border-bottom: 0; }
.pick summary { display: grid; grid-template-columns: 24px 1fr auto; column-gap: 8px; padding: 4px 0; cursor: pointer; list-style: none; }
.pick summary::-webkit-details-marker { display: none; }
.pick .n { color: var(--muted); font-weight: 500; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: var(--t-s); }
.pick.guessed .n { background: var(--guess-bg); color: var(--guess-ink); font-weight: 600; }
.pick h3 { font-size: var(--t-m); font-weight: 500; line-height: 1.5; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pick h3 .chip { font-size: var(--t-s); padding: 0 8px; }
.pick .why { grid-column: 2 / 3; font-size: var(--t-s); color: var(--muted); line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick details[open] .why { white-space: normal; }
.pick .fold { grid-column: 3; justify-self: end; color: var(--muted); transition: transform .15s; }
.pick details[open] .fold { transform: rotate(180deg); }
.pick blockquote { font-size: var(--t-s); line-height: 1.5; margin: -2px 0 10px 32px; padding-left: 10px; border-left: 2px solid var(--line-strong); }
.pick .slide { font-size: var(--t-s); color: var(--muted); white-space: nowrap; }
.spare { display: block; padding: 10px var(--s2); font-size: var(--t-s); color: var(--muted); border-top: 1px solid var(--line); }
.spare summary { cursor: pointer; list-style: none; }
.spare summary::before { content: "+ "; }
.spare[open] summary::before { content: "− "; }
.spare li { padding: 4px 0; color: var(--ink); }

.questions { padding: 8px var(--s2); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); margin-bottom: var(--s1); }
.section-head .section-title { margin: 0; }
.legend { display: inline-flex; gap: 6px; align-items: center; font-size: var(--t-s); color: var(--muted); }
.n-mini { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-weight: 600; background: var(--guess-bg); color: var(--guess-ink); }
.questions { counter-reset: q; }
.questions li { display: grid; grid-template-columns: 24px 1fr; padding: 4px 0; counter-increment: q; }
.questions li::before { content: counter(q); color: var(--muted); font: 600 var(--t-m)/1.5 var(--font-num); }
.questions .q { font-size: var(--t-m); line-height: 1.5; }
.questions .q-why { grid-column: 2; font-size: var(--t-s); color: var(--muted); line-height: 1.5; }
.questions .ask-mark { color: var(--ask-ink); }

.footline { display: flex; gap: var(--s3); align-items: center; margin-top: auto; padding-top: var(--s4); font-size: var(--t-s); color: var(--muted); }
.footline .btn-quiet { text-decoration: none; }

/* ---------- Home ---------- */
.home-hero { max-width: 640px; margin: var(--s5) auto var(--s5); text-align: center; }
.home-hero h1 { font: 600 var(--t-xl)/1.25 var(--font-head); }
.home-hero p { color: var(--muted); margin-top: 4px; }
.search { margin-top: var(--s3); display: flex; gap: var(--s1); background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 6px 6px 20px; }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; border: 0; outline: 0; font: inherit; background: none; color: var(--ink); min-width: 0; }
.search input::placeholder { color: var(--muted); }
.group { margin-top: var(--s4); }
.group h2 { font: 600 var(--t-l)/1.5 var(--font-head); margin-bottom: var(--s1); display: flex; gap: 8px; align-items: baseline; }
.group h2 span { color: var(--muted); font-weight: 400; font-size: var(--t-s); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s1); }
.tile { display: grid; gap: 2px; align-content: start; padding: 14px var(--s2); text-decoration: none; }
.tile { color: var(--ink); }
.tile:hover { border-color: var(--accent); }
.tile b { font-weight: 500; }
.tile .city { font-size: var(--t-s); color: var(--muted); }
.tile .chip { justify-self: start; margin-top: 6px; font-size: var(--t-s); padding: 0 8px; }
.tile-wrap { position: relative; display: grid; }
.tile-wrap .tile { padding-right: 40px; }
.tile-del { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.tile-del:hover { background: var(--paper); color: var(--ink); }

/* ---------- Beyond the mockup: forms, waiting, search, the side panel's blocks ---------- */
.pop form { display: flex; gap: var(--s1); align-items: center; flex-wrap: wrap; margin-top: var(--s1); }
.pop select, .search-page input { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 8px; }
.btn-small { font-size: var(--t-s); font-weight: 500; padding: 2px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); }
.btn-small:hover { border-color: var(--ink); }
.pop .guess-item { padding: 8px 0; border-top: 1px solid var(--line); }
.pop .guess-item:first-of-type { border-top: 0; }
.pop .guess-item p { color: var(--muted); }
.pop-wide { width: 400px; }
.figure .info-row { display: flex; gap: 6px; align-items: center; }
.preparing { color: var(--muted); font-size: var(--t-s); padding: var(--s2); }
.hint { color: var(--muted); font-size: var(--t-s); }
.error { color: var(--ask-ink); background: var(--ask-bg); border-radius: 8px; padding: 4px 12px; font-size: var(--t-s); margin-top: var(--s1); display: inline-block; }
.footline form { display: inline; }
.footline .warn-line { margin-left: auto; color: var(--ask-ink); }
.pick .pin { padding: 0 8px; }

.panel section { margin-top: var(--s3); }
.panel .panel-note { font-size: var(--t-s); color: var(--muted); margin: 4px 0 var(--s1); }
.panel details summary { cursor: pointer; }
.panel details ul { margin: 6px 0 0; padding-left: 18px; list-style: disc; max-height: 320px; overflow-y: auto; }
.panel ul.plain { list-style: none; padding: 0; font-size: var(--t-s); }
.panel ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.panel .code { color: var(--muted); }
.panel .ask-mark { color: var(--ask-ink); }

.search-page h1 { font-size: var(--t-xl); font-weight: 600; margin: var(--s2) 0; }
.results { margin-top: var(--s3); padding: 4px var(--s2); }
.results li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--t-s); }
.results li:last-child { border-bottom: 0; }
.results .firm-link { display: grid; gap: 2px; color: var(--ink); text-decoration: none; }
.results .firm-link:hover b { color: var(--link); }
.results b { font-weight: 500; font-size: var(--t-m); }
.search-page .more { margin-top: var(--s2); }
/* One namesake, on the search page and in the home page's suggestions (ticket 18) */
.firm-meta { color: var(--muted); font-size: var(--t-s); }
.firm-kind { justify-self: start; font-size: 12px; color: var(--said-ink); background: var(--said-bg); border-radius: 999px; padding: 0 8px; }
.firm-ended b { color: var(--muted); font-weight: 400; }
.firm-closed { color: var(--muted); font-style: italic; }

/* ---------- Loading a new INN (ticket 9, iteration) ---------- */
.loading { min-height: 100vh; display: grid; place-items: center; padding: var(--s3) var(--s2); }
.loading-box { width: min(520px, 100%); text-align: center; }
.loading-name { font: 600 var(--t-xl)/1.25 var(--font-head); min-height: 35px; }
.loading-name.pending { color: var(--muted); font-weight: 500; }
.loading-inn { color: var(--muted); font-size: var(--t-s); margin-top: 4px; }
.loading-pct { font: 600 var(--t-xl)/1.25 var(--font-num); font-variant-numeric: tabular-nums; margin-top: var(--s5); }
.loading-bar { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: var(--s2); }
.loading-bar span { display: block; height: 100%; width: var(--done, 0%); background: var(--accent-bright); border-radius: inherit; transition: width .6s ease-out; }
.loading-step { margin-top: var(--s2); font-size: var(--t-m); }
.loading-skip { margin-top: 4px; font-size: var(--t-s); color: var(--muted); min-height: 21px; }

/* A guess is not checked yet: a dashed outline instead of a colour of its own */
.chip.guess { border: 1px dashed var(--guess-mark); }
.tag-guess { display: inline-block; font-size: var(--t-s); line-height: 1.3; padding: 0 6px; margin-right: 6px; border-radius: 6px;
  border: 1px dashed var(--guess-mark); color: var(--guess-ink); background: var(--guess-bg); }
.sub .seg { color: var(--ink); }
.sub .info { width: 18px; height: 18px; display: inline-grid; vertical-align: middle; position: relative; top: -1px; }

/* ---------- Format D variations: tabs «О компании → Вопросы → Что предложить» ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); align-items: start; }
.guess-list { padding: 4px var(--s2); }
.guess-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 var(--s2); align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.guess-list li:last-child { border-bottom: 0; }
.guess-list b { font-weight: 500; }
.guess-list .why { grid-column: 1; font-size: var(--t-s); color: var(--muted); min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }  /* the whole line on hover */
.guess-list li { padding: 6px 0; }
.guess-list .acts { grid-row: 1 / 3; grid-column: 2; display: flex; gap: 6px; }
.ask-wrap { max-width: 760px; }

/* ---------- Brief D1: figures above, tabs «О компании → Вопросы → Что предложить» ---------- */
:root { --green: #17803A; --green-bg: #E6F4EA; }  /* «Сотрудники»: large green figures (28.10.2026) */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin: var(--s1) 0 var(--s2); }
.tab { padding: 8px 4px; margin-right: var(--s2); font: 600 var(--t-m)/1.5 var(--font-head); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.tab span { font: 500 var(--t-s)/1 var(--font-num); color: var(--muted); margin-left: 4px; }
.panel-tab[hidden] { display: none; }

.figures.d1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 899px) { .figures.d1 { grid-template-columns: 1fr; } }
.staff { padding: 12px 14px; }
.staff .label { display: flex; gap: 4px; align-items: center; font-size: var(--t-s); color: var(--muted); }
.staff-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin-top: 4px; }
.staff-cell { min-width: 0; display: grid; align-content: start; }
.staff-cell + .staff-cell { border-left: 1px solid var(--line); padding-left: var(--s2); }
.staff-cell .k { font-size: var(--t-s); color: var(--muted); display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.big { font: 600 var(--t-xl)/1.25 var(--font-num); font-variant-numeric: tabular-nums; color: var(--green); white-space: nowrap; }
.big.none { font: 500 var(--t-s)/1.5 var(--font); color: var(--muted); white-space: normal; padding: 6px 0; }
.staff-cell .sub-num { font-size: var(--t-s); color: var(--muted); }
.staff-extra { display: flex; flex-wrap: wrap; gap: 4px var(--s2); align-items: center; margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--line); }
.staff-extra .k { font-size: var(--t-s); color: var(--muted); }
.edit-num { display: flex; gap: 8px; align-items: baseline; }
.edit-num[hidden] { display: none; }
.edit-num button.pen { color: var(--muted); font-size: var(--t-s); padding: 0 4px; border-radius: 6px; }
.edit-num button.pen:hover { color: var(--link); }
/* The field stands where the number stood: the same size and colour, underlined */
.edit-form { display: grid; gap: 2px; justify-items: start; min-width: 0; }
.edit-form[hidden] { display: none; }
.edit-form input.big { width: 100%; max-width: 6ch; padding: 0; border: 0; border-bottom: 2px solid var(--accent); border-radius: 0;
  background: none; outline: 0; }
.edit-acts { display: flex; gap: 12px; font-size: var(--t-s); }
.edit-acts .save { color: var(--link); font-weight: 600; }
.edit-acts .cancel { color: var(--muted); }
.edit-acts button:hover { text-decoration: underline; }
.btn-accent { font-size: var(--t-s); font-weight: 600; padding: 3px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); align-items: start; }
@media (max-width: 899px) { .about-grid, .ask-grid, .offer-grid { grid-template-columns: 1fr !important; } }
.guess-list form { display: inline; }

.ask-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s3); align-items: start; }
.objections { padding: 4px var(--s2); }
.objection { border-bottom: 1px solid var(--line); }
.objection:last-child { border-bottom: 0; }
.objection summary { list-style: none; cursor: pointer; padding: 10px 0; display: flex; justify-content: space-between; gap: var(--s2); font-weight: 500; }
.objection summary::-webkit-details-marker { display: none; }
.objection summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.objection[open] summary::after { content: "−"; }
.objection .answer { font-size: var(--t-s); line-height: 1.55; padding: 0 0 12px; display: grid; gap: 6px; }
.objection .answer p { margin: 0; }

.offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.offer { padding: 14px var(--s2); display: grid; gap: 6px; align-content: start; }
.offer h3 { font-size: var(--t-m); font-weight: 600; line-height: 1.4; }
.offer .why { font-size: var(--t-s); color: var(--muted); }
.offer blockquote { font-size: var(--t-s); line-height: 1.5; padding-left: 10px; border-left: 2px solid var(--accent-bright); }
.offer .meta { display: flex; justify-content: space-between; align-items: center; gap: var(--s1); font-size: var(--t-s); color: var(--muted); margin-top: 2px; }
.offer .pin { padding: 0 8px; }
.spare-card { margin-top: var(--s2); }
.spare-card li { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }

/* «слайд 3»: a link that opens the deck there; hovering shows the slide */
.slide-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--link); text-decoration: none; }
.slide-link::before { content: ""; width: 16px; height: 10px; border: 1.5px solid currentColor; border-radius: 2px; opacity: .7; }
.slide-link:hover { text-decoration: underline; }
.slide-peek { position: absolute; z-index: 25; width: 400px; padding: 6px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; pointer-events: none; }
.slide-peek[hidden] { display: none; }
.slide-peek iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: var(--paper); }
.slide-peek p { font-size: var(--t-s); color: var(--muted); padding: 4px 4px 0; }

/* ---------- Home: one field with suggestions ---------- */
.search-wrap { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 15; background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 16px; padding: 6px; text-align: left; max-height: min(460px, 70vh); overflow-y: auto; }
.suggest[hidden] { display: none; }
.suggest h3 { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 8px 12px 4px; }
.suggest a, .suggest .row { display: grid; gap: 0; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.suggest a b { font-weight: 500; }
.suggest .row { font-size: var(--t-s); color: var(--muted); }
.suggest a .firm-kind { margin: 2px 0; }
.suggest a.on, .suggest a:hover { background: var(--paper); }
.suggest a.new b::before { content: "+ "; color: var(--accent); }


.panel .seg-form { display: flex; gap: var(--s1); align-items: center; flex-wrap: wrap; }
.panel select { font: inherit; font-size: var(--t-s); color: var(--ink); background: var(--card); border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 8px; }
.panel #panel-segment { margin-top: var(--s2); }
.loading-failed { margin-top: var(--s3); color: var(--ask-ink); display: grid; gap: var(--s2); justify-items: center; }
.loading-failed[hidden] { display: none; }
.loading-failed br { display: none; }

/* Login (ticket 15а): one card in the middle; the signed-in login and «Выйти» in a corner */
.login-page { justify-content: center; align-items: center; }
.login { width: min(400px, 100%); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.login h1 { font: 600 var(--t-xl)/1.3 var(--font-head); margin: 0; }
.login p { margin: 0; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-s); color: var(--muted); }
.login input { font: inherit; font-size: var(--t-m); color: var(--ink); padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); }
.login .btn-primary { justify-content: center; }
.signed-in { position: fixed; top: var(--s1); right: var(--s2); display: flex; align-items: center; gap: var(--s1); font-size: var(--t-s); color: var(--muted); }
.signed-in button { font: inherit; color: var(--link); background: none; border: 0; padding: 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* What the brief concludes from the facts (03.11.2026) */
.insights { margin-bottom: var(--s3); display: grid; gap: var(--s1); }
.insight-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s1); }
.insight { padding: 12px var(--s2); display: grid; gap: 4px; align-content: start; }
.insight b { font-weight: 600; }
.insight p { margin: 0; font-size: var(--t-m); }
.insight .say { color: var(--muted); }
.insight-source { font-size: var(--t-s); color: var(--muted); }
.trend-wrap { overflow-x: auto; }
.trend { width: 100%; border-collapse: collapse; font-size: var(--t-s); font-variant-numeric: tabular-nums; }
.trend th, .trend td { padding: 8px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.trend th { font-weight: 500; color: var(--muted); }
.trend th:first-child, .trend td:first-child { text-align: left; }
.trend tr:last-child td { border-bottom: 0; }
