/* Self-hosted fonts (scripts/admin-assets.ts). */
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/inter-latin-400.8909904ab6.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}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/inter-latin-ext-400.6744a7f509.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/inter-cyrillic-400.f0bb586459.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/inter-latin-500.f3779f1efc.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}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/inter-latin-ext-500.2c6fbc42d3.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/inter-cyrillic-500.b77a86ec16.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/inter-latin-600.f9a06e79cd.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}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/inter-latin-ext-600.e4bdf67b0c.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/inter-cyrillic-600.6c2a37f82a.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/inter-latin-700.6f56409fd3.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}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/inter-latin-ext-700.143f9504f1.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/inter-cyrillic-700.5917871d3c.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/jetbrains-mono-latin-400.14425ba9c6.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}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/jetbrains-mono-cyrillic-400.522f582730.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/jetbrains-mono-latin-500.cb182feeed.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}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/jetbrains-mono-cyrillic-500.26c9ed511d.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}

/* The admin page, direction P3 «Луч» (docs/ads.md §4): white ground, ink, hairlines, huge Inter display type,
   JetBrains Mono figures and one lime beam: behind the live rows, on the primary button and on the CTR figure.
   No inline styles anywhere (the CSP has no 'unsafe-inline'); the script sets only custom properties. */

:root {
  --ink: #0b0b0c;
  --paper: #ffffff;
  --line: #e3e3e3;
  --muted: #5e5e5e;
  --beam: #d4ff3a;
  --ink-18: rgba(11, 11, 12, 0.18);
  --amber: #ffb81c;
  --on-amber: #111111;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gutter: clamp(1rem, 3.4vw, 3rem);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mono {
  font-family: var(--mono);
}

.muted {
  color: var(--muted);
}

abbr[title] {
  text-decoration: none;
}

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- top line ---------- */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.brand__name {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.brand__sub {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- type ---------- */

.eyebrow,
.label {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
}

.h2 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hint {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.hint--tight {
  margin-top: -0.6rem;
}

.note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 1.5rem 0 3rem;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* The clock of the artboards, drawn in CSS. */
.note::before {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  border: 1.4px solid var(--muted);
  border-radius: 50%;
  background: linear-gradient(var(--muted), var(--muted)) 5px 2px / 1.4px 4.5px no-repeat,
    linear-gradient(var(--muted), var(--muted)) 5px 5.6px / 3px 1.4px no-repeat;
}

/* An error or a request: a lime square before ink text (P3-Vhod). */
.flag {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.5rem 0 0;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
}

.flag::before {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 0.2em;
  background: var(--beam);
  border: 1.5px solid var(--ink);
}

.flag--box {
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--ink);
  margin: 1.25rem 0 0;
}

/* ---------- buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0 1.25rem;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}

.btn--beam {
  background: var(--beam);
}

.btn--tall {
  min-height: 56px;
  padding: 0 1.5rem 0 1.25rem;
}

.btn:hover {
  background: var(--ink);
  color: var(--beam);
}

.btn:disabled {
  cursor: progress;
  background: var(--line);
  color: var(--muted);
  border-color: var(--muted);
}

.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.5rem;
  border: 0;
  background: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.link:hover {
  text-decoration-thickness: 2px;
}

.link:disabled {
  color: var(--muted);
  cursor: progress;
}

.link--strong {
  font-weight: 600;
}

.link--big {
  font-size: 15px;
}

.link--file {
  position: relative;
  cursor: pointer;
  font-weight: 600;
}

.link--file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.link--file:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- segmented rows: underlined like the artboards' filters and tabs ---------- */

.seg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.5rem;
}

.seg__item,
.seg [role='tab'] {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  min-height: 44px;
  padding: 12px 0.1rem 0;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
}

.seg__item[aria-pressed='true'],
.seg [role='tab'][aria-selected='true'] {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: 600;
}

.seg__item:hover,
.seg [role='tab']:hover {
  color: var(--ink);
}

.seg__count {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
}

.seg--mono .seg__item {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
}

.seg--mono .seg__item[aria-pressed='true'] {
  font-weight: 500;
}

.seg--tabs {
  gap: 0 1.75rem;
  border-bottom: 1px solid var(--line);
}

.seg--tabs [role='tab'] {
  font-family: var(--mono);
  font-size: 14px;
}

.tab__state {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
}

.tab--error .tab__state {
  color: var(--ink);
  font-weight: 600;
  background: var(--beam);
  padding: 0 0.25rem;
}

/* Radio and checkbox options in a row. */
.seg--form {
  gap: 0 1.75rem;
  border-bottom: 1px solid var(--line);
}

.opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
}

.opt input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.opt__text {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
}

.opt:has(input:checked) {
  color: var(--ink);
  font-weight: 600;
}

.opt:has(input[type='radio']:checked) .opt__text {
  border-bottom-color: var(--ink);
}

.opt:has(input[type='radio']:focus-visible) .opt__text {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.opt--check {
  gap: 0.6rem;
}

.opt--check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ink);
}

.opt--mono {
  font-family: var(--mono);
  font-size: 14px;
}

/* Status glyphs of the artboards. */
.glyph {
  display: inline-block;
  flex: none;
}

.glyph--dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.glyph--pause {
  width: 8px;
  height: 10px;
  border-left: 1.6px solid currentColor;
  border-right: 1.6px solid currentColor;
}

.glyph--clock {
  width: 12px;
  height: 12px;
  border: 1.4px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(currentColor, currentColor) 4.4px 1.6px / 1.4px 4.6px no-repeat,
    linear-gradient(currentColor, currentColor) 4.4px 4.8px / 3px 1.4px no-repeat;
}

.glyph--box {
  width: 11px;
  height: 10px;
  border: 1.4px solid currentColor;
  border-top-width: 3px;
}

.glyph--end {
  width: 10px;
  height: 1.6px;
  background: currentColor;
}

/* ---------- sign-in ---------- */

.login {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(4rem, 14vh, 10rem);
  min-height: calc(100vh - 70px);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.login__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(5.5rem, 18vw, 16rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
  outline: none;
}

.login__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink);
}

.login__line {
  flex: 1 1 18rem;
  min-width: 0;
  margin: 0;
  padding-top: 1.85rem;
  font-size: 18px;
  line-height: 1.4;
}

.login__form {
  flex: 0 1 38rem;
  min-width: 0;
  margin: 0;
}

.login__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.login__input {
  flex: 1 1 16rem;
  min-width: 0;
  height: 56px;
  margin: 0;
  padding: 0 1rem;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.12em;
}

.login__controls .btn {
  height: 56px;
  padding: 0 1.5rem 0 1.75rem;
  gap: 0.7rem;
}

.login .flag {
  margin-top: 0.9rem;
}

/* ---------- list ---------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(1.5rem, 2.5vw, 2.25rem);
  border-bottom: 1px solid var(--line);
}

.hero__title {
  flex: 999 1 560px;
  min-width: 0;
  margin: 0;
  font-weight: 700;
  font-size: clamp(4.5rem, 12vw, 11rem);
  line-height: 0.82;
  letter-spacing: -0.055em;
  outline: none;
}

.summary {
  padding: 1.25rem 0 0;
}

.summary__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.summary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 0 clamp(1rem, 2.5vw, 2.5rem);
  margin: 0.75rem 0 0;
}

/* The figure first, its word under it, as on the artboard; in the DOM the word (dt) comes first. */
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: 1rem 0 1.75rem;
  border-top: 1px solid var(--ink);
}

.stat dt {
  margin-top: 0.85rem;
  font-size: 15px;
}

.stat dd {
  margin: 0;
  font-weight: 700;
  font-size: clamp(3.5rem, 7.4vw, 7.25rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.beam {
  background: var(--beam);
  padding: 0 0.06em;
}

.pct {
  font-size: 0.55em;
  letter-spacing: 0;
  margin-left: 0.08em;
}

.ads {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 0;
}

.ads__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
}

.ads__head .mono {
  font-size: 13px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 2.5rem;
  margin-top: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.list-status {
  margin: 1rem 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.list-status:empty {
  display: none;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 1.25rem;
}

.grid {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.35;
}

.grid th {
  padding: 8px 8px;
  border-bottom: 1px solid var(--ink);
  vertical-align: bottom;
  text-align: left;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.grid th.grid__group {
  padding: 6px 10px;
  border-left: 1px solid var(--line);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
}

.grid th.grid__thumb {
  width: 48px;
  padding-left: 0;
}

.grid td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.grid .num {
  text-align: right;
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.grid .grid__sep {
  border-left: 1px solid var(--line);
}

.grid td.ctr {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.grid td.empty {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.grid .dim {
  color: var(--muted);
}

.grid__namecell {
  min-width: 12rem;
}

.grid__apps {
  min-width: 6.5rem;
}

.grid__name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.grid__id {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
}

.grid__hide {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.grid tr.is-live .grid__hide {
  color: #3a3a3a;
}

.grid__mono {
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.grid__nowrap {
  white-space: nowrap;
}

.grid__actions {
  padding: 6px 8px 6px 6px !important;
  white-space: nowrap;
}

.grid__actions .link {
  padding: 0 0.3rem;
}

.grid__actions .link:first-child {
  font-weight: 600;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  white-space: nowrap;
}

.state--active {
  font-weight: 600;
}

.state--paused,
.state--archived,
.state--ended {
  color: var(--muted);
}

/* The beam: a live ad's row. */
.grid tr.is-live {
  background: var(--beam);
}

.grid tr.is-live td {
  border-bottom-color: var(--ink);
}

.grid tr.is-live .grid__sep {
  border-left-color: var(--ink-18);
}

.grid tr.is-live .grid__id,
.grid tr.is-live .dim {
  color: #3a3a3a;
}

.grid tr.is-off .grid__name {
  color: var(--muted);
}

.thumb {
  display: block;
  width: 36px;
  height: 78px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--line);
}

.thumb--34 {
  width: 44px;
  height: 59px;
}

.is-live .thumb {
  border-color: var(--ink);
}

.thumb--none {
  border-style: dashed;
  border-color: var(--muted);
  background: none;
}

/* Frequency as 1–5 squares. */
.dots {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}

.dots span {
  width: 8px;
  height: 8px;
  border: 1px solid var(--ink);
}

.dots span.on {
  background: var(--ink);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  max-width: min(36rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--ink);
  background: var(--beam);
  font-weight: 500;
  font-size: 14px;
}

/* ---------- form ---------- */

.edit-head {
  padding: clamp(1.25rem, 2.4vw, 2rem) 0 clamp(1.5rem, 2.5vw, 2.25rem);
  border-bottom: 1px solid var(--ink);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.75rem;
}

.crumbs .mono {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 500;
  font-size: 14px;
}

.crumb:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.edit-title {
  margin: 0.5rem 0 0;
  font-weight: 700;
  font-size: clamp(2.75rem, 6.6vw, 6.25rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  outline: none;
}

.edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  column-gap: clamp(2rem, 4.5vw, 4rem);
  align-items: start;
}

.edit__fields {
  min-width: 0;
}

.step {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding: 1.75rem 0 2.25rem;
  border-bottom: 1px solid var(--line);
}

.step--last {
  border-bottom: 0;
}

.step__no {
  flex: 0 0 7.5rem;
  margin: 0;
  font-weight: 700;
  font-size: clamp(3.5rem, 5.6vw, 5.25rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
}

.step__body {
  flex: 999 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.step__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.step__title {
  margin: 0;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
}

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 1.25rem 2rem;
}

.cols--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

fieldset.field > legend {
  padding: 0;
  margin-bottom: 0.3rem;
}

.field--id {
  flex: 1 1 13rem;
}

.field--wide {
  flex: 3 1 20rem;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.counter {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.counter--over {
  color: var(--ink);
  font-weight: 600;
  background: var(--beam);
  padding: 0 0.25rem;
}

/* Inputs are a line, not a box. */
.input {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-size: 17px;
  font-weight: 500;
}

.input:focus {
  outline: none;
  border-bottom-width: 2px;
  background: linear-gradient(to top, rgba(212, 255, 58, 0.45), rgba(212, 255, 58, 0.45)) 0 100% / 100% 40% no-repeat;
}

.input[aria-invalid='true'] {
  border-bottom: 2px solid var(--ink);
  background: linear-gradient(to top, var(--beam), var(--beam)) 0 100% / 100% 6px no-repeat;
}

.input--mono {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 15px;
}

.input--small {
  font-size: 13px;
}

.input--big {
  font-weight: 500;
  font-size: 20px;
}

.input--name {
  font-size: 17px;
}

.input[readonly] {
  color: var(--muted);
  border-bottom: 1px dashed var(--muted);
}

.input--title {
  height: 48px;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.input--body {
  height: auto;
  min-height: 72px;
  padding: 0.6rem 0;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.45;
  resize: vertical;
}

/* «Не показывать тем, у кого это приложение уже установлено» and its scheme. */
.installed {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.installed .opt {
  align-self: flex-start;
}

.field--scheme {
  max-width: 15rem;
}

.skip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 1rem;
}

.field--skip {
  width: 9rem;
}

.skip .hint {
  padding-bottom: 0.8rem;
}

.skip .flag {
  flex-basis: 100%;
}

/* Frequency slider: the native range input, drawn as the artboard's rail with five ticks and a lime square. */
.freq-big {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0;
}

.freq-big .beam {
  font-weight: 700;
  font-size: 3rem;
  line-height: 0.9;
  letter-spacing: -0.05em;
  padding: 0 0.12em;
}

.freq-big .mono {
  font-size: 13px;
}

.freq {
  max-width: 40rem;
  --pos: 0.5;
}

.freq__rail {
  position: relative;
  height: 44px;
}

.freq__ticks {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  pointer-events: none;
}

.freq__ticks span {
  justify-self: center;
  width: 1.5px;
  height: 14px;
  margin-top: 15px;
  background: var(--muted);
}

.freq__ticks span.on {
  background: var(--ink);
}

/* The input spans from the first tick's centre to the last one's, plus half a thumb on each side. */
.freq__input {
  position: absolute;
  top: 0;
  left: calc(10% - 14px);
  width: calc(80% + 28px);
  height: 44px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.freq__input:focus {
  outline: none;
}

.freq__input::-webkit-slider-runnable-track {
  height: 44px;
  background: linear-gradient(var(--ink), var(--ink)) 14px 50% / calc((100% - 28px) * var(--pos)) 4px no-repeat,
    linear-gradient(var(--line), var(--line)) 14px 50% / calc(100% - 28px) 2px no-repeat;
}

.freq__input::-moz-range-track {
  height: 44px;
  background: linear-gradient(var(--ink), var(--ink)) 14px 50% / calc((100% - 28px) * var(--pos)) 4px no-repeat,
    linear-gradient(var(--line), var(--line)) 14px 50% / calc(100% - 28px) 2px no-repeat;
}

.freq__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: 8px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--beam);
}

.freq__input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--beam);
}

.freq__input:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.freq__input:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.freq__nums,
.freq__words {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  text-align: center;
}

.freq__nums {
  margin-top: 0.2rem;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.freq__nums span.on {
  color: var(--ink);
  font-weight: 500;
}

.freq__words {
  margin-top: 0.15rem;
  font-size: 13px;
  color: var(--muted);
}

.share {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 40rem;
  padding-top: 0.25rem;
}

.share__app {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.share__bar {
  display: grid;
  grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr));
  gap: 4px;
}

.share__bar span {
  height: 12px;
  border: 1px solid var(--ink);
}

.share__bar span.on {
  background: var(--ink);
}

.share p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.share b {
  font-family: var(--mono);
  font-weight: 500;
}

/* Button type cards. */
.cta-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 1rem;
}

.cta-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-height: 9rem;
  margin: 1px;
  padding: 1.1rem 1.25rem 1.25rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
}

.cta-card:has(input:checked) {
  margin: 0;
  border-width: 2px;
  background: var(--beam);
  color: var(--ink);
}

.cta-card:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.cta-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-card__top input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ink);
}

.cta-card__name {
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.cta-card__sample {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  margin-top: auto;
  font-weight: 500;
  font-size: 14px;
}

.cta-card__sample .mono {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Creative slots. */
.creative {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.creative[hidden] {
  display: none;
}

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
  gap: 1.25rem 2rem;
}

.slot {
  display: flex;
  gap: 1rem;
  min-width: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.slot--media {
  border-top-color: var(--ink);
}

.slot__thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 121px;
  border: 1px dashed var(--muted);
  overflow: hidden;
}

.slot__thumb.has-file {
  border: 1px solid var(--ink);
}

.slot__thumb.is-34 {
  flex-basis: 90px;
  width: 90px;
  height: 120px;
}

.slot__thumb img,
.slot__thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slot__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  min-width: 0;
}

.slot__info {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.slot__info:empty {
  display: none;
}

.slot__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.slot__hint.is-asked {
  display: flex;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 500;
}

.slot__hint.is-asked::before {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 0.2em;
  background: var(--beam);
  border: 1.5px solid var(--ink);
}

.slot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  margin-left: -0.5rem;
}

.slot progress {
  width: 10rem;
  height: 4px;
  accent-color: var(--ink);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 26px;
  margin: 0;
  padding: 0 0.55rem;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
}

/* A check before a format that fits. */
.chip::before {
  content: '';
  width: 8px;
  height: 4px;
  margin: -3px 1px 0;
  border-left: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg);
}

.chip--bad {
  background: var(--beam);
}

.chip--bad::before {
  width: 10px;
  height: 1.6px;
  margin: 0;
  border: 0;
  background: currentColor;
  transform: none;
}

/* ---------- preview: A1 «Кино» (docs/ads.md §5) at 390 × 844, scaled into the phone ---------- */

.pv {
  position: sticky;
  top: 1.5rem;
  min-width: 0;
  padding: 1.75rem 0 2rem;
}

.pv__caption {
  margin: 0.35rem 0 1rem;
  font-size: 12px;
}

.phone {
  width: 300px;
  padding: 10px;
  background: var(--ink);
  border-radius: 46px;
}

.phone__screen {
  position: relative;
  width: 280px;
  height: 606px;
  overflow: hidden;
  border-radius: 36px;
  background: #000;
}

.ad {
  position: absolute;
  top: 0;
  left: 0;
  width: 390px;
  height: 844px;
  display: flex;
  flex-direction: column;
  transform: scale(0.71795);
  transform-origin: 0 0;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: var(--sans);
}

.ad__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ad__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(40px);
  transform: scale(1.25);
}

.ad__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.ad__media {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-height: 0;
  margin-top: 106px;
}

.ad__media img,
.ad__media video {
  display: block;
  width: 100%;
  object-fit: contain;
}

.ad__empty {
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.6);
}

/* 3:4: over the blurred poster (.ad__bg), the media at full width, contain, centred between the top bar and the
   bottom panel; the panel sits on the blurred background, no scrim. */
.ad[data-format='3:4'] .ad__media img,
.ad[data-format='3:4'] .ad__media video {
  height: 100%;
}

/* 9:16: full bleed, cover, and a scrim under the bottom panel. */
.ad[data-format='9:16'] .ad__media {
  position: absolute;
  inset: 0;
  margin: 0;
}

.ad[data-format='9:16'] .ad__media img,
.ad[data-format='9:16'] .ad__media video {
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.ad__scrim {
  display: none;
}

.ad[data-format='9:16'] .ad__scrim {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 360px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 30%, rgba(0, 0, 0, 0.9) 58%, rgba(0, 0, 0, 0.92) 100%);
}

.ad__top {
  position: absolute;
  top: 62px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ad__badge {
  display: flex;
  align-items: center;
  height: 28px;
  margin-right: auto;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.45);
  font-weight: 700;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.2px;
}

.ad__round {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.45);
  font-weight: 700;
  font-size: 16px;
}

.ad__ring {
  position: absolute;
  top: 0;
  left: 0;
}

.ad__close.is-ready .ad__ring {
  display: none;
}

.ad__bottom {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding: 24px 20px 42px;
}

.ad[data-format='9:16'] .ad__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.ad__title {
  margin: 0;
  font-weight: 700;
  font-size: 26px;
  line-height: 32px;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.ad__body {
  margin: 0;
  font-weight: 500;
  font-size: 15px;
  line-height: 21px;
  color: rgba(255, 255, 255, 0.85);
  overflow-wrap: anywhere;
}

.ad__body:empty {
  display: none;
}

.ad__placeholder {
  opacity: 0.45;
}

.ad__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  margin-top: 8px;
  border-radius: 16px;
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 700;
  font-size: 16px;
  line-height: 22px;
}

.ad__noads {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  font-weight: 700;
  font-size: 16px;
  line-height: 22px;
}

.pv__notes {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin: 1.25rem 0 0.5rem;
  font-size: 13px;
  line-height: 1.4;
}

.pv__notes dt {
  padding-top: 0.1rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pv__notes dd {
  margin: 0;
}

.pv .link {
  margin-left: -0.5rem;
}

/* The save bar stays at the bottom of the window while the form scrolls. */
.savebar {
  grid-column: 1 / -1;
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 1.25rem 0 2.5rem;
  border-top: 1px solid var(--ink);
  background: var(--paper);
}

.savebar .btn {
  padding: 0 1.75rem 0 1.4rem;
}

.note--bar {
  margin-left: auto;
  padding: 0;
}

/* ---------- narrow windows ---------- */

@media (max-width: 960px) {
  .edit {
    grid-template-columns: minmax(0, 1fr);
  }

  .pv {
    position: static;
  }
}

@media (max-width: 560px) {
  .step__no {
    flex-basis: 100%;
  }

  .savebar {
    padding-bottom: 1.25rem;
  }

  .note--bar {
    margin-left: 0;
  }

  .phone {
    margin: 0 auto;
  }
}
