:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f3f2ee;
  --hover: #f0efec;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);
  --c-meta: #2a78d6;
  --c-tiktok: #eb6834;
  --c-google: #1baf7a;
  --c-yandex: #eda100;
  --accent: #4a3aa7;
  --good: #006300;
  --good-mark: #0ca30c;
  --warn: #fab219;
  --bad: #d03b3b;
  --bad-text: #b42323;
  --btn-ink: #fcfcfb;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 4px 16px rgba(11, 11, 11, 0.04);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #242422;
    --hover: #262624;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.1);
    --c-meta: #3987e5;
    --c-tiktok: #d95926;
    --c-google: #199e70;
    --c-yandex: #c98500;
    --accent: #9085e9;
    --good: #0ca30c;
    --bad-text: #ef7a7a;
    --btn-ink: #0b0b0b;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #242422;
  --hover: #262624;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.1);
  --c-meta: #3987e5;
  --c-tiktok: #d95926;
  --c-google: #199e70;
  --c-yandex: #c98500;
  --accent: #9085e9;
  --good: #0ca30c;
  --bad-text: #ef7a7a;
  --btn-ink: #0b0b0b;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.45 var(--font);
  overflow-x: hidden;
}
a { color: inherit; text-underline-offset: 2px; text-decoration-color: var(--axis); }
a:hover { text-decoration-color: currentColor; }
h1, h2 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
code, .mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--c-meta); outline-offset: 2px; }

.wrap { max-width: 1480px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-top: 20px; padding-bottom: 64px; }

/* Шапка */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand span { font-weight: 400; color: var(--muted); }
.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.tabs a:hover { background: var(--hover); color: var(--ink); }
.tabs a.on { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.user { display: flex; align-items: center; gap: 10px; }
.user form { margin: 0; }

/* Кнопки и поля */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--ink); color: var(--btn-ink); border-color: var(--ink); }
.btn.primary:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.5; cursor: progress; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--axis); text-underline-offset: 2px; }
.link.danger { color: var(--bad-text); }
.icon-btn { background: none; border: 0; border-radius: 6px; width: 28px; height: 28px; color: var(--ink-2); cursor: pointer; font-size: 15px; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
input, select {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; height: 32px; padding: 0 10px; min-width: 0;
}
input[type="checkbox"] { height: 16px; width: 16px; accent-color: var(--ink); }
textarea {
  font: inherit; font-size: 13px; line-height: 1.45; color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; resize: vertical; min-width: 0;
}
input[type="file"] { height: auto; padding: 5px 8px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-form { display: flex; align-items: flex-end; gap: 12px; margin-top: 12px; }
/* Строка внутри таблицы: без верхнего отступа и с компактными полями */
.row-form.tight { margin-top: 0; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-form.tight input, .row-form.tight select { height: 28px; font-size: 12.5px; }
.dim { opacity: .45; }
.brand-switch { display: inline-flex; align-items: center; }
.brand-switch select { height: 28px; font-size: 12.5px; }

/* Доступы к кабинетам: по раскрывашке на платформу */
.creds { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.cred { border: 1px solid var(--grid); border-radius: 8px; padding: 8px 10px; }
.cred > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cred .row-form { margin-top: 10px; }
.cred form + form { margin-top: 6px; }
.wrap-form { flex-wrap: wrap; }
.w-sm { width: 72px; }

/* Фильтры */
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.filters form { margin: 0; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 2px; }
.seg a { padding: 5px 14px; border-radius: 7px; text-decoration: none; color: var(--ink-2); font-size: 13px; }
.seg a.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--border); }
.sources { display: flex; gap: 4px; flex-wrap: wrap; }
.source { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--ink-2); }
.source i { width: 8px; height: 8px; border-radius: 50%; }
.source b { font-weight: 600; color: var(--good); }
.source.none { color: var(--muted); }
.source.none i { opacity: 0.35; }
.source.none b { color: var(--muted); }

.page-title { font-size: 22px; margin: 0 0 16px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head .page-title { margin: 0; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar input[type="search"] { width: 220px; }
.section { margin-top: 32px; }
.section-title { font-size: 16px; margin-bottom: 10px; }
.note { margin: 8px 0 20px; }

/* Уведомления */
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; border: 1px solid var(--border); background: var(--surface); }
.flash.ok { border-left: 3px solid var(--good-mark); }
.flash.err { border-left: 3px solid var(--bad); }
.flash.warn { border-left: 3px solid var(--warn); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.tile-label { font-size: 12px; color: var(--ink-2); }
.tile-value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { font-size: 12px; color: var(--muted); }
.delta { font-size: 12px; margin-top: 6px; }
.delta.good { color: var(--good); }
.delta.bad { color: var(--bad-text); }
.delta.neutral { color: var(--ink-2); }

/* Карточки и графики */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; margin-bottom: 12px; }
.grid2 .card { margin-bottom: 0; }
.card-head { margin-bottom: 12px; }
.card-head h2 { font-size: 15px; }
.card-head p { margin: 2px 0 0; }
.chart { width: 100%; min-height: 40px; }
.chart svg { display: block; overflow: visible; }
.chart text { font: 12px var(--font); }
.chart .lbl { fill: var(--ink-2); }
.chart .val { fill: var(--ink); font-variant-numeric: tabular-nums; }
.chart .tick { fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart .row:hover .bar, .chart .row:focus .bar, .chart .row:hover .seg, .chart .row:focus .seg { opacity: 0.8; }
.chart .row:focus { outline: none; }
.chart .row:focus-visible .hit { stroke: var(--c-meta); stroke-width: 2; }
.chart .crosshair { stroke: var(--axis); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.table-view { margin-top: 10px; }
.table-view summary { font-size: 12px; color: var(--muted); cursor: pointer; width: max-content; }
.table-view[open] summary { margin-bottom: 8px; }

.tip {
  position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); min-width: 140px; max-width: 280px;
}
.tip-title { color: var(--ink-2); margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row i { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.tip-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tip-row span { color: var(--ink-2); }
.tip-row.total { border-top: 1px solid var(--grid); margin-top: 4px; padding-top: 4px; }

/* Таблицы */
.table-wrap { overflow: auto; max-height: calc(100vh - 150px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .table-wrap, .table-view .table-wrap { max-height: none; box-shadow: none; }
table { border-collapse: separate; border-spacing: 0; width: 100%; }
.report { font-size: 13px; min-width: 1320px; }
.report.logs { min-width: 1100px; }
.report th, .report td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.report thead th {
  position: sticky; top: 0; z-index: 3; background: var(--surface); font-weight: 600; font-size: 12px;
  color: var(--ink-2); white-space: nowrap; border-bottom: 1px solid var(--axis);
}
.report thead th button { all: unset; cursor: pointer; }
.report thead th[data-sort] button::after { content: ""; display: inline-block; width: 10px; margin-left: 2px; color: var(--muted); }
.report thead th[aria-sort="ascending"] button::after { content: "↑"; }
.report thead th[aria-sort="descending"] button::after { content: "↓"; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zero { color: var(--muted); }
.sticky-col { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.report thead .sticky-col { z-index: 4; }
.report tbody tr.item:hover td { background: var(--hover); }
.report .grp-head th { background: var(--surface-2); font-size: 13px; color: var(--ink); position: sticky; left: 0; z-index: 2; padding-top: 9px; padding-bottom: 9px; }
.report .grp-head th > * { vertical-align: middle; }
.grp-toggle { all: unset; cursor: pointer; display: inline-block; width: 18px; text-align: center; color: var(--muted); transition: transform 0.15s; }
.grp.collapsed .grp-toggle { transform: rotate(-90deg); }
.grp.collapsed tr.item, .grp.collapsed tr.empty-row { display: none; }
.report tr.sub td { color: var(--ink-2); }
.report tr.grp-total td { font-weight: 600; background: var(--surface); border-bottom: 1px solid var(--axis); }
.report tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); font-weight: 700; border-top: 1px solid var(--axis); border-bottom: 0; }
.report tfoot .sticky-col { z-index: 3; }
.report tr.empty-row td { font-size: 12px; }

.tag { display: inline-block; font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--ink-2); margin-left: 6px; }
.tag.bad { color: var(--bad-text); }
.pbadge { display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; white-space: nowrap; }
.pbadge i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.cr-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.cr-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.code { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.cr-cell .edit { margin-left: auto; opacity: 0; }
tr:hover .cr-cell .edit, .cr-cell .edit:focus-visible { opacity: 1; }
.thumb { position: relative; flex: none; width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); padding: 0; overflow: hidden; cursor: zoom-in; display: inline-block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.none { cursor: default; background: repeating-linear-gradient(45deg, var(--surface-2) 0 4px, var(--surface) 4px 8px); }
.thumb.lg { width: 40px; height: 71px; }  /* 9:16 — вертикальные макеты видно целиком */
.thumb.lg img { object-fit: contain; background: var(--surface-2); }
/* Метка «это кадр из видео», чтобы не искать объявление в кабинете. */
.thumb.video::after { content: '▶'; position: absolute; right: 1px; bottom: 0; font-size: 9px; line-height: 1.4; padding: 0 3px; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 4px 0 4px 0; }

.mini { font-size: 13px; }
.mini th, .mini td { padding: 6px 8px; border-bottom: 1px solid var(--grid); text-align: left; }
.mini th { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.mini tr:last-child td { border-bottom: 0; }
.mini.editable td { padding: 4px 6px; }
.mini.editable input[type="text"] { width: 100%; }
.creatives-mini .cr-cell { min-width: 0; }
.pad { padding: 8px 0; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.status i { font-style: normal; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; font-weight: 700; color: #fff; }
.status.error i { background: var(--bad); }
.status.warning i { background: var(--warn); color: #0b0b0b; }
.status.good i { background: var(--good-mark); }
.status.neutral { color: var(--muted); }
.status.neutral i { background: var(--grid); color: var(--ink-2); }
.status-text.bad { color: var(--bad-text); }
.status-text.warn { color: var(--warn); }

.empty { text-align: center; padding: 56px 16px; background: var(--surface); border: 1px dashed var(--axis); border-radius: var(--radius); }
.empty h2 { font-size: 17px; margin-bottom: 6px; }
.empty p { margin: 0; }

/* Диалоги */
.dialog { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 20px; width: min(440px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { font-size: 17px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.lightbox { padding: 8px; width: auto; max-width: calc(100vw - 32px); }
.lightbox img { display: block; max-width: calc(100vw - 64px); max-height: calc(100vh - 96px); border-radius: 6px; }

.login { max-width: 360px; margin: 10vh auto 0; padding: 24px; }
.login h1 { font-size: 20px; margin-bottom: 16px; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar-in { gap: 8px 16px; padding: 8px 0; }
  .tabs { order: 3; flex-basis: 100%; }
  .user { margin-left: auto; }
  .kpis, .kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-value { font-size: 22px; }
  .row-form { flex-direction: column; align-items: stretch; }
  .toolbar input[type="search"] { width: 100%; }
  .page-title { font-size: 19px; }
}

@media print {
  .topbar, .filters, .toolbar, .table-view, .icon-btn { display: none !important; }
  .table-wrap { max-height: none; overflow: visible; border: 0; box-shadow: none; }
}

/* Фильтры-переключатели */
.chip-rows { display: flex; flex-direction: column; gap: 6px; margin: -10px 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  font-size: 12.5px; line-height: 1; text-decoration: none; white-space: nowrap;
}
.chip:hover { background: var(--hover); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--btn-ink); font-weight: 500; }
.chip.reset { color: var(--bad-text); align-self: flex-start; }

/* ТЗ по продуктам: список продуктов слева, тело выбранного справа */
.brief-layout { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 14px; align-items: start; }
.brief-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 12px; }
.brief-nav-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; border-radius: 7px; border: 1px solid transparent;
  color: var(--ink-2); text-decoration: none; font-size: 13px;
}
.brief-nav-item:hover { background: var(--hover); color: var(--ink); }
.brief-nav-item.active { background: var(--surface); border-color: var(--border); color: var(--ink); font-weight: 500; }
.brief-nav-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brief-nav-meta { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot.good { background: var(--good); }
.dot.bad { background: var(--bad-text); }
@media (max-width: 760px) {
  .brief-layout { grid-template-columns: 1fr; }
  .brief-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .brief-nav-item { flex: none; border-color: var(--border); border-radius: 999px; }
}

.brief-card { padding: 0; }
.brief-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
.brief-body { padding: 4px 14px 14px; }
.brief-block { padding: 10px 0; border-bottom: 1px solid var(--grid); }
.brief-block:last-child { border-bottom: 0; }
.block-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.block-head h3 { font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 0; text-transform: uppercase; letter-spacing: .03em; }
.btn.small { height: 24px; padding: 0 9px; font-size: 12px; }

.chip.pack, .chip.aud { gap: 6px; padding-right: 5px; background: var(--surface-2); }
.chip.pack a { color: var(--ink); text-decoration: none; }
.chip.pack a:hover { text-decoration: underline; }
.chip-open { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.chip-open:hover { text-decoration: underline; }
.chip-kind { font-size: 11px; color: var(--muted); }
.chip.add { border-style: dashed; cursor: pointer; font: inherit; font-size: 12.5px; }
.chip-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 11px; padding: 0 2px; line-height: 1; }
.chip-x:hover { color: var(--bad-text); }

.texts { display: flex; flex-direction: column; gap: 8px; }
.text-group { display: flex; flex-direction: column; gap: 2px; }
.text-tool { font-size: 11px; font-weight: 600; color: var(--muted); }
.text-row { display: grid; grid-template-columns: 128px 1fr auto auto; align-items: baseline; gap: 10px; padding: 4px 8px; border-radius: 6px; background: var(--surface-2); font-size: 13px; }
.text-row.error { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--bad); }
.text-field { font-size: 12px; color: var(--ink-2); }
.text-body { overflow-wrap: anywhere; white-space: pre-wrap; }
.text-count { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); }
.text-count.warn { color: var(--warn); }
.text-count.error { color: var(--bad-text); font-weight: 600; }
.nowrap-pad { margin: 0; }

.field-grid { display: grid; gap: 10px; }
.field-grid.three { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.field-grid.two { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.brief-label { font-size: 11px; font-weight: 600; color: var(--ink-2); margin-bottom: 3px; }
.brief-text { margin: 0; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.brief-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 10px; }
textarea.over { border-color: var(--bad-text); }

/* Гео: строк бывает много, поэтому блок раскрывается по заголовку */
details.geo > summary { list-style: none; cursor: pointer; }
details.geo > summary::-webkit-details-marker { display: none; }
.geo-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.geo-head::before { content: '▸'; color: var(--muted); font-size: 10px; }
details.geo[open] > .geo-head::before { content: '▾'; }
.geo-head h3 { font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 0; text-transform: uppercase; letter-spacing: .03em; }
details.geo[open] .geo-peek { display: none; }
.geo-peek { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
details.geo > textarea, details.geo > .brief-text { margin-top: 8px; }
details.geo > textarea { width: 100%; }
.brief-text.pre { white-space: pre-wrap; }
