@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/space-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #f4f4f0;
  --ink: #000;
  --muted: #4a4a46;
  --green: #30d158; /* цвета эмблемы расширения */
  --navy: #1a1a2e;
  --yellow: #ffc900;
  --line: 1px solid #000;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 18px; line-height: 1.5; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; line-height: 1.08; letter-spacing: -0.02em; margin: 0; font-weight: 500; }

/* Шапка: как у образца, плоская полоса с чёрной линией снизу */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 0 0 0 28px; height: 72px; background: #fff; border-bottom: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; white-space: nowrap; font-size: 17px; }
.nav a:hover { background: #000; color: #fff; }
.top-cta { white-space: nowrap; align-self: stretch; display: flex; align-items: center; padding: 0 28px; background: #000; color: #fff; text-decoration: none; font-weight: 500; border-left: var(--line); }
.top-cta:hover { background: var(--green); color: #000; }

/* Кнопки: чёрные прямоугольники, при наведении сдвиг и тень */
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 500; font-size: 17px; padding: 14px 24px; background: #000; color: #fff; border: var(--line); border-radius: 4px; cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 #000; }
.btn:active { transform: none; box-shadow: none; transition-duration: 0s; } /* нажатие видно и на телефоне, где нет наведения */
.btn-light { background: #fff; color: #000; }
.btn-green { background: var(--green); color: #000; }
.btn:focus-visible, input:focus-visible, .nav a:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* Первый экран */
.hero { position: relative; overflow: hidden; padding: 88px 24px 72px; text-align: center; border-bottom: var(--line); }
.hero h1 { font-size: clamp(42px, 7vw, 92px); max-width: 14ch; margin: 0 auto; }
.sub { font-size: clamp(18px, 2vw, 22px); max-width: 34em; margin: 22px auto 0; }
.tool { position: relative; z-index: 1; max-width: 780px; margin: 40px auto 0; text-align: left; }
.tool-label { display: block; font-size: 15px; font-weight: 500; margin: 0 0 6px 2px; }
.tool-form { display: flex; gap: 10px; flex-wrap: wrap; }
.tool-form input { flex: 1 1 320px; min-width: 0; font: inherit; font-size: 18px; padding: 15px 18px; background: #fff; border: var(--line); border-radius: 4px; }
.ticks { margin: 12px 2px 0; color: var(--muted); font-size: 15px; text-align: center; }

.box { margin-top: 20px; padding: 24px; background: #fff; border: var(--line); border-radius: 4px; box-shadow: 4px 4px 0 #000; }
.box h3 { font-size: 22px; margin-bottom: 6px; }
.box p { margin: 0 0 16px; color: var(--muted); font-size: 16px; }
.stamps { display: inline-flex; gap: 8px; align-items: center; font-size: 16px; }
#yt-text { display: block; width: 100%; min-height: 260px; margin: 12px 0 16px; padding: 14px; font: inherit; font-size: 16px; line-height: 1.55; background: var(--bg); border: var(--line); border-radius: 4px; resize: vertical; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.hint { margin: 10px 0 0 !important; font-size: 14px !important; }
.next { margin-top: 20px; padding-top: 20px; border-top: var(--line); }
.next b { color: #000; }

/* Наклейки по краям первого экрана, как монеты у образца */
.sticker { position: absolute; display: grid; place-items: center; border: 2px solid #000; font-weight: 700; font-size: 26px; }
.sticker svg { width: 46%; fill: var(--navy); }
.s1 { width: 150px; height: 150px; border-radius: 50%; background: var(--green); left: 5%; top: 70px; transform: rotate(-14deg); }
.s2 { width: 130px; height: 82px; border-radius: 14px; background: var(--yellow); right: 6%; top: 110px; transform: rotate(10deg); }
.s3 { width: 118px; height: 76px; border-radius: 14px; background: #fff; left: 9%; bottom: 60px; transform: rotate(8deg); }

/* Блоки */
.band { padding: 96px 24px; border-bottom: var(--line); }
.band > h2, .band > .lead { text-align: center; }
.band h2 { font-size: clamp(34px, 5vw, 60px); }
.lead { max-width: 36em; margin: 18px auto 0; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; max-width: 1160px; margin: 48px auto 0; }
.card { padding: 28px; border: var(--line); border-radius: 20px; }
.card h3 { font-size: 28px; margin: 14px 0 10px; }
.card p { margin: 0; font-size: 17px; }
.c-green { background: var(--green); }
.c-yellow { background: var(--yellow); }
.c-navy { background: var(--navy); color: #fff; }
.c-navy .tag { color: #000; }
.c-white { background: #fff; }
.tag { display: inline-block; padding: 3px 12px; font-size: 14px; font-weight: 500; background: #fff; border: var(--line); border-radius: 999px; }
.c-white .tag { background: var(--bg); }

.about { background: #fff; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1160px; margin: 48px auto 0; }
.panel { padding: 36px; border: var(--line); border-radius: 20px; background: var(--bg); }
.panel h3 { font-size: 32px; margin-bottom: 14px; }
.panel p { margin: 0 0 24px; }
.panel-dark { background: #000; color: #fff; }
.panel-dark .btn { border-color: #fff; }
.panel-dark .btn:hover { box-shadow: 3px 3px 0 #fff; }
.panel-dark .btn:active { box-shadow: none; }
.demo { display: block; width: 100%; max-width: 1160px; height: auto; margin: 40px auto 0; border: var(--line); border-radius: 20px; }

/* Отзывы: крупная цифра, как сумма у образца */
.big { margin: 0; text-align: center; font-size: clamp(110px, 18vw, 220px); font-weight: 500; line-height: 1; letter-spacing: -0.04em; }
.big span { font-size: .5em; vertical-align: .55em; margin-left: .05em; }
.big-sub { text-align: center; font-size: clamp(20px, 2.4vw, 28px); margin: 16px auto 0; max-width: 22em; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; max-width: 1160px; margin: 56px auto 0; }
.quote { margin: 0; padding: 28px; background: #fff; border: var(--line); border-radius: 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.quote blockquote { margin: 0; font-size: 19px; }
.quote blockquote::before { content: "\201C"; display: block; font-size: 48px; line-height: .6; margin-bottom: 8px; }
.quote figcaption { font-size: 14px; color: var(--muted); }
.quote figcaption b { display: block; color: #000; font-size: 16px; }
.more { text-align: center; margin: 32px 0 0; }

.privacy { background: var(--yellow); }
.facts { max-width: 760px; margin: 40px auto 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.facts li { padding: 18px 22px; background: #fff; border: var(--line); border-radius: 4px; }
.privacy > p { text-align: center; margin: 28px 0 0; }

.foot { padding: 48px 24px; text-align: center; }
.foot p { margin: 0 0 8px; }
.foot .badges { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; }
.foot .badges img { display: block; max-width: 100%; height: auto; }
.small { font-size: 14px; color: var(--muted); }

/* Меню инструментов: текущая страница чёрная */
.nav a.on { background: #000; color: #fff; }
.crumbs { font-size: 15px; color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--muted); }

/* Страницы-инструменты: зона файла, настройки, результат */
.hero-tool h1 { font-size: clamp(36px, 5vw, 64px); }
/* Страницы-инструменты компактнее сверху, чтобы результат был ближе к первому экрану (16.11) */
.hero-tool { padding: 44px 24px 48px; }
.hero-tool .crumbs { margin-bottom: 10px; }
.hero-tool .sub { margin-top: 14px; }
.hero-tool .tool { margin-top: 26px; }
#result, #yt-done { scroll-margin-top: 88px; } /* под липкой шапкой 72 px */
.drop { display: grid; place-items: center; gap: 6px; padding: 36px 20px; text-align: center; background: #fff; border: 2px dashed #000; border-radius: 4px; cursor: pointer; transition: background .12s; }
.drop:hover, .drop.over { background: #eafbe9; }
.drop b { font-size: 21px; font-weight: 500; }
.drop span { color: var(--muted); font-size: 15px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 2px; }
.opts { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin: 16px 0 0; font-size: 16px; }
.opts label { display: inline-flex; gap: 8px; align-items: center; }
.opts select, .opts input[type=number], .opts input[type=text] { font: inherit; font-size: 16px; padding: 7px 10px; background: #fff; border: var(--line); border-radius: 4px; }
.opts input[type=number] { width: 5.5em; }
.opts input[type=text] { width: 6.5em; }
.seg { display: inline-flex; border: var(--line); border-radius: 4px; overflow: hidden; }
.seg label { padding: 7px 14px; cursor: pointer; background: #fff; }
.seg label + label { border-left: var(--line); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { background: #000; color: #fff; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: -3px; }
.files { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.files li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px 14px; background: #fff; border: var(--line); border-radius: 4px; font-size: 16px; }
.files .fname { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.files .fmeta { color: var(--muted); font-size: 14px; }
.files .bad { color: #b00020; }
.btn-sm { padding: 8px 14px; font-size: 15px; }
.area { display: block; width: 100%; min-height: 240px; margin: 12px 0 16px; padding: 14px; font: inherit; font-size: 16px; line-height: 1.55; background: var(--bg); border: var(--line); border-radius: 4px; resize: vertical; }
.area-in { background: #fff; min-height: 200px; margin-top: 0; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 14px; }
.subs-lang-row { display: inline-flex; gap: 10px; align-items: center; font-size: 16px; margin-bottom: 4px; }
.subs-lang-row select { font: inherit; font-size: 16px; padding: 7px 10px; border: var(--line); border-radius: 4px; background: #fff; max-width: 100%; }

/* Шаги, вопросы, «Ещё инструменты» */
.steps { max-width: 760px; margin: 40px auto 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 16px; align-items: baseline; padding: 18px 22px; background: #fff; border: var(--line); border-radius: 4px; }
.steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); border: var(--line); font-weight: 700; }
.faq { max-width: 760px; margin: 40px auto 0; display: grid; gap: 12px; }
.faq details { background: #fff; border: var(--line); border-radius: 4px; }
.faq summary { padding: 18px 22px; font-weight: 500; cursor: pointer; }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }
.see a.card { display: block; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.see a.card:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 #000; }
.foot-links a { margin: 0 4px; }

/* Меню не влезает в одну строку с логотипом: уходит второй строкой шапки, на телефоне листается вбок */
/* 6 пунктов меню (21.11, + Subtitle shifter): на 1241-1400 px ужимаем, уже 1240 меню второй строкой, иначе «Add to Chrome» уезжает за край */
@media (max-width: 1400px) {
  .top { gap: 14px; }
  .nav { gap: 0; }
  .nav a { padding: 7px 9px; font-size: 15px; }
}
@media (max-width: 1240px) {
  .top { flex-wrap: wrap; height: auto; padding-left: 0; row-gap: 0; }
  .brand { height: 60px; padding-left: 28px; }
  .hero-tool .s3 { display: none; } /* на узком экране налезает на настройки виджета */
  .top-cta { height: 60px; margin-left: auto; }
  .nav { order: 3; flex: 1 0 100%; display: flex; margin: 0; padding: 8px 10px; gap: 2px; overflow-x: auto; border-top: var(--line); scrollbar-width: none; }
  .nav a { flex: none; padding: 6px 12px; font-size: 15px; }
}
@media (max-width: 900px) {
  .top { gap: 10px; }
  .brand { padding-left: 14px; }
  .brand { font-size: 16px; }
  .top-cta { padding: 0 14px; margin-left: auto; font-size: 15px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand img { width: 26px; height: 26px; }
  .tool-form .btn { flex: 1 1 100%; }
  .split { grid-template-columns: 1fr; }
  .sticker { display: none; }
  .hero { padding: 56px 18px 52px; }
  .band { padding: 64px 18px; }
  .panel, .card, .quote { padding: 24px; }
}
/* Узкие телефоны: кнопка стора в шапке не влезает, а поставить расширение с телефона всё равно нельзя */
@media (max-width: 389px) {
  .top-cta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
.paste { margin-top: 12px; }
.paste summary { cursor: pointer; font-size: 16px; padding: 4px 2px; }
.paste[open] summary { margin-bottom: 10px; }
.linklike { text-decoration: underline; cursor: pointer; }
.linklike:has(input:focus-visible) { outline: 3px solid var(--green); }

/* Служебные страницы: About, Contact, Privacy, Terms, Refund (урок 19.11) */
.doc > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.doc h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 24px; }
.doc > h2 { text-align: left; font-size: clamp(26px, 3vw, 32px); margin-top: 48px; margin-bottom: 12px; }
.doc p, .doc li { color: var(--muted); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 8px; }
.doc li b, .doc address { color: var(--ink); }
.doc address { font-style: normal; }
.doc .updated { font-size: 15px; }
.doc .cta { margin-top: 32px; }
/* /subtitle-shifter/: кнопки ±1 / ±0.1 с и строка итога */
.nudge { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.shift-meta { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.nudge .btn { padding: 7px 12px; font-size: 15px; }
[hidden] { display: none !important; } /* атрибут hidden сильнее display у .btn/.row (21.11: «Download all» при одном файле был виден) */
