/* Видеокомбинат. Tokens follow design/tokens.css v0.1; night shift is the
   default, the day shift comes from data-theme="light" set by the server. */
:root {
  --bg: #161712; --bg-dots: #26261f; --panel: #1f201b; --panel-2: #1b1c17; --field: #141510;
  --raised: #22231d; --selected: #2a2b24; --line: #3b3a30; --line-soft: #2d2d25; --line-strong: #5a5747;
  --text: #f1e7ce; --text-2: #c9bd9f; --text-body: #e3d7bb; --muted: #9a8f76; --placeholder: #8a8068;
  --action: #ad2822; --action-hover: #c2302a; --on-action: #f9f1dc; --stamp: #e2463d;
  --ok: #6fdc8c; --ok-bg: #18241b; --ok-line: #2f4a35;
  --wait: #f5b642; --wait-bg: #2a2416; --wait-line: #5a4a24;
  --error: #ff6b5e; --error-bg: #2a1715; --error-line: #5a2a26;
  --focus: #f5b642; --shadow: 0 30px 80px rgba(0,0,0,.35);
  --r-plate: 8px; --r-item: 10px; --r-btn: 12px; --r-panel: 16px;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-ui: 'Golos Text', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f1e7ce; --bg-dots: #e2d6b5; --panel: #faf3df; --panel-2: #f6eed8; --field: #fffaf0;
  --raised: #f1e7ce; --selected: #ebe0c4; --line: #d1c4a6; --line-soft: #ddd0b0; --line-strong: #a89a78;
  --text: #282921; --text-2: #4f4a3a; --text-body: #3a382c; --muted: #706551; --placeholder: #8f8468;
  --ok: #1f8a43; --ok-bg: #e3f0dc; --ok-line: #9cc7a3;
  --wait: #b5770a; --wait-bg: #f6e6c0; --wait-line: #d9b56a;
  --error: #c0392b; --error-bg: #f7e1dc; --error-line: #e0a79e;
  --focus: #b5770a; --shadow: 0 20px 60px rgba(80,60,20,.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background-color: var(--bg); background-image: radial-gradient(var(--bg-dots) 1px, transparent 1px); background-size: 24px 24px;
  color: var(--text); font: 16px/1.5 var(--font-ui);
}
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--panel); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.label { font: 500 12px/1.3 var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.lead { color: var(--text-2); font-size: 19px; line-height: 1.45; }
.selectable { user-select: all; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px;
  border: 0; border-radius: var(--r-btn); background: var(--action); color: var(--on-action);
  font: 500 18px/1 var(--font-display); letter-spacing: 2px; text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 8px 24px rgba(173,40,34,.35);
}
.btn:hover { background: var(--action-hover); }
.btn-wide { width: 100%; min-height: 64px; font-size: 20px; }
.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--r-plate); background: var(--raised); color: var(--text);
  font: 15px var(--font-ui); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.ghost:hover { border-color: var(--line-strong); }
.ghost:disabled { opacity: .55; cursor: not-allowed; }
.ghost.small { min-height: 36px; padding: 0 12px; font-size: 12px; background: transparent; color: var(--text-2); letter-spacing: .5px; }

/* lamps */
.led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: #4a4a3e; }
.led.green { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.led.amber { background: var(--wait); box-shadow: 0 0 10px var(--wait); }
.led.red { background: var(--error); box-shadow: 0 0 10px var(--error); }
.blink { animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .45; } }
.lamp { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid; border-radius: 999px; font: 500 12px var(--font-mono); letter-spacing: 1px; color: var(--text); white-space: nowrap; }
.lamp-green { border-color: var(--ok-line); background: var(--ok-bg); }
.lamp-amber { border-color: var(--wait-line); background: var(--wait-bg); }
.lamp-red { border-color: var(--error-line); background: var(--error-bg); }

/* header */
.top { height: 72px; padding: 0 max(16px, env(safe-area-inset-left)); padding-inline: clamp(16px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 5; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.wordmark svg { height: 26px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current] { text-decoration: underline; }
.theme { margin: 0; display: inline-flex; }
.menu { display: none; }
.menu summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border-radius: var(--r-item); }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 12px; top: 56px; width: min(320px, calc(100vw - 24px)); padding: 12px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel); box-shadow: var(--shadow); display: grid; gap: 4px; }
.menu-panel a { padding: 12px; border-radius: var(--r-item); text-decoration: none; }
.menu-panel a:hover { background: var(--raised); }
.menu-panel .theme { padding: 8px 12px; }

/* ticker */
.ticker { height: 36px; display: flex; align-items: center; border-bottom: 1px solid var(--line-soft); background: var(--panel-2); font: 12.5px var(--font-mono); color: var(--text-2); overflow: hidden; }
.ticker-label { flex-shrink: 0; height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 16px 0 clamp(16px, 4vw, 48px); border-right: 1px solid var(--line-soft); color: var(--text); }
.ticker-track { overflow: hidden; flex: 1; }
.ticker-run { display: flex; width: max-content; white-space: nowrap; animation: ticker 40s linear infinite; }
.ticker-run span { padding-right: 56px; }
.ticker-run b { color: var(--text); font-weight: 500; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* main */
.main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 48px) 56px; display: flex; flex-direction: column; gap: 32px; }

/* pult */
.pult { border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel); }
.pult-main { width: 100%; max-width: 860px; margin: 16px auto 0; padding: clamp(22px, 4vw, 40px) clamp(18px, 5vw, 56px) clamp(22px, 4vw, 44px); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 24px; }
.pult-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pult-title { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.brandline { font: 600 clamp(30px, 6.4vw, 60px)/1 var(--font-display); letter-spacing: 2px; color: var(--text); }
.system { font-size: clamp(10px, 2.6vw, 13px); }
h1.lead { font-weight: 400; margin-top: 6px; }
.pult-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.pult-form .label { color: var(--text-2); }
.pult-row { display: flex; gap: 12px; }
.field { flex: 1; min-width: 0; min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 18px; border: 2px solid var(--line-strong); border-radius: var(--r-btn); background: var(--field); }
.field:focus-within { border-color: var(--focus); }
.field-icon { flex-shrink: 0; color: var(--muted); }
.field-error { border-color: var(--error); }
.field-error .field-icon { color: var(--error); }
.field input { flex: 1; min-width: 0; height: 64px; border: 0; background: transparent; color: var(--text); font: 17px var(--font-mono); outline: none; }
.field input::placeholder { color: var(--placeholder); font-family: var(--font-ui); }
.paste { min-height: 48px; }
.paste-wide { display: none; }
.pult-row .btn { min-height: 68px; padding: 0 32px; font-size: 20px; }

.alert { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid; border-radius: var(--r-item); }
.alert svg { flex-shrink: 0; margin-top: 2px; }
.alert-red { border-color: var(--error-line); background: var(--error-bg); color: var(--error); }
.alert-amber { border-color: var(--wait-line); background: var(--wait-bg); color: var(--wait); }
.alert-title { font: 600 18px/1.2 var(--font-display); letter-spacing: 1px; text-transform: uppercase; color: var(--text); }
.alert-text { color: var(--text-body); margin-top: 4px; }

.principles { width: 100%; max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.principle { padding: 24px; border: 1px solid var(--line-soft); border-radius: var(--r-btn); background: var(--panel-2); display: flex; flex-direction: column; gap: 8px; }
.principle b { font: 400 22px var(--font-display); letter-spacing: .5px; }
.principle p { color: var(--text-2); font-size: 15px; }

/* task page */
.pult-bar { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px; flex-wrap: wrap; }
.bar-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--text-2); font: 14px var(--font-mono); }
.bar-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.task-work, .task-done { grid-template-columns: minmax(0, 1fr) 300px; }
.task-work > :not(.order):not(.ad-box), .task-done > :not(.order):not(.ad-box) { grid-column: 1; }

.order { border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel); overflow: hidden; }
.order-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 18px 24px; border-bottom: 1px dashed var(--line); }
.order-no { font: 600 26px/1.15 var(--font-display); letter-spacing: 1px; margin-top: 4px; }
.order-no .mono { font-weight: 500; }
.order-meta { display: grid; grid-template-columns: auto auto; gap: 2px 12px; margin: 0; font: 12px var(--font-mono); }
.order-meta dt { color: var(--muted); letter-spacing: 1px; }
.order-meta dd { margin: 0; color: var(--text-2); }
.order-body { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.flip { display: inline-block; animation: flip .6s steps(2) infinite; }
.flip + .flip { animation-delay: -.3s; }
@keyframes flip { 50% { transform: translateY(-.15em); opacity: .4; } }

.skel-card { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 20px; }
.skel { height: 18px; border-radius: 6px; background: linear-gradient(90deg, var(--raised), var(--selected), var(--raised)); background-size: 200% 100%; animation: skel 1.4s linear infinite; }
.skel-thumb { height: auto; aspect-ratio: 16 / 9; }
.skel-lines { display: grid; gap: 12px; align-content: start; }
.skel.short { width: 50%; }
@keyframes skel { to { background-position: -200% 0; } }

.card { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 28px; margin: 0; }
.card-side { display: flex; flex-direction: column; gap: 14px; }
.thumb { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--r-item); overflow: hidden; background: var(--raised); border: 1px solid var(--line-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.dur { position: absolute; right: 8px; bottom: 8px; padding: 3px 6px; border-radius: 4px; background: rgba(0,0,0,.75); color: #f1e7ce; font-size: 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.kv dt { font: 12px var(--font-mono); letter-spacing: 1px; color: var(--muted); padding-top: 2px; }
.kv dd { margin: 0; color: var(--text-2); }
.card-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.video-title { font: 600 22px/1.3 var(--font-ui); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.small-title { font-size: 17px; }
.opts { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.opts legend { margin-bottom: 10px; color: var(--text-2); }
.opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 64px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--r-item); background: var(--raised); cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; }
.opt:has(input:checked) { border-color: var(--action); background: var(--selected); box-shadow: 0 0 0 1px var(--action) inset; }
.opt:has(input:checked) .radio { border-color: var(--action); }
.opt:has(input:checked) .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--action); }
.opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt-off { border-style: dashed; background: transparent; cursor: not-allowed; opacity: .6; }
.opt-text { display: flex; flex-direction: column; min-width: 0; }
.opt-title { font-weight: 500; }
.opt-hint { font-size: 14px; color: var(--muted); }
.opt-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.opt-size { font-size: 13px; color: var(--text-2); }
.tag { font-size: 11px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.card-go { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.card-go .btn { min-height: 64px; padding: 0 36px; }
.card-go .small { flex: 1; min-width: 200px; }

.work-what { display: flex; justify-content: space-between; gap: 16px; font-weight: 500; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.stages li { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.stages .dot { height: 4px; border-radius: 2px; background: var(--line); }
.stage-done { color: var(--text-2); }
.stage-done .dot { background: var(--ok); }
.stage-current { color: var(--text); font-weight: 500; }
.stage-current .dot { background: var(--wait); animation: blink 1.2s ease-in-out infinite; }
.meter { display: flex; flex-direction: column; gap: 10px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pct { font-size: 44px; line-height: 1; color: var(--text); }
.pct small { font-size: 20px; color: var(--muted); margin-left: 2px; }
.progress { height: 12px; border-radius: 6px; background: var(--field); border: 1px solid var(--line); overflow: hidden; }
.progress-fill { height: 100%; background: repeating-linear-gradient(-45deg, var(--action) 0 10px, var(--action-hover) 10px 20px); background-size: 28px 28px; animation: belt 1s linear infinite; transition: width .5s ease; }
@keyframes belt { to { background-position: 28px 0; } }
.journal { padding: 14px 16px; border-radius: var(--r-item); background: var(--field); border: 1px solid var(--line-soft); font-size: 12.5px; line-height: 1.7; color: var(--text-2); white-space: pre-wrap; min-height: 60px; }
.journal time { color: var(--muted); }
.work-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.work-foot form { margin: 0; }

.done { position: relative; }
.stamp { position: absolute; right: 24px; top: 18px; transform: rotate(-8deg); padding: 8px 14px; border: 3px solid var(--stamp); border-radius: 8px; color: var(--stamp); font: 600 20px/1.1 var(--font-display); letter-spacing: 2px; text-align: center; opacity: .9; }
.stamp small { display: block; font: 500 10px var(--font-mono); letter-spacing: 1px; margin-top: 2px; }
.done-file { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: center; padding-right: 240px; }
.thumb-small { width: 160px; }
.done-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.error { gap: 16px; }
.error form { margin: 0; }
.error .ghost, .error form .ghost { align-self: flex-start; }

/* ads: fixed boxes so nothing jumps when they load */
.ad { display: grid; gap: 6px; justify-content: center; }
.ad-label { font: 11px var(--font-mono); letter-spacing: 1px; color: var(--muted); }
.ad-slot { background: var(--panel-2); border: 1px dashed var(--line-soft); border-radius: 6px; overflow: hidden; }
.ad-wide .ad-slot { width: 728px; height: 90px; max-width: 100%; }
.ad-mobile .ad-slot { width: 320px; height: 100px; }
.ad-box .ad-slot { width: 300px; height: 250px; }
.ad-mobile { display: none; }
.task-work .ad-box, .task-done .ad-box { grid-column: 2; grid-row: 1 / span 3; }

.donate { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border: 1px solid var(--line-soft); border-radius: var(--r-btn); background: var(--panel-2); }
.donate > div { flex: 1; }
.donate-title { font: 400 18px var(--font-display); letter-spacing: .5px; }

/* content pages */
.doc { display: flex; flex-direction: column; gap: 18px; max-width: 760px; min-width: 0; }
.doc-wide { max-width: 980px; }
.doc h1 { font: 600 clamp(30px, 5vw, 44px)/1.1 var(--font-display); letter-spacing: 1px; }
.doc h2 { font: 500 24px/1.2 var(--font-display); letter-spacing: .5px; margin-top: 18px; }
.doc p, .doc li { color: var(--text-body); }
.doc section { display: flex; flex-direction: column; gap: 14px; }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--text-2); }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.legal { grid-template-columns: 220px minmax(0, 1fr); }
.doc-aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.window { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.window b { font: 500 20px var(--font-display); }
.doc-nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 6px; }
.doc-nav a { padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text-2); }
.doc-nav a[aria-current] { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.draft { color: var(--wait); }
.faq { gap: 8px !important; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-item); background: var(--panel); }
.faq summary { min-height: 52px; padding: 14px 48px 14px 18px; cursor: pointer; font-weight: 500; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font: 20px var(--font-mono); color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details div { padding: 0 18px 16px; color: var(--text-body); }
.conveyor, .steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.conveyor li, .steps li { padding: 18px; border: 1px solid var(--line-soft); border-radius: var(--r-btn); background: var(--panel-2); display: flex; flex-direction: column; gap: 8px; }
.conveyor .label { display: flex; align-items: center; gap: 8px; }
.conveyor b, .steps b { font: 400 20px var(--font-display); letter-spacing: .5px; }
.conveyor p, .steps p { font-size: 15px; color: var(--text-2); }
.step-no { color: var(--action-hover); font-weight: 500; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.panel { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel); }
.panel ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.pult-landing { padding: 20px; }
.prose { display: flex; flex-direction: column; gap: 12px; }
.others { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; padding-top: 16px; border-top: 1px solid var(--line-soft); }

.nf { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: center; padding: 40px 0; }
.nf-text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.nf h1 { font: 600 clamp(32px, 5.5vw, 56px)/1.05 var(--font-display); letter-spacing: 1.5px; }
.registry { position: relative; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel); display: grid; gap: 10px; font-size: 13px; color: var(--text-2); }
.registry-head { display: flex; justify-content: space-between; color: var(--muted); padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.registry-miss { color: var(--error); }
.registry-stamp { position: absolute; right: 18px; bottom: 30px; transform: rotate(-10deg); border: 3px solid var(--stamp); color: var(--stamp); padding: 4px 10px; border-radius: 6px; font: 600 18px var(--font-display); letter-spacing: 2px; }

/* footer */
.foot { border-top: 1px solid var(--line-soft); padding: 32px clamp(16px, 4vw, 48px) max(24px, env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); }
.foot-cols { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 24px; }
.foot-cols nav { display: flex; flex-direction: column; gap: 8px; }
.foot-cols a { color: var(--text-2); text-decoration: none; }
.foot-cols a:hover { text-decoration: underline; }
.foot-about { display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.foot-name { font: 500 18px var(--font-display); color: var(--text); letter-spacing: .5px; }
.foot-copy { max-width: 1180px; margin: 24px auto 0; font-size: 13px; }

/* phones */
@media (max-width: 860px) {
  body { background-size: 20px 20px; }
  .top { height: 56px; padding: 0 12px 0 16px; }
  .wordmark svg { height: 22px; }
  .plate { width: 30px; height: 30px; }
  .nav { display: none; }
  .menu { display: block; }
  .ticker { height: 30px; font-size: 11.5px; }
  .ticker-label { display: none; }
  .main { padding: 16px 16px 28px; gap: 16px; }
  .pult-main { margin-top: 4px; gap: 18px; }
  .pult-row { flex-direction: column; }
  .pult-row .btn { width: 100%; min-height: 60px; }
  .field { min-height: 60px; }
  .field input { height: 56px; font-size: 16px; }
  .field .paste { display: none; }
  .paste-wide:not([hidden]) { display: flex; justify-content: center; gap: 10px; width: 100%; min-height: 52px; border-color: var(--line-strong); background: var(--raised); }
  .lead { font-size: 17px; }
  .pult-bar { padding: 8px 8px 8px 14px; gap: 10px; }
  .pult-no { display: none; }
  .pult-bar .bar-link { display: none; }
  .pult-bar .lamp { margin-right: auto; }
  .task-work, .task-done { grid-template-columns: minmax(0, 1fr); }
  .task-work .ad-box, .task-done .ad-box { grid-column: 1; grid-row: auto; }
  .order-head { padding: 16px; }
  .order-body { padding: 16px; }
  .card { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .skel-card { grid-template-columns: minmax(0, 1fr); }
  .card-go .btn { width: 100%; }
  .opt { padding: 10px 12px; gap: 10px; }
  .stages { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stages li { flex-direction: row; align-items: center; gap: 10px; }
  .stages .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
  .stamp { position: static; align-self: flex-end; margin-bottom: -8px; }
  .done-file { grid-template-columns: 96px minmax(0, 1fr); padding-right: 0; }
  .thumb-small { width: 96px; }
  .ad-wide { display: none; }
  .ad-mobile { display: grid; }
  .donate { flex-direction: column; align-items: stretch; }
  .donate .ghost { text-align: center; }
  .doc-grid, .legal, .nf { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .doc-nav, .doc-aside { position: static; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.nowrap { white-space: nowrap; }

/* Свои баннеры Видеокомбината: Чебуграм и «Здесь могла быть ваша реклама».
   Встают в те же контейнеры .ad-slot (728×90, 320×100, 300×250), пока нет блоков РСЯ.
   Цвета фиксированные (плакат одинаков в ночной и дневной смене) и не похожи
   на красные кнопки сервиса: кнопка в баннере тёмная, не красная. */
.hb-rot { position: relative; width: 100%; height: 100%; }
.hb {
  position: absolute; inset: 0; display: flex; align-items: center; overflow: hidden;
  text-decoration: none; border-radius: 6px; transition: opacity .6s ease, visibility .6s;
  font-family: var(--font-ui, 'Golos Text', system-ui, sans-serif);
}
.hb[hidden] { display: flex; opacity: 0; visibility: hidden; pointer-events: none; }
.hb:focus-visible { outline: 3px solid #f5b642; outline-offset: -3px; }

/* --- Чебуграм: кремовый плакат --- */
.hb-cheb { background: #f1e7ce; color: #282921; gap: 14px; padding: 0 16px 0 14px;
  background-image: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(173,40,34,.05) 14px 15px); }
.hb-cheb::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: #ad2822; }
.hb-mark { flex: none; display: block; }
.hb-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.hb-name { font-family: var(--font-display, 'Oswald', sans-serif); font-weight: 600; letter-spacing: 2px; line-height: 1; color: #282921; }
.hb-name b { color: #ad2822; font-weight: 600; }
.hb-tag { text-wrap: balance; font-size: 13.5px; line-height: 1.35; color: #4f4a3a; }
.hb-url { font-family: var(--font-mono, monospace); font-size: 11px; letter-spacing: 1px; color: #706551; }
.hb-cta { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 10px; background: #282921; color: #f1e7ce; font-family: var(--font-display, 'Oswald', sans-serif);
  font-weight: 500; font-size: 15px; letter-spacing: 1.5px; }
.hb:hover .hb-cta { background: #3a3b31; }

/* --- Свободное место: щит в сигнальную полосу --- */
.hb-free { background: #1b1c17; color: #f1e7ce; justify-content: center; text-align: center; padding: 10px 18px; }
.hb-free::before { content: ""; position: absolute; inset: 0; border-radius: 6px; padding: 6px;
  background: repeating-linear-gradient(-45deg, #f5b642 0 10px, #282921 10px 20px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.hb-free-in { position: relative; display: grid; gap: 4px; justify-items: center; }
.hb-free-k { font-family: var(--font-mono, monospace); font-size: 10.5px; letter-spacing: 2px; color: #f5b642; }
.hb-free-h { font-family: var(--font-display, 'Oswald', sans-serif); font-weight: 600; letter-spacing: 1.5px; line-height: 1.05; }
.hb-free-s { font-size: 13px; color: #c9bd9f; }
.hb-free-s u { color: #f1e7ce; text-decoration-color: #f5b642; text-underline-offset: 3px; }

/* --- 728×90 --- */
.ad-wide .hb-name { font-size: 32px; }
.ad-wide .hb-text { grid-template-columns: auto 1fr; column-gap: 18px; align-items: center; }
.ad-wide .hb-tag { grid-column: 2; grid-row: 1 / span 2; border-left: 1px solid #d1c4a6; padding-left: 18px; }
.ad-wide .hb-url { grid-column: 1; }
.ad-wide .hb-free-h { font-size: 24px; white-space: nowrap; }
.ad-wide .hb-free-h br, .ad-wide .hb-free-k, .ad-mobile .hb-free-k, .ad-mobile .hb-free-s1 { display: none; }
.ad-wide .hb-free-in { grid-template-columns: auto auto; column-gap: 22px; align-items: center; justify-items: start; text-align: left; }

/* --- 320×100 --- */
.ad-mobile .hb-cheb { gap: 12px; padding: 0 12px 0 14px; }
.ad-mobile .hb-mark { width: 46px; height: 46px; }
.ad-mobile .hb-name { font-size: 22px; letter-spacing: 1.5px; }
.ad-mobile .hb-tag { font-size: 12.5px; }
.ad-mobile .hb-url, .ad-mobile .hb-cta-t { display: none; }
.ad-mobile .hb-cta { width: 40px; padding: 0; justify-content: center; }
.ad-mobile .hb-free-h { font-size: 20px; }
.ad-mobile .hb-free-s { font-size: 12px; }

/* --- 300×250 --- */
.ad-box .hb-cheb { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 0; background-image: none; }
.ad-box .hb-cheb::before { display: none; }
.ad-box .hb-band { height: 84px; display: flex; align-items: center; justify-content: center; gap: 14px; background: #ad2822;
  background-image: repeating-conic-gradient(from 0deg at 50% 120%, rgba(255,255,255,.07) 0 6deg, transparent 6deg 12deg); }
.ad-box .hb-mark { width: 60px; height: 60px; }
.ad-box .hb-text { padding: 14px 18px 0; gap: 8px; }
.ad-box .hb-name { font-size: 32px; }
.ad-box .hb-tag { font-size: 14px; }
.ad-box .hb-url { display: none; }
.ad-box .hb-cta { margin: auto 18px 16px; justify-content: center; height: 44px; }
.ad-box .hb-free { flex-direction: column; }
.ad-box .hb-free-in { gap: 10px; }
.ad-box .hb-free-h { font-size: 27px; }
.ad-box .hb-free-s { font-size: 13.5px; line-height: 1.45; max-width: 220px; }
.hb-band { display: none; }
.ad-box .hb-band { display: flex; }
.ad-box .hb-cheb > .hb-mark { display: none; }

@media (prefers-reduced-motion: reduce) { .hb { transition: none; } }
