/* Open Sans — шрифт сайта ForteBank; файлы лежат рядом, страница не ходит во внешнюю сеть. SIL OFL 1.1 */
@font-face {
  font-family: "Open Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/opensans-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Open Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/opensans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  /* фирменные цвета ForteBank: бордовый несёт оболочку, малиновый — действие */
  --plum: #4a0221;
  --plum-2: #6e0b36;
  --berry: #a31551;
  --berry-hover: #870f42;
  --berry-soft: #f8e9f0;
  --berry-line: #e9c3d4;
  --on-plum: #ffffff;
  --on-plum-2: #e9c9d7;
  /* нейтральные с бордовым оттенком */
  --ink: #1d1d1d;
  --ink-2: #47424a;
  --muted: #645e63;
  --ground: #f4f2f3;
  --surface: #ffffff;
  --surface-2: #f9f7f8;
  --line: #e4dfe1;
  --line-2: #cfc7cb;
  /* состояния отдельно от бренда */
  --bad: #c9311f;
  --bad-ink: #9f2416;
  --bad-soft: #fdeeec;
  --bad-line: #f3c9c2;
  --ok: #1d7a4c;
  --ok-ink: #155f3a;
  --ok-soft: #e8f4ee;
  --ok-line: #bfdfcd;
  --link: #185ac5;
  /* дорожки хронологии */
  --lane-bg: #f1eef0;
  --p1: #7b7277;
  --p2: #514a4e;
  --p3: #2b2528;
  --safe: #a8680a;
  --desk: #15798a;

  --r-s: 8px;
  --r: 12px;
  --lbl-w: 168px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/1.55 "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: #f2c4d7; color: var(--plum); }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: 26px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 17px; line-height: 1.35; font-weight: 700; }
h3 { font-size: 18px; line-height: 1.35; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 3px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }

/* ---------- кнопки ---------- */

button { font: inherit; color: inherit; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 18px; border-radius: var(--r-s); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease);
}
.btn .ico { width: 18px; height: 18px; }
.btn.primary { background: var(--berry); color: #fff; }
.btn.primary:hover { background: var(--berry-hover); }
.btn.primary:active { background: var(--plum-2); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.secondary:hover { border-color: var(--berry); color: var(--berry); }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 14px; gap: 6px; }
.btn.small .ico { width: 14px; height: 14px; }
.btn.light { background: #fff; color: var(--plum); }
.btn.light:hover { background: var(--berry-soft); }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.btn.ghost-light:hover { background: rgba(255, 255, 255, 0.12); }

.textlink {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: none; background: none;
  color: var(--berry); font-weight: 600; font-size: 14px;
}
.textlink:hover { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; }
.textlink .ico { width: 12px; height: 12px; }

/* ---------- шапка ---------- */

.appbar { background: var(--plum); color: var(--on-plum); }
.appbar-inner { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; border-radius: var(--r-s); }
.logo:focus-visible { outline-color: #fff; }
.logo-mark { width: 32px; height: 32px; border-radius: var(--r-s); background: var(--berry); display: grid; place-items: center; }
.logo-mark .ico { width: 20px; height: 20px; stroke-width: 1.7; }
.logo-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.case-tag { font-size: 13px; color: var(--on-plum-2); padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, 0.22); }
.health { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--on-plum-2); white-space: nowrap; }
.health .dot { width: 8px; height: 8px; border-radius: 50%; background: #b9a3ad; }
.health[data-state="ok"] .dot { background: #4cc38a; }
.health[data-state="busy"] .dot { background: #f0b542; }
.health[data-state="down"] .dot { background: #ff7a66; }

main.wrap { flex: 1; padding-top: 32px; padding-bottom: 48px; }

/* ---------- новая проверка ---------- */

.start { max-width: 880px; margin: 0 0 40px; }
.intro { margin-bottom: 20px; }
.intro p { margin-top: 8px; color: var(--ink-2); max-width: 64ch; }

.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; min-height: 260px; padding: 32px 24px; cursor: pointer;
  background: var(--surface); border: 1.5px dashed var(--line-2); border-radius: var(--r);
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.drop:hover, .drop.over { border-color: var(--berry); background: var(--berry-soft); }
.drop:focus-within { outline: 2px solid var(--berry); outline-offset: 2px; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-ico { width: 32px; height: 32px; color: var(--berry); stroke-width: 1.6; }
.drop-title { font-size: 19px; font-weight: 700; }
.drop-btn { margin: 4px 0 8px; pointer-events: none; }
.drop:hover .drop-btn { background: var(--berry-hover); }
.hint { color: var(--muted); font-size: 13px; max-width: 46ch; }

/* ---------- ход проверки ---------- */

.status { max-width: 880px; margin: 0 0 32px; padding: 24px; }
.status-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.status-file { font-size: 17px; overflow-wrap: anywhere; }
.status-time { color: var(--muted); font-size: 14px; white-space: nowrap; }
.steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: 1fr 1fr auto; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.steps li:not(:last-child)::after { content: ""; flex: 1; height: 2px; margin: 0 12px 0 4px; background: var(--line); border-radius: 1px; }
.step-dot {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center;
  background: var(--surface); flex: none; color: transparent;
}
.step-dot .ico { width: 13px; height: 13px; stroke-width: 2.6; }
.steps li[data-state="done"] { color: var(--ink-2); }
.steps li[data-state="done"] .step-dot { background: var(--berry); border-color: var(--berry); color: #fff; }
.steps li[data-state="done"]::after { background: var(--berry); }
.steps li[data-state="current"] { color: var(--ink); }
.steps li[data-state="current"] .step-dot { border-color: var(--berry); border-width: 6px; }
.steps li[data-state="failed"] { color: var(--bad-ink); }
.steps li[data-state="failed"] .step-dot { border-color: var(--bad); background: var(--bad); color: #fff; }

.status-text { font-size: 15px; font-weight: 600; }
.progress { height: 4px; background: var(--lane-bg); border-radius: 2px; margin-top: 12px; overflow: hidden; position: relative; }
.progress div { height: 100%; width: 0; background: var(--berry); transition: width 200ms linear; }
.progress.indet div { position: absolute; width: 30% !important; animation: indet 1.5s var(--ease) infinite; }
.status-note { margin-top: 16px; color: var(--muted); font-size: 13px; }
.error { margin-top: 16px; color: var(--bad-ink); background: var(--bad-soft); border: 1px solid var(--bad-line); border-radius: var(--r-s); padding: 12px 14px; font-size: 14px; }
.status-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

@keyframes indet { from { left: -30%; } to { left: 100%; } }

/* ---------- вердикт ---------- */

.verdict {
  display: flex; align-items: flex-start; gap: 16px; padding: 20px 24px; margin-bottom: 24px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--surface);
}
.verdict-ico { width: 28px; height: 28px; stroke-width: 2; margin-top: 1px; }
.verdict > .btn { align-self: center; }
.verdict-main { flex: 1; min-width: 0; }
.verdict-title { font-size: 22px; line-height: 1.3; }
.verdict-title:focus { outline: none; } /* фокус ставится программно, чтобы диктор прочитал итог */
.verdict-meta { margin-top: 4px; color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.verdict-meta b { font-weight: 700; }
.verdict-meta span { white-space: nowrap; }
.verdict.bad { background: var(--bad-soft); border-color: var(--bad-line); }
.verdict.bad .verdict-ico, .verdict.bad .verdict-title, .verdict.bad .verdict-meta b { color: var(--bad-ink); }
.verdict.ok { background: var(--ok-soft); border-color: var(--ok-line); }
.verdict.ok .verdict-ico, .verdict.ok .verdict-title { color: var(--ok-ink); }

/* ---------- рабочая область ---------- */

.workspace { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }

.player { position: sticky; top: 16px; }
.player video {
  display: block; width: 100%; max-height: calc(100vh - 32px); background: #170a10; border-radius: var(--r);
}
.novideo:empty { display: none; }
.novideo { color: var(--muted); font-size: 13px; margin-top: 8px; }

.findings { min-width: 0; display: grid; gap: 16px; align-content: start; }

/* хронология: одна ось времени для нарушений и фактов сцены */
.chrono { padding: 16px 20px 12px; }
.chrono-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.chrono-hint { font-size: 12px; color: var(--muted); text-align: right; }
.chrono-grid { position: relative; display: grid; grid-template-columns: var(--lbl-w) minmax(0, 1fr); column-gap: 12px; row-gap: 8px; align-items: center; }
.lanes { display: contents; }
.row-lbl { font-size: 13px; color: var(--ink-2); line-height: 1.25; }
.row-bar { position: relative; height: 18px; background: var(--lane-bg); border-radius: 4px; cursor: pointer; }
.marks-row { height: 24px; background: none; }
.marks-row::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--line); border-radius: 1px; }
.marks-row .row-empty { background: var(--surface); padding: 0 6px; left: 8px; }
.row-empty { position: absolute; left: 8px; top: 0; font-size: 12px; line-height: 18px; color: var(--muted); pointer-events: none; }
.axis { position: relative; height: 16px; font-size: 12px; color: var(--muted); }
.axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.axis span.first { transform: none; }
.axis span.last { transform: translateX(-100%); }
.playhead-layer { position: absolute; top: 0; bottom: 0; left: calc(var(--lbl-w) + 12px); right: 0; pointer-events: none; }
.playhead-layer .head { position: absolute; top: 0; bottom: 18px; width: 2px; margin-left: -1px; left: 0; background: var(--ink); opacity: 0.5; border-radius: 1px; }

.mark {
  position: absolute; top: 0; transform: translateX(-50%); min-width: 26px; height: 24px; padding: 0 6px;
  background: var(--bad); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  border-radius: 6px; border: 2px solid var(--surface); transition: background-color 150ms var(--ease);
}
.mark:hover, .mark.active { background: var(--bad-ink); }

.seg {
  position: absolute; top: 0; height: 100%; border: none; padding: 0; margin: 0; font-size: 12px; font-weight: 700;
  line-height: 18px; color: #fff; text-align: center; border-radius: 4px;
}
.seg::after, .tick::after { content: ""; position: absolute; inset: -5px -2px; } /* шире зона нажатия */
.seg:hover { filter: brightness(0.92); }
.seg.p1 { background: var(--p1); }
.seg.p2 { background: var(--p2); }
.seg.p3 { background: var(--p3); }
.seg.safe { background: var(--safe); }
.seg.desk { background: var(--desk); }
.tick { position: absolute; top: 2px; width: 6px; height: 14px; margin-left: -3px; border: none; padding: 0; border-radius: 2px; }
.tick::after { inset: -6px -8px; }
.tick.in, .sw.in { background: var(--ink); }
.tick.sit, .sw.sit { background: var(--p1); }
.tick.out, .sw.out { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink); }
.tick:hover { transform: scaleY(1.2); }

/* ---------- нарушения ---------- */

.list { display: grid; gap: 16px; }
.viol {
  container-type: inline-size; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; scroll-margin-top: 16px; transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.viol.active { border-color: var(--ink-2); }
.viol-head { display: flex; align-items: flex-start; gap: 12px; }
.num {
  flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--bad); color: #fff;
  font-size: 13px; font-weight: 700; display: grid; place-items: center;
}
.viol-head h3 { flex: 1; min-width: 0; padding-top: 1px; }
.tc { flex: none; font-variant-numeric: tabular-nums; }

.viol-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; margin-top: 16px; padding-left: 38px; }
@container (max-width: 640px) {
  .viol-body { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-left: 0; }
}
.field + .field { margin-top: 16px; }
.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.lbl-note { font-weight: 400; }
.field-text { max-width: 68ch; }

.ref + .ref { margin-top: 12px; }
.ref summary { list-style: none; display: block; cursor: pointer; border-radius: 4px; }
.ref summary .chev { vertical-align: -3px; margin-left: 4px; }
.ref summary::-webkit-details-marker { display: none; }
.ref summary:hover .ref-label { color: var(--berry); }
.ref-label { font-size: 14px; font-weight: 600; }
.ref-note { color: var(--muted); }
.chev { width: 16px; height: 16px; color: var(--muted); transition: transform 150ms var(--ease); }
details[open] > summary .chev { transform: rotate(90deg); }
.ref-quote { margin: 8px 0 0; padding: 2px 0 2px 14px; border-left: 1px solid var(--line-2); color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.ref-quote p { max-width: 72ch; }
.ref-quote p + p { margin-top: 6px; }
.ref-src { margin-top: 8px; font-size: 13px; color: var(--muted); }
.ref-src a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
.ref-src a .ico { width: 13px; height: 13px; }
.norm-plain { color: var(--ink-2); font-size: 14px; }

.frames { display: flex; gap: 12px; align-items: flex-start; }
.frames figure { margin: 0; width: 132px; }
@container (max-width: 640px) { .frames figure { width: calc(50% - 6px); max-width: 180px; } }
.frame-btn { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; background: #170a10; cursor: zoom-in; }
.frame-btn:hover { border-color: var(--berry); }
.frame-btn img { display: block; width: 100%; height: auto; aspect-ratio: 464 / 848; object-fit: cover; }
.frames figcaption { margin-top: 4px; }
.frames .textlink { color: var(--ink-2); }
.frames .textlink:hover { color: var(--berry); }


/* JSON */
.json summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); border-radius: 4px; }
.json summary::-webkit-details-marker { display: none; }
.json summary:hover { color: var(--berry); }
.json pre {
  margin: 8px 0 0; max-height: 380px; overflow: auto; font: 12.5px/1.55 var(--mono); color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px;
  white-space: pre-wrap; word-break: break-all; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.note { color: var(--muted); font-size: 13px; max-width: 80ch; }

/* ---------- история ---------- */

#result { margin-bottom: 40px; }
.history { max-width: 880px; width: 100%; }
.has-result .history { max-width: none; }
.history h2 { margin-bottom: 12px; }

.outcome { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.outcome::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.outcome.bad, .outcome.err { color: var(--bad-ink); }
.outcome.ok { color: var(--ok-ink); }
.outcome.wait { color: var(--muted); }
.cur-label { font-size: 14px; color: var(--muted); }

/* ---------- примеры, список правил, сводка проверки ---------- */

.drop-title.touch { display: none; }
@media (pointer: coarse) { .drop-title.pointer { display: none; } .drop-title.touch { display: inline; } }

.examples { margin-top: 32px; }
.examples h2 { margin-bottom: 12px; }
.rows-list { list-style: none; margin: 0; padding: 0; }
.rows-list li + li { border-top: 1px solid var(--line); }
.row-link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; width: 100%;
  padding: 12px 16px 12px 20px; border: none; background: none; text-align: left; font-size: 14px; border-radius: var(--r);
}
.row-link:hover { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-weight: 400; color: var(--muted); }
.row-link .outcome { white-space: normal; text-align: right; }
.row-chev { width: 16px; height: 16px; color: var(--muted); }
.row-link.current { background: var(--surface-2); cursor: default; }
.row-link.current .row-main { font-weight: 700; }
.cur-label { width: auto; height: auto; font-size: 13px; }
.flip { transform: rotate(180deg); }

.rules { margin-top: 24px; }
.rules summary, .coverage summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); border-radius: 4px;
}
.rules summary::-webkit-details-marker, .coverage summary::-webkit-details-marker { display: none; }
.rules summary:hover, .coverage summary:hover { color: var(--berry); }
.rules-list { margin: 10px 0 0; padding-left: 20px; columns: 2 280px; column-gap: 32px; font-size: 14px; color: var(--ink-2); }
.rules-list li { break-inside: avoid; margin-bottom: 4px; }

.coverage { padding: 14px 20px; }
.coverage[open] { padding-bottom: 18px; }
.coverage-body { margin-top: 12px; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.coverage-body .lbl { margin: 4px 0 -6px; }
.coverage-body .rules-list { margin-top: 0; }
.coverage-warn { color: var(--bad-ink); }

/* ход проверки: превью видео рядом с этапами */
.status { display: flex; gap: 24px; align-items: flex-start; }
.status-body { flex: 1; min-width: 0; }
.preview { flex: none; width: 160px; max-height: 300px; border-radius: var(--r-s); background: #170a10; }

/* указатель нарушений в вердикте */
.vindex { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.vindex .textlink { color: var(--bad-ink); font-weight: 600; text-align: left; }
.vindex-t { font-variant-numeric: tabular-nums; min-width: 56px; color: var(--ink-2); font-weight: 400; }

/* хронология: направляющие нарушений и подпись */
.guide { position: absolute; top: 25px; bottom: 18px; width: 1px; background: var(--bad); opacity: 0.55; }
.chrono-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.chrono-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 6px; height: 14px; border-radius: 2px; }
.chrono-note { margin-top: 10px; font-size: 12px; color: var(--muted); max-width: 90ch; }
kbd { font: 600 11px/1 var(--mono); padding: 2px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; color: var(--ink-2); background: var(--surface); }

/* ---------- подвал ---------- */

.foot { border-top: 1px solid var(--line); }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 20px; font-size: 13px; color: var(--muted); }
.foot a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--berry); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot a .ico { width: 13px; height: 13px; }

/* ---------- файл, перетаскиваемый на страницу ---------- */

.veil {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px;
  background: rgba(74, 2, 33, 0.88); color: #fff; pointer-events: none; animation: fade 120ms var(--ease);
}
.veil span { padding: 40px 48px; border: 2px dashed rgba(255, 255, 255, 0.6); border-radius: var(--r); font-size: 20px; font-weight: 700; text-align: center; }

/* ---------- просмотр кадра ---------- */

.viewer {
  position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center;
  background: rgba(20, 4, 11, 0.97); animation: fade 150ms var(--ease);
}
.viewer-bar { flex: none; width: 100%; display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; padding: 12px 16px; color: #fff; }
#viewerCap { flex: 1; min-width: 12em; font-weight: 600; }
.viewer img { flex: 1; min-height: 0; max-width: calc(100% - 32px); margin-bottom: 16px; object-fit: contain; border-radius: var(--r-s); }
.viewer :focus-visible { outline-color: #fff; }
body.locked { overflow: hidden; }

@keyframes fade { from { opacity: 0; } }

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

/* ---------- узкие экраны ---------- */

/* широкий экран: список распознаваемых типов — справа от загрузки, раскрыт */
@media (min-width: 1101px) {
  .start { max-width: none; display: grid; grid-template-columns: minmax(0, 880px) minmax(240px, 320px); column-gap: 48px; align-items: start; }
  .start > .intro, .start > .drop, .start > .examples { grid-column: 1; }
  .start > .rules { grid-column: 2; grid-row: 2 / span 2; margin-top: 0; padding-top: 4px; }
  .start > .rules .rules-list { columns: 1; padding-left: 18px; }
  .history { max-width: 880px; }
}

@media (max-width: 1100px) {
  :root { --lbl-w: 132px; }
  .workspace { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }
}

@media (max-width: 760px) {
  :root { --lbl-w: 92px; }
  .wrap { padding: 0 16px; }
  .appbar-inner { flex-wrap: wrap; gap: 4px 12px; min-height: 0; padding-top: 10px; padding-bottom: 10px; }
  .case-tag { order: 3; width: 100%; padding-left: 0; border-left: none; font-size: 12px; }
  main.wrap { padding-top: 20px; }
  h1 { font-size: 22px; }
  .drop { min-height: 220px; padding: 24px 16px; }
  .drop-title { font-size: 17px; }
  .status { padding: 16px; }
  .steps li { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12px; position: relative; }
  .steps li:not(:last-child)::after { position: absolute; left: 30px; right: 6px; top: 10px; margin: 0; }
  .verdict { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .verdict-ico { width: 24px; height: 24px; }
  .verdict-main { flex-basis: calc(100% - 40px); }
  .verdict-title { font-size: 18px; }
  .verdict .btn { width: 100%; }
  .status { flex-direction: column; }
  .preview { width: 100%; max-height: 40vh; }
  .chrono-hint { display: none; }
  .workspace { grid-template-columns: 1fr; gap: 16px; }
  .player { position: static; }
  .player video { width: auto; max-width: 100%; max-height: 70vh; margin: 0 auto; }
  .chrono { padding: 14px 14px 10px; }
  .chrono-head { flex-direction: column; gap: 2px; }
  .chrono-hint { text-align: left; }
  .row-lbl { font-size: 12px; }
  .viol { padding: 16px; }
  .viol-head { flex-wrap: wrap; }
  .viol-head h3 { flex-basis: calc(100% - 38px); }
  .tc { margin-left: 38px; }
  .row-link { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; }
  .row-link .row-main { grid-column: 1; }
  .row-link .outcome { grid-column: 1; grid-row: 2; text-align: left; }
  .row-link .row-chev { grid-column: 2; grid-row: 1 / span 2; }
}
