/* ==========================================================================
   IPSR Drive — дизайн-система
   Светлая бумага журнала, Inter + IBM Plex Mono, лайм только вспышкой.
   Калькулятор — отдельный регистр: консоль с сегментом и моноширинными цифрами.
   ========================================================================== */

/* Локальные шрифты — те же семейства, что на ipsr.dev, без сторонних CDN. */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/inter-800-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/inter-800-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 1. Токены ---------------------------------------------------------------- */
/* Журнал читают на бумаге. База светлая; ночь — data-theme="dark" или prefers-color-scheme. */
:root {
  color-scheme: light;

  --g-950: #05080d;
  --g-900: #0a1017;
  --g-800: #121a22;
  --g-700: #1b2530;
  --g-600: #2a3644;
  --g-500: #5f6874;
  --g-400: #7b8591;
  --g-300: #d3d7d0;
  --g-200: #e7e9e4;
  --g-100: #f0f4ea;
  --g-050: #f6f8f3;
  --paper: #ffffff;

  --accent: #79ca4b;
  --accent-strong: #64b93a;
  --accent-ink: #08120a;
  --accent-soft: rgba(121, 202, 75, 0.14);
  --accent-line: rgba(121, 202, 75, 0.4);
  --accent-text: #3b7d24;
  --rubric: #4e9628;

  --bg: #f6f8f3;
  --bg-raised: #ffffff;
  --bg-sunken: #eef2e8;
  --bg-inverse: #05080d;
  --ink: #111827;
  --ink-soft: #4b5563;
  --ink-faint: #6b7280;
  --ink-inverse: #f2f5f7;
  --line: #e4e7e0;
  --line-strong: #cfd4cb;

  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 12px 32px -16px rgba(17, 24, 39, 0.12);
  --shadow-lg: 0 26px 72px rgba(17, 24, 39, 0.12);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;

  --wrap: 1240px;
  --gap: 28px;

  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Цвет рубрики — только метка, не весь блок. Лайм бренда не перетираем. */
.accent-flame { --rubric: #4e9628; }
.accent-volt  { --rubric: #0f7a62; }
.accent-ice   { --rubric: #1d5f86; }
.accent-plum  { --rubric: #5a4a82; }
.accent-sand  { --rubric: #8a6410; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: #8fe35d;
  --accent-strong: #9bf85f;
  --accent-ink: #08120a;
  --accent-soft: rgba(143, 227, 93, 0.14);
  --accent-line: rgba(143, 227, 93, 0.4);
  --accent-text: #8fe35d;
  --bg: #05080d;
  --bg-raised: #0c1117;
  --bg-sunken: #070b10;
  --bg-inverse: #f6f8f3;
  --ink: #f2f5f7;
  --ink-soft: #c2c8d1;
  --ink-faint: #9aa3ad;
  --ink-inverse: #111827;
  --line: #1e262f;
  --line-strong: #2c3641;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 26px 72px rgba(0, 0, 0, 0.35);
}
:root[data-theme="dark"] .accent-flame { --rubric: #8fe35d; }
:root[data-theme="dark"] .accent-volt  { --rubric: #6ee7b7; }
:root[data-theme="dark"] .accent-ice   { --rubric: #7eb6e0; }
:root[data-theme="dark"] .accent-plum  { --rubric: #b5a4e0; }
:root[data-theme="dark"] .accent-sand  { --rubric: #f0c46a; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --accent: #8fe35d;
    --accent-strong: #9bf85f;
    --accent-ink: #08120a;
    --accent-soft: rgba(143, 227, 93, 0.14);
    --accent-line: rgba(143, 227, 93, 0.4);
    --accent-text: #8fe35d;
    --bg: #05080d;
    --bg-raised: #0c1117;
    --bg-sunken: #070b10;
    --bg-inverse: #f6f8f3;
    --ink: #f2f5f7;
    --ink-soft: #c2c8d1;
    --ink-faint: #9aa3ad;
    --ink-inverse: #111827;
    --line: #1e262f;
    --line-strong: #2c3641;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 26px 72px rgba(0, 0, 0, 0.35);
  }
  :root:not([data-theme="light"]) .accent-flame { --rubric: #8fe35d; }
  :root:not([data-theme="light"]) .accent-volt  { --rubric: #6ee7b7; }
  :root:not([data-theme="light"]) .accent-ice   { --rubric: #7eb6e0; }
  :root:not([data-theme="light"]) .accent-plum  { --rubric: #b5a4e0; }
  :root:not([data-theme="light"]) .accent-sand  { --rubric: #f0c46a; }
}

/* 2. Основа ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  max-width: 100%;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg-raised);
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* 3. Разметка -------------------------------------------------------------- */
.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}

main { display: block; min-height: 50vh; }

.section { padding: clamp(28px, 4vw, 48px) 0; }
.frontpage + .section { padding-top: 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--ink);
}
.section-head h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.section-dek {
  margin: 6px 0 0;
  max-width: 46ch;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  color: var(--ink-soft);
}
.section-head .more {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 0.15s var(--ease);
}
.section-head .more:hover { color: var(--accent-text); }

/* 4. Типовые элементы ------------------------------------------------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rubric);
  margin: 0 0 12px;
}
.eyebrow::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--rubric);
  flex: none;
}
.eyebrow--plain::before { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}
a.chip:hover { border-color: var(--accent); color: var(--accent-text); }
.chip--accent,
.chip[aria-current="page"] {
  background: color-mix(in srgb, var(--rubric) 12%, transparent);
  border-color: color-mix(in srgb, var(--rubric) 28%, transparent);
  color: var(--rubric);
}
.chip--demo { border-style: dashed; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rubric); flex: none; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.meta > * { display: inline-flex; align-items: center; gap: 6px; }
.meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.2s var(--ease), border-color 0.15s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-text); }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* 5. Шапка ----------------------------------------------------------------- */
.masthead {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(16px);
  border-bottom: 1px solid var(--line-strong);
}

.masthead-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: none;
  color: var(--ink);
  order: 1;
}
.brand-word { color: var(--ink); }
.brand-line { color: var(--ink); }
.brand-cursor {
  color: var(--accent);
  letter-spacing: 0;
  animation: cursor-blink 1.1s steps(1) infinite;
}
@keyframes cursor-blink {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 4px 14px -4px var(--accent-line);
}
.brand-mark svg { width: 19px; height: 19px; }

.masthead-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  min-width: 0;
  flex: 1 1 auto;
  order: 2;
}
.masthead-nav a {
  position: relative;
  padding: 8px 10px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-soft);
  white-space: nowrap;
  border-radius: 0;
  transition: color 0.15s var(--ease);
}
.masthead-nav a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease);
}
.masthead-nav a:hover { color: var(--ink); }
.masthead-nav a[aria-current="page"] { color: var(--ink); }
.masthead-nav a[aria-current="page"]::after { transform: scaleX(1); }
.masthead-nav .nav-extra { display: none; }

.masthead-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: none;
  order: 3;
}

.quick-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  transition: border-color 0.15s var(--ease), box-shadow 0.2s var(--ease);
}
.quick-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.quick-search input {
  width: 150px;
  border: 0;
  background: none;
  font-size: 14px;
  outline: none;
}
.quick-search input::placeholder { color: var(--ink-faint); }
.quick-search button {
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 2px;
  display: grid;
  place-items: center;
}
.quick-search button:hover { color: var(--accent); }

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-raised);
  cursor: pointer;
  color: var(--ink-soft);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.icon-btn:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); transform: none; }
.icon-btn .moon { display: none; }
.icon-btn.menu-toggle { display: none; }
.icon-btn.menu-toggle:hover { transform: none; }
.menu-toggle .menu-close { display: none; }
.masthead.is-nav-open .menu-toggle .menu-open { display: none; }
.masthead.is-nav-open .menu-toggle .menu-close { display: block; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .moon { display: block; }
  :root:not([data-theme="light"]) .icon-btn .sun { display: none; }
}

/* 6. Обложки и карточки ---------------------------------------------------- */
.cover {
  position: relative;
  overflow: hidden;
  background: var(--bg-sunken);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(8, 10, 13, 0.75) 100%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.cover img, .cover .cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s var(--ease);
}
.cover img {
  filter: brightness(1.07) contrast(1.05);
}
.cover-credit {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(8, 10, 13, 0.55);
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.card .cover { aspect-ratio: 16 / 10; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
@media (hover: hover) {
  .card:hover .cover img,
  .card:hover .cover .cover-art { transform: scale(1.045); }
}
.card h3 {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.22;
  margin-bottom: 8px;
}
.card h3 a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.3s var(--ease);
}
.card:hover h3 a,
.card h3 a:focus-visible { background-size: 100% 2px; }
.card .dek {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .meta { margin-top: 10px; }
.card .cover-credit { display: none; }
.card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: clamp(28px, 3.4vw, 44px) var(--gap);
}
.grid:has(> :only-child) {
  grid-template-columns: minmax(0, 420px);
}

@media (min-width: 900px) {
  .grid--trio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.headline-list {
  margin-top: clamp(28px, 4vw, 40px);
  border-top: 2px solid var(--ink);
}
.headline {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.headline .cover {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
}
.headline .cover-credit { display: none; }
.headline h3 {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.25;
  margin: 6px 0 8px;
  padding-bottom: 0.08em;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.3s var(--ease);
}
.headline:hover h3 { background-size: 100% 2px; }
.headline .eyebrow { margin-bottom: 0; }

/* 7. Первая полоса --------------------------------------------------------- */
.frontpage {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr);
  gap: clamp(28px, 3.5vw, 56px);
  padding: clamp(28px, 4vw, 48px) 0 clamp(24px, 3vw, 36px);
  align-items: start;
}

.lede { min-width: 0; max-width: 100%; }
.issue-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 16px;
}
.issue-line .sep {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.lede-frame { position: relative; margin-bottom: 0; overflow: visible; }
.lede-banner {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: inherit;
}
.lede-banner .cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
}
.lede-banner .cover::after { opacity: 0; }
.lede-banner .cover-credit { display: none; }
.photo-credit {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-faint);
  text-align: right;
  max-width: 42rem;
}
.lede-copy {
  position: relative;
  z-index: 2;
  margin: -52px 0 0;
  padding: 40px 0 0;
  max-width: 42rem;
  background: none;
}
.lede-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  left: 0;
  right: 0;
  top: -12px;
  height: 132px;
  background: var(--bg);
  filter: blur(26px);
  opacity: 0.96;
}
.lede-copy .eyebrow { margin-bottom: 10px; }
.lede-copy h1 {
  color: var(--ink);
  margin-bottom: 0;
  text-shadow: none;
}
@media (hover: hover) {
  .lede:hover .lede-banner .cover img,
  .lede:hover .lede-banner .cover .cover-art { transform: scale(1.03); }
}
.lede h1 {
  font-size: clamp(28px, 4.2vw, 48px);
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}
.lede h1 a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 3px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 0.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.35s var(--ease);
}
.lede:hover h1 a,
.lede h1 a:focus-visible { background-size: 100% 3px; }
.lede .dek {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--ink);
  max-width: 62ch;
  margin: 12px 0 16px;
}
.lede-actions {
  display: flex;
  align-items: center;
  gap: 14px 22px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.lede-actions .meta { margin: 0; }
.tool-teaser {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--ink-soft);
}
.tool-teaser a {
  font-weight: 600;
  color: var(--accent-text);
  white-space: nowrap;
}
.tool-teaser a:hover { border-bottom: 1px solid var(--accent-line); }

.board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 3.5vw, 56px);
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.board:has(> :only-child) {
  grid-template-columns: minmax(0, 36rem);
}
.date-list { list-style: none; margin: 0; padding: 0; }
.date-list li {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.date-list li:last-child { border-bottom: 0; }
.date-list time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.date-list a {
  font-weight: 600;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.date-list a:hover { color: var(--accent-text); }
.board-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-faint);
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-raised) 88%, transparent);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.to-top:hover { border-color: var(--accent); }
.to-top[hidden] { display: none !important; }

.search-hero .crumbs { margin-bottom: 12px; }
.search-hint {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 52ch;
}
.search-hint a { font-weight: 600; color: var(--accent-text); }
.search-hint a:hover { border-bottom: 1px solid var(--accent-line); }

.sidebar {
  min-width: 0;
  position: sticky;
  top: 92px;
  padding: 2px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  color: var(--ink-soft);
}
.sidebar-title .count { color: var(--ink-faint); font-weight: 600; letter-spacing: 0; }

/* Полоса рубрик */
.rubric-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.rubric-strip .label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-right: 6px;
}
.rubric-strip--flush {
  border: 0;
  padding: 22px 0 0;
}
.rubric-strip--tags { margin: 36px auto 0; max-width: 44rem; }

/* 9. Страница материала ---------------------------------------------------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
}

.article-head {
  padding: clamp(28px, 4vw, 48px) 0 0;
  max-width: 44rem;
  margin-inline: auto;
}
.article-head .card-top { margin-bottom: 16px; }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--accent-text); }
.crumbs a:not(:first-child)::before {
  content: "/";
  margin-right: 10px;
  color: var(--ink-faint);
}
.article-head h1 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.035em;
  margin: 0 0 20px;
}
.article-lead {
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 24px;
  font-weight: 400;
}
.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.article-cover {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 52rem;
  margin: 0 auto clamp(28px, 4vw, 48px);
}
.article-hero {
  max-width: 52rem;
  margin: 0 auto clamp(28px, 4vw, 48px);
}
.article-hero .article-cover {
  margin: 0;
  max-width: none;
}
.article-hero .photo-credit { margin-top: 10px; }
.article-cover .cover-credit { display: none; }

.article-body {
  max-width: 44rem;
  margin-inline: auto;
  font-size: 18.5px;
  line-height: 1.72;
}
.article-body > p { margin: 0 0 1.15em; }
.article-body h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin: 1.9em 0 0.6em;
  letter-spacing: -0.025em;
}
.article-body ul {
  margin: 0 0 1.3em;
  padding: 0;
  list-style: none;
}
.article-body ul li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 0.5em;
}
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.66em;
  width: 8px;
  height: 2px;
  background: var(--accent);
}
.article-body a {
  color: var(--accent-text);
  border-bottom: 1px solid var(--accent-line);
  word-break: break-word;
}
.article-body a:hover { border-bottom-color: var(--accent-text); }

.article-body h2:first-child { margin-top: 0; }

.spec-table {
  width: 100%;
  margin: 0 0 1.5em;
  border-collapse: collapse;
  font-size: 0.92em;
}
.spec-table th,
.spec-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.spec-table th {
  width: 42%;
  padding-right: 16px;
  font-weight: 500;
  color: var(--ink-soft);
}
.spec-table td {
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}
.spec-table tr:last-child th,
.spec-table tr:last-child td { border-bottom: 0; }

.article-figure {
  margin: 1.5em 0 1.7em;
}
.article-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--g-800);
}
.article-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-faint);
}

.article-note {
  margin: 0 0 1.5em;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: var(--bg-raised);
  color: var(--ink-soft);
  font-size: 0.95em;
  line-height: 1.55;
}

.source-box {
  max-width: 44rem;
  margin: clamp(32px, 4vw, 48px) auto 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-raised);
  font-size: 14.5px;
}
.source-box dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.source-box dd { min-width: 0; }
.source-box dt { color: var(--ink-faint); font-size: 13px; }
.source-box dd { margin: 0; font-weight: 600; }
.source-box a { color: var(--accent-text); word-break: break-all; }

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  font-size: 14px;
  color: var(--ink);
  max-width: 44rem;
  margin: 0 auto 28px;
}
.notice svg { flex: none; color: var(--accent); margin-top: 2px; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  max-width: 44rem;
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.pager a:hover { border-color: var(--accent); transform: translateY(-2px); }
.pager .dir { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--ink-soft); }
.pager .pt { font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.pager .next { text-align: right; align-items: flex-end; }

/* 10. Коллекции и поиск ---------------------------------------------------- */
.page-head {
  padding: clamp(36px, 5vw, 64px) 0 clamp(24px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(32px, 4vw, 48px);
}
.page-head .crumbs { margin-bottom: 10px; }
.page-head .rubric-strip { margin-top: 22px; }
.page-head h1 {
  font-size: clamp(28px, 4.4vw, 46px);
  letter-spacing: -0.035em;
}
.page-head .sub {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-soft);
  max-width: 62ch;
  margin-top: 16px;
}
.page-head .meta { margin-top: 18px; }

.search-hero { padding: clamp(36px, 5vw, 64px) 0 clamp(28px, 3vw, 40px); }
.search-hero h1,
.search-hero-title {
  font-size: clamp(30px, 4.4vw, 50px);
}
.search-results { padding-bottom: 72px; }
.search-form {
  display: flex;
  gap: 10px;
  max-width: 680px;
  margin-top: 24px;
  align-items: stretch;
}
.search-form .field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-raised);
  transition: border-color 0.15s var(--ease), box-shadow 0.2s var(--ease);
}
.search-form .field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search-form input {
  flex: 1;
  border: 0;
  background: none;
  outline: none;
  padding: 16px 0;
  font-size: 16.5px;
}

.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li { border-bottom: 1px solid var(--line); }
.result-list a.row {
  display: grid;
  grid-template-columns: 152px 1fr;
  gap: 24px;
  padding: 24px 0;
  align-items: start;
}
.result-list .cover { aspect-ratio: 16 / 10; }
.result-list .cover-credit { display: none; }
.result-list a.row:hover .rt { color: var(--accent-text); }
.result-list .rt {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 8px;
  transition: color 0.15s var(--ease);
}
.result-list .rd { color: var(--ink-soft); font-size: 15px; margin-bottom: 10px; }
.result-list .card-top { margin-bottom: 8px; }
.result-list mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 2px; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(36px, 4vw, 56px);
}
.pagination a, .pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent-text); }
.pagination .current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pagination-dir { min-width: auto; padding: 0 14px; font-variant-numeric: normal; }

/* 11. Пустые состояния ----------------------------------------------------- */
.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 18px;
  padding: clamp(48px, 8vw, 96px) 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}
.empty svg { color: var(--ink-faint); opacity: 0.7; }
.empty h3 { font-size: clamp(20px, 2.4vw, 26px); }
.empty p { color: var(--ink-soft); max-width: 48ch; }
.empty .hints { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.empty--compact { margin-top: 20px; padding: 36px 22px; }
.empty--compact h3 { font-size: 19px; }
.empty--compact p { font-size: 14.5px; }
.empty--page { margin: clamp(48px, 8vw, 96px) 0; }
.empty--page h1 { font-size: clamp(28px, 4vw, 40px); }

/* 12. Калькулятор ---------------------------------------------------------- */
.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: clamp(28px, 3.5vw, 48px);
  align-items: start;
  padding-bottom: clamp(48px, 6vw, 80px);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 24px; }
.panel h2 { font-size: 22px; margin-bottom: 6px; }
.panel h3 { font-size: 17px; margin-bottom: 14px; }
.panel .panel-note { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 24px; }
.panel .panel-note--last { margin-bottom: 0; }
.compare-head { margin-top: 28px; }

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  background: var(--bg-sunken);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 24px;
}
.segmented label {
  position: relative;
  display: grid;
  place-items: center;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  text-align: center;
  transition: color 0.15s var(--ease), background 0.2s var(--ease);
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-sm);
}
.segmented label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}
.field-row { display: flex; flex-direction: column; gap: 7px; }
.field-row label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field-row .hint { font-size: 12px; color: var(--ink-faint); }
.field-row input, .field-row select {
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
}
.field-row input:focus, .field-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

.readout {
  display: grid;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}
/* Разделители рисуются границами ячеек, а не просветами сетки: иначе
   незаполненный хвост последней строки выглядит выбитой плиткой. */
.readout div {
  padding: 18px 20px;
  display: grid;
  gap: 4px;
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.readout div:first-child { border-top: 0; }
.readout .k { font-size: 12px; color: var(--ink-faint); letter-spacing: 0.04em; text-transform: uppercase; }
.readout .v {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.readout .hero-cell { background: var(--accent); color: var(--accent-ink); }
.readout .hero-cell .k { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.readout .hero-cell .v { color: var(--accent-ink); font-size: 30px; }

.bars { display: grid; gap: 14px; margin-top: 22px; }
.bar-row { display: grid; gap: 7px; }
.bar-row .bar-head { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.bar-row .bar-head .amount { font-variant-numeric: tabular-nums; }
.bar-track { height: 10px; border-radius: 999px; background: var(--bg-sunken); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width 0.5s var(--ease); }
.bar-row.is-other .bar-fill { background: var(--g-400); }

.region-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-sunken);
}
.region-bar__pick { display: flex; align-items: center; gap: 10px; }
.region-bar__pick .k {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.region-bar__pick select {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  max-width: 260px;
}
.region-bar__price { font-size: 14.5px; margin: 0; }
.region-bar__price b { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-faint); font-size: 13px; display: block; }

.own-price {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.own-price > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  list-style: none;
}
.own-price > summary::before { content: '+ '; color: var(--accent); font-weight: 800; }
.own-price[open] > summary::before { content: '− '; }
.own-price > summary::-webkit-details-marker { display: none; }
.own-price .field-row { margin-top: 14px; max-width: 280px; }

.alt-fuels { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 2px; }
.alt-fuels li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  align-items: baseline;
}
.alt-fuels li:last-child { border-bottom: 0; }
.alt-fuels .alt-cost { font-weight: 700; font-variant-numeric: tabular-nums; }
.alt-fuels .muted { grid-column: 1 / -1; }

.history-panel > summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.history-panel > summary .hint {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
  margin-left: auto;
}
.history-panel > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft);
  transform: rotate(45deg);
  flex: none;
  translate: 0 -2px;
}
.history-panel[open] > summary::after {
  transform: rotate(-135deg);
  translate: 0 2px;
}
.history-panel > summary::-webkit-details-marker { display: none; }
.history-panel[open] > summary { margin-bottom: 10px; }

.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.price-list li:last-child { border-bottom: 0; }
.price-list a { color: var(--ink); text-decoration: none; }
.price-list a:hover { color: var(--accent-text); }
.price-list .p-cost { font-weight: 700; font-variant-numeric: tabular-nums; }
.price-list li.is-mine { font-weight: 700; }
.price-list li.is-mine .p-cost { color: var(--accent); }

.history { list-style: none; margin: 0; padding: 0; }
.history li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.history li:last-child { border-bottom: 0; }
.history .h-cost { font-weight: 700; font-variant-numeric: tabular-nums; }

/* 12b. Подборка автомобилей --------------------------------------------- */
.side-block { margin-top: 36px; }

/* Рубрики в правой колонке: список со счётчиком вместо полосы чипов,
   которая занимала отдельную строку во всю ширину полосы. */
.rubric-list { list-style: none; margin: 0; padding: 0; }
.rubric-list li { border-bottom: 1px solid var(--line); }
.rubric-list a {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
}
.rubric-list .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rubric); }
.rubric-list .r-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rubric-list a:hover .r-name { color: var(--accent-text); }
.rubric-list .r-count {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.car-list { list-style: none; margin: 0; padding: 0; counter-reset: car; }

/* Компактный вид для правой колонки первой полосы */
.car-list--compact li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.car-list--compact .car-name { font-weight: 600; letter-spacing: -0.015em; min-width: 0; }
.car-list--compact .car-name a:hover { color: var(--accent-text); }
.car-list--compact .car-power { color: var(--ink-faint); font-size: 13.5px; white-space: nowrap; }

.car-rank {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* Развёрнутые строки на странице подборки */
.car-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
/* Разделитель сверху даёт .page-head — вторая линия читалась бы как ошибка. */
.car-row .car-rank { font-size: 17px; padding-top: 2px; }
.car-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.022em;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.car-title a:hover { color: var(--accent-text); }
.car-summary { color: var(--ink-soft); font-size: 15px; margin: 0 0 8px; }
.car-source { font-size: 13px; color: var(--ink-faint); margin: 0; }
.car-source a { color: var(--accent-text); }
.chip--market {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.car-more { margin: 0 0 10px; font-size: 14px; }
.car-more a { color: var(--accent-text); font-weight: 600; }
.car-review {
  margin: 4px 0 14px;
  max-width: 68ch;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.car-review p { margin: 0 0 0.8em; }
.car-review p:last-child { margin-bottom: 0; }
.car-review .spec-table { margin: 12px 0; }
.car-review .article-note { margin: 12px 0 0; }
.car-row--review { align-items: start; }
.car-row--photo {
  grid-template-columns: 34px minmax(240px, 380px) minmax(0, 1fr);
}
.car-main .car-specs { margin: 12px 0 18px; }
.car-row--photo .car-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.car-photo {
  margin: 0;
}
.car-photo a { display: block; }
.car-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 55%;
  border-radius: var(--radius);
  background: var(--bg-sunken);
}
.car-photo figcaption {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-faint);
}

.car-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.car-specs > div { background: var(--bg-raised); padding: 11px 12px; display: grid; gap: 3px; min-width: 0; }
.car-specs dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); }
.car-specs dd {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  /* Длинное описание двигателя переносится по словам; расстановка дефисов
     здесь только мешала — «кроссо-вер» читается как опечатка. */
  overflow-wrap: break-word;
}
.car-specs .car-price { white-space: nowrap; }
.car-specs .car-power { color: var(--accent); }

@media (max-width: 900px) {
  .car-row,
  .car-row--photo { grid-template-columns: 28px minmax(0, 1fr); }
  .car-row--photo .car-photo,
  .car-row--photo .car-main { grid-column: 2; }
  .car-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 13. Подвал --------------------------------------------------------------- */
.footer {
  margin-top: clamp(56px, 7vw, 96px);
  background: var(--bg-sunken);
  color: var(--ink-soft);
  padding: clamp(44px, 6vw, 72px) 0 32px;
  font-size: 14.5px;
  border-top: 2px solid var(--ink);
}
.footer a { color: var(--ink-soft); }
.footer a:hover { color: var(--accent-text); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.footer .brand { color: var(--ink); margin-bottom: 14px; }
.footer-about { max-width: 42ch; color: var(--ink-faint); }
.footer h4 {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 13px;
  color: var(--ink-faint);
}

/* 14. Адаптив -------------------------------------------------------------- */
/* Планшет: горизонтальные ссылки уже не влезают — «Топ» и «Калькулятор»
   уезжали под маску. Меню с 1180px, а не с 720. */
@media (max-width: 1180px) {
  .icon-btn.menu-toggle { display: grid; }
  .masthead-nav {
    display: none;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 4px 0 0;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
  }
  .masthead.is-nav-open .masthead-bar {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .masthead-tools { order: 2; }
  .masthead.is-nav-open .masthead-nav { display: flex; order: 3; }
  .masthead-nav .nav-extra { display: block; }
  .masthead-nav a { padding: 12px 10px; }
  .masthead-nav a::after { display: none; }
  .masthead-nav a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--accent);
    color: var(--ink);
  }
}

@media (max-width: 1080px) {
  .frontpage { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .tool-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* Широкий кадр первой полосы: 5/4 резал борта машины, а размытие
     заголовка вылезало за wrap и страница ёрзала при скролле. */
  .lede-frame {
    margin-inline: -16px;
  }
  .lede-banner,
  .lede-banner .cover {
    border-radius: 0;
  }
  .lede-banner .cover {
    aspect-ratio: 16 / 9;
  }
  .lede-copy {
    margin: 16px 0 0;
    padding: 0;
    max-width: none;
  }
  .lede-copy::before { content: none; }
  .photo-credit { text-align: left; }
}

/* На узких экранах поиск сворачивается в кнопку: пустая отправка формы
   открывает страницу поиска, поэтому поле в шапке там не нужно. */
@media (max-width: 560px) {
  .quick-search { padding: 0; width: 38px; height: 38px; border-radius: 50%; justify-content: center; }
  .quick-search input { display: none; }
  .brand { font-size: 15px; letter-spacing: 0.04em; }
  .brand-mark { width: 27px; height: 27px; }
  .segmented { grid-template-columns: 1fr 1fr; }
  .search-form { flex-direction: column; }
  .search-form .btn { width: 100%; }
  .source-box dl { grid-template-columns: 1fr; gap: 4px 0; }
  .source-box dt { margin-top: 10px; }
  .source-box dt:first-child { margin-top: 0; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section-head {
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: baseline;
  }
  .section-head .more { white-space: normal; }
  .headline {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 14px 0;
  }
  .headline h3 { font-size: 16.5px; margin: 4px 0 6px; }
  .wrap { width: calc(100% - 32px); }
  .article-body { font-size: 17px; }
  .result-list a.row { grid-template-columns: 96px 1fr; gap: 16px; }
  .result-list .rt { font-size: 17px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; align-items: flex-start; }
  .readout .hero-cell .v { font-size: 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .to-top { right: 16px; bottom: 16px; }
  .tool-teaser { font-size: 15px; }
  .board { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

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

@media print {
  .masthead, .footer, .pager, .progress, .to-top { display: none !important; }
  body { background: #fff; color: #000; }
  .article-body { max-width: none; font-size: 12pt; }
}
