/* Шрифты — свои, не с Google Fonts: из России он грузится медленно, а каждый
   запрос к нему отдаёт Google адрес посетителя (сайт обещает IP не хранить).
   Вариативные файлы: одна пара на все начертания. Лицензии — fonts-license.txt. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/static/inter-cyrillic.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-display: swap;
  font-weight: 100 900;
  src: url("/static/inter-latin.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-display: swap;
  font-weight: 100 900;
  src: url("/static/jetbrains-mono-cyrillic.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-display: swap;
  font-weight: 100 900;
  src: url("/static/jetbrains-mono-latin.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;
}

/* «Спокойный минимализм» — токены дизайн-системы владельца, свои цвета не вводим.
   Один акцент на экран: кнопка «Скачать». Мелкий текст — только --ink/--ink-2:
   #8B8E97 на белом даёт 3,3:1, этого хватает лишь крупным цифрам и иконкам. */
:root {
  --accent: #225AEA;
  --accent-hover: #1B49C4;
  --accent-soft: #EAF0FF;
  --ink: #0E1116;
  --ink-2: #3A3D45;
  --muted: #8B8E97;
  --border: #ECECF2;
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --success: #16A34A;
  --danger: #E5484D;
  --warning: #E8A317;
  --link: var(--accent);
  --field: var(--bg);

  --shadow-sm: 0 1px 2px rgba(14, 17, 22, .04), 0 1px 3px rgba(14, 17, 22, .05);
  --shadow-md: 0 6px 16px rgba(14, 17, 22, .07);
  --shadow-cta: 0 6px 16px rgba(34, 90, 234, .28);
  --ring: 0 0 0 3px rgba(34, 90, 234, .18);

  --r-ctl: 12px;
  --r-tile: 16px;
  --r-card: 20px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 120ms;
  --t: 200ms;
  --t-slow: 400ms;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

/* Тёмная тема: нейтральные тона выведены из тех же токенов, акцент прежний.
   Для ссылок — светлый оттенок акцента, иначе на тёмном фоне он не читается. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F4F5F7;
    --ink-2: #C3C6CD;
    --border: #262A32;
    --bg: #0E1116;
    --surface: #15181E;
    --field: #0E1116;
    --accent-soft: rgba(34, 90, 234, .18);
    --link: #5B8CFF;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, .35);
    --shadow-cta: 0 6px 16px rgba(34, 90, 234, .35);
    --ring: 0 0 0 3px rgba(91, 140, 255, .28);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 { color: var(--ink); overflow-wrap: break-word; }
p { margin: 0 0 12px; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }
/* hidden прячет и то, чему класс задал display (кнопка «Установить» до сигнала браузера) */
[hidden] { display: none !important; }
code { font-family: var(--mono); font-size: .92em; color: var(--ink); overflow-wrap: anywhere; }

.icon { display: block; flex: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -64px; z-index: 10;
  padding: 10px 16px; border-radius: var(--r-ctl);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-md);
  transition: top var(--t) var(--ease);
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1040px; margin-inline: auto; padding-inline: 16px; }

/* ---------- шапка ---------- */
.site-header { border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 800; font-size: 18px; letter-spacing: -.02em;
}
.logo:hover { color: var(--ink); }
.logo-mark { display: block; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; white-space: nowrap; transition: color var(--t) var(--ease); }
.nav a:hover { color: var(--ink); }

/* ---------- герой и форма ---------- */
.hero { padding-top: 48px; text-align: center; }
.h1 {
  margin: 0 auto 16px;
  max-width: 24ch;
  font-size: clamp(32px, 7.2vw, 56px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.lead { max-width: 60ch; margin: 0 auto 32px; font-size: clamp(17px, 2.3vw, 19px); color: var(--ink-2); text-wrap: pretty; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-sm); }
.widget-card { max-width: 760px; margin: 0 auto; padding: 20px; text-align: left; }
.widget-label { display: block; margin-bottom: 10px; font-weight: 600; font-size: 15px; color: var(--ink); }
.widget-row { display: flex; flex-direction: column; gap: 12px; }
.field { position: relative; flex: 1; min-width: 0; }
.field-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input {
  width: 100%; height: 56px; padding: 0 16px 0 48px;
  border: 1px solid var(--border); border-radius: var(--r-ctl);
  background: var(--field); color: var(--ink);
  font: inherit; font-size: 16px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:hover { border-color: var(--muted); }
.input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: var(--ring); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 28px;
  border: 1px solid transparent; border-radius: var(--r-ctl);
  font: inherit; font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t-fast) var(--ease), border-color var(--t) var(--ease);
}
.btn-cta { background: var(--accent); color: #FFFFFF; box-shadow: var(--shadow-cta); }
.btn-cta:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn-cta:active { transform: translateY(1px); }
.btn-cta:focus-visible { outline: none; box-shadow: var(--shadow-cta), 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.btn-cta[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-quiet { height: 48px; padding: 0 20px; background: var(--surface); color: var(--ink); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-quiet:hover { color: var(--ink); border-color: var(--muted); }

.quality { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.quality-label { font-size: 14px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  background: var(--field); color: var(--ink-2);
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease), background var(--t) var(--ease);
}
.chip input:hover + span { border-color: var(--muted); }
.chip input:checked + span { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.chip input:focus-visible + span { box-shadow: var(--ring); }

.widget-hint { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.fineprint { margin: 16px auto 0; font-size: 14px; color: var(--ink-2); text-align: center; }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  max-width: 760px; margin: -8px auto 24px; padding: 16px 20px;
  border: 1px solid var(--border); border-radius: var(--r-tile);
  background: var(--surface); text-align: left; color: var(--ink-2);
}
.notice .icon { color: var(--warning); margin-top: 2px; }
.notice strong { color: var(--ink); font-weight: 600; }

/* ---------- результат ---------- */
.result:not(:empty) { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); animation: rise var(--t) var(--ease); }
.job-card .result { margin: 0; padding: 20px; border: 0; }
.state { display: flex; gap: 12px; align-items: flex-start; }
.state-icon { margin-top: 2px; }
.state-ready .state-icon { color: var(--success); }
.state-error .state-icon { color: var(--danger); }
.state-body { min-width: 0; }
.state-title { margin: 0; font-weight: 600; color: var(--ink); }
.state-text { margin: 2px 0 0; font-size: 15px; color: var(--ink-2); overflow-wrap: anywhere; }
.state-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.state-tip { margin: 8px 0 0; font-size: 14px; }
.quality-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.quality-note .icon { flex: none; margin-top: 1px; color: var(--warning); }
.spinner {
  flex: none; width: 20px; height: 20px; margin-top: 2px;
  border: 2px solid var(--border); border-top-color: var(--ink-2); border-radius: 50%;
  animation: spin 800ms linear infinite;
}
/* minmax(0, 1fr) и min-width: 0 — иначе длинное имя файла распирает сетку на телефоне */
.files { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.files li { min-width: 0; }
.file {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--ink); text-decoration: none;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
/* Акцент на экране один — кнопка «Скачать»; строка файла нейтральная, акцент — только при наведении. */
.file:hover { color: var(--ink); border-color: var(--link); box-shadow: var(--shadow-md); }
.file-icon { color: var(--ink); }
.file-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { flex: none; font-family: var(--mono); font-size: 14px; color: var(--ink-2); }

/* ---------- реклама: одна, ниже результата, с пометкой ---------- */
.ad { max-width: 760px; margin-top: 48px; }
.ad-label { margin: 0 0 8px; font-size: 12px; color: var(--ink-2); }
.ad-body { overflow: hidden; border-radius: var(--r-tile); }

/* ---------- секции ---------- */
.section { margin-top: 72px; }
.h2 { margin: 0 0 24px; font-size: clamp(24px, 3.6vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }

.tiles { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tile {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%;
  padding: 18px 20px;
  border: 1px solid var(--border); border-radius: var(--r-tile);
  background: var(--surface); color: var(--ink); text-decoration: none;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.tile:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tile-body { min-width: 0; }
.tile-name { display: block; font-weight: 600; font-size: 17px; }
.tile-note { display: block; font-size: 14px; color: var(--ink-2); }
.tile-off .tile-note::before { content: "●"; margin-right: 6px; color: var(--warning); font-size: 10px; vertical-align: 2px; }
.tile-arrow { color: var(--muted); transition: transform var(--t) var(--ease), color var(--t) var(--ease); }
.tile:hover .tile-arrow { color: var(--ink); transform: translateX(3px); }

.steps { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
.step { padding: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.step-num { display: block; margin-bottom: 16px; font-family: var(--mono); font-weight: 700; font-size: 32px; line-height: 1; letter-spacing: -.02em; color: var(--muted); }
.step-title { margin: 0 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.step-text { margin: 0; font-size: 15px; color: var(--ink-2); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 12px; }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.stat-num { margin: 0; font-family: var(--mono); font-weight: 700; font-size: clamp(36px, 6vw, 48px); line-height: 1; letter-spacing: -.035em; color: var(--ink); }
.stat-cap { font-size: 14px; color: var(--ink-2); }

.checks { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
.checks li { display: flex; gap: 12px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--r-tile); background: var(--surface); font-size: 15px; }
.checks .icon { margin-top: 2px; color: var(--success); }
.checks strong { display: block; color: var(--ink); font-weight: 600; font-size: 16px; }

.faq { display: grid; gap: 12px; max-width: 760px; }
.faq details { padding: 0 20px; border: 1px solid var(--border); border-radius: var(--r-tile); background: var(--surface); }
.faq summary {
  position: relative; padding: 18px 36px 18px 0;
  list-style: none; cursor: pointer; font-weight: 600; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%;
  width: 9px; height: 9px;
  border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--t) var(--ease);
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq details p { max-width: 60ch; margin: 0 0 18px; color: var(--ink-2); animation: rise var(--t) var(--ease); }

.bot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 24px; }
.bot-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.bot p { margin: 0; }
.bot-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }

/* ---------- внутренние страницы ---------- */
.page-head { padding-top: 48px; }
.page-head .h1 { margin: 0 0 12px; max-width: 20ch; text-align: left; }
.page-head .lead { margin: 0; text-align: left; }
.page-body { margin-top: 32px; }
.eyebrow { margin: 0 0 8px; font-family: var(--mono); font-size: 14px; color: var(--ink-2); }
.prose { max-width: calc(60ch + 32px); }
.crumbs { margin: 0 0 12px; font-size: 14px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a::before { content: "← "; }
.crumbs a:hover { color: var(--ink); }
.more-link { margin: 16px 0 0; font-size: 15px; }
.prose h2 { margin: 36px 0 8px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.prose h2:first-child { margin-top: 0; }
.after-faq { max-width: 60ch; margin-top: 24px; }
.job-card { max-width: 760px; }

/* /bystro: способы по устройствам — карточки одна под другой */
.ways { display: grid; gap: 16px; max-width: 760px; }
.way { padding: 24px; scroll-margin-top: 24px; }
.way-title { margin: 0 0 16px; font-size: 20px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.way-steps { display: grid; gap: 8px; max-width: 60ch; margin: 0; padding-left: 1.4em; }
.way-steps li { padding-left: 4px; }
.way-steps li::marker { font-family: var(--mono); color: var(--ink-2); }
.way-button { margin-top: 20px; }
.way-note { margin: 12px 0 0; font-size: 14px; }
.bookmarklet { cursor: grab; }
.job-again { margin-top: 20px; }

/* ---------- подвал ---------- */
.site-footer { margin-top: 96px; padding: 40px 0 48px; border-top: 1px solid var(--border); font-size: 14px; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.footer-title { margin: 0 0 12px; font-weight: 600; color: var(--ink); }
.footer-links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-links-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.footer-note { max-width: 60ch; margin: 32px 0 0; }

/* ---------- ширины ---------- */
@media (min-width: 560px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
  .wrap { padding-inline: 24px; }
  .hero { padding-top: 72px; }
  .widget-card { padding: 28px; }
  .widget-row { flex-direction: row; }
  .section { margin-top: 96px; }
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 2fr 1fr; }
  .page-head { padding-top: 72px; }
  .way { padding: 28px; }
}
@media (min-width: 900px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .header-row { gap: 12px; }
  .logo { font-size: 17px; }
  .nav { gap: 14px; }
  .nav a { font-size: 14px; }
}
@media (max-width: 374px) {
  .nav-extra { display: none; }
}

/* ---------- движение ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .tile:hover, .tile:hover .tile-arrow { transform: none; }
}
