/* ─── НЕЙРОЛЕНТА ─────────────────────────────────────────────────────── */

:root {
  --bg: #0a0c10;
  --bg-soft: #0e1217;
  --panel: #12171d;
  --panel-2: #171d25;
  --ink: #eef3f7;
  --ink-soft: #c6d1db;
  --muted: #8b9aa7;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #c9f75a;
  --accent-ink: #0a0c10;
  --accent-soft: rgba(201, 247, 90, 0.12);
  --danger: #ff7b7b;
  --ok: #63e6a8;
  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --wrap: 1180px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f5f0;
    --bg-soft: #efeee8;
    --panel: #ffffff;
    --panel-2: #f2f1eb;
    --ink: #11161a;
    --ink-soft: #2c343a;
    --muted: #5e6a72;
    --line: rgba(12, 18, 22, 0.12);
    --line-strong: rgba(12, 18, 22, 0.24);
    --accent: #356b1f;
    --accent-ink: #ffffff;
    --accent-soft: rgba(53, 107, 31, 0.1);
    --danger: #b42323;
    --ok: #16794c;
    --shadow: 0 20px 50px -30px rgba(20, 30, 40, 0.35);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(201, 247, 90, 0.07), transparent 60%),
    radial-gradient(700px 400px at 0% 0%, rgba(90, 160, 255, 0.06), transparent 55%);
  pointer-events: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

button,
input {
  font: inherit;
  color: inherit;
}

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

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

.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.nowrap {
  white-space: nowrap;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.12em 0.38em;
}

/* ─── шапка ──────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 76px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--serif);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.brand-tagline {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
}

.main-nav a {
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}

.main-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(300px, 32vw);
}

.search input {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 13.5px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search input::placeholder {
  color: var(--muted);
}

.search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel-2);
}

.search button {
  position: absolute;
  right: 4px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.search button:hover {
  color: var(--accent);
}

.cat-bar {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.cat-bar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-block: 9px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-bar-inner::-webkit-scrollbar {
  display: none;
}

.cat-bar-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 6px;
  flex-shrink: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
  color: var(--ink-soft);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chip--solid:hover {
  color: var(--accent-ink);
  background: var(--accent);
  opacity: 0.9;
}

.chip--cat {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 2px 8px;
}

.chip--demo {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-style: dashed;
  padding: 2px 7px;
}

/* ─── главная ────────────────────────────────────────────────────────── */

.main {
  padding-block: 34px 70px;
  min-height: 55vh;
}

.lead-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
  gap: 28px;
  margin-bottom: 44px;
}

.hero {
  position: relative;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-link {
  display: block;
  position: relative;
  min-height: 420px;
}

.hero-media {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(6, 9, 12, 0.96) 0%, rgba(6, 9, 12, 0.55) 45%, rgba(6, 9, 12, 0.08) 100%),
    linear-gradient(to right, rgba(6, 9, 12, 0.55), transparent 60%);
}

.hero-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px;
  color: #f3f7fa;
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.meta--on-image {
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
}

.meta--on-image .chip--solid,
.meta--on-image .chip {
  text-transform: uppercase;
}

.dot {
  opacity: 0.5;
}

.hero-title {
  font-size: clamp(28px, 3.1vw, 46px);
  line-height: 1.08;
  max-width: 20ch;
  text-wrap: balance;
}

.hero-lead {
  margin: 14px 0 18px;
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.5;
}

.hero-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-link:hover .hero-more {
  gap: 14px;
}

.hero-media--ph {
  position: absolute;
  inset: 0;
}

.lead-side {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 22px;
  box-shadow: var(--shadow);
}

.side-title {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 14px;
}

.side-title--top {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.side-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.side-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.side-item-cat {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.side-item-title {
  font-family: var(--serif);
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}

.side-item-time {
  font-size: 11.5px;
  color: var(--muted);
}

.side-item:hover .side-item-title {
  color: var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 44px;
  align-items: start;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-size: 26px;
}

.section-head .muted {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px 24px;
}

.grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  min-width: 0;
}

.card-link {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.card .thumb {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-2);
  transition: border-color 0.2s ease, transform 0.25s ease;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card-link:hover .thumb {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-3px);
}

.card-link:hover .thumb img {
  transform: scale(1.035);
}

.card-body {
  padding-top: 14px;
}

.card-title {
  font-size: 20px;
  line-height: 1.24;
  margin-bottom: 7px;
  text-wrap: pretty;
}

.card-link:hover .card-title {
  color: var(--accent);
}

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

.thumb--ph {
  position: relative;
  display: grid;
  place-items: end start;
  padding: 16px;
  background: linear-gradient(140deg, #1b2430, #10161c 60%);
  overflow: hidden;
}

.thumb--ph::after {
  content: "Н";
  position: absolute;
  right: -6px;
  top: -28px;
  font-family: var(--serif);
  font-size: 140px;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.045);
  pointer-events: none;
}

.thumb--ph span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  position: relative;
  z-index: 1;
}

.thumb--ph[data-category="ИИ"] {
  background: linear-gradient(140deg, #26331a, #121a10 65%);
}

.thumb--ph[data-category="Гаджеты"] {
  background: linear-gradient(140deg, #132b30, #0d1518 65%);
}

.thumb--ph[data-category="Софт"] {
  background: linear-gradient(140deg, #1a2238, #0e1118 65%);
}

.thumb--ph[data-category="Наука"] {
  background: linear-gradient(140deg, #2a1f3c, #130f1a 65%);
}

.thumb--ph[data-category="Безопасность"] {
  background: linear-gradient(140deg, #341a1c, #170c0d 65%);
}

.thumb--ph[data-category="Бизнес"] {
  background: linear-gradient(140deg, #332b14, #17130a 65%);
}

/* ─── сайдбар ────────────────────────────────────────────────────────── */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: sticky;
  top: 132px;
}

.side-block {
  border-top: 1px solid var(--line-strong);
  padding-top: 18px;
}

.cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cat-list li + li {
  border-top: 1px solid var(--line);
}

.cat-list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  font-size: 14px;
}

.cat-list .count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.cat-list a:hover .count {
  color: var(--accent);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.tag span {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.side-block p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}

.text-link {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

/* ─── кнопки, плашки ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:hover {
  color: var(--accent-ink);
  transform: translateY(-1px);
  opacity: 0.92;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn--sm {
  padding: 7px 14px;
  font-size: 12.5px;
}

.link-danger {
  background: none;
  border: 0;
  padding: 0;
  color: var(--danger);
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.link-danger:hover {
  text-decoration-color: currentColor;
}

.notice {
  padding: 14px 18px;
  margin-bottom: 26px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.notice a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.notice--inline {
  margin: 26px 0;
}

.notice--error {
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

/* ─── статья ─────────────────────────────────────────────────────────── */

.article {
  max-width: 760px;
  margin-inline: auto;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.article-head {
  margin-bottom: 26px;
}

.article-title {
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.06;
  margin: 14px 0 16px;
  text-wrap: balance;
}

.article-lead {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
  max-width: 62ch;
}

.article-figure {
  margin: 30px 0 34px;
}

.article-figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--panel-2);
}

.article-figure figcaption {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 10px;
}

.article-body {
  font-size: 18.5px;
  line-height: 1.68;
  color: var(--ink-soft);
}

.article-body p {
  margin: 0 0 1.35em;
}

.article-body > p:first-child::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.6em;
  font-weight: 800;
  line-height: 0.82;
  color: var(--accent);
  padding: 6px 10px 0 0;
}

.article-body h2 {
  font-size: 27px;
  color: var(--ink);
  margin: 1.9em 0 0.6em;
  letter-spacing: -0.01em;
}

.article-body strong {
  color: var(--ink);
  font-weight: 650;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.source-box {
  margin: 40px 0 30px;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.source-box-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.source-box-link {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}

.source-box-link:hover {
  color: var(--accent);
}

.source-box-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.source-box-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.article-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.share {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.share-label {
  opacity: 0.7;
}

.share-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}

.share-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.related {
  max-width: var(--wrap);
  margin: 60px auto 0;
}

.back-link {
  max-width: 760px;
  margin: 40px auto 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.back-link a {
  color: var(--muted);
}

.back-link a:hover {
  color: var(--accent);
}

/* ─── страницы ───────────────────────────────────────────────────────── */

.page,
.page-head {
  max-width: 760px;
  margin-inline: auto;
}

.page-head {
  margin-bottom: 30px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.page-head h1,
.page h1 {
  font-size: clamp(30px, 4vw, 44px);
  margin-bottom: 12px;
}

.page h2 {
  font-size: 24px;
  margin: 40px 0 12px;
}

.page p,
.page li {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.page-lead {
  font-size: 20px !important;
  color: var(--ink) !important;
}

.page code {
  font-size: 0.82em;
}

.page-head .muted {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.pager-btn {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.pager-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pager-btn--disabled {
  opacity: 0.35;
}

.pager-nums {
  display: flex;
  gap: 4px;
}

.pager-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.pager-num:hover {
  color: var(--accent);
}

.pager-num.is-current {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 16px 0 10px;
}

.source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13.5px;
  background: var(--panel);
}

.source-item:hover {
  border-color: var(--accent);
}

.source-item-lang {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.empty-state {
  max-width: 620px;
  margin: 60px auto;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 54px 34px;
}

.empty-state h1 {
  font-size: clamp(30px, 4vw, 42px);
  margin-bottom: 14px;
}

.empty-state p {
  color: var(--muted);
  margin-bottom: 22px;
}

.empty-state code {
  color: var(--ink-soft);
}

/* ─── поиск ──────────────────────────────────────────────────────────── */

.search--page {
  width: 100%;
  max-width: 620px;
  margin-bottom: 34px;
}

.search--page input {
  padding: 14px 130px 14px 18px;
  border-radius: 12px;
  font-size: 15px;
}

.search--page button {
  right: 6px;
  width: auto;
  height: auto;
  padding: 9px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 13.5px;
}

.search--page button:hover {
  color: var(--accent-ink);
}

/* ─── админка ────────────────────────────────────────────────────────── */

.admin {
  max-width: 1080px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 26px;
}

.admin-head h1 {
  font-size: 38px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  min-width: 0;
}

.panel h2 {
  font-size: 20px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0 0 18px;
  font-size: 13px;
}

.kv dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 3px;
}

.kv dd {
  margin: 0;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.plain {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.plain li {
  margin-bottom: 6px;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 -6px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

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

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

.table a {
  color: var(--ink-soft);
}

.table a:hover {
  color: var(--accent);
}

.status {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.status--ok {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
}

.status--err {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
}

.log {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.admin-login {
  max-width: 420px;
  margin: 40px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 34px;
}

.admin-login h1 {
  font-size: 30px;
  margin-bottom: 22px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stack label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.stack input {
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.stack input:focus {
  outline: none;
  border-color: var(--accent);
}

.stack .btn {
  margin-top: 6px;
}

details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

details summary:hover {
  color: var(--accent);
}

/* ─── подвал ─────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 44px 0 40px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.5fr) minmax(160px, 0.6fr);
  gap: 34px;
  align-items: start;
}

.brand--footer {
  margin-bottom: 14px;
}

.footer-note {
  max-width: 46ch;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.footer-grid nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.footer-grid nav a:hover {
  color: var(--accent);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── адаптив ────────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .lead-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .lead-side {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 26px;
  }

  .lead-side .side-title {
    width: 100%;
  }

  .side-item {
    flex: 1 1 240px;
    border-bottom: 0;
    padding: 8px 0;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .header-row {
    flex-wrap: wrap;
    gap: 12px 18px;
    padding-block: 14px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    gap: 18px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    font-size: 13px;
  }

  .search {
    order: 2;
    flex: 1;
    width: auto;
    min-width: 180px;
  }

  .brand-copy .brand-tagline {
    display: none;
  }

  .cat-bar {
    display: none;
  }

  .hero-link {
    min-height: 360px;
  }

  .hero-body {
    padding: 24px;
  }

  .hero-title {
    max-width: none;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .article-body {
    font-size: 17.5px;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 28px);
  }

  .main {
    padding-block: 22px 50px;
  }

  .lead-layout {
    gap: 18px;
    margin-bottom: 32px;
  }

  .hero-link {
    min-height: 340px;
  }

  .hero-title {
    font-size: 27px;
  }

  .hero-lead {
    display: none;
  }

  .hero-body {
    padding: 20px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .grid--three {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .article-title {
    font-size: 30px;
  }

  .article-lead {
    font-size: 17px;
  }

  .article-body {
    font-size: 17px;
  }

  .article-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .pager {
    flex-wrap: wrap;
    justify-content: center;
  }

  .pager-nums {
    order: -1;
    width: 100%;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .admin-head h1 {
    font-size: 30px;
  }

  .admin-login {
    padding: 24px;
  }

  .article-body > p:first-child::first-letter {
    float: none;
    font-size: 1em;
    color: inherit;
    padding: 0;
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .share,
  .related,
  .back-link,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .article,
  .article-body {
    max-width: none;
  }
}

.chip--demo-on-image {
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.35);
}
