/* Дизайн-код v1: білий і сірий, чорнило, один помаранчевий акцент */
:root {
  --bg: #FFFFFF; --surface: #F4F3F0; --surface-2: #EAE8E3; --line: #E4E1DB;
  --ink: #0E0E0F; --ink-2: #55534F; --muted: #8E8A83;
  --accent: #FF4A1C; --accent-ink: #C2330E; --accent-soft: #FFEAE2;
  --display: 'Inter Tight', system-ui, sans-serif; --text: 'Inter', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --r-s: 10px; --r-m: 18px; --r-l: 28px;
  --gut: 16px; --col: 680px; --wide: 900px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.62 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Верх */
.top { position: fixed; inset: 0 0 auto 0; z-index: 20; height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--gut); background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 15px/1 var(--display); min-width: 0; }
.brand strong { background: var(--ink); color: #fff; padding: 6px 8px; border-radius: 8px; font-weight: 700; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now { flex: none; font: 500 12px/1 var(--mono); color: var(--ink-2); text-decoration: none; background: var(--surface); padding: 8px 12px; border-radius: 99px; }
.bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; }

/* Рейка зліва на широких екранах */
.rail { display: none; }
@media (min-width: 1240px) {
  .rail { display: block; position: fixed; left: 22px; top: 86px; width: 170px; z-index: 5; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .past-hero .rail { opacity: 1; pointer-events: auto; }
  .rail ol { list-style: none; margin: 0; padding: 0; }
  .rail a { display: flex; align-items: center; gap: 8px; padding: 4px 0; text-decoration: none; font-size: 13px; line-height: 1.3; color: var(--muted); }
  .rail a b { font: 500 11px/1 var(--mono); width: 16px; flex: none; }
  .rail a:hover { color: var(--ink); }
  .rail a.on { color: var(--ink); font-weight: 600; }
}

/* Hero */
.hero { background: var(--surface); padding: 84px var(--gut) 32px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.hero > * { min-width: 0; }
.kicker, .num { font: 500 12px/1.5 var(--mono); color: var(--ink-2); margin: 0 0 14px; }
h1 { font: 700 clamp(42px, 10vw, 80px)/.98 var(--display); letter-spacing: -.035em; margin: 0 0 18px; }
h1 em { font-style: normal; color: var(--muted); }
.lede { font-size: 18px; line-height: 1.5; color: var(--ink-2); margin: 0; max-width: 34em; }
.hero .row { margin-top: 22px; }
@media (min-width: 960px) {
  .hero { min-height: 100svh; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; padding: 84px clamp(32px, 5vw, 80px) 40px; gap: 40px; }
  h1 { font-size: clamp(48px, 5.6vw, 88px); }
}

/* Таймлайн у hero: агент ріже паузи і ставить титри */
.tl { margin: 0; background: #fff; border-radius: var(--r-l); padding: 18px; box-shadow: 0 0 0 1px var(--line); }
.tl-msg { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.tl-msg p { margin: 0; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 18px 18px 4px 18px; font-size: 15px; line-height: 1.4; max-width: 90%; min-height: 1.4em; }
.tl-msg p::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: #fff; animation: caret 1s steps(2) infinite; }
.tl.typed .tl-msg p::after { display: none; }
@keyframes caret { 50% { opacity: 0; } }
.tl-screen { position: relative; aspect-ratio: 16 / 7; background: var(--surface); border-radius: var(--r-m); overflow: hidden; display: grid; place-items: end center; padding: 0 12px 16px; }
.tl-screen::before { content: ''; position: absolute; left: 50%; top: 16%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--surface-2); transform: translateX(-50%); }
.tl-screen::after { content: ''; position: absolute; left: 50%; top: 58%; width: 44%; height: 60%; border-radius: 50% 50% 0 0; background: var(--surface-2); transform: translateX(-50%); }
.tl-caps { position: relative; z-index: 1; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 34px; }
.tl-caps span { font: 700 clamp(15px, 3.6vw, 20px)/1 var(--display); background: #fff; padding: 7px 10px; border-radius: 8px; opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .25s, transform .25s; }
.tl-caps span.k { background: var(--accent); }
.tl-caps span.on { opacity: 1; transform: none; }
.tl-track { position: relative; display: flex; align-items: center; height: 64px; margin: 14px 0 10px; overflow: hidden; }
.tl-track i { flex: none; width: 4px; margin-right: 2px; border-radius: 2px; background: var(--ink); transition: width .6s cubic-bezier(.2,.8,.2,1), margin .6s cubic-bezier(.2,.8,.2,1), opacity .4s, background .3s; }
.tl-track i.sil { background: var(--surface-2); }
@media (max-width: 460px) { .tl { padding: 14px; } .tl-track i { width: 3px; margin-right: 1px; } }
.tl.mark .tl-track i.sil { background: repeating-linear-gradient(0deg, var(--accent) 0 3px, transparent 3px 6px); opacity: .7; }
.tl.cut .tl-track i.sil { width: 0; margin-right: 0; opacity: 0; }
.tl-head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--accent); opacity: 0; }
.tl.scan .tl-head { opacity: 1; animation: scan 1.6s linear forwards; }
@keyframes scan { to { left: calc(100% - 2px); } }
.tl-status { display: flex; justify-content: space-between; gap: 10px; font: 500 12px/1.4 var(--mono); color: var(--ink-2); min-height: 1.4em; }
.tl-status b { font-weight: 500; color: var(--ink); }
.tl.done .tl-status b { color: var(--accent-ink); }

/* Кнопки */
.seg { display: inline-flex; gap: 3px; padding: 3px; background: var(--surface-2); border-radius: 99px; max-width: 100%; }
.seg button { border: 0; background: none; padding: 10px 16px; min-height: 42px; border-radius: 99px; cursor: pointer; font: 500 14px/1.2 var(--text); color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 22px; border: 0; border-radius: 99px; background: var(--ink); color: #fff; font: 600 15px/1.2 var(--text); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: #2a2a2c; color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: #fff; color: var(--ink); }
.btn.accent { background: var(--accent); color: var(--ink); }
.btn.accent:hover { background: #FF6A42; color: var(--ink); }
.btn.ghost-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.btn.ghost-light:hover { background: rgba(255,255,255,.1); color: #fff; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }

/* Стаття */
.col { width: min(var(--col), 100% - var(--gut) * 2); margin-inline: auto; }
.wide { width: min(var(--wide), 100vw - 32px); margin-inline: calc((min(var(--wide), 100vw - 32px) - 100%) / -2); }
.author { padding-top: 56px; }
.h-small { font: 700 28px/1.1 var(--display); letter-spacing: -.02em; margin: 0 0 20px; }
.author-grid { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: start; }
.author-grid img { width: 110px; height: 143px; object-fit: cover; object-position: 50% 85%; border-radius: var(--r-m); }
.author-grid p:first-child { margin-top: 0; }
@media (min-width: 640px) { .author-grid { grid-template-columns: 160px 1fr; gap: 24px; } .author-grid img { width: 160px; height: 208px; } }
.chapter { padding-top: 72px; }
.chapter h2 { font: 700 clamp(32px, 7vw, 50px)/1.04 var(--display); letter-spacing: -.03em; margin: 0 0 24px; }
h3 { font: 700 24px/1.18 var(--display); letter-spacing: -.02em; margin: 44px 0 12px; scroll-margin-top: 72px; }
h4 { font: 700 18px/1.25 var(--display); margin: 0 0 8px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 16px; padding-left: 20px; }
li { margin-bottom: 6px; }
li::marker { color: var(--muted); }
code { font: 500 .88em/1 var(--mono); background: var(--surface); padding: 2px 6px; border-radius: 6px; }
.small { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.pull { font: 700 clamp(24px, 5vw, 32px)/1.14 var(--display); letter-spacing: -.02em; margin: 32px 0; }
.note { background: var(--surface); border-radius: var(--r-m); padding: 16px 18px; font-size: 16px; line-height: 1.5; margin: 20px 0; }
.note p:last-child { margin: 0; }
.note b { font-family: var(--display); }

/* Коротко */
.tldr { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tldr li { margin: 0; background: var(--surface); border-radius: var(--r-m); padding: 14px 16px; font-size: 16px; line-height: 1.45; }
.tldr b { font-family: var(--display); }

/* Таблиці */
.tbl { overflow-x: auto; margin: 20px 0; border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--line); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.4; min-width: 520px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 13px/1.3 var(--display); background: var(--surface); color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 500; }
.y { color: var(--ink); font-weight: 600; }
.n { color: var(--muted); }
.tbl-2 table { min-width: 0; }

/* Добре / поки слабо */
.pair { display: grid; gap: 12px; margin: 20px 0; }
.pair > div { background: var(--surface); border-radius: var(--r-l); padding: 20px; }
.pair .weak { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.pair ul { font-size: 15.5px; line-height: 1.45; margin: 0; }
@media (min-width: 720px) { .pair { grid-template-columns: 1.1fr 1fr; width: min(var(--wide), 100vw - 32px); margin-inline: calc((min(var(--wide), 100vw - 32px) - 100%) / -2); } }

/* Порівняння: чат і агент */
.w { background: var(--surface); border-radius: var(--r-l); padding: 18px; margin: 24px 0; }
@media (min-width: 720px) { .w { padding: 24px; } }
.w-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; font: 500 12px/1.4 var(--mono); color: var(--ink-2); }
.chat { background: #fff; border-radius: var(--r-m); padding: 14px; display: grid; gap: 8px; min-height: 280px; align-content: start; }
.chat p { margin: 0; padding: 10px 13px; border-radius: 16px; font-size: 15px; line-height: 1.45; max-width: 88%; }
.chat .me { background: var(--ink); color: #fff; justify-self: end; border-bottom-right-radius: 4px; }
.chat .ai { background: var(--surface); justify-self: start; border-bottom-left-radius: 4px; }
.chat .file { font: 500 12px/1.3 var(--mono); color: var(--ink-2); justify-self: end; padding: 0 4px; }
.chat .log { font: 500 13px/1.6 var(--mono); background: var(--surface); justify-self: stretch; max-width: 100%; border-radius: 12px; }
.chat .log span { display: block; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; }
.chat .log span.on { opacity: 1; transform: none; }
.chat .log span::before { content: '✓ '; color: var(--muted); }
.chat .log span.fin::before { content: '→ '; color: var(--accent-ink); }
.chat .log span.fin { color: var(--ink); font-weight: 600; }
.verdict { margin: 14px 0 0; font: 600 17px/1.4 var(--display); }

/* До і після */
.ba { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 24px 0 8px; }
.ba figure { margin: 0; }
.ba .frame { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-m); overflow: hidden; background: var(--surface-2); }
.ba img, .ba video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba video { opacity: 0; transition: opacity .2s; }
.ba .playing video { opacity: 1; }
.ba .tgl { position: absolute; right: 10px; bottom: 10px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; }
.ba .tgl svg { width: 16px; height: 16px; }
.ba .i-pause, .ba .playing .i-play { display: none; }
.ba .playing .i-pause { display: block; }
.ba figcaption { margin-top: 8px; font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.ba figcaption b { display: block; font: 700 16px/1.2 var(--display); color: var(--ink); }
.ba figure:last-child figcaption b { color: var(--accent-ink); }
.ba .arr { font: 500 20px/1 var(--mono); color: var(--muted); }
@media (min-width: 720px) { .ba { width: 560px; max-width: 100%; } }
/* Горизонтальна пара: на телефоні одна під одною, на широкому — поруч */
.ba.land { grid-template-columns: minmax(0, 1fr); }
.ba.land .frame { aspect-ratio: 4 / 3; }
.ba.land .arr { justify-self: center; transform: rotate(90deg); }
@media (min-width: 720px) { .ba.land { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); width: min(var(--wide), 100vw - 32px); max-width: none; margin-inline: calc((min(var(--wide), 100vw - 32px) - 100%) / -2); } .ba.land .arr { transform: none; } }
.solo { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 18px; align-items: center; margin: 28px 0 8px; }
.solo figure { margin: 0; }
.solo .frame { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-m); overflow: hidden; background: var(--surface-2); }
.solo img, .solo video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.solo video { opacity: 0; transition: opacity .2s; }
.solo .playing video { opacity: 1; }
.solo .tgl { position: absolute; right: 10px; bottom: 10px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; }
.solo .tgl svg { width: 16px; height: 16px; }
.solo .i-pause, .solo .playing .i-play { display: none; }
.solo .playing .i-pause { display: block; }
.solo h3 { margin: 0 0 8px; font-size: 22px; }
.solo .kicker { margin-bottom: 6px; }
.solo p:last-child { margin: 0; font-size: 16px; line-height: 1.5; }
@media (min-width: 640px) { .solo { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; } }

/* Цифри автора */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 20px 0; }
.stats div { background: var(--surface); border-radius: var(--r-m); padding: 14px 14px 12px; }
.stats b { display: block; font: 700 clamp(18px, 4.6vw, 26px)/1.1 var(--display); letter-spacing: -.02em; }
.stats span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
@media (max-width: 420px) { .stats { grid-template-columns: minmax(0, 1fr); } .stats div { display: flex; align-items: baseline; gap: 10px; } .stats span { margin: 0; } }

/* Вступ одразу після відео */
.intro { margin: 32px 0 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); }
.intro p { margin: 0 0 12px; }
.intro p:last-child { margin: 0; }

/* Порівняння з монтажером у правках */
.note { background: var(--accent-soft); border-radius: var(--r-m); padding: 14px 16px; }

/* Картка потоку Reels студії в hero */
.cohort { display: block; margin-top: 22px; padding: 16px 18px; border-radius: var(--r-m); background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); text-decoration: none; max-width: 520px; }
.cohort:hover { color: inherit; background: var(--accent-soft); }
.cohort .k { display: block; font: 500 12px/1.4 var(--mono); color: var(--accent-ink); margin-bottom: 6px; }
.cohort > b { display: block; font: 600 17px/1.35 var(--display); }
.cohort .m { display: block; margin-top: 8px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.cohort .m b { color: var(--ink); white-space: nowrap; }

/* Кроки й промпти */
.steps { list-style: none; padding: 0; margin: 24px 0 0; counter-reset: st; }
.steps > li { margin: 0 0 36px; padding-left: 0; }
.st-h { display: flex; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.st-h b { flex: none; font: 500 12px/1 var(--mono); background: var(--ink); color: #fff; padding: 6px 9px; border-radius: 99px; }
.st-h h3 { margin: 0; }
.prompt { background: var(--ink); color: #fff; border-radius: var(--r-m); margin: 14px 0; overflow: hidden; }
.prompt-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-bottom: 1px solid rgba(255,255,255,.12); font: 500 12px/1.3 var(--mono); color: rgba(255,255,255,.6); }
.copy { border: 0; background: #fff; color: var(--ink); padding: 8px 14px; min-height: 36px; border-radius: 99px; font: 600 13px/1 var(--text); cursor: pointer; }
.copy:hover { background: var(--surface); }
.copy.ok { background: var(--accent); }
.prompt pre { margin: 0; padding: 14px 16px 16px; white-space: pre-wrap; word-break: break-word; font: 400 14.5px/1.6 var(--mono); }
.prompt mark { background: rgba(255,74,28,.28); color: #fff; border-radius: 3px; padding: 0 2px; }
.after { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.after::before { content: '→ '; color: var(--accent-ink); font-family: var(--mono); }

/* Правки: розмито → точно */
.fix-grid { display: grid; gap: 8px; }
@media (min-width: 640px) { .fix-grid { grid-template-columns: 1fr 1fr; } }
.fix { position: relative; text-align: left; border: 0; background: #fff; border-radius: var(--r-m); padding: 16px 16px 40px; cursor: pointer; min-height: 132px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.fix:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.fix span { display: block; font: 600 17px/1.35 var(--display); }
.fix .v { color: var(--ink-2); }
.fix .v::before { content: '«'; } .fix .v::after { content: '»'; }
.fix .c { display: none; }
.fix[aria-pressed="true"] .v { display: none; }
.fix[aria-pressed="true"] .c { display: block; }
.fix[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.fix i { position: absolute; left: 16px; bottom: 12px; font: 500 11px/1 var(--mono); font-style: normal; color: var(--muted); }
.fix[aria-pressed="true"] i { color: var(--accent-ink); }

/* Чекліст */
.check { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.check li { margin: 0; }
.check label { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: var(--r-s); background: #fff; cursor: pointer; font-size: 15.5px; line-height: 1.4; }
.check label:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.check input { flex: none; width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--ink); }
.check input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.meter { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 4px 0 14px; }
.meter i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s; }
.meter.full i { background: var(--accent); }

/* FAQ */
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { padding: 16px 28px 16px 0; font: 600 18px/1.3 var(--display); cursor: pointer; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 2px; top: 14px; font: 500 20px/1.2 var(--mono); color: var(--muted); }
details[open] summary::after { content: '−'; }
details > *:last-child { margin-bottom: 18px; }

/* Заклик */
.push { margin-top: 56px; padding: 28px 24px; background: var(--surface); border-radius: var(--r-l); box-shadow: inset 0 0 0 2px var(--accent); }
.push h2 { margin: 0 0 12px; font: 700 clamp(28px, 5vw, 38px)/1.08 var(--display); letter-spacing: -.025em; }
.push p { margin: 0 0 12px; }
.push .row { margin-top: 18px; }
.push .small { margin: 14px 0 0; }

/* Кінець */
.end { background: var(--ink); color: #fff; padding: 56px 0 40px; margin-top: 72px; }
.end img { width: 56px; height: 56px; border-radius: 50%; margin-bottom: 16px; }
.end p { font-size: 18px; line-height: 1.5; }
.end .small { color: rgba(255,255,255,.65); font-size: 14px; margin-top: 22px; }
.end a:hover { color: #fff; }

/* Тост */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 99px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
