/* ==========================================================================
   Квартирник — карта платформы. Единая дизайн-система (Architectural Product
   Studio). Единый источник токенов и примитивов: этот файл подключают
   ВСЕ страницы карты, включая обложку internal-component
   Тёплый холст, тёмный архитектурный каркас, один гротеск + monospace-подписи,
   лаймовый маркер и спокойный сине-зелёный вспомогательный цвет.
   Типографика: системный гротеск + системный моноширинный шрифт. Страница
   не ждёт внешнего сервиса шрифтов и остаётся читаемой без сети.
   ========================================================================== */

:root {
  color-scheme: light;

  --canvas: #f3f5f1;
  --paper: #ffffff;
  --ink: #17211e;
  --ink-soft: #68736e;
  --muted: #596660;
  --fill: #e9eeea;
  --fill-deep: #dde5df;
  --hairline: #d7ded9;
  --acid: #c8f548;
  --panel: #17231f;
  --panel-soft: #22322c;
  --panel-ink: #f6f8f4;
  --teal: #2f7067;
  --teal-soft: #dbeae5;
  --danger: #a84534;
  --ok: #2c7658;
  --status-done: var(--ok);
  --status-doing: var(--acid);
  --status-blocked: var(--danger);
  --status-planned: var(--fill);
  --status-conditional: var(--ink-soft);

  --sans: "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  /* Cascadia Code draws an open-top "4" that reads as Cyrillic "ц" in small badges. */
  --mono: ui-monospace, "Segoe UI Mono", Consolas, "SFMono-Regular", Menlo, monospace;

  --fs-display: clamp(2.1rem, 5.6vw, 4.75rem);
  --fs-h2: clamp(1.35rem, 2.4vw, 2.1rem);
  --fs-h3: clamp(1.1rem, 1.5vw, 1.35rem);
  --fs-micro: 0.875rem;
  --track-display: -0.03em;
  --track-micro: 0.055em;

  --page: clamp(1.25rem, 4vw, 4.5rem);
  --section: clamp(3rem, 6vw, 5.5rem);

  --r-sm: 12px;
  --r-md: 24px;
  --r-lg: 32px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 180ms;

  font-family: var(--sans);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  overflow-x: hidden;
}

img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, ul, ol, dl { margin: 0; }
ul { padding: 0; list-style: none; }

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  transform: translateY(-180%);
  border-radius: var(--r-sm);
  color: var(--panel-ink);
  background: var(--panel);
  font-weight: 650;
}
.skip-link:focus { transform: translateY(0); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--page);
}
main.wrap { display: block; padding-bottom: var(--section); }
main.wrap > section,
main.wrap > .roadmap-progress,
main.wrap > .roadmap-filter { margin-top: var(--section); }
main.wrap > section:first-child { margin-top: clamp(2.5rem, 5vw, 4.5rem); }

/* ---- Типографические примитивы ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 5px 11px;
  border-radius: var(--r-sm);
  background: var(--fill);
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
}
.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 0.65rem;
  padding: 5px 11px;
  border-radius: var(--r-sm);
  color: var(--muted);
  background: var(--fill);
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}
.lead {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.35vw, 1.22rem);
  line-height: 1.55;
  max-width: 68ch;
}
.muted { color: var(--muted); }
.number-provenance {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-micro);
  line-height: 1.55;
}
.number-provenance code { font-size: 0.92em; }

h1 {
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: var(--track-display);
  text-transform: none;
  text-wrap: pretty;
}
h2 { font-size: var(--fs-h2); font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); font-weight: 650; }
code { font-family: var(--mono); }

.section-head { max-width: 70ch; margin-bottom: clamp(1.5rem, 3vw, 2.4rem); }
.section-head h2 { margin-bottom: 0.5rem; }
.section-head p { color: var(--muted); }
.page-head { max-width: 74ch; }
.page-head .badge { margin-bottom: 1rem; }
.page-head h1 { margin-bottom: 1rem; }

/* ==========================================================================
   Топбар / навигация
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.topbar .nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 60px;
  padding-block: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: var(--track-display);
  white-space: nowrap;
}
.brand-logo { font-size: 1.02rem; }
.brand-logo span { font-weight: 700; letter-spacing: var(--track-display); color: var(--ink); }

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 1.3rem;
  margin-left: auto;
}
.links > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.94rem;
  padding: 0;
  border-bottom: 1px solid transparent;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.links > a:hover { color: var(--muted); }
.links > a[aria-current] { border-color: var(--ink); }
.nav-dropdown a[aria-current] { color: var(--ink); background: var(--fill-deep); font-weight: 650; }

.site-menu { margin-left: auto; }
.site-menu > summary {
  display: none;
  list-style: none;
}
.site-menu > summary::-webkit-details-marker { display: none; }
.nav-trigger {
  cursor: pointer;
  font-size: 0.94rem;
  padding: 5px 0;
  list-style: none;
  user-select: none;
}
.nav-trigger::-webkit-details-marker { display: none; }
.nav-trigger::after { content: " ▾"; color: var(--muted); font-size: 0.7em; transition: transform var(--fast) var(--ease); }
.nav-menu[open] .nav-trigger::after { display: inline-block; transform: rotate(180deg); }
.nav-trigger.is-active { border-bottom: 1px solid var(--ink); }
.nav-menu { position: relative; }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 190px;
  display: grid;
  padding: 6px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: 0 18px 40px rgba(26, 27, 29, 0.12);
  z-index: 5;
}
.nav-dropdown a {
  align-items: center;
  display: flex;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  transition: background var(--fast) var(--ease);
}
.nav-dropdown a:hover { background: var(--fill); }
.nav-dropdown--right { right: 0; left: auto; }

/* ==========================================================================
   Hero-варианты
   ========================================================================== */
.process-intro,
.hero-explain {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.process-copy .badge,
.hero-copy .badge { margin-bottom: 1rem; }
.process-copy h1,
.hero-copy h1 { margin-bottom: 1rem; }

.process-visual,
.plan-figure {
  margin: 0;
  border-radius: var(--r-md);
  background: var(--fill);
  padding: clamp(0.9rem, 2vw, 1.5rem);
}
.process-visual img,
.plan-figure img { display: block; width: 100%; height: auto; border-radius: var(--r-sm); background: var(--paper); }
.process-visual figcaption,
.plan-figure figcaption {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  color: var(--muted);
}
.worked-plan { background: var(--fill); }

/* Payoff (index) */
.payoff {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 1.6rem;
}
.payoff-item {
  flex: 1 1 200px;
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: var(--r-md);
  background: var(--fill);
}
.payoff-item b { font-size: 0.98rem; }
.payoff-item span { color: var(--muted); font-size: 0.88rem; }
.payoff-win { background: var(--panel); color: var(--panel-ink); }
.payoff-win span { color: rgba(245, 246, 244, 0.62); }
.payoff-arrow { align-self: center; color: var(--ink-soft); font-size: 1.3rem; }

/* CTA (index) */
.landing-cta { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.7rem; }
.cta-primary, .cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 50px;
  padding: 0 1.5rem;
  border-radius: var(--r-sm);
  font-weight: 550;
  text-decoration: none;
  transition: background var(--fast) var(--ease);
}
.cta-primary { background: var(--acid); color: var(--ink); }
.cta-primary:hover { background: #b9ea1f; }
.cta-ghost { background: var(--fill); color: var(--ink); }
.cta-ghost:hover { background: var(--fill-deep); }

/* ==========================================================================
   Общие блоки: плашки, callout, легенда, следующий/предыдущий
   ========================================================================== */
.example, .project-brief {
  display: grid;
  gap: 0.5rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  border-radius: var(--r-md);
  background: var(--fill);
}
.example p, .project-brief p { color: var(--ink); }
.example b, .project-brief b { color: var(--ink); }
.honest, .limit-note, .source-note, .filter-hint {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.limit-note { margin-top: 1.25rem; }
.source-note { margin-bottom: 1.25rem; }

.plan-legend {
  display: grid;
  gap: 0.4rem 1.5rem;
  padding: clamp(1rem, 2vw, 1.35rem) clamp(1rem, 2vw, 1.5rem);
  border-radius: var(--r-md);
  background: var(--fill);
}
.plan-legend b { grid-column: 1 / -1; }
.plan-legend ul { display: grid; gap: 0.45rem; }
.plan-legend li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: default;
  border-radius: var(--r-sm);
  transition: color var(--fast) var(--ease);
}
.plan-legend li.is-cued { color: var(--ink); }
.sw { width: 14px; height: 14px; flex: 0 0 auto; border-radius: 3px; background: var(--ink-soft); }
.sw-apt { background: #4e84a6; }
.sw-llu { background: #6576ad; }
.sw-corr { background: #a36d1c; }
.sw-gap { background: var(--danger); }
.sw-ruler { background: var(--ink); }

.next {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: var(--section);
  padding-top: 1.3rem;
  border-top: 1px solid var(--hairline);
}
.next a {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0;
  text-decoration: none;
  color: var(--ink);
  padding: 6px 0;
}
.next a:hover { color: var(--muted); }

/* ==========================================================================
   Футер
   ========================================================================== */
footer {
  border-top: 1px solid var(--hairline);
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
}
footer .wrap { color: var(--muted); font-size: 0.86rem; line-height: 1.6; }
footer a { color: var(--ink); }
footer code { font-family: var(--mono); font-size: 0.8125rem; background: var(--fill); padding: 1px 5px; border-radius: 3px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .topbar .nav { align-items: center; min-height: 64px; }
  .site-menu { position: relative; }
  .site-menu > summary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.8rem;
    cursor: pointer;
    border: 1px solid var(--hairline);
    border-radius: var(--r-sm);
    font-weight: 650;
  }
  .site-menu > summary::after { margin-left: 0.5rem; content: "+"; }
  .site-menu[open] > summary::after { content: "−"; }
  .site-menu .links {
    position: absolute;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    top: calc(100% + 0.5rem);
    right: 0;
    display: grid;
    width: min(22rem, calc(100vw - 2 * var(--page)));
    padding: 0.55rem;
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    background: var(--paper);
    box-shadow: 0 18px 40px rgba(26, 27, 29, 0.12);
  }
  .site-menu .links > a { padding-inline: 0.8rem; border-bottom: 0; border-radius: var(--r-sm); }
  .site-menu .links > a:hover { background: var(--fill); }
  .site-menu .links .nav-menu { display: grid; }
  .site-menu .links .nav-trigger { display: flex; align-items: center; min-height: 44px; padding: 0 0.8rem; border-radius: var(--r-sm); }
  .site-menu .links .nav-trigger:hover { background: var(--fill); }
  .site-menu .links .nav-dropdown { position: static; min-width: 0; padding: 0 0 0.3rem 1.2rem; border: 0; border-radius: 0; box-shadow: none; }
  .process-intro, .hero-explain { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .topbar .nav { padding-block: 0.55rem; }
  .step-row { grid-template-columns: minmax(0, 1fr); }
  .payoff { flex-direction: column; }
  .payoff-arrow { transform: rotate(90deg); }
  .landing-cta a { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.section-nav {
  align-items: center;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  gap: 0.35rem;
  min-height: 3rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.section-nav a {
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.86rem;
  min-height: 44px;
  padding: 0.1rem 0.65rem;
  text-decoration: none;
}

.section-nav a:hover,
.section-nav a:focus-visible,
.section-nav a[aria-current="page"],
.section-nav a[aria-current="location"] {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

@media (max-width: 620px) {
  .section-nav {
    flex-wrap: wrap;
    margin-inline: 0;
    overflow-x: visible;
    padding-inline: 0;
    width: auto;
  }

  .section-nav a {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }
}

.ci-evidence {
  display: grid;
  gap: 0.45rem;
  margin-block: 1.5rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 0;
  border-radius: var(--r-md);
  background: var(--fill);
}

.ci-evidence p {
  color: var(--muted);
  margin: 0;
}

.ci-evidence a,
.check-command a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.check-command {
  align-items: start;
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(13rem, 1fr) minmax(12rem, 1.2fr) auto;
  min-width: 0;
  padding-block: 0.65rem;
}

.check-command code {
  justify-self: start;
}

.check-command span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
}

.check-command a {
  font-size: 0.82rem;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .check-command {
    grid-template-columns: minmax(0, 1fr);
  }

  .check-command a {
    justify-self: start;
  }
}

/* ==========================================================================
   Карточные сетки (общий словарь)
   ========================================================================== */
.worked-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(0.75rem, 1.6vw, 1rem);
  align-items: start;
  padding: clamp(0.75rem, 1.6vw, 1rem);
  border: 0;
  border-radius: var(--r-lg);
  background: var(--fill);
}
.brief-card, .result-card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  min-width: 0;
  padding: clamp(1.15rem, 2.5vw, 1.8rem);
  border-radius: var(--r-md);
  background: var(--paper);
}
.brief-card ul { display: grid; gap: 0.65rem; margin-top: 0.25rem; }
.brief-card li { position: relative; padding-left: 1rem; color: var(--muted); font-size: 0.92rem; }
.brief-card li::before { position: absolute; left: 0; color: var(--ink-soft); content: "—"; }
.result-card .result-nums {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.55rem, 1.2vw, 0.75rem);
  margin-top: 0.25rem;
  border: 0;
}
.result-nums li {
  display: flex;
  min-width: 0;
  min-height: 5.6rem;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: center;
  padding: 0.9rem;
  border: 0;
  border-radius: 16px;
  background: var(--fill);
  color: var(--muted);
  font-size: 0.85rem;
}
.result-nums li::before { content: none; }
.result-nums b { color: var(--ink); font-size: clamp(1.75rem, 3vw, 2.45rem); font-weight: 750; letter-spacing: 0; line-height: 0.95; font-variant-numeric: tabular-nums; }
.metric-explained span {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
}
.metric-help {
  min-height: 1.85rem;
  padding: 0.25rem 0.6rem;
  border: 1px dashed currentColor;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  cursor: help;
  font: 600 0.78rem/1.1 var(--sans);
}
.metric-help:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.case-sheet__audit {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(0.75rem, 1.6vw, 1rem);
  align-items: start;
  background: transparent;
}
.case-sheet__calculation,
.case-sheet__checks {
  min-width: 0;
  padding: clamp(1.15rem, 2.5vw, 1.8rem);
  border-radius: var(--r-md);
  background: var(--paper);
}
.case-sheet__eyebrow {
  color: var(--muted);
  font: var(--type-label-weight) var(--type-label-size) / var(--type-label-line) var(--type-label-font);
  letter-spacing: var(--type-label-track);
  text-transform: uppercase;
}
.case-sheet__audit h3 { margin: 0.35rem 0 0; font-size: clamp(1.05rem, 1.8vw, 1.3rem); }
.metric-definition {
  border-left: 3px solid var(--acid);
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 1rem;
  padding: 0.15rem 0 0.15rem 0.9rem;
}
.metric-definition b { color: var(--ink); }
.evidence-result-meta { margin-top: 1rem; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.evidence-result-meta [data-state="stale"] { color: var(--danger); font-weight: 650; }
.case-sheet__checks .honest { margin: 0.8rem 0 0; font: 700 0.82rem var(--sans); }
.evidence-warning-groups { display: grid; gap: 0.65rem; margin: 0.8rem 0 0; padding: 0; }
.evidence-warning-groups > li { display: grid; gap: 0.25rem; border-left: 3px solid var(--hairline); padding-left: 0.7rem; }
.evidence-warning-groups > li::before { content: none; }
.evidence-warning-groups > li[data-state="warning"],
.evidence-warning-groups > li[data-state="failed"] { border-color: var(--danger); }
.evidence-warning-groups > li[data-state="passed"] { border-color: var(--ok); }
.evidence-warning-groups summary { cursor: pointer; }
.evidence-warning-groups summary strong { margin-left: 0.25rem; }
.evidence-warning-groups details > span,
.evidence-warning-groups ul span { color: var(--muted); font-size: 0.8rem; }
.evidence-warning-groups details > span { display: block; margin: 0.35rem 0 0 1.25rem; }
.evidence-warning-groups ul { display: grid; gap: 0.4rem; margin: 0.2rem 0 0; padding-left: 1rem; }
.evidence-warning-groups ul li { display: grid; gap: 0.1rem; font-size: 0.8rem; }
.evidence-warning-groups ul li::before { content: none; }
.io-tag {
  justify-self: start;
  font: var(--type-label-weight) var(--type-label-size) / var(--type-label-line) var(--type-label-font);
  letter-spacing: var(--type-label-track);
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--muted);
}
.io-in { color: #3a6f92; }
.io-out { color: var(--ok); }

/* Канонический путь: одна схема, рядом только компактные вход и результат. */
.product-bridge {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.4vw, 1rem);
  align-items: start;
  padding: clamp(0.65rem, 1.4vw, 0.9rem);
  overflow: hidden;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--fill);
}
.product-bridge article {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  padding: clamp(1rem, 2vw, 1.35rem);
  border-radius: var(--r-md);
  background: var(--paper);
}
.product-bridge article > span { color: var(--muted); font: 650 var(--fs-micro) var(--sans); text-transform: uppercase; }
.product-bridge__input > div { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.product-bridge__input b { padding: 0.35rem 0.5rem; border-radius: var(--r-sm); background: var(--fill); font: 600 0.75rem var(--mono); }
.product-bridge__process > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.product-bridge__process i { height: 0.75rem; border-radius: 2px; background: var(--panel); }
.product-bridge__process i:nth-child(2) { background: var(--acid); }
.product-bridge__process i:nth-child(3) { background: var(--ok); }

.secondary-examples > p { max-width: 64ch; margin: 0.7rem 0; color: var(--muted); }
.secondary-examples ul { display: flex; flex-wrap: wrap; gap: 0.45rem 1rem; padding: 0 0 0.9rem; list-style: none; }
.secondary-examples a { color: var(--ink); }

/* Шаги «как это работает» (index) */
.steps { display: grid; gap: 0; }
.step-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding-block: clamp(1.1rem, 2.4vw, 1.8rem);
  border-top: 1px solid var(--hairline);
}
.step-row:first-child { border-top: 0; }
.step-text { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.35rem 1rem; }
.step-text .step-no { grid-row: 1 / span 2; }
.step-no {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--panel-ink);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
}
.step-text p { color: var(--muted); }

/* Пределы (index) */
.limits-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.9rem, 2vw, 1.4rem); }
.limit-card {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
}
.limit-card b { font-size: 1.05rem; font-weight: 650; }
.limit-card ul { display: grid; gap: 0.4rem; }
.limit-card li { color: var(--muted); font-size: 0.9rem; padding-left: 1.1rem; position: relative; }
.limit-do li::before { content: "+"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.limit-dont li::before { content: "–"; position: absolute; left: 0; color: var(--danger); font-weight: 700; }

/* Ссылочные карточки (deeper) */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.9rem, 1.8vw, 1.4rem); align-items: start; }
.card {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  padding: clamp(0.9rem, 1.8vw, 1.25rem);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  transition: background var(--fast) var(--ease);
}
.card:hover { background: var(--surface-card); }
.card b { font-size: 1.02rem; }
.link-card { color: var(--muted); }
.link-card b { color: var(--ink); margin-top: 0.1rem; }

/* ==========================================================================
   Общие «медиа в карточке» (card-visual, wide-visual, mascot-strip)
   ========================================================================== */
.card-visual {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--fill);
}
.wide-visual {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 5;
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--fill);
  margin-bottom: 1.25rem;
}
.mascot-strip {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 5;
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--fill);
}

/* ==========================================================================
   process.html — конвейер, воркшоп, урок, формула
   ========================================================================== */
.audience-brief, .audience-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.4rem);
  margin-block: 1.5rem;
}
.audience-brief > div, .audience-answer {
  display: grid;
  gap: 0.35rem;
  padding: clamp(1rem, 2vw, 1.3rem);
  border-radius: var(--r-md);
  background: var(--fill);
}
.audience-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.audience-brief b, .audience-answer b { font-size: 0.98rem; }
.audience-brief span, .audience-answer span { color: var(--muted); font-size: 0.9rem; }
.audience-brief code { padding: 3px 8px; border-radius: var(--r-sm); background: var(--panel); color: var(--panel-ink); font-size: 0.8rem; }

/* ==========================================================================
   teams.html / data.html — модули и пакеты данных
   ========================================================================== */
.domain-grid, .object-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.9rem, 1.8vw, 1.4rem);
  align-items: start;
}
.domain, .object {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
}
.domain h3, .object h3 { margin-top: 0.1rem; }
.object code + h3 { margin-top: -0.35rem; }          /* пакет-пилюля и заголовок = один блок */
.domain p, .object p { color: var(--muted); font-size: 0.9rem; }
/* Список «метка → значение» отделён волоском как футер-контракт карточки. */
.domain ul, .object ul { display: grid; gap: 0.5rem; padding-top: 0.85rem; border-top: 1px solid var(--hairline); }
.domain li, .object li { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.domain li b, .object li b { color: var(--ink); font-weight: 600; }
.role {
  justify-self: start;
  font: var(--type-label-weight) var(--type-label-size) / var(--type-label-line) var(--type-label-font);
  letter-spacing: var(--type-label-track);
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--tint-bg, var(--paper));
  color: var(--tint-fg, var(--muted));
}
/* Доменный тинт: переменные ставятся на элементе с data-domain; потребители
   (чип роли, имя модуля в легенде маскотов и карточках плана) читают их.
   Пастель живёт только на этих мелких ярлыках — поверхности карточек остаются
   монохромными; текст держим тоном того же оттенка, контраст ≥4.5:1.
   assets — короткий алиас apartment-assets. */
[data-domain="ui"]               { --tint-bg: #e6eef7; --tint-fg: #345f89; }
[data-domain="domain"]           { --tint-bg: #ecebf7; --tint-fg: #514a99; }
[data-domain="apartment-assets"],
[data-domain="assets"]           { --tint-bg: #e7f1e7; --tint-fg: #3d6e41; }
[data-domain="solver"]           { --tint-bg: #f5eedd; --tint-fg: #7d5d22; }
[data-domain="planning"]         { --tint-bg: #e0efec; --tint-fg: #296f65; }
[data-domain="row-fill"]         { --tint-bg: #eef1df; --tint-fg: #5e6c2b; }
[data-domain="layout"]           { --tint-bg: #e4eff3; --tint-fg: #2e5f72; }
[data-domain="render"]           { --tint-bg: #f6e9e5; --tint-fg: #935140; }
[data-domain="metrics"]          { --tint-bg: #efe9f6; --tint-fg: #644894; }
[data-domain="debug"]            { --tint-bg: #e9edf1; --tint-fg: #4b5764; }
[data-domain="adapter"]          { --tint-bg: #f1ebe0; --tint-fg: #6d5330; }
[data-domain="integration"]      { --tint-bg: #e9edf1; --tint-fg: #46586b; }
[data-domain="system"]           { --tint-bg: #e8e8e5; --tint-fg: #3f403b; }
.object > code {
  justify-self: start;
  padding: 4px 9px;
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--panel-ink);
  font-size: 0.82rem;
}
.domain li code { background: var(--fill-deep); color: var(--ink); padding: 1px 6px; border-radius: var(--r-sm); font-size: 0.82rem; }

/* ==========================================================================
   checks.html — квиз и карточки проверок
   ========================================================================== */
.quiz {
  padding: clamp(1.2rem, 2.5vw, 2rem);
  border-radius: var(--r-md);
  background: var(--fill);
}
.quiz h2 { margin-bottom: 0.35rem; }
.quiz-buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-block: 1rem; }
.quiz-buttons button {
  cursor: pointer;
  padding: 9px 13px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.quiz-buttons button:hover { border-color: var(--ink-soft); }
.quiz-buttons button.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.quiz-answer {
  min-height: 2.5em;
  padding: 0.9rem 1rem;
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.95rem;
}

.content-disclosure {
  border-block: 1px solid var(--hairline);
}
.content-disclosure > summary {
  display: flex;
  gap: 1rem;
  align-items: center;
  min-height: 48px;
  padding: 0.7rem 0;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.content-disclosure > summary::-webkit-details-marker { display: none; }
.content-disclosure > summary::after { content: "↓"; margin-left: auto; color: var(--muted); }
.content-disclosure[open] > summary::after { content: "↑"; }
.content-disclosure .checks { margin-top: 1rem; }

.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.9rem, 1.8vw, 1.4rem); align-items: start; }
.check {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.check h3 { color: var(--ink); margin-top: 0.1rem; }
.check .card-visual { margin-block: 0.2rem; }
.check-cmds { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }

/* ============================================================================
   Общая числовая линейка и адаптивное поведение компонентных сеток
   ========================================================================== */
.fact-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(1.5rem, 4vw, 3rem) 0;
  border-block: 1px solid var(--hairline);
}
.fact-rail > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: end;
  padding: 1rem clamp(0.8rem, 2vw, 1.4rem);
}
.fact-rail > div + div { border-left: 1px solid var(--hairline); }
.fact-rail dt {
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
}
.fact-rail dd {
  max-width: 25ch;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-micro);
  line-height: 1.45;
  text-transform: uppercase;
}

@media (max-width: 960px) {
  .worked-grid { grid-template-columns: minmax(0, 1fr); }
  .case-sheet__audit { grid-column: 1; grid-template-columns: minmax(0, 1fr); }
  .cards, .domain-grid, .object-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-bridge { grid-template-columns: minmax(0, 1fr); }
  .audience-brief, .audience-summary { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .result-card .result-nums { grid-template-columns: minmax(0, 1fr); }
  .metric-help { min-width: 44px; min-height: 44px; }
  .cards, .fact-rail, .domain-grid, .limits-grid, .object-grid, .checks { grid-template-columns: minmax(0, 1fr); }
  .fact-rail > div { grid-template-columns: 3.2rem minmax(0, 1fr); align-items: center; }
  .fact-rail > div + div { border-top: 1px solid var(--hairline); border-left: 0; }
}

/* Единый спокойный слой для внутренних имён, файлов и команд.
   Цвет помогает найти технический блок, но смысл всегда написан словами. */
.technical-details {
  --technical-bg: var(--surface-card);
  --technical-fg: var(--teal);
  margin-top: 1rem;
  padding: var(--space-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--technical-bg);
  box-shadow: var(--shadow-card);
}

.technical-details[hidden] { display: none; }

.technical-details > summary {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  min-height: 2rem;
  cursor: pointer;
  list-style: none;
  color: var(--technical-fg);
  font-size: 0.86rem;
  font-weight: 700;
}

.technical-details > summary::-webkit-details-marker { display: none; }
.technical-details > summary::after { content: "+"; color: var(--technical-fg); font: 700 1rem var(--mono); }
.technical-details[open] > summary::after { content: "−"; }
.technical-details > summary:hover { color: var(--ink); }
.technical-details > summary:focus-visible { border-radius: 1px; }

.technical-details dl {
  display: grid;
  grid-template-columns: minmax(11rem, 0.55fr) minmax(0, 1fr);
  gap: 0.65rem 1rem;
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--technical-fg) 25%, transparent);
}

.technical-details dt { color: var(--muted); }
.technical-details dd { min-width: 0; margin: 0; }

.technical-details p,
.technical-details .check-cmds {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--technical-fg) 25%, transparent);
}

.technical-details code {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 3px 7px;
  overflow-wrap: anywhere;
  border-radius: var(--r-sm);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  white-space: normal;
}

/* A rule, not a box: reset all four sides before restoring the top hairline. */
.technical-details--compact {
  margin-top: 0.25rem;
  padding: 0.65rem 0 0;
  border: 0;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.technical-details--compact > summary {
  width: max-content;
  max-width: 100%;
  min-height: 1.75rem;
  justify-content: flex-start;
  padding: 0.2rem 0.45rem;
  border-radius: var(--r-sm);
  background: var(--technical-bg);
  font-size: 0.8125rem;
}

.technical-details--compact p,
.technical-details--compact .check-cmds {
  margin-top: 0.55rem;
  padding-top: 0;
  border-top: 0;
}
.technical-details--compact p { color: var(--ink); font-size: 0.84rem; line-height: 1.65; }
.check .technical-details { align-self: end; }
.check .technical-details .check-cmds { gap: 0.45rem; }
.quiz .technical-details { margin-top: 0.8rem; }

@media (max-width: 640px) {
  .technical-details { padding: 0.7rem 0.8rem; }
  .technical-details dl { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .technical-details dd + dt { margin-top: 0.55rem; }
}

/* Смысловые визуалы внутренних страниц. Общие токены берём из styles.css,
   но композиция у каждого раздела своя: сеть, стопка данных и воронка контроля. */
.section-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  max-width: none;
}

.section-hero--stacked { grid-template-columns: minmax(0, 1fr); }

.section-hero__copy { min-width: 0; }
.section-hero__copy .badge { margin-bottom: 1rem; }
.section-hero__copy h1 { margin-bottom: 1rem; }

.visual-kicker {
  font: var(--type-label-weight) var(--type-label-size) / var(--type-label-line) var(--type-label-font);
  letter-spacing: var(--type-label-track);
  text-transform: uppercase;
}

/* Модули: основной путь соединён короткими стрелками, а общие части собраны
   отдельным поясом. Это карта ответственности, а не повтор страницы процесса. */
.module-map {
  container-type: inline-size;
  display: grid;
  gap: 0.9rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background:
    radial-gradient(circle at 92% 8%, rgba(198, 245, 50, 0.32), transparent 24%),
    var(--fill);
  color: var(--ink);
}

.module-map__head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.module-map__head span:last-child,
.module-map__support-head span { color: var(--muted); font: 600 var(--type-label-size) / 1.4 var(--type-label-font); }

.module-map__core {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr));
  gap: clamp(0.9rem, 1.8vw, 1.25rem);
  padding: 0;
  list-style: none;
}

.module-node {
  position: relative;
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  min-height: 118px;
  align-content: start;
  padding: 2.45rem 0.8rem 0.8rem;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--paper);
}

.module-node::before {
  content: attr(data-step);
  position: absolute;
  top: 0.65rem;
  left: 0.7rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
}

.module-node:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: calc(clamp(0.9rem, 1.8vw, 1.25rem) * -0.78);
  z-index: 2;
  color: var(--ok);
  font-weight: 800;
  transform: translate(50%, -50%);
}

.module-node strong { font-size: 0.9rem; line-height: 1.25; }
.module-node span { color: var(--muted); font-size: 0.8125rem; line-height: 1.4; }

.module-node strong,
.module-node span {
  min-width: 0;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

.module-map__support-wrap {
  display: grid;
  gap: 0.7rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
}

.module-map__support-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.module-map__support-head strong { font-size: 0.9rem; }

.module-map__support {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.module-chip {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Данные: накладывающиеся пакеты. Смещение показывает накопление формы,
   а не временную шкалу — это отдельная метафора преобразования. */
.packet-stack {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: clamp(1rem, 2vw, 1.5rem);
  border-radius: var(--r-md);
  background:
    radial-gradient(circle at 84% 14%, rgba(198, 245, 50, 0.5), transparent 23%),
    var(--fill);
}

.packet-stack__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
}

.packet-stack__list { display: grid; gap: 0.45rem; padding: 0; list-style: none; }
.packet-stack__item {
  --packet-offset: calc(var(--packet-index) * 0.48rem);
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  width: calc(100% - var(--packet-offset));
  margin-left: var(--packet-offset);
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--paper);
}

.packet-stack__item > span:first-child {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}
.packet-stack__item strong { font-size: 0.86rem; }
.packet-stack__item code { color: var(--muted); font-size: 0.75rem; text-align: right; }
.packet-stack figcaption { color: var(--muted); font-size: 0.78rem; }

/* Проверки: воронка от широкого набора рисков к одному решению о передаче. */
.quality-funnel {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: clamp(1rem, 2vw, 1.5rem);
  border-radius: var(--r-md);
  background: var(--fill);
}

.quality-funnel__input,
.quality-funnel__output {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.quality-funnel__input { color: var(--muted); }
.quality-funnel__output {
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--ok);
  border-radius: var(--r-sm);
  background: var(--surface-positive);
  color: var(--ink);
}

.quality-funnel__steps {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.4rem 0;
  list-style: none;
}
.quality-funnel__steps::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--ok);
}

.quality-gate {
  position: relative;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  width: var(--gate-width);
  min-height: 62px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
}
.quality-gate span:first-child { color: var(--muted); font-family: var(--mono); font-size: 0.75rem; font-weight: 500; }
.quality-gate strong { font-size: 0.86rem; }
.quality-gate span:last-child { color: var(--muted); font-size: 0.8125rem; }
.quality-funnel figcaption { max-width: 42ch; color: var(--muted); font-size: 0.8125rem; text-align: center; }

.quiz-answer + .check-cmds { margin-top: 0.65rem; }
.quiz .check-cmds code {
  display: inline-block;
  padding: 4px 9px;
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--panel-ink);
  font-size: 0.8rem;
  white-space: nowrap;
}

@container (min-width: 52rem) {
  .module-map__core { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@container (max-width: 51.99rem) {
  .module-map__support-wrap { padding-top: 0.75rem; }
  .module-node:not(:last-child)::after { display: none; }
}

@container (max-width: 28rem) {
  .module-map__core { grid-template-columns: minmax(0, 1fr); }
  .module-node { min-height: 0; padding: 0.8rem 0.8rem 0.8rem 3.2rem; }
  .module-node::before { top: 0.85rem; }
}

@media (max-width: 960px) {
  .section-hero { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .module-map__head, .module-map__support-head { display: grid; gap: 0.2rem; }
  .module-map__support { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .packet-stack__item { grid-template-columns: 1.5rem minmax(0, 1fr); width: 100%; margin-left: 0; }
  .packet-stack__item code { grid-column: 2; text-align: left; }
  .quality-gate { width: 100% !important; grid-template-columns: 1.8rem minmax(0, 1fr); }
  .quality-gate span:last-child { grid-column: 2; }
}

.project-pulse-shell {
  margin-top: clamp(0.65rem, 1.5vw, 1rem);
}

main.wrap > .project-pulse-shell + section {
  margin-top: clamp(2rem, 3vw, 3rem);
}

.project-pulse__link,
.project-pulse__loading,
.project-pulse__error {
  display: grid;
  grid-template-columns: auto minmax(170px, 0.7fr) minmax(220px, 1.4fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  min-height: 3.25rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  text-decoration: none;
}

.project-pulse__link:hover { border-color: rgba(47, 112, 103, 0.34); background: var(--fill); }

.project-pulse__kicker,
.project-pulse__meta,
.project-pulse__loading,
.project-pulse__error {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-pulse__kicker {
  font-family: var(--sans);
  font-weight: 650;
}

.project-pulse__value {
  font-size: 0.95rem;
  white-space: nowrap;
}

.project-pulse__value b {
  margin-right: 0.35rem;
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
}

.project-pulse__arrow { font-size: 1.4rem; }

@media (max-width: 800px) {
  .project-pulse__link { grid-template-columns: auto minmax(0, 1fr) auto; }
  .project-pulse__meta { grid-column: 2; }
}

@media (max-width: 480px) {
  .project-pulse__link { grid-template-columns: minmax(0, 1fr) auto; }
  .project-pulse__kicker { grid-column: 1; grid-row: 1; }
  .project-pulse__arrow { grid-column: 2; grid-row: 1; }
  .project-pulse__value { grid-column: 1 / -1; grid-row: 2; }
  .project-pulse__meta { grid-column: 1 / -1; grid-row: 3; }
}

/* ==========================================================================
   Квартирник — карта платформы. Бренд-акценты (Digital Studio Monochrome).
   Основной вид задан в styles.css; здесь — мелкие фирменные детали.
   ========================================================================== */

::selection { background: var(--acid); color: var(--ink); }

.brand-logo { display: inline-flex; align-items: center; }

/* Тонкая кислотная планка под топбаром — единственный цветовой акцент шапки. */
.topbar { box-shadow: inset 0 -1px 0 var(--hairline); }

/* ==========================================================================
   Общая система акцентов публичного портала.
   Кислотный цвет работает как маркер редакторского выделения: фон, рейка
   или номер. Смысл всегда дублируется текстом, формой либо состоянием.
   ========================================================================== */

/* Текущий раздел остаётся понятным без цвета: есть подчёркивание и вес текста. */
.links > a[aria-current],
.nav-trigger.is-active {
  border-bottom: 3px solid var(--ink);
  background: none;
  box-shadow: inset 0 -5px 0 color-mix(in srgb, var(--acid) 28%, transparent);
  color: var(--ink);
  font-weight: 650;
}

/* Маркер входа на страницу: общий приём для обзора, документации и статуса. */
[data-accent-system="editorial-marker"] > section:first-of-type :is(.badge, .eyebrow) {
  border: 1px solid var(--ink);
  background: var(--acid);
  color: var(--ink);
  font-weight: 650;
}

/* Короткая рейка связывает заголовки разделов, не превращая их в карточки. */
[data-accent-system="editorial-marker"] :is(
  .section-head,
  .manager-heading,
  .status-heading,
  .current-focus__heading
) {
  position: relative;
  padding-top: 1rem;
}

[data-accent-system="editorial-marker"] :is(
  .section-head,
  .manager-heading,
  .status-heading,
  .current-focus__heading
)::before {
  position: absolute;
  inset: 0 auto auto 0;
  width: 2.6rem;
  height: 4px;
  background: var(--acid);
  content: "";
}

/* Главный доказательный контейнер каждой страницы получает одну верхнюю рейку. */
[data-accent-panel] {
  position: relative;
}

[data-accent-panel]::before {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  height: 4px;
  background: var(--acid);
  content: "";
  pointer-events: none;
}

details[data-accent-panel]:not([open])::before {
  display: none;
}

/* Числа во всех схемах читаются как один маршрут, а не как случайные подписи. */
[data-accent-system="editorial-marker"] .step-text .step-no,
[data-accent-system="editorial-marker"] .packet-stack__item > span:first-child,
[data-accent-system="editorial-marker"] .quality-gate > span:first-child {
  display: inline-grid;
  min-width: 2rem;
  min-height: 1.55rem;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--acid);
  color: var(--ink);
  font-weight: 700;
}

[data-accent-system="editorial-marker"] .step-text .step-no {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

[data-accent-system="editorial-marker"] .module-node::before {
  display: inline-grid;
  min-width: 1.8rem;
  min-height: 1.45rem;
  place-items: center;
  padding-inline: 0.25rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--acid);
  color: var(--ink);
  font-weight: 700;
}

/* Состояния интерактивных блоков сохраняют собственные текстовые индикаторы. */
[data-accent-system="editorial-marker"] .quiz-buttons button.is-active {
  border-bottom: 4px solid var(--acid);
}

[data-accent-system="editorial-marker"] .content-disclosure[open] > summary {
  border-bottom: 3px solid var(--acid);
}

[data-accent-system="editorial-marker"] .module-contract[open] > summary {
  padding-top: 1.15rem;
}

/* Итоговая ссылка получает акцент только при намеренном наведении или фокусе. */
[data-accent-system="editorial-marker"] .next a:last-child:hover,
[data-accent-system="editorial-marker"] .next a:last-child:focus-visible {
  background:
    linear-gradient(
      180deg,
      transparent 0 60%,
      color-mix(in srgb, var(--acid) 55%, var(--paper)) 60% 100%
    );
  color: var(--ink);
}

@media (max-width: 640px) {
  [data-accent-system="editorial-marker"] :is(
    .section-head,
    .manager-heading,
    .status-heading,
    .current-focus__heading
  ) {
    padding-top: 0.85rem;
  }

  [data-accent-system="editorial-marker"] :is(
    .section-head,
    .manager-heading,
    .status-heading,
    .current-focus__heading
  )::before {
    width: 2.2rem;
  }
}

@media (forced-colors: active) {
  .links > a[aria-current],
  .nav-trigger.is-active {
    border: 0;
    border-bottom: 3px solid CanvasText;
    background: Canvas;
    box-shadow: none;
    color: CanvasText;
  }

  [data-accent-system="editorial-marker"] > section:first-of-type :is(.badge, .eyebrow) {
    border: 2px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }

  [data-accent-panel]::before,
  [data-accent-system="editorial-marker"] :is(
    .section-head,
    .manager-heading,
    .status-heading,
    .current-focus__heading
  )::before {
    background: CanvasText;
  }
}

/* ==========================================================================
   Kvartirnik product foundation
   Shared shell, typography, controls and surface language for all routes.
   Route-specific composition belongs to product-routes.css.
   ========================================================================== */

html {
  scroll-padding-top: 6.5rem;
}

body {
  background: var(--canvas);
  color: var(--ink);
}

body::before {
  position: fixed;
  z-index: -1;
  top: 8rem;
  right: -14rem;
  width: 30rem;
  height: 30rem;
  border: 1px solid rgba(47, 112, 103, 0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

::selection {
  background: var(--acid);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--acid);
  outline-offset: 4px;
  border-radius: var(--r-sm);
}

.wrap {
  max-width: 1320px;
}

main.wrap {
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

main.wrap > section,
main.wrap > .roadmap-progress,
main.wrap > .roadmap-filter {
  margin-top: clamp(2rem, 4vw, 4rem);
}

.topbar {
  border: 0;
  background: var(--panel);
  color: var(--panel-ink);
  backdrop-filter: none;
}

.topbar .nav {
  min-height: 76px;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.brand,
.brand-logo span {
  color: var(--panel-ink);
}

.brand-logo {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  letter-spacing: var(--track-display);
}

.links {
  gap: 0.35rem;
}

.links > a,
.nav-trigger {
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(246, 248, 244, 0.76);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.links > a:hover,
.nav-trigger:hover {
  border-color: rgba(246, 248, 244, 0.2);
  color: var(--panel-ink);
}

.links > a[aria-current],
.nav-trigger.is-active {
  border: 1px solid var(--acid);
  background: var(--acid);
  box-shadow: none;
  color: var(--ink);
  font-weight: 700;
}

.nav-dropdown {
  padding: 0.45rem;
  border: 1px solid rgba(246, 248, 244, 0.14);
  border-radius: 18px;
  background: var(--panel-soft);
  box-shadow: 0 24px 60px rgba(10, 18, 15, 0.24);
}

.nav-dropdown a {
  border-radius: 12px;
  color: var(--panel-ink);
}

.nav-dropdown a:hover,
.nav-dropdown a[aria-current] {
  background: rgba(246, 248, 244, 0.1);
  color: var(--panel-ink);
}

.section-nav {
  display: flex;
  gap: 0.35rem;
  margin-block: 0.8rem 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.section-nav a {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.section-nav a:hover {
  background: var(--fill);
  color: var(--ink);
}

.section-nav a[aria-current] {
  background: var(--panel);
  color: var(--panel-ink);
}

h1,
h2,
h3 {
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.lead {
  line-height: 1.5;
}

.badge,
.eyebrow,
.role,
.io-tag {
  border: 0;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0;
}

[data-accent-system="editorial-marker"] > section:first-of-type :is(.badge, .eyebrow) {
  border: 0;
  background: var(--acid);
  color: var(--ink);
}

.number-provenance {
  max-width: 80ch;
  color: var(--muted);
  font-size: 0.76rem;
}

.number-provenance code { font-size: 1em; }

main.wrap > .number-provenance {
  margin-top: 1.25rem;
}

.project-pulse-shell {
  overflow: hidden;
  margin-top: 0.75rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: 0 12px 30px rgba(23, 33, 30, 0.05);
}

.project-pulse-shell a {
  border-radius: inherit;
}

.page-head,
.section-hero,
.process-intro {
  position: relative;
  overflow: hidden;
  max-width: none;
  border-radius: var(--r-lg);
}

.section-head {
  max-width: none;
}

[data-accent-system="editorial-marker"] :is(
  .section-head,
  .manager-heading,
  .status-heading,
  .current-focus__heading
) {
  padding-top: 0;
}

[data-accent-system="editorial-marker"] :is(
  .section-head,
  .manager-heading,
  .status-heading,
  .current-focus__heading
)::before,
[data-accent-panel]::before {
  display: none;
}

:where(
  .example,
  .project-brief,
  .card,
  .limit-card,
  .object,
  .check,
  .audience-answer,
  .technical-details,
  .module-contract,
  .status-panel
) {
  border: 1px solid rgba(23, 33, 30, 0.08);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: 0 14px 40px rgba(23, 33, 30, 0.055);
}

:where(
  .brief-card,
  .result-card,
  .evidence-board,
  .domain-overview,
  .quiz,
  .objects,
  .checks,
  .roadmap-progress,
  .roadmap-filter
) {
  border-radius: var(--r-lg);
}

.cta-primary,
.cta-ghost,
.text-cta,
button,
.evidence-links a,
.next a {
  min-height: 44px;
  border-radius: 999px;
}

.cta-primary {
  min-height: 52px;
  padding-inline: 1.35rem;
  background: var(--acid);
  color: var(--ink);
  font-weight: 750;
}

.cta-primary:hover {
  background: #b9e73c;
}

.cta-ghost {
  border: 1px solid var(--hairline);
  background: var(--paper);
}

.text-cta {
  display: inline-flex;
  align-items: center;
  padding-inline: 1rem;
  color: var(--ink);
  font-weight: 700;
  text-underline-offset: 4px;
}

.technical-details,
.content-disclosure,
.module-contract {
  overflow: clip;
}

:where(.technical-details, .content-disclosure, .module-contract) > summary {
  min-height: 48px;
  padding: 0.8rem 1rem;
  border-radius: inherit;
  font-weight: 700;
}

:where(.technical-details, .content-disclosure, .module-contract)[open] > summary {
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  background: var(--fill);
}

input,
select,
textarea {
  min-height: 48px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.next {
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

main.wrap > section > .next:only-child {
  margin-top: 0;
}

.next a {
  display: inline-flex;
  align-items: center;
  padding-inline: 1rem;
}

@media (pointer: coarse), (max-width: 800px) {
  .brand,
  [role="button"] {
    min-height: 44px;
  }

  summary {
    min-height: 44px !important;
  }

  .brand,
  .fx-copy {
    display: inline-flex;
    align-items: center;
  }
}

footer {
  border: 0;
  background: var(--panel);
}

footer .wrap,
footer a {
  color: rgba(246, 248, 244, 0.72);
}

footer code {
  background: rgba(246, 248, 244, 0.1);
  color: var(--panel-ink);
}

@media (max-width: 960px) {
  .topbar .nav {
    min-height: 68px;
  }

  .site-menu > summary {
    border-color: rgba(246, 248, 244, 0.22);
    border-radius: 999px;
    color: var(--panel-ink);
  }

  .site-menu .links {
    padding: 0.65rem;
    border: 1px solid rgba(246, 248, 244, 0.14);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: 0 24px 60px rgba(10, 18, 15, 0.28);
  }

  .site-menu .links > a {
    color: var(--panel-ink);
  }

  .site-menu[open] .links > a[aria-current] {
    color: var(--ink);
  }

  .site-menu .links > a:hover {
    background: rgba(246, 248, 244, 0.1);
  }

  .site-menu .links .nav-trigger {
    color: var(--panel-ink);
  }

  .site-menu .links .nav-dropdown {
    background: transparent;
  }
}

@media (max-width: 640px) {
  :root {
    --page: 1rem;
    --section: 3.5rem;
    --r-md: 20px;
    --r-lg: 24px;
  }

  .topbar .nav {
    padding-block: 0.5rem;
  }

  .brand-logo {
    font-size: 1rem;
  }

  .section-nav {
    margin-top: 0.65rem;
    padding-bottom: 0.35rem;
  }

  h1 {
    letter-spacing: -0.04em;
  }
}

@media (forced-colors: active) {
  .topbar,
  footer,
  .section-nav a[aria-current] {
    background: Canvas;
    color: CanvasText;
  }

  .brand,
  .brand-logo span,
  .links > a,
  .nav-trigger,
  footer .wrap,
  footer a {
    color: CanvasText;
  }

  .links > a[aria-current],
  .nav-trigger.is-active,
  .badge,
  .eyebrow {
    border: 2px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }
}

/* Process, modules, data and checks: one product documentation language. */
.process-intro,
.page-head {
  position: relative;
  min-height: 400px;
  padding: clamp(1.35rem, 3vw, 2.4rem);
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--panel);
}

.process-intro::before,
.page-head::before {
  position: absolute;
  right: -5rem;
  bottom: -8rem;
  width: 20rem;
  height: 20rem;
  border: 1px solid rgba(200, 245, 72, 0.24);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.process-intro::after {
  position: absolute;
  right: 3rem;
  bottom: 2.25rem;
  color: rgba(200, 245, 72, 0.5);
  content: "01 — 06";
  font: 700 clamp(3.5rem, 8vw, 7rem) / 0.9 var(--sans);
  letter-spacing: -0.06em;
}

.process-intro {
  grid-template-columns: minmax(0, 1fr);
  min-height: 380px;
}

.process-copy {
  position: relative;
  z-index: 1;
  max-width: 58rem;
  align-self: end;
}

.process-copy h1 { max-width: 13ch; }
.process-copy .lead { max-width: 58ch; }

.process-copy h1,
.section-hero__copy h1,
.page-head h1 { color: var(--panel-ink); }

.process-copy .lead,
.section-hero__copy .lead,
.page-head .lead { color: rgba(246, 248, 244, 0.7); }

.process-stage {
  grid-template-columns: minmax(12rem, 0.28fr) minmax(0, 1fr);
  gap: 1rem;
}

.process-route {
  top: 6.5rem;
  padding: 0.6rem;
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.process-route ol { border: 0; }

.process-route a {
  margin: 0;
  border: 0;
  border-radius: var(--radius-compact);
}

.process-route a:hover,
.process-route a:focus-visible,
.process-route a[aria-current="step"] { border: 0; background: var(--fill); }

.process-route a[aria-current="step"] { background: var(--acid); }

.conveyor-steps {
  gap: 0.75rem;
  padding: 0.75rem;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--fill);
}

.conveyor-step { border-radius: var(--r-md); }
.evidence-pipeline { gap: 0.65rem; }

.evidence-pipeline > li {
  padding: 1rem;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--paper);
}

.pipeline-state { border-radius: var(--radius-pill); }

.pipeline-summary,
.pipeline-legend {
  border: 0;
  border-radius: var(--radius-compact);
  background: var(--teal-soft);
}

.page-head.section-hero,
.page-head.section-hero--stacked {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(22rem, 1.2fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  max-width: none;
}

.section-hero__copy { position: relative; z-index: 1; }

.section-hero__visual {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface-shell);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
}

.module-map,
.packet-stack,
.quality-funnel { color: var(--text-primary); }

.module-map :is(h2, h3, b),
.packet-stack :is(h2, h3, b),
.quality-funnel :is(h2, h3, b) { color: inherit; }

.module-map__head span:last-child,
.module-map__support-head span { color: var(--text-secondary); }

.module-node,
.packet-stack__item { color: var(--ink); }

.packet-stack__head,
.packet-stack figcaption,
.quality-funnel__input,
.quality-funnel figcaption { color: var(--text-secondary); }

.domain-overview,
.data-glossary,
.quiz {
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.74);
}

.module-node,
.packet-stack__item,
.quality-gate { border-radius: var(--radius-compact); }

.checks,
.module-contracts { gap: 0.85rem; align-items: start; }

/* Every object card ends with its contract disclosure, so pin them to one baseline. */
.object-grid { gap: 0.85rem; align-items: stretch; }
.object-grid > .object { display: flex; flex-direction: column; }
.object-grid > .object > .technical-details { margin-top: auto; }

.object,
.check,
.module-contract { padding: clamp(1rem, 2vw, 1.4rem); }

.object:hover,
.check:hover,
.module-contract:hover { border-color: rgba(47, 112, 103, 0.34); }

.audience-brief,
.audience-summary { gap: 0.85rem; }

.audience-brief > div,
.audience-answer {
  border-radius: var(--r-md);
  background: var(--paper);
}

.quiz-buttons { gap: 0.5rem; }

.quiz-buttons button {
  min-height: 48px;
  border: 1px solid var(--hairline);
  background: var(--paper);
}

.quiz-buttons button.is-active {
  border: 1px solid var(--ink);
  background: var(--acid);
}

.quiz-answer {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}

.ci-evidence {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
}

.ci-evidence :is(h2, h3, strong) { color: inherit; }
.ci-evidence p { color: var(--text-secondary); }
.ci-evidence a { color: var(--teal); }

@media (max-width: 960px) {
  .process-intro,
  .page-head.section-hero,
  .page-head.section-hero--stacked { grid-template-columns: minmax(0, 1fr); }
  .process-stage { grid-template-columns: minmax(0, 1fr); }
  .process-route { position: static; }
  .process-route ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-intro::after { display: none; }
}

@media (max-width: 640px) {
  .page-head,
  .process-intro { min-height: 0; padding: 1.2rem; border-radius: var(--radius-shell); }
  .process-copy h1,
  .section-hero__copy h1,
  .page-head h1 { font-size: clamp(2.35rem, 10.5vw, 2.85rem); }
  .process-route ol,
  .object-grid,
  .checks,
  .module-contracts,
  .audience-brief,
  .audience-summary { grid-template-columns: minmax(0, 1fr); }
  .evidence-pipeline > li { grid-template-columns: 2rem minmax(0, 1fr); }
  .pipeline-output { grid-column: 2; }
}

@media (forced-colors: active) {
  .process-intro,
  .page-head { border: 2px solid CanvasText; background: Canvas; color: CanvasText; }
  .process-intro :is(h1, p),
  .page-head :is(h1, p) { color: CanvasText; }
}

/* ==========================================================================
   Kvartirnik product polish
   Shared finishing layer for depth, hierarchy and calm interactive feedback.
   Motion choreography lives in motion-scenarios.json and motion-runtime.js.
   ========================================================================== */

:root {
  --polish-dark: #17231f;
  --polish-dark-soft: #22332d;
  --polish-mint: #e7f0eb;
  --polish-lime-soft: #eef9c9;
  --polish-shadow: 0 20px 54px rgba(23, 33, 30, 0.09);
  --polish-shadow-hover: 0 28px 70px rgba(23, 33, 30, 0.14);
  --polish-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:is(.section-head, .manager-heading, .current-focus__heading) h2 {
  max-width: 20ch;
  text-wrap: balance;
}

:is(.manager-hero, .evidence-hero, .process-intro, .section-hero, .status-now) {
  box-shadow: 0 24px 80px rgba(23, 33, 30, 0.08);
}

.badge {
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(23, 33, 30, 0.08);
}

:is(.cta-primary, .evidence-hero__process-link, .next a, .text-cta) {
  transition:
    color 300ms ease-in-out,
    background-color 300ms ease-in-out,
    border-color 300ms ease-in-out,
    box-shadow 300ms ease-in-out,
    transform 300ms var(--polish-ease);
}

:is(
  .card,
  .limit-card,
  .object,
  .check,
  .module-contract,
  .status-panel,
  .news-card,
  .snapshot-card,
  .proof-strip > article
) {
  transition:
    border-color 300ms ease-in-out,
    box-shadow 300ms ease-in-out,
    transform 300ms var(--polish-ease);
}

.result-route > li,
.evidence-hero__facts > li,
.packet-stack__item,
.quality-gate,
.module-node {
  transition:
    background-color 300ms ease-in-out,
    border-color 300ms ease-in-out,
    color 300ms ease-in-out,
    transform 300ms var(--polish-ease);
}

.audience-summary {
  align-items: stretch;
  padding: 0;
  border: 0;
  background: transparent;
  counter-reset: process-answer;
  gap: clamp(0.75rem, 1.4vw, 1.1rem);
}

.audience-answer {
  position: relative;
  isolation: isolate;
  align-content: start;
  padding: clamp(1.3rem, 2.5vw, 1.8rem);
  overflow: hidden;
  border: 1px solid rgba(23, 33, 30, 0.08);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  counter-increment: process-answer;
}

.audience-answer + .audience-answer {
  border-left: 1px solid rgba(23, 33, 30, 0.08);
}

.audience-answer::before {
  display: inline-flex;
  justify-self: start;
  width: max-content;
  min-width: 3.25rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  padding-inline: 0.75rem;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--acid);
  box-shadow: none;
  color: var(--ink);
  content: "СЦЕНАРИЙ 0" counter(process-answer);
  font: 700 0.64rem/1 var(--mono);
  letter-spacing: 0.08em;
}

.audience-answer::after {
  position: absolute;
  z-index: -1;
  right: -1.1rem;
  bottom: -1.3rem;
  width: 5rem;
  height: 5rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.14;
}

.audience-answer b {
  display: block;
  max-width: 24ch;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.28;
  text-wrap: balance;
}

.audience-answer span {
  max-width: 43ch;
  margin-top: 0;
  padding-top: 0.8rem;
  color: var(--muted);
  line-height: 1.58;
}

@media (hover: hover) and (pointer: fine) {
  :is(.cta-primary, .evidence-hero__process-link, .next a):hover {
    transform: translateY(-2px);
  }

  :is(
    .card,
    .limit-card,
    .object,
    .check,
    .module-contract,
    .status-panel,
    .news-card,
    .snapshot-card,
    .proof-strip > article,
    .audience-answer
  ):hover {
    border-color: rgba(47, 112, 103, 0.3);
    box-shadow: var(--polish-shadow-hover);
    transform: translateY(-5px);
  }

  .result-route > li:hover,
  .evidence-hero__facts > li:hover,
  .packet-stack__item:hover,
  .quality-gate:hover,
  .module-node:hover {
    transform: translateY(-3px);
  }
}

@media (max-width: 960px) {
  .audience-answer {
    min-height: 0;
  }

  .audience-answer + .audience-answer {
    border-top: 1px solid rgba(23, 33, 30, 0.08);
  }

  .audience-answer span {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(
    .cta-primary,
    .evidence-hero__process-link,
    .next a,
    .text-cta,
    .card,
    .limit-card,
    .object,
    .check,
    .module-contract,
    .status-panel,
    .news-card,
    .snapshot-card,
    .proof-strip > article,
    .audience-answer,
    .result-route > li,
    .evidence-hero__facts > li,
    .packet-stack__item,
    .quality-gate,
    .module-node
  ) {
    transition-duration: 0.01ms;
  }
}

@media (forced-colors: active) {
  .audience-answer {
    border: 2px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }

  .audience-answer span {
    color: CanvasText;
  }
}

/*
 * Cross-route visual contract.
 * Route styles own composition; this file owns shared type, surfaces and states.
 */
:root {
  /* Stable tokens adapted from the Unistroy Dembrandt extraction. */
  --brand-acid: #a5ff00;
  --brand-dark: #263535;
  --brand-dark-deep: #1c2727;
  --brand-surface: #e3ebeb;
  --brand-steel: #637676;
  --brand-steel-light: #afbebe;
  --brand-acid-soft: #e4ffb2;
  --brand-ink: #364b4b;

  /* Existing component aliases now resolve through one observed palette. */
  --canvas: #ebf1f1;
  --paper: #ffffff;
  --ink: var(--brand-dark);
  --ink-soft: var(--brand-ink);
  --muted: #526464;
  --fill: var(--brand-surface);
  --fill-deep: #d4dfdf;
  --hairline: #c9d5d5;
  --acid: var(--brand-acid);
  --panel: var(--brand-dark-deep);
  --panel-soft: var(--brand-dark);
  --panel-ink: var(--brand-surface);
  --teal: var(--brand-ink);
  --teal-soft: var(--brand-acid-soft);

  /* 4px spacing base; names describe intent instead of extraction noise. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  /* Display 61px → section 36px → card 27px → body 17px → UI 15px. */
  --type-display-size: clamp(2.625rem, 5.2vw, 3.825rem);
  --type-section-size: clamp(2rem, 3vw, 2.267rem);
  --type-card-size: clamp(1.25rem, 2vw, 1.7rem);
  --type-body-size: 1.0625rem;
  --type-ui-size: 0.92rem;
  --type-caption-size: 0.78rem;
  --type-display-weight: 600;
  --type-heading-weight: 600;
  --type-body-weight: 450;
  --type-display-line: 1.1;
  --type-heading-line: 1.1;
  --type-body-line: 1.5;

  --fs-display: var(--type-display-size);
  --fs-h2: var(--type-section-size);
  --fs-h3: var(--type-card-size);
  --fs-micro: var(--type-ui-size);
  --track-display: -0.025em;
  --track-micro: 0.04em;
  --r-sm: 9.067px;
  --r-md: 18.134px;
  --r-lg: 22.668px;

  --surface-canvas: var(--canvas);
  --surface-shell: var(--fill);
  --surface-card: var(--paper);
  --surface-dark: var(--panel);
  --surface-dark-soft: var(--panel-soft);
  --surface-positive: var(--teal-soft);
  --text-primary: var(--ink);
  --text-secondary: var(--muted);
  --text-on-dark: var(--panel-ink);
  --text-on-dark-muted: rgba(246, 248, 244, 0.72);
  --state-danger: var(--danger);
  --state-ok: var(--ok);
  --radius-shell: var(--r-lg);
  --radius-card: var(--r-md);
  --radius-compact: 13.6005px;
  --radius-pill: 999px;
  --shadow-card:
    0 8px 24px rgba(0, 0, 0, 0.04),
    0 2px 6px rgba(0, 0, 0, 0.04),
    0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-shell:
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 0 1px rgba(0, 0, 0, 0.06);
  --type-label-font: var(--sans);
  --type-label-size: var(--type-ui-size);
  --type-label-weight: 600;
  --type-label-line: 1.3;
  --type-label-track: 0.02em;
  --space-shell: clamp(var(--space-4), 2.2vw, var(--space-5));
  --space-card: clamp(1.125rem, 2vw, var(--space-5));
}

body {
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

h1,
h2,
h3,
h4 {
  font-family: var(--sans);
  font-weight: var(--type-heading-weight);
}

h1 {
  font-size: var(--type-display-size);
  line-height: var(--type-display-line);
}

h2 {
  font-size: var(--type-section-size);
  line-height: var(--type-heading-line);
}

h3,
h4 {
  font-size: var(--type-card-size);
  line-height: var(--type-heading-line);
}

/* Repeated labels use one interface voice. Monospace remains for code and IDs. */
:where(
  .badge,
  .eyebrow,
  .role,
  .io-tag,
  .case-sheet__eyebrow,
  .case-study__kicker,
  .case-study__label,
  .visual-kicker,
  .module-tag
) {
  font: var(--type-label-weight) var(--type-label-size) / var(--type-label-line) var(--type-label-font);
  letter-spacing: var(--type-label-track);
}

:where(.badge, .eyebrow, .role, .io-tag, .module-tag) {
  border-radius: var(--radius-pill);
}

:where(.case-sheet__eyebrow, .case-study__kicker, .case-study__label, .visual-kicker) {
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Group shells share one material while their inner layouts remain route-owned. */
:where(
  .worked-grid,
  .case-study.evidence-board,
  .conveyor-steps,
  .domain-overview,
  .data-glossary,
  .quiz,
  .product-bridge,
  .current-focus__column,
  .timeline-section,
  .roadmap-details-section,
  .worklog-section,
  .status-method
) {
  border-radius: var(--radius-shell);
  background-color: var(--surface-shell);
  box-shadow: var(--shadow-shell);
}

/* Content cards share a calm base; status modifiers still win by specificity. */
:where(
  .brief-card,
  .result-card,
  .case-sheet__calculation,
  .case-sheet__checks,
  .case-study__brief,
  .case-study__result,
  .case-study__review,
  .card,
  .limit-card,
  .domain,
  .object,
  .check,
  .module-contract,
  .ci-evidence,
  .audience-answer
) {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
}

:where(
  .result-nums li,
  .case-study__metric,
  .module-node,
  .module-chip,
  .packet-stack__item,
  .quality-gate,
  .focus-list > li,
  .expectation-list > li,
  .worklog > li,
  .launch-route__step
) {
  border-radius: var(--radius-compact);
}

/* Ordinary explanatory modules stay light across process, data and checks. */
.section-hero__visual,
.ci-evidence,
.case-study__result,
.audience-answer:nth-child(n) {
  background: var(--surface-card);
  color: var(--text-primary);
}

.section-hero__visual {
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
}

.section-hero__visual :where(
  h2,
  h3,
  strong,
  b
),
.ci-evidence :where(h2, h3, strong),
.case-study__result :where(h2, h3, h4, strong),
.audience-answer:nth-child(n) b {
  color: var(--text-primary);
}

.section-hero__visual :where(
  p,
  figcaption,
  .module-map__head span:last-child,
  .module-map__support-head span,
  .packet-stack__head,
  .quality-funnel__input
),
.ci-evidence p,
.case-study__result .case-study__label,
.case-study__result .evidence-result-meta,
.audience-answer:nth-child(n) span {
  color: var(--text-secondary);
}

.ci-evidence a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* Keep semantic state color inside an otherwise consistent card system. */
.case-study__result .evidence-result-meta [data-state="stale"] {
  color: var(--state-danger);
}

.case-study__check--auto,
.quality-funnel__output {
  background: var(--surface-positive);
}

/* Buttons and text actions use the same interface typography and hit area. */
:where(
  .section-nav a,
  .metric-help,
  .next a,
  .evidence-links a,
  .evidence-hero__process-link,
  .text-cta,
  .quiz-buttons button
) {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 650;
}

:where(
  .metric-help,
  .next a,
  .evidence-links a,
  .evidence-hero__process-link,
  .quiz-buttons button
) {
  min-height: 44px;
}

@media (hover: hover) and (pointer: fine) {
  :where(
    .brief-card,
    .result-card,
    .case-sheet__calculation,
    .case-sheet__checks,
    .case-study__brief,
    .case-study__result,
    .case-study__review,
    .domain,
    .object,
    .check,
    .module-contract,
    .ci-evidence,
    .audience-answer
  ):hover {
    border-color: color-mix(in srgb, var(--teal) 32%, var(--hairline));
  }
}

@media (forced-colors: active) {
  :where(
    .brief-card,
    .result-card,
    .case-sheet__calculation,
    .case-sheet__checks,
    .case-study__brief,
    .case-study__result,
    .case-study__review,
    .domain,
    .object,
    .check,
    .module-contract,
    .ci-evidence,
    .audience-answer
  ) {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }
}

/* Квартирник — холодная публичная система: спокойная типографика, тонкие линии,
   один синий action-цвет и мятные смысловые акценты. Файл подключают все
   маршруты публичной витрины как последний слой поверх старых route-CSS. */

:root {
  --wrap: 1400px;
  --paper: #f7fbff;
  --paper-strong: #ffffff;
  --ink: #071735;
  --ink-soft: #385470;
  --muted: #4f6279;
  --fill: #eef6ff;
  --fill-deep: #e1edf9;
  --hairline: #cfe0f1;
  --accent: #0b5bd3;
  --accent-strong: #0749b8;
  --accent-soft: #e6f0ff;
  --mint: #32b889;
  --mint-soft: #dcf6eb;
  --risk: #2e6d9f;
  --risk-soft: #e8f2fb;
  --panel: #071735;
  --panel-ink: #f6fbff;
  --danger: #a84f54;
  --ok: var(--mint);
  --acid: var(--accent);
  --status-done: var(--mint);
  --status-doing: var(--accent);
  --status-blocked: var(--danger);
  --status-planned: #d8e6f4;
  --status-conditional: #7b8da3;
  --type-display-size: clamp(2.625rem, 5.2vw, 3.825rem);
  --type-section-size: clamp(2rem, 3vw, 2.267rem);
  --type-card-size: clamp(1.25rem, 2vw, 1.7rem);
  --type-body-size: 1.0625rem;
  --type-ui-size: 0.92rem;
  --type-caption-size: 0.78rem;
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 24px;
  --shadow-soft: 0 18px 42px rgba(9, 35, 76, 0.08);
}

body {
  background: var(--paper);
  color: var(--ink);
}

.wrap {
  width: min(calc(100% - 40px), var(--wrap));
  max-width: var(--wrap);
  padding-inline: 0;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border: 0;
  background: rgba(247, 251, 255, 0.88);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.topbar .nav {
  min-height: 76px;
  gap: clamp(1.4rem, 4vw, 4rem);
}

.brand {
  color: var(--ink);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 780;
  letter-spacing: -0.05em;
}

.brand-logo::after {
  content: none;
  color: var(--ink);
  font-weight: 780;
}

.brand-logo span { color: var(--ink); font-weight: 780; }

.links {
  gap: clamp(0.95rem, 2vw, 1.65rem);
  margin-left: 0;
}

.links > a {
  position: relative;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 590;
  letter-spacing: -0.01em;
}

.links > a + a::before {
  position: absolute;
  top: 50%;
  left: calc(-0.85rem - 2px);
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #9fb4cc;
  content: "";
}

.links > a:hover,
.links > a[aria-current],
.nav-trigger.is-active {
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--accent);
  font-weight: 720;
}

.section-nav {
  border: 0;
  min-height: 3.2rem;
}

.section-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 620;
}

.section-nav a:hover,
.section-nav a:focus-visible,
.section-nav a[aria-current="page"],
.section-nav a[aria-current="location"] {
  border-color: var(--hairline);
  background: var(--paper-strong);
  color: var(--accent);
}

.badge,
.eyebrow {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  color: var(--ink);
  font-weight: 780;
  letter-spacing: -0.055em;
}

h2,
h3 { color: var(--ink); }

.lead {
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.4vw, 1.22rem);
  line-height: 1.62;
}

.cta-primary,
.cta-ghost,
.text-cta,
.manager-text-link,
.evidence-links a,
.worklog-more,
.metric-help,
.module-filter {
  border-radius: var(--r-sm);
}

.cta-primary,
.worklog-more {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(11, 91, 211, 0.16);
}

.cta-primary:hover,
.worklog-more:hover {
  background: var(--accent-strong);
}

.cta-ghost,
.text-cta {
  border: 1px solid var(--accent);
  background: var(--paper-strong);
  color: var(--accent);
  text-decoration: none;
}

.cta-ghost:hover,
.text-cta:hover {
  background: var(--accent-soft);
}

:is(.card, .brief-card, .result-card, .limit-card, .example, .project-brief,
  .status-panel, .stage-callout, .roadmap-detail, .timeline-board,
  .module-contract, .module-contract[open], .object, .domain, .quality-gate,
  .check, .quiz, .case-sheet__calculation, .case-sheet__checks,
  .audience-answer, .ci-evidence, .technical-details:not(.technical-details--compact),
  .project-pulse__link) {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--paper-strong);
  box-shadow: none;
}

.card:hover,
.project-pulse__link:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--hairline));
  background: var(--paper-strong);
}

:is(.process-intro, .page-head, .section-hero, .status-now) {
  border: 1px solid var(--hairline);
  background: var(--paper-strong);
  color: var(--ink);
}

:is(.process-intro, .page-head, .section-hero, .status-now)::before {
  border-color: var(--hairline);
}

.process-intro::after {
  color: var(--fill-deep);
}

:is(.process-copy, .section-hero__copy, .page-head) h1 {
  color: var(--ink);
}

:is(.process-copy, .section-hero__copy, .page-head) .lead {
  color: var(--ink-soft);
}

.status-now :is(h1, h2, h3, strong) {
  color: var(--ink);
}

.status-now :is(.lead, .micro, .number-provenance),
.status-now .number-provenance :is(code, a),
.status-now .proof-strip :is(span, small) {
  color: var(--ink-soft);
}

.status-now .proof-strip article {
  background: var(--fill);
}

.status-now .stage-callout {
  background: var(--accent);
  color: #ffffff;
}

.status-now .stage-callout :is(span, h2, h3, strong) {
  background: transparent;
  color: #ffffff;
}

.evidence-hero__copy {
  border: 1px solid var(--hairline);
  background: var(--paper-strong);
  color: var(--ink);
}

.evidence-hero__copy::after {
  border-color: var(--hairline);
}

.evidence-hero__copy h1 {
  color: var(--ink);
  letter-spacing: -0.045em;
}

.evidence-hero__copy .lead,
.evidence-hero__copy .evidence-hero__facts span,
.evidence-hero__copy .evidence-hero__boundary {
  color: var(--ink-soft);
}

.evidence-hero__facts li {
  background: var(--fill);
}

.evidence-hero__facts strong,
.evidence-hero__boundary strong {
  color: var(--ink);
}

.evidence-hero__copy .evidence-hero__boundary {
  background: var(--risk-soft);
}

.evidence-hero__process-link {
  color: var(--accent);
}

.evidence-viewer__live,
.evidence-stage-tabs button[aria-selected="true"],
.evidence-stage-tabs button[aria-selected="true"] span {
  color: #ffffff;
}

[data-accent-system="editorial-marker"] > section:first-of-type :is(.badge, .eyebrow) {
  border: 0;
  background: none;
  color: var(--accent);
}

[data-accent-system="editorial-marker"] :is(
  .section-head,
  .manager-heading,
  .status-heading,
  .current-focus__heading
) {
  padding-top: 0;
}

[data-accent-system="editorial-marker"] :is(
  .section-head,
  .manager-heading,
  .status-heading,
  .current-focus__heading
)::before,
[data-accent-panel]::before {
  display: none;
}

[data-accent-system="editorial-marker"] .step-text .step-no,
[data-accent-system="editorial-marker"] .packet-stack__item > span:first-child,
[data-accent-system="editorial-marker"] .quality-gate > span:first-child,
[data-accent-system="editorial-marker"] .module-node::before {
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
}

.sw-apt { background: var(--accent); }
.sw-llu { background: #2f5fa6; }
.sw-corr { background: #86a8c9; }
.sw-gap { background: color-mix(in srgb, var(--danger) 70%, white); }
.sw-ruler { background: var(--ink); }
.io-out { color: #24765e; }

.status-panel,
.status-panel + .status-panel {
  border: 1px solid var(--hairline);
  background: var(--paper-strong);
  color: var(--ink);
}

.status-panel:first-child {
  background: var(--paper-strong);
  color: var(--ink);
}

.evidence-hero__copy {
  border: 1px solid var(--hairline);
  background: var(--paper-strong);
  color: var(--ink);
}

.evidence-viewer__live,
.evidence-stage-tabs button[aria-selected="true"],
.evidence-stage-tabs button[aria-selected="true"] span,
.evidence-stage-tabs button[aria-selected="true"] small {
  color: #ffffff;
}

.evidence-callout,
.evidence-callout--warning {
  border-color: var(--accent-strong);
  background: var(--accent);
  box-shadow: none;
  color: #ffffff;
}

[data-state="published"] .pipeline-state {
  background: var(--accent);
  color: #ffffff;
}

.process-route a[aria-current="step"],
.process-route a[aria-current="step"] :is(b, span) {
  background: var(--accent);
  color: #ffffff;
}

.process-route a[aria-current="step"]::after {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--accent-strong);
}

.status-panel:first-child .eyebrow,
.status-panel + .status-panel .eyebrow {
  background: none;
  color: var(--accent);
}

.status-panel :is(p, li),
.expectation p {
  color: var(--ink-soft);
}

.limit-list li,
.expectation {
  border-top-color: var(--hairline);
}

.limit-mark {
  background: var(--risk-soft);
  color: var(--risk);
}

footer {
  border-color: var(--hairline);
  background: var(--paper);
}

footer .wrap { color: var(--muted); }
footer a { color: var(--accent); }

@container (min-width: 38rem) {
  .module-map { gap: 0.65rem; padding: 1rem; }
  .module-map__core { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .module-map__support { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .module-node { min-height: 92px; padding: 1.9rem 0.65rem 0.6rem; }
  .module-chip { padding: 0.4rem 0.5rem; }
}

@media (max-width: 960px) {
  .topbar .nav {
    min-height: 64px;
  }

  .site-menu > summary {
    border-color: var(--hairline);
    border-radius: 999px;
    background: var(--paper-strong);
    color: var(--ink);
  }

  .site-menu .links {
    border-color: var(--hairline);
    border-radius: var(--r-md);
    background: var(--paper-strong);
    box-shadow: var(--shadow-soft);
  }

  .site-menu .links > a,
  .site-menu .links .nav-trigger {
    color: var(--ink);
  }

  .site-menu .links > a + a::before { display: none; }
}

@media (max-width: 640px) {
  .links > a { font-size: 0.96rem; }
}

@media (forced-colors: active) {
  .cta-primary,
  .cta-ghost,
  .text-cta,
  .site-menu > summary {
    border: 2px solid ButtonText;
  }

  .links > a[aria-current],
  .nav-trigger.is-active {
    border-bottom: 2px solid LinkText;
  }
}
