/*
Theme Name: Стас Макаров
Theme URI: https://takrabotaet.ru
Author: Стас Макаров
Description: Авторская редакционная тема: главная-карта, журнал, материалы, консультации. Кремовая палитра, Source Serif 4 + IBM Plex.
Version: 1.8.2
Requires at least: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: stas-makarov
*/

/* Shared design tokens for all three homepage variations.
   Single editorial system: warm cream + ink + warm orange accent. */

:root {
  --bg: #ffffff;
  --bg-2: #f4f2ee;
  --ink: #1a1a1a;
  --ink-2: #2a2620;
  --muted: #5f584c;
  --muted-2: #8c8478;
  --rule: #e4e0d8;
  --rule-2: #eeebe4;
  --accent: #c2410c;
  --accent-soft: #e7dccd;
  --paper: #faf9f6;

  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* radius scale — use these, don't invent new values */
  --r: 2px;
  --r-pill: 999px;
}

.site {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.site * { box-sizing: border-box; }

.site h1, .site h2, .site h3, .site h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

.site p { margin: 0; text-wrap: pretty; }
.site a { color: inherit; text-decoration: none; }
.site a.link { border-bottom: 1px solid var(--rule); transition: border-color .15s, color .15s; }
.site a.link:hover { border-bottom-color: var(--accent); color: var(--accent); }

.site .mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.site .rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.site .rule-soft { height: 1px; background: var(--rule-2); border: 0; margin: 0; }

/* Striped image placeholder — used for article and project covers */
.site .ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      rgba(26,26,26,0.045) 0 1px,
      transparent 1px 9px),
    var(--bg-2);
  border: 1px solid var(--rule);
  overflow: hidden;
  border-radius: var(--r);
}
.site .ph::after {
  content: attr(data-label);
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  padding: 3px 6px;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

/* Portrait placeholder — same striped pattern, but cooler tint */
.site .portrait {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      rgba(26,26,26,0.06) 0 1px,
      transparent 1px 10px),
    #ece8de;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.site .portrait::before {
  content: "портрет";
  position: absolute;
  inset: auto 0 12px 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Pill / chip */
.site .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--muted);
  background: transparent;
}
.site .chip .dot { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--accent); }

/* Buttons */
.site .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.site .btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.site .btn--ghost { background: transparent; color: var(--ink); }
.site .btn--ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.site .btn .arrow { transition: transform .15s; }
.site .btn:hover .arrow { transform: translateX(2px); }

/* Hover lift for list rows */
.site .row-link {
  display: grid;
  align-items: baseline;
  transition: background .15s;
  cursor: pointer;
}
.site .row-link:hover { background: var(--bg-2); }
.site .row-link:hover .row-title { color: var(--accent); }
.site .row-title { transition: color .15s; }

/* Section meta label — number in accent, rest muted */
.site .smeta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.site .smeta b { color: var(--accent); font-weight: 500; }

/* Card arrow that nudges on hover of the parent link */
.site .nudge { display: inline-block; transition: transform .18s ease; }
.site .card-link:hover .nudge,
.site .row-link:hover .nudge { transform: translateX(3px); }

/* Now strip */
.site .now-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
}
.site .now-strip .pulse {
  width: 8px; height: 8px; border-radius: 999px; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(194,65,12,0.4);
  animation: now-pulse 2.4s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) { .site .now-strip .pulse { animation: none; } }
@keyframes now-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(194,65,12,0.35); }
  70%  { box-shadow: 0 0 0 7px rgba(194,65,12,0); }
  100% { box-shadow: 0 0 0 0 rgba(194,65,12,0); }
}

/* Hero TOC chips */
.site .toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}
.site .toc a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.site .toc a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.site .toc span.sep { color: var(--rule); }

/* Featured-aware card */
.site .card-link { cursor: pointer; }

/* Selection */
.site ::selection { background: var(--accent); color: #fff; }

/* current nav item */
.site .uline.is-current { color: var(--accent); }
.site .uline.is-current::after { transform: scaleX(1); }

/* Keyboard focus — visible ring on links, buttons, controls */
.site a:focus-visible,
.site button:focus-visible,
.site .btn:focus-visible,
.site .input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r);
}

/* ── Form atoms ─────────────────────────────────────────────── */
.site .input {
  font-family: var(--sans);
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--ink);
  width: 100%;
  transition: border-color .15s;
}
.site .input::placeholder { color: var(--muted-2); }
.site .input:focus { outline: none; border-color: var(--accent); }
.site textarea.input { min-height: 120px; resize: vertical; line-height: 1.6; }

/* compact subscribe row: input + arrow button */
.site .sub-form { display: flex; gap: 8px; align-items: stretch; }
.site .sub-form .input { flex: 1; min-width: 0; }
.site .sub-btn {
  flex: none;
  font-family: var(--sans);
  font-size: 16px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.site .sub-btn:hover { background: var(--accent); border-color: var(--accent); }
.site .sub-ok { font-size: 13px; line-height: 1.5; color: var(--accent); }

/* dark-section variants */
.site .v6-dark .input, .site .pg-tg .input { background: transparent; border-color: var(--muted); color: var(--bg); }
.site .v6-dark .input::placeholder, .site .pg-tg .input::placeholder { color: var(--muted-2); }
.site .v6-dark .sub-btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.site .v6-dark .sub-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* "или" divider */
.site .or-rule { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); margin: 16px 0; }
.site .or-rule::before, .site .or-rule::after { content: ""; height: 1px; background: var(--rule); flex: 1; }

/* Section label: accent number + muted rest — e.g. «§ 01 · Чем полезен» */
.site .seclabel { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.site .seclabel .num { color: var(--accent); }

/* Inline arrow that nudges on hover of its container */
.site .nudge { display: inline-block; transition: transform .15s ease; }
.site .row-link:hover .nudge,
.site .card-link:hover .nudge,
.site a:hover > .nudge { transform: translateX(3px); }

/* Generic hover-able card link (lift the arrow, color the title) */
.site .card-link { transition: background .15s, border-color .15s; cursor: pointer; }
.site .card-link:hover .row-title { color: var(--accent); }

/* "Now" ticker strip */
.site .now-strip { display: flex; align-items: center; gap: 16px; }
.site .now-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px rgba(194,65,12,0.12); flex: none; }

/* Section counter — top-right of a section header, e.g. "02 / 06" */
.site .seccount { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted-2); }
.site .seccount b { color: var(--ink); font-weight: 500; }

/* Growing underline on inline links */
.site .uline { position: relative; padding-bottom: 2px; }
.site .uline::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.site .uline:hover::after { transform: scaleX(1); }

/* Typographic article card — no photo, big tag-number on tinted field */
.site .tcard {
  display: flex; flex-direction: column; cursor: pointer;
  border: 1px solid var(--rule); background: var(--bg);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.site .tcard:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 10px 30px -18px rgba(26,26,26,0.4); }
.site .tcard:hover .row-title { color: var(--accent); }
.site .tcard .tcard-top {
  position: relative; padding: 22px 22px 18px; min-height: 132px;
  display: flex; flex-direction: column; justify-content: space-between;
  border-bottom: 1px solid var(--rule); overflow: hidden;
}
.site .tcard .tcard-top::before {
  content: attr(data-num); position: absolute; right: 10px; bottom: -22px;
  font-family: var(--serif); font-size: 116px; line-height: 1;
  color: var(--accent); opacity: 0.1; letter-spacing: -0.03em; pointer-events: none;
}
.site .tcard .tcard-body { padding: 18px 22px 22px; }


/* v6.css — layout & component styles for the V6 homepage (Главная).
   Tokens, type helpers and shared atoms (.mono .seclabel .seccount .uline
   .tcard .now-strip .card-link .btn .portrait .rule) live in site.css.
   This file owns V6-specific structure + its responsive behaviour, so the
   component markup carries no inline styling. */

/* ── Wrapper ───────────────────────────────────────────────── */
.site.v6 { width: 100%; max-width: 1280px; margin: 0 auto; font-family: var(--sans); }

.v6-sec { padding: 72px 80px; }

/* dark sections (projects, telegram) recolour the shared atoms */
.v6-dark { background: var(--ink); color: var(--bg); }
.v6-dark .seclabel { color: var(--muted-2); }
.v6-dark .seccount b { color: var(--bg); }
.v6-dark .v6-sech2 { color: var(--bg); }
.v6-dark .v6-sech2 .accent { color: var(--accent); }

/* ── Header ────────────────────────────────────────────────── */
.v6-header {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  padding: 20px 80px; border-bottom: 1px solid var(--rule);
}
.v6-logo { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.v6-nav { display: flex; gap: 26px; font-size: 14px; }

/* ── Hero ──────────────────────────────────────────────────── */
.v6-hero { padding: 56px 80px 96px; }
.v6-eyebrow { margin-bottom: 22px; color: var(--muted); }
.site .v6-h1 { font-size: 88px; line-height: 1.04; letter-spacing: -0.03em; max-width: 1080px; margin-bottom: 56px; }
.v6-h1 .accent, .accent { color: var(--accent); }
.v6-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: end; }
.v6-hero-lead { font-family: var(--serif); font-size: 24px; line-height: 1.5; color: var(--ink-2); max-width: 660px; font-style: italic; }
.v6-hero-cta { display: flex; gap: 12px; flex: none; }

/* ── «Сейчас» strip ────────────────────────────────────────── */
.v6-now-wrap { padding: 0 80px 16px; }
.v6-now { border: 1px solid var(--rule); border-left: 3px solid var(--accent); background: var(--paper); }
.site a.card-link.v6-now { padding: 24px 36px; }
.v6-now-label { color: var(--accent); flex: none; }
.v6-now-text { font-family: var(--serif); font-size: 17px; line-height: 1.4; color: var(--ink-2); flex: 1; }
.v6-now-meta { flex: none; }

/* ── Section header ────────────────────────────────────────── */
.v6-sechead { margin-bottom: 48px; }
.v6-sechead-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.v6-sechead-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.v6-sech2 { font-size: 40px; line-height: 1.1; max-width: 720px; }
.v6-sech2--wide { max-width: 760px; }
.v6-sechead-link { font-size: 14px; white-space: nowrap; }

/* ── §01 «Чем полезен» cards ───────────────────────────────── */
.v6-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.v6-ucard { display: flex; flex-direction: column; min-height: 320px; padding: 32px 28px; background: var(--bg); border: 1px solid var(--rule); }
.v6-ucard--featured { background: var(--paper); border-color: var(--accent); }
.v6-ucard-top { display: flex; justify-content: space-between; margin-bottom: 28px; }
.v6-ucard--featured .v6-ucard-top .mono:first-child { color: var(--accent); }
.v6-ucard h3 { font-size: 28px; line-height: 1.15; margin-bottom: 14px; transition: color .15s; }
.v6-ucard p { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 24px; }
.v6-ucard-link { margin-top: auto; font-size: 14px; align-self: flex-start; border-bottom: 1px solid var(--ink); color: var(--ink); padding-bottom: 2px; display: inline-flex; align-items: center; gap: 8px; }
.v6-ucard--featured .v6-ucard-link { border-bottom-color: var(--accent); color: var(--accent); }

/* ── §02 journal: typographic .tcard sizing (atom in site.css) ─ */
.v6-tcard h3 { font-size: 21px; line-height: 1.22; margin-bottom: 10px; transition: color .15s; }
.v6-tcard p { font-size: 13.5px; line-height: 1.55; color: var(--muted); }

/* ── §03 project rows ──────────────────────────────────────── */
.v6-projlist { border-top: 1px solid var(--muted); }
.v6-projrow {
  display: grid; grid-template-columns: 120px 140px 1fr 220px 40px; gap: 32px;
  align-items: center; padding: 32px 0; border-bottom: 1px solid var(--muted);
  color: var(--bg); transition: background .15s;
}
.v6-projrow:hover { background: rgba(255,255,255,0.04); }
.v6-projrow:hover .pj-arrow { transform: translateX(3px); }
.v6-projnum { font-family: var(--serif); font-size: 72px; line-height: 0.9; color: var(--accent); letter-spacing: -0.02em; }
.v6-projkind { display: inline-block; padding: 4px 10px; border: 1px solid var(--muted-2); border-radius: 2px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bg); }
.v6-projbody h3 { font-family: var(--serif); font-size: 30px; line-height: 1.18; color: var(--bg); margin-bottom: 10px; }
.v6-projbody p { font-size: 14px; line-height: 1.6; color: var(--rule); max-width: 460px; }
.v6-projmeta { color: var(--rule); font-size: 11px; align-self: center; }
.pj-arrow { align-self: center; font-size: 22px; color: var(--bg); text-align: right; transition: transform .15s; }

/* ── §04 about ─────────────────────────────────────────────── */
.v6-about { background: var(--bg-2); padding: 80px; }
.v6-about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: start; }
.v6-about-portrait { width: 300px; height: 380px; margin-bottom: 20px; }
.v6-about-facts { display: flex; flex-direction: column; gap: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.v6-fact { display: flex; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.v6-fact:last-child { padding-bottom: 0; border-bottom: 0; }
.v6-fact .mono { color: var(--accent); }
.v6-about-body { max-width: 680px; padding-top: 4px; }
.v6-about-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.site .v6-about-lead { font-family: var(--serif); font-size: 30px; line-height: 1.35; margin: 0 0 24px; }
.v6-about-body p + p, .v6-about-body p.v6-about-p { font-size: 16px; line-height: 1.75; color: var(--ink-2); margin-bottom: 18px; }
.v6-about-body p.v6-about-p:last-child { margin-bottom: 0; }

/* ── §05 consult ───────────────────────────────────────────── */
.v6-consult-grid { display: grid; grid-template-columns: 200px 1fr 320px; gap: 56px; align-items: start; }
.v6-consult-head .seclabel { margin-bottom: 8px; }
.site .v6-consult-h2 { font-size: 40px; line-height: 1.1; margin-bottom: 32px; max-width: 640px; }
.site .v6-consult-lead { font-family: var(--serif); font-size: 20px; line-height: 1.5; color: var(--ink-2); margin-bottom: 36px; max-width: 580px; }
.v6-consult-points { list-style: none; padding: 0; margin: 0 0 38px; display: flex; flex-direction: column; gap: 16px; }
.v6-consult-points li { display: flex; gap: 14px; font-size: 15px; color: var(--ink-2); }
.v6-consult-points .mono { min-width: 24px; color: var(--accent); }
.v6-consult-side { display: flex; flex-direction: column; gap: 20px; }
.v6-consult-illu { aspect-ratio: 4 / 3; width: 100%; }
.v6-consult-aside { border: 1px solid var(--rule); padding: 24px; background: var(--paper); }
.v6-consult-aside p { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.v6-consult-aside .mono { margin-bottom: 14px; display: block; }

/* ── §06 telegram + footer ─────────────────────────────────── */
.v6-tg { padding: 96px 80px 56px; }
.v6-tg-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 36px; }
.v6-dark .v6-h2xl { font-size: 88px; line-height: 1.0; letter-spacing: -0.03em; color: var(--bg); max-width: 1000px; margin-bottom: 40px; }
.v6-tg-grid { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: end; margin-bottom: 72px; }
.v6-tg-lead { font-family: var(--serif); font-size: 20px; line-height: 1.5; color: var(--rule); max-width: 640px; }
.v6-tg-btn { display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border: 1px solid var(--bg); color: var(--bg); font-size: 15px; letter-spacing: 0.02em; flex: none; }
.v6-footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 32px; padding-top: 32px; border-top: 1px solid var(--muted); font-size: 13px; color: var(--rule); }
.v6-footer-col .mono { color: var(--muted-2); margin-bottom: 10px; display: block; }
.v6-footer-links { display: flex; flex-direction: column; gap: 6px; }
.v6-footer-links a { color: var(--bg); }
.v6-footer-end { text-align: right; color: var(--muted-2); }
.v6-footer-end .mono { margin-bottom: 10px; display: block; }
.v6-footer-name { font-family: var(--serif); font-size: 18px; color: var(--bg); }

/* ════════════════════════════════════════════════════════════
   Responsive — no !important needed, these classes own their props
   ════════════════════════════════════════════════════════════ */

/* ── Tablet ≤1080 ──────────────────────────────────────────── */
@media (max-width: 1080px) {
  .v6-sec, .v6-now-wrap, .v6-hero, .v6-header, .v6-about, .v6-tg { padding-left: 40px; padding-right: 40px; }
  .v6-about { padding-left: 40px; padding-right: 40px; }
  .v6-hero { padding-top: 48px; padding-bottom: 72px; }
  .site .v6-h1 { font-size: 64px; }
  .v6-dark .v6-h2xl { font-size: 60px; }
  .v6-sech2 { font-size: 32px; }
  .v6-grid3 { grid-template-columns: 1fr 1fr; }
  .v6-about-grid { grid-template-columns: 240px 1fr; gap: 40px; }
  .v6-consult-grid { grid-template-columns: 160px 1fr; gap: 32px; }
  .v6-consult-aside { grid-column: 1 / -1; }
  .v6-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 32px; }
}

/* ── Mobile ≤720 ───────────────────────────────────────────── */
@media (max-width: 720px) {
  .v6-sec, .v6-now-wrap, .v6-hero, .v6-header, .v6-about, .v6-tg { padding-left: 22px; padding-right: 22px; }

  .v6-header { grid-template-columns: 1fr; gap: 14px; padding-top: 16px; padding-bottom: 16px; }
  .v6-nav { flex-wrap: nowrap; gap: 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
  .v6-nav::-webkit-scrollbar { display: none; }
  .v6-nav a { white-space: nowrap; }

  .v6-hero { padding-top: 36px; padding-bottom: 56px; }
  .v6-eyebrow { margin-bottom: 18px; }
  .site .v6-h1 { font-size: 40px; letter-spacing: -0.02em; margin-bottom: 28px; }
  .v6-hero-grid { grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .v6-hero-lead { font-size: 19px; }
  .v6-hero-cta { flex-wrap: wrap; }
  .v6-hero-cta > a { flex: 1 1 auto; justify-content: center; }

  .site a.card-link.v6-now { flex-wrap: wrap; gap: 10px; padding: 18px 22px; }
  .v6-now-text { flex: 1 1 100%; font-size: 16px; }

  .v6-sech2 { font-size: 26px; }
  .v6-grid3 { grid-template-columns: 1fr; }

  .v6-projrow { grid-template-columns: auto 1fr; gap: 8px 16px; padding: 24px 0; }
  .v6-projnum { font-size: 44px; grid-row: 1; }
  .v6-projkind-cell { grid-row: 1; align-self: center; }
  .v6-projbody { grid-column: 1 / -1; grid-row: 2; }
  .v6-projbody h3 { font-size: 24px; }
  .v6-projmeta { grid-column: 1 / -1; grid-row: 3; }
  .v6-projrow .pj-arrow { display: none; }

  .v6-about-grid { grid-template-columns: 1fr; gap: 28px; }
  .v6-about-portrait { width: 100%; max-width: 320px; height: 360px; }
  .v6-about-lead { font-size: 24px; }

  .v6-consult-grid { grid-template-columns: 1fr; gap: 24px; }
  .v6-consult-aside { grid-column: auto; }
  .site .v6-consult-h2 { font-size: 30px; }

  .v6-dark .v6-h2xl { font-size: 40px; }
  .v6-tg-grid { grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .v6-tg-btn { width: 100%; justify-content: space-between; }
  .v6-footer-grid { grid-template-columns: 1fr 1fr; }
  .v6-footer-end { grid-column: 1 / -1; text-align: left; }
}


/* pages.css — inner page templates (Статья, Лента, Материал, Материалы,
   О себе, Консультации). Tokens + atoms come from site.css; the shared
   footer reuses v6.css classes. Everything here is .pg-* prefixed. */

.pg { width: 100%; max-width: 1280px; margin: 0 auto; }
.pg-sec { padding: 0 80px; }

/* ── Shared inner header ───────────────────────────────────── */
.pg-header {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  padding: 20px 80px; border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(140%) blur(8px); z-index: 30;
}
.pg-logo { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.pg-nav { display: flex; gap: 24px; font-size: 14px; }

/* reading progress (article) */
.pg-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--accent); z-index: 50; transition: width .08s linear; }

/* ── Breadcrumb / back ─────────────────────────────────────── */
.pg-crumb { display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pg-crumb a { color: var(--muted); border-bottom: 1px solid transparent; }
.pg-crumb a:hover { color: var(--accent); }

/* ── Segmented variant toggle ──────────────────────────────── */
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.seg button {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 14px; background: var(--bg); color: var(--muted); border: 0; cursor: pointer;
  border-left: 1px solid var(--rule); transition: background .15s, color .15s;
}
.seg button:first-child { border-left: 0; }
.seg button.is-active { background: var(--ink); color: var(--bg); }
.pg-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 80px; border-bottom: 1px solid var(--rule); background: var(--bg-2); }

/* ════════════════ ARTICLE ════════════════════════════════════ */
.pg-article-head { padding: 64px 80px 40px; }
.pg-kicker { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.site .pg-title { font-size: 60px; line-height: 1.08; letter-spacing: -0.025em; max-width: 920px; margin-bottom: 24px; }
.pg-dek { font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.45; color: var(--ink-2); max-width: 740px; }
.pg-meta { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.pg-meta-l { display: flex; gap: 14px; align-items: center; }
.pg-byline { display: flex; gap: 12px; align-items: center; }
.pg-byline .ava { width: 36px; height: 36px; border-radius: 999px; flex: none; }
.pg-byline b { font-weight: 500; font-size: 14px; }
.pg-cover { aspect-ratio: 16/8; margin: 8px 80px 0; }

/* article body layout */
.pg-body { padding: 56px 80px 0; }
.pg-body-grid { display: grid; gap: 64px; }
/* variant A: TOC sidebar + centered prose */
.var-toc .pg-body-grid { grid-template-columns: 220px minmax(0, 720px); justify-content: center; }
.var-toc .pg-toc { display: block; }
/* variant B: narrow centered column, no side TOC */
.var-plain .pg-body-grid { grid-template-columns: minmax(0, 680px); justify-content: center; }
.var-plain .pg-toc { display: none; }

.pg-toc { position: sticky; top: 92px; align-self: start; height: max-content; }
.pg-toc-title { margin-bottom: 14px; }
.pg-toc a { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); padding: 7px 0 7px 14px; border-left: 1px solid var(--rule); transition: color .15s, border-color .15s; }
.pg-toc a:hover, .pg-toc a.is-active { color: var(--ink); border-left-color: var(--accent); }

/* ── prose ─────────────────────────────────────────────────── */
.prose { font-size: 18px; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 30px; }
.prose h2 { font-size: 32px; line-height: 1.18; color: var(--ink); margin-top: 52px; }
.prose h3 { font-size: 23px; line-height: 1.25; color: var(--ink); margin-top: 40px; }
.prose h2 + p, .prose h3 + p { margin-top: 18px; }
.prose a.link, .prose a { color: var(--ink); border-bottom: 1px solid var(--rule); }
.prose a:hover { border-bottom-color: var(--accent); color: var(--accent); }
.prose ul, .prose ol { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.prose ul li, .prose ol li { position: relative; padding-left: 32px; }
.prose ul li::before { content: "—"; color: var(--accent); position: absolute; left: 0; top: 0; }
.prose ol { counter-reset: li; }
.prose ol li::before { counter-increment: li; content: counter(li, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--accent); position: absolute; left: 0; top: 0.4em; }
.prose figure { margin: 40px 0; }
.prose figure .ph { aspect-ratio: 16/9; }
.prose figcaption { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); margin-top: 10px; }
.prose hr { border: 0; height: 1px; background: var(--rule); margin: 44px 0; }

/* pull-quote / врезка */
.pull { margin: 44px 0; padding: 8px 0 8px 28px; border-left: 3px solid var(--accent); }
.pull p { font-family: var(--serif); font-size: 27px; line-height: 1.4; color: var(--ink); }
.pull cite { display: block; margin-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-style: normal; }
.callout { margin: 36px 0; padding: 24px 28px; background: var(--bg-2); border: 1px solid var(--rule); }
.callout .mono { color: var(--accent); display: block; margin-bottom: 10px; }
.callout p { font-size: 16px; line-height: 1.65; }

/* ── share ─────────────────────────────────────────────────── */
.pg-share { display: flex; gap: 8px; align-items: center; }
.pg-share .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.pg-share button, .pg-share a { font-family: var(--sans); font-size: 13px; padding: 7px 12px; border: 1px solid var(--rule); border-radius: 2px; background: var(--bg); color: var(--ink); cursor: pointer; transition: border-color .15s, color .15s; }
.pg-share button:hover, .pg-share a:hover { border-color: var(--accent); color: var(--accent); }

/* ── telegram inline card ──────────────────────────────────── */
.pg-tg { margin: 64px 0 0; padding: 36px 36px; background: var(--ink); color: var(--bg); display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.pg-tg h3 { font-size: 28px; line-height: 1.15; color: var(--bg); margin-bottom: 8px; }
.pg-tg p { font-size: 14px; line-height: 1.6; color: var(--rule); max-width: 460px; }
.site .pg-tg-btn, .prose .pg-tg-btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border: 1px solid var(--bg); border-bottom: 1px solid var(--bg); color: var(--bg); font-size: 14px; white-space: nowrap; transition: color .15s, border-color .15s; }
.site .pg-tg-btn:hover, .prose .pg-tg-btn:hover { color: var(--accent); border-color: var(--accent); }

/* discuss row (under article) */
.pg-discuss { margin-top: 48px; padding: 22px 26px; border: 1px solid var(--rule); border-left: 3px solid var(--accent); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: var(--paper); }
.pg-discuss p { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.pg-discuss .mono { color: var(--accent); display: block; margin-bottom: 6px; }

/* consult contact form */
.pg-contact { padding: 64px 80px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 220px 1fr; gap: 64px; background: var(--bg-2); }
.pg-contact form { display: grid; gap: 16px; max-width: 560px; }
.pg-contact .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pg-contact label { display: grid; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pg-contact .btn { justify-self: start; }

/* ── author block ──────────────────────────────────────────── */
.pg-author { margin-top: 56px; padding: 32px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 72px 1fr; gap: 24px; align-items: start; }
.pg-author .ava { width: 72px; height: 72px; border-radius: 999px; }
.pg-author h4 { font-size: 20px; margin-bottom: 8px; }
.pg-author p { font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 620px; }
.pg-author .links { display: flex; gap: 16px; margin-top: 14px; font-size: 13px; }

/* ── related ───────────────────────────────────────────────── */
.pg-related { padding: 64px 80px 80px; }
.pg-related-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 32px; }
.pg-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ════════════════ INDEX (Лента / Материалы) ═════════════════ */
.pg-index-head { padding: 64px 80px 40px; }
.pg-index-head h1 { font-size: 64px; line-height: 1.04; letter-spacing: -0.03em; margin-bottom: 20px; }
.pg-index-head p { font-family: var(--serif); font-size: 22px; font-style: italic; line-height: 1.45; color: var(--ink-2); max-width: 680px; }
.pg-filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 80px 36px; }
.pg-chip { font-family: var(--sans); font-size: 13px; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--bg); color: var(--muted); cursor: pointer; transition: all .15s; }
.pg-chip:hover { border-color: var(--ink); color: var(--ink); }
.pg-chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pg-index-grid { padding: 0 80px 80px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* material card badge (free / paid) */
.pg-badge { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r); align-self: flex-start; }
.pg-badge--free { background: var(--accent-soft); color: var(--accent); }
.pg-badge--paid { background: var(--ink); color: var(--bg); }

/* ════════════════ MATERIAL (single) ═════════════════════════ */
.pg-mat { padding: 56px 80px 0; }
.pg-mat-head { margin-bottom: 40px; }
.pg-mat-grid { display: grid; gap: 56px; align-items: start; }
.var-showcase .pg-mat-grid { grid-template-columns: 1.1fr 0.9fr; }
.var-doc .pg-mat-grid { grid-template-columns: minmax(0, 760px); justify-content: center; }
.var-doc .pg-buybox { position: static; }
.pg-mat-cover { aspect-ratio: 4/3; }
.var-doc .pg-mat-cover { aspect-ratio: 16/8; margin-bottom: 8px; }
.pg-buybox { position: sticky; top: 92px; border: 1px solid var(--ink); padding: 28px; background: var(--paper); }
.pg-buybox .price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.pg-buybox .price b { font-family: var(--serif); font-size: 40px; font-weight: 400; }
.pg-buybox .price s { color: var(--muted-2); font-size: 18px; }
.pg-buybox .note { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.pg-buybox .btn { width: 100%; justify-content: center; margin-bottom: 12px; }
.pg-spec { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.pg-spec .row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.pg-spec .row .k { color: var(--muted); }
.pg-mat-blocks { margin-top: 24px; }
.pg-mat-blocks h2 { font-size: 28px; margin: 40px 0 18px; }

/* ════════════════ ABOUT (extended) ══════════════════════════ */
.pg-about-hero { padding: 72px 80px 56px; display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start; }
.pg-about-hero h1 { font-size: 64px; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 24px; }
.pg-about-hero .lead { font-family: var(--serif); font-size: 24px; font-style: italic; line-height: 1.45; color: var(--ink-2); margin-bottom: 20px; }
.pg-about-hero .portrait { width: 340px; height: 420px; }
.pg-about-body { padding: 56px 80px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 220px minmax(0,720px); gap: 64px; justify-content: center; }
.pg-about-body .prose { grid-column: 2; }
.pg-about-aside { position: sticky; top: 92px; align-self: start; }
.pg-tl { display: flex; flex-direction: column; }
.pg-tl .row { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 20px 0; border-top: 1px solid var(--rule); }
.pg-tl .row .yr { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.pg-tl .row h4 { font-size: 18px; margin-bottom: 6px; }
.pg-tl .row p { font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ════════════════ CONSULT (service) ═════════════════════════ */
.pg-svc-hero { padding: 72px 80px 56px; }
.pg-svc-hero h1 { font-size: 60px; line-height: 1.06; letter-spacing: -0.025em; max-width: 900px; margin-bottom: 24px; }
.pg-svc-hero .lead { font-family: var(--serif); font-size: 24px; font-style: italic; line-height: 1.45; color: var(--ink-2); max-width: 720px; }
.pg-steps { padding: 56px 80px; border-top: 1px solid var(--rule); }
.pg-steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.pg-step { background: var(--bg); padding: 32px 28px; }
.pg-step .n { font-family: var(--serif); font-size: 48px; color: var(--accent); line-height: 1; margin-bottom: 18px; }
.pg-step h3 { font-size: 22px; margin-bottom: 10px; }
.pg-step p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.pg-tiers { padding: 56px 80px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.pg-tier { border: 1px solid var(--rule); padding: 32px; display: flex; flex-direction: column; }
.pg-tier.is-feat { border-color: var(--accent); background: var(--paper); }
.pg-tier h3 { font-size: 24px; margin-bottom: 8px; }
.pg-tier .price { font-family: var(--serif); font-size: 36px; margin-bottom: 18px; }
.pg-tier ul { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; }
.pg-tier li { display: grid; grid-template-columns: 22px 1fr; font-size: 14px; color: var(--ink-2); }
.pg-tier li::before { content: "→"; color: var(--accent); }
.pg-tier .btn { margin-top: auto; }
.pg-faq { padding: 56px 80px 80px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 220px 1fr; gap: 64px; }
.pg-faq-list { display: flex; flex-direction: column; }
.pg-faq-item { padding: 24px 0; border-top: 1px solid var(--rule); }
.pg-faq-item:last-child { border-bottom: 1px solid var(--rule); }
.pg-faq-item h4 { font-size: 20px; margin-bottom: 10px; }
.pg-faq-item p { font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 680px; }

/* now archive */
.pg-now-list { padding: 0 80px 80px; }
.pg-now-row { display: grid; grid-template-columns: 200px 1fr; gap: 48px; padding: 36px 0; border-top: 1px solid var(--rule); }
.pg-now-row:last-child { border-bottom: 1px solid var(--rule); }
.pg-now-row .d { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); padding-top: 6px; }
.pg-now-row .d .is-new { color: var(--accent); display: block; margin-top: 6px; }
.pg-now-row .t { font-family: var(--serif); font-size: 24px; line-height: 1.45; color: var(--ink-2); max-width: 780px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .pg-header, .pg-toolbar, .pg-article-head, .pg-body, .pg-related, .pg-index-head, .pg-filters, .pg-index-grid, .pg-mat, .pg-about-hero, .pg-about-body, .pg-svc-hero, .pg-steps, .pg-tiers, .pg-faq, .pg-cover { padding-left: 40px; padding-right: 40px; }
  .pg-cover { margin-left: 40px; margin-right: 40px; }
  .site .pg-title { font-size: 48px; }
  .var-toc .pg-body-grid { grid-template-columns: 200px minmax(0,1fr); }
  .pg-index-grid, .pg-grid3 { grid-template-columns: 1fr 1fr; }
  .var-showcase .pg-mat-grid { grid-template-columns: 1fr 1fr; }
  .pg-about-hero { grid-template-columns: 1fr 280px; }
  .pg-about-hero .portrait { width: 280px; height: 340px; }
}
@media (max-width: 720px) {
  .pg-header, .pg-toolbar, .pg-article-head, .pg-body, .pg-related, .pg-index-head, .pg-filters, .pg-index-grid, .pg-mat, .pg-about-hero, .pg-about-body, .pg-svc-hero, .pg-steps, .pg-tiers, .pg-faq, .pg-cover { padding-left: 22px; padding-right: 22px; }
  .pg-cover { margin-left: 22px; margin-right: 22px; }
  .pg-header { grid-template-columns: 1fr; gap: 12px; }
  .pg-nav { flex-wrap: nowrap; gap: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
  .pg-nav::-webkit-scrollbar { display: none; }
  .pg-nav a { white-space: nowrap; }
  .site .pg-title { font-size: 34px; }
  .pg-contact { grid-template-columns: 1fr; gap: 28px; }
  .pg-contact .row2 { grid-template-columns: 1fr; }
  .pg-now-list { padding-left: 22px; padding-right: 22px; }
  .pg-now-row { grid-template-columns: 1fr; gap: 12px; padding: 26px 0; }
  .pg-now-row .t { font-size: 19px; }
  .pg-dek { font-size: 19px; }
  .pg-body { padding-top: 40px; }
  .var-toc .pg-body-grid, .var-plain .pg-body-grid { grid-template-columns: 1fr; }
  .var-toc .pg-toc { display: none; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 26px; }
  .pull p { font-size: 22px; }
  .pg-tg { grid-template-columns: 1fr; }
  .pg-index-head h1 { font-size: 40px; }
  .pg-index-grid, .pg-grid3 { grid-template-columns: 1fr; }
  .var-showcase .pg-mat-grid, .var-doc .pg-mat-grid { grid-template-columns: 1fr; }
  .pg-buybox { position: static; }
  .pg-about-hero { grid-template-columns: 1fr; }
  .pg-about-body { grid-template-columns: 1fr; gap: 28px; }
  .pg-about-body .prose { grid-column: 1; }
  .pg-about-aside { position: static; }
  .pg-steps-grid, .pg-tiers { grid-template-columns: 1fr; }
  .pg-faq { grid-template-columns: 1fr; gap: 28px; }
  .pg-svc-hero h1 { font-size: 36px; }
  .pg-about-hero h1 { font-size: 40px; }
}


/* ════════════════════════════════════════════════════════════
   WordPress adapter — маппинг блоков WP на классы прототипа
   ════════════════════════════════════════════════════════════ */

body.site { margin: 0; background: var(--bg); }
.wp-site-blocks { padding: 0; }

/* ── Full-bleed раскладка ─────────────────────────────────────
   Тело страницы — во всю ширину вьюпорта (фоны тёмных и бежевых
   секций тянутся от края до края), а контент выравнивается по
   центральному контейнеру 1280px через переменную-гаттер --gx:
   на широких экранах = (50vw − 640px) + 80px, дальше — брейкпоинты. */
.site { --gx: max(80px, calc(50vw - 560px)); }
@media (max-width: 1080px) { .site { --gx: 40px; } }
@media (max-width: 720px)  { .site { --gx: 22px; } }

.site.v6, body.site.pg { max-width: none; }

/* убрать 24px-межблочные отступы корневого уровня (белые полосы
   между цветными секциями) */
.site .wp-site-blocks > * { margin-block-start: 0; }
.site .wp-site-blocks section,
.site .wp-site-blocks header.pg-index-head,
.site .wp-site-blocks nav.pg-filters { margin-block-start: 0; }

/* горизонтальные поля всех секций-«полос» — через --gx */
.site .v6-header, .site .v6-hero, .site .v6-now-wrap, .site .v6-sec,
.site .v6-about, .site .v6-tg,
.site .pg-header, .site .pg-toolbar, .site .pg-sec,
.site .pg-article-head, .site .pg-body, .site .pg-related,
.site .pg-index-head, .site .pg-filters, .site .pg-index-query,
.site .pg-mat, .site .pg-mat-after,
.site .pg-about-hero, .site .pg-about-body,
.site .pg-svc-hero, .site .pg-steps, .site .pg-tiers,
.site .pg-apply, .site .pg-faq, .site .pg-contact,
.site .pg-now-list {
  padding-left: var(--gx);
  padding-right: var(--gx);
}
.site .pg-cover { margin-left: var(--gx); margin-right: var(--gx); }

/* убрать дефолтные отступы групп */
.site .wp-block-group { margin: 0; }

/* ── Заголовки записей в карточках (query loop) ───────────── */
.site .wp-block-post-template { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: tcard; }
.site .wp-block-post-template > li { margin: 0; counter-increment: tcard; }
/* фоновая цифра карточки — вместо data-num из прототипа */
.site .wp-block-post-template .tcard .tcard-top::before { content: counter(tcard, decimal-leading-zero); }
.site .tcard .tcard-top > * { margin: 0; }
@media (max-width: 1080px) { .site .wp-block-post-template { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .site .wp-block-post-template { grid-template-columns: 1fr; } }

.site .tcard .wp-block-post-title { font-size: 21px; line-height: 1.22; margin: 0 0 10px; }
.site .tcard .wp-block-post-title a { color: inherit; border-bottom: 0; transition: color .15s; }
.site .tcard:hover .wp-block-post-title a { color: var(--accent); }
.site .tcard .wp-block-post-excerpt__excerpt { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0; }
.site .tcard .wp-block-post-date { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.site .tcard .wp-block-post-terms { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.site .tcard .wp-block-post-terms a { color: var(--accent); border-bottom: 0; }

/* ── Страница статьи ──────────────────────────────────────── */
.site .pg-kicker > * { margin: 0; }
.site .pg-article-head .wp-block-post-title { font-family: var(--serif); font-weight: 400; font-size: 60px; line-height: 1.08; letter-spacing: -0.025em; max-width: 920px; margin: 0 0 24px; }
@media (max-width: 1080px) { .site .pg-article-head .wp-block-post-title { font-size: 48px; } }
@media (max-width: 720px) { .site .pg-article-head .wp-block-post-title { font-size: 34px; } }
.site .pg-article-head .wp-block-post-date,
.site .pg-article-head .wp-block-post-terms { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.site .pg-article-head .wp-block-post-terms a { color: var(--accent); border-bottom: 0; }

/* ── Заголовок архива (рубрики, метки) ──────────────── */
.site .pg-index-head .wp-block-query-title { font-family: var(--serif); font-weight: 400; font-size: 64px; line-height: 1.04; letter-spacing: -0.03em; margin: 0; }
@media (max-width: 720px) { .site .pg-index-head .wp-block-query-title { font-size: 40px; } }
.site .wp-block-post-content.prose > * + * { margin-top: 26px; }
.site .wp-block-post-content.prose { max-width: 720px; margin: 0 auto; padding: 56px 22px 0; }
.site .wp-block-post-featured-image img { width: 100%; height: auto; display: block; }

/* ── Пагинация (заменяет «Показать ещё») ──────────────────── */
.site .wp-block-query-pagination { display: flex; gap: 10px; justify-content: center; align-items: center; padding: 48px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.site .wp-block-query-pagination a { color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r); padding: 10px 16px; transition: all .15s; }
.site .wp-block-query-pagination a:hover { border-color: var(--accent); color: var(--accent); }
.site .wp-block-query-pagination-numbers .current { padding: 10px 16px; background: var(--ink); color: var(--bg); border-radius: var(--r); }

/* ── Contact Form 7 ───────────────────────────────────────── */
.site .wpcf7 input[type="text"],
.site .wpcf7 input[type="email"],
.site .wpcf7 input[type="tel"],
.site .wpcf7 textarea {
  font-family: var(--sans); font-size: 14px; padding: 12px 14px;
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--bg); color: var(--ink); width: 100%;
  transition: border-color .15s;
}
.site .wpcf7 input:focus, .site .wpcf7 textarea:focus { outline: none; border-color: var(--accent); }
.site .wpcf7 label { display: grid; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.site .wpcf7 input[type="submit"] {
  display: inline-flex; padding: 12px 18px; border: 1px solid var(--ink); border-radius: var(--r);
  background: var(--ink); color: var(--bg); font-family: var(--sans); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.site .wpcf7 input[type="submit"]:hover { background: var(--accent); border-color: var(--accent); }
.site .wpcf7 .wpcf7-response-output { font-size: 13px; color: var(--accent); border: 1px solid var(--rule); padding: 12px 16px; margin: 16px 0 0; }

/* ── §02 на главной: шапка секции и query-сетка — одна секция ── */
.site .v6-articles { padding-bottom: 0; }
.site .v6-articles .v6-sechead { margin-bottom: 48px; }
.site .v6-articles-query { padding-top: 0; padding-bottom: 72px; }

/* ── Сетка архивов: боковые поля как в прототипе ──────────── */
.site .pg-index-query { padding: 0 var(--gx) 80px; }
@media (max-width: 720px) { .site .pg-index-query { padding-bottom: 56px; } }
.site .wp-block-query-pagination { padding-left: 0; padding-right: 0; }

/* ── Фильтры-чипы: рубрики (wp:categories) и термы (wp:tag-cloud) ── */
.site .pg-filters { align-items: center; }
.site .pg-filters .wp-block-categories,
.site .pg-filters .wp-block-categories li,
.site .pg-filters .wp-block-tag-cloud { display: contents; list-style: none; padding: 0; margin: 0; }
.site .pg-filters a {
  display: inline-flex; align-items: center;
  font-family: var(--sans); font-size: 13px !important; line-height: 1.2;
  padding: 8px 14px; border: 1px solid var(--rule); border-radius: var(--r-pill);
  background: var(--bg); color: var(--muted); text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.site .pg-filters a:hover { border-color: var(--ink); color: var(--ink); }
.site .pg-filters a.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ── Карточка материала в query loop ──────────────────────── */
.site .tcard--mat .tcard-body { display: flex; flex-direction: column; flex: 1; }
.site .tcard-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--rule);
}
.site .tcard--mat .wp-block-post-excerpt { margin-bottom: 16px; }
.site .tcard-foot .mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.site .tcard-foot .tcard-price { color: var(--accent); }

/* бейдж доступа (бесплатно / платно) из wp:post-terms */
.site .mat-access.wp-block-post-terms { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.site .mat-access.wp-block-post-terms a {
  display: inline-block; padding: 3px 8px; border-radius: var(--r);
  border-bottom: 0; background: var(--accent-soft); color: var(--accent);
}
.site .mat-access.wp-block-post-terms a[href$="/platno/"] { background: var(--ink); color: var(--bg); }
.site .mat-kind.wp-block-post-terms { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.site .mat-kind.wp-block-post-terms a { color: var(--muted); border-bottom: 0; }
.site .mat-kind.wp-block-post-terms a:hover { color: var(--accent); }

/* ── Тулбар-хлебная крошка над статьёй/материалом ─────────── */
.site .pg-toolbar > .pg-crumb { margin: 0; }
.site .pg-crumb > * { margin: 0; }
.site .pg-crumb .wp-block-post-terms { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.site .pg-crumb .wp-block-post-terms a { color: var(--muted); border-bottom: 1px solid transparent; }
.site .pg-crumb .wp-block-post-terms a:hover { color: var(--accent); }

/* ── Дек (подзаголовок) из wp:post-excerpt ────────────────── */
.site .wp-block-post-excerpt.pg-dek-wrap { margin: 0; }
.site .pg-dek-wrap .wp-block-post-excerpt__excerpt {
  font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.45;
  color: var(--ink-2); max-width: 740px; margin: 0;
}
@media (max-width: 720px) { .site .pg-dek-wrap .wp-block-post-excerpt__excerpt { font-size: 19px; } }

/* ── Тело статьи: колонка внутри pg-body-grid ─────────────── */
.site .pg-col { min-width: 0; }
.site .pg-col .wp-block-post-content.prose { max-width: none; margin: 0; padding: 0; }
.site .pg-toc-links a { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); padding: 7px 0 7px 14px; border-left: 1px solid var(--rule); transition: color .15s, border-color .15s; }
.site .pg-toc-links a:hover, .site .pg-toc-links a.is-active { color: var(--ink); border-left-color: var(--accent); }

/* обложка статьи 16:8 */
.site .wp-block-post-featured-image.pg-cover { aspect-ratio: 16/8; overflow: hidden; border-radius: var(--r); }
.site .wp-block-post-featured-image.pg-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* заголовок «Читать дальше» */
.site .pg-related-head h2 { font-size: 32px; }

/* ── Страница материала ───────────────────────────────────── */
.site .pg-mat-head .wp-block-post-title { font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: 1.08; letter-spacing: -0.025em; max-width: 920px; margin: 0 0 24px; }
@media (max-width: 720px) { .site .pg-mat-head .wp-block-post-title { font-size: 32px; } }
.site .pg-mat-head .pg-kicker { margin-bottom: 18px; }
.site .wp-block-post-content.pg-mat-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; max-width: none; margin: 0; padding: 0; }
@media (max-width: 1080px) { .site .wp-block-post-content.pg-mat-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 720px) { .site .wp-block-post-content.pg-mat-grid { grid-template-columns: 1fr; } }
.site .pg-mat-col { min-width: 0; }
.site .pg-mat-col .pg-mat-cover { margin-bottom: 24px; }
.site .wp-block-group.pg-buybox { position: sticky; top: 92px; }
@media (max-width: 720px) { .site .wp-block-group.pg-buybox { position: static; } }
.site .pg-mat-after { padding: 48px var(--gx) 64px; }
.site .pg-mat-after .pg-tg { margin-top: 0; }
.site .buybox-tg { width: 100%; justify-content: center; margin-bottom: 10px; }

/* CF7 в байбоксе — строка «почта + →» как в прототипе */
.site .pg-buybox .wpcf7 form { display: flex; gap: 8px; align-items: stretch; }
.site .pg-buybox .wpcf7 form > p { display: flex; gap: 8px; flex: 1; margin: 0; min-width: 0; }
.site .pg-buybox .wpcf7 label { margin: 0; flex: 1; min-width: 0; }
.site .pg-buybox .wpcf7 input[type="submit"] { padding: 0 16px; }
.site .pg-buybox .wpcf7 .wpcf7-spinner { display: none; }

/* ── Секция «Заявка» на консультациях ─────────────────────── */
.site .pg-apply { padding: 56px var(--gx); border-top: 1px solid var(--rule); }
.site .pg-apply .wpcf7 form { display: grid; gap: 16px; max-width: 560px; }
.site .pg-apply .wpcf7 label { margin-bottom: 0; }
.site .pg-apply .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .site .pg-apply .row2 { grid-template-columns: 1fr; } }
.site .pg-apply .wpcf7 input[type="submit"] { justify-self: start; }

/* ── A11y: контраст мелких mono-подписей (WCAG AA 4.5:1) ────
   Палитра не меняется — только применение на конкретных мелких
   подписях, где исходное сочетание не добирало контраста. */
.site .seccount { color: var(--muted); }
.site .v6-dark .mono { color: var(--muted-2); }
.site .v6-dark .seccount { color: var(--muted-2); }
.site .v6-dark .v6-projmeta { color: var(--rule); }
.site .v6-dark .seclabel .num { color: #e8703a; }
.site .pg-badge--free { color: #a63e0b; }
.site .mat-access.wp-block-post-terms a { color: #a63e0b; }
.site .mat-access.wp-block-post-terms a[href$="/platno/"] { color: var(--bg); }
.site .pg-buybox .or-rule { color: var(--muted); }

/* ── 404: сетка «полок» ───────────────────────────────────── */
.site .nf-shelves {
  margin: 0 var(--gx) 96px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--rule); border: 1px solid var(--rule);
}
@media (max-width: 1080px) { .site .nf-shelves { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px)  { .site .nf-shelves { grid-template-columns: 1fr; margin-bottom: 64px; } }

/* ── Шапка страницы материала: отступ до сетки ────────────── */
.site .wp-block-group.pg-mat-head { margin-bottom: 40px; }
@media (max-width: 720px) { .site .wp-block-group.pg-mat-head { margin-bottom: 28px; } }

/* ── Мобильная плотность: меньше воздуха на ≤720 ──────────── */
@media (max-width: 720px) {
  .site .v6-ucard { min-height: 0; }
  .site .tcard .tcard-top { min-height: 108px; }
  .site .v6-sec { padding-top: 56px; padding-bottom: 56px; }
  .site .v6-articles { padding-bottom: 0; }
  .site .v6-articles-query { padding-top: 0; padding-bottom: 56px; }
  .site .v6-about { padding-top: 56px; padding-bottom: 56px; }
  .site .v6-tg { padding-top: 64px; padding-bottom: 40px; }
  .site .pg-article-head { padding-top: 44px; padding-bottom: 32px; }
  .site .pg-index-head { padding-top: 44px; padding-bottom: 28px; }
  .site .pg-svc-hero, .site .pg-about-hero { padding-top: 48px; padding-bottom: 40px; }
  .site .pg-steps, .site .pg-tiers, .site .pg-apply { padding-top: 44px; padding-bottom: 44px; }
  .site .pg-faq { padding-top: 44px; padding-bottom: 56px; }
  .site .pg-related { padding-top: 44px; padding-bottom: 56px; }
}

/* ── Компактный ритм (запрос: меньше пустоты) ─────────────────
   Вертикальные отступы секций 72–96px → 48–64px, заголовки 40→36px,
   карточки без принудительной высоты, портреты меньше. */

/* ссылки «архив всех текстов» / «все материалы» — под заголовком на мобиле */
@media (max-width: 720px) {
  .site .v6-sechead-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* вертикальные отступы: десктоп */
.site .v6-hero { padding-top: 48px; padding-bottom: 64px; }
.site .v6-sec { padding-top: 48px; padding-bottom: 48px; }
.site .v6-articles { padding-bottom: 0; }
.site .v6-articles-query { padding-top: 0; padding-bottom: 48px; }
.site .v6-about { padding-top: 56px; padding-bottom: 56px; }
.site .v6-tg { padding-top: 64px; padding-bottom: 48px; }
.site .v6-sechead { margin-bottom: 36px; }
.site .pg-article-head { padding-top: 48px; padding-bottom: 32px; }
.site .pg-index-head { padding-top: 48px; padding-bottom: 28px; }
.site .pg-body { padding-top: 48px; }
.site .pg-related { padding-top: 48px; padding-bottom: 56px; }
.site .pg-svc-hero, .site .pg-about-hero { padding-top: 56px; padding-bottom: 44px; }
.site .pg-steps, .site .pg-tiers, .site .pg-apply, .site .pg-contact { padding-top: 48px; padding-bottom: 48px; }
.site .pg-faq { padding-top: 48px; padding-bottom: 64px; }
.site .pg-about-body { padding-top: 48px; padding-bottom: 48px; }
.site .pg-mat { padding-top: 48px; }

/* заголовки 40 → 36 */
.site .v6-sech2 { font-size: 36px; }
.site .v6-consult-h2 { font-size: 36px; }

/* карточки: без принудительной высоты, компактнее */
.site .v6-ucard { min-height: 0; padding: 26px 24px; }
.site .v6-ucard h3 { margin-bottom: 12px; }
.site .v6-ucard p { margin-bottom: 20px; }
.site .v6-ucard-top { margin-bottom: 22px; }
.site .tcard .tcard-top { min-height: 104px; padding: 18px 18px 14px; }
.site .tcard .tcard-body { padding: 16px 18px 18px; }

/* портреты меньше */
.site .v6-about-grid { grid-template-columns: 240px 1fr; }
.site .v6-about-portrait { width: 240px; height: 300px; }
.site .pg-about-hero { grid-template-columns: 1fr 280px; }
.site .pg-about-hero .portrait { width: 280px; height: 340px; }
@media (max-width: 1080px) {
  .site .v6-about-grid { grid-template-columns: 220px 1fr; }
  .site .v6-about-portrait { width: 220px; height: 275px; }
  .site .pg-about-hero { grid-template-columns: 1fr 240px; }
  .site .pg-about-hero .portrait { width: 240px; height: 300px; }
}
@media (max-width: 720px) {
  .site .v6-about-grid { grid-template-columns: 1fr; }
  .site .v6-about-portrait { width: 100%; max-width: 240px; height: 300px; }
  .site .pg-about-hero { grid-template-columns: 1fr; }
  .site .pg-about-hero .portrait { width: 240px; height: 300px; }
}

/* мобильные h1 40 → 36 + ритм ещё плотнее */
@media (max-width: 720px) {
  .site .v6-h1 { font-size: 36px; }
  .site .v6-dark .v6-h2xl { font-size: 36px; }
  .site .pg-index-head h1, .site .pg-index-head .wp-block-query-title { font-size: 36px; }
  .site .pg-about-hero h1 { font-size: 36px; }
  .site .v6-sec { padding-top: 44px; padding-bottom: 44px; }
  .site .v6-articles { padding-bottom: 0; }
  .site .v6-articles-query { padding-top: 0; padding-bottom: 44px; }
  .site .v6-about { padding-top: 44px; padding-bottom: 44px; }
  .site .v6-tg { padding-top: 56px; padding-bottom: 36px; }
  .site .v6-sechead { margin-bottom: 28px; }
  .site .pg-article-head { padding-top: 40px; padding-bottom: 28px; }
  .site .pg-index-head { padding-top: 40px; padding-bottom: 24px; }
  .site .pg-body { padding-top: 36px; }
  .site .pg-svc-hero, .site .pg-about-hero { padding-top: 44px; padding-bottom: 36px; }
  .site .pg-steps, .site .pg-tiers, .site .pg-apply, .site .pg-contact { padding-top: 40px; padding-bottom: 40px; }
  .site .pg-faq { padding-top: 40px; padding-bottom: 48px; }
  .site .pg-related { padding-top: 40px; padding-bottom: 48px; }
  .site .tcard .tcard-top { min-height: 96px; }
}

/* ── UX-аудит: тап-зоны, кегли, sticky-CTA, мост, порядок байбокса ── */

/* CTA-мост после §02 (только мобайл) */
.site .v6-bridge { display: none; }
@media (max-width: 720px) {
  .site .v6-bridge { display: block; padding: 0 var(--gx) 44px; }
  .site .v6-bridge-link {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--r);
    background: var(--paper);
  }
  .site .v6-bridge-handle { font-size: 14px; font-weight: 500; white-space: nowrap; }
  .site .v6-bridge-link:hover .v6-bridge-handle { color: var(--accent); }
}

/* Sticky-CTA внизу экрана (ставит JS, только ≤720) */
.site .stas-cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; width: auto; z-index: 45;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 10px 22px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--bg);
  opacity: 0; visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
@media (prefers-reduced-motion: reduce) { .site .stas-cta-bar { transition: none; } }
.site .stas-cta-bar.is-show { opacity: 1; visibility: visible; }
.site .stas-cta-text { flex: 1 1 auto; font-family: var(--serif); font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site .stas-cta-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border: 1px solid var(--accent); border-radius: var(--r);
  background: var(--accent); color: #fff; font-family: var(--sans);
  font-size: 14px; font-weight: 500; cursor: pointer;
}
/* на узких экранах текст убираем (цена/суть продублированы в кнопке),
   кнопка растягивается, крестик остаётся справа */
@media (max-width: 600px) {
  .site .stas-cta-text { display: none; }
  .site .stas-cta-btn { flex: 1 1 auto; }
}
.site .stas-cta-close { flex: none; }
@media (min-width: 721px) { .site .stas-cta-bar { display: none; } }

/* Мобильный порядок страницы материала: байбокс (цена+CTA) — первым */
@media (max-width: 720px) {
  .site .wp-block-post-content.pg-mat-grid > .wp-block-group.pg-buybox { order: -1; }
}

/* Короче главная на мобиле: 2 поста в §02, компактные строки §03 */
@media (max-width: 720px) {
  .site .v6-articles-query .wp-block-post-template > li:nth-child(3) { display: none; }
  .site .v6-projrow { padding: 18px 0; gap: 6px 14px; }
  .site .v6-projnum { font-size: 36px; }
  .site .v6-projbody h3 { font-size: 21px; margin-bottom: 6px; }
  .site .v6-projbody p { font-size: 13.5px; }
}

/* Тап-зоны и кегли (мобайл) */
@media (max-width: 720px) {
  .site .pg-nav a, .site .v6-nav a { padding-top: 10px; padding-bottom: 10px; }
  .site .v6-footer-links { gap: 2px; }
  .site .v6-footer-links a { font-size: 15px; padding: 8px 0; }
  .site .v6-footer-grid { font-size: 14px; }
  .site .tcard .wp-block-post-excerpt__excerpt { font-size: 15px; }
  .site .v6-tcard p { font-size: 15px; }
  .site .v6-ucard p { font-size: 16px; }
  .site .v6-ucard-link { padding: 8px 0; }
  .site .pg-share button, .site .pg-share a { padding: 10px 14px; }
  .site .pg-crumb a, .site .pg-crumb .wp-block-post-terms a { padding: 8px 0; display: inline-block; }
  .site .pg-filters a { padding-top: 11px; padding-bottom: 11px; }
  .site .v6-fact { font-size: 14px; }
}

/* очень узкие экраны (~360): компактнее кегль меню */
@media (max-width: 380px) {
  .site .pg-nav, .site .v6-nav { gap: 12px; font-size: 13px; }
}

/* ── Аудит v2: P1/P2/P3 ────────────────────────────────────── */

/* P1.1: переполнение ≤375 — h2 не шире своей flex-колонки */
@media (max-width: 720px) {
  .site .v6-sechead-row { align-items: stretch; }
  .site .v6-sech2 { max-width: 100%; overflow-wrap: break-word; }
}
/* P1.1: на очень узких меню переносится на вторую строку */
@media (max-width: 380px) {
  .site .pg-nav, .site .v6-nav { flex-wrap: wrap; overflow-x: visible; row-gap: 0; }
}

/* P1.2: sticky-CTA — кнопка закрытия */
.site .stas-cta-close {
  flex: none; width: 40px; height: 40px; margin: -6px -12px -6px -4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--muted-2);
  font-size: 22px; line-height: 1; cursor: pointer;
}

/* P2.4: плейсхолдеры на мобиле — иллюстрацию прячем, портреты ниже */
@media (max-width: 720px) {
  .site .v6-consult-illu { display: none; }
  .site .v6-about-portrait { height: 260px; }
  .site .pg-about-hero .portrait { height: 260px; }
  .site .v6-aside-format { display: none; }
}

/* P2.5: H1 первого экрана — clamp, CTA попадает в первый экран и на 320 */
@media (max-width: 720px) {
  .site .v6-h1 { font-size: clamp(27px, 9vw, 36px); margin-bottom: 22px; }
  .site .v6-hero-lead { font-size: 18px; }
  .site .pg-index-head h1, .site .pg-index-head .wp-block-query-title { font-size: clamp(28px, 9.2vw, 36px); }
  .site .pg-title, .site .pg-article-head .wp-block-post-title { font-size: clamp(26px, 8.7vw, 34px); }
  .site .pg-about-hero h1 { font-size: clamp(28px, 9.2vw, 36px); }
  .site .pg-svc-hero h1 { font-size: clamp(27px, 9vw, 36px); }
}

/* P2.7: карточки без «разреза» — линейка мягче, цифра глубже в фон */
.site .tcard .tcard-top { border-bottom-color: var(--rule-2); }
.site .tcard .tcard-top::before { opacity: 0.07; }
@media (max-width: 720px) {
  .site .tcard .tcard-top::before { font-size: 84px; bottom: -16px; }
}

/* P2.6: валидация CF7 — заметные сообщения на мобиле */
.site .wpcf7 .wpcf7-not-valid-tip {
  display: block; margin-top: 6px;
  font-family: var(--sans); font-size: 13px; text-transform: none; letter-spacing: 0;
  color: var(--accent);
}
.site .wpcf7 .wpcf7-not-valid { border-color: var(--accent); }
.site .wpcf7 form.invalid .wpcf7-response-output,
.site .wpcf7 form.failed .wpcf7-response-output { border-color: var(--accent); color: var(--accent); }
.site .wpcf7 form.sent .wpcf7-response-output { border-color: var(--ink); color: var(--ink); }

/* P3: сворачиваемое оглавление в начале статьи (мобайл) */
.site .pg-toc-mobile { display: none; }
@media (max-width: 720px) {
  .site .var-toc .pg-toc-mobile {
    display: block; margin: 0 0 28px;
    border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper);
  }
  .site .pg-toc-mobile summary {
    padding: 14px 18px; cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: center;
  }
  .site .pg-toc-mobile summary::-webkit-details-marker { display: none; }
  .site .pg-toc-mobile summary::after { content: "+"; font-family: var(--mono); color: var(--muted); }
  .site .pg-toc-mobile[open] summary::after { content: "–"; }
  .site .pg-toc-mobile .pg-toc-links { padding: 0 18px 14px; }
}

/* P3: явная кликабельность плашки «Сейчас» */
.site .v6-now-meta { color: var(--accent); }

/* P3: состояние нажатия у чипов и кнопок */
.site .pg-filters a:active { transform: scale(0.96); }
.site .btn:active, .site .stas-cta-btn:active { transform: scale(0.97); }

/* ── Ползунок прочтения: 3px, по контенту статьи (ширину ставит JS) ── */
.site .pg-progress { height: 3px; pointer-events: none; transition: none; }

/* ── Навигация: подсветка текущей страницы (ставит JS) ────── */
.site .pg-nav a.is-current, .site .v6-nav a.is-current { color: var(--accent); }


/* ── Cookie-плашка: согласие на счётчики (рисует site.js) ──────
   Компактная тёмная карточка снизу-слева, видна сразу при заходе.
   Поверх шапки (30) и прогресс-бара (50) — z 60. Одна кнопка «Хорошо».
   Тёмная тема: токены переопределены в блоке .theme-dark ниже. */
.site .stas-cc {
  position: fixed; z-index: 60;
  left: max(16px, env(safe-area-inset-left, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(340px, calc(100vw - 32px));
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 18px 20px; border-radius: var(--r);
  background: var(--ink); color: var(--bg);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.site .stas-cc.is-show { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .site .stas-cc { transition: none; transform: none; }
}
.site .stas-cc-text {
  margin: 0; font-family: var(--sans); font-size: 14px; line-height: 1.5;
}
.site .stas-cc-link {
  display: inline-flex; align-items: baseline; gap: 6px;
  color: var(--bg); opacity: .82; text-decoration: none;
  font-family: var(--sans); font-size: 13.5px;
}
.site .stas-cc-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 2px; }
.site .stas-cc-arrow { color: var(--accent); font-family: var(--mono); }
.site .stas-cc-actions { width: 100%; }
.site .stas-cc-btn {
  width: 100%; min-height: 44px; padding: 11px 20px; border-radius: var(--r);
  background: var(--accent); border: 1px solid var(--accent); color: #fff;
  font-family: var(--sans); font-size: 14.5px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.site .stas-cc-btn:active { transform: scale(0.96); }
/* совсем узкие экраны: прижимаем к обоим краям */
@media (max-width: 380px) {
  .site .stas-cc {
    left: 12px; width: calc(100vw - 24px);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Согласие у формы заявки (CF7 [acceptance] + строка под кнопкой) ── */
.site .wpcf7-acceptance { display: block; margin: 4px 0 2px; }
.site .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.site .wpcf7-acceptance label {
  display: flex; align-items: flex-start; gap: 10px;
  min-height: 40px; padding: 8px 0; cursor: pointer;
  font-family: var(--sans); font-size: 13.5px; line-height: 1.45; color: var(--muted);
  text-transform: none; letter-spacing: 0;
}
.site .wpcf7-acceptance input[type="checkbox"] {
  flex: none; width: 20px; height: 20px; margin: 1px 0 0;
  accent-color: var(--accent); cursor: pointer;
}
.site .wpcf7-acceptance a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.site .pg-consent-note {
  margin: 12px 0 0; font-family: var(--sans); font-size: 12.5px; line-height: 1.5; color: var(--muted-2);
}
.site .pg-consent-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ── Таблица в тексте страниц (напр. cookies в политике) ────── */
.site .prose .wp-block-table { margin: 22px 0; overflow-x: auto; }
.site .prose .wp-block-table table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14px; }
.site .prose .wp-block-table th,
.site .prose .wp-block-table td { text-align: left; padding: 9px 12px; border: 1px solid var(--rule); vertical-align: top; }
.site .prose .wp-block-table th { font-weight: 600; background: var(--bg-2); }

/* ── Страница «Политика конфиденциальности» ─────────────────
   Юридическая страница: убираем маркетинговый Telegram-призыв из футера
   (остаётся только служебная сетка со ссылками и копирайтом) и даём
   воздух между текстом и тёмным футером. */
.site.is-privacy .v6-tg-head,
.site.is-privacy .v6-tg .v6-h2xl,
.site.is-privacy .v6-tg-grid { display: none; }
.site.is-privacy .v6-tg { padding-top: 44px; }
.site.is-privacy .prose { padding-bottom: clamp(48px, 8vw, 88px); }


/* ════════════════════════════════════════════════════════════
   Тёмная тема — включается классом theme-dark на <html>.
   Светлая тема = значения по умолчанию в :root выше.
   Вся вёрстка на токенах, здесь только их переопределение
   + точечные правки, которые токенами не выражаются.
   ════════════════════════════════════════════════════════════ */

:root { color-scheme: light; }
html.theme-dark { color-scheme: dark; }

/* ── Токены ────────────────────────────────────────────────── */
html.theme-dark {
  --bg: #171410;
  --bg-2: #201c16;
  --ink: #ece7dc;
  --ink-2: #d9d2c4;
  --muted: #a49a88;
  --muted-2: #7a7163;
  --rule: #383226;
  --rule-2: #2a2620;
  --accent: #e35d1d;
  --accent-soft: #3d2413;
  --paper: #1d1913;
}

/* ── Инвертированные секции: приглушить, не слепить ────────────
   Тёмные зоны построены на свопе ink↔bg. В тёмной теме их фон —
   тёплый умбровый, заметно светлее фона страницы, но не белый. */
html.theme-dark .v6-dark,
html.theme-dark .pg-tg,
html.theme-dark .stas-cta-bar,
html.theme-dark .stas-cc {
  --ink: #3a332a;      /* фон секции */
  --bg: #efe9dc;       /* основной текст, рамки кнопок */
  --rule: #c6bda9;     /* вторичный текст (лиды, описания) */
  --muted: #7d7260;    /* разделительные линии */
  --muted-2: #b0a489;  /* подписи, плейсхолдеры (в ТЗ #a3977f, но он даёт
                          4.32:1 на умбре — ниже критерия ≥4.5 из того же ТЗ) */
  --paper: #443c31;    /* вложенные карточки */
  --bg-2: #443c31;
}
/* элементы на свопе ink↔bg вне секций: активные чипы/сегменты,
   бейдж «платно», текущая страница пагинации, кнопка подписки */
html.theme-dark .pg-filters a.is-active,
html.theme-dark .seg button.is-active,
html.theme-dark .pg-badge--paid,
html.theme-dark .mat-access.wp-block-post-terms a[href$="/platno/"],
html.theme-dark .wp-block-query-pagination-numbers .current,
html.theme-dark .sub-btn {
  background: #3a332a;
  border-color: #3a332a;
  color: #efe9dc;
}

/* ── Точечные правки вне токенов ──────────────────────────── */
/* штриховка плейсхолдеров: светлые линии на тёмном */
html.theme-dark .site .ph {
  background:
    repeating-linear-gradient(135deg,
      rgba(236,231,220,0.06) 0 1px,
      transparent 1px 9px),
    var(--bg-2);
}
html.theme-dark .site .portrait {
  background:
    repeating-linear-gradient(135deg,
      rgba(236,231,220,0.06) 0 1px,
      transparent 1px 10px),
    #241f18;
}
/* липкая шапка внутренних страниц: полупрозрачный тёмный + blur */
html.theme-dark .site .pg-header { background: rgba(23,20,16,0.88); }
/* hover-тень карточек не читается на тёмном — усилить и подсветить рамку */
html.theme-dark .site .tcard:hover {
  border-color: var(--muted);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,0.8);
}
/* пульс точки «сейчас» — терракота тёмной темы */
html.theme-dark .site .now-dot { box-shadow: 0 0 0 4px rgba(227,93,29,0.16); }
/* a11y-хардкоды светлой темы: светлее на тёмных фонах */
html.theme-dark .v6-dark .seclabel .num { color: #f08a52; }
html.theme-dark .site .pg-badge--free { color: #f0854c; }
html.theme-dark .site .mat-access.wp-block-post-terms a { color: #f0854c; }
html.theme-dark .site .mat-access.wp-block-post-terms a[href$="/platno/"] { color: #efe9dc; }

/* ── Кнопка-переключатель в меню ───────────────────────────── */
.site .theme-toggle {
  flex: none;
  width: 30px; height: 30px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); border-radius: 999px;
  background: transparent; color: var(--muted);
  font-size: 14px; line-height: 1; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.site .theme-toggle::before { content: "☾"; }
html.theme-dark .site .theme-toggle::before { content: "☀"; }
.site .theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* ── Анимация только по клику (класс вешает JS на ~250 мс) ─── */
@media (prefers-reduced-motion: no-preference) {
  html.theme-anim body,
  html.theme-anim body * {
    transition: background-color .25s ease, color .25s ease, border-color .25s ease !important;
  }
}
