/* шина.io — «шина данных»: графит, строгая типографика, циан как сигнал, янтарь как «свежее». */
:root {
  --bg: #0c0d10;
  --bg-raised: #131519;
  --bg-hover: #181b20;
  --line: #24272e;
  --line-strong: #343842;
  --text: #ecedef;
  --text-2: #b3b7c0;
  --muted: #7d828d;
  --signal: #2fd3ff;        /* циан: ссылки, активное, рельс */
  --signal-dim: rgba(47, 211, 255, .14);
  --amber: #ffb547;         /* янтарь: свежее и популярное */
  --amber-dim: rgba(255, 181, 71, .14);
  --radius: 10px;
  --wrap: 1200px;
  --side: 320px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Onest", var(--font);
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* Тонкая нейтральная рамка по краю фото: края не растворяются в тёмном фоне */
.lead__img img, .row__thumb img, .card__img img, .article__img img {
  outline: 1px solid rgba(255, 255, 255, .08); outline-offset: -1px; }
/* Время, счётчики, номера — цифры одинаковой ширины, ничего не прыгает */
.row__time, .ticker__item time, .tg__count, .popular__n, .section-head__count, .crumbs, .row__meta, .card__meta {
  font-variant-numeric: tabular-nums; }
/* Тактильный отклик кнопок при нажатии */
.tg, .cta__btn, .pager a, .skip { transition-property: transform, border-color, background-color, color;
  transition-duration: .15s; transition-timing-function: var(--ease); }
.tg:active, .pager a:active, .cta:active .cta__btn { transform: scale(.97); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--signal); color: #031015; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 14px; border-radius: 8px;
  background: var(--signal); color: #031015; font-weight: 600; }
.skip:focus { top: 12px; }
.link { color: var(--signal); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- бегущая строка ---------- */
.ticker { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); background: #08090b;
  font: 13px/1 var(--font); }
.ticker__label { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-right: 1px solid var(--line);
  font: 600 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.ticker__label i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 0 0 rgba(255, 181, 71, .6); animation: pulse 2s var(--ease) infinite; }
.ticker__viewport { flex: 1; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.ticker__track { display: flex; width: max-content; animation: ticker 80s linear infinite; }
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused; }
.ticker__group { display: flex; }
.ticker__item { display: flex; align-items: baseline; gap: 10px; padding: 11px 20px; white-space: nowrap; color: var(--text-2);
  transition: color .15s; }
.ticker__item time { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.ticker__item:hover { color: var(--text); }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(255, 181, 71, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 181, 71, 0); } }

/* ---------- шапка ---------- */
.header { position: sticky; top: 0; z-index: 20; background: rgba(12, 13, 16, .88);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line); }
.header__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 22px/1 var(--font-head); letter-spacing: -.03em; }
.logo--small { font-size: 17px; }
.tg { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; min-width: 40px;
  padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text);
  font-weight: 600; font-size: 14px; }
.tg svg { flex: none; color: var(--signal); margin-left: -2px; } /* самолётик визуально тянет вправо */
.tg:hover { border-color: var(--signal); background: var(--signal-dim); }
.tg__count { font: 500 12px/1 var(--font-mono); color: var(--muted); padding-left: 8px; border-left: 1px solid var(--line-strong); }
.nav { display: flex; gap: 2px; overflow-x: auto; height: 44px; align-items: stretch; scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-weight: 500;
  font-size: 15px; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.nav a:first-child { padding-left: 0; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--signal); }

.main { padding-top: 32px; padding-bottom: 64px; }

/* ---------- раскладка: лента + боковая колонка ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 48px; align-items: start; }
.layout__side { position: sticky; top: 128px; display: grid; gap: 20px; }

/* ---------- метки ---------- */
.row__meta, .card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  font: 500 12px/1.4 var(--font-mono); color: var(--muted); text-transform: lowercase; }
.tag { position: relative; color: var(--signal); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; font-size: 11px; }
.tag::after { content: ""; position: absolute; inset: -10px -6px; } /* мелкая ссылка, но попасть пальцем легко */
.tag::before { content: "#"; opacity: .5; margin-right: 1px; }
.tag:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- заглушка вместо картинки: дорожки платы + логотип ---------- */
.ph { display: grid; place-items: center; width: 100%; height: 100%; background-color: var(--bg-raised);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px; background-position: center; }
.ph img { width: 30%; max-width: 72px; opacity: .35; }

/* ---------- главная новость ---------- */
.lead { display: grid; gap: 20px; padding-bottom: 32px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.lead__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--bg-raised); }
.lead__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.lead:hover .lead__img img { transform: scale(1.015); }
.lead__body { display: grid; gap: 12px; }
.lead__title { margin: 0; font: 800 clamp(28px, 3.6vw, 44px)/1.08 var(--font-head); letter-spacing: -.025em; }
.lead__title a { transition: color .15s; }
.lead__title a:hover { color: var(--signal); }
.lead__text { margin: 0; max-width: 62ch; color: var(--text-2); font-size: 18px; line-height: 1.55; }

/* ---------- лента-«шина» ---------- */
.bus__day { position: relative; }
.bus__date { position: sticky; top: 104px; z-index: 2; margin: 0; padding: 22px 0 10px 72px;
  background: linear-gradient(var(--bg) 70%, transparent);
  font: 600 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.row { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) 168px; gap: 0 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line); }
.row::before { /* рельс шины */
  content: ""; position: absolute; left: 64px; top: 0; bottom: -1px; width: 1px; background: var(--line-strong); }
.row::after { /* отвод от шины к новости */
  content: ""; position: absolute; left: 60px; top: 26px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong); transition: border-color .15s, background-color .15s; }
.row:hover::after { border-color: var(--signal); background: var(--signal); }
.row__time { padding-top: 4px; font: 500 13px/1.4 var(--font-mono); color: var(--muted); }
.row__body { display: grid; gap: 6px; align-content: start; padding-left: 16px; }
.row__title { margin: 0; font: 700 19px/1.3 var(--font-head); letter-spacing: -.01em; }
.row__title a { transition: color .15s; }
.row__title a::after { content: ""; position: absolute; inset: 0; } /* вся строка кликабельна */
.row__title a:hover, .row:hover .row__title a { color: var(--signal); }
.row__meta .tag { position: relative; z-index: 1; }
.row__lead { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row__thumb { position: relative; z-index: 1; display: block; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: 8px; background: var(--bg-raised); align-self: start; }
.row__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- боковая колонка ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 8px; background: var(--bg-raised); }
.panel__title { margin: 0 0 6px; font: 600 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.popular { list-style: none; margin: 0; padding: 0; }
.popular li + li { border-top: 1px solid var(--line); }
.popular a { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 12px 0; }
.popular__n { font: 600 13px/1.5 var(--font-mono); color: var(--muted); }
.popular__t { font: 600 15px/1.4 var(--font-head); transition: color .15s; }
.popular a:hover .popular__t { color: var(--signal); }

.cta { display: grid; gap: 8px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--bg-raised); transition: border-color .15s; }
.cta:hover { border-color: var(--signal); }
.cta__kicker { font: 600 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--signal); }
.cta b { font: 700 17px/1.3 var(--font-head); }
.cta__btn { justify-self: start; display: inline-flex; align-items: center; min-height: 40px; margin-top: 4px;
  padding: 0 16px; border-radius: 999px; background: var(--signal); color: #031015; font-weight: 600; font-size: 14px; }
.cta:hover .cta__btn { background: #5fdfff; }

/* ---------- страницы рубрик и навигация ---------- */
.section-head { padding-bottom: 8px; }
.section-head__kicker, .empty__kicker { margin: 0 0 6px; font: 600 12px/1 var(--font-mono); letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); }
.section-head__count { margin: 6px 0 0; font: 500 13px var(--font-mono); color: var(--muted); }
.page-title { margin: 0; font: 800 clamp(32px, 4.5vw, 48px)/1.05 var(--font-head); letter-spacing: -.03em; }
.page-title small { font: 500 14px var(--font-mono); color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.crumbs { display: flex; gap: 8px; margin-bottom: 20px; font: 500 13px var(--font-mono); color: var(--muted); }
.crumbs a:hover { color: var(--signal); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.pager a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 8px; font: 500 14px var(--font-mono); }
.pager a:hover { border-color: var(--signal); color: var(--signal); }
.pager__next { margin-left: auto; }

/* ---------- статья ---------- */
.article { max-width: 720px; margin: 0 auto; }
.article__head { display: grid; gap: 14px; }
.article__title { margin: 0; font: 800 clamp(30px, 4.6vw, 46px)/1.1 var(--font-head); letter-spacing: -.03em; }
.article__lead { margin: 6px 0 0; font-size: 20px; line-height: 1.55; color: var(--text-2); }
.article__img { margin: 32px 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-raised); }
.article__img img { width: 100%; }
.article__body { font-size: 18px; line-height: 1.75; color: #dcdee3; }
.article__body > p { margin: 0 0 1.15em; }
.brief { margin: 0 0 32px; padding: 4px 0 4px 20px; border-left: 2px solid var(--signal); }
.brief h2 { margin: 0 0 8px; font: 600 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--signal); }
.brief ul { margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.55; color: var(--text); }
.brief li { position: relative; padding-left: 18px; }
.brief li + li { margin-top: 6px; }
.brief li::before { content: "→"; position: absolute; left: 0; color: var(--muted); }
.why { display: grid; gap: 6px; margin: 32px 0; padding: 18px 20px; border-radius: var(--radius);
  background: var(--amber-dim); color: var(--text); font-size: 17px; line-height: 1.6; }
.why__k { font: 600 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.article__foot { display: grid; gap: 12px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 15px; }
.source { margin: 0; display: flex; gap: 12px; align-items: baseline; }
.source span { font: 600 12px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.source a { color: var(--signal); font-weight: 600; }
.source a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hashtags { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font: 500 13px var(--font-mono); color: var(--muted); }
.article .cta { margin-top: 40px; grid-template-columns: 1fr auto; align-items: center; }
.article .cta .cta__kicker { grid-column: 1 / -1; }
.article .cta .cta__btn { margin: 0; }

.related { max-width: 1000px; margin: 64px auto 0; padding-top: 28px; border-top: 1px solid var(--line); }
.related .panel__title { margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { position: relative; display: grid; gap: 10px; align-content: start; }
.card__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; background: var(--bg-raised); }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__title { margin: 0; font: 700 17px/1.35 var(--font-head); }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card:hover .card__title a { color: var(--signal); }
.card__meta .tag { position: relative; z-index: 1; }

/* ---------- пустые состояния ---------- */
.empty { max-width: 560px; margin: 48px auto; display: grid; gap: 12px; }
.empty h1 { margin: 0; font: 800 clamp(30px, 4vw, 40px)/1.1 var(--font-head); letter-spacing: -.03em; }
.empty p { margin: 0; color: var(--text-2); }
.empty .cta { margin-top: 12px; }
.empty--inline { margin: 24px 0; padding: 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ---------- подвал ---------- */
.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
.footer__row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__brand p { margin: 10px 0 0; max-width: 420px; }
.footer__links { display: flex; gap: 20px; font: 500 13px var(--font-mono); }
.footer__links a:hover { color: var(--signal); }
.footer__note { margin-top: 24px; font-size: 12px; color: var(--muted); }

/* ---------- адаптив ---------- */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; gap: 40px; }
  .layout__side { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .header__row { height: 54px; }
  .logo { font-size: 20px; }
  .tg__text { display: none; }
  .tg { padding: 0 12px; }
  .tg__count { border-left: 0; padding-left: 0; }
  .ticker__label { padding: 0 12px; }
  .main { padding-top: 20px; }
  .bus__date { top: 98px; padding-left: 0; }
  .row { grid-template-columns: 44px minmax(0, 1fr); padding: 16px 0; }
  .row::before { left: 50px; }
  .row::after { left: 46px; top: 24px; }
  .row__body { padding-left: 14px; }
  .row__thumb { display: none; }
  .row__title { font-size: 17px; }
  .lead__text, .article__lead { font-size: 17px; }
  .article__body { font-size: 17px; }
  .grid { grid-template-columns: 1fr; }
  .article .cta { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
