/* D13 landing — styles.
   Visual system (from the design handoff): white #fff, sidebar #f8f8f8, text #171717,
   secondary text #666, borders #e6e6e6; grid 3/2/1 columns, sidebar 230px,
   card radius 13–15px, button radius 9px. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/InterVariable.woff2) format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink: #171717;
  --muted: #666;
  --line: #e6e6e6;
  --soft: #f7f7f7;
  --side: #f8f8f8;
  --live: #3d6950;
  --error: #b42318;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Spacing scale (4px base) and the roles built from it. Proximity carries the hierarchy:
     card < subgroup < section < zone, so containers do not have to. Phones shrink the roles. */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --gap-cards: var(--space-3);    /* between cards in a grid */
  --gap-heading: var(--space-4);  /* a heading to its content */
  --gap-group: var(--space-6);    /* between subgroups of one section */
  --gap-section: var(--space-7);  /* between sections of a page */
  --gap-zone: var(--space-8);     /* the break that changes meaning: available → coming */
  --page-top: 40px;               /* header rule to the first line of content */
}

html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
html.lock { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body { margin: 0; color: var(--ink); font: 15px/1.55 var(--font); background: #fff; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
svg { width: 22px; height: 22px; flex: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2 { text-wrap: balance; } /* no lone last word in headings at any width */

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.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 { position: absolute; left: -9999px; top: 12px; z-index: 30; background: #fff; padding: 9px 14px; border-radius: 9px; box-shadow: 0 4px 20px #0002; font-weight: 600; font-size: 14px; }
.skip:focus { left: max(12px, env(safe-area-inset-left)); }

/* ---------- Layout ---------- */
/* env(safe-area-inset-*) is non-zero only with viewport-fit=cover, on notched phones in landscape
   and above the home indicator; the sidebar grows by the inset so its labels keep their width. */
.layout { display: grid; grid-template-columns: calc(230px + env(safe-area-inset-left, 0px)) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--side); border-right: 1px solid #ededed; position: relative; }
/* The logo is centred on the 78px header line (10 + 4 + 49/2 = 38.5) and the first nav item
   starts level with the first line of content (78 + --page-top = 118 = 14 + 49 + 55). */
.side-inner { position: sticky; top: 0; height: 100vh; min-height: 500px; padding: 10px 15px 20px calc(15px + env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; }
.side-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 55px; }
.brand { display: flex; align-items: center; padding: 0 13px; }
.brand img { width: 96px; height: auto; display: block; }
.side-close { display: none; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; font-size: 14px; padding: 11px 12px; border-radius: 9px; color: #4b4b4b; font-weight: 500; }
.nav a svg { width: 19px; height: 19px; }
.nav a.active { background: #e9e9e9; color: var(--ink); font-weight: 600; }

.side-bottom { margin-top: auto; padding: 12px; color: var(--muted); font-size: 12px; }
.side-bottom span { display: block; margin-bottom: 6px; }
.side-bottom button { display: flex; align-items: center; gap: 9px; background: transparent; border: 0; padding: 4px 0; color: #303030; font-size: 13px; font-weight: 550; }
.side-bottom button svg { width: 16px; height: 16px; }

.main { min-width: 0; }
.top {
  height: 78px; display: flex; align-items: center; justify-content: space-between;
  /* Lines the breadcrumb and the button up with the centred content column. */
  padding: 0 max(48px, calc((100% - 1190px) / 2 + 48px));
  border-bottom: 1px solid #f0f0f0;
}
.crumb { font-size: 13px; color: var(--muted); display: flex; gap: 9px; align-items: center; }
.crumb b { font-weight: 550; color: #222; }
.top-right { display: flex; gap: 20px; align-items: center; }
.mobhead, #menu { display: none; } /* phone-only: logo in the header, menu button in the bottom bar */

.content { max-width: 1190px; margin: auto; padding: var(--page-top) 48px var(--space-6); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 9px;
  padding: 11px 16px; min-height: 44px; font-weight: 550; font-size: 13px; white-space: nowrap;
}
.button svg { width: 16px; height: 16px; }
.button.light { background: #fff; color: #222; border-color: #ddd; }
.button[disabled] { opacity: .65; cursor: progress; }

/* ---------- Typography blocks ---------- */
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.hero { margin-bottom: var(--gap-section); }
.hero h1 { font-size: 54px; letter-spacing: -.058em; line-height: 1.06; font-weight: 600; margin: 0 0 var(--space-4); max-width: 890px; }
.hero p { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 720px; margin: 0; }
/* Home: the hero and «Что вас интересует?» are one group, so the gap below is a step smaller. */
.homehero { text-align: center; padding: 0; margin-bottom: var(--space-6); }
.homehero h1 { font-size: 70px; max-width: 900px; margin: 0 auto var(--space-4); }
.homehero p { max-width: 690px; margin: auto; font-size: 18px; }
.homehero .eyebrow { margin-bottom: var(--space-4); }
.homehero + .section-title { justify-content: center; } /* same axis as the centred hero */

/* The count sits next to its heading (it used to be pushed to the far edge). */
.section-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); margin: 0 0 var(--gap-heading); }
.section-title h2 { font-size: 22px; line-height: 1.25; letter-spacing: -.035em; font-weight: 600; margin: 0; }
.section-title span { font-size: 13px; color: var(--muted); }
/* One action for a whole section («Сообщить о запусках»), at the far end of its heading row. */
.zone-action { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; font-size: 13px; font-weight: 550; color: #222; }
.zone-action svg { width: 16px; height: 16px; }

/* ---------- Audience cards (home, about, 404) ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-cards); }
.role { display: flex; flex-direction: column; min-height: 210px; border: 1px solid var(--line); border-radius: 15px; padding: 23px; background: #fff; transition: background .15s; }
.iconbox { width: 39px; height: 39px; border: 1px solid #e7e7e7; background: #f8f8f8; border-radius: 11px; display: grid; place-items: center; color: #272727; }
.role .iconbox { width: 46px; height: 46px; }
.role .iconbox svg { width: 24px; height: 24px; }
.role h3 { margin: 19px 0 6px; font-size: 22px; line-height: 1.2; letter-spacing: -.04em; font-weight: 600; }
.role p { margin: 0; color: #626262; font-size: 14px; line-height: 1.5; }
.role .go { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; }
.role .go svg { width: 18px; height: 18px; }

.mission { margin-top: var(--gap-section); padding: var(--space-5) 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.18fr; gap: var(--space-6); align-items: start; }
.mission h2 { margin: 0 0 10px; font-size: 26px; letter-spacing: -.04em; font-weight: 600; line-height: 1.2; }
.mission p { font-size: 14px; color: var(--muted); margin: 0; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.principle svg { width: 21px; height: 21px; margin-bottom: 6px; }
.principle b { display: block; font-size: 15px; margin-bottom: 4px; }
.principle span { display: block; font-size: 12px; color: var(--muted); line-height: 1.45; }

/* ---------- Footer ---------- */
.footer { margin-top: var(--gap-section); border-top: 1px solid var(--line); padding-top: var(--space-4); display: flex; gap: var(--space-3) var(--space-5); justify-content: space-between; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-1) 20px; }
/* «Связаться» in the footer opens the dialog, so it is a button dressed as a link. */
.footer-links button { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
/* Signed documents (PDF in public/docs): a row of their own under the copyright line. */
.footer-docs { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: var(--space-1) 20px; }
.crumb a { color: inherit; }

/* ---------- Service catalog ---------- */
/* Column count follows the width the catalog actually gets (container query), not the
   viewport: 3 columns from 804px (cards ≥260px), 2 from 480px (cards ≥234px), 1 below,
   where the cards also turn compact (see «Compact service card»). */
.catalog { container-type: inline-size; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-cards); }
@container (max-width: 803px) { .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 479px) { .catalog-grid { grid-template-columns: 1fr; } }

/* Dealers: «Доступно сейчас» → help → «В разработке» (grouped by job). */
.callout.callout-help { margin: var(--gap-group) 0 var(--gap-zone); }
.subgroup { border-top: 1px solid var(--line); padding-top: var(--space-4); }
.subgroup + .subgroup { margin-top: var(--gap-group); }
.subgroup-title { font-size: 15px; line-height: 1.3; letter-spacing: -.015em; font-weight: 600; margin: 0 0 var(--space-3); }

/* The flagship («Сайт автодилера») is the dealer's starting point: twice as wide, five template
   thumbnails (the same concepts as in the picker), and the only filled button among the cards. */
.service.flagship { grid-column: span 2; }
@container (max-width: 479px) { .service.flagship { grid-column: auto; } }
/* Browsers without container queries (iOS 15 Safari and the in-app browsers built on it, Chrome
   below 105) skip every @container rule; these viewport breakpoints approximate the same
   catalog widths (804px and 480px of content) so the grid still drops to 2 and 1 columns. */
@supports not (container-type: inline-size) {
  @media (max-width: 1144px) { .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 520px), (min-width: 651px) and (max-width: 760px) {
    .catalog-grid { grid-template-columns: 1fr; }
    .service.flagship { grid-column: auto; }
  }
}
.site-previews { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); max-width: 420px; margin: 0 0 var(--space-4); }
.site-preview { display: block; aspect-ratio: 4 / 3; padding: 5px; border: 1px solid #e3e3e3; border-radius: 6px; background: #fff; }
.site-preview::before { content: ""; display: block; height: 5px; border-radius: 2px; background: var(--sample); margin-bottom: 4px; }
.site-preview i { display: block; height: 3px; margin-top: 3px; border-radius: 2px; background: #e4e4e4; }
.site-preview i:first-child { height: 12px; background: #eeeeee; }
.action.action-primary {
  display: inline-flex; justify-content: center; align-self: flex-start; width: auto; gap: 9px;
  min-height: 44px; padding: 11px 16px; border-radius: 9px; background: var(--ink); color: #fff;
}

/* Buyers: the purchase in three stages; each stage starts with its available service. */
.journey { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap-section); }
.stage { display: grid; gap: var(--gap-cards); align-content: start; min-width: 0; }
.stage-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-1); }
.stage-head h2 { font-size: 22px; line-height: 1.25; letter-spacing: -.035em; font-weight: 600; margin: 0; }
.stage-num { flex: none; width: 28px; height: 28px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.stage-soon { display: grid; gap: var(--gap-cards); align-content: start; }
/* Wide enough: the stages stand side by side, joined by a rule (the purchase as a timeline);
   subgrid keeps the heads, the available cards and the coming cards on shared rows. */
@container (min-width: 804px) {
  .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto; gap: 0 var(--space-5); }
  .stage { grid-row: span 3; grid-template-rows: subgrid; }
  .stage-head::after { content: ""; flex: 1; height: 1px; background: var(--line); margin-right: calc(-1 * var(--space-5)); }
  .stage:last-child .stage-head::after { display: none; }
}

.service { position: relative; border: 1px solid var(--line); border-radius: 13px; padding: var(--space-4); display: flex; flex-direction: column; min-height: 177px; background: #fff; transition: border-color .15s, background .15s; }
/* «Скоро»: a flat grey tile instead of an outlined white card, so «what works now» stands out
   at a glance. Still a card with its own action (owner's decision). */
.service.soon { background: var(--soft); border-color: transparent; }
.service.soon .iconbox { background: #fff; border-color: #ececec; color: #555; }
.cardtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: var(--space-3); }
.status { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #a0a0a0; }
.status.live { color: var(--live); }
.live .dot { background: #548466; }
/* Card titles are h3, or h4 inside a job subgroup of «В разработке»: same look. */
.service h3, .service h4 { font-size: 17px; letter-spacing: -.025em; line-height: 1.25; margin: 0 0 var(--space-1); font-weight: 600; }
.service p { font-size: 13px; line-height: 1.5; margin: 0 0 var(--space-3); color: #646464; }
.service.flagship h3 { font-size: 20px; letter-spacing: -.03em; }
.service.flagship p { font-size: 14px; }
.tag { display: inline-block; font-size: 11px; line-height: 18px; color: var(--muted); border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 0 7px; margin-right: 4px; letter-spacing: .01em; white-space: nowrap; }
.action { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: auto; color: #222; font-weight: 550; font-size: 13px; text-align: left; background: none; border: 0; padding: var(--space-2) 0 0; width: 100%; }
/* The whole card is clickable, not just the CTA line. */
.action::after { content: ""; position: absolute; inset: 0; border-radius: 13px; }
.action svg { width: 16px; height: 16px; }
.soon .action { color: #5a5a5a; font-weight: 500; }

/* The button follows its text (proximity), instead of being pushed to the far edge. */
.callout { margin-top: var(--gap-section); display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: var(--space-4) var(--space-6); padding: var(--space-5); border-radius: 13px; background: #f6f6f6; }
.callout h2 { font-size: 17px; line-height: 1.3; margin: 0 0 2px; letter-spacing: -.02em; font-weight: 600; }
.callout p { font-size: 13px; color: var(--muted); margin: 0; }
/* Creators: the ask follows the money directly (one argument), then a full section break. */
.callout-gap { margin: var(--space-4) 0 var(--gap-section); }

/* ---------- Creators ---------- */
.creator-hero { display: grid; grid-template-columns: 1.13fr .87fr; gap: var(--space-6); align-items: center; margin-bottom: var(--gap-section); }
.creator-hero h1 { font-size: 53px; }
.creator-hero .button { margin-top: 21px; }
.hero-status { margin-top: 14px; }
.demo { border: 1px solid #e1e1e1; border-radius: 16px; background: #f5f5f5; padding: 15px; }
.demo-label { font-size: 11px; color: var(--muted); margin-bottom: 9px; display: flex; justify-content: space-between; gap: 12px; }
.demo-label span:last-child { white-space: nowrap; }
.browser { border: 1px solid #e1e1e1; border-radius: 10px; overflow: hidden; background: #fff; }
.browser-top { padding: 10px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #e8e8e8; font-size: 10px; color: var(--muted); }
.lights { letter-spacing: 3px; color: #aaa; }
.mini { padding: 16px 15px 12px; }
.mini-nav { display: flex; justify-content: space-between; align-items: center; font-size: 8px; color: var(--muted); }
.mini-nav b { font-size: 13px; letter-spacing: -.03em; color: #111; }
.mini-links { display: flex; gap: 12px; }
.mini-h { font-size: 23px; font-weight: 600; letter-spacing: -.05em; line-height: 1.05; margin: 19px 0 6px; }
.mini p { font-size: 10px; color: var(--muted); margin: 0 0 10px; }
.mini .fake { font-size: 9px; background: var(--ink); color: #fff; border-radius: 4px; padding: 6px 10px; display: inline-block; }
.mini-cars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 13px; }
.mini-car { border: 1px solid #e9e9e9; border-radius: 5px; padding: 6px; min-width: 0; }
.mini-car .carart { height: 42px; background: #f4f4f4; border-radius: 4px; display: grid; place-items: center; }
.mini-car svg { width: 33px; height: 25px; color: #777; }
.mini-car b { display: block; font-size: 8px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-car span { font-size: 7px; color: var(--muted); }
.demo-link { font-size: 12px; margin: 6px 1px 0; padding: 6px 0; display: flex; justify-content: space-between; align-items: center; font-weight: 550; }
.demo-link svg { width: 15px; height: 15px; }

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-2); margin-bottom: var(--gap-section); }
.step { padding: 15px 12px; border-top: 1px solid #d9d9d9; }
.step .num { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.step h3 { font-size: 14px; letter-spacing: -.015em; margin: 0 0 6px; line-height: 1.25; }
.step p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.45; }

.economy { border: 1px solid var(--line); border-radius: 14px; padding: 20px var(--space-5); margin-bottom: 0; }
.econ-grid { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 20px; align-items: center; margin: 10px 0 14px; }
.econ-grid div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.econ-grid strong { display: block; font-size: 34px; font-weight: 600; line-height: 1.15; letter-spacing: -.045em; }
.econ-grid span { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.econ-grid div:last-child strong { font-size: 39px; }
.fine { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; max-width: 68ch; }

/* ---------- About ---------- */
.aboutblock { max-width: 790px; font-size: 20px; line-height: 1.6; color: #555; margin-bottom: var(--gap-section); }
/* Principles are values, not doors: no card frame (that frame means "clickable" elsewhere),
   just a top rule, the same idiom as the steps on /creators. */
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.value { border-top: 1px solid var(--line); padding-top: var(--space-4); }
.value svg { display: block; width: 22px; height: 22px; margin-bottom: var(--space-3); color: #272727; }
.value h3 { font-size: 18px; line-height: 1.25; letter-spacing: -.03em; font-weight: 600; margin: 0 0 var(--space-1); }
.value p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- Long text (.prose: kept for HTML versions of documents, unused now) and 404 ---------- */
.prose { max-width: 600px; } /* about 75–80 characters a line at 15px */
.prose h2 { font-size: 20px; letter-spacing: -.03em; line-height: 1.3; margin: 34px 0 8px; font-weight: 600; }
.prose p, .prose li { font-size: 15px; color: #3d3d3d; line-height: 1.65; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.back-home { margin: var(--space-5) 0 0; }

/* ---------- Lead dialog ---------- */
.modal {
  border: 0; padding: 0; border-radius: 17px; color: var(--ink); background: #fff;
  width: min(570px, calc(100% - 36px)); max-width: none;
  max-height: calc(100vh - 36px); max-height: calc(100dvh - 36px);
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
  box-shadow: 0 20px 70px #0002;
}
.modal::backdrop { background: rgba(0, 0, 0, .33); }
.modal-inner { padding: 24px 24px 22px; }
.modalhead { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
#modal-title { outline: none; } /* focused only as a starting point on touch screens */
.modal h2 { font-size: 25px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.035em; font-weight: 600; }
.modal-note { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.modal-service { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.modal-service b { color: var(--ink); font-weight: 600; }
.close { background: none; border: 0; padding: 10px; margin: -10px -10px 0 0; border-radius: 9px; display: grid; place-items: center; min-width: 44px; min-height: 44px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.field { display: block; margin: 12px 0 0; font-size: 13px; font-weight: 550; }
.field > label { display: block; }
.field .opt { color: var(--muted); font-weight: 400; }
.field-error { margin: 5px 0 0; font-size: 12.5px; line-height: 1.4; font-weight: 400; color: var(--error); }
.field input, .field textarea, .field select {
  display: block; width: 100%; margin-top: 5px; border: 1px solid #cdcdcd; border-radius: 8px;
  padding: 10px 11px; background: #fff; font-size: 15px; font-weight: 400; line-height: 1.35;
}
.field input, .field select { height: 43px; }
.field textarea { resize: vertical; min-height: 64px; }
.field input::placeholder, .field textarea::placeholder { color: #767676; } /* 4.5:1 on white */
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 2px solid transparent; outline-offset: 0; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); } /* transparent outline shows in high-contrast mode */
.field [aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.consent { margin: 10px 0 10px; }
/* The whole row is the target (≥44px tall); the box itself is 22px. */
.consent-check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 13px; line-height: 1.4; color: #444; cursor: pointer; }
.consent-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--ink); cursor: pointer; }
.consent-docs { display: flex; flex-wrap: wrap; column-gap: 16px; margin: 0 0 0 32px; font-size: 12px; }
.consent-docs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.consent .field-error { margin: 0 0 2px 32px; }
.consent.invalid .consent-check { color: var(--error); }
.consent.invalid .consent-check input { outline: 2px solid var(--error); outline-offset: 1px; }
.consent.invalid .consent-check input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; } /* focus must differ from error */
.form-assure { font-size: 12px; line-height: 1.45; color: var(--muted); margin: 0 0 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.form-status:empty { display: none; }
.form-status.error { color: var(--error); }

.template-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 14px 0 2px; padding: 0; border: 0; min-width: 0; }
.template { display: block; border: 1px solid #ddd; border-radius: 7px; padding: 6px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.template:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.template:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.template span { display: block; }
.template .bar { height: 6px; border-radius: 2px; background: var(--sample); margin-bottom: 7px; }
.template .block { height: 30px; background: #e8e8e8; border-radius: 3px; margin-bottom: 5px; }
.template .lines { height: 4px; background: #ddd; margin: 3px 0; border-radius: 2px; }
.template .tname { font-size: 12px; line-height: 1.25; margin-top: 5px; }
/* "Помогите выбрать": same height as a sample, drawn as an empty slot. */
.template .help-mark {
  height: 61px; display: grid; place-items: center; border: 1px dashed #b5b5b5; border-radius: 4px;
  font-size: 17px; font-weight: 550; color: var(--muted);
}
.template:nth-of-type(2) .block { background: linear-gradient(90deg, #e8e8e8 47%, #fff 47%, #fff 53%, #ddd 53%); }
.template:nth-of-type(3) .block { background: linear-gradient(90deg, #dce1e5 65%, #fff 65%, #fff 70%, #e4e4e4 70%); }
.template:nth-of-type(4) .block { background: repeating-linear-gradient(90deg, #e2e7e4 0%, #e2e7e4 29%, #fff 29%, #fff 35%); }
.template:nth-of-type(5) .block { background: linear-gradient(0deg, #e4e0db 42%, #fff 42%, #fff 50%, #e4e0db 50%); }

.modal-done { text-align: center; padding: 18px 8px 6px; }
.done-icon { width: 52px; height: 52px; border-radius: 50%; background: #edf4ef; color: var(--live); display: grid; place-items: center; margin: 0 auto 14px; }
.done-icon svg { width: 26px; height: 26px; }
.modal-done h3 { font-size: 22px; letter-spacing: -.03em; margin: 0 0 6px; font-weight: 600; outline: none; }
.modal-done p { font-size: 14px; color: var(--muted); margin: 0 0 20px; }

.mobile-shade { display: none; }

/* ---------- Input: hover only where a pointer can hover; touch gets :active instead ---------- */
/* On touch screens a :hover style sticks after the tap (a card stays grey after its dialog closes). */
@media (hover: hover) {
  .nav a:not(.active):hover { background: #ededed; }
  .side-bottom button:hover { text-decoration: underline; }
  .crumb a:hover { color: var(--ink); text-decoration: underline; }
  .button:hover { background: #343434; }
  .button.light:hover { background: #f5f5f5; }
  a.role:hover { background: #f8f8f8; }
  .footer a:hover, .footer-links button:hover { color: var(--ink); text-decoration: underline; }
  .service:hover { border-color: #d4d4d4; }
  .action:hover, .zone-action:hover { text-decoration: underline; }
  .action.action-primary:hover { background: #343434; text-decoration: none; }
  .demo-link:hover { text-decoration: underline; }
  .close:hover { background: #f2f2f2; }
  .consent-docs a:hover { color: var(--ink); }
  .template:hover { border-color: #b5b5b5; }
}
/* Press feedback (the tap highlight is turned off above). */
.button:active, .action.action-primary:active { background: #343434; }
.button.light:active { background: #ededed; }
a.role:active, .service:has(.action:active) { background: #f6f6f6; }
.service.soon:has(.action:active) { background: #efefef; }
.nav a:active { background: #e6e6e6; }
.close:active { background: #ededed; }

/* Touch screens of any width (tablets too): every target at least 44px tall. */
@media (pointer: coarse) {
  .nav a { min-height: 46px; }
  .side-bottom button, .demo-link { min-height: 44px; }
  .crumb a, .footer-links a, .footer-links button, .footer-docs a, .consent-docs a, .zone-action { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- Wide screens: content stays next to the navigation ---------- */
/* Centred, the column drifted away from the sidebar (about 290px of gap at 1920, 610px at 2560). */
@media (min-width: 1600px) {
  .content { margin-left: 0; }
  .top { padding: 0 calc(100% - 1142px) 0 48px; } /* button lines up with the column's right edge */
}

/* ---------- ≤1100: small laptops and tablets in landscape ---------- */
/* The narrowest desktop band: five step columns and the two-part mission strip get cramped. */
@media (max-width: 1100px) {
  .creator-hero { grid-template-columns: 1fr; }
  .demo { max-width: 520px; } /* its contents are fixed small type; stretched, it is mostly empty */
  .mission { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { display: grid; grid-template-columns: 35px 1fr; column-gap: 6px; padding: 11px 0; }
  .step .num { grid-row: span 2; }
  .step h3 { margin: 0 0 4px; }
}

/* ---------- ≤1000: tablet ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: calc(200px + env(safe-area-inset-left, 0px)) minmax(0, 1fr); }
  .content { padding: var(--page-top) max(28px, env(safe-area-inset-right)) var(--space-6) 28px; }
  .top { padding: 0 max(28px, env(safe-area-inset-right)) 0 28px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: clamp(44px, 7vw, 54px); }
  /* 40px floor: at 651px "Автомобильный мир." still fits next to the sidebar. */
  .homehero h1 { font-size: clamp(40px, 6.2vw, 58px); }
  .creator-hero h1 { font-size: 48px; }
  .econ-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .econ-grid div:last-child { grid-column: span 2; border-left: 0; border-top: 1px solid var(--line); padding: 13px 0 0; }

  /* Three equal roads (home, 404): one per row instead of 2 + 1 with one left alone.
     Each card becomes a row: icon | title and text | arrow (the arrow's words stay for screen readers). */
  .grid.roles { grid-template-columns: 1fr; }
  .roles .role { display: grid; grid-template-columns: 46px minmax(0, 1fr) 18px; column-gap: var(--space-4); align-items: center; min-height: 0; padding: 18px 20px; }
  .roles .role .iconbox { grid-row: 1 / span 2; }
  .roles .role h3 { grid-column: 2; margin: 0 0 2px; align-self: end; }
  .roles .role p { grid-column: 2; align-self: start; }
  .roles .role .go { grid-column: 3; grid-row: 1 / span 2; margin: 0; padding: 0; font-size: 0; }

  /* About: next to the 200px sidebar three value columns get ~110px and «и ответственность.»
     (one unbreakable line) spills over; one value per row, icon beside the text. */
  .values { grid-template-columns: 1fr; gap: 0; }
  .value { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: var(--space-2); padding: var(--space-3) 0; }
  .value svg { grid-row: span 2; margin: 1px 0 0; }
}

/* ---------- Short landscape screens: let the sidebar scroll with the page ---------- */
@media (max-height: 520px) and (min-width: 651px) {
  .side-inner { position: static; height: auto; min-height: 0; }
  .side-head { margin-bottom: 24px; }
}

/* ---------- Compact service card ---------- */
/* The icon moves beside the status and the title, so long lists scroll less. Used on phones
   (below), in a one-column catalog (a tablet with a scrollbar), and in the buyers' stages
   whenever they are stacked. Same rules, scoped to each context. */
@container (max-width: 803px) {
  .journey .service { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; column-gap: 12px; min-height: 0; padding: 14px; }
  .journey .cardtop { display: contents; }
  .journey .service .iconbox { grid-column: 1; grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 10px; }
  .journey .service .status { grid-column: 2; align-self: end; }
  .journey .service h3 { grid-column: 2; font-size: 16px; margin: 2px 0 0; }
  .journey .service p { grid-column: 1 / -1; margin: 10px 0 2px; }
  .journey .service .action { grid-column: 1 / -1; }
}
@container (max-width: 479px) {
  .catalog-grid .service { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; column-gap: 12px; min-height: 0; padding: 14px; }
  .catalog-grid .cardtop { display: contents; }
  .catalog-grid .service .iconbox { grid-column: 1; grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 10px; }
  .catalog-grid .service .status { grid-column: 2; align-self: end; }
  .catalog-grid .service h3, .catalog-grid .service h4 { grid-column: 2; margin: 2px 0 0; }
  .catalog-grid .service:not(.flagship) h3, .catalog-grid .service h4 { font-size: 16px; }
  .catalog-grid .service p { grid-column: 1 / -1; margin: 10px 0 2px; }
  .catalog-grid .service .site-previews, .catalog-grid .service .action { grid-column: 1 / -1; }
  .catalog-grid .service .action-primary { justify-self: start; margin-top: var(--space-2); }
}

/* ---------- ≤650: phone ---------- */
/* Everything the thumb needs sits at the bottom: a bar with the menu and the contact button,
   and both the menu and the lead form open as sheets rising from it. */
@media (max-width: 650px) {
  /* Bottom bar height: 10px + 46px button + 1px border + the home-indicator inset (at least 10px). */
  :root {
    --dock: calc(57px + max(10px, env(safe-area-inset-bottom)));
    --gap-group: var(--space-5); --gap-section: var(--space-6); --gap-zone: var(--space-7); --page-top: var(--space-5);
  }
  html { scroll-padding-bottom: var(--dock); } /* a focused field never ends up under the bar */
  .layout { display: block; }

  /* Menu sheet */
  .sidebar {
    display: none; position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; width: min(100%, 520px); margin: 0 auto;
    border: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 40px #0002;
  }
  .sidebar.open { display: block; }
  .side-inner {
    position: static; height: auto; min-height: 0;
    max-height: min(88vh, 600px); max-height: min(88dvh, 600px); overflow-y: auto; overscroll-behavior: contain;
    padding: 12px max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .side-head { margin: 0 0 8px; }
  .brand { padding: 0 9px; }
  .brand img { width: 84px; }
  .side-close { display: grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; border-radius: 9px; color: #333; }
  .nav a { font-size: 16px; min-height: 50px; padding: 0 12px; }
  .nav a svg { width: 21px; height: 21px; }
  .side-bottom { margin-top: 10px; padding: 12px 12px 0; border-top: 1px solid #ebebeb; }
  .mobile-shade.open { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .33); z-index: 8; }

  /* Header: just the logo, scrolls away with the page */
  .top { height: 60px; padding: 0 max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)); }
  .crumb { display: none; }
  .mobhead { display: flex; align-items: center; }
  .mobhead a { display: block; padding: 6px 8px; }
  .mobhead img { width: 72px; display: block; }

  /* Bottom bar: menu on the left, contact on the right under the thumb */
  .top-right {
    position: fixed; z-index: 7; left: 0; right: 0; bottom: 0; gap: 8px;
    padding: 10px max(14px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(1.6) blur(10px); backdrop-filter: saturate(1.6) blur(10px);
    border-top: 1px solid #ececec;
  }
  .top-right .button { height: 46px; font-size: 14px; }
  .top-right .button:not(#menu) { flex: 1; }
  #menu { display: inline-flex; padding: 0 16px; }
  #menu svg { width: 18px; height: 18px; }

  .content { padding: var(--page-top) max(18px, env(safe-area-inset-right)) calc(var(--space-5) + var(--dock)) max(18px, env(safe-area-inset-left)); }

  /* Headlines size to the column (container units), so line breaks land where the copy intends:
     at 8.8 whole second lines like "автомобиль онлайн." and "Такой страницы нет." fit; at 9.5 "Автомобильный мир."
     does. Two-word lines that are wider ("Возможностей больше.") still break into one word per line.
     The divisors assume the h1 tracking below; retune them if the tracking changes. */
  .hero { container-type: inline-size; }
  .hero h1, .creator-hero h1 { font-size: clamp(26px, (100vw - 36px) / 8.8, 40px); font-size: clamp(26px, 100cqi / 8.8, 40px); letter-spacing: -.055em; }
  .homehero h1 { font-size: clamp(24px, (100vw - 36px) / 9.5, 52px); font-size: clamp(24px, 100cqi / 9.5, 52px); }
  .hero p { font-size: 15px; }
  .eyebrow { font-size: 11px; margin-bottom: var(--space-3); }
  .homehero { text-align: left; margin-bottom: var(--space-5); }
  .homehero + .section-title { justify-content: flex-start; }
  .homehero p { font-size: 15px; }

  .grid { grid-template-columns: 1fr; }
  .role { min-height: 158px; padding: 17px; }
  .role h3 { margin-top: 12px; font-size: 20px; }
  .role .iconbox { width: 37px; height: 37px; }
  .role .go { padding-top: 12px; }
  .roles .role { grid-template-columns: 38px minmax(0, 1fr) 18px; column-gap: 14px; padding: 14px 16px; }
  .roles .role .iconbox { width: 38px; height: 38px; }
  .roles .role h3 { font-size: 18px; margin: 0 0 2px; }
  .section-title h2 { font-size: 20px; }
  .section-title span { font-size: 12px; }
  .zone-action { margin-left: 0; } /* wraps under the heading, starting at the left edge */
  .mission { padding-top: var(--space-5); gap: var(--space-5); }
  .mission h2 { font-size: 23px; }
  .principles { gap: var(--space-2); }
  .principle b { font-size: 13px; }
  .principle span { font-size: 12px; }
  .value h3 { font-size: 16px; }

  .footer { flex-direction: column; align-items: flex-start; gap: var(--space-1); font-size: 12px; }
  .footer-links, .footer-docs { flex-direction: column; align-items: flex-start; gap: 0; }
  .footer-docs { flex-basis: auto; border-top: 1px solid var(--line); margin-top: var(--space-1); padding-top: var(--space-1); align-self: stretch; }
  .footer-links a, .footer-links button, .footer-docs a { display: inline-flex; align-items: center; min-height: 44px; }
  .consent-docs a { min-height: 44px; }

  /* Compact service cards (see the note above the container rule). */
  /* Rows: status | title | description (takes spare height, so in two columns the CTAs line up) | action */
  .service { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; column-gap: 12px; min-height: 0; padding: 14px; }
  .cardtop { display: contents; }
  .service .iconbox { grid-column: 1; grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 10px; }
  .service .status { grid-column: 2; align-self: end; }
  .service h3, .service h4 { grid-column: 2; font-size: 16px; margin: 2px 0 0; }
  .service p { grid-column: 1 / -1; margin: 10px 0 2px; }
  .service .site-previews, .service .action { grid-column: 1 / -1; }
  .service .action-primary { justify-self: start; margin-top: var(--space-2); }
  .callout { display: block; padding: var(--space-4); }
  .callout .button { margin-top: var(--space-3); }
  .creator-hero { gap: var(--space-5); }
  .econ-grid strong { font-size: 26px; }
  .econ-grid div:last-child strong { font-size: 34px; }
  .economy { padding: var(--space-4); }
  .aboutblock { font-size: 17px; }

  /* Lead form: a bottom sheet, so the submit button lands in the thumb zone */
  .modal {
    width: min(100%, 570px); margin: auto auto 0; border-radius: 18px 18px 0 0;
    max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px);
  }
  .modal-inner { padding: 20px max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }
  .modal h2 { font-size: 22px; }
  .form-row { grid-template-columns: 1fr; }
  .field input, .field textarea, .field select { font-size: 16px; } /* 16px stops iOS from zooming in on focus */
  .template-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .template { padding: 5px; }
  .template .block { height: 24px; }
  .template .help-mark { height: 55px; }
  #modal-submit { width: 100%; height: 46px; }
}

/* Sheets rise a little as they open (entry only; closing is instant). */
@media (max-width: 650px) and (prefers-reduced-motion: no-preference) {
  .sidebar.open, .modal[open] { transition: transform .34s cubic-bezier(.16, 1, .3, 1), opacity .2s ease-out; }
  .mobile-shade.open, .modal[open]::backdrop { transition: opacity .2s ease-out; }
  @starting-style {
    .sidebar.open, .modal[open] { transform: translateY(28px); opacity: 0; }
    .mobile-shade.open, .modal[open]::backdrop { opacity: 0; }
  }
}

/* Very narrow screens (folded phones, ~280px): the three principles stack instead of overflowing. */
@media (max-width: 340px) {
  .principles { grid-template-columns: 1fr; }
  /* «20 000 ₽» does not fit a half-width cell: the income example becomes one column. */
  .econ-grid { grid-template-columns: 1fr; }
  .econ-grid div + div { border-left: 0; padding-left: 0; }
  .econ-grid div:last-child { grid-column: auto; }
}

/* Large phones and small tablets in portrait (520–650px): the two «Другие возможности» cards
   on /creators sit side by side. (Catalog grids follow their own width, see .catalog.) */
@media (min-width: 520px) and (max-width: 650px) {
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones held sideways in the phone layout: a slimmer bottom bar (targets stay 44px). */
@media (max-width: 650px) and (max-height: 430px) {
  :root { --dock: calc(51px + max(6px, env(safe-area-inset-bottom))); }
  .top-right { padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  .top-right .button { height: 44px; }
}

/* ---------- Print: documents and pages on paper or as PDF ---------- */
@media print {
  @page { margin: 16mm; }
  body { font-size: 11pt; color: #000; }
  .layout { display: block; }
  .sidebar, .mobile-shade, .top, .skip, .modal, .footer-links, .footer-docs, .callout, .action, .button, .demo-link, .zone-action { display: none !important; }
  .content { max-width: none; padding: 0; }
  .hero h1 { font-size: 26pt; letter-spacing: -.03em; }
  .prose p, .prose li { color: #000; }
  .prose a[href^="/"]::after { content: " (d13.ai" attr(href) ")"; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; }
  .prose h2 { break-after: avoid; }
  .service, .role, .step, .economy, .demo, .stage-head { break-inside: avoid; }
}

/* Windows high-contrast: box-shadows vanish, so the chosen template needs a real outline. */
@media (forced-colors: active) {
  .template:has(input:checked) { outline: 3px solid CanvasText; outline-offset: 1px; }
  .template:has(input:focus-visible) { outline: 3px solid Highlight; outline-offset: 4px; }
  .status .dot { forced-color-adjust: none; }
  /* Shadows vanish too, so the dialog and the phone menu sheet need a real edge. */
  .modal { border: 1px solid CanvasText; }
}
@media (forced-colors: active) and (max-width: 650px) {
  .sidebar.open { border-top: 1px solid CanvasText; }
  .modal { border-bottom: 0; }
}
