/* Персик: нейтральна холодна палітра, акцент персиково-червоний лише на головних діях. Шрифти платформи свої
   (без сторонніх запитів): Geologica для тексту, Alumni Sans для заголовків (як на P12: великими, щільно). */
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/geologica-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: "Geologica"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/geologica-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/geologica-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alumni Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/alumni-sans-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: "Alumni Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/alumni-sans-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alumni Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/alumni-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geologica Fallback"; src: local("Arial"); ascent-override: 92%; descent-override: 24%; line-gap-override: 0%; size-adjust: 103%; }

:root {
  color-scheme: dark;
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #eff1f4; --ink: #14181f; --muted: #566170;
  --line: #e1e5ea; --line-strong: #c5ccd6;
  --accent: #b4341c; --accent-ink: #ffffff; --accent-soft: #fcece7; --accent-line: #f0c3b7;
  --warn: #8a5300; --warn-soft: #fbf1dc;
  --ok: #0f7a4a; --ok-soft: #e5f4ec;
  --info: #7b8594;
  --shadow: 0 1px 2px rgb(20 24 31 / .05);
  --radius: 12px; --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  --font: "Geologica", "Geologica Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
:root[data-theme="light"] { color-scheme: light; }
/* dark by default (theme.js); light only when the visitor chose it on the platform */
@supports (color: red) {
  :root:not([data-theme="light"]) {
    --bg: #0f1217; --surface: #171b22; --surface-2: #1e232c; --ink: #e9edf3; --muted: #a0aab8;
    --line: #272d37; --line-strong: #3a424f;
    --accent: #ff8c6b; --accent-ink: #1a0b06; --accent-soft: #2a1b17; --accent-line: #5b3328;
    --warn: #f0b24a; --warn-soft: #2a2312; --ok: #5fcf99; --ok-soft: #12271c; --info: #8791a1;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
  }
}

* { 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; }
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(920px, 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; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 10px; }
.mark { width: 28px; height: 28px; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.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-strong);
  background: var(--surface); border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.chip-btn:hover { border-color: var(--ink); }
.seg { display: inline-flex; padding: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.seg button { border: 0; background: none; height: 28px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* акаунт сайту */
.acct { background: var(--surface); border-bottom: 1px solid var(--line); }
.acct-in { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-top: 8px; padding-bottom: 8px; font-size: 13.5px; }
.acct-who { font-weight: 600; }
.acct-plan, .acct-left { color: var(--muted); }
.acct-left b { color: var(--ink); font-variant-numeric: tabular-nums; }
.acct-link { margin-left: auto; font-weight: 600; color: var(--accent); text-decoration: none; }
.acct-link:hover { text-decoration: underline; }

main { flex: 1; padding-bottom: 40px; }

/* шлюз: вхід / підписка */
.gate { max-width: 560px; margin: 56px auto 0; text-align: center; padding: 36px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.gate-mark { width: 48px; height: 48px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--ink); }
.gate-mark svg { width: 24px; height: 24px; }
.gate h1 { font-size: clamp(24px, 4.4vw, 32px); margin: 0 0 10px; }
.gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.gate-actions .btn { flex: 0 1 auto; }
.done-gate { margin: 18px auto 0; max-width: 520px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.done-gate p { margin: 0; }
.done-gate .gate-actions { margin-top: 12px; }

/* hero */
.hero { padding: 36px 0 12px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ok);
  background: var(--ok-soft); padding: 4px 12px; border-radius: 999px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
h1 { font-size: clamp(26px, 5vw, 40px); line-height: 1.15; letter-spacing: -.025em; font-weight: 700; margin: 16px auto 10px; max-width: 20em; text-wrap: balance; }
.lead { color: var(--muted); max-width: 40em; margin-inline: auto; font-size: clamp(15px, 2.2vw, 17px); text-wrap: pretty; }

/* кроки */
.steps { display: flex; justify-content: center; gap: 6px; margin: 18px 0 16px; flex-wrap: wrap; }
.steps li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600; border: 1px solid transparent; }
.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); }
.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: 16px; padding: 20px; box-shadow: var(--shadow); }

/* дропзона */
.drop { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 38px 20px; cursor: pointer;
  border: 2px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); }
.drop.over { background: var(--accent-soft); }
.drop-ico { width: 44px; height: 44px; color: var(--ink); margin-bottom: 8px; }
.drop-title { font-weight: 700; font-size: 18px; }
.drop-sub { color: var(--muted); }
.link { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.drop-hint { margin-top: 10px; font-size: 13px; color: var(--muted); max-width: 36em; }

/* список файлів */
.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: 10px; background: var(--surface); }
.file.bad { border-color: var(--accent-line); background: var(--accent-soft); }
.ext { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; font-size: 10.5px; font-weight: 700; 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: #b4501c; }
.ext[data-t="pdf"] { color: #c53030; } .ext[data-t="img"] { color: #6b4fbb; } .ext[data-t="vid"] { color: #9a6700; }
:root:not([data-theme="light"]) .ext[data-t="doc"] { color: #7db3f0; }
:root:not([data-theme="light"]) .ext[data-t="xls"] { color: #5fcf99; }
:root:not([data-theme="light"]) .ext[data-t="ppt"] { color: #f0a070; }
:root:not([data-theme="light"]) .ext[data-t="pdf"] { color: #f08a8a; }
:root:not([data-theme="light"]) .ext[data-t="img"] { color: #b9a0f0; }
:root:not([data-theme="light"]) .ext[data-t="vid"] { color: #f0c060; }
.fname { font-weight: 600; 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); flex: none; }
.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; }
.bar.center .primary { margin-left: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.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; }
.bar .primary { margin-left: auto; }

/* процес */
.busy { text-align: center; padding: 44px 20px; }
.spinner { width: 36px; height: 36px; 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: 700; 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: var(--accent); 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: 16px; padding: 22px; text-align: center; outline: none; }
.summary.ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.sum-title { font-size: clamp(21px, 4vw, 28px); letter-spacing: -.02em; font-weight: 700; line-height: 1.2; text-wrap: balance; }
.sum-sub { color: var(--muted); margin-top: 6px; }
.check { width: 50px; height: 50px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 12px; }
.check svg { width: 26px; height: 26px; }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.stat { min-width: 112px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.stat b { display: block; font-size: 24px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat.hot b { color: var(--accent); } .stat.good b { color: var(--ok); }

/* масові дії */
.bulk { margin-top: 14px; display: grid; gap: 12px; }
.bulk h3 { font-size: 15px; font-weight: 700; }
.bulk-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.bulk-set { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }

/* картки файлів */
.cards { display: grid; gap: 12px; margin-top: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card-head { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; background: none; border: 0; text-align: left; cursor: pointer; }
.card-head[aria-disabled="true"], .card-head.static { cursor: default; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge.hot { background: var(--accent-soft); color: var(--accent); }
.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 .2s; }
.card.open .chev { transform: rotate(180deg); }
.card-body { display: none; padding: 0 16px 16px; border-top: 1px solid var(--line); }
.card.open .card-body, .card-body.show { display: block; }
.toolbar { margin-top: 12px; }
.search { width: 100%; }
.group { margin-top: 16px; }
.group h3 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.group h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* рядок поля */
.frow { display: grid; grid-template-columns: 10px minmax(120px, 28%) minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.frow:last-child { border-bottom: 0; }
.frow.changed { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); margin-inline: -16px; padding-inline: 16px; }
/* a value marked for removal: dimmed and tagged «буде прибрано», not struck — it is a decision, the data is still there */
.frow.removing .fv { color: var(--muted); }
.frow.removing .fv[data-will]:not([data-will=""])::after { content: attr(data-will); display: inline-block; margin-left: 10px;
  padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; text-decoration: none;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); vertical-align: 1px; }
.frow.plain { grid-template-columns: 10px minmax(120px, 34%) minmax(0, 1fr); }
.lvl { width: 8px; height: 8px; border-radius: 50%; background: var(--info); }
.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); }
.fl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.fl-t { color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.tag { font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; }
.tag.soft { color: var(--muted); background: var(--surface-2); }
.fv { font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.fv .x { color: var(--muted); font-weight: 400; }
.fv details { margin-top: 4px; }
.fv summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; }
.fv ul { margin: 6px 0 2px; padding-left: 14px; list-style: disc; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.fv li { overflow-wrap: anywhere; margin: 2px 0; }
.fctl { display: flex; align-items: center; gap: 6px; justify-self: end; flex-wrap: wrap; justify-content: flex-end; }
.viewonly { font-size: 12.5px; color: var(--muted); }
.linkbtn { border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; text-decoration: underline; text-underline-offset: 3px; border-radius: 6px; }

/* перемикач дії: нативні radio, видимі як сегменти */
.segctl { position: relative; display: inline-flex; padding: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; }
.segctl input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.segctl label { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; }
.segctl label:hover { color: var(--ink); }
.segctl input:checked + label { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong); }
.segctl input[value="remove"]:checked + label { color: var(--accent); box-shadow: 0 0 0 1px var(--accent-line); background: var(--accent-soft); }
.segctl input:focus-visible + label { box-shadow: var(--ring); }

/* редактор значення */
.fedit { grid-column: 2 / -1; display: grid; gap: 4px; }
.fin-row { display: flex; align-items: center; gap: 8px; }
.fin { height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 15px; width: 100%; min-width: 0; }
.fin:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.fedit.bad .fin { border-color: var(--accent); }
.unit { color: var(--muted); font-size: 13px; }
.fhint { font-size: 12.5px; color: var(--muted); }
.ferr, .field-err { color: var(--accent); font-size: 13.5px; font-weight: 600; }
.ferr-list { margin: 6px 0 0; padding-left: 18px; list-style: disc; color: var(--accent); font-size: 13.5px; }
.nomatch { padding: 14px 0 0; }
.empty { padding: 16px 0 4px; color: var(--ok); font-weight: 600; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field input { height: 42px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 400; width: 100%; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.field-err.bad, .plan-line.bad { color: var(--accent); }

/* додати власну властивість */
.addbox { margin-top: 16px; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 10px 12px; }
.addbox summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.add-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; margin-top: 10px; }
.adds { margin-top: 8px; display: grid; gap: 4px; }
.adds li { display: grid; grid-template-columns: minmax(80px, 28%) 1fr auto; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; }

/* панель дій */
.actionbar { position: sticky; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; padding: 12px 16px;
  background: color-mix(in srgb, var(--surface) 96%, transparent); border: 1px solid var(--line-strong); border-radius: 14px; backdrop-filter: blur(8px); }
.plan-line { font-size: 14px; font-weight: 600; color: var(--muted); }
.actionbar-btns { display: flex; gap: 8px; margin-left: auto; }

/* було / стало */
.diff-t { font-size: 14px; font-weight: 700; margin: 14px 0 6px; }
.diff { display: grid; gap: 2px; }
.drow { display: grid; grid-template-columns: 84px minmax(100px, 24%) minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.drow:last-child { border-bottom: 0; }
.dstate { font-size: 12px; font-weight: 700; color: var(--muted); }
.drow.removed .dstate { color: var(--accent); } .drow.changed .dstate { color: var(--warn); } .drow.added .dstate { color: var(--ok); }
.dl-t { color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
/* «було» in the result: plain and dimmed — a strike read as «still in the file» */
.dbefore { color: var(--muted); overflow-wrap: anywhere; }
.drow.removed .dafter { color: var(--muted); font-style: italic; }
.dafter { font-weight: 600; overflow-wrap: anywhere; }
.darrow { color: var(--ok); }
details.left { margin-top: 14px; }
details.left summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.dl { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.dl svg { width: 16px; height: 16px; }
.dl:hover { filter: brightness(1.08); }
.ba { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ba b { font-variant-numeric: tabular-nums; }
.ba .arrow { color: var(--ok); }

/* довіра */
.trust { margin-top: 32px; padding: 18px 20px; border-radius: 14px; background: var(--surface); 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); }

@media (max-width: 720px) {
  .hero { padding-top: 24px; }
  .gate { margin-top: 24px; padding: 28px 18px; }
  .bulk-set { grid-template-columns: 1fr; }
  .bulk-set .btn { width: 100%; }
  /* поля складаються стовпчиком: назва, значення, дія */
  .frow, .frow.plain { grid-template-columns: 10px 1fr; }
  .frow > .fv, .frow > .fctl, .frow > .fedit { grid-column: 2; }
  .fctl { justify-self: stretch; justify-content: flex-start; }
  .segctl { width: 100%; } .segctl label { flex: 1; justify-content: center; padding: 0 6px; }
  .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; }
  .drow { grid-template-columns: 1fr; gap: 2px; } .darrow { display: none; }
  .add-row { grid-template-columns: 1fr; }
  .actionbar { flex-direction: column; align-items: stretch; }
  .actionbar-btns { margin-left: 0; } .actionbar-btns .btn { flex: 1; }
  .btn { flex: 1; } .bar .primary { margin-left: 0; }
  .drop { padding: 28px 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; }
}

/* режим: окремі файли / пакет документів */
.modes { display: flex; width: 100%; margin-bottom: 14px; }
.modes button { flex: 1; height: 38px; font-size: 14px; }
.pkg-drop { cursor: default; gap: 6px; }
.pkg-pick-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.picked { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.picked-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upgrade { display: grid; justify-items: start; gap: 8px; padding: 18px; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--accent-soft); }
.upgrade h3 { font-size: 16px; font-weight: 700; }
.upgrade p { color: var(--muted); }

/* прогрес по файлах пакета */
.pkg-prog { list-style: none; margin: 14px auto 0; padding: 0; width: min(560px, 100%); max-height: 220px; overflow-y: auto; text-align: left;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.pkg-prog li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; font-size: 13px; border-bottom: 1px solid var(--line); }
.pkg-prog li:last-child { border-bottom: 0; }
.pkg-prog .pn { overflow-wrap: anywhere; }
.pkg-prog .ps { flex: none; color: var(--ok); font-weight: 600; }
.pkg-prog li.off .ps { color: var(--muted); }
#cancelBtn { margin-top: 14px; }

/* сводка и решение по пакету */
.pkg-sum { margin-top: 14px; display: grid; gap: 12px; }
.pkg-sum h3 { font-size: 15px; font-weight: 700; }
.pkg-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pkg-list h4 { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.pkg-list li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 14px; overflow-wrap: anywhere; }
.pkg-skipped summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.pkg-skipped ul { margin-top: 8px; max-height: 180px; overflow-y: auto; font-size: 13px; }
.pkg-skipped li { padding: 2px 0; overflow-wrap: anywhere; }
.decision { margin: 14px 0 0; min-width: 0; display: grid; gap: 4px; }
.decision legend { padding: 0 6px; font-size: 15px; font-weight: 700; }
.dec-opt { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; }
.dec-opt input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.dec-opt label { display: grid; gap: 2px; cursor: pointer; }
.dec-opt input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.dec-fields { margin: 4px 0 6px 32px; grid-template-columns: 1fr 1fr; }

/* панель дій не закриває вміст: нижній відступ = її висота (див. trackBarHeight в app.js) */
html { scroll-padding-top: 72px; scroll-padding-bottom: calc(var(--bar-h, 0px) + 16px); }
#viewReport { padding-bottom: var(--bar-h, 0px); }
.actionbar { bottom: env(safe-area-inset-bottom, 0px); }

@media (max-width: 720px) {
  .pkg-lists { grid-template-columns: 1fr; }
  .dec-fields { grid-template-columns: 1fr; margin-left: 0; }
  .pkg-pick-btns .btn { flex: 1 1 100%; }
}

h1, h2, .brand-name { font-family: "Alumni Sans", "Geologica", "Geologica Fallback", system-ui, sans-serif; text-transform: uppercase; font-weight: 800; letter-spacing: -0.005em; }
h1 { font-size: clamp(40px, 7.2vw, 76px); line-height: .92; }
.gate h1 { font-size: clamp(34px, 6vw, 52px); line-height: .95; }
.brand-name { font-size: 26px; line-height: 1; text-transform: none; } /* the name is written PerSeek, never in capitals */
/* small h2 (trust eyebrow) stays in the text face: the condensed display face is for big titles only */
.trust h2 { font-family: "Geologica", "Geologica Fallback", system-ui, sans-serif; font-weight: 700; letter-spacing: .06em; }
.sum-title { font-size: clamp(30px, 4.4vw, 42px); line-height: .95; }

/* ---- перший візит: менше шуму, головне першим ---- */
.chip-btn { white-space: nowrap; }
.chip-btn .short { display: none; }
/* заголовок сторінки потрібен лише на першому кроці; на звіті й результаті людина одразу бачить знайдене */
#appFlow[data-view="report"] .hero, #appFlow[data-view="done"] .hero, #appFlow[data-view="busy"] .hero { display: none; }
#appFlow[data-view="report"] .steps, #appFlow[data-view="done"] .steps, #appFlow[data-view="busy"] .steps { margin-top: 16px; }
.free-note { margin: 12px 0 0; padding: 10px 14px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--accent-soft); font-size: 14px; }
.plan-wrap { display: grid; gap: 2px; min-width: 0; }
.free-bar { font-size: 12.5px; color: var(--muted); }
.legend { font-size: 13.5px; color: var(--muted); }
.legend b { color: var(--ink); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.bulk-btns .btn { white-space: nowrap; }
.tech .diff { margin-top: 8px; }
.bulk-people summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.bulk-people[open] summary { margin-bottom: 10px; }
.bulk-people .muted.small { margin-top: 8px; }
.tech { margin-top: 18px; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 10px 12px; }
.tech > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.tech-t { font-weight: 700; font-size: 14px; }
.tech-s { font-size: 13px; color: var(--muted); }
.tech .group:first-child { margin-top: 8px; }

@media (max-width: 480px) {
  .chip-btn { padding: 0 9px; font-size: 12.5px; }
  .chip-btn .long { display: none; }
  .chip-btn .short { display: inline; }
  .seg button { padding: 0 8px; }
  .brand-name { font-size: 22px; }
  .top-actions { gap: 6px; }
  .hero { padding-top: 16px; }
  .steps { gap: 4px; flex-wrap: nowrap; }
  .steps li { padding: 4px 8px 4px 4px; font-size: 12px; gap: 6px; }
  .steps .n { width: 20px; height: 20px; font-size: 11px; }
  .legend { display: grid; gap: 2px; }
  .bulk-btns .btn { flex: 1 1 auto; padding-inline: 10px; }
  .free-bar { font-size: 12px; }
}

/* видалити назавжди (shred.js): усе в браузері */
#appFlow[data-mode="shred"] .steps { display: none; }
.modes button { height: auto; min-height: 38px; padding-block: 6px; line-height: 1.2; }
.shred-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.shred-honest { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--warn);
  border-radius: 10px; background: var(--warn-soft); font-size: 14px; }
.shred-honest .link { margin-left: 4px; }
.shred-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.shred-head + .muted { margin-top: 6px; }
.shred-list { max-height: 420px; overflow: auto; padding-right: 2px; }
.shred-file { grid-template-columns: auto 1fr; padding: 0; }
.shred-file input { width: 18px; height: 18px; margin: 0 0 0 12px; accent-color: var(--accent); }
.shred-file label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; padding: 10px 12px 10px 0; cursor: pointer; min-width: 0; }
.shred-file input:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
.shred-confirm { margin-top: 16px; padding: 16px; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--accent-soft); }
.shred-confirm h3 { font-size: 17px; font-weight: 700; outline: none; }
.shred-confirm p { margin-top: 6px; color: var(--muted); }
.shred-names { display: grid; gap: 4px; margin-top: 10px; max-height: 240px; overflow: auto; font-size: 14px; }
.shred-names li { overflow-wrap: anywhere; }
.shred-names li.bad { color: var(--accent); font-weight: 600; }
.shred-busy, .shred-done { margin-top: 16px; }
.shred-picker-note { margin-top: 12px; }
.shred-file .fname { overflow-wrap: anywhere; }
.shred-skipped { margin-top: 12px; }
.shred-skipped li { color: var(--muted); }
.shred-busy p { overflow-wrap: anywhere; margin-bottom: 8px; }
.shred-done .fname { color: var(--ok); }
#shredPane .btn { height: auto; min-height: 44px; padding-block: 8px; text-align: center; line-height: 1.25; }
#shredPane .btn.sm { min-height: 36px; padding-block: 6px; }
@media (max-width: 480px) {
  #shredPane .bar { flex-direction: column; align-items: stretch; }
  #shredPane .bar .btn { width: 100%; }
}
