/* Панель — служебный интерфейс. Палитра бренда (void / silver / orange /
   gold), но без витринных приёмов: здесь работают с текстом по часу,
   и глазам нужен покой, а не контрастный первый экран. */
:root {
  --void: #050505;
  --surface: #0e0e0e;
  --sunken: #151515;
  --border: #202020;
  --border-strong: #2e2e2e;
  --border-interactive: #666;
  --text: #f1f3f4;
  --muted: #9ba0a3;
  --signal: #e0640a;
  --gold: #f6a313;
  --danger: #d23f3f;
  --ok: #3aa65a;
  --font: Montserrat, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 8px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font: 15px/1.5 var(--font);
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--signal); }
h1 { font-size: 1.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 0.75rem; }
code { font-family: var(--mono); font-size: 0.85em; color: var(--muted); }
pre { font-family: var(--mono); font-size: 0.82rem; white-space: pre-wrap; word-break: break-word; }
small { font-size: 0.8rem; }
.muted { color: var(--muted); }
.bad { color: var(--danger); font-weight: 600; }
.nums { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Шапка */
.top {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 1.5rem; height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.top__brand { color: var(--text); font-weight: 800; font-size: 1.1rem; }
.top__brand span { color: var(--signal); }
.top__brand small { color: var(--muted); font-weight: 400; margin-left: 0.4rem; }
.top__nav { display: flex; gap: 1.25rem; margin-right: auto; }
.top__nav a { color: var(--text); font-weight: 500; padding: 0.4rem 0; }
.top__nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--signal); }
.top__preview { font-size: 0.85rem; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 1.5rem; }

.flash {
  background: var(--sunken); border: 1px solid var(--border-strong);
  border-left: 3px solid var(--gold);
  padding: 0.6rem 1rem; border-radius: var(--r); margin: 0 0 1.25rem;
}
.error { color: var(--danger); }

.head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.head h1 { margin: 0; margin-right: auto; }
.head__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.head__actions form { margin: 0; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 1rem;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--sunken); color: var(--text);
}
.btn--primary { background: var(--signal); color: var(--void); }
.btn--primary:hover { background: var(--gold); color: var(--void); }
.btn--ghost { border-color: var(--border-interactive); background: transparent; }
.btn--ghost:hover { border-color: var(--signal); color: var(--signal); }
.btn--danger { border-color: var(--border-strong); background: transparent; color: var(--muted); }
.btn--danger:hover { border-color: var(--danger); color: var(--danger); }
.btn--sm { min-height: 32px; padding: 0 0.75rem; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.5; cursor: default; }

/* Плитки главной */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.tile {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1.25rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r); color: var(--text);
}
.tile:hover { border-color: var(--border-interactive); color: var(--text); }
.tile__num { font-size: 2rem; font-weight: 800; line-height: 1; }
.tile__label { color: var(--muted); font-size: 0.9rem; }
.steps { padding-left: 1.25rem; color: var(--muted); }
.steps strong { color: var(--text); }

/* Таблицы */
.list { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.list th, .list td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.list th { color: var(--muted); font-weight: 500; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.list form { margin: 0; }
.tag {
  display: inline-block; margin-left: 0.4rem; padding: 0.1rem 0.5rem;
  border: 1px solid var(--border-strong); border-radius: 999px;
  font-size: 0.72rem; color: var(--muted); vertical-align: middle;
}
.tag--draft { border-color: var(--gold); color: var(--gold); }
.tag--ok { border-color: var(--ok); color: var(--ok); }
.tag--bad { border-color: var(--danger); color: var(--danger); }
.tag--run { border-color: var(--gold); color: var(--gold); }

/* Редактор */
.editor { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.editor__meta { display: flex; flex-direction: column; gap: 0.9rem; position: sticky; top: 72px; }
.editor__body { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.editor__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.editor__actions .btn { white-space: nowrap; }
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.field--grow { flex: 1; }
.field__label { font-weight: 600; font-size: 0.9rem; }
.field__label small { color: var(--muted); font-weight: 400; margin-left: 0.3rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
input, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--sunken); border: 1px solid var(--border-interactive);
  border-radius: var(--r); padding: 0.55rem 0.7rem;
}
input:focus, textarea:focus { outline: none; border-color: var(--signal); }
input[readonly] { color: var(--muted); border-color: var(--border-strong); }
textarea.body { min-height: 70vh; font-family: var(--mono); font-size: 0.9rem; line-height: 1.6; resize: vertical; }
.counter { color: var(--muted); }
.check { display: flex; gap: 0.5rem; align-items: center; cursor: pointer; }
.check input { width: auto; }
.help summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.help pre { background: var(--sunken); padding: 0.75rem; border-radius: var(--r); margin: 0.5rem 0 0; }

.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; margin-top: 0.5rem; }
.picker__item {
  display: flex; flex-direction: column; gap: 0.25rem; padding: 0.35rem;
  background: var(--sunken); border: 1px solid var(--border); border-radius: var(--r);
  color: var(--muted); font: inherit; font-size: 0.7rem; cursor: pointer; text-align: left;
}
.picker__item:hover { border-color: var(--signal); }
.picker__item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
.picker__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Картинки */
.upload { display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; margin-bottom: 1.5rem; }
.upload__drop {
  display: block; width: 100%; padding: 1.5rem; text-align: center;
  border: 1px dashed var(--border-interactive); border-radius: var(--r); color: var(--muted); cursor: pointer;
}
.upload__drop input { display: block; margin: 0 auto 0.5rem; width: auto; max-width: 100%; }
.upload p { margin: 0; }
/* min() в minmax: на 320px колонка в 240px плюс отступы шире экрана. */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 1rem; }
.pic { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.pic img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--sunken); }
.pic figcaption { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.75rem; font-size: 0.82rem; }
.pic strong { word-break: break-all; }
.pic__snippet { display: block; padding: 0.3rem 0.5rem; background: var(--sunken); border-radius: 4px; word-break: break-all; }
.pic__actions { display: flex; gap: 0.4rem; margin-top: 0.4rem; }
.pic__actions form { margin: 0; }

/* Сборка */
.job { margin-top: 1.5rem; }
.job h2 { display: flex; align-items: center; gap: 0.6rem; margin-top: 0; }
.log { background: var(--sunken); border: 1px solid var(--border); border-radius: var(--r); padding: 0.75rem; max-height: 420px; overflow: auto; margin: 0; }

@media (max-width: 860px) {
  .top { flex-wrap: wrap; height: auto; padding: 0.6rem 1rem; gap: 0.75rem; }
  /* Пять пунктов в одну строку на 390px не влезают: без переноса
     страница едет вбок на 74px. */
  .top__nav { width: 100%; order: 3; flex-wrap: wrap; gap: 0.5rem 1rem; }
  .wrap { padding: 1rem; }
  .editor { grid-template-columns: 1fr; }
  .editor__meta { position: static; }
  .row { grid-template-columns: 1fr; }
  .list { display: block; overflow-x: auto; }
  textarea.body { min-height: 50vh; }
}

/* Метаданные */
.meta { display: flex; flex-direction: column; gap: 1.5rem; }
.meta__block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem 1.25rem; }
.meta__block h2 { margin: 0 0 0.75rem; font-size: 1rem; }
.meta__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.meta__col { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.meta__col p { margin: 0; }
@media (max-width: 860px) { .meta__grid { grid-template-columns: 1fr; } }

/* Меню */
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
textarea.outline { font-family: var(--mono); font-size: 0.85rem; line-height: 1.5; white-space: pre; overflow-x: auto; }
.pending { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; }
.pending li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); padding: 0.25rem 0; }
@media (max-width: 860px) { .menu-grid { grid-template-columns: 1fr; } }

/* Редактор: вкладки и предпросмотр */
.tabs { display: flex; align-items: center; gap: 0.25rem; }
.tabs .field__label { margin-right: auto; }
.tab { border: 1px solid var(--border-strong); background: transparent; color: var(--muted); font: inherit; font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: 999px; cursor: pointer; }
.tab[aria-selected="true"] { border-color: var(--signal); color: var(--text); }
.pane { display: grid; gap: 0.75rem; }
.pane[data-pane="split"] { grid-template-columns: 1fr 1fr; }
.preview { min-height: 70vh; padding: 1rem 1.25rem; background: #fff; color: #111318; border-radius: var(--r); overflow: auto; line-height: 1.6; }
.preview h1, .preview h2, .preview h3 { line-height: 1.2; margin: 1.2em 0 0.5em; }
.preview h1 { font-size: 1.8rem; } .preview h2 { font-size: 1.35rem; } .preview h3 { font-size: 1.1rem; }
.preview p, .preview ul, .preview ol { margin: 0 0 0.9em; }
.preview a { color: #C94A0A; text-decoration: underline; }
.preview img { max-width: 100%; height: auto; border-radius: 6px; }
.preview code { background: #F3F4F6; color: #111318; padding: 0 0.25em; border-radius: 3px; }
.preview blockquote { border-left: 3px solid #E0640A; margin: 0 0 0.9em; padding-left: 1rem; color: #5F6670; }
.preview table { border-collapse: collapse; width: 100%; }
.preview th, .preview td { border: 1px solid #E5E7EB; padding: 0.35rem 0.6rem; text-align: left; }
.buildline { margin: 0; padding: 0.5rem 0.75rem; background: var(--sunken); border-left: 3px solid var(--gold); border-radius: var(--r); font-size: 0.9rem; }
.buildline.bad { border-left-color: var(--danger); }
.upload--inline { flex-direction: row; align-items: center; margin: 0.5rem 0 0.75rem; }
.upload--inline input[type=file] { width: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 860px) { .pane[data-pane="split"] { grid-template-columns: 1fr; } }

/* Роли, журнал, проверка */
.top__user { font-size: 0.8rem; color: var(--muted); margin-right: 0.75rem; }
.tag--review { border-color: var(--signal); color: var(--signal); }
.reviewline { margin: 0; padding: 0.5rem 0.75rem; background: var(--sunken); border-left: 3px solid var(--signal); border-radius: var(--r); font-size: 0.85rem; }
.history { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; }
.history--wide li { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: baseline; border-bottom: 1px solid var(--border); padding: 0.35rem 0; }
.findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.findings code { color: var(--text); }
.findings li.bad code { color: var(--danger); }

/* SEO-подсказки и сторож */
.seo-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; }
.seo-list li { display: flex; gap: 0.5rem; align-items: flex-start; justify-content: space-between; }
.seo-list li.ok { color: var(--ok); } .seo-list li.warn { color: var(--gold); } .seo-list li.bad { color: var(--danger); }
.seo-list li > span:first-child { flex: 1; color: var(--text); }
.seo-list--rw li { flex-direction: column; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--r); padding: 0.5rem 0.75rem; }
.seo-list--rw p { margin: 0 0 0.3rem; }
.seo--ai h3 { font-size: 0.95rem; margin: 0.9rem 0 0.2rem; }
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 1.5rem; align-items: start; }
.watch__report { min-height: 40vh; }
@media (max-width: 860px) { .watch { grid-template-columns: 1fr; } }

/* Переключатель языка интерфейса */
.top__lang { display: inline-flex; gap: 0.15rem; margin-right: 0.75rem; font-size: 0.8rem; border: 1px solid var(--muted); border-radius: 999px; padding: 0.1rem; }
.top__lang a { color: var(--muted); padding: 0.15rem 0.55rem; border-radius: 999px; text-decoration: none; font-weight: 600; }
.top__lang a[aria-current] { background: var(--signal); color: #050505; }

/* Замечания после сохранения: публикация не запрещена, но ошибки видны */
.flash--warn { border-left: 4px solid var(--signal); }
.flash--warn ul { margin: .4rem 0 0 1.1rem; padding: 0; }
.flash--warn li { margin: .15rem 0; }
.flash--risk { border: 2px solid var(--danger); border-left-width: 6px; font-size: 1.05rem; }
.flash--risk strong { color: var(--danger); font-size: 1.15rem; }
.flash--risk ul { margin: .4rem 0 0 1.1rem; padding: 0; }

/* Несколько сайтов и аккаунты (24.11.2026) */
.top__site select { background: var(--sunken); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 0.3rem 0.5rem; font: inherit; font-size: 0.85rem; max-width: 18rem; }
.top__cms { display: flex; align-items: center; gap: 0.9rem; font-size: 0.85rem; margin-right: 0.75rem; }
.top__cms a { color: var(--text); }
.top__cms a[aria-current] { box-shadow: inset 0 -2px 0 var(--signal); }
.top__cms .top__user { margin-right: 0; }
.top__logout { display: inline; margin: 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.linklike:hover { color: var(--signal); }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login { width: 100%; max-width: 24rem; }
.login__brand { margin-bottom: 1.5rem; font-size: 1.2rem; }
.login__form { display: grid; gap: 1rem; margin-top: 1rem; }
.login__lang { display: inline-flex; margin-top: 1.5rem; }
.login__hint { margin-top: 1rem; font-size: 0.85rem; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.4rem; letter-spacing: 0.05em; padding: 0.75rem 1rem; background: var(--sunken); border: 1px dashed var(--signal); border-radius: var(--r); display: inline-block; user-select: all; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.4rem 1rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem; align-items: start; }
.inline-form { display: inline-flex; gap: 0.5rem; align-items: center; margin: 0; }
.inline-form select, .inline-form input { background: var(--sunken); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 0.25rem 0.4rem; font: inherit; font-size: 0.85rem; }
.invite-link { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.invite-link input { flex: 1 1 28rem; min-width: 0; background: var(--sunken); color: var(--text); border: 1px dashed var(--signal); border-radius: var(--r); padding: 0.55rem 0.75rem; font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9rem; }

/* Языки рынков (de, pl, el, hu) — свёрнутая группа в формах (24.11.2026) */
.langs-extra { margin-top: 1rem; }
.langs-extra > summary { cursor: pointer; padding: 0.5rem 0; }
.langs-extra[open] > summary { margin-bottom: 0.75rem; }

/* Логотип бренда в форме (24.11.2026) */
.brand-logo__img { display: block; max-width: 180px; max-height: 72px; margin: 0.25rem 0 0.5rem; background: var(--sunken); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 0.4rem; object-fit: contain; }

/* Тексты интерфейса (24.11.2026) */
.ui-langs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }
.ui-tools { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 0.75rem 0 1rem; }
.ui-tools input[type=search] { flex: 1 1 18rem; min-width: 0; background: var(--sunken); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 0.5rem 0.75rem; font: inherit; }
.ui-sec > summary { cursor: pointer; padding: 0.25rem 0; }
.ui-row { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr 1fr; gap: 0.5rem 1rem; align-items: start; padding: 0.5rem 0; border-top: 1px solid var(--border-strong); }
.ui-row__key code { font-size: 0.75rem; word-break: break-all; }
.ui-row__default { font-size: 0.85rem; }
.ui-row input, .ui-row textarea { width: 100%; background: var(--sunken); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 0.4rem 0.6rem; font: inherit; font-size: 0.9rem; }
.ui-row.is-changed input, .ui-row.is-changed textarea { border-color: var(--signal); }
.ui-actions { position: sticky; bottom: 0; background: var(--void); padding: 0.75rem 0; }
@media (max-width: 800px) { .ui-row { grid-template-columns: 1fr; } }
.ui-row[hidden], .ui-sec[hidden] { display: none; }

/* Клики (этап E, 24.11.2026) */
.clk-days { display: flex; gap: 3px; align-items: flex-end; height: 160px; padding: 0.5rem 0 1.75rem; overflow-x: auto; }
.clk-day { position: relative; flex: 1 0 14px; max-width: 40px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.clk-day__bar { display: block; width: 100%; min-height: 2px; background: var(--signal); border-radius: 3px 3px 0 0; }
.clk-day__n { font-size: 0.7rem; }
.clk-day__d { position: absolute; bottom: -1.5rem; font-size: 0.65rem; white-space: nowrap; }
.clk-n { text-align: right; font-variant-numeric: tabular-nums; width: 5rem; }
.clk-lost { border-color: var(--danger); }

/* ------------------------------------------------------------------
   Шапка в два ряда (24.11.2026): вверху — сайт, управление, язык,
   аккаунт; ниже — разделы сайта по группам. На узком экране второй
   ряд листается вбок одной строкой, а не разваливается на пять строк.
   ------------------------------------------------------------------ */
.top { height: 52px; gap: 1rem; position: relative; z-index: 11; }
.top__site select { max-width: 16rem; }
.top__right { display: flex; align-items: center; gap: 0.9rem; margin-left: auto; min-width: 0; }
.top__right .top__cms { margin-right: 0; }
.top__right .top__lang { margin-right: 0; }
.top__preview { white-space: nowrap; }
.top__me { position: relative; }
.top__me > summary { list-style: none; cursor: pointer; font-size: 0.82rem; padding: 0.3rem 0.6rem; border: 1px solid var(--border-strong); border-radius: 999px; white-space: nowrap; }
.top__me > summary::-webkit-details-marker { display: none; }
.top__me[open] > summary { border-color: var(--signal); }
.top__me-login { font-weight: 600; }
.top__me-menu { position: absolute; right: 0; top: calc(100% + 0.4rem); min-width: 13rem; display: grid; gap: 0.25rem; padding: 0.5rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); z-index: 20; }
.top__me-menu a, .top__me-menu .linklike { display: block; text-align: left; width: 100%; padding: 0.45rem 0.6rem; border-radius: var(--r); color: var(--text); font-size: 0.88rem; }
.top__me-menu a:hover, .top__me-menu .linklike:hover { background: var(--sunken); color: var(--signal); }

.subnav { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.subnav__inner { display: flex; align-items: stretch; gap: 0.25rem; padding: 0 1.5rem; overflow-x: auto; scrollbar-width: thin; }
.subnav__group { display: flex; align-items: center; gap: 0.1rem; padding: 0 0.75rem 0 0; margin-right: 0.5rem; border-right: 1px solid var(--border); flex-shrink: 0; }
.subnav__group:last-child { border-right: 0; }
.subnav__label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-right: 0.35rem; white-space: nowrap; }
.subnav__group.is-active .subnav__label { color: var(--signal); }
.subnav a { color: var(--text); font-weight: 500; font-size: 0.9rem; padding: 0.7rem 0.55rem; white-space: nowrap; border-radius: var(--r) var(--r) 0 0; }
.subnav a:hover { color: var(--signal); }
.subnav a[aria-current] { box-shadow: inset 0 -2px 0 var(--signal); color: var(--signal); }
.subnav__badge { display: inline-block; min-width: 1.2rem; padding: 0 0.35rem; margin-left: 0.15rem; border-radius: 999px; background: var(--gold); color: var(--void); font-size: 0.7rem; font-weight: 700; line-height: 1.2rem; text-align: center; }
.subnav__badge--warn { background: var(--signal); }

@media (max-width: 860px) {
  .top { height: auto; flex-wrap: wrap; padding: 0.55rem 1rem; gap: 0.5rem 0.75rem; }
  .top__right { width: 100%; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-left: 0; }
  .top__site select { max-width: 100%; }
  .subnav__inner { padding: 0 1rem; }
}
@media (max-width: 480px) {
  .top__cms { gap: 0.7rem; }
  .top__me > summary .muted { display: none; }
}
/* Ряд разделов помещается без прокрутки от ~1100 px: на средних экранах
   подписи групп мельче, на узких — только разделитель (24.11.2026). */
@media (max-width: 1440px) {
  .subnav__inner { padding: 0 1rem; gap: 0; }
  .subnav a { padding: 0.7rem 0.45rem; font-size: 0.87rem; }
  .subnav__group { padding-right: 0.5rem; margin-right: 0.5rem; }
  .subnav__label { font-size: 0.6rem; margin-right: 0.15rem; }
}
@media (max-width: 1720px) {
  .subnav__label { display: none; }
  .subnav__group { padding-right: 0.35rem; margin-right: 0.35rem; }
}
/* Формы в шапке страницы («+ Новый текст» и т. п.) переносятся на узком экране */
.head__actions { flex-wrap: wrap; }
.inline-form { flex-wrap: wrap; max-width: 100%; }
.inline-form select { max-width: 100%; }

/* Ссылки (linkcheck, 24.11.2026) */
.links td { vertical-align: top; }
.links__url { word-break: break-all; font-size: 0.8rem; }
.links__uses { list-style: none; margin: 0.35rem 0; padding: 0; font-size: 0.85rem; }
.links__chain summary { cursor: pointer; font-size: 0.8rem; }
.links__chain ol { margin: 0.35rem 0 0 1.1rem; padding: 0; font-size: 0.8rem; }
.links__hist { display: flex; gap: 2px; margin-top: 0.35rem; }
.links__dot { width: 7px; height: 7px; border-radius: 2px; background: var(--border-strong); }
.links__dot--ok { background: var(--ok); }
.links__dot--bad { background: var(--danger); }
.links__dot--draft { background: var(--gold); }

/* Агент-копирайтер (25.11.2026) */
.agent > summary strong, .agent > summary { font-weight: 600; }
.agent__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.agent__row select { width: 100%; }
.agent__actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin: 0.5rem 0; }
.agent__chat { display: grid; grid-template-columns: 1fr auto; gap: 0.4rem; align-items: end; margin: 0.5rem 0; }
.agent__chat textarea, .agent input[type=text] { width: 100%; background: var(--sunken); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 0.4rem 0.6rem; font: inherit; }
.agent__out { max-height: 26rem; overflow: auto; white-space: pre-wrap; background: var(--sunken); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 0.6rem 0.8rem; font-size: 0.9rem; }
.agent__out:empty { display: none; }
.agent__insert { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0; }
.agent__nt { margin: 0.6rem 0 0.2rem; font-size: 0.85rem; font-weight: 600; }
.agent__notes ul { margin: 0 0 0 1.1rem; padding: 0; font-size: 0.85rem; }
.agent__notes .is-bad { color: var(--danger); }
.agent__notes .is-warn { color: var(--gold); }
.agent__meta td { font-size: 0.82rem; vertical-align: top; }
.agent__meta .is-ok { color: var(--ok); font-weight: 700; }
.agent__meta .is-bad { color: var(--danger); font-weight: 700; }
.agent__hist pre { white-space: pre-wrap; font-size: 0.8rem; max-height: 14rem; overflow: auto; }
@media (max-width: 860px) { .agent__row { grid-template-columns: 1fr; } }
.agent__meta button { white-space: nowrap; }

/* Агент: режим «С моделью / Без модели» (25.11.2026) */
.agent__mode { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; align-items: center; margin: 0.25rem 0 0.5rem; }
.agent__mode label { display: inline-flex; gap: 0.35rem; align-items: center; cursor: pointer; }
.agent__mode label.is-off { opacity: 0.5; cursor: not-allowed; }
.agent__mode-why { flex-basis: 100%; font-size: 0.85em; }
.agent [data-need-model]:disabled { opacity: 0.45; cursor: not-allowed; }
.agent__foot { font-size: 0.8em; margin: 0.5rem 0 0; }
.agent__mode label { width: auto; flex-direction: row; white-space: nowrap; font-weight: normal; }
.agent__mode input[type=radio] { width: auto; margin: 0; flex: none; }
.agent__who { font-size: 0.85em; margin: 0.25rem 0 0; }

/* Команда (28.11.2026) */
.team__legend { display: flex; gap: 1rem; flex-wrap: wrap; margin: .5rem 0; font-size: .85em; }
.team__dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .4rem; vertical-align: middle; background: var(--border-interactive); flex: none; }
.team__dot.is-busy { background: var(--ok); box-shadow: 0 0 0 3px rgba(58,166,90,.25); }
.team__dot.is-idle { background: var(--gold); }
.team__dot.is-off { background: #4a4a4a; }
.team__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .75rem; margin: .5rem 0 1.5rem; }
.team__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: .8rem 1rem; min-width: 0; }
.team__card.is-busy { border-color: rgba(58,166,90,.55); }
.team__card.is-off { opacity: .7; }
.team__card-head { display: flex; align-items: center; gap: .15rem; margin-bottom: .3rem; }
.team__line { margin: .15rem 0; font-size: .85em; overflow-wrap: anywhere; }
.team__chips { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0; }
.team__task { font-size: .9em; margin: .4rem 0; overflow-wrap: anywhere; }
.team__helpers { list-style: none; padding: 0; margin: .4rem 0 0; font-size: .85em; }
.team__helpers li { margin: .2rem 0; overflow-wrap: anywhere; }
.team__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
@media (max-width: 960px) { .team__grid { grid-template-columns: 1fr; } }
.team__graph { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: .5rem; }
.team__svg { width: 100%; height: auto; display: block; }
.team__edge { stroke: var(--signal); opacity: .75; }
.team__arrow { fill: var(--signal); }
.team__edge-n { fill: var(--text); font-size: 11px; paint-order: stroke; stroke: var(--void); stroke-width: 3px; }
.team__node circle { fill: var(--sunken); stroke: var(--border-interactive); stroke-width: 1.5; }
.team__node.is-busy circle { stroke: var(--ok); stroke-width: 2.5; }
.team__node text { fill: var(--text); font-size: 10px; }
.team__feed { list-style: none; padding: 0; margin: 0; max-height: 480px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.team__ev { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .5rem; padding: .4rem .7rem; border-bottom: 1px solid var(--border); font-size: .88em; }
.team__ev:last-child { border-bottom: 0; }
.team__ev-text { overflow-wrap: anywhere; }
.team__ev.is-release strong { color: var(--gold); }
.team__ev.is-agent strong { color: var(--muted); }
.team__ask { background: var(--surface); border: 1px solid var(--gold); border-radius: var(--r); padding: .6rem 1rem; margin: .75rem 0; }
.team__ask ol { margin: .3rem 0 0; padding-left: 1.6rem; }
.team__ask li { margin: .25rem 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .team__ev { grid-template-columns: 1fr; gap: 0; } }

/* Семантика и форма текста (28.11.2026) */
.sem__cov { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: .6rem 1rem; margin: .75rem 0; }
.sem__bars { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
@media (max-width: 860px) { .sem__bars { grid-template-columns: 1fr; } }
.sem__row { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 4.5rem; gap: .5rem; align-items: center; font-size: .85em; margin: .2rem 0; }
.sem__row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sem__bar { display: flex; height: .6rem; background: var(--sunken); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.sem__bar i, .sem__legend i { display: block; height: 100%; }
.sem__bar .is-live, .sem__legend .is-live { background: var(--ok); }
.sem__bar .is-review, .sem__legend .is-review { background: var(--gold); }
.sem__bar .is-draft, .sem__legend .is-draft { background: var(--signal); }
.sem__legend { font-size: .8em; display: flex; gap: .3rem .8rem; flex-wrap: wrap; align-items: center; }
.sem__legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .25rem; vertical-align: middle; background: var(--sunken); border: 1px solid var(--border-strong); }
.sem__filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .75rem 0; }
.sem__filters input[type=search] { flex: 1 1 16rem; width: auto; }
.sem__filters select { width: auto; }
.sem__id { font-family: var(--mono); font-size: .75em; }
.sem__dots { display: inline-flex; gap: .2rem; }
.sem__dots i { font-style: normal; font-size: .7em; padding: .1rem .3rem; border-radius: 4px; border: 1px solid var(--border-strong); color: var(--muted); }
.sem__dots i.is-live { background: var(--ok); color: var(--void); border-color: var(--ok); }
.sem__dots i.is-review { background: var(--gold); color: var(--void); border-color: var(--gold); }
.sem__dots i.is-draft { background: var(--signal); color: var(--void); border-color: var(--signal); }
.sem__card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.5rem; }
@media (max-width: 960px) { .sem__card { grid-template-columns: 1fr; } }
.sem__tails { columns: 2; column-gap: 1.5rem; padding-left: 1.1rem; font-size: .9em; }
@media (max-width: 480px) { .sem__tails { columns: 1; } }
.sem__excl ul { font-size: .85em; }
.tz, .ccard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: .6rem .9rem; margin-bottom: .75rem; font-size: .9em; }
.tz h3 { margin: 0 0 .3rem; font-size: 1em; }
.tz__kind select { width: auto; max-width: 100%; }
.tz__checks, .ccard__tails { list-style: none; padding: 0; margin: .3rem 0 0; }
.tz__checks li, .ccard__tails li { margin: .15rem 0; overflow-wrap: anywhere; }
.tz .is-ok, .ccard .is-ok { color: var(--ok); }
.tz .is-warn, .ccard .is-warn { color: var(--gold); }
.ccard__head { margin: 0 0 .3rem; }
.revision__diff { max-height: 360px; overflow: auto; font-size: .8em; white-space: pre-wrap; background: var(--sunken); padding: .5rem; border-radius: var(--r); }
.sem__card td .btn { white-space: nowrap; }

/* Статус текста и кнопки действий (UX-аудит 28.11) */
.status { display: inline-block; vertical-align: middle; font-size: .5em; font-weight: 600; padding: .2em .6em; border-radius: 99px; margin-left: .4rem; border: 1px solid; }
.status--draft { color: var(--muted); border-color: var(--border-strong); }
.status--review { color: var(--gold); border-color: var(--gold); }
.status--live { color: var(--ok); border-color: var(--ok); }
.editor__actions--sticky { position: sticky; bottom: 0; z-index: 5; background: var(--void); padding: .6rem 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.return { display: inline-block; }
.return[open] { display: block; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: .5rem; }
.return > summary { list-style: none; cursor: pointer; }
.return > summary::-webkit-details-marker { display: none; }
.returned p { margin: .2rem 0; overflow-wrap: anywhere; }
.chips { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.chip { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 99px; padding: .25rem .7rem; font: inherit; font-size: .85em; cursor: pointer; }
.chip small { color: var(--muted); margin-left: .2rem; }
.chip[aria-pressed="true"] { border-color: var(--signal); color: var(--signal); }
.subnav__badge-link { text-decoration: none; margin-left: -.4rem; }
.editor__actions--sticky { gap: .35rem; padding: .45rem 0; }
.editor__actions--sticky .btn, .editor__actions--sticky .return > summary { padding: .35rem .75rem; font-size: .85em; }
.editor__actions--sticky .return[open] { order: 10; }

/* Форма текста — раскладка по UX-аудиту §3 (P2, 28.11.2026) */
.tf__head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .25rem 1rem; margin-bottom: .5rem; }
.tf__head h1 { flex: 1 1 auto; margin: .1rem 0; font-size: 1.5rem; min-width: 0; overflow-wrap: anywhere; }
.tf__crumbs { flex-basis: 100%; margin: 0; font-size: .85em; }
.tf__more { position: relative; }
.tf__more > summary { list-style: none; cursor: pointer; }
.tf__more > summary::-webkit-details-marker { display: none; }
.tf__more-menu { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 20; min-width: 15rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); padding: .5rem .75rem; display: grid; gap: .4rem; font-size: .9em; }
.tf__danger { color: var(--danger); }
.tf__topic { display: flex; flex-wrap: wrap; align-items: end; gap: .3rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: .5rem .8rem; margin-bottom: .75rem; }
.tf__topic-field { display: grid; gap: .2rem; flex: 1 1 18rem; min-width: 0; }
.tf__topic-label { flex: 2 1 16rem; min-width: 0; overflow-wrap: anywhere; padding-bottom: .5rem; }
.tf__topic-link { padding-bottom: .5rem; white-space: nowrap; }
.tf__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 1.25rem; align-items: start; }
.tf__main { display: grid; gap: .75rem; min-width: 0; }
.tf__h1 input { font-size: 1.15rem; font-weight: 600; }
.tf__toolbar { display: flex; flex-wrap: wrap; gap: .25rem; margin: .35rem 0; }
.tf__toolbar button { background: var(--sunken); color: var(--text); border: 1px solid var(--border-strong); border-radius: 6px; min-width: 2.1rem; height: 2rem; font: inherit; font-size: .9em; cursor: pointer; }
.tf__toolbar button:hover, .tf__toolbar button[aria-expanded="true"] { border-color: var(--signal); color: var(--signal); }
.tf__link { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .25rem 0; }
.tf__link input { flex: 1 1 16rem; width: auto; }
.tf__help { font-size: .8em; background: var(--sunken); padding: .5rem .7rem; border-radius: var(--r); margin: .25rem 0; white-space: pre-wrap; }
.tf__fold { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: .45rem .8rem; }
.tf__fold > summary { cursor: pointer; overflow-wrap: anywhere; }
.tf__fold[open] > summary { margin-bottom: .5rem; }
.tf__fold .bad { color: var(--gold); }
.tf__side { position: sticky; top: .75rem; max-height: calc(100vh - 6rem); overflow: auto; min-width: 0; }
.tf__side-tabs { display: flex; gap: .3rem; margin-bottom: .5rem; position: sticky; top: 0; background: var(--void); padding-bottom: .3rem; z-index: 2; }
.tf__badge:not(:empty) { display: inline-block; min-width: 1.2rem; padding: 0 .3rem; border-radius: 99px; background: var(--danger); color: #fff; font-size: .75em; text-align: center; margin-left: .25rem; }
.tf__side .agent { border: 0; padding: 0; }
.tf__actions { position: sticky; bottom: 0; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; background: var(--void); border-top: 1px solid var(--border-strong); padding: .55rem 0; margin-top: 1rem; }
.tf__actions-gap { flex: 1 1 auto; }
.tf__actions .return { position: relative; }
.tf__actions .return > summary { list-style: none; cursor: pointer; }
.tf__actions .return > summary::-webkit-details-marker { display: none; }
.tf__actions .return__box { position: absolute; bottom: calc(100% + .4rem); right: 0; width: min(26rem, 90vw); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); padding: .6rem; display: grid; gap: .4rem; }
.tf__actions .return[open] { display: inline-block; width: auto; background: none; border: 0; padding: 0; }
.tf .body { min-height: 26rem; }
@media (max-width: 1023px) {
  .tf__grid { grid-template-columns: 1fr; }
  .tf__side { position: static; max-height: none; }
}
@media (max-width: 719px) {
  .tf__head h1 { font-size: 1.2rem; }
  .tf__topic { padding: .4rem .6rem; }
  .tf__topic-link { padding-bottom: 0; }
  .tf .body { min-height: 18rem; }
  .tf__actions { margin: 1rem -16px 0; padding: .5rem 16px; }
  .tf__actions .btn { padding: .4rem .7rem; font-size: .85em; }
  .tf__actions [value="build"] { display: none; }    /* на телефоне — сохранить и главное действие роли */
}
.tf__link[hidden], .tf__help[hidden] { display: none; }
@media (max-width: 719px) {
  .tf__h1 small, .tf__topic .field__label { display: none; }
  .tf__topic { gap: .2rem .6rem; }
  .tf__topic-label { padding-bottom: 0; font-size: .8em; }
  .tf .reviewline, .tf .returned, .tf .revision { font-size: .85em; padding: .4rem .6rem; }
  .tf__crumbs { font-size: .78em; }
  .tabs .field__label { display: none; }
}
.home__write { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: .6rem 1rem 1rem; margin-bottom: 1.5rem; }
.home__write-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.home__write-head h1 { margin: .3rem 0; flex: 1 1 auto; }
.home__write-head select { width: auto; }
.home__topics { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .5rem; }
.home__topics li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: var(--r); background: var(--void); overflow-wrap: anywhere; }
.home__topics .btn { margin-left: auto; }
.agent__group-title { margin: .6rem 0 .1rem; font-size: .8em; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.agent__line { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin: .35rem 0; }
.agent__line input, .agent__line select { flex: 1 1 12rem; width: auto; min-width: 0; }
.tf__crumbs select { width: auto; padding: .15rem .4rem; font-size: 1em; }
@media (min-width: 1281px) and (max-width: 1720px) { .subnav__group a { padding-left: .5rem; padding-right: .5rem; } }

/* Сайты — рабочее место (28.11.2026) */
.sites__tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: -.25rem 0 1rem; border-bottom: 1px solid var(--border); }
.sites__tabs a { padding: .45rem .8rem; color: var(--text); text-decoration: none; border-radius: var(--r) var(--r) 0 0; }
.sites__tabs a[aria-current] { box-shadow: inset 0 -2px 0 var(--signal); color: var(--signal); }
.sites__sum { margin-bottom: .75rem; }
.sites__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 1rem; }
.sitecard { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: var(--r); padding: .8rem 1rem; display: grid; gap: .6rem; min-width: 0; }
.sitecard.is-bad { border-left-color: var(--danger); }
.sitecard.is-warn { border-left-color: var(--gold); }
.sitecard.is-ok { border-left-color: var(--ok); }
.sitecard__head { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.sitecard__head h2 { margin: 0; font-size: 1.2rem; display: flex; align-items: center; gap: .4rem; }
.sitecard__meta { margin: .15rem 0 0; font-size: .85em; overflow-wrap: anywhere; }
.sitecard__main { justify-self: start; white-space: normal; text-align: left; }
.sitecard__done { margin: 0; color: var(--ok); }
.sitecard__dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; flex: none; background: #555; }
.sitecard__dot.is-ok { background: var(--ok); }
.sitecard__dot.is-warn { background: var(--gold); }
.sitecard__dot.is-bad { background: var(--danger); }
.sitecard__dot.is-info { background: #6b7280; }
.sitecard__lights { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.sitecard__lights li { display: grid; grid-template-columns: .9rem minmax(7rem, 11rem) minmax(0, 1fr) auto; gap: .5rem; align-items: baseline; padding: .3rem 0; border-top: 1px solid var(--border); font-size: .9em; }
.sitecard__lights li:first-child { border-top: 0; }
.sitecard__label { font-weight: 600; }
.sitecard__text { color: var(--muted); overflow-wrap: anywhere; }
.sitecard__lights li.is-bad .sitecard__text { color: var(--text); }
.sitecard__go { white-space: nowrap; font-size: .9em; }
.sitecard__actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; border-top: 1px solid var(--border); padding-top: .6rem; }
.sitecard__group { margin-left: auto; }
.sitecard__group select { width: auto; }
@media (max-width: 600px) {
  .sitecard__lights li { grid-template-columns: .9rem minmax(0, 1fr); }
  .sitecard__text, .sitecard__go { grid-column: 2; }
  .sitecard__group { margin-left: 0; }
}
.wizard { max-width: 44rem; display: grid; gap: 1rem; }
.wizard__steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0; counter-reset: st; flex-wrap: wrap; }
.wizard__steps li { counter-increment: st; color: var(--muted); font-size: .9em; }
.wizard__steps li::before { content: counter(st); display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1px solid var(--border-strong); margin-right: .35rem; }
.wizard__steps li.is-on { color: var(--text); }
.wizard__steps li.is-on::before { background: var(--signal); color: var(--void); border-color: var(--signal); }
.wizard__step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: .8rem 1rem; display: grid; gap: .6rem; }
.wizard__step h2 { margin: 0; font-size: 1.1rem; }
.wizard__nav { display: flex; gap: .5rem; flex-wrap: wrap; }
.wizard__done { max-width: 52rem; }
.wizard__notes li, .wizard__next li { margin: .3rem 0; overflow-wrap: anywhere; }
.sites__sum .tile { cursor: pointer; font: inherit; color: inherit; text-align: left; }
.sites__sum .tile[aria-pressed="true"] { border-color: var(--signal); }
.sitecard__title { min-width: 0; }
.sitecard__domain { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.sitecard__who { margin: 0; text-align: right; font-size: .85em; flex: none; }
.sitecard__main { display: flex; gap: .5rem; align-items: center; min-height: 44px; justify-content: flex-start; }
.sitecard__main-tag { font-size: .7em; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.sitecard__lights-wrap > summary { cursor: pointer; display: flex; gap: .6rem; align-items: center; list-style: none; flex-wrap: wrap; }
.sitecard__lights-wrap > summary::-webkit-details-marker { display: none; }
.sitecard__lights-wrap > summary::after { content: "▾"; color: var(--muted); }
.sitecard__lights-wrap[open] > summary::after { content: "▴"; }
.sitecard__shapes { letter-spacing: .15em; font-style: normal; }
.sitecard__shapes i, .sitecard__shape { font-style: normal; }
.is-ok.sitecard__shape, .sitecard__shapes .is-ok { color: var(--ok); }
.is-warn.sitecard__shape, .sitecard__shapes .is-warn { color: var(--gold); }
.is-bad.sitecard__shape, .sitecard__shapes .is-bad { color: var(--danger); }
.is-info.sitecard__shape, .sitecard__shapes .is-info { color: var(--muted); }
.sitecard__lights { margin-top: .4rem; }
.groups__list { list-style: none; padding: 0; display: grid; gap: .5rem; }
.groups__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: .6rem .9rem; }
.groups__info { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; min-width: 0; }
.groups__chips { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.groups__edit > summary { list-style: none; cursor: pointer; }
.groups__edit > summary::-webkit-details-marker { display: none; }
.groups__edit[open] { flex-basis: 100%; }
@media (max-width: 600px) {
  .sitecard__main { width: 100%; }
  .sitecard__head { flex-direction: column; }
  .sitecard__who { text-align: left; }
}
.sites__cards { align-items: start; }
.sitecard { align-content: start; }
.sitecard__main { justify-self: start; width: auto; border-radius: var(--r); }
.sitecard__lights li { grid-template-columns: 1rem minmax(7rem, 10rem) minmax(0, 1fr); }
.sitecard__go { grid-column: 3; justify-self: start; }
@media (max-width: 600px) { .sitecard__main { width: 100%; justify-self: stretch; } }

/* Правки ядра (28.11.2026) */
.core__box { margin-top: 1.5rem; padding: 1rem; border: 1px solid var(--border); border-radius: 8px; }
.core__forms { display: grid; gap: .75rem; align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.core__forms details { border: 1px solid var(--border); border-radius: 6px; padding: .5rem .75rem; }
.core__forms form { display: grid; gap: .5rem; margin-top: .5rem; }
.core__forms label { display: grid; gap: .25rem; }
.core__act { display: inline-flex; gap: .35rem; align-items: center; margin: .15rem 0; flex-wrap: wrap; }
.core__act input { max-width: 14rem; }
.core__filter a[aria-current] { font-weight: 600; }
.core__mine { padding-left: 1.1rem; }
@media (max-width: 700px) { .core__list td { display: block; } .core__list thead { display: none; } }

/* Блоки конструктора в форме текста (28.11.2026) */
.tf__blk-btn { font-weight: 600; }
.tf__offers { margin-top: .5rem; }
.blkd { width: min(760px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--text); }
.blkd::backdrop { background: rgb(0 0 0 / .6); }
.blkd__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.blkd__head h2 { margin: 0; font-size: 1.1rem; }
.blkd__body { padding: 1rem; }
.blkd__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); }
.blkd__item { width: 100%; display: grid; gap: .25rem; text-align: left; padding: .5rem; border: 1px solid var(--border); border-radius: var(--r); background: var(--sunken); color: var(--text); cursor: pointer; min-height: 44px; }
.blkd__item:hover, .blkd__item:focus-visible { border-color: var(--signal); }
.blkd__item img { width: 100%; height: 90px; object-fit: contain; object-position: left top; background: #fff; border-radius: 4px; }
.blkd__form { display: grid; gap: .6rem; }
.blkd__set { border: 1px solid var(--border); border-radius: var(--r); padding: .5rem .75rem; max-height: 14rem; overflow: auto; }
.blkd__set .check { display: flex; gap: .4rem; align-items: baseline; margin: .15rem 0; }
.blkd__rows { display: grid; gap: .4rem; }
.blkd__row { display: grid; grid-template-columns: 1fr 1.4fr auto auto; gap: .35rem; align-items: start; }
.blkd__two { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
.blkd__mode { display: flex; gap: 1rem; flex-wrap: wrap; }
.blkd__err { color: var(--danger); margin: 0; }
.blkd__code { white-space: pre-wrap; font-family: var(--mono); font-size: .8rem; background: var(--sunken); padding: .5rem; border-radius: 6px; margin: 0 0 .5rem; }
.blkd__actions { display: flex; gap: .5rem; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--surface); padding: .5rem 0; }
@media (max-width: 600px) { .blkd__row, .blkd__two { grid-template-columns: 1fr; } }
.pblk__wrap { cursor: pointer; border-radius: var(--r); outline: 1px dashed transparent; }
.pblk__wrap:hover { outline-color: var(--signal); }
.pblk { margin: 1rem 0; padding: .75rem 1rem; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--sunken); }
.pblk strong { display: block; }
.pblk dl { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .75rem; margin: .4rem 0 0; font-size: .9rem; }
.pblk dt { color: var(--muted); }
.pblk dd { margin: 0; }
.pblk--off, .pblk--wait { color: var(--muted); border-style: dashed; background: transparent; }
.pblk--off strong { display: inline; }
.pblk--card { display: grid; grid-template-columns: 3rem 1fr auto; gap: .75rem; align-items: start; }
.pblk__logo { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 6px; background: var(--void); color: var(--gold); font-weight: 700; }
.pblk__score { color: var(--gold); font-weight: 700; }
.pblk__btn { display: inline-block; padding: .4rem .8rem; border-radius: 6px; background: var(--signal); color: #000; font-weight: 700; white-space: nowrap; }
.pblk--bonus { display: grid; gap: .3rem; }
.pblk--bonus code { border: 1px dashed var(--border-interactive); padding: .2rem .5rem; justify-self: start; }
.pblk--pc { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pblk--top { padding-left: 2rem; }
.pblk--top li { margin: .3rem 0; }
.pblk--top li strong { display: inline; }
.pblk--cmp { overflow-x: auto; }
.pblk--cmp table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.pblk--cmp th, .pblk--cmp td { padding: .3rem .5rem; border-bottom: 1px solid var(--border); text-align: left; }
.pblk--warning { border-left: 4px solid var(--signal); }
.pblk--tip { border-left: 4px solid var(--gold); }
.pblk--note { border-left: 4px solid var(--border-interactive); }
.pblk--faq details { margin: .3rem 0; }
.pblk--faq summary { font-weight: 700; }
.blkc { margin-bottom: .75rem; padding: .5rem .75rem; border: 1px solid var(--border-strong); border-radius: var(--r); }
.blkc p { margin: 0 0 .25rem; }
.blkc ul { margin: 0 0 .25rem; padding-left: 1.1rem; font-size: .9rem; }
.blkc__err li { color: var(--danger); }
.blkc__warn li { color: var(--gold); }
/* предпросмотр текста светлый — блоки в нём тоже светлые */
.preview .pblk { background: #f4f5f6; color: #15181a; border-color: #d5d8db; }
.preview .pblk dt, .preview .pblk--off, .preview .pblk--wait { color: #5b6165; }
.preview .pblk--off { background: transparent; }
.preview .pblk__logo { background: #15181a; color: #f6a313; }
.preview .pblk__score { color: #b5530a; }
.preview .pblk--cmp th, .preview .pblk--cmp td { border-color: #d5d8db; border-left: 0; border-right: 0; border-top: 0; }
.preview .pblk--bonus code { border-color: #8a9094; }

/* Конструктор страниц: секции (28.11.2026) */
.tf__grid.tf--sections { grid-template-columns: 272px minmax(0, 1fr) minmax(300px, 360px); }
.tf__sections { min-width: 0; }
.tf__sections-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .4rem; }
.sec__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.sec__one { padding: .4rem 0; }
.sec__row { display: grid; grid-template-columns: 1.2rem 1.4rem 1fr auto auto; align-items: center; gap: .3rem; padding: .35rem .4rem; border: 1px solid var(--border); border-left: 3px solid transparent; border-radius: 6px; background: var(--surface); cursor: pointer; min-height: 44px; }
.sec__name { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.sec__name:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 3px; }
.sec__row.is-sel { border-left-color: var(--signal); }
.sec__row.is-off { color: var(--muted); }
.sec__row.is-err { border-color: var(--danger); }
.sec__row.is-drag { opacity: .5; }
.sec__row.is-over { box-shadow: 0 -2px 0 var(--signal); }
.sec__grip { cursor: grab; color: var(--muted); }
.sec__num { font-weight: 700; color: var(--muted); }
/* Название в две строки, а не «Первы…»: в 240 px с тремя кнопками
   влезало 6 букв. Обрезка — только у очень длинных своих названий. UX 28.11 */
/* Кнопка-название на всю высоту строки (цель нажатия ≥ 44 px), текст
   в две строки с «…». Clamp — на внутреннем span: Chrome не даёт
   <button> display:-webkit-box (вычисляется flow-root). UX 28.11 */
.sec__name { align-self: stretch; display: flex; align-items: center; min-width: 0; overflow-wrap: break-word; hyphens: auto; line-height: 1.25; }
.sec__name > span { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.sec__state { color: var(--ok); }
.is-off .sec__state { color: var(--muted); }
.sec__m { display: inline-flex; gap: .1rem; align-items: center; }
.sec__btn { width: 1.6rem; height: 1.6rem; min-width: 24px; min-height: 24px; padding: 0; border: 1px solid var(--border); background: var(--sunken); color: var(--text); border-radius: 4px; cursor: pointer; }
.sec__btn:disabled { opacity: .35; cursor: default; }
.sec__menu { position: relative; }
.sec__menu > summary { list-style: none; cursor: pointer; padding: 0 .3rem; min-width: 24px; min-height: 1.6rem; display: grid; place-items: center; }
.sec__menu > summary::-webkit-details-marker { display: none; }
.sec__menu > div { position: absolute; right: 0; top: 100%; z-index: 5; display: grid; min-width: 11rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; padding: .25rem; }
.sec__menu > div button { text-align: left; background: none; border: 0; color: var(--text); padding: .45rem .6rem; cursor: pointer; border-radius: 4px; min-height: 44px; }
.sec__menu > div button:hover { background: var(--sunken); }
.sec__danger { color: var(--danger) !important; }
.sec__add { margin: .5rem 0 0; display: flex; gap: .4rem; flex-wrap: wrap; }
.sec__live { min-height: 1.2rem; margin: .3rem 0 0; font-size: .85rem; }
.sec__current { margin: 0 0 .3rem; }
.sec__current .bad { color: var(--danger); }
.sec__menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: .35rem; margin-bottom: .6rem; }
.sec__dlg { width: min(560px, calc(100vw - 2rem)); }
@media (max-width: 1279px) and (min-width: 1024px) { .tf__grid.tf--sections { grid-template-columns: 240px minmax(0, 1fr) minmax(260px, 300px); } }
@media (max-width: 1023px) {
  .tf__grid.tf--sections { grid-template-columns: 1fr; }
  .tf__sections { order: -1; }
  .sec__grip { display: none; }
  .sec__row { grid-template-columns: 1.4rem 1fr auto auto; }
  /* Палец: ↑ ↓ ⋯ не меньше 44 px (эскиз §6). UX 28.11 */
  .sec__btn, .sec__menu > summary { width: 44px; height: 44px; min-height: 44px; }
  .sec__name { min-height: 44px; }
  .sec__m { gap: .25rem; }
}
/* выбор шаблона и «Шаблоны страниц» */
.tpl__grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.tpl__card { border: 1px solid var(--border); border-radius: var(--r); padding: .8rem 1rem; background: var(--surface); display: grid; gap: .4rem; align-content: start; }
.tpl__card.is-hint { border-color: var(--signal); }
.tpl__card h2 { margin: 0; font-size: 1.05rem; }
.tpl__slots { margin: 0; padding-left: 1.2rem; font-size: .9rem; }
.tpl__form { margin-bottom: 1.25rem; }
.tpl__table td { vertical-align: top; }
.tpl__table textarea { width: 100%; min-width: 14rem; font-family: var(--mono); font-size: .8rem; }
.tpl__move { white-space: nowrap; }
.hist__sec { margin: 0 0 .6rem; padding-left: 1.1rem; }
@media (max-width: 700px) { .tpl__table td { display: block; } .tpl__table thead { display: none; } }
.tf__custom { flex-basis: 100%; }
.tf__custom > summary { cursor: pointer; list-style: none; }
.tf__custom > summary::-webkit-details-marker { display: none; }
.tf__custom-box { display: grid; gap: .4rem; grid-template-columns: 1fr 1fr; margin-top: .4rem; }
.tf__custom-box p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 700px) { .tf__custom-box { grid-template-columns: 1fr; } }

/* Мастер «Новый сайт», этап 3: карточки типа и пресета, сетки языков/рынков/разделов */
.wz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .6rem; }
.wz-card { display: grid; gap: .25rem; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; align-content: start; }
.wz-card:has(input:checked) { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.wz-card input { position: absolute; opacity: 0; pointer-events: none; }
.wz-card:focus-within { outline: 2px solid var(--signal); outline-offset: 2px; }
.wz-card--preset img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--border); }
.wz-cards--presets { grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); }
.wz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .25rem .8rem; margin-bottom: .6rem; }
.wz-grid .check.is-muted { opacity: .5; }

.wizard__step[hidden], .check[hidden] { display: none; }
.wz-card { position: relative; }

/* Бренды: показ на сайте и порядок (29.11.2026) */
.brands-vis { margin: .75rem 0 1rem; }
.brands-vis__head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.check--big input { width: 1.2rem; height: 1.2rem; }
.brands-vis__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .25rem .8rem; }
.tag--off { background: var(--danger, #b3261e); color: #fff; }
.order__list { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .3rem; max-width: 40rem; }
.order__row { display: grid; grid-template-columns: 1.2rem 1.6rem 1fr auto; align-items: center; gap: .4rem; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); min-height: 44px; }
.order__row.is-drag { opacity: .5; }
.order__grip { cursor: grab; color: var(--muted); }
.order__num { font-weight: 700; color: var(--muted); }
.order__name { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.order__name:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 3px; }
.order__m { display: inline-flex; gap: .15rem; }
@media (max-width: 1023px) { .order__grip { display: none; } .order__row { grid-template-columns: 1.6rem 1fr auto; } .order__m .sec__btn { width: 44px; height: 44px; } }

/* Редактор: таблицы и разделитель панели (29.11.2026) */
.tf__sep { width: 1px; height: 1.6rem; background: var(--border-strong); margin: 0 .2rem; align-self: center; }
.tf__toolbar button:disabled { opacity: .45; cursor: default; }
.tbl-grid { display: grid; grid-template-columns: repeat(8, 1.6rem); gap: .2rem; }
.tbl-grid button { width: 1.6rem; height: 1.6rem; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--sunken); padding: 0; cursor: pointer; }
.tbl-grid button.is-on { background: var(--signal); border-color: var(--signal); }
.tbl-edit { border-collapse: collapse; width: 100%; }
.tbl-edit th, .tbl-edit td { border: 1px solid var(--border); padding: .2rem; vertical-align: top; }
.tbl-edit input { width: 100%; min-width: 6rem; }
.tbl-edit select { width: 100%; margin-top: .2rem; font-size: .85em; }
.tbl-edit__act { width: 2rem; text-align: center; }
@media (max-width: 1023px) { .tf__toolbar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; } .tbld { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; } }
.wdlg__list { margin: .5rem 0 1rem; padding-left: 1.2rem; } .wdlg__list li { margin: .2rem 0; }
.tf__blockers { margin: .5rem 0; }

/* Окно ссылки (редактор, раздел B) */
.lkd__list { list-style: none; margin: .2rem 0 .5rem; padding: 0; max-height: 11rem; overflow: auto; border: 1px solid var(--border); border-radius: 6px; }
.lkd__list:empty { display: none; }
.lkd__list button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: .35rem .5rem; font: inherit; color: inherit; cursor: pointer; }
.lkd__list button:hover, .lkd__list button:focus-visible { background: var(--sunken); }
.lkd__list small { color: var(--muted); }
.lkd__opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .2rem .8rem; margin: .4rem 0; }
.lkd__note { margin: .2rem 0; }
.blkc--links li.bad { color: var(--danger, #b3261e); }
@media (max-width: 1023px) { .lkd { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; } }

/* Окно картинки (редактор, раздел C) */
.imd__tabs { display: flex; gap: .3rem; margin-bottom: .5rem; }
.imd .picker { max-height: 14rem; overflow: auto; }
.imd__chosen { display: flex; gap: .6rem; align-items: center; margin: .5rem 0; }
.imd__chosen img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.imd .picker__item.is-on { outline: 2px solid var(--signal); }
@media (max-width: 1023px) { .imd { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; } }
.pblk--video img { max-width: 320px; width: 100%; border-radius: 6px; display: block; }

/* Аудит UX 29.11: порядок на телефоне и планшете — заголовок и текст сразу; секции, тема, поиск и проверка ниже.
   Только узкий экран или касание — на десктопе своя сетка ниже. */
@media (max-width: 1023px), (pointer: coarse) and (max-width: 1365px) {
  .tf { display: flex; flex-direction: column; }
  .tf > * { order: 2; }
  .tf > .flash, .tf > .reviewline, .tf > .returned, .tf > .revision { order: 0; }
  .tf__grid { order: 1; }
  .tf__topic { order: 3; }
  .tf__actions { order: 4; }
  .tf__grid > .tf__main { order: 1; }
  .tf__grid > .tf__sections { order: 2; }
  .tf__grid > .tf__side { order: 3; }
  /* цели касания не меньше 44 px */
  .tf__toolbar button, .tf__more > summary, .sec__menu > summary, .sec__btn, .tab, .chip { min-height: 44px; min-width: 44px; }
  .tf__toolbar button { height: 44px; }
  /* липкая панель кнопок — один ряд с прокруткой, без второго ряда */
  .tf__actions { flex-wrap: nowrap; overflow-x: auto; gap: .3rem; padding: .35rem 16px; }
  .tf__actions .btn { white-space: nowrap; padding: .45rem .7rem; }
  .tf__actions .tf__saved { display: none; }
  .tf__actions .tf__blockers { flex: 0 0 100%; }
}
/* Полоса «Вернуть/Отбросить» — заметная и не сдвигает форму незаметно: липнет к верху */
.flash--restore { position: sticky; top: .25rem; z-index: 30; border: 2px solid var(--signal); }
/* Меню ⋯: опасные действия отдельной группой */
.tf__more-menu hr { border: 0; border-top: 1px solid var(--border-strong); margin: .4rem 0; }
.tf__more-menu .tf__danger-title { font-size: .8em; color: var(--muted); margin: 0 0 .2rem; }
.tf__versions { white-space: nowrap; }

/* Разница версий по-человечески */
.hdiff__fields { margin: .5rem 0; padding-left: 1.2rem; } .hdiff__fields del, .hdiff__body del { background: rgba(179, 38, 30, .25); text-decoration: line-through; color: inherit; }
.hdiff__fields ins, .hdiff__body ins { background: rgba(46, 160, 67, .3); text-decoration: none; }
.hdiff__body { white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; background: var(--sunken); border: 1px solid var(--border); border-radius: var(--r); padding: .75rem; font-size: .95em; line-height: 1.5; }
/* Предпросмотр в оформлении сайта */
.pv-root { background: var(--color-canvas, #fff); color: var(--color-on-canvas, #111); padding: 1.25rem 1.5rem; border-radius: 8px; min-height: 8rem; font-family: var(--font-text, system-ui, sans-serif); }
.pv-root h1, .pv-root h2, .pv-root h3 { font-family: var(--font-display, inherit); }
.tf .preview { background: transparent; padding: 0; }

/* Десктоп (жалоба владельца 29.11): рабочая область на всю ширину, три зоны рядом — слева секции и тема,
   в центре текст во весь экран, справа проверка, помощник и «как выглядит в поиске»; кнопки закреплены снизу. */
.wrap:has(form.tf) { max-width: none; }
@media (min-width: 1024px) {
  form.tf { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(320px, 400px); grid-template-areas: "top top top" "topic main side" "sec main side" "act act act"; grid-template-rows: auto auto 1fr auto; column-gap: 1.25rem; row-gap: .5rem; align-items: start; }
  :where(form.tf) > * { grid-column: 1 / -1; }
  form.tf > .flash, form.tf > .reviewline, form.tf > .returned, form.tf > .revision, form.tf > p.muted { grid-area: top; }
  .tf__grid, .tf__grid.tf--sections { display: contents; }
  .tf__topic { grid-area: topic; margin-bottom: 0; flex-direction: column; align-items: stretch; align-self: start; }
  .tf__topic > * { flex: 0 0 auto; }
  .tf__topic-label { padding-bottom: 0; }
  .tf__sections { align-self: start; }
  .tf__topic-link { white-space: normal; padding-bottom: 0; }
  .tf__sections { grid-area: sec; }
  .tf__main { grid-area: main; }
  .tf__side { grid-area: side; position: sticky; top: .5rem; max-height: calc(100vh - 1rem); }
  .tf__actions { grid-area: act; }
  .tf__toolbar { position: sticky; top: 0; z-index: 5; background: var(--void); padding: .3rem 0; margin: 0; }
  .tf .body { min-height: calc(100vh - 21rem); }
  .tf__sections .sec__row .sec__m { flex-wrap: wrap; }
}
@media (min-width: 1024px) and (max-width: 1365px) {
  form.tf { grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) minmax(280px, 340px); column-gap: .9rem; }
}
