/* Студия — интерфейс в духе корректуры.
   Бумага, типографская краска и одна корректорская киноварь: ей отмечено
   только то, что требует действия — правка, «Опубликовать», фокус. */

@font-face { font-family: "Unbounded"; src: url("fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 200 900; font-display: swap; unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Unbounded"; src: url("fonts/unbounded-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122; }
@font-face { font-family: "Golos Text"; src: url("fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-display: swap; unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Golos Text"; src: url("fonts/golos-text-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-display: swap; unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122; }

:root {
  --paper: #F2EEE5;      /* фон — бумага */
  --sheet: #FBF9F4;      /* поверхность — лист поверх бумаги */
  --ink: #1D1A16;        /* текст — краска */
  --ink-2: #5E574D;      /* вторичный текст (6.1:1 на бумаге) */
  --rule: #D9D1C1;       /* линейки и границы */
  --proof: #B8341A;      /* корректорская киноварь — единственный акцент (5.6:1) */
  --proof-wash: #F3DDD3; /* подложка правки */
  --ok: #2F5D3A;         /* «опубликовано» — только текстом, не заливкой */

  --display: "Unbounded", Georgia, serif;
  --body: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 15px/1.55 var(--body);
  background:
    radial-gradient(1200px 600px at 110% -10%, #E9E1D0 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #EDE5D5 0%, transparent 55%),
    var(--paper);
  min-height: 100vh;
}
/* бумажное зерно — едва заметное, чтобы фон не был «плоским дефолтом» */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 0 0.24 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* зерно под всем содержимым, но над фоном body; без z-index у детей —
   иначе каждый блок стал бы отдельным контекстом и fixed-слои застряли бы внутри */
body { isolation: isolate; }

a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--proof); }
:focus-visible { outline: 2px solid var(--proof); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s4); border-radius: 999px; cursor: pointer;
  font: 500 14px/1 var(--body); color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule); text-decoration: none; white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--proof); border-color: var(--proof); color: #FBF6F1; }
.btn.primary:hover { background: #9E2C15; border-color: #9E2C15; color: #FBF6F1; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { border-color: var(--rule); }
.btn.small { min-height: 36px; padding: 0 var(--s3); font-size: 13px; }
.btn.danger:hover { border-color: var(--proof); color: var(--proof); }
.btn .count {
  font: 600 11px/1 var(--display); background: #FBF6F1; color: var(--proof);
  border-radius: 999px; padding: 4px 7px; min-width: 22px; text-align: center;
}
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 999px;
  border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.icon-btn:hover { border-color: var(--rule); color: var(--ink); background: var(--sheet); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- поля */
label.field { display: block; }
.field-label { display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline;
  font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.field-hint { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.counter { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--proof); }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=date], input:not([type]), textarea, select {
  width: 100%; font: 400 15px/1.5 var(--body); color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; min-height: 44px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea { resize: vertical; min-height: 88px; }
input:hover, textarea:hover, select:hover { border-color: #BDB3A0; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px #1D1A1612; }
input::placeholder, textarea::placeholder { color: #8E867A; }

/* ---------------------------------------------------------------- вход */
.login {
  min-height: 100vh; display: grid; grid-template-columns: 1fr; padding-inline: var(--s4);
}
@media (min-width: 900px) { .login { grid-template-columns: 1.1fr 1fr; padding-inline: 0; } }
.login-art {
  display: none; position: relative; overflow: hidden; border-right: 1px solid var(--rule);
  padding: var(--s8); flex-direction: column; justify-content: space-between;
}
@media (min-width: 900px) { .login-art { display: flex; } }
.login-art .proof-sheet { font-family: var(--display); font-size: clamp(40px, 5vw, 76px); line-height: 1; letter-spacing: -.03em; }
.proof-sheet s { text-decoration: none; position: relative; color: var(--ink-2); }
.proof-sheet s::after { content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: .08em; background: var(--proof);
  transform-origin: left; animation: strike .6s .5s var(--ease) both; }
.proof-sheet ins { text-decoration: none; color: var(--proof); display: inline-block; animation: rise .6s 1s var(--ease) both; }
@keyframes strike { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(.3em); } to { opacity: 1; transform: none; } }
.login-form { display: grid; place-items: center; padding-block: var(--s7); }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { font-size: 28px; margin: var(--s2) 0 var(--s6); }
.stack > * + * { margin-top: var(--s4); }
.alert { border: 1px solid var(--proof); color: var(--proof); background: var(--proof-wash); border-radius: 10px;
  padding: var(--s3) var(--s4); font-size: 14px; }
.note { border: 1px solid var(--rule); background: var(--sheet); border-radius: 10px; padding: var(--s3) var(--s4); font-size: 14px; }

/* ------------------------------------------------------------ шапка */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--s4); min-height: 64px; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule);
}
.logo { font: 600 15px/1 var(--display); letter-spacing: -.02em; text-decoration: none; display: inline-flex;
  align-items: center; gap: var(--s2); min-height: 44px; }
.logo i { width: 10px; height: 10px; border-radius: 2px; background: var(--proof); transform: rotate(45deg); display: inline-block; }
.crumb { color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tabs { display: flex; gap: var(--s1); margin-left: var(--s4); }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s3); white-space: nowrap;
  text-decoration: none; font-size: 14px; color: var(--ink-2); border-radius: 999px; transition: color .2s var(--ease), background .2s var(--ease); }
.tabs a:hover { color: var(--ink); background: var(--sheet); }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: var(--s3); right: var(--s3); bottom: 6px; height: 2px; background: var(--ink); border-radius: 2px; }
.tabs .badge { font: 600 10px/1 var(--display); color: #FBF6F1; background: var(--proof); border-radius: 999px; padding: 3px 6px; }
.top .spacer { flex: 1; }
@media (max-width: 899px) {
  .top { flex-wrap: wrap; padding-block: var(--s1); }
  .tabs { order: 5; width: 100%; margin: 0; overflow-x: auto; }
  .crumb { display: none; }
}

/* ------------------------------------------------------------ страницы-списки */
.page { max-width: 1080px; margin-inline: auto; padding: var(--s7) var(--s4) var(--s9); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap;
  padding-bottom: var(--s5); border-bottom: 1px solid var(--ink); margin-bottom: var(--s5); }
.page-head h1 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--rule); }
.row > a, .row > .row-in { display: grid; grid-template-columns: 1fr auto; gap: var(--s4); align-items: center;
  padding: var(--s4) var(--s2); text-decoration: none; min-height: 64px; transition: background .2s var(--ease); border-radius: 8px; }
.row > a:hover { background: var(--sheet); color: var(--ink); }
.row h2 { font-size: 18px; line-height: 1.2; }
.leader { display: flex; align-items: baseline; gap: var(--s2); }
.leader::after { content: ""; flex: 1; border-bottom: 1px dotted #B9AF9C; transform: translateY(-4px); order: 2; }
.leader > :last-child { order: 3; }
.empty { padding: var(--s8) var(--s2); text-align: left; max-width: 52ch; }
.empty h2 { font-size: 20px; margin-bottom: var(--s3); }

/* ------------------------------------------------------------ редактор */
.studio { display: grid; grid-template-columns: minmax(360px, 460px) 1fr; height: calc(100vh - 64px); }
.panel { overflow-y: auto; border-right: 1px solid var(--rule); background: color-mix(in srgb, var(--sheet) 70%, transparent);
  overscroll-behavior: contain; }
.panel-head { padding: var(--s5) var(--s5) var(--s4); border-bottom: 1px solid var(--rule); }
.panel-head h1 { font-size: 22px; line-height: 1.1; margin-top: 6px; }
.stage { position: relative; display: flex; flex-direction: column; min-width: 0; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--s4); border-bottom: 1px solid var(--rule); min-height: 56px; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; background: var(--sheet); }
.seg button { min-height: 36px; padding: 0 var(--s3); border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
  font: 500 13px/1 var(--body); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.canvas { flex: 1; display: grid; place-items: center; padding: var(--s5); overflow: auto; min-height: 0; }
.frame { width: 100%; height: 100%; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: #fff;
  transition: width .4s var(--ease), height .4s var(--ease), border-radius .4s var(--ease); box-shadow: 0 1px 0 #fff inset, 0 24px 48px -32px #2a201540; }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.frame.phone { width: 390px; height: min(844px, 100%); border-radius: 36px; border: 10px solid var(--ink); }
.frame-loading { position: absolute; inset: 56px 0 0; display: grid; place-items: center; pointer-events: none; color: var(--ink-2); font-size: 13px; }

/* оглавление разделов */
.sec { border-bottom: 1px solid var(--rule); }
.sec-head { width: 100%; display: grid; grid-template-columns: 32px 1fr auto 20px; gap: var(--s3); align-items: center;
  padding: var(--s4) var(--s5); min-height: 64px; background: transparent; border: 0; cursor: pointer; text-align: left; color: var(--ink);
  font: inherit; transition: background .2s var(--ease); }
.sec-head:hover { background: var(--sheet); }
.sec-num { font: 500 12px/1 var(--display); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sec-title { font-weight: 600; font-size: 15px; }
.sec-sub { display: block; font-size: 12px; color: var(--ink-2); font-weight: 400; margin-top: 2px; }
.sec-chev { transition: transform .25s var(--ease); color: var(--ink-2); }
.sec[open] .sec-chev, .sec.open .sec-chev { transform: rotate(180deg); }
.sec-body { padding: var(--s2) var(--s5) var(--s6); display: grid; gap: var(--s5); }
.proof-count { font: 600 10px/1 var(--display); color: var(--proof); border: 1px solid var(--proof); border-radius: 999px; padding: 4px 7px; }

/* корректорская метка на изменённом поле — фирменный знак Студии */
.f { position: relative; }
.f.dirty::before {
  content: ""; position: absolute; left: calc(-1 * var(--s4)); top: 26px; width: 8px; height: 8px;
  border-left: 2px solid var(--proof); border-bottom: 2px solid var(--proof); transform: rotate(-45deg) translate(2px, -2px);
  animation: mark .25s var(--ease) both;
}
.f.dirty > .field-label .lbl::after { content: "правка"; margin-left: var(--s2); font: 500 10px/1 var(--display); letter-spacing: .06em;
  color: var(--proof); text-transform: uppercase; }
@keyframes mark { from { opacity: 0; transform: rotate(-45deg) translate(-6px, 6px); } }

/* списки */
.list { display: grid; gap: var(--s2); }
.item { border: 1px solid var(--rule); border-radius: 12px; background: var(--sheet); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.item:hover { border-color: #C3B9A6; }
.item.flash { animation: flash 1s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--proof-wash); border-color: var(--proof); } 100% { box-shadow: none; } }
.item-head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--s1); padding-left: var(--s4); min-height: 52px; }
.item-title { background: none; border: 0; text-align: left; font: 500 14px/1.3 var(--body); color: var(--ink); cursor: pointer;
  min-height: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0; }
.item-title .n { font: 500 11px/1 var(--display); color: var(--ink-2); margin-right: var(--s2); }
.item-tools { display: flex; }
.item-body { padding: 0 var(--s4) var(--s4); display: grid; gap: var(--s4); }
.add { border: 1px dashed #B9AF9C; background: transparent; border-radius: 12px; min-height: 52px; color: var(--ink-2);
  font: 500 14px/1 var(--body); cursor: pointer; transition: border-color .2s var(--ease), color .2s var(--ease); }
.add:hover { border-color: var(--proof); color: var(--proof); }
.add:disabled { opacity: .45; cursor: not-allowed; }

/* фото */
.img { display: grid; grid-template-columns: 112px 1fr; gap: var(--s3); align-items: center; }
.img-thumb { width: 112px; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--rule); background: #E6DFD1 center/cover no-repeat;
  display: grid; place-items: center; color: var(--ink-2); font-size: 11px; overflow: hidden; position: relative; }
.img-thumb.drop { border-color: var(--proof); box-shadow: 0 0 0 3px var(--proof-wash); }
.img-thumb progress { position: absolute; left: 8px; right: 8px; bottom: 8px; width: auto; height: 4px; accent-color: var(--proof); }
.img-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* низ панели и тосты */
.toast-wrap { position: fixed; left: 50%; bottom: var(--s5); transform: translateX(-50%); z-index: 50; display: grid; gap: var(--s2); width: min(92vw, 440px); }
.toast { background: var(--ink); color: var(--paper); border-radius: 12px; padding: var(--s3) var(--s4); font-size: 14px;
  display: flex; gap: var(--s3); align-items: center; justify-content: space-between; animation: rise .3s var(--ease) both; }
.toast.err { background: var(--proof); color: #FBF6F1; }
.toast button { background: none; border: 1px solid #ffffff55; color: inherit; border-radius: 999px; min-height: 36px; padding: 0 var(--s3); cursor: pointer; font: inherit; }

.drawer { position: fixed; inset: 0 0 0 auto; width: min(420px, 100vw); background: var(--sheet); border-left: 1px solid var(--rule);
  z-index: 40; transform: translateX(100%); transition: transform .3s var(--ease); display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--rule); }
.drawer-body { overflow-y: auto; padding: var(--s2) var(--s5) var(--s6); }
.scrim { position: fixed; inset: 0; background: #1D1A1640; z-index: 39; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.scrim.open { opacity: 1; pointer-events: auto; }
.banner { margin: var(--s4) var(--s5) 0; }

/* мобильный редактор: панель на весь экран, предпросмотр — поверх по кнопке */
.mobile-preview-btn { display: none; }
@media (max-width: 899px) {
  .studio { grid-template-columns: 1fr; height: auto; }
  .panel { border-right: 0; overflow: visible; padding-bottom: 96px; }
  .f.dirty::before { left: -12px; }
  .stage { position: fixed; inset: 0; z-index: 45; background: var(--paper); transform: translateY(100%); transition: transform .35s var(--ease); }
  .stage.open { transform: none; }
  .stage .seg { display: none; }
  .canvas { padding: 0; }
  .frame, .frame.phone { border-radius: 0; border: 0; width: 100%; height: 100%; }
  .mobile-preview-btn { display: flex; position: fixed; left: var(--s4); right: var(--s4); bottom: var(--s4); z-index: 30; gap: var(--s2); }
  .mobile-preview-btn .btn { flex: 1; box-shadow: 0 12px 32px -12px #1D1A1666; }
  .top .desktop-only { display: none; }
}

/* ------------------------------------------------------------ заявки */
.lead { border-bottom: 1px solid var(--rule); }
.lead summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: var(--s4); align-items: center; padding: var(--s4) var(--s2);
  min-height: 64px; cursor: pointer; border-radius: 8px; transition: background .2s var(--ease); }
.lead summary::-webkit-details-marker { display: none; }
.lead summary:hover { background: var(--sheet); }
.lead-name { font-weight: 600; }
.lead-meta { font-size: 13px; color: var(--ink-2); }
.status { font: 500 11px/1 var(--display); letter-spacing: .04em; border-radius: 999px; padding: 6px 9px; border: 1px solid var(--rule); white-space: nowrap; }
.status.new { border-color: var(--proof); color: var(--proof); }
.status.done { color: var(--ok); border-color: #9DB5A2; }
.lead-body { padding: 0 var(--s2) var(--s5); display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 720px) { .lead-body { grid-template-columns: 1fr 1fr; } }
.filters { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s4); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s3); border: 1px solid var(--rule); border-radius: 999px;
  text-decoration: none; font-size: 13px; color: var(--ink-2); background: var(--sheet); transition: border-color .2s var(--ease), color .2s var(--ease); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ------------------------------------------------------------ блог */
.post-grid { display: grid; grid-template-columns: 1fr; gap: var(--s6); }
@media (min-width: 1000px) { .post-grid { grid-template-columns: 1fr 340px; } }
.body-editor { min-height: 420px; font: 400 16px/1.7 var(--body); }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s2); }
.article-preview { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: var(--s5); max-height: 520px; overflow: auto; }
.article-preview h2 { font-size: 22px; margin: var(--s5) 0 var(--s3); }
.article-preview img { max-width: 100%; border-radius: 6px; }
.side { display: grid; gap: var(--s5); align-content: start; }
.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: var(--s5); }
.card h2 { font-size: 15px; margin-bottom: var(--s4); }
.serp { font-family: Arial, sans-serif; }
.serp .u { color: #3C6E3F; font-size: 13px; }
.serp .t { color: #1A0DAB; font-size: 17px; line-height: 1.3; margin: 2px 0; }
.serp .d { color: #4D5156; font-size: 13px; }

/* ------------------------------------------------------------ владелец */
.issued { border: 2px solid var(--proof); background: var(--sheet); border-radius: 14px; padding: var(--s5); margin-bottom: var(--s6); }
.issued code { font: 600 18px/1.4 var(--display); letter-spacing: -.01em; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--s4); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 500; color: var(--ink-2); font-size: 12px; padding: var(--s2); border-bottom: 1px solid var(--ink); }
table.t td { padding: var(--s3) var(--s2); border-bottom: 1px solid var(--rule); vertical-align: middle; }
.scroll-x { overflow-x: auto; }

/* ------------------------------------------------------------ тестирование */
.qa-stats { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s7); }
.stat { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4); border: 1px solid var(--rule);
  border-radius: 999px; background: var(--sheet); font-size: 14px; color: var(--ink-2); }
.stat b { font: 600 15px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat.ok b { color: var(--ok); }
.stat.bug { border-color: var(--proof); color: var(--proof); }
.stat.bug b { color: var(--proof); }
.qa-sec { margin-bottom: var(--s7); }
.qa-sec > h2 { font-size: 18px; padding-bottom: var(--s3); border-bottom: 1px solid var(--ink); margin-bottom: var(--s4); }
.qa-item { border: 1px solid var(--rule); border-radius: 14px; background: var(--sheet); padding: var(--s5); margin-bottom: var(--s3);
  display: grid; gap: var(--s4); scroll-margin-top: 80px; transition: border-color .2s var(--ease); }
.qa-item.bug { border-color: var(--proof); }
.qa-item.bug.fixed { border-color: #9DB5A2; }
.qa-item:target { box-shadow: 0 0 0 3px var(--proof-wash); }
.qa-head { display: flex; justify-content: space-between; gap: var(--s3); align-items: flex-start; flex-wrap: wrap; }
.qa-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.qa-num { font: 500 12px/1 var(--display); color: var(--ink-2); margin-right: var(--s2); font-variant-numeric: tabular-nums; }
.qa-how { font-size: 13px; color: var(--ink-2); margin: var(--s1) 0 0; max-width: 72ch; line-height: 1.5; }
.qa-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 720px) { .qa-grid { grid-template-columns: 1fr 1fr; } }
.qa-actions { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.qa-form { display: grid; gap: var(--s4); }
.qa-body { display: grid; gap: var(--s3); grid-template-columns: 1fr; align-items: end; }
@media (min-width: 720px) { .qa-body { grid-template-columns: 1fr auto; } }
.qa-item textarea { min-height: 56px; }
@media (max-width: 719px) {
  .seg.radio { display: grid; grid-template-columns: 1fr 1fr; border-radius: 16px; width: 100%; }
  .seg.radio label { display: flex; }
  .qa-item .seg.radio span { width: 100%; justify-content: center; min-height: 44px; }
  .qa-item .btn.small { min-height: 44px; }
}
.seg.radio { flex-wrap: wrap; gap: 2px; }
.seg.radio label { position: relative; display: inline-flex; }
.seg.radio input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg.radio span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 var(--s3); border-radius: 999px; color: var(--ink-2);
  font: 500 13px/1 var(--body); transition: background .2s var(--ease), color .2s var(--ease); white-space: nowrap; }
.seg.radio label:hover span { color: var(--ink); }
.seg.radio input:checked + span { background: var(--ink); color: var(--paper); }
.seg.radio input[value="ok"]:checked + span { background: var(--ok); color: #FBF6F1; }
.seg.radio input[value="bug"]:checked + span { background: var(--proof); color: #FBF6F1; }
.seg.radio input:focus-visible + span { outline: 2px solid var(--proof); outline-offset: 1px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---- данные и права, Telegram ---- */
@media (max-width: 720px) { .tabs { overflow-x: auto; margin-left: 0; max-width: 100%; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; } }
.legal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 640px) { .legal-grid { grid-template-columns: 1fr; } .field-label { flex-wrap: wrap; } }
.check { display: grid; grid-template-columns: 24px 1fr; gap: var(--s3); align-items: start; min-height: 44px; cursor: pointer; }
.check input[type=checkbox] { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--proof); cursor: pointer; }
.check b { font-weight: 600; }
