/* inv.dan.org.ua — mobile-first */
:root {
  --bg: #f5f3ee; --surface: #ffffff; --surface-2: #faf9f6; --ink: #1b1f1c; --ink-2: #3d4440; --muted: #6f7772;
  --line: #e7e3da; --line-2: #efece5;
  --accent: #2b6a4c; --accent-hover: #245a40; --accent-ink: #ffffff; --accent-soft: #e4efe8; --accent-soft-ink: #1f5139;
  --amber: #8a5a00; --amber-soft: #fbefd5; --red: #b0412f; --red-soft: #f9e3de; --blue-soft: #e5edf6; --blue: #2d5a8a;
  --shadow: 0 1px 2px rgba(30, 28, 20, .04), 0 2px 8px rgba(30, 28, 20, .05);
  --shadow-lg: 0 10px 40px rgba(20, 24, 22, .18);
  --r: 16px; --r-sm: 11px; --nav-h: 64px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121513; --surface: #1b1f1d; --surface-2: #171a18; --ink: #ecefec; --ink-2: #c9cfcb; --muted: #959d98;
    --line: #2b312e; --line-2: #242a27;
    --accent: #6cc095; --accent-hover: #82cca5; --accent-ink: #0d1711; --accent-soft: #1f3329; --accent-soft-ink: #a6dcbf;
    --amber: #e8b75a; --amber-soft: #352b16; --red: #ec8673; --red-soft: #3a221d; --blue-soft: #1d2a38; --blue: #9cc0e8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 20px);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1 { font-size: 1.6rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 750; margin: 0; }
h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; margin: 26px 4px 10px; }
h3 { font-size: 1.02rem; font-weight: 650; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 12px; }
small, .muted { color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; letter-spacing: .03em; }
[hidden] { display: none !important; }

/* іконки */
.i { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9;
     stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.i.sm { width: 1em; height: 1em; vertical-align: -.15em; }
.i.lg { width: 1.6em; height: 1.6em; }

/* шапка */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 750; font-size: 1.08rem; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.logo { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.logo svg { width: 20px; height: 20px; }
.spacer { flex: 1; }
.pill-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px 0 12px; border-radius: 999px;
            background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: .95rem; }
.pill-btn:hover { color: var(--accent-ink); background: var(--accent-hover); }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); color: var(--accent-soft-ink);
          display: inline-grid; place-items: center; font-weight: 700; flex: none; }

main { max-width: 720px; margin: 0 auto; padding: 6px 16px 16px; }

/* режим */
.modebar { margin: 8px 16px 0; max-width: 688px; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px;
           border-radius: var(--r); background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
@media (min-width: 720px) { .modebar { margin: 8px auto 0; } }
.modebar .i { width: 22px; height: 22px; }
.modebar .txt { flex: 1; min-width: 0; line-height: 1.25; }
.modebar .txt b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modebar .txt small { color: inherit; opacity: .8; }
.modebar form { margin: 0; }
.modebar button { background: rgba(255,255,255,.18); color: inherit; min-height: 36px; padding: 0 14px; border-radius: 999px; }
@media (prefers-color-scheme: dark) { .modebar button { background: rgba(0,0,0,.15); } }

/* сповіщення */
.flash { display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 14px; margin: 10px 0; border-radius: var(--r-sm);
         background: var(--accent-soft); color: var(--accent-soft-ink); font-weight: 500; }
.flash.error { background: var(--red-soft); color: var(--red); }
.flash.warn { background: var(--amber-soft); color: var(--amber); }
.flash .grow { flex: 1; }
.flash form { margin: 0; }
.flash button { min-height: 32px; padding: 0 12px; background: var(--surface); color: inherit; font-size: .9rem; }

/* нижня навігація */
.bottomnav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; justify-content: center;
             background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
             border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); }
.bottomnav a { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 3px;
               color: var(--muted); font-size: .72rem; font-weight: 550; padding: 2px 0; }
.bottomnav a .ic { width: 56px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background .15s; }
.bottomnav a .i { width: 22px; height: 22px; }
.bottomnav a.active { color: var(--ink); }
.bottomnav a.active .ic { background: var(--accent-soft); color: var(--accent-soft-ink); }
@media (min-width: 900px) {
  body { padding-bottom: 32px; }
  .bottomnav { position: sticky; top: 58px; bottom: auto; border: 0; background: transparent; backdrop-filter: none; padding-top: 0; gap: 4px; }
  .bottomnav a { flex: 0 0 auto; max-width: none; flex-direction: row; gap: 0; font-size: .92rem; }
  .bottomnav a .ic { width: auto; padding: 0 14px 0 12px; height: 38px; gap: 8px; display: flex; align-items: center; }
  .bottomnav a .ic .i { width: 19px; height: 19px; }
}

/* заголовок сторінки */
.page-head { display: flex; align-items: flex-end; gap: 12px; margin: 14px 0 16px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 0; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: .95rem; }
.page-head .actions { display: flex; gap: 8px; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); margin-top: 12px; }
.crumbs a { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: .5; }

/* поверхні */
.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.panel { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; }
.panel > .item + .item, .panel > form > .item + .item { border-top: 1px solid var(--line-2); }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; color: var(--ink); }
a.item:hover { background: var(--surface-2); color: var(--ink); }
.item .body { flex: 1; min-width: 0; }
.item .title { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta { color: var(--muted); font-size: .88rem; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.item .meta span { display: inline-flex; align-items: center; gap: 4px; }
.item .chev { color: var(--muted); opacity: .6; }
.item .check-cell input { width: 21px; height: 21px; margin: 0; accent-color: var(--accent); }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty .i { width: 40px; height: 40px; stroke-width: 1.5; opacity: .5; margin-bottom: 8px; }

/* лічильник */
.count { min-width: 46px; height: 46px; padding: 0 6px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-soft-ink);
         display: grid; place-items: center; font-weight: 750; font-size: 1.2rem; font-variant-numeric: tabular-nums; flex: none; }
.count.zero { background: var(--line-2); color: var(--muted); }
.count.sm { min-width: 36px; height: 36px; font-size: 1rem; border-radius: 10px; }
.count.xl { min-width: 64px; height: 64px; font-size: 1.8rem; border-radius: 18px; }

/* чипи */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .84rem; font-weight: 550;
        background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
a.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip b { font-weight: 700; color: var(--ink); }
.chip.ok { background: var(--accent-soft); border-color: transparent; color: var(--accent-soft-ink); }
.chip.warn { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.chip.danger { background: var(--red-soft); border-color: transparent; color: var(--red); }
.chip.gray { background: var(--line-2); border-color: transparent; color: var(--muted); }
.chip .i { width: 14px; height: 14px; }

/* форми */
label { display: block; font-size: .85rem; font-weight: 550; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 13px; min-height: 48px; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
         background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field { margin-bottom: 14px; }
.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 14px; }
.fields > div { min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: .98rem; font-weight: 500; color: var(--ink); margin: 0 0 14px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.hint { font-size: .86rem; color: var(--muted); margin: -6px 0 14px; }

/* кнопки */
button, .btn {
  font: inherit; font-weight: 600; border: 0; border-radius: var(--r-sm); min-height: 46px; padding: 0 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap;
  background: var(--accent-soft); color: var(--accent-soft-ink); transition: background .15s, transform .05s;
}
button:active, .btn:active { transform: scale(.98); }
.btn:hover { color: var(--accent-soft-ink); }
.primary { background: var(--accent) !important; color: var(--accent-ink) !important; }
.primary:hover { background: var(--accent-hover) !important; }
.ghost { background: transparent !important; color: var(--ink-2) !important; border: 1.5px solid var(--line) !important; }
.ghost:hover { border-color: var(--muted) !important; }
.danger { background: var(--red-soft) !important; color: var(--red) !important; }
.small { min-height: 36px !important; padding: 0 12px !important; font-size: .9rem; border-radius: 10px !important; }
.big { width: 100%; min-height: 60px; font-size: 1.15rem; border-radius: var(--r); }
.icon-btn { min-width: 46px; padding: 0 !important; }
.minus { min-width: 52px; height: 44px; min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
form.inline { display: inline; margin: 0; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > * { flex: 1; }

/* пошук */
.search { position: relative; margin-bottom: 14px; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 44px; background: var(--surface); border-color: var(--line-2); box-shadow: var(--shadow); }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: -4px 0 14px; }
.filters select { min-height: 42px; padding-top: 8px; padding-bottom: 8px; font-size: .93rem; background-color: var(--surface); }

/* розкривні */
details.fold { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 10px; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 600; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .chev-d { margin-left: auto; color: var(--muted); transition: transform .2s; }
details.fold[open] > summary .chev-d { transform: rotate(180deg); }
details.fold > summary .ico-box { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-soft-ink); display: grid; place-items: center; }
details.fold > .inner { padding: 0 16px 16px; }

/* герой картки (банка/техніка/місце) */
.hero-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--shadow); padding: 20px; margin: 14px 0 12px; }
.hero-card .kicker { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .88rem; font-weight: 550; margin-bottom: 6px; }
.hero-card .name { font-size: 1.9rem; font-weight: 780; letter-spacing: -.025em; line-height: 1.1; margin: 0; }
.hero-card .year { display: inline-block; margin-top: 8px; padding: 2px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 1.1rem; }
.hero-card .top { display: flex; gap: 16px; align-items: flex-start; }
.hero-card .top > div:first-child { flex: 1; min-width: 0; }
.facts { display: grid; gap: 2px; margin-top: 16px; }
.fact { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.fact .i { color: var(--muted); }
.fact .k { color: var(--muted); font-size: .9rem; min-width: 92px; }
.fact .v { flex: 1; min-width: 0; font-weight: 550; }
.qr-mini { width: 84px; height: 84px; background: #fff; padding: 5px; border-radius: 12px; border: 1px solid var(--line); flex: none; }
.qr-mini svg { width: 100%; height: 100%; display: block; }
.photo { width: 100%; border-radius: var(--r); display: block; margin-bottom: 12px; box-shadow: var(--shadow); }

/* велика дія */
.eat { width: 100%; min-height: 68px; font-size: 1.25rem; border-radius: 20px; gap: 10px; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.eat .i { width: 26px; height: 26px; stroke-width: 2.4; }

/* вибір типу нової мітки */
.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.kinds button { flex-direction: column; gap: 6px; min-height: 82px; background: var(--surface); color: var(--ink-2); border: 1.5px solid var(--line-2);
                border-radius: var(--r); font-size: .9rem; box-shadow: var(--shadow); }
.kinds button .i { width: 26px; height: 26px; }
.kinds button.on { border-color: var(--accent); color: var(--accent-soft-ink); background: var(--accent-soft); }

/* історія */
.timeline { list-style: none; margin: 0; padding: 4px 16px; }
.timeline li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.timeline li:first-child { border-top: 0; }
.timeline .dot { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); display: grid; place-items: center; flex: none; }
.timeline .dot .i { width: 16px; height: 16px; }
.timeline .dot.fill { background: var(--accent-soft); border-color: transparent; color: var(--accent-soft-ink); }
.timeline .dot.empty { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.timeline .what { flex: 1; min-width: 0; font-size: .94rem; }
.timeline .what b { font-weight: 600; }
.timeline .when { font-size: .82rem; color: var(--muted); margin-top: 2px; }

/* дерево місць */
.tree .item { padding-top: 11px; padding-bottom: 11px; }
.tree .indent { display: inline-block; flex: none; }
.node-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--muted); flex: none; }
.code-badge { font-family: ui-monospace, Menlo, monospace; font-size: .78rem; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); letter-spacing: .02em; }
.stat { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.stat .i { width: 15px; height: 15px; }

/* екран «готово» */
.done { text-align: center; padding: 34px 20px 26px; }
.done .badge { width: 76px; height: 76px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 16px; }
.done .badge .i { width: 40px; height: 40px; stroke-width: 2.4; }
.done h1 { font-size: 1.45rem; }
.done .detail { color: var(--muted); margin: 8px 0 4px; display: inline-flex; gap: 6px; align-items: center; }

/* сканер */
.scanner { position: relative; background: #000; border-radius: 22px; overflow: hidden; aspect-ratio: 3 / 4; max-height: 60vh; width: 100%; margin-top: 12px; box-shadow: var(--shadow); }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .frame { position: absolute; inset: 20%; border-radius: 22px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); pointer-events: none; }
.scanner .frame::before { content: ""; position: absolute; inset: 0; border-radius: 22px; border: 3px solid rgba(255,255,255,.9); }
.scan-status { text-align: center; color: var(--muted); margin: 12px 0; font-weight: 500; }
.scan-log { list-style: none; padding: 0; margin: 14px 0 0; }
.scan-log li { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--r-sm); margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line-2); }
.scan-log li.bound, .scan-log li.moved, .scan-log li.mode { background: var(--accent-soft); border-color: transparent; color: var(--accent-soft-ink); }
.scan-log li.error, .scan-log li.unknown { background: var(--red-soft); border-color: transparent; color: var(--red); }
.scan-log li a { color: inherit; font-weight: 600; }

/* модалка друку */
dialog.modal { border: 0; border-radius: 22px; padding: 0; width: min(560px, calc(100vw - 20px)); max-height: calc(100dvh - 20px);
               background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10, 14, 12, .5); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px 20px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h3 { flex: 1; font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.modal-body { padding: 4px 20px 8px; }
.modal-foot { padding: 14px 20px 18px; border-top: 1px solid var(--line-2); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--surface); }
.modal-foot .summary { flex: 1; font-weight: 600; min-width: 200px; font-size: .95rem; }
.seg { display: flex; padding: 4px; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; }
.seg button { flex: 1; min-height: 40px; background: transparent; color: var(--ink-2); border-radius: 9px; font-weight: 550; font-size: .93rem; padding: 0 8px; }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 650; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button { min-height: 36px; padding: 0 12px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); font-weight: 550; }
.presets button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* таблиці */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; }

.secret { word-break: break-all; padding: 12px 14px; background: var(--amber-soft); color: var(--amber); border-radius: var(--r-sm); font-weight: 600; }

/* адмінка: сітка статистики */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
@media (min-width: 600px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats .card { margin: 0; padding: 14px; }
.stats .num { font-size: 1.7rem; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats .lbl { color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 6px; }

/* головна для гостей */
.hero { text-align: center; padding: 36px 6px 8px; }
.hero .mark { width: 76px; height: 76px; border-radius: 24px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin: 0 auto 20px;
              box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 40%, transparent); }
.hero .mark svg { width: 42px; height: 42px; }
.hero h1 { font-size: 2.3rem; letter-spacing: -.035em; }
.hero .lead { font-size: 1.1rem; color: var(--muted); max-width: 30em; margin: 12px auto 24px; }
.hero .cta { max-width: 360px; margin: 0 auto; }
.hero .note { font-size: .86rem; color: var(--muted); margin-top: 12px; }
.features { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 32px; }
.feature { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.feature .fi { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-soft-ink); display: grid; place-items: center; margin-bottom: 10px; }
.feature h3 { margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: .93rem; margin: 0; }
.steps { counter-reset: s; display: grid; gap: 10px; margin: 30px 0 8px; }
.steps div { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps div::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }

/* помилки */
.errorpage { text-align: center; padding: 48px 12px; }
.errorpage .code { font-size: 5rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--accent); opacity: .25; font-variant-numeric: tabular-nums; }
.errorpage h1 { margin-top: 12px; }
.errorpage p { color: var(--muted); max-width: 28em; margin: 10px auto 22px; }
.errorpage .btn-row { justify-content: center; max-width: 360px; margin: 0 auto; }

.spacer-sm { height: 8px; }
.center { text-align: center; }
@media (max-width: 599px) {
  .feature { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 14px; }
  .feature .fi { margin: 0; grid-row: span 2; }
  .feature h3 { align-self: center; }
}
