/* ПравДоп: магазин юридичних документів. Контрастна тема: білий, чорний, електричний синій і лайм.
   Рух за принципами Emil Kowalski: лише transform, opacity і clip-path; сильна крива ease-out; відгук на натиск. */
:root {
  --bg: #FFFFFF;
  --soft: #F1F1F3;
  --surface: #FFFFFF;
  --ink: #0B0B0F;
  --ink-2: #33343B;
  --muted: #6C6E78;
  --line: #E2E2E7;
  --line-strong: #C4C5CC;
  --accent: #2B3BFF;
  --accent-press: #1C29D6;
  --accent-soft: #E6E8FF;
  --lime: #C8FF2E;
  --ok: #00A35C; --ok-soft: #D9FBEA;
  --warn-soft: #FFE96B; --warn-ink: #3D3200;
  --bad: #E5173F; --bad-soft: #FFE1E7;
  --display: 'Geologica', 'Golos Text', system-ui, sans-serif;
  --sans: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --r-card: 18px; --r-input: 12px; --r-pill: 999px;
  --wrap: 1280px;
  --shadow: 0 18px 40px -22px rgb(11 11 15 / .45);
}

/* pages change with a short slide instead of a blank flash */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 140ms var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in 260ms var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; padding-bottom: 80px; }
h1, h2, h3, p, ul, ol, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: 0; transform: translateY(-120%); background: var(--lime); color: var(--ink); padding: 10px 16px; border-radius: 10px; z-index: 50; font-weight: 600; transition: transform 160ms var(--ease-out); }
.skip:focus { transform: translateY(12px); }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.04rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }

.ic { display: inline-flex; width: 20px; height: 20px; flex: none; }
.ic svg { width: 100%; height: 100%; display: block; }

/* buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: var(--r-pill); border: 2px solid var(--ink); background: var(--ink); color: #fff; font-weight: 600; font-size: .98rem; white-space: nowrap; transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.btn:active { transform: scale(.96); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: .88rem; }
.btn-line { background: transparent; color: var(--ink); }
.btn-lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn-on-dark { background: transparent; color: #fff; border-color: rgb(255 255 255 / .45); }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.loading, .link.loading { color: transparent !important; }
.btn.loading::after, .link.loading::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .4); border-top-color: #fff; animation: spin .45s linear infinite; }
.btn-line.loading::after, .btn-lime.loading::after, .link.loading::after { border-color: var(--line-strong); border-top-color: var(--ink); }
.link { position: relative; background: none; border: 0; padding: 4px 0; color: var(--accent); font-size: .94rem; text-align: left; font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
  .btn-line:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
  .btn-lime:hover { background: #fff; border-color: #fff; color: var(--ink); }
  .btn-on-dark:hover { background: #fff; border-color: #fff; color: var(--ink); }
  .link:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* header */
.top { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; }
.top-row { display: flex; align-items: center; gap: 14px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--lime); color: var(--ink); display: grid; place-items: center; font: 700 1.1rem/1 var(--display); transition: transform 240ms var(--ease-out); }
.brand-name { font: 700 1.3rem/1 var(--display); letter-spacing: -0.04em; }
.top-catalog { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-weight: 600; flex: none; transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease; }
.top-catalog:active { transform: scale(.96); }
.top-search { flex: 1; position: relative; display: flex; align-items: center; min-width: 0; }
.top-search .ic { position: absolute; left: 16px; color: #9799A6; pointer-events: none; }
.top-search input { width: 100%; height: 46px; padding: 0 16px 0 46px; border-radius: var(--r-pill); border: 2px solid transparent; background: #1D1D24; color: #fff; font-size: .96rem; transition: border-color 160ms ease, background-color 160ms ease; }
.top-search input::placeholder { color: #9799A6; }
.top-search input:focus-visible { outline: none; border-color: var(--lime); background: #000; }
.top-nav { display: flex; gap: 2px; flex: none; }
.top-link { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border-radius: 12px; font-size: .74rem; color: #C9CAD3; transition: transform 140ms var(--ease-out), color 160ms ease; }
.top-link:active { transform: scale(.94); }
.cart-count { position: absolute; top: 2px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--lime); color: var(--ink); font: 700 .68rem/18px var(--sans); text-align: center; animation: pop 320ms var(--ease-out); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.cats-bar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.cats-row { display: flex; gap: 2px; height: 46px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.cats-row::-webkit-scrollbar { display: none; }
.cats-row a { position: relative; padding: 6px 12px; font-size: .9rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.cats-row a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .top-link:hover { color: var(--lime); }
  .top-catalog:hover { background: var(--lime); color: var(--ink); }
  .brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
  .cats-row a:hover { color: var(--ink); }
  .cats-row a:hover::after { transform: scaleX(1); }
}

/* category colours: solid and saturated; they are the covers of products */
.tone-medytsyna { --tone: #2B3BFF; --on: #fff; }
.tone-litsenzii { --tone: #00B96B; --on: #04130C; }
.tone-viiskovyi-oblik { --tone: #0B0B0F; --on: #C8FF2E; }
.tone-osvita { --tone: #FF5A1F; --on: #fff; }
.tone-konsultatsii { --tone: #8A2BFF; --on: #fff; }
.tone-sud { --tone: #FF2D78; --on: #fff; }
.tone-biznes { --tone: #C8FF2E; --on: #0B0B0F; }

/* storefront hero */
.store-hero { background: var(--ink); color: #fff; padding: 28px 0 0; overflow: hidden; }
.store-hero-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; }
.promo { position: relative; padding: clamp(20px, 3vw, 40px) 0 clamp(28px, 4vw, 52px); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.promo h1 { font-size: clamp(2.3rem, 5.4vw, 4.6rem); max-width: 13ch; }
.promo h1 em { font-style: normal; color: var(--lime); }
.promo p { max-width: 46ch; color: #C9CAD3; font-size: 1.1rem; }
.promo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.promo-figure { display: none; }
.promo-side { position: relative; overflow: hidden; align-self: center; border-radius: 26px; background: var(--accent); color: #fff; padding: 28px; min-height: 300px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; transition: transform 240ms var(--ease-out); }
.promo-side::before { content: ''; position: absolute; width: 260px; height: 260px; right: -90px; top: -90px; border-radius: 50%; background: var(--lime); transition: transform 500ms var(--ease-out); }
.promo-side > * { position: relative; }
.promo-side h2 { font-size: 1.7rem; max-width: 12ch; }
.promo-side p { color: rgb(255 255 255 / .85); font-size: .95rem; }
.promo-price { margin-top: auto; font: 700 2rem/1.05 var(--display); letter-spacing: -0.03em; }
.promo-go, .more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .94rem; }
.more { color: var(--accent); }
.promo-go .ic, .more .ic { width: 16px; height: 16px; transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .promo-side:hover { transform: translateY(-4px) rotate(-.6deg); }
  .promo-side:hover::before { transform: scale(1.5); }
  .promo-side:hover .promo-go .ic, .more:hover .ic { transform: translateX(4px); }
}
/* the single marquee of the site: what is on sale right now */
.ticker { margin-top: 28px; background: var(--lime); color: var(--ink); overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 40px; padding: 12px 0; animation: ticker 60s linear infinite; font: 600 .95rem/1 var(--display); letter-spacing: -0.01em; }
.ticker-track span::before { content: '✦'; margin-right: 40px; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) { .ticker:hover .ticker-track { animation-play-state: paused; } }

/* blocks */
.block { padding-top: 56px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.block-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.cat { position: relative; overflow: hidden; background: var(--tone); color: var(--on); border-radius: var(--r-card); padding: 18px; display: grid; gap: 6px; align-content: start; min-height: 180px; transition: transform 240ms var(--ease-out); }
.cat .ic { width: 34px; height: 34px; margin-bottom: 14px; transition: transform 320ms var(--ease-out); }
.cat p { font-size: .84rem; line-height: 1.4; opacity: .82; }
.cat-count { margin-top: auto; padding-top: 8px; font-size: .8rem; font-weight: 600; }
.cat:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .cat:hover { transform: translateY(-5px) rotate(-1deg); }
  .cat:hover .ic { transform: scale(1.25) rotate(8deg); }
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 14px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.product { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-card); display: flex; flex-direction: column; overflow: hidden; transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out); }
.product-link { display: flex; flex-direction: column; flex: 1; }
.product-cover { position: relative; height: 116px; background: var(--tone, var(--ink)); color: var(--on, #fff); display: grid; place-items: center; overflow: hidden; }
/* on hover the cover is flooded with lime from the corner */
.product-cover::before { content: ''; position: absolute; inset: 0; background: var(--lime); clip-path: circle(0% at 100% 100%); transition: clip-path 420ms var(--ease-out); }
.product-cover .ic { position: relative; width: 46px; height: 46px; transition: transform 320ms var(--ease-out), color 200ms ease; }
.product-body { padding: 14px 16px 6px; display: grid; gap: 6px; align-content: start; flex: 1; }
.product-cat { font-size: .74rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.product-meta { font-size: .84rem; color: var(--muted); }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 16px; }
.product-price { font: 700 1.08rem/1.2 var(--display); letter-spacing: -0.02em; }
.product-price.muted { font: 500 .84rem/1.3 var(--sans); }
.product-soon { border-color: var(--line-strong); }
.product-soon .product-cover { background: var(--soft); color: var(--muted); }
.product-soon h3 { color: var(--ink-2); }
.badge { position: absolute; top: 10px; left: 10px; z-index: 1; font-size: .7rem; font-weight: 700; letter-spacing: .02em; padding: 5px 10px; border-radius: var(--r-pill); background: #fff; color: var(--ink); }
.badge-hit { background: var(--lime); color: var(--ink); }
.badge-live { background: var(--ok); color: #fff; }
.buybox .badge, .promo-side .badge { position: static; align-self: flex-start; justify-self: start; }
@media (hover: hover) and (pointer: fine) {
  .product:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
  .product:not(.product-soon):hover .product-cover::before { clip-path: circle(150% at 100% 100%); }
  .product:not(.product-soon):hover .product-cover .ic { transform: scale(1.2) rotate(-8deg); color: var(--ink); }
  .product-soon:hover { box-shadow: 6px 6px 0 var(--line-strong); }
}
.product:active { transform: scale(.985); }
/* inside one category the covers rotate through the palette, so a long shelf does not look like one tile repeated */
.grid .product:not(.product-soon):nth-child(5n+2) .product-cover { --tone: #0B0B0F; --on: #C8FF2E; }
.grid .product:not(.product-soon):nth-child(5n+3) .product-cover { --tone: #FF5A1F; --on: #fff; }
.grid .product:not(.product-soon):nth-child(5n+4) .product-cover { --tone: #8A2BFF; --on: #fff; }
.grid .product:not(.product-soon):nth-child(5n+5) .product-cover { --tone: #00B96B; --on: #04130C; }
.grid .product:not(.product-soon):nth-child(5n+2):hover .product-cover .ic { color: var(--ink); }
/* cascade on first paint; decorative, never blocks interaction */
.js .grid > *, .js .cat-grid > *, .js .how > * { animation: rise 420ms var(--ease-out) both; }
.js .grid > :nth-child(2), .js .cat-grid > :nth-child(2), .js .how > :nth-child(2) { animation-delay: 50ms; }
.js .grid > :nth-child(3), .js .cat-grid > :nth-child(3), .js .how > :nth-child(3) { animation-delay: 100ms; }
.js .grid > :nth-child(4), .js .cat-grid > :nth-child(4), .js .how > :nth-child(4) { animation-delay: 150ms; }
.js .grid > :nth-child(5), .js .cat-grid > :nth-child(5) { animation-delay: 200ms; }
.js .grid > :nth-child(n+6), .js .cat-grid > :nth-child(n+6) { animation-delay: 250ms; }
.js .promo > *, .js .promo-side { animation: rise 520ms var(--ease-out) both; }
.js .promo > :nth-child(2) { animation-delay: 70ms; } .js .promo > :nth-child(3) { animation-delay: 140ms; } .js .promo-side { animation-delay: 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: how; }
.how li { position: relative; counter-increment: how; background: var(--soft); border-radius: var(--r-card); padding: 22px; display: grid; gap: 8px; align-content: start; transition: transform 220ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.how li::after { content: counter(how); position: absolute; right: 18px; top: 10px; font: 700 3rem/1 var(--display); letter-spacing: -0.05em; color: rgb(11 11 15 / .1); transition: color 200ms ease; }
.how .ic { width: 28px; height: 28px; color: var(--accent); margin-bottom: 8px; transition: color 200ms ease; }
.how p { font-size: .9rem; color: var(--ink-2); transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .how li:hover { background: var(--ink); color: #fff; transform: translateY(-4px); }
  .how li:hover p { color: #C9CAD3; } .how li:hover .ic { color: var(--lime); } .how li:hover::after { color: rgb(255 255 255 / .16); }
}
.how-wide { margin-bottom: 28px; }

/* page head, crumbs */
.page-head { padding: 22px 0 22px; }
.page-head h1 { margin-top: 12px; }
.page-lead { color: var(--ink-2); margin-top: 8px; max-width: 70ch; font-size: 1.05rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs i { font-style: normal; color: var(--line-strong); }
.crumbs span { color: var(--ink); font-weight: 500; }

/* catalogue */
.catalog { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.filters { position: sticky; top: 136px; background: var(--soft); border-radius: var(--r-card); padding: 12px; display: grid; gap: 2px; }
.filters h2 { font: 700 .76rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 10px; }
.filter { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; font-size: .93rem; font-weight: 500; color: var(--ink-2); transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease; }
.filter:active { transform: scale(.98); }
.filter > span:not(.ic) { flex: 1; }
.filter b { font-weight: 600; font-size: .78rem; font-variant-numeric: tabular-nums; opacity: .7; }
.filter .ic { width: 18px; height: 18px; }
.filter.on { background: var(--ink); color: #fff; }
.filter.on .ic { color: var(--lime); }
@media (hover: hover) and (pointer: fine) { .filter:not(.on):hover { background: #fff; color: var(--ink); } }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; font-size: .9rem; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 7px 15px; border-radius: var(--r-pill); border: 2px solid var(--ink); background: #fff; font-size: .86rem; font-weight: 600; transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease; }
.pill:active { transform: scale(.95); }
.pill.on { background: var(--ink); color: var(--lime); }

/* product page */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.pdp-main { display: grid; gap: 18px; }
.pdp-cover { position: relative; overflow: hidden; height: 220px; border-radius: 24px; background: var(--tone, var(--ink)); color: var(--on, #fff); display: flex; align-items: flex-end; justify-content: space-between; padding: 24px; font-weight: 600; }
.pdp-cover .ic { width: 96px; height: 96px; align-self: flex-start; animation: sway 6s var(--ease-in-out) infinite alternate; }
@keyframes sway { from { transform: rotate(-6deg) scale(1); } to { transform: rotate(6deg) scale(1.08); } }
.pdp-lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.spec { background: var(--soft); border-radius: var(--r-card); padding: 24px; display: grid; gap: 12px; }
.spec ul { display: grid; gap: 10px; }
.spec li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.spec li .ic { width: 18px; height: 18px; margin-top: 3px; color: var(--ok); }
.spec-out li .ic { color: var(--muted); }
.sample { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sample div { background: #fff; border-radius: 14px; padding: 14px; display: grid; gap: 4px; }
.sample b { font: 700 1.7rem/1 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.sample span { font-size: .84rem; color: var(--ink-2); line-height: 1.35; }
.buybox { position: sticky; top: 136px; background: var(--ink); color: #fff; border-radius: 24px; padding: 26px; display: grid; gap: 14px; }
.buybox .muted { color: #A9ABB8; }
.buy-price { font: 700 2.4rem/1.05 var(--display); letter-spacing: -0.04em; color: var(--lime); }
.buy-price.muted { font-size: 1.3rem; }
.buybox p { font-size: .9rem; }
.buybox .btn { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.buy-facts { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / .16); font-size: .9rem; color: #D5D6DE; }
.buy-facts li { display: flex; gap: 10px; align-items: center; }
.buy-facts .ic { color: var(--lime); width: 18px; height: 18px; }
.lead { display: grid; gap: 10px; }
.lead-done { color: var(--lime); font-size: .92rem; }
@media (hover: hover) and (pointer: fine) { .buybox .btn:hover { background: #fff; border-color: #fff; color: var(--ink); } }

/* forms */
.field { display: grid; gap: 6px; align-content: start; }
.field label, .form > label { font-size: .86rem; font-weight: 600; color: var(--ink-2); display: grid; gap: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=search]:not(#q), select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line-strong); border-radius: var(--r-input); background: #fff; color: var(--ink); font-size: 1rem; transition: border-color 160ms ease; }
textarea { resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); }
input[disabled] { background: var(--soft); color: var(--muted); }
input::placeholder { color: #9A9CA8; }
.hint { font-size: .84rem; color: var(--muted); line-height: 1.45; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.fields .wide { grid-column: 1 / -1; }
.form { display: grid; gap: 16px; }
.form .btn { justify-self: start; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
.check a { color: var(--accent); font-weight: 600; }
.check input, .role input[type=checkbox] { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.notice { background: var(--warn-soft); color: var(--warn-ink); padding: 13px 16px; border-radius: 12px; font-size: .93rem; font-weight: 500; }
.error-text { color: var(--bad); font-size: .84rem; }

/* configurator */
.wizard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.wizard.final .wizard-grid { grid-template-columns: minmax(0, 780px); justify-content: center; }
.wizard-main { border: 2px solid var(--ink); border-radius: 24px; padding: clamp(20px, 3vw, 36px); }
.progress { display: flex; gap: 5px; margin-bottom: 26px; }
.progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); transform-origin: left; transition: background-color 260ms ease; }
.progress .done { background: var(--accent); }
.progress .now { background: var(--ink); animation: grow 380ms var(--ease-out); }
@keyframes grow { from { transform: scaleX(.2); } }
.step { outline: none; display: grid; gap: 18px; }
.step.enter > * { animation: rise 360ms var(--ease-out) both; }
.step.enter > :nth-child(3) { animation-delay: 40ms; } .step.enter > :nth-child(n+4) { animation-delay: 80ms; }
.step h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.step h3 { margin-top: 8px; }
.step .lede { color: var(--ink-2); max-width: 62ch; font-size: 1.05rem; }
.step-count { font: 700 .76rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: -8px; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 22px; border-top: 2px solid var(--ink); }
.wizard-nav .btn:not(.btn-line) { margin-left: auto; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.choice { position: relative; display: grid; gap: 4px; align-content: start; padding: 16px 16px 16px 48px; border: 2px solid var(--line-strong); border-radius: 16px; background: #fff; cursor: pointer; transition: transform 140ms var(--ease-out), border-color 160ms ease, background-color 160ms ease, color 160ms ease; }
.choice:active { transform: scale(.98); }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice::before { content: ''; position: absolute; left: 16px; top: 18px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; transition: border-color 160ms ease, background-color 160ms ease, transform 200ms var(--ease-out); }
.choice.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.choice.on::before { border-color: var(--lime); background: var(--lime); transform: scale(1.1); }
.choice.on .choice-note { color: #C9CAD3; }
.choice:has(:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice-title { font-weight: 600; }
.choice-note { font-size: .86rem; color: var(--ink-2); line-height: 1.45; }
.choice-price { font: 700 1.35rem/1.2 var(--display); margin-top: 8px; letter-spacing: -0.03em; }
.choice.on .choice-price { color: var(--lime); }
.options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (hover: hover) and (pointer: fine) { .choice:not(.on):hover { border-color: var(--ink); } }

.search { margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 42px; padding: 8px 16px; border-radius: var(--r-pill); border: 2px solid var(--line-strong); background: #fff; font-size: .93rem; font-weight: 500; text-align: left; line-height: 1.3; transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
.chip:active { transform: scale(.94); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (hover: hover) and (pointer: fine) { .chip:not(.on):hover { border-color: var(--ink); } }

.questions { display: grid; }
.question { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.question:last-child { border-bottom: 0; }
.question legend { float: left; font-size: .96rem; max-width: 56ch; padding: 0; }
.seg { display: inline-flex; background: var(--soft); border-radius: var(--r-pill); padding: 3px; flex: none; }
.seg label { position: relative; padding: 7px 14px; border-radius: var(--r-pill); font-size: .88rem; font-weight: 500; cursor: pointer; color: var(--ink-2); transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out); white-space: nowrap; }
.seg label:active { transform: scale(.95); }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg label.on { background: var(--ink); color: #fff; }
.seg label:has(:focus-visible) { outline: 3px solid var(--accent); outline-offset: 1px; }

.roles { display: grid; gap: 8px; }
.role { display: grid; gap: 10px; padding: 13px 15px; border: 2px solid var(--line); border-radius: 14px; background: #fff; transition: border-color 160ms ease; }
.role.on { border-color: var(--ink); }
.role > label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 500; }
.sites { display: grid; gap: 10px; }
.site { display: flex; gap: 8px; }
.site .qty { width: 96px; flex: none; }
.icon { width: 48px; height: 48px; flex: none; border: 2px solid var(--line-strong); background: #fff; border-radius: var(--r-input); font-size: 1.3rem; color: var(--muted); transition: transform 140ms var(--ease-out); }
.icon:active { transform: scale(.92); }

.summary { position: sticky; top: 136px; background: var(--ink); color: #fff; border-radius: 24px; padding: 24px; display: grid; gap: 14px; transition: opacity 160ms ease; }
.summary.pending { opacity: .7; }
.summary .muted, .summary .hint { color: #A9ABB8; }
.summary-head { display: flex; justify-content: space-between; align-items: center; font: 700 1.1rem/1.2 var(--display); }
.demo-live { display: inline-flex; align-items: center; gap: 6px; font: 600 .78rem/1 var(--sans); color: var(--lime); }
.demo-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.summary-item { padding: 12px 14px; background: #1D1D24; border-radius: 14px; font-size: .92rem; font-weight: 500; }
.summary-count { display: flex; align-items: baseline; gap: 8px; }
.summary-count b { font: 700 3.4rem/1 var(--display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; color: var(--lime); }
.bump { animation: bump 320ms var(--ease-out); }
@keyframes bump { 30% { transform: scale(1.12); } }
.summary-count b, .summary-price b { display: inline-block; transform-origin: left bottom; }
.summary-groups li, .groups li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: .9rem; }
.summary-groups li { border-bottom: 1px solid rgb(255 255 255 / .12); }
.summary-groups li:last-child { border-bottom: 0; }
.summary-groups b { font-weight: 600; font-variant-numeric: tabular-nums; color: #fff; }
.summary-price { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / .16); color: #A9ABB8; }
.summary-price b { font: 700 1.9rem/1.1 var(--display); color: #fff; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.groups { border-top: 2px solid var(--ink); }
.groups li { padding: 12px 0; font-size: .96rem; border-bottom: 1px solid var(--line); }
.groups b { font: 700 1rem/1.4 var(--display); font-variant-numeric: tabular-nums; }
.checkout { display: grid; gap: 16px; margin-top: 8px; padding: 22px; background: var(--soft); border-radius: 18px; }
.login { display: grid; gap: 14px; }
.code { font-size: 1.5rem !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.auth { padding-top: 6vh; }
.auth-box { max-width: 460px; border: 2px solid var(--ink); border-radius: 24px; padding: 32px; }

/* cart */
.cart { display: grid; gap: 12px; max-width: 880px; }
.cart-item { display: flex; align-items: center; gap: 16px; border: 2px solid var(--ink); border-radius: var(--r-card); padding: 16px; animation: rise 360ms var(--ease-out) both; transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out); }
.cart-item .thumb { width: 60px; height: 60px; border-radius: 14px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; font: 700 1.2rem/1 var(--display); }
.cart-info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.cart-info b { font-weight: 600; }
.cart-info span { font-size: .88rem; color: var(--muted); }
.cart-side { display: flex; align-items: center; gap: 14px; flex: none; }
.cart-side b { font: 700 1.1rem/1 var(--display); }
@media (hover: hover) and (pointer: fine) { .cart-item:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); } }

/* cabinet, admin */
.app-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.side { position: sticky; top: 136px; background: var(--soft); border-radius: var(--r-card); padding: 10px; display: grid; gap: 2px; }
.side a, .side-out { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; font-size: .94rem; font-weight: 500; color: var(--ink-2); background: none; border: 0; text-align: left; transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease; }
.side a:active { transform: scale(.98); }
.side .ic { width: 18px; height: 18px; }
.side a.on { background: var(--ink); color: #fff; }
.side a.on .ic { color: var(--lime); }
.side-out { margin-top: 8px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .side a:not(.on):hover, .side-out:hover { background: #fff; color: var(--ink); } }
.app-main { display: grid; gap: 18px; outline: none; min-width: 0; }
.app-main h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.app-main h2 { font-size: 1.25rem; margin-top: 10px; }
.app-main .lede { color: var(--ink-2); }
.eyebrow { font-size: .86rem; color: var(--muted); }
.eyebrow a { color: var(--accent); font-weight: 600; }
.rows { display: grid; gap: 10px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 20px; width: 100%; padding: 16px 18px; border: 2px solid var(--ink); border-radius: var(--r-card); background: #fff; text-align: left; animation: rise 360ms var(--ease-out) both; transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out); }
.row:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) { .row:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); } }
.row-main { display: grid; gap: 3px; min-width: 0; }
.row-main b { font-weight: 600; }
.row-main .muted { font-size: .88rem; }
.row-side { display: flex; align-items: center; gap: 14px; flex: none; }
.row-side b { font: 700 1.05rem/1 var(--display); font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: .74rem; font-weight: 700; padding: 5px 11px; border-radius: var(--r-pill); background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.tag-ok { background: var(--ok); color: #fff; }
.tag-wait { background: var(--warn-soft); color: var(--warn-ink); }
.tag-work { background: var(--accent); color: #fff; }
.meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.empty { padding: 64px 24px; text-align: center; background: var(--soft); border-radius: 24px; display: grid; gap: 14px; justify-items: center; }
.panel { background: var(--soft); border-radius: var(--r-card); padding: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.panel h2 { margin-top: 0; }
.panel.danger { display: grid; gap: 12px; justify-items: start; }
.scroll { overflow-x: auto; border: 2px solid var(--ink); border-radius: var(--r-card); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 700; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--ink); padding: 12px 14px; white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table input { min-height: 40px; padding: 6px 10px; min-width: 110px; }
.ops { display: grid; gap: 2px; justify-items: start; }
.code-block { background: #fff; padding: 16px; border-radius: 12px; overflow: auto; font-size: .8rem; max-height: 360px; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .82rem; word-break: break-word; }
input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* help, legal */
.help { max-width: 1000px; }
.faq { border: 2px solid var(--ink); border-radius: var(--r-card); padding: 4px 22px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; background: var(--ink); color: var(--lime); display: grid; place-items: center; font-size: 1.2rem; transition: transform 240ms var(--ease-out), background-color 160ms ease; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--accent); color: #fff; }
.faq p { padding: 0 40px 18px 0; color: var(--ink-2); max-width: 70ch; }
.faq details[open] p { animation: rise 260ms var(--ease-out); }
.prose { max-width: 820px; display: grid; gap: 14px; }
.prose h2 { margin-top: 14px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ol, .prose ul { padding-left: 22px; display: grid; gap: 8px; }
.prose ol { list-style: decimal; } .prose ul { list-style: disc; }

/* footer */
.foot { background: var(--ink); color: #fff; padding: 48px 0 24px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-about p { font-size: .88rem; color: #A9ABB8; margin-top: 12px; max-width: 40ch; }
.foot nav { display: grid; gap: 9px; align-content: start; font-size: .92rem; }
.foot nav h2 { font: 700 .76rem/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--lime); margin-bottom: 4px; }
.foot nav a { color: #D5D6DE; transition: color 160ms ease, transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .foot nav a:hover { color: var(--lime); transform: translateX(4px); } }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 32px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / .14); font-size: .82rem; color: #A9ABB8; }

/* toasts enter from the edge they leave to; transitions, so rapid toasts retarget instead of restarting */
.toasts { position: fixed; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); display: grid; gap: 8px; z-index: 60; width: min(400px, 100% - 40px); pointer-events: none; }
.toast { background: var(--ink); color: #fff; border: 2px solid var(--lime); padding: 13px 18px; border-radius: 14px; font-size: .93rem; font-weight: 500; opacity: 1; transform: translateY(0); transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); }
@starting-style { .toast { opacity: 0; transform: translateY(100%); } }
.toast.bad { background: var(--bad); border-color: var(--bad); }
.toast.out { opacity: 0; transform: translateY(40%); transition-duration: 160ms; }

@media (max-width: 1020px) {
  .store-hero-grid, .catalog, .pdp, .wizard-grid, .app-grid { grid-template-columns: minmax(0, 1fr); }
  .filters, .side { position: static; display: flex; overflow-x: auto; scrollbar-width: none; padding: 8px; }
  .filters h2, .side-out { display: none; }
  .filter, .side a { white-space: nowrap; flex: none; }
  .filter b { display: none; }
  .buybox, .summary { position: static; }
  .summary { order: -1; }
  .summary-groups, .summary-item { display: none; }
  .summary-count b { font-size: 2.4rem; }
  .how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .promo-side { min-height: 0; }
}
@media (max-width: 720px) {
  .top-row { flex-wrap: wrap; height: auto; padding: 10px 0; row-gap: 10px; }
  .top-search { order: 5; flex-basis: 100%; }
  .top-nav { margin-left: auto; }
  .top-link > span:not(.ic), .top-catalog > span:not(.ic) { display: none; }
  .top-catalog { padding: 0 14px; }
  .top-row { gap: 8px; }
  .top-link { padding: 8px; }
  .brand-name { font-size: 1.15rem; }
  .grid, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-cover { height: 84px; }
  .product-foot { flex-direction: column; align-items: stretch; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how, .fields, .options { grid-template-columns: 1fr; }
  .question { flex-direction: column; align-items: flex-start; gap: 10px; }
  .question legend { float: none; }
  .cart-item, .row { flex-direction: column; align-items: flex-start; }
  .cart-side { width: 100%; justify-content: space-between; }
  .wizard-nav .btn { flex: 1; }
  .foot-grid { grid-template-columns: 1fr; gap: 22px; }
  .toasts { right: 50%; transform: translateX(50%); }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  *, *::before, *::after { animation: none !important; transition-property: opacity, background-color, border-color, color !important; }
}
