/* ═══════════════════════════════════════════════════════
   catalog.css — showcase / catalog pages (shared by the local admin and the built site)
   Theme: body.light — by the system or the visitor's choice (moto.js, layout.php).
   ═══════════════════════════════════════════════════════ */

:root {
  /* --primary: buttons, links, active states — "графит", chosen 2026-11-23 on live pages
     from eight (steel, olive, sand, pine, indigo, copper, petrol…); steel before it. --promo:
     only badges and plaques — "новое", "акция", "срочно" — red is never the main colour. */
  --primary: #cfcfcf;
  --primary-fg: #141414;
  --promo: #e63a00;
  /* A partner's promo price (2026-11-27): amber with dark text — a price tag, apart from red «НОВОЕ» */
  --sale: #f59f00;
  --sale-fg: #1a1a1a;
  /* Card art drawn inline (art_*.php): follows the theme, neutral greys. */
  --art-bg: #1c1c1b;
  --art-fill: #2a2928;
  --art-line: #6f6b66;
  --art-soft: #3a3836;
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --muted: #8a8a8a;
  --accent: #e63a00;
  --buy: #2f6fd6;
  --placeholder: #222;
}
body.light {
  --primary: #2f2f2f;
  --primary-fg: #fff;
  --art-bg: #eceae6;
  --art-fill: #ffffff;
  --art-line: #8c8882;
  --art-soft: #d9d6d1;
  --bg: #fafafa;
  --surface: #fff;
  --border: #e4e4e4;
  --text: #1a1a1a;
  --muted: #777;
  --placeholder: #ececec;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.4;
}
/* Links (2026-12-02, owner): the site's own colour, never the browser's blue / visited purple.
   Specific rules below (menu, cards, footer) still override this. */
a { color: var(--primary); text-underline-offset: 2px; }
/* Small print in the footer (legal links, email): the muted colour of its own line */
.footer-note a { color: inherit; }

main { max-width: 1200px; margin: 0 auto; padding: 0 16px 48px; }

/* ── Header ───────────────────────────────────────────── */
.site-header {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1200px; margin: 0 auto; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; white-space: nowrap; }
body.light .placeholder { filter: invert(1); }
.logo .logo-light, body.light .logo .logo-dark { display: none; }
body.light .logo .logo-light { display: block; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.theme-btn {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 8px; cursor: pointer; color: var(--text); font-size: 16px; line-height: 1.4;
}
/* ☰: a full 44px finger target, set apart from "Подать" (owner, 2026-11-21). */
.menu-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
  color: var(--text); font-size: 22px; line-height: 1;
}
.header-cta {
  background: var(--primary); color: var(--primary-fg); text-decoration: none; font-weight: 600;
  font-size: 14px; padding: 6px 12px; border-radius: 6px; white-space: nowrap;
}
.wide-only { display: none; }

/* Menu — phone: a panel under the header, opened by ☰. Raised (shadow, frame, its own
   background) so its edges are clear against the page (2026-11-21). */
.main-nav {
  display: none; position: absolute; top: calc(100% + 6px); left: 10px; right: 10px; z-index: 10;
  flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28); overflow: hidden;
}
.main-nav a:first-child { border-top: 0; }
.main-nav .nav-lang { padding: 10px 12px; border-top: 1px solid var(--border); }
.main-nav .nav-lang a { padding: 6px 8px; border: 0; }
.main-nav.is-open { display: flex; }
.main-nav a { color: var(--text); text-decoration: none; padding: 14px 16px; border-top: 1px solid var(--border); }
.main-nav a.is-active { color: var(--primary); font-weight: 600; }

/* Menu — desktop: one line next to the logo */
@media (min-width: 860px) {
  .main-nav, .main-nav.is-open {
    display: flex; position: static; flex-direction: row; gap: 18px;
    background: none; border: 0; margin-right: auto; margin-left: 24px; font-size: 14px;
  }
  .main-nav, .main-nav.is-open { flex: 1; border-radius: 0; box-shadow: none; overflow: visible; align-items: center; }
  .main-nav a { color: var(--muted); padding: 0; border: 0; }
  .main-nav .nav-lang { display: none; }
  .main-nav .lang-menu { display: block; margin-left: auto; }
  .main-nav a:hover { color: var(--primary); }
  .menu-btn { display: none; }
  .wide-only { display: inline; }
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
  max-width: 1200px; margin: 48px auto 0; padding: 24px 16px 32px;
  border-top: 1px solid var(--border); font-size: 14px;
}
/* One line; wraps only if the phone is too narrow for all of them. */
.footer-social { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-social a { color: var(--muted); text-decoration: none; }
.footer-social a:hover { color: var(--primary); }
.footer-contact { margin-top: 16px; color: var(--muted); }
.footer-contact a { color: var(--primary); }
.footer-note { margin-top: 20px; color: var(--muted); font-size: 12px; }
.footer-privacy { margin-top: 4px; }

.tagline { color: var(--muted); font-size: 15px; margin: 20px 0 8px; }

/* ── Sections & grid ──────────────────────────────────── */
.shelf { margin-top: 28px; }
.shelf h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--primary); margin-bottom: 14px;
}
/* A shelf's one-line explanation under the heading (examples shelf, 2026-11-26) */
.shelf-intro { margin: -6px 0 14px; color: var(--muted); font-size: 14px; }
.shelf-intro a { color: var(--primary); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px)  { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
/* Home shelves hold 8 cards (HOME_ADS_LIMIT): at 3 columns show 6 — two full rows (2026-12-01) */
@media (min-width: 700px) and (max-width: 1099.98px) { .grid-cap > :nth-child(n+7) { display: none; } }
/* The home archive shelf: 4 cards, at 3 columns only 3 — one row on a tablet (2026-12-02) */
@media (min-width: 700px) and (max-width: 1099.98px) { .grid-archive > :nth-child(n+4) { display: none; } }

.empty { color: var(--muted); font-size: 14px; padding: 16px; border: 1px dashed var(--border); border-radius: 8px; }
.more { display: inline-block; margin-top: 14px; color: var(--primary); text-decoration: none; font-weight: 600; }

/* ── Card ─────────────────────────────────────────────── */
.card {
  display: block; color: inherit; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  transition: border-color .15s;
}
.card:hover { border-color: var(--primary); }
/* Invitation in place of a missing ad: same size, clearly not a product. */
.card-invite {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 220px; padding: 16px; text-align: center;
  background: transparent; border: 2px dashed var(--border);
}
.invite-plus { font-size: 40px; line-height: 1; color: var(--primary); }
.invite-text { font-size: 14px; color: var(--muted); }
.invite-cta { font-size: 14px; font-weight: 700; color: var(--primary); }
.card-photo { position: relative; aspect-ratio: 1 / 1; background: var(--placeholder); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-photo .placeholder { object-fit: contain; padding: 30%; opacity: .35; }

/* Card labels (2026-12-01, owner): one thin line across the top of the photo, Latin in every
   language (NEW, PROMO, PARTNER, BUY, EXAMPLE, ARCHIVE) — one style, all fit one row; a dark
   band under them so the photo does not drown them. Colour is the text, not a box. */
.badges { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 10px; flex-wrap: nowrap; overflow: hidden;
  padding: 4px 8px; background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.badges:not(:has(.badge)) { display: none; }
.badge { font-size: 10px; font-weight: 700; letter-spacing: .8px; line-height: 14px; white-space: nowrap; color: #fff; }
.badge-new { color: #ff7a4d; }
.badge-buy { color: #7fb0ff; }
/* A partner's promo price (bot 2.9.0, 2026-11-27): the promo price first, the usual one
   crossed out after it. Past the last day the script in moto.js adds .promo-over and the
   usual price comes back, even if no build has run since. */
.badge-promo { color: var(--sale); }
.price-new, .price-old { white-space: nowrap; }
.price-old { color: var(--muted); font-weight: 400; font-size: .7em; margin-left: 6px; }
.card-price .price-old { font-size: 13px; }
.promo-note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.promo-over .price-new, .promo-over .badge-promo, .promo-over .promo-note { display: none; }
.promo-over .price-old { text-decoration: none; color: inherit; font-size: inherit; font-weight: inherit; margin-left: 0; }
/* A dealer is a status, not a promo: plain white, not red. */
.badge-dealer { color: #fff; }
.badge-example { color: #cfcfcf; }
.badge-archive { color: #bdbdbd; }
.badge-admin { color: #fff; background: #555; padding: 0 5px; border-radius: 3px; } /* admin only */

/* Archive (CATALOG.md §8) */
.page-intro { color: var(--muted); margin-top: 6px; max-width: 720px; font-size: 15px; }
.page-intro a { color: var(--primary); }
.archive-note {
  margin-top: 16px; padding: 10px 14px; font-size: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--muted); border-radius: 6px;
}
.archive-note.is-admin { border-left-color: var(--primary); }
.more-archive { display: block; color: var(--muted); }
/* Archive look (2026-11-21): a muted, nearly black-and-white photo — never mistaken
   for a live ad; colour comes back on hover (desktop), so it reads as real machinery.
   A film-camera date stamp ("08 '26" — month the ad was posted) in the corner
   (owner's choice of the two variants, 2026-11-21). */
.archive-photo { outline: 1px solid var(--border); outline-offset: -1px; }
.archive-photo img { filter: grayscale(.9) contrast(.92) brightness(1.03); transition: filter .3s; }
@media (hover: hover) { .card:hover .archive-photo img, .archive-photo:hover img { filter: none; } }
.is-archive .card-title { color: var(--muted); }
.archive-stamp {
  display: block; position: absolute; right: 10px; bottom: 8px; pointer-events: none;
  font: 600 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em;
  color: #ffa24a; text-shadow: 0 0 6px rgba(255, 110, 0, .55), 0 1px 1px rgba(0, 0, 0, .6);
}
.card .archive-stamp { font-size: 12px; right: 8px; bottom: 6px; }
/* Paid full history teaser: a count and a lock, quiet grey — never the content. */
.archive-more {
  margin-top: 8px; padding: 12px 14px; display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--muted); background: var(--surface);
  border: 1px dashed var(--border); border-radius: 8px;
}
.item-facts .locked { color: var(--muted); letter-spacing: .15em; display: flex; align-items: center; gap: 6px; }
.lock { flex: none; opacity: .8; }
.archive-full {
  margin-top: 18px; padding: 12px 14px; font-size: 14px; color: var(--muted);
  border-left: 3px solid var(--border); background: var(--surface); border-radius: 0 6px 6px 0;
}

.card-body { padding: 10px 12px 12px; }
/* The item first, the price second: whoever wants it will see it, but it must not
   catch the eye before the name (2026-11-19). */
.card-title {
  font-size: 15px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.8em;
}
.card-kicker, .item-kicker { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.item-kicker { font-size: 13px; margin-bottom: 4px; }
.card-price { font-size: 14px; font-weight: 500; margin-top: 6px; }
.card-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Category chips (horizontal scroll on phones) ─────── */
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; margin-top: 12px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); text-decoration: none; font-size: 14px; white-space: nowrap;
}
.chip span { color: var(--muted); font-size: 12px; margin-left: 2px; }
.chip:hover { border-color: var(--primary); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.chip.is-active span { color: rgba(255,255,255,.75); }

/* ── Listing pages ────────────────────────────────────── */
.breadcrumbs { font-size: 13px; color: var(--muted); margin-top: 16px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }
.page-title { font-size: 26px; margin-top: 8px; }

/* ── Item page ────────────────────────────────────────── */
/* 2026-12-01 (owner): text and tables apart. Phone — photos, price and buttons, seller and
   spec tables, then the description. Computer — photos with the description under them on
   the left; price, buttons, seller and tables on the right, sticking while you read
   (moto.js adds .is-sticky only when the column fits the screen). */
.item-page { display: grid; gap: 24px; margin-top: 16px; grid-template-areas: "gallery" "info" "text"; }
.item-gallery { grid-area: gallery; min-width: 0; }
.item-info { grid-area: info; min-width: 0; }
.item-text { grid-area: text; min-width: 0; }
.item-text:empty { display: none; }
@media (min-width: 860px) {
  .item-page { grid-template-columns: 1.2fr 1fr; grid-template-rows: auto 1fr; align-items: start;
    grid-template-areas: "gallery info" "text info"; column-gap: 40px; }
  .item-info.is-sticky { position: sticky; top: 16px; }
}
.item-specs { margin-top: 8px; }
.item-text .item-description { margin-top: 8px; font-size: 16px; line-height: 1.6; }
.item-text > .spec-h:first-child { margin-top: 0; }

.slider { position: relative; overflow: hidden; border-radius: 8px; background: var(--placeholder); }
.slider-track { display: flex; transition: transform .3s ease; }
.slide { flex: 0 0 100%; aspect-ratio: 4 / 3; }
.slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.5); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}
.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }
.slider-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.slider-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; }
.slider-dots .dot.active { background: var(--primary); }

.badges.static { position: static; display: inline-flex; margin-bottom: 8px; border-radius: 4px; }
.item-title { font-size: 24px; line-height: 1.25; }
.item-price { font-size: 28px; font-weight: 700; margin-top: 8px; }
.item-info .cta { margin-top: 16px; }
.item-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin-top: 20px; font-size: 14px; }
.item-facts dt { color: var(--muted); }
.item-description { margin-top: 20px; font-size: 15px; white-space: normal; overflow-wrap: anywhere; }
.item-description > p + p, .item-description > * + p { margin-top: 12px; }
/* A partner's description in blocks (2026-11-26): specs as a table, long lists as lists */
.spec-h { margin-top: 24px; font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); font-weight: 700; }
.spec { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; margin-top: 8px; }
.spec:not(:first-child) { margin-top: 12px; }
.spec-h + .spec { margin-top: 8px; }
.spec dt, .spec dd { padding: 8px 0; border-top: 1px solid var(--border); }
.spec dt { color: var(--muted); padding-right: 12px; }
.spec dt:last-of-type, .spec dd:last-of-type { border-bottom: 1px solid var(--border); }
.spec-list { margin-top: 8px; padding-left: 20px; display: grid; gap: 4px; }
.spec-list li::marker { color: var(--muted); }
/* Phones: the name over its value — long values ("Привод") get the full width */
@media (max-width: 500px) {
  .spec { grid-template-columns: 1fr; }
  .spec dt { padding: 8px 0 0; }
  .spec dd { border-top: 0; padding: 2px 0 8px; }
  .spec dt:last-of-type { border-bottom: 0; }
}
.item-note { margin-top: 20px; font-size: 12px; color: var(--muted); }

/* ── Call to action ───────────────────────────────────── */
.cta {
  display: block; margin-top: 36px; padding: 18px; text-align: center;
  background: var(--primary); color: var(--primary-fg); border-radius: 8px;
  text-decoration: none; font-weight: 700;
}

/* ── Admin only (never present in built pages) ────────── */
.admin-bar { background: #3a2a00; color: #f0a500; font-size: 12px; text-align: center; padding: 6px; }
.admin-bar a { color: #f0a500; }
/* Sponsors (2026-11-24): the /sponsors/ cards, the category list, the footer strip. */
.sponsor-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin: 20px 0 8px; }
.sponsor-card { position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--surface); }
.sponsor-ad { position: absolute; top: 12px; right: 14px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sponsor-head { display: flex; gap: 12px; align-items: center; }
.sponsor-name { font-size: 19px; margin: 0; }
.sponsor-line, .sponsor-offer { margin-top: 10px; font-size: 15px; line-height: 1.5; }
.sponsor-card .about-more { margin-top: 12px; }
.share-row { margin-top: 10px; }
.showcase { margin-top: 28px; scroll-margin-top: 16px; }
.showcase-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.showcase .join-list ul { margin-bottom: 12px; }
.showcase-free { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 8px; background: var(--surface); }
.showcase-grid img { width: 100%; max-width: 360px; height: auto; border-radius: 12px; }
.offer-page { max-width: 760px; }
.offer-sec { scroll-margin-top: 16px; }
.offer-needs { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
@media (min-width: 600px) { .offer-needs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .offer-needs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.offer-need { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; }
.offer-need:hover { border-color: var(--primary); }
.offer-need-q { font-size: 13px; color: var(--muted); line-height: 1.35; }
.offer-need-name { font-size: 17px; font-weight: 700; }
.offer-need-text { font-size: 14px; line-height: 1.4; flex: 1; }
.offer-need-price { font-weight: 700; margin-top: 4px; }
.offer-page .join-launch { margin-top: 24px; }
.offer-sec .join-offer { margin-top: 12px; }
.offer-more { margin: 10px 0 0; }
.offer-link { margin: 18px 0 0; font-weight: 600; }
.visit-compare .table-wrap { overflow-x: auto; margin: 8px 0 18px; border: 1px solid var(--border); border-radius: 10px; }
.visit-compare table { display: table; border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.visit-compare th, .visit-compare td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.visit-compare th { font-weight: 700; }
.visit-compare tbody tr:last-child td { border-bottom: 0; }
.visit-compare td:first-child { color: var(--muted); font-weight: 600; }
.visit-compare tbody tr:nth-last-child(-n+2) td { font-weight: 700; } /* the two price rows */
.visit-compare.is-col-3 :is(th, td):nth-child(3), .visit-compare.is-col-4 :is(th, td):nth-child(4) { background: var(--surface); }
.visit-compare.is-col-3 th:nth-child(3), .visit-compare.is-col-4 th:nth-child(4) { box-shadow: inset 0 3px 0 var(--primary); }
.short-video { width: 100%; max-width: 320px; aspect-ratio: 9 / 16; }
.short-video iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; }
.join-faq p { margin-bottom: 12px; }
@media (min-width: 700px) { .showcase-grid { grid-template-columns: 220px 1fr; } }
.dir-verified a { color: inherit; text-underline-offset: 2px; }
.share-link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.share-link::before { content: "↗ "; text-decoration: none; display: inline-block; }
.dir-sponsor { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: .5px; padding: 3px 7px; border-radius: 4px; background: var(--primary); color: var(--primary-fg); text-transform: uppercase; }
.dir-verified a.dir-sponsor { color: var(--primary-fg); text-decoration: none; }
.sponsor-slots .muted { color: var(--muted); }
.footer-sponsors { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.footer-sponsors-title { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; }
.footer-sponsor { display: inline-flex; align-items: center; height: 32px; color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-sponsor img { height: 32px; width: auto; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.footer-sponsor:hover img { filter: none; opacity: 1; }
.contracts-list { list-style: none; margin: 16px 0; padding: 0; font-size: 16px; }
.contracts-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.contract-body { max-width: 760px; }
.contract-mark { background: #f0a500; color: #1a1a1a; padding: 0 3px; border-radius: 3px; }
.item { display: flex; flex-direction: column; }
.item .card { flex: 1; }
.item.is-dimmed .card { opacity: .5; }
/* Two columns: category | brand, then the model across, then the buttons — five
   controls in one row squeezed the selects to bare arrows (2026-11-21). */
.admin-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.admin-controls form { min-width: 0; }
.admin-controls .admin-model { grid-column: 1 / -1; }
.admin-controls select, .admin-controls button, .admin-model input {
  width: 100%; font: inherit; font-size: 12px; padding: 5px 6px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
}
.item-admin { margin-top: 12px; max-width: 360px; }
.inbox { background: rgba(240,165,0,.08); border: 1px solid #f0a500; border-radius: 8px; padding: 14px; }
.inbox h2 { color: #f0a500; }
.inbox + .inbox { margin-top: 20px; }
/* Ads on review and their maib payment (admin only, 2026-12-01) */
.pending-list { display: flex; flex-direction: column; gap: 12px; }
.pending-ad { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.pending-ad img { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; flex: none; }
.pending-body { min-width: 0; flex: 1; font-size: 14px; }
.pending-body p { margin: 0 0 6px; }
.pending-text { color: var(--muted); }
.admin-pay { margin-top: 8px; padding: 8px; border: 1px dashed #f0a500; border-radius: 6px; font-size: 13px; }
.admin-pay p { margin: 4px 0; }
.admin-pay.is-error { color: #e63a00; }
.admin-pending { font-weight: 700; color: #fff; background: #e63a00; padding: 1px 6px; border-radius: 4px; text-decoration: none !important; }
.admin-pay-env { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: #f0a500; }
.admin-pay-link { display: flex; gap: 6px; margin: 4px 0; }
.admin-pay-link input { flex: 1; min-width: 0; font-size: 12px; }
.admin-pay-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-pay-ids, .admin-pay-ids code { font-size: 11px; color: var(--muted); word-break: break-all; }
.admin-pay-refund input { width: 100%; margin: 4px 0; }
.admin-step { margin-top: 32px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ── "How to submit" guide (/catalog/sell/) ───────────── */
.guide { margin: 32px 0 0; padding: 0; list-style: none; counter-reset: step; max-width: 720px; }
.guide-step { position: relative; padding: 0 0 22px 56px; counter-increment: step; }
.guide-step::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: var(--primary-fg);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.guide-step:first-child::before { content: "!"; background: #f0a500; }
.guide-step h2 { font-size: 18px; margin: 6px 0 6px; }
.guide-step p { margin: 0; font-size: 15px; line-height: 1.55; }
.cmd { padding: 1px 6px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; }
.guide-tips { max-width: 720px; font-size: 15px; color: var(--muted); }
.vote { margin-top: 40px; padding: 20px; border: 1px dashed var(--border); border-radius: 8px; max-width: 720px; }
.vote h2 { font-size: 20px; margin: 0 0 6px; }
.vote p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.vote-btn {
  padding: 12px 20px; border-radius: 8px; border: 2px solid var(--primary); background: transparent;
  color: var(--primary); font-weight: 700; font-size: 15px; cursor: pointer;
}
.vote-btn:disabled { opacity: .5; cursor: default; }
.vote-result { color: var(--text) !important; font-weight: 600; }
/* Vertical (9:16) how-to video: phone-sized even on desktop. */
.sell-layout { max-width: 1100px; }
.guide-video { margin-top: 20px; max-width: 340px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #000; }
@media (min-width: 900px) {
  /* Guide on the left, the video beside it and kept in view while scrolling. */
  .sell-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
  .sell-main { grid-column: 1; grid-row: 1; }
  .guide-video { grid-column: 2; grid-row: 1; position: sticky; top: 24px; }
  .sell-main .cta:first-child { margin-top: 20px; }
}
.guide-video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ── News (CATALOG.md §11) ────────────────────────────── */
.news-list { list-style: none; margin-top: 24px; max-width: 760px; }
.news-card { border-bottom: 1px solid var(--border); }
.news-card a { display: block; padding: 18px 0; color: inherit; text-decoration: none; }
.news-card a:hover .news-card-title { color: var(--primary); }
.news-card-title { font-size: 20px; margin-top: 4px; }
.news-card-summary { color: var(--muted); margin-top: 6px; font-size: 15px; }
.news-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.news-brand { border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-size: 12px; }
.news-article { max-width: 760px; margin-top: 16px; }
.news-body { margin-top: 18px; font-size: 17px; line-height: 1.6; }
.news-body p, .news-body ul { margin-bottom: 14px; }
.news-body ul { padding-left: 22px; }
.news-body a, .news-source a, .news-live a { color: var(--primary); }
.news-live { margin-top: 18px; font-size: 15px; }
.news-source { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* ── Admin: news desk, editor, live ───────────────────── */
/* Editor-only notes: amber like the admin bar and labelled, so they never read as
   page text (they exist only in the admin; the build has no such markup). */
.admin-note {
  margin-top: 12px; padding: 6px 10px; font-size: 12px; line-height: 1.5;
  color: #f0a500; background: rgba(240, 165, 0, .08);
  border: 1px dashed rgba(240, 165, 0, .5); border-radius: 6px;
}
.admin-note::before { content: "АДМИН · "; font-weight: 700; letter-spacing: .06em; }
.admin-note a, .admin-note code { color: #f0a500; }
body.light .admin-note, body.light .admin-note a, body.light .admin-note code { color: #8a5a00; }
.desk { margin-top: 28px; max-width: 980px; }
.desk h2 { font-size: 18px; margin-bottom: 8px; }
.desk-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.desk-row.is-dimmed { opacity: .55; }
.desk-main { flex: 1; min-width: 0; }
.desk-title { color: var(--text); font-weight: 600; text-decoration: none; }
.desk-title:hover { color: var(--primary); }
.desk-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.desk-meta a { color: var(--muted); }
.desk-btn, .desk button, .editor-form button[type=submit]:not(.cta), .live-row input {
  font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer;
}
.desk-ok { margin-top: 12px; color: #4caf50; }
.desk-error { margin-top: 12px; color: #ff5a3c; font-weight: 600; }
.desk-ok a { color: var(--primary); }
.live-summary { font-size: 14px; color: var(--muted); margin-top: 4px; }
.live-row form { display: flex; gap: 6px; }
.editor { display: grid; gap: 24px; margin-top: 16px; }
@media (min-width: 980px) { .editor { grid-template-columns: 1fr 1.2fr; align-items: start; } }
.editor-source { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.editor-source h2 { font-size: 15px; color: var(--muted); }
.editor-source h3 { font-size: 17px; margin-top: 8px; }
.editor-draft { margin: 10px 0; font-size: 14px; line-height: 1.55; max-height: 60vh; overflow: auto; }
.editor-form { display: grid; gap: 14px; }
.editor-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.editor-form input[type=text], .editor-form input[type=url], .editor-form textarea, .editor-form select {
  font: inherit; font-weight: 400; font-size: 15px; padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 100%;
}
.editor-form textarea { line-height: 1.55; resize: vertical; }
.editor-form fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: grid; gap: 10px; }
.editor-form legend { font-size: 14px; font-weight: 600; padding: 0 4px; }
.editor-brands { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.editor-brands label { display: inline-flex; gap: 4px; font-weight: 400; }
.editor-brands label.is-suggested { color: #f0a500; font-weight: 600; }
.editor-flags label { font-weight: 400; }
.admin-pull { display: inline; }
.admin-pull button { font: inherit; font-size: 12px; padding: 1px 8px; border-radius: 4px; border: 1px solid #f0a500; background: transparent; color: #f0a500; cursor: pointer; }
.admin-pull button:disabled { opacity: .6; cursor: wait; }
.admin-flash { background: #13361a; color: #8fe39b; font-size: 13px; text-align: center; padding: 6px 12px; }
.admin-flash.is-error { background: #3d1410; color: #ff9b8a; }
.editor-delete { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.editor-delete button { font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 6px; border: 1px solid #ff5a3c; background: transparent; color: #ff5a3c; cursor: pointer; }

/* ── Directory (DIRECTORY.md) ─────────────────────────── */
.dir-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
@media (min-width: 700px)  { .dir-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .dir-grid { grid-template-columns: repeat(3, 1fr); } }
.dir-card {
  display: flex; flex-direction: column; gap: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.dir-card-head { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.dir-card-head:hover .dir-name { color: var(--primary); }
/* Logos come on any background: a fixed dark tile keeps them readable in both themes. */
.dir-logo {
  flex: none; width: 56px; height: 56px; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #1c1c1c; color: #eee; font-size: 24px; font-weight: 700;
}
.dir-logo img { width: 100%; height: 100%; object-fit: contain; }
.dir-logo-lg { width: 88px; height: 88px; font-size: 36px; }
.dir-card-title { display: flex; flex-direction: column; min-width: 0; }
.dir-name { font-weight: 700; font-size: 17px; }
.dir-meta { color: var(--muted); font-size: 14px; }
.dir-brands { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.dir-card-actions, .dir-contacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.dir-contacts { margin-top: 18px; }
.dir-btn {
  flex: 1; min-width: 120px; padding: 10px 12px; text-align: center; border-radius: 6px;
  border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px;
}
.dir-btn:hover { border-color: var(--primary); }
.dir-btn-main { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.dir-invite { min-height: 160px; }
.dir-collapsed { list-style: none; color: var(--muted); font-size: 14px; }
.dir-collapsed li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.dir-collapsed a { color: var(--text); }
.dir-profile { max-width: 760px; margin-top: 16px; }
.dir-profile-head { display: flex; gap: 16px; align-items: center; }
.dir-profile-head .page-title { margin-top: 0; }
.dir-verified { color: #3aa655; font-size: 13px; margin-top: 4px; }
.dir-h2 { font-size: 18px; margin: 24px 0 10px; }
.dir-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.dir-photos img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; display: block; }
.dir-points { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.dir-points li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.dir-points li:last-child { border-bottom: 0; }
.dir-point-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.dir-point-meta a { color: var(--primary); }
.dir-points li.is-on strong { text-decoration: underline; text-underline-offset: 3px; }
.osm-map, #addresses, #goods { scroll-margin-top: 16px; }
.dir-shelf { margin: 28px 0; }
.dir-meta a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.dir-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; font-size: 14px; }
.dir-links a { color: var(--primary); }
/* Shop: our own services — the name first, one line, the price (products.php). */
.service-art svg { display: block; width: 100%; height: 100%; }
.service-title { font-weight: 700; min-height: 0; }
.card-service .card-price { margin-top: 6px; }
/* "Для бизнеса" */
.join-layout { max-width: 1100px; }
@media (min-width: 900px) {
  .join-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
  .join-example { position: sticky; top: 16px; }
}
.join-list { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.join-launch {
  padding: 12px 14px; margin-bottom: 14px; border-radius: 8px;
  background: rgba(230, 58, 0, .12); border: 1px solid rgba(230, 58, 0, .4);
}
.join-offers { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .join-offers { grid-template-columns: 1fr 1fr; } }
.join-offer { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.join-offer h3 { font-size: 18px; }
.join-term {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 0; border-top: 1px solid var(--border); margin-top: 10px;
}
.join-term.is-best .join-term-price b { color: var(--primary); }
.join-term-name { font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.join-term-price { text-align: right; display: flex; flex-direction: column; }
.join-term-price b { font-size: 17px; }
.join-term-price s { color: var(--muted); font-size: 13px; }
.join-term-price .join-small { margin-top: 0; }
.join-small { color: var(--muted); font-size: 13px; margin-top: 10px; }
.join-small a { color: var(--primary); }
.join-contacts { margin-top: 12px; text-align: center; color: var(--muted); }
.join-contacts a { color: var(--primary); font-weight: 600; }
.join-example .dir-card { margin-top: 0; }
/* "Генеральный спонсор" (/sponsorship/) */
.sp-why { display: grid; grid-template-columns: 1fr; gap: 16px 24px; }
@media (min-width: 700px) { .sp-why { grid-template-columns: 1fr 1fr; } }
.sp-why > div { min-width: 0; padding-top: 12px; border-top: 1px solid var(--border); }
.sp-why h3 { font-size: 15px; margin-bottom: 4px; }
.sp-why p { font-size: 14px; color: var(--muted); line-height: 1.55; }
.sp-art { border-radius: 10px; overflow: hidden; }
.sp-art svg, .sp-art img { display: block; width: 100%; height: auto; }

/* "О нас" (/about/) */
.about { max-width: 760px; margin-top: 8px; }
.about h2 { font-size: 20px; margin: 32px 0 12px; }
.about h3 { font-size: 16px; margin-bottom: 4px; }
.about h3 a { color: inherit; }
.about a { color: var(--primary); }
.about p { font-size: 16px; line-height: 1.6; margin-bottom: 10px; }
.about-lead { font-size: 17px !important; color: var(--muted); margin-top: 10px; }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 18px 28px; }
@media (min-width: 700px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-grid > div { min-width: 0; padding-top: 12px; border-top: 1px solid var(--border); }
.about-principles { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.6; }
.about-more a { color: var(--primary); font-weight: 600; }
.contact-link { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.contact-link svg { flex: none; }
/* "Где купить / обслужить <бренд>" (where_to_buy.php) */
/* Compact rows (2026-11-26): a partner once per page, the page's brands by role. */
.where { max-width: 760px; }
.where-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.where-row:last-of-type { border-bottom: 1px solid var(--border); }
.where-logo { flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border-radius: 8px; overflow: hidden; background: var(--placeholder); color: var(--muted); font-weight: 700; text-decoration: none; }
.where-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.where-name { font-weight: 700; color: var(--text); text-decoration: none; }
.where-name:hover { text-decoration: underline; }
.where-city { font-size: 13px; color: var(--muted); }
.where-line { font-size: 14px; color: var(--muted); margin-top: 3px; }
.where-line b { color: var(--text); font-weight: 600; }
/* One quiet line for businesses at the very end of a news item / article (2026-11-19: was a dashed box mid-page). */
.where-invite { margin-top: 28px; color: var(--muted); font-size: 13px; max-width: 760px; }
.where-invite a { color: var(--primary); font-weight: 600; }
/* "Объявление под ключ" (/turnkey/) */
.turnkey-part { padding-bottom: 8px; scroll-margin-top: 16px; }
.turnkey-part + .turnkey-part { margin-top: 28px; padding-top: 4px; border-top: 1px solid var(--border); }
.turnkey-part p { margin-bottom: 10px; }
.join-offer > .join-term:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
/* "Продаёшь?" block on the catalog home: two quiet options for sellers */
.sellers-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .sellers-grid { grid-template-columns: 1fr 1fr; } }
.seller-option {
  display: flex; flex-direction: column; gap: 4px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  color: inherit; text-decoration: none; transition: border-color .15s;
}
.seller-option:hover { border-color: var(--primary); }
.seller-title { font-weight: 700; }
.seller-line { font-size: 13px; color: var(--muted); }
.seller-price { margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--primary); }
/* "Для бизнеса" (/business/) */
.grid-services { margin-top: 24px; }
@media (min-width: 1100px) { .grid-services { grid-template-columns: repeat(3, 1fr); max-width: 900px; } }
.business-contact { margin-top: 28px; color: var(--muted); }
.business-contact a { color: var(--primary); }
.item-facts a { color: var(--primary); }
.about-text > p:first-child { font-size: 17px; color: var(--muted); margin-top: 10px; }
.about-text h3 { margin-top: 18px; }
.about-text h3 a { color: inherit; }
.about-text ul { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.6; }
/* "Вычитка" (admin only) */
.i18n-langs { margin-top: 14px; }
.i18n-stats { margin-top: 10px; color: var(--muted); }
.i18n-tabs { display: flex; gap: 18px; margin: 18px 0 12px; border-bottom: 1px solid var(--border); }
.i18n-tabs a { padding: 8px 0; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.i18n-tabs a.is-active { color: var(--text); border-bottom-color: var(--primary); font-weight: 600; }
.i18n-filter { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.i18n-filter a { color: var(--primary); }
.i18n-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.i18n-table th, .i18n-table td { text-align: left; vertical-align: top; padding: 8px; border-top: 1px solid var(--border); }
.i18n-table td:first-child { width: 42%; }
.i18n-table textarea { width: 100%; font: inherit; padding: 6px 8px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; resize: vertical; }
.i18n-table tr.is-missing td:first-child { box-shadow: inset 3px 0 0 #c0392b; }
.i18n-table tr.is-draft td:first-child { box-shadow: inset 3px 0 0 #f0a500; }
.i18n-table tr.is-ready td { color: var(--text); }
.i18n-ok { text-align: center !important; width: 90px; }
.i18n-ok input { width: 18px; height: 18px; }
.i18n-form .cta { position: sticky; bottom: 12px; width: 100%; box-shadow: 0 -8px 24px var(--bg); }
.i18n-page { margin-top: 24px; }
.i18n-page h2 { font-size: 17px; margin-bottom: 10px; }
.i18n-page h2 a { color: var(--primary); font-weight: 400; font-size: 14px; }
.i18n-side { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .i18n-side { grid-template-columns: 1fr 1fr; } }
.i18n-side label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.i18n-side textarea { font: 14px/1.5 ui-monospace, Menlo, monospace; padding: 10px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; }
.i18n-check { display: block; margin: 10px 0; }
.i18n-page-form button { padding: 8px 16px; }
/* Language switcher (filled by the build, i18n_finish()) */
/* Text blocks from content/pages/ inside the business pages */
.join-list ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.join-list p { margin-bottom: 8px; }
.join-launch p, .join-small p { margin: 0; }
.page-intro p { margin: 0; }
.guide-tips p { margin: 0; }
div.join-list { padding-left: 0; display: block; }
.i18n-deepl { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.i18n-deepl button { padding: 6px 12px; }

/* Brand: the logo alone, 52px (2026-11-21: it carries "ATV MOLDOVA"; the name and the
   language button are gone from the bar — the language is in the menu). */
.brand { display: flex; align-items: center; min-width: 0; }
.logo img { width: 52px; height: 52px; border-radius: 8px; }
/* Language: a row in the menu, the current one marked */
.nav-lang { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.nav-lang a, .nav-lang .lang-current { padding: 6px 8px; border-radius: 6px; text-decoration: none; }
.nav-lang a { color: var(--muted); }
.nav-lang a:hover { color: var(--primary); }
.nav-lang .lang-current { color: var(--text); border: 1px solid var(--border); }
/* Desktop: the same languages as a compact "🌐 RU ▾" drop-down (owner, 2026-11-21) */
.lang-menu { display: none; position: relative; font-size: 13px; font-weight: 600; }
.lang-menu summary { list-style: none; cursor: pointer; padding: 5px 8px; white-space: nowrap; border: 1px solid var(--border); border-radius: 6px; line-height: 1.2; color: var(--text); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: " ▾"; color: var(--muted); }
.lang-menu nav { position: absolute; top: calc(100% + 4px); right: 0; z-index: 20; display: flex; flex-direction: column; min-width: 64px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.lang-menu nav a { padding: 8px 12px; color: var(--text); text-decoration: none; }
.lang-menu nav a:hover { color: var(--primary); }


/* Theme choice in the footer */
.footer-theme button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline dotted; }
.footer-theme button[aria-pressed="true"] { color: var(--text); font-weight: 600; text-decoration: none; }

.admin-model { display: flex; gap: 4px; }
.admin-model input { flex: 1; min-width: 0; cursor: text; }
.admin-model button { width: auto; flex: none; padding: 5px 12px; }
/* "Подходит к" of a part: ticks in a drop-down panel (several ATV makes). */
.admin-fits { position: relative; font-size: 12px; min-width: 0; }
.admin-fits summary { padding: 5px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface);
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; list-style: none; }
.admin-fits[open] form { position: absolute; z-index: 5; top: 100%; left: 0; right: 0; margin-top: 4px; padding: 8px;
  display: grid; gap: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.admin-fits label { display: flex; gap: 6px; align-items: center; }
.admin-nobrand { font-size: 12px; color: var(--muted); align-self: center; }
.card-fits { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Articles (2026-11-19): a cover on the card and on the page, 16:9 */
.article-card a { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; }
.article-card-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; }
.article-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; margin-top: 16px; display: block; }
.news-body h2 { font-size: 21px; margin: 26px 0 10px; }
.news-body h3 { font-size: 18px; margin: 20px 0 8px; }
/* A picture inside the text (photos.php): text width, caption under it. */
.content-photo { margin: 18px 0; }
.content-photo img { width: 100%; height: auto; border-radius: 8px; display: block; }
.content-photo figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.4; }
/* "youtube:" lines: a thumbnail with a play button; moto.js puts the player in its place. */
.content-video { margin: 18px 0; }
/* Tables in articles and news ("| a | b |"): plain rules, numbers in columns; wide ones scroll. */
.news-body .table-wrap { overflow-x: auto; margin: 14px 0 18px; }
.news-body table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
.news-body th, .news-body td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.news-body th { font-size: 13px; color: var(--muted); font-weight: 600; border-bottom-width: 2px; }
.news-body .t-center { text-align: center; } .news-body .t-right { text-align: right; }
.news-body td.t-up { color: #3f9a64; } .news-body td.t-down { color: #c8553d; }
body.light .news-body td.t-up { color: #2c7a4b; } body.light .news-body td.t-down { color: #b2412b; }
/* "Подходит к <модели>" under a review: grey slots for kinds of goods until real items exist. */
.fits { margin-top: 32px; clear: both; }
.fits h2 { font-size: 21px; margin: 0 0 12px; }
.fits-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .fits-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fits-slot { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 120px; padding: 14px;
  background: var(--placeholder); border: 2px dashed var(--border); border-radius: 10px; color: inherit; text-decoration: none; }
.fits-slot:hover { border-color: var(--primary); }
.fits-kind { font-weight: 700; font-size: 15px; }
.fits-note { font-size: 13px; color: var(--muted); }
.fits-cta { margin-top: 12px; font-size: 14px; }
.fits-cta a { color: var(--primary); font-weight: 600; }
.content-video .yt-lite, .content-video iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; overflow: hidden; background: #000; }
.content-video.vertical .yt-lite, .content-video.vertical iframe { aspect-ratio: 9 / 16; max-width: 340px; margin: 0 auto; }
.content-video.vertical figcaption { max-width: 340px; margin-left: auto; margin-right: auto; }
/* Wide screens: a Short stands to the right of the paragraph it belongs to, the text wraps
   around it; lists become blocks next to it (bullets do not slide under the video). */
@media (min-width: 700px) {
  .news-body .content-video.vertical { float: right; width: 260px; margin: 4px 0 14px 24px; }
  .news-body .content-video.vertical .yt-lite, .news-body .content-video.vertical iframe,
  .news-body .content-video.vertical figcaption { max-width: none; }
  .news-body ul { overflow: hidden; }
  .news-body h2, .news-body h3, .news-body .content-photo, .news-body .content-video:not(.vertical) { clear: both; }
}
.content-video .yt-lite img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: rgba(0, 0, 0, .72); transition: background .15s; }
.yt-play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt-lite:hover .yt-play { background: #e00; }
.content-video figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.4; }
/* Admin form: picture fields */
.editor-cover { width: 100%; max-width: 360px; border-radius: 6px; display: block; margin-bottom: 8px; }
.editor-photo-list { list-style: none; margin: 8px 0; display: grid; gap: 8px; }
.editor-photo-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.editor-photo-list img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.editor-photo-list code { user-select: all; font-size: 13px; }
@media (max-width: 599px) {
  .article-card a { grid-template-columns: 1fr; gap: 10px; }
}
.discuss { max-width: 760px; margin-top: 24px; }
/* Telegram's own colors (owner, 2026-11-26): the button is recognised as Telegram at a glance.
   The brand blue on white text, the same in both themes. */
.discuss-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid #229ED9;
  border-radius: 8px; background: #229ED9; color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; }
.discuss-btn:hover { background: #1C8AC0; border-color: #1C8AC0; color: #fff; }
.discuss-btn svg { flex: none; }
/* A single related ad on a phone: full width instead of half a row with a hole. */
@media (max-width: 699px) { .related .grid > :only-child { grid-column: 1 / -1; } }
/* Article / news on a wide screen (2026-11-19): the text keeps up to 760px
   (narrower on a laptop), the empty right third becomes a column — discuss button and ads, one per row. */
@media (min-width: 900px) {
  .reading { display: grid; grid-template-columns: minmax(0, 760px) minmax(260px, 1fr); gap: 40px; align-items: start; }
  .reading-side > :first-child { margin-top: 16px; }
  .reading-side .discuss-btn { width: 100%; justify-content: center; }
  .reading-side .grid { grid-template-columns: 1fr; }
}
/* Directory: organisations not connected yet — a quiet note, names as plain text. */
.dir-collapsed-note { font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.dir-collapsed .dir-name { color: var(--text); }
/* Home (2026-11-21): who we are, then the rest of the site under the catalog */
.hero { margin: 22px 0 6px; }
.hero-title { font-size: 26px; line-height: 1.2; }
.hero-lead { color: var(--muted); margin-top: 8px; font-size: 15px; }
@media (min-width: 700px) { .hero-lead { font-size: 16px; } }
.hero-stats { margin-top: 10px; font-size: 14px; color: var(--muted); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero-stats a { color: var(--text); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.hero-stats svg { color: var(--muted); flex: none; }
.hero-stats a:hover svg { color: var(--primary); }
.hero-stats a:hover { color: var(--primary); }
@media (min-width: 700px) { .hero-title { font-size: 32px; } }
.reads { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .reads { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.read-video { position: relative; display: block; }
.read-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center; padding-left: 4px; }
.read-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; color: var(--text); text-decoration: none; }
.read-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.read-kind { display: block; padding: 12px 14px 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.read-title { display: block; padding: 4px 14px 14px; font-weight: 600; line-height: 1.35; }
.read-card:hover .read-title { color: var(--primary); }
.community { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 700px) { .community { grid-template-columns: repeat(4, 1fr); } }
.community img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.home-directory { margin-top: 24px; }
.home-directory a { color: var(--primary); font-weight: 600; text-decoration: none; }
/* "Так будет выглядеть ваша карточка" (/directory/join/, directory_example.php): a
   framed picture of a card, nothing clickable (inert). */
.example-frame { position: relative; margin-top: 12px; padding: 20px; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface); }
.example-badge { position: absolute; top: 12px; right: 12px; }
.example-name { font-size: 22px; font-weight: 700; }
.example-about { margin-top: 14px; }
.example-frame .dir-photos { margin-top: 14px; }
.example-tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; background: var(--placeholder); color: var(--muted); font-size: 13px; border-radius: 8px; text-align: center; padding: 8px; }
.example-frame .dir-brands { margin-top: 12px; }
.example-h3 { margin-top: 18px; font-size: 15px; }
.example-ads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; max-width: 420px; }
.example-ads .card-photo .example-tile { border-radius: 0; height: 100%; }
.example-where { margin-top: 14px; font-size: 14px; color: var(--muted); }
/* "На карте" (osm_map.php) */
.osm-map { margin-top: 18px; }
.osm-map iframe { display: block; width: 100%; height: 260px; border: 1px solid var(--border); border-radius: 10px; margin-top: 8px; }
/* Home without live items: the catalog as one line under reading and the archive */
.home-empty { margin-top: 28px; padding: 14px 16px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); }
.home-empty a { color: var(--primary); font-weight: 600; text-decoration: none; white-space: nowrap; }
/* «Продать через ATV Moldova» prices: the regular price and the price for the first 10 */
.turnkey-prices .join-term-price { display: grid; grid-template-columns: 90px 90px; gap: 0 12px; text-align: right; }
.turnkey-prices .join-term-head { border-top: 0; padding-bottom: 0; }
.turnkey-prices .first { color: var(--primary); }
/* /directory/join/: the pointer to the "Дилер" package page */
.join-dealer-link { margin-top: 22px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.join-dealer-link a { color: var(--primary); font-weight: 600; text-decoration: none; }
.page-intro + .hero-stats { margin-top: 6px; }
.join-list a { color: var(--primary); }
.service-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Partner's form /business/partner/start/ (2026-11-24) ──────────────────
   Ticks and lists instead of typing; prints as a paper form (every list as boxes). */
.pf-intro { max-width: 720px; margin-top: 12px; line-height: 1.55; }
.pf-steps { margin: 12px 0 12px 20px; }
.pf-steps li { margin: 4px 0; }
.pf { max-width: 720px; }
.pf-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.pf-section h2 { font-size: 19px; margin-bottom: 10px; }
.pf-hint { font-size: 13px; color: var(--muted); margin: 6px 0 10px; line-height: 1.45; }
.pf-field { display: block; flex: 1; min-width: 0; margin: 10px 0; font-size: 14px; }
.pf-field > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.pf input:not([type=checkbox]), .pf select, .pf textarea, .pf-out {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.pf textarea, .pf-out { resize: vertical; }
.pf-row { display: flex; flex-wrap: wrap; gap: 0 12px; }
.pf-row > .pf-field { flex: 1 1 200px; }
.pf-check { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 15px; cursor: pointer; }
.pf input[type=checkbox] { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--primary); }
.pf-cat { border-bottom: 1px solid var(--border); padding: 4px 0; }
.pf-cat:last-child { border-bottom: 0; }
.pf-cat > .pf-check { font-weight: 600; }
.pf-sub { display: flex; flex-wrap: wrap; gap: 0 18px; padding: 0 0 8px 26px; }
.pf-sub .pf-check { font-size: 14px; }
.pf-checks { display: flex; flex-wrap: wrap; gap: 0 20px; }
.pf-brands { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 14px; }
.pf-brands th { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 4px; }
.pf-brands th:first-child, .pf-brands td:first-child { text-align: left; }
.pf-brands td { text-align: center; padding: 6px 4px; border-top: 1px solid var(--border); }
.pf-hours { margin-top: 8px; }
.pf-day { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 6px 0; }
.pf-day-name { width: 56px; font-weight: 600; }
.pf-day select { width: auto; padding: 8px; }
.pf-item { border: 1px solid var(--border); border-radius: 10px; padding: 6px 14px 10px; margin: 12px 0; }
.pf-item legend { padding: 0 6px; font-weight: 600; }
.pf-link { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
.pf-item legend .pf-link { font-weight: 400; font-size: 13px; margin-left: 8px; color: var(--muted); }
.pf-add { padding: 10px 16px; font: inherit; font-weight: 600; color: var(--text); background: var(--surface); border: 1px dashed var(--border); border-radius: 8px; cursor: pointer; }
.pf-rules { margin: 6px 0 10px 20px; font-size: 14px; line-height: 1.5; }
.pf-rules li { margin: 3px 0; }
.pf-send { margin-top: 32px; }
.pf-send .cta { width: 100%; border: 0; font: inherit; font-weight: 700; cursor: pointer; margin-top: 12px; }
/* Return pages after a maib payment (2026-12-01) */
.pay-result { max-width: 640px; margin: 40px auto; text-align: center; }
.footer-pay { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.footer-pay img { box-sizing: content-box; height: 22px; width: auto; padding: 5px 9px; background: #fff; border-radius: 6px; }
.pay-details { display: grid; grid-template-columns: auto auto; gap: 6px 16px; justify-content: center; text-align: left; margin: 20px auto 0; font-size: 15px; }
.pay-details dt { color: var(--muted); }
.pay-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.pay-actions .cta-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.pf-send .cta-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.pf-out { margin: 8px 0; font-size: 13px; }
.pf-send [data-pf-status]:not(:empty) { color: var(--text); font-size: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.pf-examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 12px 0 16px; }
.pf-examples-result { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pf-examples-photos { grid-template-columns: repeat(3, 1fr); } /* three "так" over three "не так" */
.pf-example img { display: block; width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.pf-example figcaption { font-size: 13px; margin-top: 6px; }
.pf-example.is-bad figcaption { color: var(--muted); }
.pf-print, .pf-field > .pf-print { display: none; } /* the label's span rule must not show the paper version */
.print-only { display: none; }

@media print {
  body, body.light { background: #fff; color: #000; }
  .site-header, .site-footer, .breadcrumbs, .pf-screen, .pf-send, script, .admin-bar, .admin-flash { display: none !important; }
  .pf-print { display: inline; }
  p.pf-print, .pf-field > .pf-print { display: block; }
  .pf-sub[hidden] { display: flex !important; }
  .pf, .pf-intro { max-width: none; }
  .pf-section { border-color: #999; }
  .pf-section h2 { break-after: avoid; }
  .pf-cat, .pf-day, .pf-brands tr, .pf-field, .pf-rules li { break-inside: avoid; }
  .pf ::placeholder { color: transparent; }
  .pf-hint, .pf-field > span { color: #333; }
  .pf input:not([type=checkbox]), .pf textarea { border: 0; border-bottom: 1px solid #000; border-radius: 0; background: none; min-height: 28px; }
  .pf input[type=checkbox] { appearance: none; -webkit-appearance: none; border: 1.5px solid #000; border-radius: 2px; }
  .pf-box { display: inline-block; margin-right: 10px; font-size: 13px; white-space: nowrap; }
  .pf-brands td, .pf-cat { border-color: #999; }
  .pf-examples { grid-template-columns: repeat(3, 1fr); }
  .pf-examples-result { display: none; }
  /* Offer pages on paper (2026-12-01): one offer, one sheet — "Печать → Сохранить как PDF".
     Text, prices and terms stay; the live example, map, videos, pictures and buttons go;
     our logo on top, the page address and phone at the bottom. */
  @page { margin: 10mm 12mm; }
  html { zoom: 0.93; } /* the longest offers (Представительство, Спонсор) fit one A4 */
  body { font-size: 12px; }
  main { padding: 0 !important; }
  p.print-only { display: block; }
  .print-brand { margin: 0 0 6px; }
  .print-contact { margin-top: 10px; padding-top: 6px; border-top: 1px solid #999; font-size: 12px; }
  .join-layout { display: block; max-width: none; }
  .join-example, .example, .osm-map, iframe, video, .short-video, .sp-art, .cta, .dir-card-actions,
  .offer-more, .chips, .join-dealer-link, .join-contacts { display: none !important; }
  .page-title { font-size: 22px; margin: 0 0 6px; }
  .dir-h2 { font-size: 14px; margin: 10px 0 4px; break-after: avoid; }
  .join-term, .join-list li { break-inside: avoid; }
  .page-intro, .page-intro p { font-size: 12.5px; line-height: 1.4; margin: 0 0 6px; }
  .join-list p, .join-list li, .join-small { margin: 2px 0; line-height: 1.35; }
  .join-list ul { margin: 4px 0; }
  .join-offers { display: flex; gap: 12px; }
  .join-offer { padding: 8px 14px; margin: 6px 0; break-inside: avoid; }
  .join-offer h3 { margin: 0 0 2px; font-size: 14px; }
  .join-term { padding: 3px 0; margin-top: 3px; }
  /* one line per term: crossed-out price, price, month price side by side */
  .join-term-price { flex-direction: row; align-items: baseline; gap: 8px; }
  .join-term-price b { font-size: 14px; }
  .join-list ul { gap: 2px; }
  .join-faq p { margin-bottom: 4px; }
  .join-offers .join-offer { flex: 1; }
  /* One offer per sheet: links to the other offers and the comparison of visits stay on screen */
  .visit-compare, .showcase-free:has(a) { display: none !important; }
  .sp-why { grid-template-columns: 1fr 1fr; gap: 6px 18px; }
  .sp-why > div { padding-top: 4px; }
  .sp-why h3 { font-size: 12.5px; margin-bottom: 2px; }
  .sp-why p { font-size: 11.5px; line-height: 1.35; }
  .join-launch { padding: 6px 10px; margin: 6px 0; }
  table { font-size: 11px; }
  th, td { padding: 3px 6px !important; }
  a { color: inherit; text-decoration: none; }
}
