/* =========================================================
   ДІМ.UA Video Engine — демо автогенерації відео.

   Напрям: преміальний proptech. Фото і відео — головний герой,
   інтерфейс навмисно тихий: одна акцентна барва, м'ятний відтінок
   точково, сітка 4/8, два радіуси, три рівні тіней.
   Палітра темної теми перерахована окремо, не інверсія.
   ========================================================= */

:root {
  --accent: #ff6a3d;
  --accent-600: #e8511f;
  --accent-050: #fff1eb;
  --mint: #0f9d8b;          /* «несподіваний» відтінок */
  --mint-bg: #e4f7f3;

  --n0: #ffffff;
  --n1: #f7f6f4;
  --n2: #efece8;
  --n3: #e2ded8;
  --n4: #c9c3ba;
  --n5: #9a938a;
  --n6: #6c655d;
  --n7: #403b35;
  --n8: #241f1b;
  --n9: #14100d;

  --bg: var(--n1);
  --surface: var(--n0);
  --surface-2: var(--n2);
  --line: var(--n3);
  --text: var(--n8);
  --text-2: var(--n6);
  --text-3: var(--n5);

  --r: 12px;
  --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(20, 16, 13, .06);
  --sh-2: 0 8px 24px -12px rgba(20, 16, 13, .22);
  --sh-3: 0 32px 70px -32px rgba(20, 16, 13, .45);

  --fh: "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
  --ft: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1240px;
  --dur: .22s;
}

[data-theme="dark"] {
  --accent: #ff7a52;
  --accent-600: #ff9370;
  --accent-050: #2a1810;
  --mint: #7de2d1;
  --mint-bg: #10302d;

  --bg: #0d1017;
  --surface: #141922;
  --surface-2: #1b212c;
  --line: #262d3a;
  --text: #eef1f6;
  --text-2: #a9b2c2;
  --text-3: #7b8496;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
  --sh-2: 0 10px 26px -14px rgba(0, 0, 0, .8);
  --sh-3: 0 36px 80px -36px rgba(0, 0, 0, .9);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--ft);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--fh); font-weight: 800; line-height: 1.08; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.4vw, 62px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: clamp(18px, 1.4vw, 21px); }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.ic { width: 20px; height: 20px; flex: none; }
.mini { font-size: 13px; color: var(--text-3); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px;
}
.skip { position: fixed; left: 16px; top: -60px; z-index: 90; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: var(--r); transition: top var(--dur); }
.skip:focus { top: 16px; }

/* ---------- шапка ---------- */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.hdr__in { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin: 0; }
.logo__mark {
  width: 36px; height: 36px; border-radius: 11px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-family: var(--fh); font-weight: 800; font-size: 19px;
}
.logo__txt { display: grid; line-height: 1.15; }
.logo__txt b { font-family: var(--fh); font-size: 16px; letter-spacing: -.01em; }
.logo__txt i { font-style: normal; font-size: 11.5px; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a {
  padding: 8px 12px; border-radius: 9px; text-decoration: none; font-size: 14.5px;
  color: var(--text-2); transition: background var(--dur), color var(--dur);
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.is-cur { color: var(--accent); }
.hdr__act { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px;
  background: transparent; border: 1px solid var(--line); cursor: pointer;
  transition: background var(--dur), transform var(--dur), border-color var(--dur);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.96); }
.ic--moon { display: none; }
[data-theme="dark"] .ic--sun { display: none; }
[data-theme="dark"] .ic--moon { display: block; }

.burger { display: none; flex-direction: column; gap: 4px; }
.burger span { width: 17px; height: 2px; background: currentColor; border-radius: 2px; transition: transform var(--dur), opacity var(--dur); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  padding: 12px 20px; min-height: 44px; border: 1px solid transparent; border-radius: var(--r);
  background: var(--accent); color: #fff; font-family: var(--fh); font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer; box-shadow: var(--sh-1);
  transition: background var(--dur), transform var(--dur), box-shadow var(--dur), opacity var(--dur);
}
.btn:hover { background: var(--accent-600); box-shadow: var(--sh-2); }
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--n4); }
.btn--lg { padding: 15px 26px; min-height: 52px; font-size: 16px; }
.btn--sm { padding: 8px 14px; min-height: 38px; font-size: 14px; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 14px; padding: 6px 4px; }
.link-btn:hover { text-decoration: underline; }

.kicker {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--fh); font-weight: 700;
  font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}
.kicker .ic { width: 16px; height: 16px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(44px, 6vw, 84px) 0 clamp(36px, 4vw, 56px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 620px; z-index: -1;
  background:
    radial-gradient(700px 320px at 18% 12%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    radial-gradient(560px 300px at 82% 0%, color-mix(in srgb, var(--mint) 18%, transparent), transparent 72%);
  filter: blur(6px);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(90% 60% at 50% 0%, #000 20%, transparent 78%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero__copy h1 { margin: 14px 0 18px; }
.hero__copy h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(16px, 1.25vw, 18.5px); color: var(--text-2); max-width: 54ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 30px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 10px; margin: 0; padding-top: 22px; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--fh); font-weight: 800; font-size: clamp(17px, 1.5vw, 22px); font-variant-numeric: tabular-nums; }
.facts dd { margin: 3px 0 0; font-size: 12.5px; color: var(--text-3); line-height: 1.35; }

.player {
  position: relative; margin: 0; border-radius: 20px; overflow: hidden;
  background: #0b0d12; box-shadow: var(--sh-3); border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
}
.player video { width: 100%; height: 100%; object-fit: cover; }
.player__play {
  position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 50%;
  border: 0; background: color-mix(in srgb, var(--accent) 92%, #000); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .7);
  transition: transform var(--dur), background var(--dur), opacity var(--dur);
}
.player__play .ic { width: 34px; height: 34px; margin-left: 3px; }
.player__play:hover { transform: scale(1.06); }
.player.is-playing .player__play { opacity: 0; pointer-events: none; }
.player__bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums;
  background: linear-gradient(transparent, rgba(6, 8, 14, .82));
}
.player__track { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.player__track i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; }
.player__tag { color: rgba(255, 255, 255, .7); }
.hero__note { margin-top: 26px; font-size: 13.5px; color: var(--text-3); max-width: 78ch; }

/* ---------- секції ---------- */
.sec { padding: clamp(48px, 6vw, 96px) 0; }
.sec--studio { background: var(--surface); border-block: 1px solid var(--line); }
.sec--how { padding-block: clamp(44px, 5vw, 76px); }
.sec--jobs { background: var(--surface); border-block: 1px solid var(--line); }
.sec--tech { padding-bottom: clamp(56px, 7vw, 110px); }
.sec__head { max-width: 68ch; margin-bottom: clamp(24px, 3vw, 40px); }
.sec__head h2 { margin: 12px 0 10px; }
.sec__head--row { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; max-width: none; flex-wrap: wrap; }
.sec__sub { color: var(--text-2); }

/* ---------- студія ---------- */
.steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 20px; padding: 0; }
.step {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 15px 8px 8px;
  border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 14px; color: var(--text-3);
  background: var(--bg); transition: color var(--dur), border-color var(--dur), background var(--dur);
}
.step b {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-3); font-family: var(--fh); font-size: 13px;
}
.step.is-active { color: var(--text); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.step.is-active b { background: var(--accent); color: #fff; }
.step.is-done b { background: var(--mint); color: #fff; }

.studio { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.panel {
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; gap: 14px; min-height: 220px;
}
.panel--wide { grid-column: 1 / -1; }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel__head h3 { font-size: 17px; }
.panel__foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.hint { font-size: 13px; color: var(--text-3); }
.empty { color: var(--text-3); font-size: 14px; padding: 18px 0; }

.pics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pic {
  position: relative; border: 0; padding: 0; border-radius: var(--r); overflow: hidden; cursor: pointer;
  aspect-ratio: 16 / 10; background: var(--surface-2); box-shadow: var(--sh-1);
  transition: transform var(--dur), box-shadow var(--dur);
}
.pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .3, 1); }
.pic:hover img { transform: scale(1.05); }
.pic:active { transform: scale(.985); }
.pic span {
  position: absolute; left: 8px; bottom: 8px; padding: 4px 9px; border-radius: var(--r-pill);
  background: rgba(10, 12, 18, .68); color: #fff; font-size: 11.5px; backdrop-filter: blur(4px);
}
.pic i {
  position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .85); display: grid; place-items: center; color: #fff;
  background: rgba(10, 12, 18, .3); transition: background var(--dur), border-color var(--dur);
}
.pic i .ic { width: 14px; height: 14px; opacity: 0; }
.pic.is-on { outline: 3px solid var(--accent); outline-offset: -3px; }
.pic.is-on i { background: var(--accent); border-color: var(--accent); }
.pic.is-on i .ic { opacity: 1; }

.analysis { display: grid; gap: 12px; }
.an-card { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--surface); }
.an-card > b { font-family: var(--fh); font-size: 14px; }
.an-rows { display: grid; gap: 7px; margin-top: 9px; }
.an-row { display: grid; grid-template-columns: 118px minmax(0, 1fr) 46px; align-items: center; gap: 10px; font-size: 13px; }
.an-row > span:first-child { color: var(--text-3); display: grid; line-height: 1.25; }
.an-row > span:first-child small { color: var(--text); font-size: 12.5px; }
.an-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.an-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .7s cubic-bezier(.2, .7, .3, 1); }
.an-bar i.is-low { background: var(--n4); }
.an-row .num { color: var(--text-2); font-size: 12.5px; }
.json { background: var(--n9); color: #d7e3f4; border-radius: var(--r); padding: 14px; overflow: auto; font-size: 12.5px; max-height: 260px; margin: 0; }

.matches { display: grid; gap: 8px; }
.match {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r); padding: 11px 14px; cursor: pointer;
  background: var(--surface); text-align: left; transition: border-color var(--dur), background var(--dur);
}
.match:hover { border-color: var(--n4); }
.match.is-on { border-color: var(--accent); background: var(--accent-050); }
.match__pct { font-family: var(--fh); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.match.is-on .match__pct { color: var(--accent); }
.match b { display: block; font-family: var(--fh); font-size: 14.5px; font-weight: 700; }
.match small { color: var(--text-3); font-size: 12.5px; }
.match__id { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.script { display: grid; gap: 8px; }
.script label { font-size: 13px; color: var(--text-2); display: flex; justify-content: space-between; gap: 10px; }
textarea, input[type="text"], input[type="search"], select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); transition: border-color var(--dur), box-shadow var(--dur);
}
textarea { resize: vertical; line-height: 1.55; font-size: 14.5px; }
textarea:focus, input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); outline: none; }

.gen { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 18px; align-items: start; }
.gen__log { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.gen__log li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; font-size: 13.5px; color: var(--text-3); align-items: start; }
.gen__log li b { display: block; font-family: var(--fh); font-weight: 600; font-size: 13.5px; color: var(--text-2); }
.gen__log li small { display: block; font-size: 12px; color: var(--text-3); }
.gen__log li.is-run b, .gen__log li.is-ok b { color: var(--text); }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); margin-top: 3px; display: grid; place-items: center; }
.is-run .dot { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.is-ok .dot { background: var(--mint); border-color: var(--mint); }
.is-ok .dot::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
@keyframes spin { to { transform: rotate(360deg); } }

.stage { position: relative; border-radius: var(--r); overflow: hidden; background: #0b0d12; border: 1px solid var(--line); aspect-ratio: 16 / 9; }
.stage canvas { width: 100%; height: 100%; }
.stage__overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #c6ccd8; background: #0b0d12; font-size: 14px; }
.stage__overlay[hidden] { display: none; }
.stage__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .18); }
.stage__bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.gen__foot { padding-top: 4px; }

/* ---------- як працює ---------- */
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; counter-reset: f; }
/* Сходинка: другий і третій стовпці зсунуті вниз — щоб сітка не читалась
   як звичайні три однакові картки в ряд. */
@media (min-width: 901px) {
  .flow__item:nth-child(3n - 1) { transform: translateY(22px); }
  .flow__item:nth-child(3n) { transform: translateY(44px); }
  .flow { padding-bottom: 44px; }
}
.flow__item {
  position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 22px 20px 20px;
  background: var(--surface); box-shadow: var(--sh-1); overflow: hidden;
}
.flow__item::before {
  counter-increment: f; content: "0" counter(f);
  position: absolute; right: 14px; top: 8px; font-family: var(--fh); font-weight: 800; font-size: 42px;
  color: color-mix(in srgb, var(--accent) 16%, transparent);
}
.flow__item::after {
  content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px;
  background: linear-gradient(var(--accent), color-mix(in srgb, var(--mint) 70%, transparent));
  border-radius: 0 3px 3px 0;
}
.flow__item b { display: block; font-family: var(--fh); font-size: 16px; margin-bottom: 6px; }
.flow__item p { font-size: 14px; color: var(--text-2); }
.flow__item span { display: inline-block; margin-top: 12px; font-size: 12px; color: var(--mint); background: var(--mint-bg); padding: 4px 10px; border-radius: var(--r-pill); }

/* ---------- таблиці ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.field select { width: auto; min-width: 132px; padding: 9px 11px; }
.field--search { position: relative; flex: 1 1 260px; }
.field--search .ic { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; }
.field--search input { padding-left: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-pill);
  padding: 8px 14px; font-size: 13px; cursor: pointer; min-height: 38px;
  transition: background var(--dur), border-color var(--dur), color var(--dur);
}
.chip:hover { border-color: var(--n4); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }

.table-wrap { border: 1px solid var(--line); border-radius: 16px; background: var(--bg); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.table th, .table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { position: sticky; top: 0; background: var(--surface-2); font-family: var(--fh); font-size: 12.5px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; z-index: 1; }
.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.th-sort:hover { color: var(--text); }
.th-sort::after { content: "↕"; opacity: .35; margin-left: 6px; font-size: 11px; }
.th-sort.asc::after { content: "↑"; opacity: 1; color: var(--accent); }
.th-sort.desc::after { content: "↓"; opacity: 1; color: var(--accent); }
.table tbody tr { transition: background var(--dur); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.row-title { font-family: var(--fh); font-weight: 700; }
.row-sub { display: block; font-size: 12.5px; color: var(--text-3); }
.tagrow { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 11.5px; padding: 3px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.tag--fallback { background: var(--mint-bg); color: var(--mint); }
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--n4); }
.st--done::before { background: var(--mint); }
.st--render::before { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.st--queue::before { background: var(--n4); }
.st--error::before { background: #d64545; }
@keyframes pulse { 50% { opacity: .35; } }
.rowbtn { background: none; border: 1px solid var(--line); border-radius: 9px; padding: 6px 11px; font-size: 12.5px; cursor: pointer; min-height: 34px; }
.rowbtn:hover { background: var(--surface-2); }
.rowbtn--danger:hover { border-color: #d64545; color: #d64545; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--bg); }
.kpi b { display: block; font-family: var(--fh); font-size: clamp(20px, 2vw, 26px); font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12.5px; color: var(--text-3); }

/* ---------- бенто ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: var(--surface); box-shadow: var(--sh-1); }
.card--lg { grid-row: span 2; }
.card h3 { margin-bottom: 14px; }
.arch { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.arch li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; font-size: 13.5px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.arch li:last-child { border-bottom: 0; padding-bottom: 0; }
.arch b { font-family: var(--fh); }
.arch span { color: var(--text-2); }
.cost { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.cost li { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); }
.cost li b { color: var(--text); font-variant-numeric: tabular-nums; }
.cost__total { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.cost__total b { font-family: var(--fh); color: var(--accent); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 13.5px; color: var(--text-2); }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 15px; height: 9px;
  border-left: 2px solid var(--mint); border-bottom: 2px solid var(--mint); transform: rotate(-45deg);
}
.ticks--todo li::before { border-color: var(--accent); transform: none; top: 9px; width: 14px; height: 0; }

/* ---------- підвал, бейдж, модалка, тости ---------- */
.ftr { border-top: 1px solid var(--line); padding: 36px 0 92px; background: var(--surface); }
.ftr__in { display: flex; gap: 28px; justify-content: space-between; flex-wrap: wrap; }
.ftr .mini { max-width: 52ch; margin-top: 10px; }
.ftr__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.ftr__links a { color: var(--text-2); text-decoration: none; }
.ftr__links a:hover { color: var(--accent); }

.badge {
  position: fixed; right: 16px; bottom: 16px; z-index: 35;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 14px;
  font-size: 12.5px; color: var(--text-2); box-shadow: var(--sh-2);
}

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__back { position: absolute; inset: 0; background: rgba(10, 12, 18, .55); backdrop-filter: blur(3px); animation: fade .2s ease; }
.modal__box {
  position: relative; width: min(100%, 640px); max-height: 86vh; overflow: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 26px;
  box-shadow: var(--sh-3); animation: pop .24s cubic-bezier(.2, .8, .3, 1);
}
.modal__x { position: absolute; right: 14px; top: 14px; }
.modal__box h3 { padding-right: 40px; margin-bottom: 14px; }
.modal dl { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 8px 14px; font-size: 14px; margin: 0 0 16px; }
.modal dt { color: var(--text-3); }
.modal dd { margin: 0; }
.modal .quote { background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 0 var(--r) var(--r) 0; padding: 12px 14px; font-size: 14.5px; line-height: 1.55; margin-bottom: 16px; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form .err { color: #d64545; font-size: 13px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; }
.toast {
  background: var(--n9); color: #fff; padding: 12px 18px; border-radius: var(--r); font-size: 14px;
  box-shadow: var(--sh-3); animation: pop .24s cubic-bezier(.2, .8, .3, 1);
}
[data-theme="dark"] .toast { background: var(--surface-2); border: 1px solid var(--line); }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--lg { grid-row: span 1; grid-column: 1 / -1; }
  .gen { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nav {
    position: fixed; inset: 68px 0 auto; flex-direction: column; gap: 0; padding: 10px 20px 20px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--sh-2);
    transform: translateY(-130%); transition: transform .3s cubic-bezier(.2, .8, .3, 1);
  }
  .nav.is-open { transform: none; }
  .nav a { padding: 13px 8px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .burger { display: inline-flex; }
  .studio { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .hdr__act .btn--sm { display: none; }
}
@media (max-width: 720px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: 1fr; }
  .sec__head--row { align-items: flex-start; }
  .modal .row, .form .row { grid-template-columns: 1fr; }
  .modal dl { grid-template-columns: 1fr; gap: 2px 0; }
  .modal dt { margin-top: 8px; }
  .badge { left: 16px; right: 16px; text-align: center; }
  .an-row { grid-template-columns: 104px minmax(0, 1fr) 40px; }
}
@media (max-width: 420px) {
  .wrap { width: min(100% - 28px, var(--wrap)); }
  .panel { padding: 16px; }
  .btn--lg { width: 100%; }
}

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