/* ==========================================================================
   DocPdf — редизайн «Stone» · production CSS
   ЗГЕНЕРОВАНО integration/build/build.mjs з prototype/assets/css/styles.css
   + integration/build/bridge.css. Не редагувати вручну: правки — у прототипі або bridge.css.
   Токени й правила: DESIGN.md (версія 1.2).
   ========================================================================== */

/* 1. Токени ---------------------------------------------------------------- */
:root {
  --color-canvas: #ECEAE6;
  --color-surface: #F7F6F4;
  --color-surface-raised: #FFFFFF;
  --color-surface-soft: #E4E1DC;
  --color-ink: #1D1C1A;
  --color-muted: #5C5852;
  --color-subtle: #6B6761;
  --color-border: #E2DED8;
  --color-border-strong: #8C877F;
  --color-primary: #1D1C1A;
  --color-primary-hover: #3A3733;
  --color-primary-soft: #E2DFD9;
  --color-accent: #C9602A;
  --color-accent-soft: #FBE9DD;
  --color-accent-ink: #A24A16;
  --color-success: #1F7A4F;
  --color-success-soft: #E3F1E8;
  --color-danger: #B03A2E;
  --color-danger-soft: #F8E6E3;
  --color-warning: #7E5A00;
  --color-warning-soft: #F7EDD5;
  --color-focus: #C9602A;

  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-brand: "Manrope", "Inter", -apple-system, sans-serif;

  --radius-control: 14px;
  --radius-card: 24px;
  --radius-panel: 32px;
  --radius-pill: 999px;
  --shadow-rest: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 6px 22px rgba(60, 48, 36, .06);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 14px 36px rgba(60, 48, 36, .10);
  --shadow-floating: 0 22px 56px rgba(60, 48, 36, .14);

  /* Логотип следует палитре */
  --lg-main: var(--color-primary);
  --lg-back: var(--color-accent-soft);
  --lg-back-line: var(--color-accent);

  --container-max: 1200px;
  --gutter: 40px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 1023px) { :root { --gutter: 24px; } }
@media (max-width: 767px) { :root { --gutter: 16px; --header-h: 64px; } }

/* 2. База ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-ink);
  font: 400 16px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--color-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-primary-hover); }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-heading); color: var(--color-ink); letter-spacing: -.022em; text-wrap: balance; hyphens: auto; }
h1 { font-size: 44px; line-height: 1.12; font-weight: 600; }
h2 { font-size: 32px; line-height: 1.2; font-weight: 600; }
h3 { font-size: 24px; line-height: 1.3; font-weight: 600; }
p, ul, ol, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--color-primary-soft); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: calc(var(--container-max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.lead { font-size: 18px; line-height: 1.6; color: var(--color-muted); max-width: 62ch; }
.muted { color: var(--color-muted); }
.small { font-size: 14px; line-height: 1.5; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: var(--radius-control); background: var(--color-ink); color: #fff; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

@media (max-width: 767px) {
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  h3 { font-size: 21px; }
  .lead { font-size: 17px; }
}

/* 3. Кнопки ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--radius-control);
  font: 600 15px/1.25 var(--font-ui); text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); color: #fff; }
.btn-secondary { background: var(--color-surface); border-color: var(--color-border); color: var(--color-ink); box-shadow: 0 1px 0 rgba(60, 48, 36, .04); }
.btn-secondary:hover { border-color: var(--color-border-strong); color: var(--color-ink); }
.btn-ghost { background: transparent; color: var(--color-ink); padding-inline: 14px; }
.btn-ghost:hover { background: var(--color-surface-soft); color: var(--color-ink); }
.btn-danger { background: var(--color-surface); border-color: #E3C4C4; color: var(--color-danger); }
.btn-danger:hover { background: var(--color-danger-soft); color: var(--color-danger); }
.btn-light { background: #fff; color: var(--color-ink); }
.btn-light:hover { background: var(--color-primary-soft); color: var(--color-ink); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--color-surface-soft); border-color: var(--color-border); color: var(--color-subtle);
  cursor: not-allowed; box-shadow: none;
}
.btn.is-loading { pointer-events: none; }
.btn.is-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); color: var(--color-ink);
  cursor: pointer; transition: border-color .18s, background-color .18s, color .18s;
}
.icon-btn .icon { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--color-border-strong); }
.icon-btn:disabled { color: #B3AEA6; background: var(--color-canvas); cursor: not-allowed; }
.icon-btn.is-danger:hover { color: var(--color-danger); border-color: #E3C4C4; background: var(--color-danger-soft); }

.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link .icon { width: 16px; height: 16px; transition: transform .18s var(--ease); }
.text-link:hover .icon { transform: translateX(2px); }

/* 4. Шапка ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(236, 234, 230, .88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--color-border); }
.header-inner { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--color-ink); text-decoration: none; font: 800 22px/1 var(--font-brand); letter-spacing: -.035em; }
.brand:hover { color: var(--color-ink); }
/* Логотип B «Стос»: знак без плитки + «docpdf» у нижньому регістрі */
.brand-mark { display: block; flex: none; width: 36px; height: 36px; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-word span { color: var(--color-accent); }
.main-nav { display: flex; align-items: center; flex: 1; gap: 24px; }
.nav-links { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px;
  color: var(--color-muted); font-size: 15px; font-weight: 500; text-decoration: none; transition: color .18s, background-color .18s;
}
.nav-links a:hover { color: var(--color-ink); background: var(--color-surface-soft); }
.nav-links a[aria-current="page"] { color: var(--color-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--color-primary); border-radius: 10px 10px 0 0; }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
/* Перемикач мови: кнопка-пілюля з прапором + випадаючий список (disclosure) */
.lang-menu { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 14px;
  border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface);
  color: var(--color-ink); font: 600 13px/1 var(--font-ui); letter-spacing: .02em; cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
.lang-btn:hover { border-color: var(--color-border-strong); }
.lang-btn[aria-expanded="true"] { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.lang-caret { width: 16px; height: 16px; color: var(--color-muted); transition: transform .18s var(--ease); }
.lang-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
.flag { display: block; flex: none; width: 20px; height: 14px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(29,28,26,.12); }
.lang-list {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; display: grid; gap: 2px; width: 232px; margin: 0; padding: 6px;
  list-style: none; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); box-shadow: var(--shadow-floating);
  animation: lang-in .16s var(--ease);
}
.lang-list[hidden] { display: none; }
.lang-menu.is-up .lang-list { top: auto; bottom: calc(100% + 8px); }
.lang-list a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--color-ink); font-size: 15px; font-weight: 500; text-decoration: none; transition: background-color .15s;
}
.lang-list a:hover, .lang-list a:focus-visible { background: var(--color-surface-soft); }
.lang-list a:focus-visible { outline-offset: -2px; }
.lang-list a[aria-current="true"] { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; }
.lang-name { flex: 1; }
.lang-code { color: var(--color-subtle); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.lang-list a[aria-current="true"] .lang-code { display: none; }
.lang-check { width: 18px; height: 18px; }
@keyframes lang-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lang-menu.is-up .lang-list { animation-name: lang-in-up; }
@keyframes lang-in-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lang-list { animation: none; } }
.google-mark { width: 18px; height: 18px; flex: none; }
/* Меню користувача (авторизований стан): аватар + ім’я → панель з планом, розділами кабінету і виходом */
.user-menu { position: relative; }
.user-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px 0 4px;
  border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface);
  color: var(--color-ink); font: 600 14px/1 var(--font-ui); cursor: pointer; transition: border-color .18s, box-shadow .18s;
}
.user-btn:hover { border-color: var(--color-border-strong); }
.user-btn[aria-expanded="true"] { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.user-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
.avatar.avatar-sm { width: 34px; height: 34px; font-size: 13px; }
.user-list {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 288px; padding: 8px;
  border: 1px solid var(--color-border); border-radius: 18px; background: var(--color-surface); box-shadow: var(--shadow-floating);
  animation: lang-in .16s var(--ease);
}
.user-list[hidden] { display: none; }
.user-card { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; }
.user-card strong { display: block; font-size: 15px; }
.user-card div span { display: block; color: var(--color-subtle); font-size: 13px; overflow-wrap: anywhere; }
.user-plan { display: grid; gap: 4px; margin-bottom: 6px; padding: 12px; border-radius: 12px; background: var(--color-canvas); color: var(--color-ink); text-decoration: none; transition: background-color .15s; }
.user-plan:hover { background: var(--color-surface-soft); }
.user-plan-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--color-muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.user-plan .meter { margin-top: 6px; height: 6px; background: var(--color-border); }
.user-plan-row > span:last-child { color: var(--color-ink); font-size: 14px; font-weight: 700; }
.user-plan-note { color: var(--color-subtle); font-size: 12.5px; }
.user-links { display: grid; gap: 2px; margin: 0; padding: 6px 0; list-style: none; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.user-links a, .user-logout button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
  background: none; color: var(--color-ink); font: 500 15px/1.2 var(--font-ui); text-decoration: none; cursor: pointer; transition: background-color .15s;
}
.user-links a .icon, .user-logout .icon { width: 19px; height: 19px; color: var(--color-muted); }
.user-links a:hover, .user-links a:focus-visible, .user-logout button:hover, .user-logout button:focus-visible { background: var(--color-surface-soft); }
.user-links a:focus-visible, .user-logout button:focus-visible { outline-offset: -2px; }
.user-links a[aria-current="page"] { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; }
.user-links a[aria-current="page"] .icon { color: var(--color-primary); }
.user-logout { padding-top: 6px; }
.user-logout button { color: var(--color-danger); }
.user-logout button .icon { color: var(--color-danger); }
@media (prefers-reduced-motion: reduce) { .user-list { animation: none; } }
.menu-toggle { display: none; margin-left: auto; }
/* Швидке меню інструментів: desktop — пункт «Інструменти» відкриває мега-меню; ≤ 1023 — окрема кнопка в шапці */
.tools-toggle, .nav-links .nav-tools-link { display: none; }
.nav-tools-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px 0 14px; border: 0; border-radius: 10px; background: none;
  color: var(--color-muted); font: 500 15px/1 var(--font-ui); cursor: pointer; transition: color .18s, background-color .18s;
}
.nav-tools-btn:hover, .nav-tools-btn[aria-expanded="true"] { color: var(--color-ink); background: var(--color-surface-soft); }
.nav-tools-btn[data-active] { color: var(--color-ink); font-weight: 600; }
.nav-tools-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
.tools-panel[hidden] { display: none; }
.tools-panel {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 55; max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  padding: 24px 0 28px; background: var(--color-canvas); border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-floating);
  animation: lang-in .16s var(--ease);
}
.tools-panel > .container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); gap: 16px 32px; }
.qt-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--color-subtle); font: 600 12px/1.4 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.qt-title span { padding: 1px 8px; border-radius: 999px; background: var(--color-surface-soft); color: var(--color-muted); letter-spacing: 0; }
.qt-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.qt-group:nth-of-type(3) .qt-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qt-list a {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px 6px 6px; border: 1px solid var(--color-border); border-radius: 14px;
  background: var(--color-surface); color: var(--color-ink); font-size: 14px; font-weight: 600; line-height: 1.25; text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.qt-list a:hover { border-color: #CFC9C0; box-shadow: var(--shadow-card); }
.qt-list a[aria-current="page"] { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-primary); }
.qt-list .tile { width: 38px; height: 38px; border-radius: 11px; }
.qt-list .tile .icon { width: 18px; height: 18px; }
.qt-list a > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.qt-all { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
/* Google у шапці — лише значок */
.btn-google-icon { width: 44px; min-height: 44px; padding: 0; flex: none !important; }
.btn-google-icon .google-mark { width: 20px; height: 20px; }
@media (max-width: 1023px) {
  .header-inner { gap: 8px; }
  .nav-tools-btn { display: none; }
  .nav-links .nav-tools-link { display: flex; }
  .tools-toggle {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-left: auto; padding: 0 12px;
    border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface);
    color: var(--color-ink); font: 600 14px/1 var(--font-ui); cursor: pointer; transition: border-color .18s, box-shadow .18s;
  }
  .tools-toggle > .icon:first-child { width: 18px; height: 18px; color: var(--color-primary); }
  .tools-toggle[aria-expanded="true"] { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
  .tools-toggle[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
  .menu-toggle { margin-left: 0; }
  .tools-panel { padding: 8px 0 20px; }
  .tools-panel > .container { display: block; }
  .qt-group + .qt-group { margin-top: 16px; }
  .qt-title { margin: 8px 0; }
  .qt-list, .qt-group:nth-of-type(3) .qt-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qt-all { display: inline-flex; margin-top: 18px; }
}
@media (max-width: 767px) { .qt-list, .qt-group:nth-of-type(3) .qt-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) {
  .tools-toggle { padding: 0 10px; }
  .tools-toggle .lang-caret { display: none; }
}
@media (max-width: 359px) {
  .tools-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .qt-list, .qt-group:nth-of-type(3) .qt-list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .tools-panel { animation: none !important; } }

@media (max-width: 1023px) {
  .menu-toggle { display: inline-grid; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 12px var(--gutter) 24px; background: var(--color-canvas);
    border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-floating);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .main-nav.is-open { display: flex; }
  .nav-links { flex-direction: column; }
  .nav-links a { min-height: 52px; color: var(--color-ink); font-size: 17px; border-bottom: 1px solid var(--color-border); border-radius: 0; }
  .nav-links a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--color-primary); padding-left: 16px; }
  .nav-actions { flex-wrap: wrap; margin-left: 0; }
  .nav-actions .btn { flex: 1 1 140px; }
  .nav-actions .lang-menu { flex: 1 1 100%; }
  .nav-actions .lang-btn { width: 100%; min-height: 48px; justify-content: flex-start; border-radius: 12px; }
  .nav-actions .lang-btn .lang-caret { margin-left: auto; }
  .nav-actions .lang-list { position: static; width: auto; margin-top: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); box-shadow: none; animation: none; }
  .nav-actions .lang-list a { font-size: 14px; gap: 10px; padding: 0 10px; }
  .nav-actions .lang-code { display: none; }
  .nav-actions .user-menu { flex: 1 1 100%; order: -1; }
  .nav-actions .user-btn { width: 100%; min-height: 52px; border-radius: 14px; padding-left: 8px; }
  .nav-actions .user-btn .lang-caret { margin-left: auto; }
  .nav-actions .user-list { position: static; width: auto; margin-top: 8px; box-shadow: none; animation: none; }
}

/* 5. Секції ---------------------------------------------------------------- */
.section { padding: 96px 0; }
.section + .section { padding-top: 0; }
.section-alt { background: var(--color-surface); border-block: 1px solid var(--color-border); }
.section-alt + .section, .section + .section-alt { padding-top: 96px; }
.section-head { display: grid; gap: 14px; max-width: 720px; margin-bottom: 40px; }
.section-head.is-center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head p { color: var(--color-muted); font-size: 17px; }
.section-head.is-split { max-width: none; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--color-muted); font: 600 13px/1.4 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); }
@media (max-width: 767px) {
  .section { padding: 56px 0; }
  .section-alt + .section, .section + .section-alt { padding-top: 56px; }
  .section-head { margin-bottom: 28px; }
  .section-head.is-split { grid-template-columns: minmax(0, 1fr); }
}

/* 6. Hero ------------------------------------------------------------------ */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
/* Фон hero: «Поле форматів» (декор, aria-hidden) */
.hero-grid { position: relative; z-index: 1; }
.hbg-field {
  position: absolute; top: -12px; bottom: -12px; left: 46%; right: -40px; z-index: 0; display: grid; grid-template-columns: repeat(11, max-content);
  gap: 18px 30px; align-content: center; justify-content: center; overflow: hidden; pointer-events: none;
  font: 700 13px/1 var(--font-heading); letter-spacing: .12em; color: rgba(29, 28, 26, .12);
  -webkit-mask-image: radial-gradient(ellipse 58% 62% at 56% 50%, #000 35%, transparent 78%); mask-image: radial-gradient(ellipse 58% 62% at 56% 50%, #000 35%, transparent 78%);
  animation: hbg-fade 1.2s var(--ease) .2s both;
}
.hbg-field .is-in { color: rgba(31, 122, 79, .5); }
.hbg-field .is-pdf { color: rgba(29, 28, 26, .42); }
@keyframes hbg-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hbg-field { animation: none; } }
@media (max-width: 1023px) { .hbg-field { left: -40px; top: 46%; } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 64px; align-items: center; }
.hero h1 { margin: 20px 0; font-size: 56px; line-height: 1.08; letter-spacing: -.025em; }
.hero .lead { font-size: 19px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 32px; padding: 0; list-style: none; color: var(--color-muted); font-size: 14px; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .icon { width: 18px; height: 18px; color: var(--color-success); }

.hero-visual { position: relative; padding: 24px 0 24px 24px; }
.hero-visual::before {
  content: ""; position: absolute; inset: -40px -120px -40px 0; z-index: -1;
  background:
    radial-gradient(circle at 70% 40%, rgba(201, 96, 42, .10), transparent 55%),
    linear-gradient(var(--color-border) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px) 0 0 / 32px 32px;
  -webkit-mask-image: radial-gradient(circle at 60% 50%, #000 30%, transparent 72%);
  mask-image: radial-gradient(circle at 60% 50%, #000 30%, transparent 72%);
  opacity: .7;
}
/* Інфографіка сервісу: вхідні формати → PDF → вихідні формати. Анімація відтворюється один раз. */
.svc { --ease: cubic-bezier(.2, .7, .2, 1); position: relative; padding: 28px; border: 1px solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-surface); box-shadow: var(--shadow-floating); }
.svc-head { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--color-border); }
.svc-total { font: 700 48px/1 var(--font-heading); letter-spacing: -.03em; color: var(--color-ink); font-variant-numeric: tabular-nums; min-width: 1.3em; }
.svc-total-label { color: var(--color-muted); font-size: 14px; font-weight: 600; line-height: 1.35; }

.svc-map { display: grid; grid-template-columns: auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto; grid-template-rows: auto 216px; align-items: center; column-gap: 0; row-gap: 12px; margin-top: 20px; }
.svc-cap { grid-row: 1; color: var(--color-subtle); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.svc-cap.is-in { grid-column: 1; }
.svc-cap.is-hub { grid-column: 2 / 5; text-align: center; }
.svc-cap.is-out { grid-column: 5; text-align: right; }
.svc-col { grid-row: 2; display: grid; grid-auto-rows: minmax(0, 1fr); height: 100%; margin: 0; padding: 0; list-style: none; }
.svc-col.is-in { grid-column: 1; justify-items: start; }
.svc-col.is-out { grid-column: 5; justify-items: end; }
.svc-col li { display: flex; align-items: center; opacity: 0; animation: svc-in .45s var(--ease) both; animation-delay: calc(.15s + var(--i) * .07s); }
.svc-col.is-out li { animation-name: svc-in-r; animation-delay: calc(1.25s + var(--i) * .07s); }
.svc-col span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 9px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.svc-col span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.svc-col.is-in span { background: var(--color-success-soft); color: var(--color-success); }
.svc-col.is-out span { background: var(--color-accent-soft); color: var(--color-accent-ink); }

.svc-links { grid-row: 2; width: 100%; height: 100%; overflow: visible; fill: none; }
.svc-links.is-in { grid-column: 2; }
.svc-links.is-out { grid-column: 4; }
.svc-line { stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 100; stroke-dashoffset: 100; animation: svc-draw .6s var(--ease) both; }
.svc-links.is-in .svc-line { stroke: #BCD9C8; animation-delay: calc(.45s + var(--i) * .06s); }
.svc-links.is-out .svc-line { stroke: #EDCDB9; animation-delay: calc(1.05s + var(--i) * .06s); }
.svc-packet { stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 10 200; stroke-dashoffset: 10; animation: svc-flow 1.6s ease-in-out 3 both; }
.svc-links.is-in .svc-packet { stroke: var(--color-success); animation-delay: calc(1.7s + var(--i) * .12s); }
.svc-links.is-out .svc-packet { stroke: var(--color-accent); animation-delay: calc(2.5s + var(--i) * .12s); }

.svc-hub { grid-row: 2; grid-column: 3; position: relative; display: grid; place-items: center; width: 132px; height: 132px; animation: svc-pop .5s var(--ease) .3s both; }
.svc-core { position: relative; z-index: 1; display: grid; place-items: center; align-content: center; gap: 2px; width: 84px; height: 84px; border-radius: 22px; background: var(--color-primary); color: #fff; box-shadow: 0 10px 28px rgba(29, 28, 26, .28); }
.svc-core .icon { width: 30px; height: 30px; }
.svc-core b { font: 700 13px/1 var(--font-heading); letter-spacing: .06em; }
.svc-core::after { content: ""; position: absolute; inset: -8px; border: 2px solid var(--color-primary); border-radius: 28px; opacity: 0; animation: svc-pulse 1.6s ease-out 3; animation-delay: 2.3s; }
.svc-act { position: absolute; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-primary); box-shadow: var(--shadow-card); animation: svc-pop .4s var(--ease) both; }
.svc-act .icon { width: 17px; height: 17px; }
.svc-act.is-merge { top: 0; left: 0; animation-delay: .7s; }
.svc-act.is-split { top: 0; right: 0; animation-delay: .78s; }
.svc-act.is-compress { bottom: 0; right: 0; animation-delay: .86s; }
.svc-act.is-rotate { bottom: 0; left: 0; animation-delay: .94s; }

.svc-bar { display: flex; gap: 4px; height: 10px; margin-top: 24px; }
.svc-bar span { flex: var(--n) 1 0; border-radius: 999px; transform-origin: left; animation: svc-grow .7s var(--ease) both; }
.svc-bar .is-to { background: var(--color-success); animation-delay: 1.5s; }
.svc-bar .is-actions { background: var(--color-primary); animation-delay: 1.65s; }
.svc-bar .is-from { background: var(--color-accent); animation-delay: 1.8s; }
.svc-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; padding: 0; list-style: none; color: var(--color-muted); font-size: 13px; }
.svc-legend li { display: inline-flex; align-items: baseline; gap: 6px; }
.svc-legend b { font: 700 15px/1 var(--font-heading); }
.svc-legend .is-to b { color: var(--color-success); }
.svc-legend .is-actions b { color: var(--color-primary); }
.svc-legend .is-from b { color: var(--color-accent-ink); }

@keyframes svc-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes svc-in-r { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes svc-draw { to { stroke-dashoffset: 0; } }
@keyframes svc-flow { from { stroke-dashoffset: 10; } to { stroke-dashoffset: -100; } }
@keyframes svc-pop { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: none; } }
@keyframes svc-pulse { from { opacity: .45; transform: scale(.94); } to { opacity: 0; transform: scale(1.18); } }
@keyframes svc-grow { from { transform: scaleX(0); } to { transform: none; } }

@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-visual { max-width: 560px; padding-left: 0; }
}
@media (max-width: 767px) {
  .hero { padding: 40px 0 56px; }
  .hero h1 { font-size: 36px; margin: 16px 0; }
  .hero .lead { font-size: 17px; }
  .hero-actions { margin-top: 28px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .svc { padding: 20px 16px; }
  .svc-total { font-size: 40px; }
}
@media (max-width: 599px) {
  .svc-map { grid-template-columns: auto minmax(12px, 1fr) auto minmax(12px, 1fr) auto; grid-template-rows: auto 196px; }
  .svc-hub { width: 104px; height: 104px; }
  .svc-core { width: 64px; height: 64px; border-radius: 18px; }
  .svc-core .icon { width: 24px; height: 24px; }
  .svc-act { width: 28px; height: 28px; border-radius: 8px; }
  .svc-act .icon { width: 14px; height: 14px; }
  .svc-col span { gap: 5px; padding: 5px 8px 5px 7px; font-size: 12px; }
  .svc-col span::before { width: 6px; height: 6px; }
  .svc-cap { font-size: 11px; letter-spacing: .04em; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 32px; }
  .svc-hub { width: 92px; height: 92px; }
  .svc-core { width: 56px; height: 56px; }
}

/* 7. Плитки-іконки інструментів -------------------------------------------- */
.tile { display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--color-primary-soft); color: var(--color-primary); }
.tile .icon { width: 22px; height: 22px; }
.tile.is-from { background: var(--color-accent-soft); color: var(--color-accent-ink); }
.tile.is-to { background: var(--color-success-soft); color: var(--color-success); }

.format-route { display: inline-flex; align-items: center; gap: 6px; color: var(--color-subtle); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.format-route .icon { width: 14px; height: 14px; }

/* 8. Картки інструментів --------------------------------------------------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 16px; height: 100%; padding: 24px;
  border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface);
  color: var(--color-ink); text-decoration: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.tool-card:hover { color: var(--color-ink); border-color: #CFC9C0; box-shadow: var(--shadow-card); transform: translateY(-2px); }
.tool-card:focus-visible { outline-offset: 2px; border-radius: var(--radius-card); }
.tool-card h3 { font-size: 18px; line-height: 1.35; }
.tool-card p { color: var(--color-muted); font-size: 14.5px; line-height: 1.55; }
.tool-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tool-card-arrow { color: var(--color-subtle); transition: color .18s, transform .18s var(--ease); }
.tool-card:hover .tool-card-arrow { color: var(--color-primary); transform: translate(2px, -2px); }
.tool-card .format-route { margin-top: auto; }
@media (max-width: 1023px) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .tool-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tool-card { flex-direction: row; flex-wrap: wrap; align-items: flex-start; padding: 18px; gap: 14px; }
  .tool-card-top { flex: none; }
  .tool-card-arrow { display: none; }
  .tool-card-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
  .tool-card .format-route { margin-top: 2px; }
}

/* 9. Каталог --------------------------------------------------------------- */
.catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.catalog-group { padding: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-surface); }
.catalog-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px; }
.catalog-group-head h3 { font-size: 18px; }
.catalog-count { padding: 2px 10px; border-radius: 999px; background: var(--color-surface-soft); color: var(--color-muted); font-size: 13px; font-weight: 600; }
.catalog-list { margin: 0; padding: 0; list-style: none; }
.catalog-link {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: start;
  padding: 14px 16px; border-radius: 14px; color: var(--color-ink); text-decoration: none; transition: background-color .18s;
}
.catalog-link:hover { background: var(--color-canvas); color: var(--color-ink); }
.catalog-link .tile { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; }
.catalog-link .tile .icon { width: 19px; height: 19px; }
.catalog-link strong { font-size: 15px; line-height: 1.4; }
.catalog-link span.desc { grid-column: 2; color: var(--color-muted); font-size: 13.5px; line-height: 1.5; }
.catalog-link > .icon { grid-row: 1; grid-column: 3; width: 18px; height: 18px; margin-top: 2px; color: var(--color-subtle); transition: transform .18s var(--ease), color .18s; }
.catalog-link:hover > .icon { color: var(--color-primary); transform: translateX(2px); }
.catalog-group { display: flex; flex-direction: column; }
.catalog-more {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: auto 8px 8px; padding: 10px 16px;
  border: 1px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-surface);
  color: var(--color-primary); font: 600 14px/1.4 var(--font-ui); cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.catalog-list + .catalog-more { margin-top: 8px; }
.catalog-more:hover { background: var(--color-primary-soft); border-color: #CFC9C0; }
.catalog-more .icon { width: 18px; height: 18px; transition: transform .18s var(--ease); }
.catalog-more[aria-expanded="true"] .icon { transform: rotate(180deg); }
.catalog-list li.is-extra:not([hidden]) { animation: catalog-in .2s var(--ease) both; }
@keyframes catalog-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .catalog-list li.is-extra:not([hidden]) { animation: none; } .catalog-more .icon { transition: none; } }
@media (max-width: 1023px) { .catalog { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* 10. Кроки ---------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 14px;
  padding: 12px 12px 24px; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface);
  counter-increment: step; transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.step:hover { border-color: #CFC9C0; box-shadow: var(--shadow-card); }
.step::before { content: "0" counter(step); padding-left: 12px; color: var(--color-accent); font: 700 26px/1 var(--font-heading); }
.step strong { display: block; font: 700 19px/1.35 var(--font-heading); }

/* Візуалізації кроків (декоративні, aria-hidden) */
.step-visual {
  order: -1; grid-column: 1 / -1; position: relative; display: grid; place-items: center;
  height: 184px; margin-bottom: 22px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(var(--color-border) 1px, transparent 1.2px) 0 0 / 16px 16px, var(--color-canvas);
}
.step-visual .icon { width: 20px; height: 20px; }
.step-visual .file-thumb { display: block; width: 48px; height: 62px; background-size: 30px 8px; background-position: 8px 14px; }

/* 1 — вибір інструмента */
.sv-tools { position: relative; display: grid; grid-template-columns: repeat(3, 44px); gap: 10px; }
.sv-tools .tile { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 1px 0 rgba(60, 48, 36, .04); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.sv-tools .tile:not(.is-active) { opacity: .55; }
.sv-tools .tile.is-active { transform: scale(1.08); box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-primary), var(--shadow-card); }
.sv-cursor.icon { position: absolute; left: 84px; top: 80px; width: 24px; height: 24px; fill: #fff; stroke: var(--color-ink); stroke-width: 1.6; filter: drop-shadow(0 2px 3px rgba(60, 48, 36, .2)); transition: transform .3s var(--ease); }
.step:hover .sv-cursor { transform: translate(-3px, -3px); }

/* 2 — завантаження файлів */
.sv-upload { position: relative; width: 210px; height: 140px; }
.sv-drop {
  position: absolute; inset: 30px 0 0; display: grid; place-items: center; align-content: center; gap: 12px;
  border: 2px dashed #BDB6AC; border-radius: 14px; background: var(--color-primary-soft);
}
.sv-drop-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--color-surface); color: var(--color-primary); }
.sv-drop-icon .icon { width: 18px; height: 18px; }
.sv-bar { width: 116px; height: 6px; border-radius: 999px; background: var(--color-surface); overflow: hidden; }
.sv-bar span { display: block; width: 62%; height: 100%; border-radius: inherit; background: var(--color-primary); }
.sv-file { position: absolute; left: 22px; top: -4px; transform: rotate(-10deg); filter: drop-shadow(0 8px 14px rgba(60, 48, 36, .14)); transition: transform .35s var(--ease); }
.sv-file + .sv-file { left: auto; right: 26px; top: 2px; transform: rotate(8deg); }
.step:hover .sv-file { transform: rotate(-4deg) translateY(10px); }
.step:hover .sv-file + .sv-file { transform: rotate(3deg) translateY(8px); }

/* 3 — завантаження результату */
.sv-result { display: grid; justify-items: center; gap: 14px; }
.sv-doc { position: relative; display: flex; align-items: center; gap: 14px; width: 190px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); box-shadow: var(--shadow-card); }
.sv-lines { display: grid; gap: 8px; flex: 1; }
.sv-lines span { height: 7px; border-radius: 999px; background: var(--color-surface-soft); }
.sv-lines span:first-child { background: #DCD8D1; }
.sv-lines span:last-child { width: 60%; }
.sv-check { position: absolute; top: -10px; right: -10px; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--color-surface); border-radius: 50%; background: var(--color-success); color: #fff; }
.sv-check .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.sv-download { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 16px; border-radius: 10px; background: var(--color-primary); color: #fff; transition: background-color .18s, transform .3s var(--ease); }
.sv-download .icon { width: 16px; height: 16px; }
.sv-download i { display: block; width: 44px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .55); }
.step:hover .sv-download { background: var(--color-primary-hover); transform: translateY(-2px); }

@media (max-width: 1023px) and (min-width: 768px) {
  .sv-upload { transform: scale(.88); }
  .sv-doc { width: 170px; }
}
@media (max-width: 767px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .step-visual { height: 164px; }
}

/* 11. Формати, задачі, переваги ---------------------------------------------- */
.split-block { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.split-block .section-head { margin-bottom: 0; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: var(--color-ink); font-size: 13px; font-weight: 600; letter-spacing: .03em; }
.route-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.route-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 0 20px;
  border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); color: var(--color-ink);
  font: 700 16px/1.3 var(--font-heading); text-decoration: none; transition: border-color .18s, box-shadow .18s;
}
.route-link:hover { color: var(--color-ink); border-color: #CFC9C0; box-shadow: var(--shadow-card); }
.route-link .icon { width: 18px; height: 18px; color: var(--color-primary); }
.task-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.task-card { display: flex; flex-direction: column; gap: 20px; height: 100%; padding: 22px; border-radius: var(--radius-card); background: var(--color-surface-soft); color: var(--color-ink); text-decoration: none; transition: background-color .18s; }
.task-card:hover { background: #E4E1DC; color: var(--color-ink); }
.task-card .tile { background: var(--color-accent-soft); color: var(--color-accent-ink); }
.task-card strong { font: 700 17px/1.35 var(--font-heading); }
.task-card .text-link { margin-top: auto; font-size: 14px; }
.info-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.info-card { display: grid; gap: 14px; align-content: start; padding: 32px; border: 1px solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-surface); }
.info-card h2 { font-size: 24px; }
.info-card p { color: var(--color-muted); }
@media (max-width: 1023px) {
  .split-block { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .route-links, .info-pair, .task-grid { grid-template-columns: minmax(0, 1fr); }
  .info-card { padding: 24px; }
}

/* 12. FAQ ------------------------------------------------------------------ */
.faq-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.faq-layout .section-head { position: sticky; top: calc(var(--header-h) + 24px); margin-bottom: 0; }
.faq-list { border-top: 1px solid var(--color-border); }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; padding: 18px 0;
  font: 700 17px/1.4 var(--font-heading); cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { width: 20px; height: 20px; color: var(--color-muted); transition: transform .2s var(--ease); }
.faq-item[open] summary .icon { transform: rotate(45deg); color: var(--color-primary); }
.faq-item summary:focus-visible { outline-offset: 0; }
.faq-item p { max-width: 64ch; padding: 0 44px 22px 0; color: var(--color-muted); }
@media (max-width: 1023px) {
  .faq-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .faq-layout .section-head { position: static; }
}
@media (max-width: 767px) { .faq-item p { padding-right: 0; } .faq-item summary { font-size: 16px; } }
/* Ілюстрація FAQ: питання → логотип B → відповідь (декор, aria-hidden). Анімація один раз при появі в полі зору. */
.faq-art {
  margin: 32px 0 0; padding: 20px; border: 1px solid var(--color-border); border-radius: var(--radius-panel);
  background-color: var(--color-canvas); background-image: radial-gradient(var(--color-border) 1px, transparent 1px); background-size: 16px 16px;
}
.faq-art svg { display: block; width: 100%; height: auto; max-width: 420px; margin-inline: auto; overflow: visible; }
.faq-art .fa-link { fill: none; stroke: var(--color-border-strong); stroke-width: 2; stroke-dasharray: 5 6; }
.faq-art .fa-qmark { fill: #fff; font: 700 20px/1 var(--font-heading); }
.faq-art .fa-q, .faq-art .fa-a, .faq-art .fa-core, .faq-art .fa-dots { transform-box: fill-box; transform-origin: center; }
.faq-art[data-reveal] .fa-q, .faq-art[data-reveal] .fa-a, .faq-art[data-reveal] .fa-core, .faq-art[data-reveal] .fa-dots, .faq-art[data-reveal] .fa-link { opacity: 0; }
.faq-art.is-in .fa-q { animation: fa-pop .45s var(--ease) .05s both; }
.faq-art.is-in .fa-link { animation: fa-fade .4s var(--ease) .4s both; }
.faq-art.is-in .fa-core { animation: fa-pop .5s var(--ease) .55s both; }
.faq-art.is-in .fa-link-2 { animation-delay: .9s; }
.faq-art.is-in .fa-a { animation: fa-pop .45s var(--ease) 1.05s both; }
.faq-art.is-in .fa-dots { animation: fa-fade .5s var(--ease) 1.3s both; }
.faq-art.is-in .fa-ring { transform-box: fill-box; transform-origin: center; animation: fa-pulse 1.4s var(--ease) 1.5s 2; }
@keyframes fa-pop { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes fa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fa-pulse { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) {
  .faq-art[data-reveal] * { animation: none !important; opacity: 1 !important; }
}
@media (max-width: 1023px) { .faq-art { margin-top: 24px; } .faq-art svg { max-width: 360px; } }
@media (max-width: 599px) { .faq-art { padding: 16px; } .faq-art svg { max-width: 300px; } }


/* 13. Фінальний CTA -------------------------------------------------------- */
.cta-panel {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
  padding: 56px; border-radius: var(--radius-panel); background: var(--color-ink); color: #fff; overflow: hidden;
}
.cta-panel::after { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 0 0 60px rgba(255, 255, 255, .025), 0 0 0 120px rgba(255, 255, 255, .02); pointer-events: none; }
.cta-panel h2 { color: #fff; max-width: 22ch; }
.cta-panel p { margin-top: 14px; color: #CFCAC2; max-width: 56ch; }
.cta-panel .btn { position: relative; z-index: 1; }
@media (max-width: 767px) {
  .cta-panel { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; }
  .cta-panel .btn { width: 100%; }
}

/* 14. Підвал --------------------------------------------------------------- */
.site-footer { margin-top: 48px; padding: 64px 0 32px; border-top: 1px solid var(--color-border); background: var(--color-surface); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 48px; }
.footer-grid.has-legal { grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); }
.footer-col a { overflow-wrap: anywhere; }
.footer-about p { max-width: 36ch; margin-top: 16px; color: var(--color-muted); font-size: 14px; }
.footer-col h2 { margin-bottom: 14px; color: var(--color-subtle); font: 600 13px/1.4 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.footer-col ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.footer-col a { display: inline-flex; align-items: center; min-height: 36px; color: var(--color-ink); font-size: 15px; text-decoration: none; }
.footer-col a:hover { color: var(--color-primary); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--color-border); color: var(--color-subtle); font-size: 14px; }
@media (max-width: 767px) {
  .site-footer { margin-top: 28px; padding-top: 48px; }
  .footer-grid, .footer-grid.has-legal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 380px) { .footer-grid, .footer-grid.has-legal { grid-template-columns: minmax(0, 1fr); } }

/* 14a. Банер згоди на кукі --------------------------------------------- */
.cookie-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70; }
.cookie-consent[hidden] { display: none; }
.cookie-consent-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; max-width: 760px; margin-inline: auto; padding: 20px 24px; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface-raised); box-shadow: var(--shadow-floating); }
.cookie-consent p { flex: 1 1 320px; margin: 0; color: var(--color-muted); font-size: 14px; line-height: 1.5; }
.cookie-consent a { color: var(--color-ink); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 767px) {
  .cookie-consent { left: 12px; right: 12px; bottom: 12px; }
  .cookie-consent-inner { padding: 16px; }
}

/* 15. Шапка сторінки (внутрішні сторінки) ---------------------------------- */
.page-head { padding: 56px 0 40px; }
.page-head.is-center { text-align: center; }
.page-head.is-center .lead { margin-inline: auto; }
.page-head h1 { margin: 14px 0 16px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--color-subtle); font-size: 14px; }
.page-head.is-center .breadcrumbs ol { justify-content: center; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: #B3AEA6; }
.breadcrumbs a { color: var(--color-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-primary); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--color-ink); }
@media (max-width: 767px) {
  .page-head { padding: 32px 0 28px; }
  /* Сторінки інструментів: на мобільному лише h1 — підзаголовок приховано, одразу зона завантаження */
  [data-page="tool"] .page-head .lead, [data-page="split"] .page-head .lead { display: none; }
}

/* 16. Панель завантаження / інструмент ------------------------------------- */
.tool-shell { max-width: var(--container-max); margin-inline: auto; }
.panel { padding: 32px; border: 1px solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-surface); box-shadow: var(--shadow-card); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-title h2 { font-size: 20px; }
.drop-zone {
  position: relative; display: grid; justify-items: center; gap: 14px; padding: 48px 24px; text-align: center;
  border: 2px dashed #C9C4BB; border-radius: 20px; background: var(--color-canvas);
  transition: border-color .18s, background-color .18s;
}
.drop-zone:hover { border-color: var(--color-border-strong); }
.drop-zone.is-dragging { border-color: var(--color-primary); background: var(--color-primary-soft); }
.drop-zone-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary); }
.drop-zone-icon .icon { width: 28px; height: 28px; }
.drop-zone strong { font: 700 20px/1.3 var(--font-heading); }
.drop-zone .or { color: var(--color-subtle); font-size: 14px; }
.drop-zone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone input[type="file"]:focus-visible + label { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.limits { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; color: var(--color-muted); font-size: 13.5px; }
.limits span { display: inline-flex; align-items: center; gap: 6px; }
.limits .icon { width: 16px; height: 16px; color: var(--color-subtle); }

.zip-option { margin-top: 16px; border: 1px solid var(--color-border); border-radius: 14px; }
.zip-option summary { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 600; }
.zip-option summary::-webkit-details-marker { display: none; }
.zip-option summary .icon:last-child { margin-left: auto; color: var(--color-subtle); transition: transform .2s; }
.zip-option[open] summary .icon:last-child { transform: rotate(180deg); }
.zip-option .zip-body { display: grid; gap: 8px; padding: 0 16px 16px; }

.file-list { display: grid; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: file; }
.file-row { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 14px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); counter-increment: file; }
.file-row.is-ordered::before { content: counter(file); width: 22px; color: var(--color-subtle); font-size: 13px; font-weight: 700; text-align: center; }
.file-thumb { position: relative; width: 40px; height: 52px; flex: none; border: 1px solid var(--color-border); border-radius: 6px; background: linear-gradient(var(--color-surface-soft) 2px, transparent 2px) 7px 12px / 24px 7px repeat-y, #fff; }
.file-thumb::after { content: "PDF"; position: absolute; left: -4px; bottom: 6px; padding: 1px 4px; border-radius: 4px; background: var(--color-danger); color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .02em; }
.file-thumb[data-ext]::after { content: attr(data-ext); background: var(--color-primary); }
.file-thumb[data-ext="PDF"]::after { background: var(--color-danger); }
.file-meta { flex: 1; min-width: 0; }
.file-name { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.35; }
.file-size { color: var(--color-subtle); font-size: 13px; }
.file-actions { display: flex; gap: 6px; }
.form-foot { display: grid; gap: 12px; margin-top: 24px; }
.hint { color: var(--color-muted); font-size: 14px; }
.hint-row { display: flex; align-items: center; gap: 8px; color: var(--color-muted); font-size: 14px; }
.hint-row .icon { width: 16px; height: 16px; color: var(--color-subtle); }
@media (max-width: 599px) {
  .panel { padding: 20px 16px; border-radius: 20px; }
  .drop-zone { padding: 32px 16px; }
  .drop-zone strong { font-size: 18px; }
  .file-row { flex-wrap: wrap; }
  .file-actions { width: 100%; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--color-border); }
}

/* Стани обробки */
.workflow { display: grid; gap: 20px; }
.status-line { display: flex; align-items: flex-start; gap: 16px; }
.status-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary); }
.status-icon .icon { width: 24px; height: 24px; }
.status-icon.is-busy .icon { animation: spin 1.4s linear infinite; }
.status-icon.is-success { background: var(--color-success-soft); color: var(--color-success); }
.status-icon.is-error { background: var(--color-danger-soft); color: var(--color-danger); }
.status-icon.is-neutral { background: var(--color-surface-soft); color: var(--color-muted); }
.status-line h2 { font-size: 22px; }
.status-line p { margin-top: 4px; color: var(--color-muted); }
.progress { display: grid; gap: 8px; }
.progress-bar { height: 10px; border-radius: 999px; background: var(--color-surface-soft); overflow: hidden; }
.progress-bar span { display: block; height: 100%; border-radius: inherit; background: var(--color-primary); transition: width .4s var(--ease); }
.progress-bar.is-indeterminate span { width: 35% !important; animation: indeterminate 1.4s var(--ease) infinite; }
@keyframes indeterminate { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.progress-meta { display: flex; justify-content: space-between; gap: 16px; color: var(--color-muted); font-size: 14px; }
.progress-meta strong { color: var(--color-ink); font-variant-numeric: tabular-nums; }
.result-card { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid #CFE3D9; border-radius: 16px; background: var(--color-success-soft); }
.result-card .file-meta { min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 599px) {
  .result-card { flex-wrap: wrap; }
  .actions .btn { flex: 1 1 100%; }
}

/* Сповіщення */
.alert { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid; border-radius: 14px; font-size: 15px; }
.alert .icon { margin-top: 2px; }
.alert-error { border-color: #EBC9C9; background: var(--color-danger-soft); color: #7E2E2E; }
.alert-success { border-color: #CFE3D9; background: var(--color-success-soft); color: #0A563D; }
.alert-info { border-color: #D8D3CB; background: var(--color-primary-soft); color: var(--color-ink); }
.alert-warning { border-color: #EBD9AE; background: var(--color-warning-soft); color: var(--color-warning); }

/* 17. Контент сторінки інструмента ----------------------------------------- */
.content-stack { display: grid; gap: 16px; max-width: 880px; margin: 64px auto 0; }
.content-card { padding: 32px; border: 1px solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-surface); }
.content-card h2 { margin-bottom: 14px; font-size: 24px; }
.content-card p { color: var(--color-muted); }
.content-card p + p { margin-top: 12px; }
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.check-list li { display: flex; gap: 12px; padding: 16px; border-radius: 14px; background: var(--color-canvas); }
.check-list .icon { margin-top: 2px; color: var(--color-success); }
.num-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: n; }
.num-list li { position: relative; padding: 14px 0 14px 52px; border-top: 1px solid var(--color-border); counter-increment: n; color: var(--color-muted); }
.num-list li:first-child { border-top: 0; }
.num-list li::before { content: counter(n); position: absolute; left: 0; top: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary); font-size: 14px; font-weight: 700; }
.spec-list { display: grid; gap: 0; }
.spec-list > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--color-border); }
.spec-list > div:first-child { border-top: 0; }
.spec-list dt { color: var(--color-subtle); font-size: 14px; }
.spec-list dd { color: var(--color-ink); font-size: 15px; }
.related { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.related a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 14px; border: 1px solid var(--color-border); border-radius: 14px; color: var(--color-ink); font-size: 15px; font-weight: 600; line-height: 1.35; text-decoration: none; transition: border-color .18s, box-shadow .18s; }
.related a:hover { color: var(--color-ink); border-color: #CFC9C0; box-shadow: var(--shadow-card); }
.related .tile { width: 36px; height: 36px; border-radius: 10px; }
.related .tile .icon { width: 18px; height: 18px; }
@media (max-width: 767px) {
  .content-stack { margin-top: 40px; }
  .content-card { padding: 22px 18px; }
  .check-list, .related { grid-template-columns: minmax(0, 1fr); }
  .spec-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* 17a. Шаблон контенту інструмента: 7 блоків у сітці 12 колонок ------------
   Порядок у DOM = порядок tool_page_content: огляд → можливості → сценарії → кроки → формати → FAQ → інші. */
.tool-content { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: 64px; }
.tc-card { display: flex; flex-direction: column; gap: 20px; min-width: 0; padding: 32px; border: 1px solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-surface); }
.tc-card p { color: var(--color-muted); }
.tc-intro { grid-column: span 7; }
.tc-about { grid-column: span 5; }
.tc-use-cases, .tc-steps, .tc-related { grid-column: 1 / -1; }
.tc-formats, .tc-faq { grid-column: span 6; }
.tc-head { display: flex; align-items: center; gap: 14px; }
.tc-head h2 { font-size: 24px; hyphens: manual; }
.tc-ico { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--color-primary-soft); color: var(--color-primary); }
.tc-ico .icon { width: 20px; height: 20px; }
/* Огляд: текст + інфографіка «вхід → інструмент → результат» + 3 факти */
.tc-intro .tc-lead { color: var(--color-ink); font-size: 18px; line-height: 1.6; }
.tc-flow {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(24px, 72px) auto minmax(24px, 72px) minmax(0, 1fr); align-items: center;
  padding: 28px 24px; border-radius: 18px; background-color: var(--color-canvas);
  background-image: radial-gradient(var(--color-border) 1px, transparent 1px); background-size: 16px 16px;
}
.tc-flow-side { display: grid; justify-items: center; gap: 8px; }
.tc-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 700; letter-spacing: .02em; box-shadow: 0 1px 0 rgba(60,48,36,.04); }
.tc-chip .icon { width: 15px; height: 15px; }
.tc-chip.is-pdf { background: var(--color-primary-soft); color: var(--color-primary); }
.tc-chip.is-to { background: var(--color-success-soft); color: var(--color-success); }
.tc-chip.is-from { background: var(--color-accent-soft); color: var(--color-accent-ink); }
.tc-chip.is-zip { background: var(--color-surface); color: var(--color-ink); border: 1px solid var(--color-border); }
.tc-flow-link { position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--color-border-strong) 0 6px, transparent 6px 11px); transform-origin: left; animation: tc-draw .6s var(--ease) .2s both; }
.tc-flow-link::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--color-border-strong); border-right: 0; }
.tc-flow-core { display: grid; justify-items: center; gap: 8px; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 18px; background: var(--color-surface); box-shadow: var(--shadow-card); }
.tc-flow-core small { color: var(--color-ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.tile.tile-lg { width: 64px; height: 64px; border-radius: 18px; }
.tile.tile-lg .icon { width: 30px; height: 30px; }
@keyframes tc-draw { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
.tc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: auto 0 0; padding: 0; list-style: none; }
.tc-stats li { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 14px; }
.tc-stats strong { font: 700 24px/1.2 var(--font-heading); letter-spacing: -.01em; color: var(--color-ink); }
.tc-stats span { color: var(--color-muted); font-size: 13px; line-height: 1.4; }
/* Сценарії: 4 картки з ілюстраціями (assets/js/tool-illustrations.js) */
.tc-use-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tc-use-grid li { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--color-border); border-radius: 18px; background: var(--color-surface); transition: border-color .18s, box-shadow .18s, transform .18s var(--ease); }
.tc-use-grid li:hover { border-color: #CFC9C0; box-shadow: var(--shadow-card); transform: translateY(-2px); }
.tc-use-art { display: block; padding: 14px 18px; border-bottom: 1px solid var(--color-border); background-color: var(--color-canvas); background-image: radial-gradient(var(--color-border) 1px, transparent 1px); background-size: 16px 16px; }
.tc-use-text { display: flex; gap: 10px; padding: 16px 18px 18px; color: var(--color-ink); font-size: 15px; line-height: 1.5; }
.tc-use-text .icon { flex: none; margin-top: 2px; color: var(--color-success); }
.tc-about-art { display: block; margin-top: auto; padding: 18px 24px; border-radius: 18px; background-color: var(--color-canvas); background-image: radial-gradient(var(--color-border) 1px, transparent 1px); background-size: 16px 16px; }
.tc-about-art .il { max-width: 260px; margin-inline: auto; }
@media (max-width: 1023px) { .tc-about-art { display: none; } }
.il { display: block; width: 100%; height: auto; aspect-ratio: 160 / 100; }
.il-s { fill: none; stroke: var(--color-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.il-sp { fill: none; stroke: var(--color-primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.il-l { fill: none; stroke: var(--color-border-strong); stroke-width: 2; stroke-linecap: round; opacity: .6; }
.il-dash { fill: none; stroke: var(--color-accent); stroke-width: 2; stroke-dasharray: 5 5; }
.il-sw { fill: none; stroke: #fff; stroke-width: 2; }
.il-w { fill: var(--color-surface); }
.il-pf { fill: var(--color-primary-soft); }
.il-p { fill: var(--color-primary); }
.il-af { fill: var(--color-accent-soft); }
.il-a { fill: var(--color-accent); }
.il-gf { fill: var(--color-success-soft); }
.il-g { fill: var(--color-success); }
/* Кроки: іконка етапу + номер, пунктирна шкала */
.tc-step-list { display: grid; grid-template-columns: repeat(var(--tc-step-count, 5), minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.tc-step-list li { position: relative; display: grid; align-content: start; gap: 16px; color: var(--color-muted); font-size: 15px; line-height: 1.55; }
.tc-step-ico { position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--color-primary-soft); color: var(--color-primary); box-shadow: 0 0 0 6px var(--color-surface); }
.tc-step-ico .icon { width: 26px; height: 26px; }
.tc-step-ico b { position: absolute; top: -8px; right: -8px; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border: 2px solid var(--color-surface); border-radius: 999px; background: var(--color-primary); color: #fff; font: 700 12px/1 var(--font-heading); }
.tc-step-list li:last-child .tc-step-ico { background: var(--color-success-soft); color: var(--color-success); }
.tc-step-list li:last-child .tc-step-ico b { background: var(--color-success); }
.tc-step-list li:not(:last-child)::after { content: ""; position: absolute; top: 28px; left: 74px; right: -14px; height: 2px; background: repeating-linear-gradient(90deg, var(--color-border-strong) 0 6px, transparent 6px 11px); opacity: .7; }
@media (prefers-reduced-motion: reduce) { .tc-flow-link { animation: none; } .tc-use-grid li:hover { transform: none; } }
/* Формати */
.tc-formats .spec-list > div { grid-template-columns: 180px minmax(0, 1fr); }
.tc-note { margin-top: auto; padding: 14px 16px; border-radius: 14px; background: var(--color-canvas); }
/* FAQ у картці */
.tc-faq .faq-item summary { font-size: 16px; }
.tc-faq .faq-item p { padding-right: 0; }
/* Інші інструменти */
.tc-related .related a { min-height: 64px; }
.related-arrow { width: 18px; height: 18px; margin-left: auto; color: var(--color-subtle); transition: transform .18s var(--ease), color .18s; }
.related a:hover .related-arrow { transform: translateX(3px); color: var(--color-primary); }
@media (max-width: 1023px) {
  .tc-intro, .tc-about, .tc-formats, .tc-faq { grid-column: 1 / -1; }
  .tc-use-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tc-step-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tc-step-list li { grid-template-columns: 56px minmax(0, 1fr); align-items: start; gap: 18px; padding: 0 0 24px; }
  .tc-step-list li:last-child { padding-bottom: 0; }
  .tc-step-text { padding-top: 14px; }
  .tc-step-list li:not(:last-child)::after { top: 64px; bottom: 6px; left: 27px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--color-border-strong) 0 6px, transparent 6px 11px); }
  .tc-related .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .tool-content { margin-top: 40px; gap: 12px; }
  .tc-card { gap: 16px; padding: 22px 18px; }
  .tc-head h2 { font-size: 21px; }
  .tc-intro .tc-lead { font-size: 17px; }
  .tc-formats .spec-list > div { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .tc-use-grid, .tc-related .related { grid-template-columns: minmax(0, 1fr); }
  .tc-use-grid li { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: stretch; }
  .tc-use-art { display: grid; place-items: center; padding: 10px; border-bottom: 0; border-right: 1px solid var(--color-border); }
  .tc-use-text { align-items: center; padding: 14px 16px; }
  .tc-use-text .icon { display: none; }
  .tc-flow { padding: 20px 12px; grid-template-columns: minmax(0, 1fr) 20px auto 20px minmax(0, 1fr); }
  .tc-flow-core { padding: 10px; }
  .tc-flow-core small { display: none; }
  .tc-chip { padding: 0 8px; font-size: 12px; }
  .tc-stats { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tc-stats li { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 12px 14px; }
  .tc-stats strong { font-size: 20px; }
}

/* 18. Сітка сторінок (split-pdf / rotate preview) --------------------------- */
.page-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 16px; }
.page-toolbar .count { font-weight: 600; }
.page-toolbar .actions { gap: 8px; }
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.page-card { position: relative; display: grid; gap: 8px; padding: 10px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); cursor: pointer; transition: border-color .18s, background-color .18s; }
.page-card:hover { border-color: var(--color-border-strong); }
.page-card:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-soft); box-shadow: inset 0 0 0 1px var(--color-primary); }
.page-card:has(input:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.page-card input { position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; accent-color: var(--color-primary); }
.page-paper { aspect-ratio: 210 / 297; border: 1px solid var(--color-border); border-radius: 6px; background: linear-gradient(#E7E4DF 3px, transparent 3px) 12% 14% / 76% 10px repeat-y, #fff; }
.page-card span { font-size: 13px; font-weight: 600; text-align: center; }
.rotate-preview { display: flex; align-items: center; gap: 20px; margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--color-canvas); }
.rotate-preview .page-paper { width: 72px; flex: none; transform: rotate(90deg); transition: transform .3s var(--ease); }

/* 19. Форми ---------------------------------------------------------------- */
.form-grid { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label, .label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 13px; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-control);
  background: var(--color-surface); color: var(--color-ink); font-size: 16px; transition: border-color .18s, box-shadow .18s;
}
.textarea { min-height: 160px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 44px; background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23525B65' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--color-muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(201, 96, 42, .28); }
.input[aria-invalid="true"] { border-color: var(--color-danger); }
.input[type="file"] { padding: 6px 14px; color: var(--color-muted); }
.input[type="file"]::file-selector-button, .input[type="file"]::-webkit-file-upload-button {
  height: 36px; margin-inline-end: 14px; padding: 0 16px;
  border: 1px solid var(--color-border); border-radius: calc(var(--radius-control) - 4px);
  background: var(--color-surface-raised); color: var(--color-ink);
  font: 600 14px/1.25 var(--font-ui); cursor: pointer; transition: border-color .18s, background-color .18s;
}
.input[type="file"]::file-selector-button:hover, .input[type="file"]::-webkit-file-upload-button:hover { background: var(--color-surface-soft); border-color: var(--color-border-strong); }
/* Кастомний випадаючий список для <select class="select"> (без JS лишається звичайним select; docpdf-ui.js). */
.select-ui { position: relative; }
.select-ui select { display: none; }
.select-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-control); background: var(--color-surface-raised);
  color: var(--color-ink); font: 400 16px/1.3 var(--font-ui); text-align: left; cursor: pointer; transition: border-color .18s, box-shadow .18s;
}
.select-btn:hover { border-color: var(--color-muted); }
.select-btn[aria-expanded="true"] { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(201, 96, 42, .28); }
.select-btn .icon { width: 18px; height: 18px; flex: none; color: var(--color-muted); transition: transform .18s var(--ease); }
.select-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.select-list {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60; display: grid; gap: 2px; margin: 0; padding: 6px;
  max-height: 260px; overflow-y: auto; list-style: none; border: 1px solid var(--color-border); border-radius: 16px;
  background: var(--color-surface); box-shadow: var(--shadow-floating); animation: lang-in .16s var(--ease);
}
.select-list[hidden] { display: none; }
.select-ui.is-up .select-list { top: auto; bottom: calc(100% + 8px); animation-name: lang-in-up; }
.select-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px;
  border-radius: 10px; color: var(--color-ink); font-size: 15px; font-weight: 500; cursor: pointer; transition: background-color .15s;
}
.select-list li:hover, .select-list li:focus-visible { background: var(--color-surface-soft); outline: none; }
.select-list li[aria-selected="true"] { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; }
.select-list li .icon { width: 16px; height: 16px; flex: none; opacity: 0; }
.select-list li[aria-selected="true"] .icon { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .select-list { animation: none; } }
.field-error { display: flex; align-items: center; gap: 6px; color: var(--color-danger); font-size: 13.5px; font-weight: 500; }
.field-error .icon { width: 16px; height: 16px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--color-primary); }
.divider { display: flex; align-items: center; gap: 14px; color: var(--color-subtle); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* 20. Тарифи --------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 1200px; margin-inline: auto; }
.plan { display: flex; flex-direction: column; gap: 24px; padding: 36px; border: 1px solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-surface); }
.plan.is-featured { border-color: var(--color-ink); box-shadow: var(--shadow-floating); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-head h2 { font-size: 24px; }
.plan-desc { color: var(--color-muted); font-size: 15px; line-height: 1.5; }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 999px; background: var(--color-surface-soft); color: var(--color-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.badge-primary { background: var(--color-primary-soft); color: var(--color-primary); }
.badge-dark { background: var(--color-ink); color: #fff; }
.badge-success { background: var(--color-success-soft); color: var(--color-success); }
.badge-danger { background: var(--color-danger-soft); color: var(--color-danger); }
.badge-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.plan-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.plan-value strong { font: 700 48px/1 var(--font-heading); letter-spacing: -.03em; }
.plan-value span { color: var(--color-muted); }
.plan-features { display: grid; gap: 12px; margin: 0; padding: 24px 0 0; border-top: 1px solid var(--color-border); list-style: none; }
.plan-features li { display: flex; gap: 12px; }
.plan-features .icon { margin-top: 2px; color: var(--color-success); }
.plan-features li.is-off { color: var(--color-muted); }
.plan-features li.is-off .icon { color: var(--color-subtle); }
.plan .btn { margin-top: auto; }
@media (max-width: 1023px) { .plans { grid-template-columns: minmax(0, 1fr); max-width: 560px; } }
@media (max-width: 767px) { .plans { grid-template-columns: minmax(0, 1fr); } .plan { padding: 24px; } .plan-value strong { font-size: 44px; } }

/* 21. Авторизація ---------------------------------------------------------- */
.auth { display: grid; place-items: start center; padding: 56px 0 0; }
.auth-card { width: 100%; max-width: 460px; padding: 40px; border: 1px solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-surface); box-shadow: var(--shadow-card); }
.auth-card h1 { margin-bottom: 8px; font-size: 30px; }
.auth-card .form-grid { margin-top: 28px; }
.auth-links { display: grid; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--color-border); font-size: 14px; }
.btn-google { gap: 12px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
@media (max-width: 599px) { .auth { padding-top: 24px; } .auth-card { padding: 24px 18px; } .auth-card h1 { font-size: 26px; } }

/* 22. Контакти / Про сервіс ------------------------------------------------ */
.two-col { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 64px; align-items: start; }
.two-col .page-head { padding-top: 0; }
.feature-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; gap: 16px; }
.feature-list strong { display: block; font: 700 17px/1.4 var(--font-heading); }
.feature-list p { color: var(--color-muted); }
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1023px) { .two-col { grid-template-columns: minmax(0, 1fr); gap: 32px; } .about-grid { grid-template-columns: minmax(0, 1fr); } }

/* 23. Кабінет -------------------------------------------------------------- */
.account { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 40px; }
.account-side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 16px; }
.identity { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--color-primary); color: #fff; font: 700 16px/1 var(--font-heading); }
.identity div strong { display: block; font-size: 15px; }
.identity div span { color: var(--color-subtle); font-size: 13px; overflow-wrap: anywhere; }
.side-nav { display: grid; gap: 2px; padding: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); }
.side-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--color-muted); font-size: 15px; font-weight: 500; text-decoration: none; }
.side-nav a:hover { background: var(--color-canvas); color: var(--color-ink); }
.side-nav a[aria-current="page"] { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; }
.account-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.account-main > h1, .account-head h1 { font-size: 32px; }
.account-head { display: grid; gap: 6px; margin-bottom: 4px; }
.side-nav ul { display: contents; list-style: none; }
.side-nav li { display: contents; }
.side-nav a .icon { width: 19px; height: 19px; }
.side-logout { justify-content: flex-start; color: var(--color-danger); }
.side-logout:hover { background: var(--color-danger-soft); color: var(--color-danger); }
.stat-label { display: inline-flex; align-items: center; gap: 8px; }
.stat-label .icon { width: 18px; height: 18px; color: var(--color-primary); }
.stat strong small { color: var(--color-subtle); font-size: 18px; font-weight: 700; }
.stat .text-link { margin-top: 4px; }
.pager .is-disabled { color: var(--color-subtle); background: var(--color-surface-soft); cursor: not-allowed; }
.name-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; margin-top: 20px; }
.form-saved { grid-column: 1 / -1; }
.form-saved[hidden] { display: none; }
/* Безпека: рядок налаштування (іконка, назва, стан) */
.setting-row { display: flex; align-items: center; gap: 16px; }
.setting-ico { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--color-primary-soft); color: var(--color-primary); }
.setting-ico .icon { width: 22px; height: 22px; }
.setting-ico-google { background: var(--color-surface); border: 1px solid var(--color-border); }
.setting-ico .google-mark { width: 22px; height: 22px; }
.setting-text { flex: 1; min-width: 0; }
.setting-text h2 { font-size: 19px; }
.setting-text p { margin-top: 2px; color: var(--color-muted); font-size: 15px; }
.setting-action, .setting-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--color-border); }
.setting-form { max-width: 560px; border-top: 0; padding-top: 4px; }
/* Інструменти: типові значення */
.pref-form { display: grid; margin-top: 16px; }
.pref-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 300px); gap: 16px; align-items: center; padding: 18px 0; border-top: 1px solid var(--color-border); }
.pref-text { display: grid; gap: 4px; }
.pref-text label { font-size: 15px; font-weight: 600; }
.pref-used { display: inline-flex; align-items: center; gap: 4px; width: fit-content; color: var(--color-muted); font-size: 13.5px; text-decoration: none; }
.pref-used:hover { color: var(--color-primary); text-decoration: underline; }
.pref-used .icon { width: 14px; height: 14px; }
.pref-control { display: grid; gap: 6px; }
.pref-control .hint { font-size: 13px; }
.pref-submit { display: grid; gap: 12px; justify-items: start; padding-top: 20px; border-top: 1px solid var(--color-border); }
/* Плани: використання + міні-картки */
.usage-big { display: flex; align-items: center; gap: 16px; }
.usage-big strong { font: 700 56px/1 var(--font-heading); letter-spacing: -.02em; color: var(--color-primary); }
.usage-big span { color: var(--color-muted); font-size: 15px; line-height: 1.45; }
.meter.meter-lg { height: 12px; margin-top: 20px; }
.usage-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 10px; color: var(--color-muted); font-size: 14px; }
.plan-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan-mini { display: grid; align-content: start; gap: 18px; padding: 24px; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); }
.plan-mini.is-featured { border-color: #CFC9C0; box-shadow: var(--shadow-card); }
.plan-mini .plan-head h2 { font-size: 20px; }
.plan-mini-value { color: var(--color-muted); font-size: 15px; }
.plan-mini-value strong { display: block; color: var(--color-ink); font: 700 30px/1.15 var(--font-heading); }
.plan-mini .plan-features { padding-top: 18px; font-size: 15px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { display: grid; align-content: start; gap: 6px; padding: 22px; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); }
.stat span { color: var(--color-muted); font-size: 14px; }
.stat strong { font: 700 28px/1.15 var(--font-heading); }
.meter { height: 8px; margin-top: 8px; border-radius: 999px; background: var(--color-surface-soft); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--color-primary); }
.card { padding: 28px; border: 1px solid var(--color-border); border-radius: var(--radius-panel); background: var(--color-surface); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.card-head h2 { font-size: 21px; }
.table-wrap { margin: 0 -28px; overflow-x: auto; }
.table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14.5px; }
.table th, .table td { padding: 14px 28px; text-align: left; border-top: 1px solid var(--color-border); vertical-align: middle; white-space: nowrap; }
.table thead th { border-top: 0; padding-top: 0; color: var(--color-subtle); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.table tbody th { font-weight: 600; }
.table tbody tr:hover { background: var(--color-canvas); }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.is-completed { color: var(--color-success); }
.status.is-processing { color: var(--color-primary); }
.status.is-failed { color: var(--color-danger); }
.status.is-muted { color: var(--color-subtle); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: 14px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1023px) {
  .account { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .account-side { position: static; }
  .side-nav { display: flex; overflow-x: auto; scrollbar-width: none; }
  .side-nav a { flex: none; }
}
@media (max-width: 767px) {
  .stat-grid, .form-row, .plan-mini-grid, .name-form { grid-template-columns: minmax(0, 1fr); }
  .pref-row { grid-template-columns: auto minmax(0, 1fr); }
  .pref-control { grid-column: 1 / -1; }
  .setting-row { flex-wrap: wrap; }
  .usage-big strong { font-size: 44px; }
  /* Мобільний кабінет: особа й «Вийти» — у меню користувача в шапці; розділи — сітка 2×2 без прокрутки */
  .account-side .identity, .account-side > form { display: none; }
  .side-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .side-nav a { min-width: 0; padding: 0 10px; font-size: 14px; }
  .card { padding: 20px 16px; }
  .table-wrap { margin: 0 -16px; }
  .table th, .table td { padding-inline: 16px; }
}

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

/* 99. Тема «Stone» (05.11.2026) ---------------------------------------------
   Тёплая монохромная основа по референсу: greige-фон, приподнятые светлые
   карточки с мягкой тенью и белой кромкой, чёрные пилюли-CTA, круглые
   иконки-кнопки, белые вложенные блоки. Токены — раздел 1, DESIGN.md §2. */

/* Кнопки — пилюли */
.btn { border-radius: var(--radius-pill); }
.btn-primary { box-shadow: 0 8px 20px rgba(29, 28, 26, .18); }
.btn-secondary { background: var(--color-surface-raised); border-color: transparent; box-shadow: var(--shadow-rest); }
.btn-secondary:hover { border-color: transparent; box-shadow: var(--shadow-card); }
.btn-light:hover { background: var(--color-surface-soft); }

/* Иконки-кнопки — круглые, без контура */
.icon-btn { border-radius: 50%; border-color: transparent; background: var(--color-surface-raised); box-shadow: var(--shadow-rest); }
.icon-btn:hover { border-color: transparent; box-shadow: var(--shadow-card); }

/* Пилюли шапки */
.lang-btn, .user-btn { border-radius: var(--radius-pill); }

/* Карточки: приподнятая поверхность вместо контура */
.svc, .tool-card, .catalog-group, .step, .info-card, .panel, .content-card, .tc-card,
.plan, .auth-card, .identity, .side-nav, .plan-mini, .stat, .card, .related a, .route-link, .tc-use-grid li {
  border-color: rgba(255, 255, 255, .75);
  box-shadow: var(--shadow-rest);
}
.tool-card:hover, .step:hover, .related a:hover, .route-link:hover, .tc-use-grid li:hover {
  border-color: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-card);
}
.plan-mini.is-featured { border-color: var(--color-ink); }

/* Вложенные блоки внутри карточек — белые (как заметка в референсе) */
.user-plan { background-color: var(--color-surface-raised); }

/* Поля ввода — светлые, мягкая граница, фокус терракотой */
.input, .select, .textarea { background-color: var(--color-surface-raised); border-radius: var(--radius-control); }

/* Плитки групп: «Робота з PDF» — графит на светлом */
.tile { border-radius: 16px; }

/* 30. Production bridge -------------------------------------------------------
   Зв'язує стилі прототипу з розміткою сайту, яку не можна змінити:
   - класи, що перевіряють тести (tool-card / tool-icon / home-catalog / home-faq-item / tool-widget);
   - елементи, які створюють або перемикають public/js/tool.js і split-pdf.js (лише hidden і textContent).
   Решта стилів — розділи 1–26 і 99, перенесені з прототипу без змін. */

/* Шрифти: локальні woff2 (OFL). Файли — public/fonts, див. integration/README.md. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/inter-cyrillic-latin-var.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/manrope-cyrillic-latin-800.woff2") format("woff2"); }

main { display: block; min-height: 50vh; }
main > .container:first-child { padding-bottom: clamp(28px, 4vw, 48px); }

/* Бейдж з іконкою */
.badge .icon { width: 14px; height: 14px; }

/* --- Рекомендовані: верхній ряд картки — .tool-icon (замість .tool-card-top) --- */
.tool-card > .tool-icon { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
@media (max-width: 599px) { .tool-card > .tool-icon { flex: none; } }

/* --- Каталог: <ul class="tool-list home-catalog"> + <a class="tool-card"><strong>… --- */
.home-catalog { margin: 0; padding: 0; list-style: none; }
.home-catalog .tool-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; height: auto;
  padding: 14px 16px; border: 0; border-radius: 14px; background: transparent; box-shadow: none; transform: none;
}
.home-catalog .tool-card:hover { background: var(--color-canvas); border-color: transparent; box-shadow: none; transform: none; }
.home-catalog .tool-card .tile { grid-column: 1; grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 12px; }
.home-catalog .tool-card .tile .icon { width: 19px; height: 19px; }
.home-catalog .tool-card strong { grid-column: 2; grid-row: 1; font-size: 15px; line-height: 1.4; }
.home-catalog .tool-card .desc { grid-column: 2; grid-row: 2; color: var(--color-muted); font-size: 13.5px; line-height: 1.5; }
.home-catalog .tool-card .catalog-arrow { grid-column: 3; grid-row: 1; width: 18px; height: 18px; margin-top: 2px; color: var(--color-subtle); transition: transform .18s var(--ease), color .18s; }
.home-catalog .tool-card:hover .catalog-arrow { color: var(--color-primary); transform: translateX(2px); }
/* Згортання: понад 4 пункти приховані, «Показати всі» додає is-expanded; без JS — noscript-стиль у header. */
.home-catalog:not(.is-expanded) > li:nth-child(n + 5) { display: none; }
.home-catalog.is-expanded > li:nth-child(n + 5) { animation: catalog-in .2s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .home-catalog > li { animation: none !important; } }

/* --- FAQ головної: .home-faq-item = .faq-item --- */
.home-faq-item { border-bottom: 1px solid var(--color-border); }
.home-faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; padding: 18px 0; cursor: pointer; list-style: none; font-weight: 600; font-size: 16.5px; }
.home-faq-item summary::-webkit-details-marker { display: none; }
.home-faq-item summary .icon { width: 20px; height: 20px; flex: none; color: var(--color-muted); transition: transform .2s var(--ease); }
.home-faq-item[open] summary .icon { transform: rotate(45deg); color: var(--color-primary); }
.home-faq-item summary:focus-visible { outline-offset: 0; }
.home-faq-item p { max-width: 64ch; padding: 0 44px 22px 0; color: var(--color-muted); }

/* --- Сторінка інструмента --- */
#selection.tool-widget { padding: 32px; border: 1px solid rgba(255, 255, 255, .75); border-radius: var(--radius-panel); background: var(--color-surface); box-shadow: var(--shadow-card); }
@media (max-width: 599px) { #selection.tool-widget { padding: 20px 16px; border-radius: 20px; } }
.tool-shell > #workflow { margin-top: 0; }
.drop-zone .file-input:focus-visible + label { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.field-error:empty, #form-error:empty { display: none; }
#form-error { color: var(--color-danger); font-size: 14px; font-weight: 600; }
.tool-param { margin-top: 16px; }

/* Список файлів — <li> створює tool.js: [img|canvas|span.file-thumbnail] span.file-name button×3 (текстові). */
#selected-files:empty { display: none; }
#selected-files > li {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 10px 10px 10px 14px;
  border: 1px solid rgba(255, 255, 255, .8); border-radius: 14px; background: var(--color-surface-raised); box-shadow: var(--shadow-rest);
}
#selected-files .file-thumbnail { width: 40px; height: 52px; flex: none; object-fit: cover; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; }
#selected-files .file-thumbnail-placeholder { display: grid; place-items: end start; padding: 0 0 6px; color: #fff; font-size: 9px; font-weight: 700; background: linear-gradient(var(--color-surface-soft) 2px, transparent 2px) 7px 12px / 24px 7px repeat-y, #fff; }
#selected-files .file-name { flex: 1 1 180px; min-width: 0; }
#selected-files button {
  min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--radius-pill); background: var(--color-surface-soft);
  color: var(--color-ink); font: 600 13.5px/1 var(--font-ui); cursor: pointer; transition: background-color .18s;
}
#selected-files button:hover:not(:disabled) { background: var(--color-primary-soft); }
#selected-files button:last-child { color: var(--color-danger); }
#selected-files button:last-child:hover { background: var(--color-danger-soft); }
#selected-files button:disabled { color: var(--color-subtle); background: transparent; cursor: not-allowed; }

/* Попередній перегляд обертання — <canvas> від tool.js */
.rotate-preview canvas { width: 96px; height: auto; flex: none; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; }

/* Split: рядок файлу видно лише після вибору */
.split-file { margin-top: 20px; }
.split-file:has(#file-info:empty) { display: none; }
.split-file #file-info { margin: 0; }
.pages-section { margin-top: 28px; }
.pages-section h2 { font-size: 20px; }
.pages-section > .hint { margin-top: 6px; }
#preview-status:empty { display: none; }
.page-card canvas { display: block; width: 100%; height: auto; aspect-ratio: 210 / 297; object-fit: contain; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; }
.ranges-fallback { margin-top: 20px; }
.text-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; padding: 0; border: 0; background: none; color: var(--color-primary); font: 600 15px/1.3 var(--font-ui); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.text-button .icon { width: 18px; height: 18px; }

/* --- Блок обробки: стан визначається з того, що показує tool.js --- */
.workflow { display: grid; gap: 20px; }
#workflow .actions:not(:has(> :not([hidden]))) { display: none; }
#workflow .progress:has(#progress[hidden]) { display: none; }
#workflow progress { width: 100%; height: 10px; border: 0; border-radius: 999px; background: var(--color-surface-soft); overflow: hidden; appearance: none; -webkit-appearance: none; }
#workflow progress::-webkit-progress-bar { background: var(--color-surface-soft); border-radius: 999px; }
#workflow progress::-webkit-progress-value { background: var(--color-primary); border-radius: 999px; transition: width .4s var(--ease); }
#workflow progress::-moz-progress-bar { background: var(--color-primary); border-radius: 999px; }
#workflow #start-over { margin: 0; }
.status-icon > .icon { display: none; }
/* За замовчуванням (передавання / обробка) — спінер */
#workflow .status-icon .si-busy { display: block; animation: spin 1.4s linear infinite; }
/* Готово */
#workflow:has(#result:not([hidden])) .status-icon { background: var(--color-success-soft); color: var(--color-success); }
#workflow:has(#result:not([hidden])) .status-icon .si-busy { display: none; }
#workflow:has(#result:not([hidden])) .status-icon .si-success { display: block; }
/* Можна безпечно повторити */
#workflow:has(#retry:not([hidden])) .status-icon { background: var(--color-danger-soft); color: var(--color-danger); }
#workflow:has(#retry:not([hidden])) .status-icon .si-busy { display: none; }
#workflow:has(#retry:not([hidden])) .status-icon .si-error { display: block; }
/* Інші фінальні стани (помилка без повтору, скасовано, строк минув) — нейтрально */
#workflow:has(#start-over:not([hidden])):not(:has(#result:not([hidden]))):not(:has(#retry:not([hidden]))) .status-icon { background: var(--color-surface-soft); color: var(--color-muted); }
#workflow:has(#start-over:not([hidden])):not(:has(#result:not([hidden]))):not(:has(#retry:not([hidden]))) .status-icon .si-busy { display: none; }
#workflow:has(#start-over:not([hidden])):not(:has(#result:not([hidden]))):not(:has(#retry:not([hidden]))) .status-icon .si-ended { display: block; }
/* Якщо tool.js колись виставлятиме data-status — точніші кольори (необов'язково, див. README) */
#workflow[data-status="failed"] .status-icon { background: var(--color-danger-soft); color: var(--color-danger); }
@media (prefers-reduced-motion: reduce) { #workflow .status-icon .si-busy { animation-duration: 3s; } }
#result-expiry:empty { display: none; }

/* Підказка «Як це працює»: міні-інфографіка кроків (окремі класи від .tc-step-list, щоб не ділити специфічність/медіа-запити) */
.tool-aside { margin-top: 24px; }
.tool-aside h2 { font-size: 20px; margin-bottom: 12px; }
.how-steps { counter-reset: how-step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 28px 0 0; padding: 0; list-style: none; }
.how-step { position: relative; display: grid; justify-items: center; justify-content: center; align-content: start; gap: 16px; color: var(--color-ink); font-size: 15px; line-height: 1.5; text-align: center; }
.how-step-text { max-width: 180px; }
.how-step-ico { counter-increment: how-step; position: relative; z-index: 1; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--color-primary-soft); color: var(--color-primary); box-shadow: 0 0 0 5px var(--color-surface); transition: transform .2s var(--ease); }
.how-step-ico .icon { width: 24px; height: 24px; }
.how-step-ico::after { content: counter(how-step); position: absolute; top: -7px; right: -7px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border: 2px solid var(--color-surface); border-radius: 999px; background: var(--color-primary); color: #fff; font: 700 12px/1 var(--font-heading); }
.how-step:last-child .how-step-ico { background: var(--color-success-soft); color: var(--color-success); }
.how-step:last-child .how-step-ico::after { background: var(--color-success); }
.how-step:hover .how-step-ico { transform: translateY(-2px); }
.how-step:not(:last-child)::after {
  content: ""; position: absolute; top: 30px; left: 50%; width: calc(100% + 24px); height: 2px;
  background: repeating-linear-gradient(90deg, var(--color-border-strong) 0 6px, transparent 6px 11px);
  background-size: 22px 2px; opacity: .7; animation: how-flow-h 1s linear infinite;
}
@keyframes how-flow-h { to { background-position: 22px 0; } }
@keyframes how-flow-v { to { background-position: 0 22px; } }
@media (prefers-reduced-motion: reduce) { .how-step::after, .how-step-ico { animation: none !important; transition: none !important; } }
@media (max-width: 560px) {
  .how-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .how-step { grid-template-columns: 60px minmax(0, 1fr); justify-items: stretch; justify-content: stretch; align-items: start; gap: 16px; padding: 0 0 24px; text-align: left; }
  .how-step-text { max-width: none; }
  .how-step:last-child { padding-bottom: 0; }
  .how-step-text { padding-top: 14px; }
  .how-step:not(:last-child)::after {
    top: 64px; left: 29px; right: auto; bottom: 4px; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--color-border-strong) 0 6px, transparent 6px 11px);
    background-size: 2px 22px; animation-name: how-flow-v;
  }
}

/* Контент інструмента: таблиця форматів без <dt> (span-и замість dt/dd) */
.spec-list .spec-term { color: var(--color-subtle); font-size: 14px; }
.spec-list .spec-value { color: var(--color-ink); font-size: 15px; }

/* FAQ інструмента: <dl> → <div.faq-item> → <dt><button> + <dd>; акордеон — docpdf-ui.js */
.tool-faq { margin: 0; }
.tool-faq dt { margin: 0; }
.tool-faq .faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; min-height: 60px; padding: 16px 0;
  border: 0; background: none; color: var(--color-ink); font: 600 16px/1.45 var(--font-ui); text-align: left; cursor: pointer;
}
.tool-faq .faq-q .icon { width: 20px; height: 20px; flex: none; color: var(--color-muted); transition: transform .2s var(--ease); }
.tool-faq .faq-q[aria-expanded="true"] .icon { transform: rotate(45deg); color: var(--color-primary); }
.tool-faq .faq-q:focus-visible { outline-offset: 0; }
.tool-faq dd { max-width: 64ch; margin: 0; padding: 0 44px 20px 0; color: var(--color-muted); }
@media (max-width: 767px) { .tool-faq dd { padding-right: 0; } }

/* Контент інструмента: межі з конфігурації та загальний список */
.tc-limits { display: grid; gap: 4px; margin: 16px 0 0; padding: 0; list-style: none; color: var(--color-muted); font-size: 14px; }
.tc-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tc-list li { display: flex; gap: 10px; }
.tc-list .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--color-success); }

/* --- Тарифи: три пакети Гість / Користувач / Преміум --- */
.plans-current { max-width: 1200px; margin: 0 auto 24px; align-items: center; }
.prose.plans-info { max-width: 1200px; margin: 40px auto 0; padding: 0; border: none; background: none; box-shadow: none; }

/* --- Про сервіс / контакти: відступи, що в прототипі були inline --- */
.about-steps { padding-bottom: 0; }
.section.about-cta { padding-top: clamp(56px, 8vw, 96px); padding-bottom: 0; }
.contact-page { padding-top: 56px; }
.honeypot, .contact-trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Кабінет --- */
.pref-form { display: grid; gap: 16px; margin-top: 20px; }
.pref-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 16px; padding: 16px; border-radius: 16px; background: var(--color-surface-raised); }
@media (max-width: 599px) { .pref-row { grid-template-columns: auto minmax(0, 1fr); } .pref-row .text-link { grid-column: 2; } }
.balance-value { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 12px; }
.balance-value strong { font: 600 48px/1 var(--font-heading); letter-spacing: -.02em; }
.balance-value span { color: var(--color-muted); font-size: 18px; }
.meter-lg { height: 12px; }
.plan-balance { display: grid; gap: 8px; }
.plan-balance .card-head { margin-bottom: 0; }

/* --- Статичні сторінки (HTML з адмінки) --- */
.prose { max-width: 760px; margin: 56px auto 0; padding: 40px; border: 1px solid rgba(255, 255, 255, .75); border-radius: var(--radius-panel); background: var(--color-surface); box-shadow: var(--shadow-rest); }
.prose h1 { margin-bottom: 24px; }
.page-content.prose { overflow-wrap: anywhere; }
.prose h2 { margin: 32px 0 12px; font-size: 24px; }
.prose h3 { margin: 24px 0 8px; font-size: 19px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose img { height: auto; border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 8px 12px; border-bottom: 1px solid var(--color-border); text-align: left; }
@media (max-width: 599px) { .prose { padding: 24px 16px; margin-top: 32px; } }
