/* ТехноСводка — стили сайта. Тёмная тема по умолчанию, светлая — по настройке системы. */
:root {
  --bg: #0b1020;
  --bg-2: #111831;
  --surface: #141c36;
  --line: #222c4a;
  --text: #f2f4f8;
  --muted: #9aa4b8;
  --accent: #4f8cff;
  --accent-2: #6fa3ff;
  --live: #ffd84d;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fb;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --line: #e2e6ef;
    --text: #121826;
    --muted: #5f6b80;
    --accent: #2f6bff;
    --accent-2: #2f6bff;
    --shadow: 0 8px 24px rgba(18, 24, 38, .08);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 5vw, 48px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 19px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 24px; }

/* шапка */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 21px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 9px; }
.brand--small { font-size: 17px; margin-bottom: 6px; }
.wordmark span { color: var(--accent-2); }
.nav { display: flex; align-items: center; gap: 20px; font-size: 15px; flex-wrap: wrap; }
.nav a { color: var(--text); }
.nav-cta { background: var(--accent); color: #fff !important; padding: 7px 14px; border-radius: 999px; font-weight: 600; }
.nav-cta:hover { text-decoration: none; filter: brightness(1.1); }

/* «живая» точка */
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; flex-wrap: wrap; }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 216, 77, .6);
  animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(255, 216, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 216, 77, 0); } }
@media (prefers-reduced-motion: reduce) { .live { animation: none; } html { scroll-behavior: auto; } }

/* первый экран */
.hero { padding: 40px 0 48px;
  background: radial-gradient(1000px 420px at 85% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: start; }
.hero-text h1 { margin-bottom: 14px; font-size: clamp(28px, 3.2vw, 40px); }
.topics { margin: 0 0 24px; padding-left: 22px; }
.topics li { margin: 4px 0; }
.topics a { color: var(--text); }
.topics li::marker { color: var(--accent-2); font-weight: 700; }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--accent); color: #fff; font-weight: 700; padding: 12px 22px; border-radius: 12px; }
.btn:hover { text-decoration: none; filter: brightness(1.1); }

.video, .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: #000; box-shadow: var(--shadow); width: 100%; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
img.thumb { height: auto; object-fit: cover; }
.player { width: 100%; margin-top: 14px; }

/* подписка */
.band { background: var(--bg-2); border-block: 1px solid var(--line); padding: 32px 0; }
.band-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.band h2 { margin-bottom: 4px; }
.band p { margin: 0; }
.subscribe { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: 15px; }
.pill:hover { text-decoration: none; border-color: var(--accent); }
.pill--yandex { border-color: #fc3f1d; }
.pill--youtube { border-color: #ff0033; }
.pill--vk { border-color: #0077ff; }

/* архив */
.archive { padding: 48px 16px 64px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .15s, border-color .15s; }
.card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.card-thumb { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; }
.card-body { padding: 16px 18px 18px; }
.card-body h3 { margin-bottom: 8px; }
.card-topics { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }

/* выпуск */
.episode { padding: 36px 16px 64px; }
.episode-head { max-width: 820px; margin-bottom: 24px; }
.episode-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; margin: 12px 0 8px; }
.story { display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 28px 0; border-top: 1px solid var(--line);
  scroll-margin-top: 80px; }
.story:first-of-type { margin-top: 20px; }
.story-num { font-weight: 800; font-size: 28px; color: var(--accent-2); line-height: 1.15; }
.story h2 { font-size: 23px; }
.story p { margin: 10px 0; }
.facts { margin: 12px 0; padding: 14px 18px 14px 34px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; }
.facts li { margin: 4px 0; }
.facts li::marker { color: var(--accent-2); }
.sources { font-size: 14px; color: var(--muted); }
.seek { font: inherit; font-size: 13px; font-weight: 600; color: var(--accent-2); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; cursor: pointer; }
.seek:hover { border-color: var(--accent); }
.credits { margin-top: 24px; }
.episode-side { position: sticky; top: 84px; display: grid; gap: 16px; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.side-box h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.toc { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; border-top: 1px solid var(--line); }
.toc li:first-child { border-top: 0; }
.toc a { display: block; padding: 9px 0; color: var(--text); font-size: 14px; line-height: 1.4; }
.toc a::before { content: counter(toc, decimal-leading-zero) " "; color: var(--accent-2); font-weight: 700; }
.ts { float: right; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 8px; }
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.share a, .share button { font: inherit; font-size: 14px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--text); cursor: pointer; }
.share a:hover, .share button:hover { text-decoration: none; border-color: var(--accent); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--line); font-weight: 600; }

/* текстовые страницы */
.prose { max-width: 780px; padding: 44px 16px 64px; }
.prose h2 { margin-top: 36px; }
.steps li { margin: 10px 0; }
.notfound { min-height: 50vh; }

/* подвал */
.footnotes { padding: 8px 0 24px; }
.footnotes p { margin: 0; }
.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; background: var(--bg-2); }
.foot-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; }
.foot p { margin: 4px 0; }

/* телефоны и планшеты */
@media (max-width: 900px) {
  .hero-grid, .episode-grid, .foot-row { grid-template-columns: 1fr; }
  .episode-side { position: static; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 24px; }
  .nav { gap: 14px; font-size: 14px; }
  .nav a:not(.nav-cta):first-child { display: none; }
  .story { grid-template-columns: 1fr; }
  .story-num { font-size: 20px; }
}

/* --- лента новостей --- */
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--accent); filter: none; }

.digest { padding: 28px 0 32px; border-bottom: 1px solid var(--line);
  background: radial-gradient(900px 360px at 85% -10%, color-mix(in srgb, var(--accent) 20%, transparent), transparent); }
.digest-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
.digest h1 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 12px; }
.digest h1 a { color: var(--text); }
.digest .topics { font-size: 15px; margin-bottom: 12px; }

.feed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; padding-block: 28px 64px; }
.feed-title { display: flex; align-items: center; gap: 10px; font-size: 22px; margin-bottom: 8px; }
.feed-side { position: sticky; top: 84px; display: grid; gap: 16px; }
.feed-side .subscribe { margin-top: 10px; }
.feed-side .pill { padding: 7px 12px; font-size: 14px; }

.day { position: sticky; top: 64px; z-index: 2; margin: 0; padding: 18px 0 8px; font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--line); }
.item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.item-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); font-size: 15px; padding-top: 2px; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 13px; }
.topic { font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: .04em; font-size: 12px; }
.topic--episode { color: var(--live); }
.badge { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge:hover { text-decoration: none; border-color: var(--accent); color: var(--text); }
.item-title { font-size: 19px; margin: 0 0 4px; line-height: 1.3; }
.item-title a { color: var(--text); }
.item--top .item-title { font-size: 22px; }
.item--top .item-time { color: var(--accent-2); }
.item-lead { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.item-src { margin: 6px 0 0; font-size: 13px; color: var(--muted); opacity: .8; }

.item--episode .ep-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.item--episode .ep-card:hover { text-decoration: none; border-color: var(--live); }
.ep-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.more { display: flex; align-items: center; justify-content: center; gap: 20px; padding-top: 28px; }

/* --- страница новости --- */
.news { padding: 36px 16px 64px; }
.news-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.news-main { max-width: 760px; }
.news-main h1 { font-size: clamp(28px, 4vw, 40px); }
.news-main .lead { color: var(--text); font-weight: 500; }
.news-main p { margin: 0 0 14px; }
.news-main .eyebrow time { color: var(--muted); }
.in-episode { margin: 28px 0; padding: 18px 20px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); }
.in-episode h2 { font-size: 20px; margin: 0 0 4px; }
.in-episode h2 a { color: var(--text); }
.sources-box { margin: 28px 0 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.sources-box h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sources-box ul { padding-left: 18px; margin: 8px 0; font-size: 15px; }
.sources-box li { margin: 6px 0; }
.news-side { position: sticky; top: 84px; }
.side-title { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0; }
.feed--compact .item { grid-template-columns: 44px minmax(0, 1fr); padding: 12px 0; }
.feed--compact .item-title { font-size: 16px; }
.feed--compact .item-lead, .feed--compact .item-src, .feed--compact .badge { display: none; }
.news-side .btn { margin-top: 16px; }

.band-inline { justify-content: flex-start; margin: 0 0 28px; }
.band-inline p { margin: 0; }

@media (max-width: 900px) {
  .digest-grid, .feed-grid, .news-grid { grid-template-columns: 1fr; }
  .feed-side, .news-side { position: static; }
}
@media (max-width: 560px) {
  .item { grid-template-columns: 1fr; gap: 2px; }
  .item--episode .ep-card { grid-template-columns: 1fr; }
  .day { position: static; }
  .item--top .item-title { font-size: 20px; }
}

/* иконки (templates/icons.html): размер от шрифта, цвет — от текста */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.nav-cta, .btn, .pill, .seek, .share a, .share button, .links a, .topic, .badge {
  display: inline-flex; align-items: center; gap: .45em;
}
.topic .ic, .badge .ic { width: 1.25em; height: 1.25em; }
.seek .ic { width: .95em; height: .95em; }
.pill--yandex .ic { color: #fc3f1d; }
.pill--youtube .ic, .links a .ic { color: currentColor; }
.pill--youtube .ic { color: #ff0033; }
.pill--vk .ic { color: #0077ff; }
.pill--rss .ic { color: #f5a623; }
.more .btn { justify-content: center; }
