/* ==== Шрифт RF Dewi (canon из guideline студии 404) ==== */
@font-face {
  font-family: 'RF Dewi';
  src: url('../../fonts/RFDewi/RFDewi-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RF Dewi';
  src: url('../../fonts/RFDewi/RFDewi-Semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RF Dewi';
  src: url('../../fonts/RFDewi/RFDewi-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RF Dewi Extended';
  src: url('../../fonts/RFDewi/RFDewiExtended-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RF Dewi Extended';
  src: url('../../fonts/RFDewi/RFDewiExtended-Semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RF Dewi Extended';
  src: url('../../fonts/RFDewi/RFDewiExtended-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==== Базовые переменные (light-only)
       Палитра по guideline «Студия 404» (Figma):
       --accent #FFD900 — canon (см. /README.md), --ink/--text #000 (canon body-text),
       mute #A6A6A6, bg-soft #F6F7FA. Никаких других жёлтых. ==== */
:root {
  --bg: #ffffff;
  --bg-soft: #F6F7FA;
  --surface: #ffffff;
  --surface-2: #F6F7FA;
  --border: #e5e7eb;
  --border-strong: #cbd1d9;
  --ink: #000000;
  --text: #000000;
  --text-strong: #4C4C4C; /* промежуточный dim между ink и mute (по reference flashfamily) */
  --text-dim: #404040;
  --text-mute: #A6A6A6;
  --accent: #FFD900;
  --accent-hover: #FFE94D; /* brighter (по reference flashfamily — кнопка светлеет, а не темнеет) */
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --accent-contrast: #000000;
  --success: #3ddc97;
  --warning: #FF9F0A; /* чистый оранжевый — для предупреждений (warning hints) */
  --danger: #ff5d73;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px; /* friendly-radius для hero, lead-form, больших CTA-блоков */
  /* Единая толщина бордера для всех элементов форм (input/textarea/select/check/switch/file).
     Меняй здесь — синхронно поменяется во всём form-canon. */
  --form-border: 3px;
  /* === Шкала размеров (size scale, по образцу design.rt.ru/gen2 — для высоты компонентов) ===
     base = 16px (1rem). Все остальные кратны base через множители. */
  --size-base: 16px;          /* 1rem · мелкие иконки, line-height anchor */
  --size-2xs: 16px;           /* base · совпадает */
  --size-xs: 20px;            /* base × 1.25 · мелкие индикаторы, dot-маркеры */
  --size-s: 24px;             /* base × 1.5 · стандартная иконка (.icon) */
  --size-m-tag: 28px;         /* base × 1.75 · теги, мелкие чипы */
  --size-m-chip: 32px;        /* base × 2 · большие иконки, switch-track, чекбокс/радио */
  --size-m: 36px;             /* base × 2.25 · btn--sm, поля компактные */
  --size-l: 48px;             /* base × 3 · стандартная кнопка / инпут / file-btn */
  --size-xl: 56px;            /* base × 3.5 · крупные кнопки */
  --size-2xl: 64px;           /* base × 4 · btn--lg, lead-form элементы */
  --size-3xl: 76px;           /* base × 4.75 · btn--pill (CTA лендинга) */
  /* === 4dp Grid spacing system (по образцу Material / industry standard) ===
     Все margin/padding/gap кратны 4. Свободные значения (5, 7, 13 и т.п.) запрещены. */
  --space-1: 4px;             /* hairline gap, micro-padding */
  --space-2: 8px;             /* gap inside compact controls */
  --space-3: 12px;            /* button gap, chip padding */
  --space-4: 16px;            /* base spacing unit, обычный padding */
  --space-5: 20px;            /* gap между card-items, средний margin */
  --space-6: 24px;            /* section-internal padding, list gap */
  --space-8: 32px;            /* между подсекциями в одной секции */
  --space-10: 40px;           /* margin между логическими группами */
  --space-12: 48px;           /* внутренний padding workspace */
  --space-16: 64px;           /* margin между крупными блоками */
  --space-20: 80px;           /* между секциями (medium) */
  --space-24: 96px;           /* между секциями (large) */
  --space-32: 128px;          /* hero-spacing, top-bottom главной */
  /* Тени — 3 уровня по guideline (slide «Тени»: small / regular / large) */
  --shadow-sm: 0 2px 8px rgba(20, 24, 40, 0.06);
  --shadow: 0 8px 24px rgba(20, 24, 40, 0.08);
  --shadow-lg: 0 20px 48px rgba(20, 24, 40, 0.12);
  /* Easing по reference flashfamily: ease-out-quart, «relaxed» вход */
  --transition: 200ms cubic-bezier(0.25, 1, 0.5, 1);
  --transition-out: 200ms cubic-bezier(0.45, 0, 0.55, 1);
  --font-sans: 'RF Dewi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'RF Dewi Extended', 'RF Dewi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max-w: 1180px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500; /* body default 500 (reference flashfamily) — насыщенная презентация без эффекта Bold */
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--transition), background var(--transition), color var(--transition);
}

a:hover {
  color: var(--ink);
  background: var(--accent);
  text-decoration-color: var(--ink);
}

img, svg:not(.input-wave-graphic) {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==== Шапка ==== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.logo__mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-header__nav a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
}

.site-header__nav a:hover {
  color: var(--text);
}

.site-header__back {
  color: var(--text-dim);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-header__back:hover {
  color: var(--text);
}

/* ==== Типографика ==== */
/* ==== Иерархия заголовков (по guideline «Заголовки», масштаб уменьшен под утилитарный UI)
       Шрифт — RF Dewi Extended (canon из бренд-гайда). ==== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: clamp(34px, 5.2vw, 60px);
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.15;
  margin-bottom: 14px;
}

h3 {
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 10px;
}

h4 {
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 8px;
}

h5 {
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 6px;
}

p {
  color: var(--text-dim);
  margin-bottom: 14px;
}

p:last-child { margin-bottom: 0; }

ul, ol {
  color: var(--text-dim);
  margin: 0 0 16px 20px;
}

li {
  margin-bottom: 6px;
}

code {
  font-family: var(--font-mono);
  background: var(--bg-soft);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.9em;
  border: 1px solid var(--border);
  color: var(--ink);
}

/* ==== Hero главной ==== */
.hero { padding-top: 64px; }

.hero__eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--ink);
  background: var(--accent);
  padding: 0 0.18em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero__lead {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-strong);
}

/* ==== Сетка инструментов ==== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  padding: 28px 0 80px;
}

.tool-card {
  display: block;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  color: var(--text);
  background: var(--surface);
}

.tool-card:hover .tool-card__icon {
  background: var(--ink);
  color: var(--accent);
}

.tool-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-contrast);
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
  transition: background var(--transition), color var(--transition);
}
.tool-card__icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==== Icon (flex-line canon) — линейные SVG-иконки 24×24, stroke 2px,
   currentColor, rounded caps. Используется автономно или внутри .tool-card__icon. */
.icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.icon--sm { width: var(--size-base); height: var(--size-base); stroke-width: 2; }
.icon--lg { width: var(--size-m-chip); height: var(--size-m-chip); }

.tool-card__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.tool-card__desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ==== Страница инструмента ==== */
.tool-page {
  padding: 48px 16px 24px;
}

.tool-page__header {
  margin-bottom: 28px;
}

.tool-page__lead {
  font-size: 17px;
  color: var(--text-strong);
}

/* ==== Рабочая область ==== */
.workspace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 48px;
}

.field {
  margin-bottom: 24px;
}

.field:last-child { margin-bottom: 0; }

.field__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.005em;
}

.field__hint {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-mute);
  margin-top: 6px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ==== Инпуты / textarea / select — underline-only canon, единый стиль.
       Без рамки и фона: только 3px ink bottom-border. Лейбл сверху.
       Hover — линия остаётся ink, focus — становится accent.
       Все поля наследуют textarea-стиль: JetBrains Mono 16/400. ==== */
.input, .textarea, .select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: var(--form-border) solid var(--ink);
  border-radius: 0;
  padding: 8px 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  transition: border-color var(--transition), color var(--transition);
  resize: vertical;
}

.textarea {
  min-height: 200px; /* удвоенная высота под рабочие списки в tools */
}

/* ==== Textarea с встроенными action-иконками (copy / clear).
   Use:
     <div class="textarea-wrap">
       <textarea class="textarea" id="…"></textarea>
       <div class="textarea-actions">
         <button type="button" class="textarea-btn" data-action="copy" aria-label="Копировать">
           <svg>…clipboard…</svg>
         </button>
         <button type="button" class="textarea-btn" data-action="clear" aria-label="Очистить">
           <svg>…trash…</svg>
         </button>
       </div>
     </div>
   ==== */
.textarea-wrap {
  position: relative;
}
.textarea-wrap .textarea {
  padding-right: 90px; /* место под 2 кнопки + отступ от нативного скроллбара */
}
.textarea-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  z-index: 1;
}
/* для pre-wrap скроллбара нет — оставляем больше воздуха справа */
.pre-wrap .textarea-actions {
  top: 10px;
  right: 12px;
}
.textarea-btn {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--text-mute);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  padding: 0;
  transition: color var(--transition), background var(--transition);
}
.textarea-btn:hover {
  color: var(--ink);
  background: var(--accent);
}
.textarea-btn:focus-visible {
  outline: none;
  color: var(--ink);
  background: var(--accent-soft);
}
.textarea-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}
.textarea-btn--ok { color: var(--success); }

/* ==== Pre-wrap — read-only output (готовая ссылка, пароль и т.п.) с кнопкой копирования внутри.
   Use:
     <div class="pre-wrap">
       <pre id="…">…</pre>
       <div class="textarea-actions">
         <button type="button" class="textarea-btn" data-action="copy-pre" aria-label="Копировать">…</button>
       </div>
     </div>
   ==== */
.pre-wrap {
  position: relative;
  width: 100%;
}
.pre-wrap pre {
  margin: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 64px 14px 16px; /* воздух справа под кнопку копирования */
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-all;
  white-space: pre-wrap;
  overflow: auto;
}
/* для результата — пустой pre держит высоту, даже если контент пустой */
.pre-wrap--result pre {
  min-height: 200px;
}
/* эмуляция placeholder для пустого pre[data-placeholder] */
.pre-wrap pre[data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: var(--text-mute);
  font-family: var(--font-sans);
  font-size: 16px;
}
.pre-wrap--lg pre {
  font-size: 22px;
  letter-spacing: 0.03em;
  padding: 18px 68px 18px 20px;
  min-height: var(--size-2xl);
  display: flex;
  align-items: center;
}

.input:hover:not(:focus):not([disabled]),
.textarea:hover:not(:focus):not([disabled]),
.select:hover:not(:focus):not([disabled]) {
  border-bottom-color: var(--ink);
}

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-bottom-color: var(--accent);
  background-color: transparent;
  box-shadow: none;
}

.field__label--lg {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  font-family: var(--font-sans);
}

.input::placeholder, .textarea::placeholder {
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  opacity: 1; /* fix Firefox дефолтной полупрозрачности */
}

.input[disabled], .textarea[disabled], .select[disabled] {
  color: var(--text-mute);
  cursor: not-allowed;
  border-bottom-color: var(--text-mute);
}

.select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath fill='none' stroke='%23000000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
}

/* Стили <option> — поддержка ограничена браузером, но что можно — задаём:
   font-family/color/background работают в Chromium/Firefox/Safari.
   padding и hover — game of luck (Firefox да, Chromium нет). */
.select option {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  background: var(--surface);
  padding: 8px 12px;
}
.select option:disabled {
  color: var(--text-mute);
}
.select option:checked,
.select option:hover {
  background: var(--accent);
  color: var(--ink);
}

/* ==== Custom select (canon-выпадашка) — нативный <select> + кастомный popup.
   Поддержка: native <option> стили браузер игнорит, поэтому строим свой UI.
   Use:
     <div class="cselect">
       <select class="cselect__native">
         <option value="msk">Москва и МО</option>
         <option value="spb">Санкт-Петербург</option>
       </select>
       <!-- триггер и список генерирует JS-инициализатор canon-cselect -->
     </div>
   ==== */
.cselect {
  position: relative;
  width: 100%;
}
.cselect__native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}
.cselect__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: var(--form-border) solid var(--ink);
  border-radius: 0;
  padding: 8px 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition);
}
.cselect__trigger:hover { border-bottom-color: var(--ink); }
.cselect__trigger:focus-visible { outline: none; border-bottom-color: var(--accent); }
.cselect.is-open .cselect__trigger { border-bottom-color: var(--accent); }
.cselect__value--placeholder { color: var(--text-mute); }
.cselect__arrow {
  flex-shrink: 0;
  width: 14px;
  height: 10px;
  color: var(--ink);
  transition: transform var(--transition);
}
.cselect.is-open .cselect__arrow { transform: rotate(180deg); }

.cselect__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  display: none;
  font-family: var(--font-mono);
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--text-mute) transparent;
}
/* Кастомный тонкий scrollbar — рисуется через `border` тем же цветом, что и фон,
   за счёт чего бегунок визуально отступает от края и не упирается в радиус. */
.cselect__list::-webkit-scrollbar {
  width: 16px;
  height: 16px;
  background: transparent;
}
.cselect__list::-webkit-scrollbar-track {
  background: transparent;
}
/* Большие white-бордеры (4 / 10) сдвигают thumb визуально влево от края,
   чтобы бегунок не упирался в скруглённый правый край списка */
.cselect__list::-webkit-scrollbar-thumb {
  background: var(--text-mute);
  border: 4px solid var(--surface);
  border-right-width: 10px;
  border-radius: 999px;
  background-clip: padding-box;
  min-height: 32px;
}
.cselect__list::-webkit-scrollbar-thumb:hover {
  background: var(--ink);
  background-clip: padding-box;
  border: 4px solid var(--surface);
  border-right-width: 10px;
}
.cselect__list::-webkit-scrollbar-corner { background: transparent; }
/* Внутренний padding имитируется через :first-child / :last-child margin */
.cselect__option:first-child { margin-top: 6px; }
.cselect__option:last-child { margin-bottom: 6px; }
.cselect__option { margin-left: 6px; margin-right: 6px; }
.cselect.is-open .cselect__list { display: block; }
.cselect__option {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  user-select: none;
  transition: background var(--transition), color var(--transition);
}
.cselect__option:hover,
.cselect__option.is-active {
  background: var(--accent);
  color: var(--ink);
}
.cselect__option.is-selected {
  font-weight: 600;
}
.cselect__option[aria-disabled="true"] {
  color: var(--text-mute);
  cursor: not-allowed;
}
.cselect__option[aria-disabled="true"]:hover {
  background: transparent;
  color: var(--text-mute);
}

/* error/success наследуем от .field--* */
.field--error .cselect__trigger { border-bottom-color: var(--danger); }
.field--success .cselect__trigger { border-bottom-color: var(--success); }
.field--error .cselect.is-open .cselect__trigger,
.field--error .cselect__trigger:hover,
.field--error .cselect__trigger:focus-visible { border-bottom-color: var(--danger); }
.field--success .cselect.is-open .cselect__trigger,
.field--success .cselect__trigger:hover,
.field--success .cselect__trigger:focus-visible { border-bottom-color: var(--success); }

/* Размерные модификаторы (underline-canon).
   --lg: крупнее текст, толще линия для CTA-форм лендинга.
   --sm: компактный вариант для inline-фильтров. */
.input--lg, .textarea--lg, .select--lg {
  font-size: 22px;
  border-bottom-width: 4px;
  padding: 16px 0;
}
.input--sm, .textarea--sm, .select--sm {
  font-size: 14px;
  border-bottom-width: 2px;
  padding: 8px 0;
}
.select--lg { padding-right: 36px; background-position: right 4px center; }
.select--sm { padding-right: 24px; background-position: right 0 center; background-size: 10px 7px; }

.dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px; /* такой же отступ как у .field — чтобы блок не «прилипал» к следующему */
}
.dual:last-child { margin-bottom: 0; }
/* в одной строке поля не дублируют margin-bottom — расстояние держит grid-gap */
.dual > .field {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .dual { grid-template-columns: 1fr; }
}

.workspace__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* ==== Кнопки (guideline: жёлтый primary, ink-чёрный hard-CTA, светлая secondary)
   Hover-паттерн: ::after overlay (brighter оверлей, по reference flashfamily) +
   translateY(-2px) лифт. ==== */
.btn {
  appearance: none;
  border: 1.5px solid transparent;
  padding: 16px 28px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  min-height: var(--size-l);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  border-radius: inherit;
  z-index: -1;
}

.btn:hover:not([disabled]) {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn:hover:not([disabled])::after { opacity: 1; }
.btn:active:not([disabled]) { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn:active:not([disabled])::after { transition-duration: 80ms; }

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-sm);
}
.btn--primary::after { background: var(--accent-hover); }

/* hard-CTA в guideline-стиле — ink-чёрная кнопка с белым текстом.
   ::after — белый оверлей 12% для светления (по reference flashfamily) */
.btn--ink {
  background: var(--ink);
  color: #fff;
}
.btn--ink::after { background: color-mix(in srgb, var(--ink) 88%, #fff 12%); }

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--secondary::after { background: var(--accent); }
.btn--secondary:hover:not([disabled]) {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border);
}
.btn--ghost::after { background: var(--accent-soft); }
.btn--ghost:hover:not([disabled]) {
  color: var(--ink);
  border-color: var(--accent);
}

/* размерные модификаторы */
.btn--lg {
  padding: 22px 36px;
  font-size: 18px;
  min-height: var(--size-2xl);
  border-radius: var(--radius);
}
.btn--sm {
  padding: 11px 18px;
  font-size: 14px;
  min-height: var(--size-m);
}
.btn--block { width: 100%; }

/* Pill-CTA — большая кнопка для landing-форм (по reference flashfamily).
   Pad 26×40, font 18/700. Радиус — canon `--radius-sm`, как у всех кнопок. */
.btn--pill {
  padding: 26px 40px;
  font-size: 18px;
  min-height: var(--size-3xl);
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
}

.btn[disabled] {
  background: var(--bg-soft);
  color: var(--text-mute);
  border-color: var(--border);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn[disabled]::after { display: none; }

/* ==== Чекбокс / радио (guideline-style: квадрат / круг, ink fill при checked) ==== */
.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  padding: 4px 0;
  user-select: none;
}

/* Default size — CTA-style по reference (32×32, бордер 3px).
   Анимация появления галочки/точки — pure opacity-fade через ::before overlay,
   никаких сдвигов и radial-gradient-морфингов. */
.check input[type="checkbox"],
.check input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 32px;
  height: 32px;
  margin: 0;
  border: var(--form-border) solid var(--ink);
  background: var(--surface);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
  position: relative;
}

.check input[type="checkbox"] { border-radius: 6px; }
.check input[type="radio"] { border-radius: 50%; }

/* ::before — оверлей с галочкой/точкой, fade через opacity */
.check input[type="checkbox"]::before,
.check input[type="radio"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.check input[type="checkbox"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='14' viewBox='0 0 18 14' fill='none'><path d='M2 7L7 12L16 2' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.check input[type="radio"]::before {
  background-image: radial-gradient(circle at center, var(--ink) 0 9px, transparent 10px);
}

.check input[type="checkbox"]:checked {
  background: var(--ink);
  border-color: var(--ink);
}
.check input[type="checkbox"]:checked::before { opacity: 1; }

.check input[type="radio"]:checked { border-color: var(--ink); }
.check input[type="radio"]:checked::before { opacity: 1; }

.check input[disabled] {
  background: var(--bg-soft);
  border-color: var(--text-mute);
  cursor: not-allowed;
}
.check input[type="checkbox"][disabled]:checked {
  background: var(--text-mute);
  border-color: var(--text-mute);
}
.check input[type="radio"][disabled]:checked {
  border-color: var(--text-mute);
}
.check input[type="radio"][disabled]:checked::before {
  background-image: radial-gradient(circle at center, var(--text-mute) 0 9px, transparent 10px);
}

.check input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.check:hover input:not([disabled]) { border-color: var(--accent); }
.check:hover input[type="checkbox"]:checked:not([disabled]),
.check:hover input[type="radio"]:checked:not([disabled]) { border-color: var(--ink); }
.check input[disabled] { pointer-events: none; }
.check:has(input[disabled]) { cursor: not-allowed; }

/* Compact-вариант для случаев, где много чекбоксов в строке (генератор паролей и т.п.) */
.check--sm {
  font-size: 14px;
  gap: 10px;
  padding: 4px 0;
  font-weight: 500;
}
.check--sm input[type="checkbox"],
.check--sm input[type="radio"] {
  width: 22px;
  height: 22px;
  border-width: 2px;
}
.check--sm input[type="checkbox"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='11' viewBox='0 0 14 11' fill='none'><path d='M1.5 5.5L5 9L12.5 1.5' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.check--sm input[type="radio"]::before {
  background-image: radial-gradient(circle at center, var(--ink) 0 6px, transparent 7px);
}
.check--sm input[type="radio"][disabled]:checked::before {
  background-image: radial-gradient(circle at center, var(--text-mute) 0 6px, transparent 7px);
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 4px 0;
}

/* (legacy alias) — было `.check--lg`, теперь это default. Класс остаётся ради обратной совместимости. */
.check--lg {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  gap: 14px;
  padding: 10px 0;
}

.check-row--column {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.check-row--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

/* ==== Loader / preloader (3 варианта).
   Use:
     <span class="loader loader--spinner"></span>
     <span class="loader loader--dots"><i></i><i></i><i></i></span>
     <span class="loader loader--bar"></span>
   ==== */
.loader {
  display: inline-block;
  vertical-align: middle;
}
.loader--spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--bg-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loader-spin 720ms linear infinite;
}
.loader--spinner.loader--lg { width: 48px; height: 48px; border-width: 4px; }
.loader--spinner.loader--ink { border-color: rgba(0,0,0,0.08); border-top-color: var(--ink); }
@keyframes loader-spin { to { transform: rotate(360deg); } }

.loader--dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.loader--dots i {
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-radius: 50%;
  animation: loader-bounce 1000ms ease-in-out infinite;
}
.loader--dots i:nth-child(2) { animation-delay: 150ms; }
.loader--dots i:nth-child(3) { animation-delay: 300ms; }
.loader--dots.loader--accent i { background: var(--accent); }
@keyframes loader-bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.loader--bar {
  width: 200px;
  height: 4px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.loader--bar::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--accent);
  border-radius: inherit;
  animation: loader-bar 1400ms ease-in-out infinite;
}
@keyframes loader-bar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

.loader--pulse {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  animation: loader-pulse 1200ms ease-in-out infinite;
}
@keyframes loader-pulse {
  0%, 100% { transform: scale(0.6); opacity: 0.5; }
  50% { transform: scale(1); opacity: 1; }
}

/* Loader внутри кнопки — просто вкладывай существующий `.loader--*` в `<button class="btn ...">`.
   `.btn.is-loading` — только state-флаг (блокирует клик, без визуальных правок). */
.btn.is-loading {
  pointer-events: none;
  cursor: wait;
}
.btn.is-loading:hover { transform: none !important; box-shadow: var(--shadow-sm) !important; }
.btn.is-loading::after { display: none; }

/* ==== Switch (toggle) — тогл в стиле CTA-формы.
   Use:
     <label class="switch">
       <input type="checkbox">
       <span class="switch__track"></span>
       <span class="switch__label">Уведомления</span>
     </label>
   ==== */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  user-select: none;
  padding: 6px 0;
  letter-spacing: 0.01em;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.switch__track {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 32px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: var(--form-border) solid var(--ink);
  transition: background var(--transition), border-color var(--transition);
}
.switch__track::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}
.switch input:checked + .switch__track {
  background: var(--ink);
}
.switch input:checked + .switch__track::before {
  transform: translate(24px, -50%);
  background: var(--accent);
}
.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.switch:hover input:not([disabled]) + .switch__track { border-color: var(--accent); }
.switch:hover input:checked:not([disabled]) + .switch__track { border-color: var(--ink); }
.switch input[disabled] {
  pointer-events: none;
}
.switch:has(input[disabled]) { cursor: not-allowed; }
.switch input[disabled] + .switch__track {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==== File-input (с иконкой-скрепкой) — стиль CTA-формы.
   Use:
     <label class="file-input">
       <input type="file" name="…">
       <span class="file-input__btn">
         <svg class="file-input__icon">…</svg>
         Прикрепить файл
       </span>
       <span class="file-input__name">Файл не выбран</span>
     </label>
   ==== */
.file-input {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  cursor: pointer;
  font-family: inherit;
}
.file-input input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.file-input__btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 22px;
  min-height: var(--size-l);
  border-radius: var(--radius-sm);
  border: var(--form-border) solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.file-input__btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
}
.file-input__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.file-input:hover .file-input__btn { transform: translateY(-2px); }
.file-input:hover .file-input__btn::after { opacity: 1; }
.file-input input:focus-visible + .file-input__btn {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.file-input__btn-text {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.2;
  text-align: left;
}
.file-input__btn-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.file-input__name {
  font-size: 13px;
  color: var(--text-mute);
  font-weight: 400;
  font-family: var(--font-mono);
  letter-spacing: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  transition: color var(--transition);
}
.file-input--has-file .file-input__name { color: var(--text-strong); font-weight: 500; }
.file-input:hover .file-input__name { color: var(--ink); }

/* ==== Error-state для форм (по запросу) — красная рамка/линия + иконка.
   Use:
     <div class="field field--error">
       <label class="field__label">…</label>
       <input class="input">
       <p class="field__error">Заполните это поле</p>
     </div>
   ==== */
/* Error-state: красный border-bottom + SVG-индикатор справа.
   Hover/focus НЕ перекрывают danger-цвет (по запросу). */
.field--error .input,
.field--error .textarea,
.field--error .select {
  border-bottom-color: var(--danger);
  padding-right: 28px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'><circle cx='10' cy='10' r='9' fill='%23FF5D73'/><path d='M10 5v6M10 14.5v0.5' stroke='white' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0 center;
}
/* textarea многострочный — icon в верхнем правом углу, не по центру */
.field--error .textarea {
  background-position: right 0 top 8px;
}
.field--error .select {
  /* select имеет родную стрелку — рисуем оба фона: error-icon справа, стрелку правее */
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'><circle cx='10' cy='10' r='9' fill='%23FF5D73'/><path d='M10 5v6M10 14.5v0.5' stroke='white' stroke-width='2' stroke-linecap='round'/></svg>"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath fill='none' stroke='%23FF5D73' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 28px center, right 0 center;
  background-repeat: no-repeat, no-repeat;
  padding-right: 60px;
}
/* Не позволяем hover/focus перекрашивать в ink/accent на error-state */
.field--error .input:hover:not(:focus):not([disabled]),
.field--error .textarea:hover:not(:focus):not([disabled]),
.field--error .select:hover:not(:focus):not([disabled]),
.field--error .input:focus,
.field--error .textarea:focus,
.field--error .select:focus {
  border-bottom-color: var(--danger);
}
.field--error .check input,
.field--error .switch__track {
  border-color: var(--danger);
}
.field--error .check:hover input:not([disabled]) { border-color: var(--danger); }
.field--error .switch:hover input:not([disabled]) + .switch__track { border-color: var(--danger); }
.field--error .field__label,
.field--error .field__label--lg { color: var(--danger); }
.field__error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--danger);
  line-height: 1.5;
  letter-spacing: 0.01em;
}
.field__error::before {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'><circle cx='8' cy='8' r='7' fill='%23FF5D73'/><path d='M8 4v4.5M8 11.5v0.4' stroke='white' stroke-width='1.6' stroke-linecap='round'/></svg>");
  background-size: contain;
}

/* ==== Success-state — зеркальный аналог `.field--error`, но зелёный.
   Use:
     <div class="field field--success">
       <label class="field__label">Email</label>
       <input class="input" value="ok@mail.com">
       <p class="field__success">Email подтверждён</p>
     </div>
   ==== */
.field--success .input,
.field--success .textarea,
.field--success .select {
  border-bottom-color: var(--success);
  padding-right: 28px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'><circle cx='10' cy='10' r='9' fill='%233DDC97'/><path d='M5.5 10.2L8.6 13.2L14.5 7' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0 center;
}
.field--success .textarea {
  background-position: right 0 top 8px;
}
.field--success .select {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'><circle cx='10' cy='10' r='9' fill='%233DDC97'/><path d='M5.5 10.2L8.6 13.2L14.5 7' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath fill='none' stroke='%233DDC97' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 28px center, right 0 center;
  background-repeat: no-repeat, no-repeat;
  padding-right: 60px;
}
.field--success .input:hover:not(:focus):not([disabled]),
.field--success .textarea:hover:not(:focus):not([disabled]),
.field--success .select:hover:not(:focus):not([disabled]),
.field--success .input:focus,
.field--success .textarea:focus,
.field--success .select:focus {
  border-bottom-color: var(--success);
}
.field--success .check input,
.field--success .switch__track {
  border-color: var(--success);
}
.field--success .check:hover input:not([disabled]) { border-color: var(--success); }
.field--success .switch:hover input:not([disabled]) + .switch__track { border-color: var(--success); }
.field--success .field__label,
.field--success .field__label--lg { color: var(--success); }
.field__success {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--success);
  line-height: 1.5;
  letter-spacing: 0.01em;
}
.field__success::before {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'><circle cx='8' cy='8' r='7' fill='%233DDC97'/><path d='M4.5 8.2L6.8 10.5L11.5 5.5' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: contain;
}

/* ==== Вспомогательные ==== */
.meta {
  font-size: 14px;
  color: var(--text-mute);
  font-family: var(--font-mono);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==== SEO-блок с текстом ==== */
.content {
  padding: 32px 0 80px;
}

.content h2 {
  margin-top: 40px;
  margin-bottom: 16px;
}

.content h2:first-child { margin-top: 0; }

.content h3 {
  margin-top: 24px;
}

.content p, .content li {
  font-size: 16px;
  line-height: 1.75;
}

/* ==== Хлебные крошки ==== */
.breadcrumbs {
  font-size: 14px;
  color: var(--text-mute);
  margin-bottom: 18px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-dim);
  text-decoration: none;
  background: transparent;
}
.breadcrumbs a:hover {
  color: var(--ink);
  background: transparent;
  text-decoration: underline;
  text-decoration-color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.breadcrumbs span { color: var(--text-mute); }

/* ==== Футер ==== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  margin-top: 20px;
  color: var(--text-mute);
  font-size: 14px;
}

.site-footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a { color: var(--text-dim); }

/* ==== UTM-генератор специфично ==== */
.utm-output {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  word-break: break-all;
  color: var(--text);
  min-height: 50px;
}

/* ==== Генератор паролей ==== */
.password-display {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 0.03em;
  color: var(--text);
  word-break: break-all;
  margin-bottom: 16px;
  min-height: var(--size-2xl);
  display: flex;
  align-items: center;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
}
/* Slider value: по умолчанию — внутри thumb (yellow on ink).
   На focus/active — превращается в tooltip над thumb (ink с белым текстом). */
.slider-row .slider-value {
  position: absolute;
  top: 50%;
  left: var(--slider-pos, 0);
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: transparent;
  padding: 0;
  border-radius: 0;
  pointer-events: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  text-align: center;
  line-height: 1;
  transition: top var(--transition), color var(--transition), background var(--transition), padding var(--transition), transform var(--transition);
}
.slider-row .slider-value::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: transparent;
  transition: border-top-color var(--transition);
}
.slider-row:focus-within .slider-value,
.slider-row:hover .slider-value {
  top: -8px;
  transform: translate(-50%, -100%);
  background: var(--ink);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
}
.slider-row:focus-within .slider-value::after,
.slider-row:hover .slider-value::after {
  border-top-color: var(--ink);
}

.slider-row input[type="range"] {
  flex: 0 1 280px;
  height: 24px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

/* Track 6px ink-soft с rounded ends. */
.slider-row input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.slider-row input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

/* Thumb — squircle 24×24 ink-чёрный, на hover вырастает обводка accent. */
.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  border: 0;
  margin-top: -15px;
  cursor: pointer;
  box-shadow: 0 0 0 0 var(--accent), 0 2px 10px rgba(20, 24, 40, 0.18);
  transition: box-shadow 150ms, transform 150ms;
}
.slider-row input[type="range"]::-moz-range-thumb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  border: 0;
  cursor: pointer;
  box-shadow: 0 0 0 0 var(--accent), 0 2px 10px rgba(20, 24, 40, 0.18);
  transition: box-shadow 150ms, transform 150ms;
}

.slider-row input[type="range"]:hover::-webkit-slider-thumb,
.slider-row input[type="range"]:active::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--accent), 0 2px 8px rgba(20, 24, 40, 0.16);
  transform: scale(1.05);
}
.slider-row input[type="range"]:hover::-moz-range-thumb,
.slider-row input[type="range"]:active::-moz-range-thumb {
  box-shadow: 0 0 0 4px var(--accent), 0 2px 8px rgba(20, 24, 40, 0.16);
  transform: scale(1.05);
}

.slider-row input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 6px var(--accent), 0 2px 8px rgba(20, 24, 40, 0.16);
}
.slider-row input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 6px var(--accent), 0 2px 8px rgba(20, 24, 40, 0.16);
}

.slider-value {
  font-family: var(--font-mono);
  min-width: 44px;
  text-align: right;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}

/* ==== Медиа ==== */
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .workspace { padding: 20px; }
  .site-header__nav { display: none; }
  .hero { padding: 48px 0 32px; }
}
