/* ==========================================================================
   ProfTools — Dark Premium Industrial
   Контраст проверен по WCAG AA:
   text 17.8:1 · muted 7.7:1 · accent 6.4:1 · ink-on-accent 6.4:1
   ========================================================================== */

/* --- Токены --------------------------------------------------------------- */
:root {
  --bg:          #0B0C0E;
  --surface:     #14171B;
  --surface-2:   #1B1F24;
  --surface-3:   #23282E;
  --line:        #262B31;
  --line-strong: #3A424C;

  --text:        #F2F4F7;
  --muted:       #9BA3AE;
  --dim:         #6B7480;

  --accent:      #FF5A64;
  --accent-ink:  #0B0C0E;
  --accent-soft: rgba(255, 90, 100, .12);
  --success:     #3DD68C;
  --danger:      #FF6B6B;

  --r:    2px;
  --r-md: 4px;
  --r-lg: 8px;

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur:  200ms;

  --z-header: 100;
  --z-drawer: 400;
  --z-modal:  500;
  --z-toast:  600;

  --wrap: 1240px;
  --header-h: 68px;
}

/* --- Сброс ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r);
}

::selection { background: var(--accent); color: var(--accent-ink); }

/* Скроллбар */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

/* --- Типографика ---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 4rem); }
h2 { font-size: clamp(1.6rem, 1.1rem + 2.1vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, .95rem + .8vw, 1.5rem); }
h4 { font-size: 1.0625rem; }
p  { max-width: 68ch; }

.eyebrow {
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--accent);
  flex: none;
}

.lead   { font-size: 1.0625rem; color: var(--muted); }
.muted  { color: var(--muted); }
.dim    { color: var(--dim); }
.num    { font-variant-numeric: tabular-nums; }

/* --- Раскладка ------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-4);
}
@media (min-width: 768px)  { .wrap { padding-inline: var(--s-6); } }
@media (min-width: 1240px) { .wrap { padding-inline: var(--s-7); } }

.section { padding-block: var(--s-8); }
@media (min-width: 768px) { .section { padding-block: var(--s-9); } }

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}
@media (min-width: 900px) {
  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s-6);
  }
  .section-head > div:first-child { max-width: 62ch; }
}

.rule { height: 1px; background: var(--line); border: 0; }

/* --- Кнопки --------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 var(--s-5);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-md);
  font-family: var(--font-head);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  text-align: center;
  touch-action: manipulation;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              opacity var(--dur) var(--ease);
}
.btn:hover  { background: color-mix(in srgb, var(--btn-bg) 88%, #fff); }
.btn:active { opacity: .85; }
.btn[disabled], .btn[aria-disabled='true'] {
  opacity: .45; cursor: not-allowed; pointer-events: none;
}

.btn--primary { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); --btn-bd: var(--accent); }
.btn--ghost   { --btn-bg: transparent;   --btn-fg: var(--text);       --btn-bd: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--accent); }
.btn--solid   { --btn-bg: var(--surface-2); --btn-fg: var(--text); --btn-bd: var(--line); }
.btn--block   { width: 100%; }
.btn--sm      { min-height: 44px; padding: 0 var(--s-4); font-size: .875rem; }
.btn--lg      { min-height: 56px; padding: 0 var(--s-6); font-size: 1rem; }

.btn .spinner { display: none; }
.btn.is-loading .spinner { display: block; }
.btn.is-loading .btn__label { opacity: .6; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

/* --- Шапка ---------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: .06em;
  font-size: 1.0625rem;
  min-height: 44px;
  flex: none;
}
.logo__mark { width: 30px; height: 30px; flex: none; }
.logo__sub {
  display: none;
  font-family: var(--font-body);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}
@media (min-width: 1100px) { .logo__sub { display: block; } }

.nav { display: none; margin-left: auto; }
@media (min-width: 1000px) { .nav { display: flex; gap: var(--s-1); } }
.nav a {
  display: flex;
  align-items: center;
  height: 40px;
  padding-inline: var(--s-3);
  border-radius: var(--r-md);
  font-size: .9375rem;
  color: var(--muted);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav__item { position: relative; }
.nav__item[aria-current='page'] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.header__actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
@media (min-width: 1000px) { .header__actions { margin-left: var(--s-4); } }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--text);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.icon-btn svg { width: 21px; height: 21px; }

.badge {
  position: absolute;
  top: 4px; right: 3px;
  min-width: 18px; height: 18px;
  padding-inline: 5px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-head);
  font-size: .6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-radius: 99px;
}
.badge.is-visible { display: flex; }

.header__phone {
  display: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9375rem;
  white-space: nowrap;
  padding-inline: var(--s-3);
}
@media (min-width: 1280px) { .header__phone { display: block; } }

.burger { display: inline-flex; }
@media (min-width: 1000px) { .burger { display: none; } }

/* --- Мобильное меню ------------------------------------------------------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  display: grid;
  grid-template-columns: 1fr min(360px, 88vw);
  visibility: hidden;
}
.drawer[aria-hidden='false'] { visibility: visible; }
.drawer__scrim {
  background: rgba(0, 0, 0, .62);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  border: 0;
  cursor: pointer;
}
.drawer__panel {
  background: var(--surface);
  border-left: 1px solid var(--line);
  padding: var(--s-5) var(--s-5) calc(var(--s-7) + env(safe-area-inset-bottom));
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 260ms var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.drawer[aria-hidden='false'] .drawer__scrim { opacity: 1; }
.drawer[aria-hidden='false'] .drawer__panel { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .drawer__panel, .drawer__scrim { transition: none; }
}
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-4);
}
.drawer__panel a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-inline: var(--s-3);
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: 1rem;
}
.drawer__panel a:hover, .drawer__panel a[aria-current='page'] {
  color: var(--text); background: var(--surface-2);
}
.drawer__foot { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line); }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: var(--s-8) var(--s-8);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
@media (min-width: 900px) { .hero { padding-block: var(--s-9); } }
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, var(--line) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(to bottom, var(--line) 1px, transparent 1px) 0 0 / 72px 72px;
  opacity: .5;
  mask-image: radial-gradient(120% 90% at 78% 20%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 90% at 78% 20%, #000 10%, transparent 72%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -30%; right: -12%;
  width: 60vw; height: 60vw;
  max-width: 760px; max-height: 760px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 68%);
  pointer-events: none;
}
.hero__inner { position: relative; display: grid; gap: var(--s-6); }
@media (min-width: 1000px) {
  .hero__inner { grid-template-columns: 1.15fr .85fr; align-items: center; gap: var(--s-8); }
}
.hero h1 { margin-block: var(--s-4) var(--s-4); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.stat { background: var(--surface); padding: var(--s-5); }
.stat__n {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text);
}
.stat__l { margin-top: var(--s-2); font-size: .8125rem; color: var(--muted); }

/* --- Полоса преимуществ --------------------------------------------------- */
.marquee {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
.marquee__row {
  display: flex;
  gap: var(--s-7);
  padding-block: var(--s-4);
  white-space: nowrap;
  animation: slide 38s linear infinite;
}
.marquee__row span {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-head);
  font-size: .8125rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.marquee__row span::before {
  content: ''; width: 5px; height: 5px; background: var(--accent); flex: none;
  transform: rotate(45deg);
}
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__row { animation: none; flex-wrap: wrap; white-space: normal; }
}

/* --- Категории ------------------------------------------------------------ */
.cats {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
@media (min-width: 640px)  { .cats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cats { grid-template-columns: repeat(4, 1fr); } }

.cat {
  background: var(--surface);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-height: 168px;
  transition: background-color var(--dur) var(--ease);
}
.cat:hover { background: var(--surface-2); }
.cat__ico { color: var(--accent); }
.cat__ico svg { width: 26px; height: 26px; }
.cat__n { font-family: var(--font-head); font-weight: 600; font-size: 1.0625rem; }
.cat__c { margin-top: auto; font-size: .8125rem; color: var(--dim); font-variant-numeric: tabular-nums; }

/* --- Сетка товаров -------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.card:focus-within { border-color: var(--accent); }

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__tag {
  position: absolute;
  top: var(--s-3); left: var(--s-3);
  padding: 3px var(--s-2);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  font-family: var(--font-head);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card__body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.card__t {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.28;
}
.card__t a::after { content: ''; position: absolute; inset: 0; }
.card { position: relative; }
.card__d { font-size: .8125rem; color: var(--muted); line-height: 1.5; }
.card__foot {
  margin-top: auto;
  padding-top: var(--s-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
  border-top: 1px solid var(--line);
}
.price {
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price small { font-family: var(--font-body); font-size: .75rem; font-weight: 400; color: var(--dim); display: block; }
.price--ask { font-size: .875rem; color: var(--accent); line-height: 1.3; }

.card__add {
  position: relative;
  z-index: 1;
  flex: none;
}

/* --- Фильтры каталога ----------------------------------------------------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  padding-block: var(--s-4);
  margin-bottom: var(--s-5);
  border-block: 1px solid var(--line);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: .75rem; color: var(--muted); letter-spacing: .04em; }
.input, .select {
  min-height: 44px;
  padding: 0 var(--s-3);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease);
}
.input:hover, .select:hover { border-color: var(--dim); }
.input:focus, .select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input::placeholder { color: var(--dim); }
textarea.input { min-height: 110px; padding-block: var(--s-3); resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: var(--s-6); background-image:
  linear-gradient(45deg, transparent 50%, var(--muted) 50%),
  linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.search { position: relative; flex: 1 1 240px; }
.search .input { width: 100%; padding-left: 42px; }
.search svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--dim); pointer-events: none;
}

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  min-height: 40px;
  padding: 0 var(--s-4);
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: .875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--dur) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-pressed='true'] {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent); font-weight: 600;
}

.result-count { font-size: .875rem; color: var(--muted); margin-bottom: var(--s-4); }

/* --- Пустое состояние ----------------------------------------------------- */
.empty {
  padding: var(--s-8) var(--s-5);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-4);
}
.empty svg { width: 40px; height: 40px; color: var(--dim); }
.empty p { color: var(--muted); }

/* --- Страница товара ------------------------------------------------------ */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2);
  padding-block: var(--s-5);
  font-size: .8125rem; color: var(--dim);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-hidden] { color: var(--line-strong); }

.product { display: grid; gap: var(--s-6); }
@media (min-width: 1000px) { .product { grid-template-columns: 1.05fr .95fr; gap: var(--s-8); align-items: start; } }

.product__media {
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.product__media img { width: 100%; height: 100%; object-fit: cover; }

.gallery { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
.gallery button {
  flex: 1 1 0;
  aspect-ratio: 4 / 3;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  min-height: 44px;
  transition: border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.gallery button img { width: 100%; height: 100%; object-fit: cover; }
.gallery button:hover { border-color: var(--line-strong); }
.gallery button[aria-current='true'] { border-color: var(--accent); }
.gallery button:not([aria-current='true']) img { opacity: .62; }

.product__buy {
  margin-top: var(--s-6);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: var(--s-4);
}
.product__price { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.product__price .price { font-size: 2rem; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; }
.qty button {
  width: 48px; height: 48px;
  background: var(--surface-2);
  border: 0; cursor: pointer;
  font-size: 1.25rem; line-height: 1;
  color: var(--text);
  transition: background-color var(--dur) var(--ease);
}
.qty button:hover { background: var(--surface-3); }
.qty input {
  width: 64px; height: 48px;
  text-align: center;
  background: var(--surface);
  border: 0;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-head);
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.specs { width: 100%; border-collapse: collapse; margin-top: var(--s-5); }
.specs th, .specs td { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); text-align: left; font-size: .9375rem; vertical-align: top; }
.specs th { color: var(--muted); font-weight: 400; width: 45%; }
.specs td { font-weight: 500; }

/* --- Корзина -------------------------------------------------------------- */
.cart-layout { display: grid; gap: var(--s-6); align-items: start; }
@media (min-width: 1000px) { .cart-layout { grid-template-columns: 1.5fr .8fr; gap: var(--s-7); } }

.line {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: var(--s-4);
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
@media (min-width: 700px) { .line { grid-template-columns: 96px 1fr auto; align-items: center; } }
.line__media { aspect-ratio: 1; background: var(--surface-2); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.line__t { font-family: var(--font-head); font-weight: 600; font-size: .9375rem; line-height: 1.3; }
.line__meta { font-size: .8125rem; color: var(--muted); margin-top: 2px; }
.line__ctl { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-3); }
@media (min-width: 700px) { .line__ctl { margin-top: 0; flex-direction: column; align-items: flex-end; gap: var(--s-3); } }

.link-danger {
  background: none; border: 0; padding: var(--s-2);
  color: var(--muted); font-size: .8125rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color var(--dur) var(--ease);
}
.link-danger:hover { color: var(--danger); }
.link-danger svg { width: 15px; height: 15px; }

.summary {
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: var(--s-3);
}
@media (min-width: 1000px) { .summary { position: sticky; top: calc(var(--header-h) + var(--s-5)); } }
.summary__row { display: flex; justify-content: space-between; gap: var(--s-4); font-size: .9375rem; }
.summary__row .num { font-variant-numeric: tabular-nums; }
.summary__total {
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
}

/* --- Формы ---------------------------------------------------------------- */
.form { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .form--2 { grid-template-columns: 1fr 1fr; } .form--2 .col-2 { grid-column: 1 / -1; } }
.hint { font-size: .8125rem; color: var(--dim); }
.err { font-size: .8125rem; color: var(--danger); display: none; }
.field.is-invalid .err { display: block; }
.field.is-invalid .input { border-color: var(--danger); }
.req { color: var(--accent); }

.check { display: flex; gap: var(--s-3); align-items: flex-start; cursor: pointer; font-size: .875rem; color: var(--muted); }
.check input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--accent); cursor: pointer; }
.check a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.check.is-invalid { color: var(--danger); }
.check.is-invalid input { outline: 2px solid var(--danger); outline-offset: 2px; }

/* --- Инфо-блоки ----------------------------------------------------------- */
.tiles { display: grid; gap: var(--s-4); }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tiles--3 { grid-template-columns: repeat(3, 1fr); } }

.tile {
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.tile__ico { color: var(--accent); }
.tile__ico svg { width: 24px; height: 24px; }
.tile h3 { font-size: 1.0625rem; }
.tile p { font-size: .9375rem; color: var(--muted); }

.note {
  padding: var(--s-4);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: var(--r-md);
  font-size: .875rem;
  display: flex; gap: var(--s-3);
}
.note svg { width: 19px; height: 19px; color: var(--accent); flex: none; margin-top: 2px; }

/* --- Подвал --------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: var(--s-8); }
.footer__grid { display: grid; gap: var(--s-6); padding-block: var(--s-7); }
@media (min-width: 768px)  { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer h4 {
  font-size: .75rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim); margin-bottom: var(--s-4);
}
.footer__list { display: flex; flex-direction: column; gap: var(--s-1); }
.footer__list a, .footer__list span { font-size: .9375rem; color: var(--muted); padding-block: 6px; }
.footer__list a:hover { color: var(--accent); }
.footer__bottom {
  padding-block: var(--s-4);
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5);
  justify-content: space-between;
  font-size: .8125rem; color: var(--dim);
}
.socials { display: flex; gap: var(--s-2); }
.socials a {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-md);
  color: var(--muted);
  transition: all var(--dur) var(--ease);
}
.socials a:hover { color: var(--accent); border-color: var(--accent); }
.socials svg { width: 19px; height: 19px; }

/* --- Тосты ---------------------------------------------------------------- */
.toasts {
  position: fixed;
  left: 50%; bottom: calc(var(--s-5) + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--s-2);
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  font-size: .875rem;
  animation: toast-in 220ms var(--ease);
}
.toast svg { width: 18px; height: 18px; flex: none; color: var(--success); }
.toast--err svg { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* --- Появление секций ----------------------------------------------------- */
/* Скрываем только если JS точно доведёт дело до конца: класс ставится
   скриптом. Без JS, при ошибке или с reduced-motion контент виден сразу. */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); }
.js-reveal .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal, .js-reveal .reveal.is-in { opacity: 1; transform: none; transition: none; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -60px;
  z-index: calc(var(--z-header) + 1);
  padding: var(--s-3) var(--s-4);
  background: var(--accent); color: var(--accent-ink);
  border-radius: var(--r-md); font-weight: 600;
  transition: top 150ms var(--ease);
}
.skip-link:focus { top: var(--s-3); }

.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: var(--s-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
