/* Персик: спокійна нейтральна палітра і один теплий акцент. Шрифт свій (без Google). */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/static/fonts/manrope-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/static/fonts/manrope-cyrillic-ext.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/static/fonts/manrope-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light dark;
  --bg: #fbfaf8; --surface: #ffffff; --surface-2: #f6f3ef; --ink: #1c1917; --muted: #6b645c;
  --line: #e8e3dc; --line-strong: #d6cfc5;
  --accent: #d4532a; --accent-ink: #ffffff; --accent-soft: #fdece4; --accent-line: #f5c9b6;
  --warn: #9a5b00; --warn-soft: #fdf3dc;
  --ok: #19794f; --ok-soft: #e4f4ec;
  --info: #7a736a;
  --shadow: 0 1px 2px rgb(28 25 23 / .05), 0 8px 24px -12px rgb(28 25 23 / .12);
  --radius: 14px; --ring: 0 0 0 3px rgb(212 83 42 / .35);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141210; --surface: #1c1a17; --surface-2: #232019; --ink: #f3efe9; --muted: #a39b90;
    --line: #2f2b25; --line-strong: #433d35;
    --accent: #ee7a4d; --accent-ink: #1a0f0a; --accent-soft: #2e1e17; --accent-line: #5a3626;
    --warn: #f0b24a; --warn-soft: #2b2312; --ok: #5fcf99; --ok-soft: #14271d; --info: #9b9387;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 28px -14px rgb(0 0 0 / .6);
    --ring: 0 0 0 3px rgb(238 122 77 / .45);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100dvh;
  display: flex; flex-direction: column; }
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, var(--accent-soft), transparent 70%); opacity: .8; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.wrap { width: min(880px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* верх */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 10px; }
.mark { width: 30px; height: 30px; filter: drop-shadow(0 4px 8px rgb(240 101 58 / .28)); }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line);
  background: var(--surface); border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.chip-btn svg { width: 15px; height: 15px; }
.chip-btn:hover { border-color: var(--line-strong); }
.chip-btn.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--ok-soft); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.seg button { border: 0; background: none; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }

/* hero */
main { flex: 1; padding-bottom: 40px; }
.hero { padding: 44px 0 20px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ok);
  background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); padding: 5px 12px; border-radius: 999px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); } 70%,100% { box-shadow: 0 0 0 8px transparent; } }
h1 { font-size: clamp(28px, 5.4vw, 44px); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; margin: 18px auto 12px; max-width: 18em; text-wrap: balance; }
.lead { color: var(--muted); max-width: 38em; margin-inline: auto; font-size: clamp(15px, 2.2vw, 17px); text-wrap: pretty; }

/* кроки */
.steps { display: flex; justify-content: center; gap: 6px; margin: 22px 0 18px; flex-wrap: wrap; }
.steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; color: var(--muted);
  font-size: 13px; font-weight: 700; border: 1px solid transparent; transition: all .25s; }
.steps .n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; }
.steps li.on { color: var(--ink); background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.steps li.on .n { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.steps li.done .n { background: var(--ok-soft); color: var(--ok); border-color: transparent; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* дропзона */
.drop { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 40px 20px; cursor: pointer;
  border: 2px dashed var(--line-strong); border-radius: 16px; background: var(--surface-2); transition: border-color .2s, background .2s, transform .2s; }
.drop:hover { border-color: var(--accent); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.005); }
.drop-ico { width: 46px; height: 46px; color: var(--accent); margin-bottom: 8px; transition: transform .25s; }
.drop:hover .drop-ico, .drop.over .drop-ico { transform: translateY(-3px); }
.drop-title { font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.drop-sub { color: var(--muted); }
.link { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.drop-hint { margin-top: 10px; font-size: 13px; color: var(--muted); max-width: 34em; }

/* список файлів */
.files { display: grid; gap: 8px; margin-top: 14px; }
.file { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); animation: rise .3s both; }
.file.bad { border-color: var(--accent-line); background: var(--accent-soft); }
.ext { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
  background: var(--surface-2); border: 1px solid var(--line); text-transform: uppercase; color: var(--muted); }
.ext[data-t="doc"] { color: #2b6cb0; } .ext[data-t="xls"] { color: #1f8a5b; } .ext[data-t="ppt"] { color: #c05621; }
.ext[data-t="pdf"] { color: #c53030; } .ext[data-t="img"] { color: #805ad5; } .ext[data-t="vid"] { color: #b7791f; }
.fname { font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }
.fmeta { font-size: 13px; color: var(--muted); }
.file.bad .fmeta { color: var(--accent); font-weight: 600; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }

/* кнопки */
.bar { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.bar.center { justify-content: center; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s; }
.btn svg { width: 18px; height: 18px; transition: transform .2s; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 16px -6px rgb(212 83 42 / .55); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:hover svg { transform: translateX(3px); }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.bar .primary { margin-left: auto; }

/* процес */
.busy { text-align: center; padding: 44px 20px; }
.spinner { width: 38px; height: 38px; margin: 0 auto 16px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.busy-title { font-weight: 800; font-size: 18px; }
.progress { height: 6px; width: min(320px, 80%); margin: 14px auto 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #f6a073); border-radius: 99px; transition: width .2s; }
.progress.indeterminate i { width: 40%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* підсумок */
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); text-align: center; animation: rise .45s both; outline: none; }
.summary.ok { border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }
.sum-title { font-size: clamp(22px, 4vw, 30px); letter-spacing: -.02em; font-weight: 800; line-height: 1.2; text-wrap: balance; }
.sum-sub { color: var(--muted); margin-top: 6px; }
.check { width: 54px; height: 54px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 12px; animation: pop .5s cubic-bezier(.2,1.4,.4,1) both; }
.check svg { width: 28px; height: 28px; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.stat { min-width: 120px; padding: 12px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.stat b { display: block; font-size: 26px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat.hot b { color: var(--accent); } .stat.good b { color: var(--ok); }

/* картки файлів */
.cards { display: grid; gap: 12px; margin-top: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
  animation: rise .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
.card-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: none; border: 0; text-align: left; cursor: pointer; }
.card-head[aria-disabled="true"] { cursor: default; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge.hot { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.badge.good { background: var(--ok-soft); color: var(--ok); }
.badge.err { background: var(--accent-soft); color: var(--accent); }
.chev { width: 18px; height: 18px; color: var(--muted); transition: transform .25s; }
.card.open .chev { transform: rotate(180deg); }
.card-body { display: none; padding: 2px 16px 16px; border-top: 1px solid var(--line); }
.card.open .card-body { display: block; animation: rise .3s both; }
.group { margin-top: 14px; }
.group h3 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.group h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.row { display: grid; grid-template-columns: 10px minmax(110px, 38%) 1fr; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 14.5px; border-bottom: 1px dashed color-mix(in srgb, var(--line) 70%, transparent); }
.row:last-child { border-bottom: 0; }
.lvl { width: 8px; height: 8px; border-radius: 50%; background: var(--info); align-self: center; }
.lvl.high { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } .lvl.medium { background: var(--warn); } .lvl.info { background: var(--line-strong); }
.rl { color: var(--muted); font-weight: 600; }
.rv { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.rv code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-weight: 500; }
.rv .x { color: var(--muted); font-weight: 500; }
.rv details { margin-top: 4px; font-weight: 500; }
.rv summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 700; }
.rv ul { margin: 6px 0 2px; padding-left: 14px; list-style: disc; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.rv li { overflow-wrap: anywhere; margin: 2px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.empty { padding: 18px 0 4px; color: var(--ok); font-weight: 700; }
.dl { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.dl svg { width: 16px; height: 16px; }
.dl:hover { filter: brightness(1.07); }
.ba { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ba b { font-variant-numeric: tabular-nums; }
.ba .arrow { color: var(--ok); }

/* опції */
.options { margin-top: 14px; }
.options h2 { font-size: 19px; letter-spacing: -.01em; margin-bottom: 12px; }
.choices { display: grid; gap: 10px; }
.choice { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice:has(input:focus-visible) { box-shadow: var(--ring); }
.choice input { appearance: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); margin: 2px 0 0; display: grid; place-content: center; background: var(--surface); }
.choice input::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .15s; }
.choice input:checked { border-color: var(--accent); } .choice input:checked::before { transform: scale(1); }
.choice-t { display: block; font-weight: 800; } .choice-d { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; animation: rise .3s both; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.field input { height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 500; transition: border-color .15s; width: 100%; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.field-err { grid-column: 1 / -1; color: var(--accent); font-size: 13.5px; font-weight: 600; margin-top: 2px; }

/* довіра */
.trust { margin-top: 36px; padding: 20px 22px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.trust h2 { font-size: 14px; letter-spacing: .02em; margin-bottom: 8px; }
.trust li { position: relative; padding-left: 22px; font-size: 14px; color: var(--muted); margin: 5px 0; }
.trust li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 9px; height: 5px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 0 28px; font-size: 13px; color: var(--muted); }

/* діалог */
dialog { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); padding: 22px; width: min(420px, calc(100% - 32px)); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .45); }
dialog::backdrop { background: rgb(20 16 12 / .45); backdrop-filter: blur(3px); }
dialog[open] { animation: rise .25s both; }
dialog h2 { font-size: 20px; margin-bottom: 6px; } dialog .field { margin-top: 14px; }

@media (max-width: 640px) {
  .hero { padding-top: 28px; }
  .fields { grid-template-columns: 1fr; }
  .row { grid-template-columns: 10px 1fr; } .row .rv { grid-column: 2; }
  .card-head { grid-template-columns: auto 1fr; } .card-head .badge, .card-head .dl, .card-head .ba { grid-column: 2; justify-self: start; }
  .card-head .chev { display: none; }
  .btn { flex: 1; } .bar .primary { margin-left: 0; }
  .top-in #accessLabel { display: none; }
  .drop { padding: 30px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
