/* «Конь Педальный» — киберпанк-тема.
   Ночь: фон #07070C, неон-магента #FF2E63, циан #00E5FF,
   кислотный #F5E960, текст #E6F1FF. День — та же схема на светлом.
   Шрифты: Unbounded (заголовки), Inter (текст), JetBrains Mono (метки). */

:root {
  --bg: #07070c;
  --bg-soft: #0d0d16;
  --bg-card: #10101c;
  --red: #ff2e63;
  --red-bright: #ff4d7d;
  --accent-rgb: 255, 46, 99;
  --neon-rgb: 0, 229, 255;
  --gold-rgb: 245, 233, 96;
  --teal: #00e5ff;
  --ochre: #f5e960;
  --text: #e6f1ff;
  --text-muted: #8f9bb3;
  --border: #23233a;
  --header-bg: rgba(7, 7, 12, 0.86);
  --hero-bg:
    radial-gradient(900px 460px at 82% -12%, rgba(var(--accent-rgb), 0.30), transparent 62%),
    radial-gradient(760px 420px at 8% 112%, rgba(var(--neon-rgb), 0.20), transparent 62%),
    linear-gradient(180deg, #0a0a14, #05050a);
  --footer-bg: #05050a;
  --link-hover: #7df9ff;
  --ghost-hover: rgba(var(--neon-rgb), 0.12);
  --paper-bg: #0c0c16;
  --paper-text: #c9d6ea;
  --paper-title: #f2f8ff;
  --paper-muted: #8f9bb3;
  --paper-border: #1e1e33;
  --paper-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(var(--neon-rgb), 0.07);
  --card-bg: #10101c;
  --card-title: #eaf6ff;
  --card-muted: #93a1b8;
  --card-border: #23233a;
  --tab: #8f9bb3;
  --tab-bg: #151526;
  --tab-active: #00e5ff;
  --source: #f5e960;
  --radius: 4px;
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Inter", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #eef1f7;
  --bg-soft: #e3e8f2;
  --bg-card: #ffffff;
  --red: #ab4e52;
  --red-bright: #c25b57;
  --accent-rgb: 171, 78, 82;
  --neon-rgb: 0, 119, 182;
  --gold-rgb: 166, 124, 0;
  --teal: #0077b6;
  --ochre: #a67c00;
  --text: #10131a;
  --text-muted: #5a6478;
  --border: #cfd6e4;
  --header-bg: rgba(238, 241, 247, 0.9);
  --hero-bg:
    radial-gradient(900px 460px at 82% -12%, rgba(171, 78, 82, 0.12), transparent 62%),
    radial-gradient(760px 420px at 8% 112%, rgba(0, 119, 182, 0.12), transparent 62%),
    linear-gradient(180deg, #f4f6fb, #e9eef6);
  --footer-bg: #e3e8f2;
  --link-hover: #005f8f;
  --ghost-hover: rgba(0, 119, 182, 0.08);
  --paper-bg: #ffffff;
  --paper-text: #1a1f2b;
  --paper-title: #0b0e14;
  --paper-muted: #5a6478;
  --paper-border: #d7dde9;
  --paper-shadow: 0 24px 60px rgba(16, 19, 26, 0.10);
  --card-bg: #ffffff;
  --card-title: #0b0e14;
  --card-muted: #5a6478;
  --card-border: #d7dde9;
  --tab: #77808f;
  --tab-bg: #e8ecf4;
  --tab-active: #0b0e14;
  --source: #8a5a00;
  --radius: 4px;
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Inter", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #07070c;
  --bg-soft: #0d0d16;
  --bg-card: #10101c;
  --red: #ff2e63;
  --red-bright: #ff4d7d;
  --teal: #00e5ff;
  --ochre: #f5e960;
  --text: #e6f1ff;
  --text-muted: #8f9bb3;
  --border: #23233a;
  --header-bg: rgba(7, 7, 12, 0.86);
  --hero-bg:
    radial-gradient(900px 460px at 82% -12%, rgba(var(--accent-rgb), 0.30), transparent 62%),
    radial-gradient(760px 420px at 8% 112%, rgba(var(--neon-rgb), 0.20), transparent 62%),
    linear-gradient(180deg, #0a0a14, #05050a);
  --footer-bg: #05050a;
  --link-hover: #7df9ff;
  --ghost-hover: rgba(var(--neon-rgb), 0.12);
  --paper-bg: #0c0c16;
  --paper-text: #c9d6ea;
  --paper-title: #f2f8ff;
  --paper-muted: #8f9bb3;
  --paper-border: #1e1e33;
  --paper-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(var(--neon-rgb), 0.07);
  --card-bg: #10101c;
  --card-title: #eaf6ff;
  --card-muted: #93a1b8;
  --card-border: #23233a;
  --tab: #8f9bb3;
  --tab-bg: #151526;
  --tab-active: #00e5ff;
  --source: #f5e960;
  --radius: 4px;
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Inter", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;
  color-scheme: dark;
}

/* Переключатель темы в шапке */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 8px 0 6px;
  border: 1px solid #47515c;
  border-radius: 999px;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.10) 0 1px, rgba(0, 0, 0, 0.05) 1px 2px),
    linear-gradient(180deg, #f2f7fb 0%, #ccd6e0 36%, #97a4b2 66%, #6b7683 100%);
  color: #1d242b;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -2px 4px rgba(0, 0, 0, 0.32),
    0 2px 6px rgba(0, 0, 0, 0.38);
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
}

.theme-toggle:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.42);
}

.theme-toggle:active {
  transform: translateY(0);
  filter: brightness(0.96);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.5),
    0 1px 3px rgba(0, 0, 0, 0.35);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.theme-toggle-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #4a545f;
  border-radius: 50%;
  background-image:
    radial-gradient(circle at 32% 28%, #fbfdff 0%, #cbd5df 38%, #8d99a6 68%, #5a6470 100%);
  color: #262d34;
  font-size: 14px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -1px 2px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--link-hover); }

img { max-width: 100%; display: block; }

/* ---------- Шапка ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.logo-mark {
  display: block;
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.3s ease;
}

.logo-text {
  font-family: "Ruslan Display", var(--font-display);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1;
}

.logo-text em {
  color: var(--red-bright);
  font-style: normal;
}

.site-nav {
  display: flex;
  gap: clamp(12px, 2vw, 28px);
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* ---------- Герой ---------- */

.hero {
  padding: clamp(56px, 10vw, 120px) clamp(16px, 4vw, 48px);
  background: var(--hero-bg);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 24vw, 360px);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
}

.hero-inner { max-width: none; margin: 0; }

.hero-logo { margin: 0; justify-self: end; }

.hero-logo img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
}

.hero-kicker {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 6.2vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--text);
}

.hero-title span { color: var(--red-bright); }

.hero-sub {
  max-width: 560px;
  margin: 24px 0 32px;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-muted);
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red-bright);
  color: #fff;
  box-shadow: 0 8px 24px rgba(178, 34, 34, 0.35);
}

.btn-ghost {
  border: 1px solid var(--teal);
  color: var(--teal);
}

.btn-ghost:hover {
  background: var(--ghost-hover);
  color: var(--link-hover);
}

/* ---------- Преимущества ---------- */

.advantages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: clamp(32px, 6vw, 64px) clamp(16px, 4vw, 48px);
  max-width: 1200px;
  margin: 0 auto;
}

.adv-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  border-top: 3px solid var(--ochre);
}

.adv-card h3 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
}

.adv-card p { margin: 0; color: var(--text-muted); font-size: 15px; }

.adv-icon { font-size: 26px; }

/* ---------- Секции ---------- */

section { scroll-margin-top: 80px; }

.section-head {
  max-width: 1200px;
  margin: 0 auto 28px;
  padding: 0 clamp(16px, 4vw, 48px);
}

.section-head h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--red-bright);
}

.section-head p { margin: 0; color: var(--text-muted); }

.services {
  padding: clamp(40px, 8vw, 80px) 0;
  border-top: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.price-card h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ochre);
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.price-table { width: 100%; border-collapse: collapse; }

.price-table td {
  padding: 10px 0;
  vertical-align: top;
  border-bottom: 1px dashed var(--border);
}

.price-table tr:last-child td { border-bottom: none; }

.price-name small {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.price-value {
  text-align: right;
  white-space: nowrap;
  padding-left: 16px !important;
  font-family: var(--font-mono);
  color: var(--ochre);
  font-size: 15px;
}

/* ---------- Заглушки ---------- */

.placeholder {
  padding: clamp(40px, 7vw, 72px) 0;
  border-top: 1px solid var(--border);
}

/* ---------- Контакты ---------- */

.contacts {
  padding: clamp(40px, 8vw, 80px) 0;
  border-top: 1px solid var(--border);
}

.contacts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.contacts-map {
  max-width: 1200px;
  margin: 22px auto 0;
  padding: 0 clamp(16px, 4vw, 48px);
}

.contacts-map iframe {
  width: 100%;
  height: clamp(260px, 38vw, 420px);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: block;
  background: var(--bg-soft);
}

.contacts-map-links {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.contacts-map-links a { color: var(--teal); }

/* В тёмной теме карта иначе светит белым прямоугольником */
html[data-theme="dark"] .contacts-map iframe {
  filter: invert(0.9) hue-rotate(180deg) saturate(0.75);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .contacts-map iframe {
    filter: invert(0.9) hue-rotate(180deg) saturate(0.75);
  }
}

.contact-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  padding: 18px 20px;
}

.contact-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 6px;
}

.contact-item p { margin: 0; }

/* ---------- Подвал ---------- */

.site-footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  padding: 40px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  font-size: 14px;
}

.footer-col strong {
  display: block;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 8px;
}

.footer-col p { margin: 0; color: var(--text-muted); }

.footer-muted { display: flex; align-items: flex-end; }

/* ---------- Мобильная версия ---------- */

@media (max-width: 960px) {
  /* На тесных экранах навигация уходит на вторую строку, тема — справа сверху */
  .site-header { flex-wrap: wrap; }
  .logo { flex: 1 1 auto; }
  .theme-toggle { order: 2; flex: 0 0 auto; }
  .site-nav { order: 3; flex-basis: 100%; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-logo {
    order: -1;
    justify-self: start;
    width: clamp(132px, 38vw, 190px);
  }
  .hero-logo img { max-height: none; }
}

@media (max-width: 720px) {
  /* Логотип слева, переключатель темы — справа в том же месте, навигация ниже */
  .site-header { flex-wrap: wrap; align-items: center; gap: 10px 12px; }
  .logo { flex: 1 1 auto; }
  .theme-toggle { order: 2; flex: 0 0 auto; }
  .site-nav { order: 3; flex-basis: 100%; gap: 14px; overflow-x: auto; }
  .site-nav a { font-size: 13px; }
  .hero-title { font-size: clamp(26px, 9.6vw, 60px); }
}

/* ---------- Статьи: спокойная бумажная страница ---------- */

.paper {
  max-width: 880px;
  margin: 40px auto;
  background: var(--paper-bg);
  color: var(--paper-text);
  border-radius: 6px;
  padding: clamp(24px, 4vw, 56px);
  box-shadow: var(--paper-shadow);
}

.paper-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--paper-title);
}

.paper-lead {
  color: var(--paper-muted);
  margin: 0 0 32px;
  max-width: 60ch;
  font-size: 16px;
}

.article-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 18px;
}

.article-back { color: var(--source); text-decoration: none; }
.article-back:hover { color: var(--red-bright); }

.card-cat {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--paper-muted);
}

.article-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 16px;
}

.article-card {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  background: var(--card-bg);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.article-card:hover { border-color: var(--ochre); transform: translateY(-2px); }

.article-card h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 8px 0 8px;
  color: var(--paper-title);
}

.article-card p { margin: 0; font-size: 14px; color: var(--card-muted); line-height: 1.55; }

/* Вкладки стиля — текстовые, без кнопочных рамок */

.style-switch { margin-top: 8px; }

.style-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
}

.style-labels {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--paper-border);
}

/* Вкладки — крупные мишени: раньше кликалась только строка текста */
.style-labels label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 124px;
  padding: 12px 22px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tab);
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  margin-bottom: -1px;
  user-select: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.style-labels label:hover {
  color: var(--tab-active);
  background: var(--tab-bg);
}

.style-labels label:active { background: var(--paper-border); }

#style-obyvatel:checked ~ .style-labels label[for="style-obyvatel"],
#style-marginal:checked ~ .style-labels label[for="style-marginal"] {
  color: var(--tab-active);
  border-bottom-color: var(--red);
  background: var(--tab-bg);
}

#style-obyvatel:focus-visible ~ .style-labels label[for="style-obyvatel"],
#style-marginal:focus-visible ~ .style-labels label[for="style-marginal"] {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.style-panel { display: none; padding-top: 24px; }

#style-obyvatel:checked ~ .style-panels .panel-obyvatel,
#style-marginal:checked ~ .style-panels .panel-marginal { display: block; }

.article-photo { margin: 0 0 22px; }

.article-photo img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.prose {
  font-size: 17px;
  line-height: 1.75;
  color: var(--paper-text);
  white-space: pre-line;
}

/* «Маргинал»: фото с подписью поверх — мем-подача */

.meme { position: relative; margin: 0 0 22px; }

.meme img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  filter: grayscale(0.15) contrast(1.12) saturate(0.85);
}

/* Готовая мем-картинка: текст уже в кадре, не обрезаем */
.meme--img img {
  width: auto;
  max-width: 100%;
  max-height: 620px;
  margin: 0 auto;
  display: block;
  border-radius: 2px;
}

.meme figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 22px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(16px, 2.2vw, 24px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.25;
}

/* Мем без фото: подпись как цитата-стикер, без наложения на картинку.
   Правило идёт после `.meme figcaption`, иначе absolute перекрывает static. */
.meme--text { margin: 0 0 24px; }

.meme--text figcaption {
  position: static;
  background: var(--bg-soft);
  color: var(--paper-title);
  border: 1px solid var(--paper-border);
  border-left: 4px solid var(--red);
  border-radius: 3px;
  padding: 16px 20px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  font-size: clamp(15px, 1.9vw, 21px);
  font-family: var(--font-display);
}

.article-source {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--paper-border);
  font-size: 13px;
  color: var(--paper-muted);
}

.article-source a { color: var(--source); }
.source-license { margin-left: 8px; color: var(--paper-muted); font-size: 12px; }

@media (max-width: 720px) {
  .paper { margin: 16px; padding: 22px 18px; }
  .style-labels { gap: 6px; }
  .style-labels label {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 12px 10px;
    font-size: 12px;
  }
  .theme-toggle { padding: 0 11px; }
  .theme-toggle-suffix { display: none; }
}

/* ---------- Динамика ---------- */

@view-transition { navigation: auto; }

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out 0.16s ease both; }
  ::view-transition-new(root) { animation: vt-in 0.22s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}

html.motion { scroll-behavior: smooth; }

/* Герой: собранный вход, а не «всё сразу» */
html.motion .hero-kicker,
html.motion .hero-title,
html.motion .hero-sub,
html.motion .hero-actions,
html.motion .hero-logo { animation: rise-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

html.motion .hero-kicker { animation-delay: 0.04s; }
html.motion .hero-title { animation-delay: 0.10s; }
html.motion .hero-sub { animation-delay: 0.18s; }
html.motion .hero-actions { animation-delay: 0.26s; }
html.motion .hero-logo {
  animation-name: logo-in;
  animation-duration: 0.9s;
  animation-delay: 0.12s;
}

/* Появление блоков при скролле: классы ставит motion.js */
html.motion .reveal { opacity: 0; transform: translateY(20px); }

html.motion .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 65ms);
}

/* Шапка: тень, когда страница уехала вниз */
.site-header { transition: box-shadow 0.25s ease; }
.site-header.is-scrolled { box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22); }
html[data-theme="light"] .site-header.is-scrolled { box-shadow: 0 8px 26px rgba(40, 34, 24, 0.10); }

/* Карточки и строки прайса: мягкий отклик на курсор */
.adv-card,
.price-card,
.article-card { transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s ease, border-color 0.18s ease; }

.adv-card:hover,
.price-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18); }

.article-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18); }

html[data-theme="light"] .adv-card:hover,
html[data-theme="light"] .price-card:hover,
html[data-theme="light"] .article-card:hover { box-shadow: 0 14px 30px rgba(40, 34, 24, 0.10); }

.price-table tr { transition: background-color 0.16s ease; }
.price-table tr:hover { background: rgba(255, 255, 255, 0.04); }
html[data-theme="light"] .price-table tr:hover { background: rgba(0, 0, 0, 0.035); }

/* Шестерёнка в логотипе проворачивается */
.logo:hover .logo-mark {
  transform: rotate(72deg);
  filter: drop-shadow(0 2px 8px rgba(var(--neon-rgb), 0.35));
}

.site-nav a { transition: color 0.18s ease, border-color 0.18s ease; }

/* Вкладки «Нормис / Маргинал»: панель не прыгает, а проявляется */
html.motion #style-obyvatel:checked ~ .style-panels .panel-obyvatel,
html.motion #style-marginal:checked ~ .style-panels .panel-marginal {
  animation: panel-in 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes logo-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html.motion .reveal,
  html.motion .reveal.is-in { opacity: 1; transform: none; transition: none; }

  html.motion .hero-kicker,
  html.motion .hero-title,
  html.motion .hero-sub,
  html.motion .hero-actions,
  html.motion .hero-logo,
  html.motion #style-obyvatel:checked ~ .style-panels .panel-obyvatel,
  html.motion #style-marginal:checked ~ .style-panels .panel-marginal { animation: none; }

  .adv-card:hover,
  .price-card:hover,
  .article-card:hover { transform: none; }
}

/* ---------- Киберпанк: неон, сетка, сканлайны ---------- */

body {
  background-image:
    radial-gradient(1200px 620px at 50% -10%, rgba(var(--accent-rgb), 0.06), transparent 60%),
    radial-gradient(900px 520px at 100% 100%, rgba(var(--neon-rgb), 0.05), transparent 60%);
  background-attachment: fixed;
}

::selection { background: rgba(var(--neon-rgb), 0.35); color: #fff; }

/* тонкая неоновая линия под шапкой и над подвалом */
.site-header { border-bottom: 1px solid rgba(var(--neon-rgb), 0.25); }
.site-footer { border-top: 1px solid rgba(var(--accent-rgb), 0.22); }

/* заголовки светятся */
.hero-title {
  text-shadow: 0 0 28px rgba(var(--accent-rgb), 0.35), 0 0 2px rgba(255, 255, 255, 0.25);
}

.hero-title span {
  color: var(--red-bright);
  text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.55);
}

.section-head h2 { text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.3); }

/* герой: сетка и сканлайны */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(var(--neon-rgb), 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--neon-rgb), 0.07) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  mask-image: radial-gradient(75% 85% at 50% 40%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(75% 85% at 50% 40%, #000 35%, transparent 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0 1px,
    transparent 1px 4px
  );
  opacity: 0.55;
}

/* логотип в неоновом ореоле */
.hero-logo img {
  filter: drop-shadow(0 0 26px rgba(var(--neon-rgb), 0.35)) drop-shadow(0 18px 40px rgba(0, 0, 0, 0.5));
}

/* кнопки: неоновая рамка и свечение */
.btn { border: 1px solid transparent; }

.btn-primary {
  background: linear-gradient(120deg, var(--red-bright), var(--red));
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.4), 0 8px 28px rgba(var(--accent-rgb), 0.28);
}

.btn-primary:hover {
  background: linear-gradient(120deg, var(--red), var(--red-bright));
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.7), 0 10px 34px rgba(var(--accent-rgb), 0.45);
}

.btn-ghost {
  border-color: rgba(var(--neon-rgb), 0.55);
  color: var(--teal);
  box-shadow: inset 0 0 18px rgba(var(--neon-rgb), 0.08);
}

.btn-ghost:hover {
  background: rgba(var(--neon-rgb), 0.1);
  border-color: var(--teal);
  box-shadow: 0 0 22px rgba(var(--neon-rgb), 0.25), inset 0 0 18px rgba(var(--neon-rgb), 0.12);
}

/* карточки: тонкий неон по рамке */
.price-card,
.article-card,
.adv-card {
  border-color: var(--card-border);
  box-shadow: 0 0 0 1px rgba(var(--neon-rgb), 0.04);
}

.price-card:hover,
.article-card:hover,
.adv-card:hover {
  border-color: rgba(var(--neon-rgb), 0.45);
  box-shadow: 0 0 26px rgba(var(--neon-rgb), 0.12), 0 14px 30px rgba(0, 0, 0, 0.35);
}

/* цена в прайсе — терминальная подсветка */
.price-table tr:hover .price-value { text-shadow: 0 0 14px rgba(var(--gold-rgb), 0.55); }

/* статья: тёмная панель с неоновым краем */
.paper {
  border: 1px solid var(--paper-border);
  box-shadow: var(--paper-shadow);
}

.paper-title { letter-spacing: -0.01em; }

/* ссылки */
a { text-shadow: none; }
.article-source a:hover { text-shadow: 0 0 12px rgba(var(--neon-rgb), 0.4); }

/* вкладки стиля: активная — циан */
#style-obyvatel:checked ~ .style-labels label[for="style-obyvatel"],
#style-marginal:checked ~ .style-labels label[for="style-marginal"] {
  color: var(--teal);
  border-bottom-color: var(--teal);
  text-shadow: 0 0 16px rgba(var(--neon-rgb), 0.45);
}

/* скроллбар */
html { scrollbar-color: rgba(var(--neon-rgb), 0.4) transparent; }

/* Планшеты: шапка в одну строку */
@media (min-width: 721px) and (max-width: 1360px) {
  .site-header { gap: 16px; padding: 12px clamp(16px, 3vw, 32px); }
  .logo-text { font-size: 13px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 12px; letter-spacing: 0.05em; }
  .theme-toggle { padding: 0 12px; font-size: 10px; }
}

html.motion .hero-title {
  animation: rise-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
}

/* Неон: мем-карточка откликается, линия шапки «дышит» */

.meme img {
  transition: box-shadow 0.25s ease, filter 0.25s ease;
  border-radius: 2px;
}

.meme:hover img {
  box-shadow: 0 0 0 2px rgba(var(--neon-rgb), 0.6), 0 0 46px rgba(var(--neon-rgb), 0.28);
  filter: grayscale(0) contrast(1.16) saturate(1.02) brightness(1.02);
}

.meme--text:hover figcaption {
  box-shadow: 0 0 0 1px rgba(var(--neon-rgb), 0.35), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(var(--neon-rgb), 0.75) 30%,
    rgba(var(--accent-rgb), 0.75) 70%,
    transparent 100%);
  opacity: 0.45;
}

@media (prefers-reduced-motion: no-preference) {
  .site-header::after { animation: neon-breathe 6s ease-in-out infinite; }
}

@keyframes neon-breathe {
  0%, 100% { opacity: 0.32; }
  50% { opacity: 0.85; }
}

/* ---------- Новости ---------- */

.news-block {
  padding: clamp(40px, 8vw, 80px) 0;
  border-top: 1px solid var(--border);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.news-card {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--neon-rgb), 0.45);
  box-shadow: 0 0 26px rgba(var(--neon-rgb), 0.12), 0 14px 30px rgba(0, 0, 0, 0.35);
}

.news-card h3 {
  margin: 8px 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--card-title);
}

.news-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--card-muted);
}

.news-more {
  max-width: 1200px;
  margin: 22px auto 0;
  padding: 0 clamp(16px, 4vw, 48px);
}

.news-more a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.news-empty {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
  color: var(--text-muted);
}

/* Сканлайны поверх фона — только ночью, еле заметно */
html[data-theme="dark"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0 1px,
    transparent 1px 4px
  );
  mix-blend-mode: overlay;
}

/* Карточки: неоновая линия сверху при наведении */
.article-card,
.news-card { position: relative; overflow: hidden; }

.article-card::after,
.news-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--red-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.article-card:hover::after,
.news-card:hover::after { transform: scaleX(1); }

/* ---------- Вход, регистрация, кабинет ---------- */

.auth {
  padding: clamp(40px, 8vw, 90px) clamp(16px, 4vw, 48px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(520px, 100%);
  background: var(--paper-bg);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius);
  box-shadow: var(--paper-shadow);
  padding: clamp(22px, 4vw, 40px);
}

.auth-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.02em;
  color: var(--paper-title);
}

.auth-lead { margin: 0 0 22px; color: var(--paper-muted); font-size: 15px; }

.auth-error {
  margin: 0 0 18px;
  padding: 10px 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.1);
  border-radius: 6px;
  color: var(--red-bright);
  font-size: 14px;
}

.auth-form { display: grid; gap: 14px; }

.auth-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--paper-muted);
}

.auth-field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--paper-border);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--paper-title);
  font-family: var(--font-body);
  font-size: 15px;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(var(--neon-rgb), 0.18);
}

.auth-field small { color: var(--paper-muted); font-size: 12px; opacity: 0.8; }

.auth-submit { width: 100%; margin-top: 4px; }

.auth-alt { margin: 18px 0 0; font-size: 14px; color: var(--paper-muted); text-align: center; }

.account-list { margin: 0 0 22px; display: grid; gap: 10px; }

.account-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--paper-border);
}

.account-list dt { color: var(--paper-muted); font-size: 13px; }
.account-list dd { margin: 0; color: var(--paper-title); font-family: var(--font-mono); font-size: 14px; }

.auth-ok {
  margin: 0 0 18px;
  padding: 10px 14px;
  border: 1px solid rgba(var(--neon-rgb), 0.4);
  background: rgba(var(--neon-rgb), 0.08);
  border-radius: 6px;
  color: var(--teal);
  font-size: 14px;
}

.auth-notice {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px dashed var(--paper-border);
  border-radius: 6px;
  color: var(--paper-muted);
  font-size: 14px;
}

.auth-notice p { margin: 0 0 10px; }
.auth-notice form { margin: 0; }

.account-muted { color: var(--paper-muted); font-size: 12px; }

.auth-vk { margin-top: 12px; }

.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--paper-muted);
  line-height: 1.5;
}

.consent-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal); }
.consent-row a { color: var(--teal); }

.account-danger {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px dashed var(--paper-border);
  color: var(--paper-muted);
  font-size: 14px;
}

.account-danger summary { cursor: pointer; color: var(--red-bright); }
.account-danger p { margin: 10px 0; }
.account-delete-btn { border-color: rgba(var(--accent-rgb), 0.55); color: var(--red-bright); }

.policy-operator {
  margin: 0 0 26px;
  padding: 16px 18px;
  border: 1px solid var(--paper-border);
  border-radius: 6px;
  background: var(--bg-soft);
  display: grid;
  gap: 8px;
}

.policy-operator div { display: flex; justify-content: space-between; gap: 16px; }
.policy-operator dt { color: var(--paper-muted); font-size: 13px; }
.policy-operator dd { margin: 0; color: var(--paper-title); font-family: var(--font-mono); font-size: 13px; text-align: right; }

/* ---------- Форум и комментарии ---------- */

.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.forum-sections { display: grid; gap: 14px; }

.forum-section {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--paper-border);
  border-radius: 6px;
  background: var(--card-bg);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.forum-section:hover {
  border-color: rgba(var(--neon-rgb), 0.45);
  box-shadow: 0 0 26px rgba(var(--neon-rgb), 0.10);
}

.forum-section h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  color: var(--paper-title);
}

.forum-section p { margin: 0; color: var(--card-muted); font-size: 14px; }

.forum-section-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-muted);
  white-space: nowrap;
}

.forum-last { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

.forum-topics { display: grid; gap: 10px; }

.forum-topic {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--paper-border);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease;
}

.forum-topic:hover { border-color: rgba(var(--neon-rgb), 0.4); }

.forum-topic h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
  color: var(--paper-title);
}

.forum-topic p { margin: 0; font-size: 13px; color: var(--card-muted); }

.forum-topic-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-muted);
  white-space: nowrap;
}

.forum-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 3px;
  background: rgba(var(--neon-rgb), 0.12);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

.forum-badge--sold { background: rgba(var(--accent-rgb), 0.14); color: var(--red-bright); }

.forum-author { color: var(--paper-muted); font-size: 13px; margin: 0 0 14px; }

.forum-price {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--ochre);
  margin: 0 0 14px;
}

.forum-posts { display: grid; gap: 12px; margin: 24px 0; }

.forum-post {
  padding: 14px 16px;
  border: 1px solid var(--paper-border);
  border-left: 3px solid rgba(var(--neon-rgb), 0.5);
  border-radius: 4px;
  background: var(--bg-soft);
}

.forum-post header,
.news-comment header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--paper-muted);
  font-family: var(--font-mono);
}

.forum-reply, .forum-new { display: grid; gap: 12px; margin-top: 20px; }

.forum-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.forum-actions .admin-btn { border: 0; }

.news-comments { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--paper-border); }
.news-comments-title { font-size: clamp(20px, 2.6vw, 26px); }
.news-comment { margin-bottom: 14px; padding: 12px 14px; border-left: 3px solid var(--paper-border); }
.news-comment .link-danger { background: none; border: 0; color: var(--red-bright); cursor: pointer; font-size: 12px; }

/* Формы форума, комментариев и загрузки — в общем стиле */
.auth-field textarea,
.forum-new textarea,
.forum-reply textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--paper-border);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--paper-title);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
}

.auth-field textarea:focus,
.forum-new textarea:focus,
.forum-reply textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(var(--neon-rgb), 0.18);
}

.auth-field input[type="file"],
.forum-new input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed var(--paper-border);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--paper-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}

.auth-field input[type="file"]::file-selector-button,
.forum-new input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(var(--neon-rgb), 0.5);
  border-radius: 4px;
  background: transparent;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.forum-new input[type="url"] {
  margin-top: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--paper-border);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--paper-title);
  font-family: var(--font-body);
  font-size: 14px;
}

/* Пагинация */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--paper-border);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--paper-muted);
}

.page-link {
  padding: 8px 14px;
  border: 1px solid var(--paper-border);
  border-radius: 999px;
  color: var(--teal);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-link:hover { border-color: var(--teal); box-shadow: 0 0 16px rgba(var(--neon-rgb), 0.18); }

/* Светлая тема: свечение мягче, иначе на белом получается ореол */
html[data-theme="light"] .hero-title {
  text-shadow: 0 0 16px rgba(var(--accent-rgb), 0.14), 0 0 1px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .hero-title span {
  text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.22);
}

html[data-theme="light"] .section-head h2 { text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.14); }

html[data-theme="light"] .btn-primary {
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.3), 0 6px 18px rgba(var(--accent-rgb), 0.18);
}

/* ---------- Ещё динамики ---------- */

/* Бегущая строка под героем */
.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 10px 0;
}

.ticker-track {
  display: flex;
  gap: 28px;
  width: max-content;
  will-change: transform;
}

.ticker span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ticker span em { color: var(--teal); font-style: normal; }

@media (prefers-reduced-motion: no-preference) {
  .ticker-track { animation: ticker 38s linear infinite; }
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Полоса прочтения статьи */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, var(--teal), var(--red-bright));
  box-shadow: 0 0 12px rgba(var(--neon-rgb), 0.5);
  transition: width 0.08s linear;
}

/* Логотип в герое парит */
@media (prefers-reduced-motion: no-preference) {
  html.motion .hero-logo img { animation: float 7s ease-in-out infinite; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Подчёркивание в меню растёт */
.site-nav a { position: relative; border-bottom-color: transparent !important; }

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav a:hover::after { transform: scaleX(1); }

/* Блик по кнопке */
.btn { position: relative; overflow: hidden; }

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  transition: left 0.45s ease;
  pointer-events: none;
}

.btn:hover::after { left: 120%; }

/* Мем чуть крупнее под курсором */
.meme img { transition: box-shadow 0.25s ease, filter 0.25s ease, transform 0.35s ease; }
.meme:hover img { transform: scale(1.01); }

/* Карточки разделов форума — тоже дышат */
.forum-section { transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.2s ease; }
.forum-section:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.ticker:hover .ticker-track { animation-play-state: paused; }

/* Логотип: клик — и конь скачет */
.hero-logo {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 12px;
}

.hero-logo:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 6px;
}

.hero-logo.is-galloping picture {
  display: block;
  animation: gallop 1s cubic-bezier(0.3, 0.7, 0.3, 1);
}

@keyframes gallop {
  0%   { transform: translateY(0) rotate(0); }
  14%  { transform: translateY(-16px) rotate(-3.5deg); }
  28%  { transform: translateY(0) rotate(2.5deg); }
  42%  { transform: translateY(-11px) rotate(-2.5deg); }
  56%  { transform: translateY(0) rotate(2deg); }
  70%  { transform: translateY(-6px) rotate(-1.5deg); }
  85%  { transform: translateY(0) rotate(1deg); }
  100% { transform: translateY(0) rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo.is-galloping picture { animation: none; }
}

/* Заглушка карты: внешний запрос — только по клику */
.map-placeholder {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  width: 100%;
  min-height: 300px;
  padding: 28px;
  border: 1px solid var(--paper-border);
  border-radius: 4px;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(var(--neon-rgb), 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--neon-rgb), 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--paper-title);
  font-family: var(--font-body);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.map-placeholder:hover {
  border-color: var(--teal);
  box-shadow: 0 0 24px rgba(var(--neon-rgb), 0.18);
}

.map-pin { font-size: 30px; color: var(--red-bright); }
.map-title { font-family: var(--font-display); font-size: 18px; }
.map-note { font-family: var(--font-mono); font-size: 11px; color: var(--paper-muted); max-width: 320px; letter-spacing: 0.04em; }

.map-action {
  margin-top: 6px;
  padding: 8px 16px;
  border: 1px solid var(--teal);
  border-radius: 999px;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contacts-map iframe { width: 100%; min-height: 300px; border: 0; border-radius: 4px; }

/* Пометка о данных в формах */
.auth-privacy {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--paper-muted);
  letter-spacing: 0.03em;
}

.auth-privacy a { color: var(--teal); }

.footer-no-trackers {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

/* picture по умолчанию inline — transform на нём не работает */
.hero-logo picture { display: block; }

/* Сообщество: рекламные плитки форума и барахолки */
.community { padding: 64px 24px; max-width: 1180px; margin: 0 auto; }

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 18px;
}

.community-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 26px 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.community-tile:hover {
  border-color: var(--teal);
  box-shadow: 0 0 28px rgba(var(--neon-rgb), 0.16);
  transform: translateY(-3px);
}

.community-tag {
  align-self: flex-start;
  padding: 4px 10px;
  border: 1px solid rgba(var(--neon-rgb), 0.5);
  border-radius: 999px;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.community-tile h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
}

.community-tile p { margin: 0; color: var(--text-muted); line-height: 1.55; }

.community-link {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red-bright);
}

.community-tile:hover .community-link { text-decoration: underline; }

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

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

/* Металлические кнопки: вторичное действие в стиле шестерёнки */
.btn-metal,
.map-metal {
  border: 1px solid #47515c;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.10) 0 1px, rgba(0, 0, 0, 0.05) 1px 2px),
    linear-gradient(180deg, #f2f7fb 0%, #ccd6e0 36%, #97a4b2 66%, #6b7683 100%);
  color: #1d242b;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -2px 4px rgba(0, 0, 0, 0.32),
    0 2px 6px rgba(0, 0, 0, 0.38);
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-metal::after { display: none; }

.btn-metal:hover,
.map-metal:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.42);
}

.btn-metal:active {
  transform: translateY(0);
  filter: brightness(0.96);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.5),
    0 1px 3px rgba(0, 0, 0, 0.35);
}

.map-placeholder:hover .map-metal { filter: brightness(1.08); }

.btn-metal:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* Тот же «логотипный» шрифт в заголовках: название, секции, статьи, подвал */
.hero-title,
.section-head h2,
.paper-title,
.footer-col strong {
  font-family: "Ruslan Display", var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
}

.hero-title { font-size: clamp(38px, 6.8vw, 96px); line-height: 1.02; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 42px); }
.paper-title { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.15; }
.footer-col strong { font-size: 17px; letter-spacing: 0.02em; }

/* Заголовки «логотипным» шрифтом — стальные */
.hero-title,
.section-head h2,
.paper-title,
.footer-col strong {
  background-image: linear-gradient(180deg, #f6fafd 0%, #d3dde6 34%, #98a5b3 64%, #5e6975 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero-title span {
  color: transparent;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .hero-title,
html[data-theme="light"] .section-head h2,
html[data-theme="light"] .paper-title,
html[data-theme="light"] .footer-col strong {
  background-image: linear-gradient(180deg, #7d8996 0%, #5f6a76 38%, #414a54 70%, #262c33 100%);
}

/* Стальные заголовки без розового ореола */
.hero-title,
.section-head h2,
.paper-title,
.footer-col strong {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .hero-title,
html[data-theme="light"] .section-head h2,
html[data-theme="light"] .paper-title,
html[data-theme="light"] .footer-col strong {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 6px rgba(0, 0, 0, 0.12);
}

.hero-title span { text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }

html[data-theme="light"] .hero-title span {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Неоновая бирюзовая кнопка в духе логотипа */
.btn.btn-neon {
  background: linear-gradient(120deg, #2ef0c4 0%, #00e5ff 55%, #00b8d4 100%);
  color: #04121a;
  text-shadow: none;
  box-shadow:
    0 0 0 1px rgba(var(--neon-rgb), 0.55),
    0 8px 26px rgba(var(--neon-rgb), 0.35),
    0 0 46px rgba(var(--neon-rgb), 0.22);
}

.btn.btn-neon:hover {
  background: linear-gradient(120deg, #49f8d2 0%, #29ecff 55%, #12c8e0 100%);
  color: #04121a;
  filter: brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(var(--neon-rgb), 0.8),
    0 10px 34px rgba(var(--neon-rgb), 0.45),
    0 0 60px rgba(var(--neon-rgb), 0.35);
}

html[data-theme="light"] .btn.btn-neon {
  box-shadow:
    0 0 0 1px rgba(var(--neon-rgb), 0.5),
    0 6px 18px rgba(var(--neon-rgb), 0.28),
    0 0 28px rgba(var(--neon-rgb), 0.16);
}

/* Вторая строка героя — тот же стальной градиент, а не «пустая» заливка */
.hero-title span {
  background-image: linear-gradient(180deg, #f6fafd 0%, #d3dde6 34%, #98a5b3 64%, #5e6975 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

html[data-theme="light"] .hero-title span {
  background-image: linear-gradient(180deg, #7d8996 0%, #5f6a76 38%, #414a54 70%, #262c33 100%);
}


html { overflow-x: clip; }

/* Фуксиевый неон ВОКРУГ букв: drop-shadow рисуется под текстом,
   поэтому стальная заливка остаётся стальной */
.hero-title,
.section-head h2,
.paper-title,
.footer-col strong {
  text-shadow: none;
  filter:
    drop-shadow(0 0 2px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 6px rgba(255, 255, 255, 0.5))
    drop-shadow(0 0 18px rgba(255, 255, 255, 0.16));
}

html[data-theme="light"] .hero-title,
html[data-theme="light"] .section-head h2,
html[data-theme="light"] .paper-title,
html[data-theme="light"] .footer-col strong {
  filter:
    drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.38))
    drop-shadow(0 0 22px rgba(var(--accent-rgb), 0.18));
}

/* Полоса неона позади заголовка — та же фуксия */
.hero-title,
.section-head h2,
.paper-title {
  position: relative;
  isolation: isolate;
}

.hero-title::before,
.section-head h2::before,
.paper-title::before {
  content: "";
  position: absolute;
  inset: -30% -6%;
  z-index: -1;
  background: radial-gradient(50% 100% at 50% 50%, rgba(var(--neon-rgb), 0.45), rgba(var(--neon-rgb), 0.12) 60%, transparent 78%);
  filter: blur(22px);
  opacity: 0.55;
  pointer-events: none;
}

.hero-title::before { inset: -45% -8%; opacity: 0.5; }

/* Светлая тема: подсветку убираем совсем */
html[data-theme="light"] .hero-title::before,
html[data-theme="light"] .section-head h2::before,
html[data-theme="light"] .paper-title::before {
  display: none;
}

html[data-theme="light"] .hero-title,
html[data-theme="light"] .section-head h2,
html[data-theme="light"] .paper-title,
html[data-theme="light"] .footer-col strong {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
}

/* Полоса с блюром не должна давать горизонтальный скролл */
.hero,
.section-head,
.paper {
  overflow: hidden;
}

/* Единая сетка: один контейнер и один отступ у всех секций */
:root {
  --container: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
}

/* Полноширинные секции — выравниваем содержимое по контейнеру */
.site-header,
.hero,
.site-footer {
  padding-left: max(var(--gutter), calc((100% - var(--container)) / 2));
  padding-right: max(var(--gutter), calc((100% - var(--container)) / 2));
}

/* Секции с собственной шириной — все в один контейнер */
.advantages,
.community,
.services,
.contacts,
.news,
.archive,
.shop {
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  box-sizing: border-box;
}

/* Внутренние сетки больше не дублируют поля и ширину */
.hero-grid,
.services-grid,
.contacts-row,
.community-grid,
.news-grid,
.section-head {
  max-width: none;
  padding-inline: 0;
  margin-inline: 0;
}

/* Единый вертикальный ритм секций */
.advantages,
.community,
.services,
.contacts,
.news,
.archive,
.shop {
  padding-block: clamp(48px, 8vw, 96px);
}
