/*
Theme Name: NewSmi
Description: Тема новостного сайта NewSmi — главное за день, фото-иллюстрации, лента, рубрики, курсы и погода.
Version: 2.0
Text Domain: newsmi
*/

:root {
  --ink: #111318;
  --ink-2: #3b4049;
  --muted: #6e747e;
  --line: #e6e7ea;
  --soft: #f4f4f1;
  --bg: #ffffff;
  --page: #f6f6f3;
  --accent: #e02e24;
  --dark: #15171c;
  --wrap: 1240px;
  --r: 14px;
  --font: "Golos Text", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 16px/1.5 var(--font); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* верхняя полоса */
.topbar { background: var(--dark); color: #c9ccd3; font-size: 13px; }
.topbar-row { display: flex; align-items: center; gap: 22px; height: 36px; white-space: nowrap; overflow: hidden; }
.tb-date::first-letter { text-transform: uppercase; }
.tb-date { color: #fff; font-weight: 500; }
.tb-item b { color: #fff; font-weight: 600; }
.tb-rate i { font-style: normal; font-size: 10px; margin-left: 2px; }
.up { color: #3ecf74; }
.down { color: #ff6b5e; }
.tb-links { margin-left: auto; display: flex; gap: 18px; }
.tb-links a { color: #c9ccd3; }
.tb-links a:hover { color: #fff; }

/* шапка */
.site-head { background: var(--bg); position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 var(--line); }
.head-row { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; letter-spacing: -0.04em; }
.logo-txt { font-weight: 800; font-size: 30px; letter-spacing: -0.035em; line-height: 1; }
.logo-txt b { color: var(--accent); font-weight: 800; }
.logo small { font-size: 12px; font-weight: 500; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line); line-height: 1.2; }
.head-search { margin-left: auto; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); width: 320px; transition: border-color .15s, background .15s; }
.head-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 14px; padding: 10px 16px; color: var(--ink); outline: none; }
.head-search button { border: 0; background: none; color: var(--muted); padding: 8px 14px; cursor: pointer; display: flex; }
.head-search:focus-within { border-color: #c4c8cf; background: #fff; }

.rubrics { border-top: 1px solid var(--line); }
.rub-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.rub-row::-webkit-scrollbar { display: none; }
.rub-row a { position: relative; padding: 12px 12px 11px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.rub-row a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--rc, var(--accent)); transform: scaleX(0); transition: transform .18s; }
.rub-row a:hover { color: var(--ink); }
.rub-row a:hover::after, .rub-row a.on::after { transform: scaleX(1); }
.rub-row a.on { color: var(--ink); }
.rub-row a:first-child { padding-left: 0; }
.rub-row a:first-child::after { left: 0; }

/* бегущая строка */
.ticker { background: var(--bg); border-bottom: 1px solid var(--line); }
.ticker-row { display: flex; align-items: center; gap: 16px; height: 42px; }
.ticker-label { display: inline-flex; align-items: center; gap: 8px; flex: none; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; padding: 5px 12px; border-radius: 999px; }
.ticker-label i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.ticker-viewport { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 95%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 95%, transparent); }
.ticker-track { display: inline-flex; gap: 36px; white-space: nowrap; animation: tick 120s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track a { font-size: 14px; font-weight: 500; }
.ticker-track time { color: var(--accent); font-weight: 700; margin-right: 8px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } .ticker-viewport { overflow-x: auto; } }

.site-main { padding: 24px 0 56px; }

/* главный экран */
.hero-grid { display: grid; grid-template-columns: 1.75fr 1fr; gap: 16px; }
.hero, .tile { position: relative; border-radius: var(--r); overflow: hidden; background: #2a2d33; }
.hero-link, .tile a { display: block; position: relative; height: 100%; color: #fff; }
.hero-link:hover, .tile a:hover { color: #fff; }
.hero .pic, .tile .pic { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.hero:hover .pic, .tile:hover .pic { transform: scale(1.03); }
.hero { min-height: 470px; }
.hero .pic { position: absolute; inset: 0; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,16,0) 30%, rgba(10,12,16,.55) 58%, rgba(10,12,16,.92) 100%); }
.hero-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 30px; display: flex; flex-direction: column; gap: 10px; }
.hero-meta { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); text-transform: uppercase; letter-spacing: .04em; }
.hero-title { font-size: 36px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.hero-lead { font-size: 16px; color: rgba(255,255,255,.88); max-width: 680px; }
.hero-src { font-size: 13px; color: rgba(255,255,255,.7); }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
.tile { min-height: 227px; }
.tile .pic { position: absolute; inset: 0; }
.tile-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.tile-title { font-size: 19px; line-height: 1.22; font-weight: 700; text-wrap: balance; }

.card-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.card { background: var(--bg); border-radius: var(--r); overflow: hidden; padding-bottom: 16px; display: flex; flex-direction: column; box-shadow: 0 1px 0 var(--line); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 10px 28px rgba(17,19,24,.08); transform: translateY(-2px); }
.card-pic { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft); }
.card-pic .pic { width: 100%; height: 100%; object-fit: cover; }
.card .badge { margin: 14px 16px 0; align-self: flex-start; }
.card h2, .card h3 { font-size: 17px; line-height: 1.3; margin: 8px 16px 8px; }
.card .meta { margin: auto 16px 0; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--rc, var(--accent)); background: color-mix(in srgb, var(--rc, var(--accent)) 10%, #fff); padding: 3px 9px; border-radius: 6px; text-transform: uppercase; letter-spacing: .03em; }
.badge:hover { color: var(--rc, var(--accent)); filter: brightness(.95); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.meta i { font-style: normal; color: #b5b9c0; }
.m-rub { color: var(--accent); font-weight: 600; }

/* сетка с боковой колонкой */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; margin-top: 28px; align-items: start; }
.single-grid { margin-top: 0; }

/* рубрики */
.rub-block { background: var(--bg); border-radius: var(--r); padding: 22px 24px 24px; margin-bottom: 20px; box-shadow: 0 1px 0 var(--line); }
.rub-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); position: relative; }
.rub-title::before { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 3px; border-radius: 3px; background: var(--rc, var(--accent)); }
.rub-title a:hover { color: var(--rc, var(--accent)); }
.rub-all { font-size: 14px; font-weight: 600; color: var(--rc, var(--accent)); letter-spacing: 0; }
.rub-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; }
.rub-first .card-pic { border-radius: 12px; margin-bottom: 14px; }
.rub-first h3 { font-size: 21px; line-height: 1.27; margin-bottom: 8px; text-wrap: balance; }
.rub-first p { font-size: 15px; color: var(--ink-2); margin-bottom: 10px; }
.rub-list li { display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.rub-list li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.thumb { display: block; aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; background: var(--soft); }
.thumb .pic { width: 100%; height: 100%; object-fit: cover; }
.rl-title { display: block; font-size: 15px; line-height: 1.35; font-weight: 600; margin-bottom: 4px; }
.rub-list time { font-size: 12px; color: var(--muted); }

/* боковая колонка */
.sidebar { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 20px; }
.box { background: var(--bg); border-radius: var(--r); padding: 18px 20px; box-shadow: 0 1px 0 var(--line); }
.box-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s infinite; }
.hot li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hot li:last-child { border-bottom: 0; padding-bottom: 2px; }
.hot .num { font-size: 26px; font-weight: 800; color: var(--accent); line-height: 1; }
.hot a { font-size: 15px; line-height: 1.35; font-weight: 600; display: block; }
.hot small { font-size: 12px; color: var(--muted); }
.feed ul { max-height: 560px; overflow-y: auto; scrollbar-width: thin; margin-right: -8px; padding-right: 8px; }
.feed li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.38; }
.feed li a { font-weight: 500; }
.feed time { display: block; font-size: 12px; color: var(--accent); font-weight: 700; margin-bottom: 2px; }
.feed-rub { display: block; font-size: 12px; color: var(--rc, var(--muted)); margin-top: 3px; font-weight: 600; }
.more { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--accent); }
.rate { display: grid; grid-template-columns: 48px 1fr auto; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rate:last-child { border-bottom: 0; }
.rate span { font-weight: 700; color: var(--muted); font-size: 13px; }
.rate b { font-size: 18px; }
.rate i { font-style: normal; font-size: 13px; font-weight: 600; }

/* заметка */
.story { background: var(--bg); border-radius: var(--r); padding: 28px 32px 30px; box-shadow: 0 1px 0 var(--line); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); font-weight: 600; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 6px; color: #b5b9c0; }
.story h1 { font-size: 38px; line-height: 1.14; letter-spacing: -0.025em; font-weight: 800; margin-bottom: 14px; text-wrap: balance; }
.story > .meta { margin-bottom: 20px; font-size: 14px; gap: 10px; }
.story-pic { margin: 0 0 22px; }
.story-pic .pic { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.story-pic figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; }
.story-pic figcaption a { text-decoration: underline; text-underline-offset: 2px; }
.story-lead { font-size: 20px; line-height: 1.6; max-width: 760px; }
.story-lead p + p { margin-top: 14px; }
.btn-src { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; padding: 14px 22px; border-radius: 12px; }
.btn-src:hover { background: #c4231a; color: #fff; }
.sources { margin-top: 28px; background: var(--soft); border-radius: 12px; padding: 18px 20px; }
.sources h2 { font-size: 17px; margin-bottom: 8px; }
.sources li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sources li:last-child { border-bottom: 0; }
.src-dot { width: 30px; height: 30px; border-radius: 8px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--ink-2); }
.sources li a { font-weight: 600; }
.sources time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.note { margin-top: 10px; font-size: 13px; color: var(--muted); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; font-size: 14px; color: var(--muted); }
.share a, .share button { font: inherit; font-size: 14px; font-weight: 600; color: #fff; border: 0; border-radius: 999px; padding: 7px 15px; cursor: pointer; }
.sh-tg { background: #2aa1da; } .sh-vk { background: #0077ff; } .sh-ok { background: #ee8208; }
.share a:hover { color: #fff; filter: brightness(1.08); }
.share .copy { background: var(--soft); color: var(--ink-2); border: 1px solid var(--line); }
.related { background: var(--bg); border-radius: var(--r); padding: 22px 24px 24px; margin-top: 20px; box-shadow: 0 1px 0 var(--line); }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rel-grid .card { box-shadow: none; border: 1px solid var(--line); }
.rel-grid .card h3 { font-size: 15px; }

/* списки */
.page-head { background: var(--bg); border-radius: var(--r); padding: 22px 24px; box-shadow: 0 1px 0 var(--line); margin-bottom: 16px; }
.page-head.is-rub { border-left: 5px solid var(--rc, var(--accent)); }
.page-title { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.page-desc { color: var(--ink-2); margin-top: 6px; }
.list { background: var(--bg); border-radius: var(--r); padding: 4px 24px 8px; box-shadow: 0 1px 0 var(--line); }
.day { margin-top: 18px; padding-bottom: 8px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-pic { display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--soft); }
.row-pic .pic { width: 100%; height: 100%; object-fit: cover; }
.row h2 { font-size: 20px; line-height: 1.3; margin: 6px 0; }
.row-body > .badge + h2 { margin-top: 8px; }
.row p { font-size: 15px; color: var(--ink-2); margin-bottom: 8px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.pager .page-numbers { min-width: 42px; text-align: center; padding: 9px 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 14px; }
.pager .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { background: var(--bg); border-radius: var(--r); padding: 24px; color: var(--ink-2); }
.empty a { color: var(--accent); }

/* страницы */
.page-wrap { max-width: 860px; }
.page-body { background: var(--bg); border-radius: var(--r); padding: 32px 36px; box-shadow: 0 1px 0 var(--line); }
.page-body .page-title { margin-bottom: 18px; }
.prose { font-size: 17px; line-height: 1.7; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose ol { list-style: decimal; padding-left: 22px; }
.prose h2 { font-size: 23px; margin: 30px 0 12px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.credits { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 10px; }
.credits figure { margin: 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.credits img { border-radius: 8px; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 6px; }

/* подвал */
.site-foot { background: var(--dark); color: #b9bdc6; padding: 44px 0 26px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-foot h3 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.logo-foot { color: #fff; }
.logo-foot:hover { color: #fff; }
.logo-foot .logo-txt { font-size: 26px; }
.foot-about p { margin-top: 14px; max-width: 400px; line-height: 1.6; }
.foot-links { display: flex; flex-direction: column; gap: 9px; }
.foot-rub { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; }
.site-foot a:hover { color: #fff; }
.foot-bottom { display: flex; gap: 14px; align-items: flex-start; margin-top: 32px; padding-top: 20px; border-top: 1px solid #2c2f37; color: #8c919b; font-size: 13px; }
.age { flex: none; border: 1.5px solid #8c919b; border-radius: 6px; padding: 1px 6px; font-weight: 700; font-size: 12px; color: #c9ccd3; }

/* планшет */
@media (max-width: 1100px) {
  .home-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
  .card-row { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 30px; }
  .head-search { width: 240px; }
}

/* телефон */
@media (max-width: 820px) {
  .wrap { padding: 0 16px; }
  .topbar-row { gap: 14px; }
  .tb-links, .tb-date { display: none; }
  .tb-rate ~ .tb-rate ~ .tb-rate { display: none; }
  .head-row { height: 60px; gap: 12px; }
  .logo-mark { width: 32px; height: 32px; font-size: 19px; border-radius: 9px; }
  .logo-txt { font-size: 25px; }
  .logo small { display: none; }
  .head-search { width: auto; flex: 1; max-width: 200px; }
  .head-search input { padding: 8px 12px; }
  .rub-row a { font-size: 14px; padding: 10px 10px 9px; }
  .ticker-row { height: 38px; gap: 10px; }
  .ticker-label { font-size: 11px; padding: 4px 9px; }
  .site-main { padding-top: 14px; }
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero { min-height: 400px; }
  .hero-body { padding: 18px; }
  .hero-title { font-size: 25px; }
  .hero-lead { font-size: 15px; }
  .hero-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; gap: 12px; }
  .tile { min-height: 190px; }
  .tile-body { padding: 12px; }
  .tile-title { font-size: 15px; }
  .card-row { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
  .card h2, .card h3 { font-size: 15px; margin: 8px 12px; }
  .card .badge { margin: 12px 12px 0; font-size: 11px; }
  .card .meta { margin: auto 12px 0; font-size: 12px; }
  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
  .sidebar { position: static; }
  .rub-block, .related { padding: 18px 16px; }
  .rub-title { font-size: 21px; }
  .rub-cols { grid-template-columns: 1fr; gap: 16px; }
  .rub-list li { grid-template-columns: 96px 1fr; gap: 12px; }
  .story { padding: 20px 16px 22px; }
  .story h1 { font-size: 27px; line-height: 1.18; }
  .story-lead { font-size: 18px; }
  .btn-src { width: 100%; justify-content: center; }
  .sources li { grid-template-columns: 30px 1fr; }
  .sources time { grid-column: 2; margin-top: -6px; }
  .rel-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .list { padding: 2px 16px 6px; }
  .row { grid-template-columns: 112px 1fr; gap: 12px; padding: 14px 0; }
  .row h2 { font-size: 16px; }
  .row p { display: none; }
  .page-head { padding: 18px 16px; }
  .page-title { font-size: 26px; }
  .page-body { padding: 22px 18px; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 380px) {
  .card-row, .rel-grid { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr; }
}
.pic-empty { display: block; width: 100%; height: 100%; min-height: 100%; background: linear-gradient(135deg, #2b2e35, #50555f); }
.hero .pic-empty, .tile .pic-empty { position: absolute; inset: 0; }

/* срочно */
.urgent { display: flex; align-items: center; gap: 14px; background: var(--accent); color: #fff; border-radius: var(--r); padding: 12px 18px; margin-bottom: 16px; }
.urgent:hover { color: #fff; filter: brightness(1.05); }
.urgent-label { flex: none; background: #fff; color: var(--accent); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; animation: pulse 1.6s infinite; }
.urgent-title { font-weight: 700; font-size: 17px; line-height: 1.3; }
.urgent time { margin-left: auto; font-size: 13px; opacity: .85; flex: none; }
.hero-urgent { background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 5px; margin-right: 6px; }
.badge-urgent { display: inline-block; font-size: 12px; font-weight: 800; color: #fff; background: var(--accent); padding: 3px 9px; border-radius: 6px; text-transform: uppercase; letter-spacing: .03em; margin-left: 6px; }
.card .badge-urgent { margin: 14px 0 0 0; align-self: flex-start; }
.badge-city { --rc: #186aff; }

/* новости города */
.city-box { background: var(--bg); border-radius: var(--r); padding: 20px 24px; margin-top: 16px; box-shadow: 0 1px 0 var(--line); }
.city-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.city-head h2 { font-size: 22px; font-weight: 800; }
.city-pick select { font: inherit; font-weight: 600; font-size: 15px; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 7px 34px 7px 14px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23555' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.city-all { margin-left: auto; font-size: 14px; font-weight: 600; color: #186aff; }
.city-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.city-list li { display: grid; grid-template-columns: 74px 1fr; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.38; font-weight: 500; }
.city-list time, .city-card time { color: #186aff; font-size: 13px; font-weight: 700; }
.city-wait { color: var(--muted); display: block !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.city-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.city-card { background: var(--bg); border-radius: var(--r); padding: 18px 20px; box-shadow: 0 1px 0 var(--line); }
.city-card h2 { font-size: 20px; font-weight: 800; padding-bottom: 10px; border-bottom: 2px solid #186aff; margin-bottom: 4px; }
.city-card li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.38; }
.city-card li time { display: block; margin-bottom: 2px; }

/* сводки */
.digest { list-style: none; counter-reset: dg; padding: 0; margin: 18px 0 0; }
.digest li { counter-increment: dg; position: relative; padding: 16px 0 16px 52px; border-top: 1px solid var(--line); }
.digest li::before { content: counter(dg); position: absolute; left: 0; top: 14px; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 800; font-size: 17px; display: grid; place-items: center; }
.digest h3 { font-size: 19px; line-height: 1.3; margin-bottom: 6px; }
.digest p { font-size: 16px; color: var(--ink-2); margin: 0; }
.digest small { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.digest-box ol { counter-reset: d2; }
.digest-box li { counter-increment: d2; display: grid; grid-template-columns: 22px 1fr; gap: 6px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.38; font-weight: 600; }
.digest-box li::before { content: counter(d2) "."; color: var(--accent); font-weight: 800; }

@media (max-width: 820px) {
  .urgent { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .urgent time { margin-left: 0; }
  .city-box { padding: 16px; }
  .city-list { grid-template-columns: 1fr; }
  .city-all { margin-left: 0; }
  .city-grid { grid-template-columns: 1fr; }
}
@media (min-width: 821px) and (max-width: 1100px) { .city-grid { grid-template-columns: 1fr 1fr; } }

/* нижняя панель — только телефон */
.tabbar { display: none; }
@media (max-width: 820px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font: inherit; font-size: 11px; font-weight: 600; color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .on, .search-open .tab-search { color: var(--accent); }

  /* поиск открывается кнопкой снизу */
  .head-search { display: none; }
  .search-open .head-search { display: flex; position: absolute; left: 16px; right: 16px; top: 64px; max-width: none; z-index: 5; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
  .search-open .head-search input { padding: 12px 16px; font-size: 16px; }

  /* главный сюжет: надписи читаются на любом фото */
  .hero-shade { background: linear-gradient(180deg, rgba(10,12,16,.05) 0%, rgba(10,12,16,.45) 38%, rgba(10,12,16,.93) 75%); }
  .hero-body, .tile-body { text-shadow: 0 1px 8px rgba(0,0,0,.35); }
  .hero { min-height: 430px; }

  /* две плитки — во всю ширину */
  .hero-side { grid-template-columns: 1fr; }
  .tile { min-height: 210px; }
  .tile-body { padding: 16px; }
  .tile-title { font-size: 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

  /* «ещё главное» — лента карточек, листается пальцем */
  .card-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; gap: 12px; margin: 12px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; }
  .card-row::-webkit-scrollbar { display: none; }
  .card-row .card { flex: 0 0 74%; scroll-snap-align: start; }
  .card-row .card h2 { font-size: 16px; }

  /* сводка и «обсуждаемое» — сразу после главного */
  .home-grid { display: flex; flex-direction: column; }
  .home .home-grid .sidebar { order: -1; }
  .feed ul { max-height: 380px; }
  .story > .meta i { display: none; }
}
.city-note { font-size: 13px; color: var(--muted); }

/* тёмная тема: по настройке устройства или кнопкой в верхней полосе */
.theme-btn { background: none; border: 0; color: #c9ccd3; cursor: pointer; padding: 0; display: inline-flex; align-items: center; }
.theme-btn:hover { color: #fff; }
@media (max-width: 820px) { .tb-links { display: flex !important; margin-left: auto; } .tb-links a { display: none; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink: #e9eaee; --ink-2: #c3c6cd; --muted: #8e939d; --line: #2a2d34; --soft: #22252b; --bg: #1a1c21; --page: #121418; --dark: #0c0d10; color-scheme: dark; }
}
:root[data-theme="dark"] { --ink: #e9eaee; --ink-2: #c3c6cd; --muted: #8e939d; --line: #2a2d34; --soft: #22252b; --bg: #1a1c21; --page: #121418; --dark: #0c0d10; color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge { background: color-mix(in srgb, var(--rc, var(--accent)) 22%, #1a1c21); color: color-mix(in srgb, var(--rc, var(--accent)) 55%, #fff); }
  :root:not([data-theme="light"]) .head-search:focus-within, :root:not([data-theme="light"]) .search-open .head-search { background: var(--soft); }
  :root:not([data-theme="light"]) .src-dot { background: var(--bg); }
  :root:not([data-theme="light"]) .tabbar { background: rgba(26,28,33,.96); }
  :root:not([data-theme="light"]) .pager .current { background: var(--accent); border-color: var(--accent); }
  :root:not([data-theme="light"]) .rub-title { border-color: var(--line); }
  :root:not([data-theme="light"]) .city-all, :root:not([data-theme="light"]) .city-list time, :root:not([data-theme="light"]) .city-card time { color: #6ea2ff; }
  :root:not([data-theme="light"]) .feed-rub { filter: brightness(1.6); }
  :root:not([data-theme="light"]) .share .copy { color: var(--ink-2); }
}
:root[data-theme="dark"] .badge { background: color-mix(in srgb, var(--rc, var(--accent)) 22%, #1a1c21); color: color-mix(in srgb, var(--rc, var(--accent)) 55%, #fff); }
:root[data-theme="dark"] .head-search:focus-within, :root[data-theme="dark"] .search-open .head-search { background: var(--soft); }
:root[data-theme="dark"] .src-dot { background: var(--bg); }
:root[data-theme="dark"] .tabbar { background: rgba(26,28,33,.96); }
:root[data-theme="dark"] .pager .current { background: var(--accent); border-color: var(--accent); }
:root[data-theme="dark"] .city-all, :root[data-theme="dark"] .city-list time, :root[data-theme="dark"] .city-card time { color: #6ea2ff; }
:root[data-theme="dark"] .feed-rub { filter: brightness(1.6); }

/* реклама */
.ad-slot { margin: 16px 0; text-align: center; overflow: hidden; }
.ad-slot:empty { display: none; }
.sidebar .ad-slot { margin: 0; }
.topics { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; font-size: 14px; color: var(--muted); }
.topics a { font-weight: 600; color: var(--ink-2); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; }
.topics a:hover { color: var(--accent); border-color: var(--accent); }
.topics-box { margin-top: 12px; }
.topic-rates { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; margin-top: 14px; }
.topic-rates .rate { display: flex; gap: 8px; align-items: baseline; border: 0; padding: 0; }
.topic-rates small { color: var(--muted); font-size: 12px; width: 100%; }

/* логотип — только слово, без квадрата */
.logo { gap: 12px; }
.logo-txt { font-size: 32px; letter-spacing: -0.04em; }
.logo-txt b { position: relative; }
.logo-txt b::after { content: ""; position: absolute; left: 2px; right: 1px; bottom: -5px; height: 3px; border-radius: 2px; background: var(--accent); }
.logo small { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
@media (max-width: 820px) { .logo-txt { font-size: 27px; } }
.rubrics .wrap { position: relative; }
.rub-row { mask-image: linear-gradient(90deg, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); padding-right: 40px; }

/* регионы */
.city-locate { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600; color: #186aff; background: none; border: 1px solid color-mix(in srgb, #186aff 35%, transparent); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.city-locate:hover { background: color-mix(in srgb, #186aff 8%, transparent); }
.city-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.city-chips a { font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.city-chips a:hover, .city-chips a.on { color: #186aff; border-color: #186aff; }
.city-chips-sm { margin: 10px 0 2px; gap: 6px; }
.city-chips-sm a { font-size: 12.5px; padding: 3px 10px; }
.city-grid-2 { grid-template-columns: 1fr 1fr; margin-top: 4px; }
@media (max-width: 820px) { .city-grid-2 { grid-template-columns: 1fr; } .city-locate { order: 3; } }

/* погода */
a.tb-item { color: #c9ccd3; }
a.tb-item:hover { color: #fff; }
.wx-now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; background: var(--bg); border-radius: var(--r); padding: 22px 24px; box-shadow: 0 1px 0 var(--line); margin-bottom: 16px; }
.wx-main { display: flex; align-items: center; gap: 16px; }
.wx-main > b { font-size: 56px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.wx-main span { display: block; font-size: 18px; font-weight: 700; }
.wx-main small { color: var(--muted); }
.wx-facts { display: flex; gap: 22px; margin: 0; }
.wx-facts dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wx-facts dd { margin: 2px 0 0; font-weight: 700; }
.wx-hours { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; background: var(--bg); border-radius: var(--r); padding: 14px; box-shadow: 0 1px 0 var(--line); margin-bottom: 16px; overflow-x: auto; }
.wx-hours div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; min-width: 52px; }
.wx-hours time { color: var(--muted); }
.wx-days { background: var(--bg); border-radius: var(--r); padding: 20px 24px; box-shadow: 0 1px 0 var(--line); }
.wx-day { display: grid; grid-template-columns: 120px 40px 1fr 110px 170px; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.wx-day:last-of-type { border-bottom: 0; }
.wx-d b { display: block; }
.wx-d small, .wx-x { color: var(--muted); font-size: 13px; }
.wx-t { font-size: 14px; color: var(--ink-2); }
.wx-temp b { font-size: 18px; }
.wx-temp i { font-style: normal; color: var(--muted); }
.wx-other { margin-top: 16px; align-items: center; }
.wx-other span { font-size: 13px; color: var(--muted); font-weight: 600; }
.wx-ico { flex: none; }

/* курсы */
.fx-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fx-card { background: var(--bg); border-radius: var(--r); padding: 18px 20px; box-shadow: 0 1px 0 var(--line); }
.fx-top { display: flex; justify-content: space-between; color: var(--muted); font-weight: 600; font-size: 14px; }
.fx-val { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; }
.fx-card i { font-style: normal; font-weight: 700; font-size: 14px; }
.fx-chart { width: 100%; height: 80px; margin-top: 10px; }
.fx-range { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); gap: 8px; flex-wrap: wrap; }
.fx-conv, .fx-table { background: var(--bg); border-radius: var(--r); padding: 20px 24px; box-shadow: 0 1px 0 var(--line); margin-top: 16px; }
.fx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fx-row input, .fx-row select { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--ink); }
.fx-row input { width: 140px; }
.fx-row select { max-width: 320px; }
.fx-eq { font-size: 22px; color: var(--muted); }
.fx-res { font-size: 24px; font-weight: 800; }
.fx-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.fx-table th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.fx-table td { padding: 9px 6px; border-bottom: 1px solid var(--line); }
.fx-table td:nth-child(2), .fx-table td:nth-child(3), .fx-table th:nth-child(2), .fx-table th:nth-child(3) { text-align: right; white-space: nowrap; }

/* объявления Вокси */
.woxi-box { background: var(--bg); border-radius: var(--r); padding: 20px 24px; box-shadow: 0 1px 0 var(--line); margin: 20px 0; }
.woxi-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.woxi-head h2 { font-size: 20px; font-weight: 800; }
.woxi-head h3 { font-size: 16px; font-weight: 800; }
.woxi-head a { font-size: 14px; font-weight: 700; color: #186aff; }
.woxi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.woxi-ad { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; line-height: 1.35; }
.woxi-ad img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--soft); margin-bottom: 6px; }
.woxi-ad b { font-size: 15px; }
.woxi-ad small { color: var(--muted); font-size: 12px; }
.woxi-mini { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

@media (max-width: 820px) {
  .wx-main > b { font-size: 44px; }
  .wx-facts { gap: 14px; flex-wrap: wrap; }
  .wx-hours { grid-template-columns: repeat(8, 64px); }
  .wx-days { padding: 16px; }
  .wx-day { grid-template-columns: 1fr 36px auto; grid-template-areas: "d i t" "x x x"; row-gap: 2px; }
  .wx-d { grid-area: d; } .wx-day .wx-ico { grid-area: i; } .wx-temp { grid-area: t; text-align: right; } .wx-t { display: none; } .wx-x { grid-area: x; }
  .fx-cards { grid-template-columns: 1fr; }
  .fx-conv, .fx-table, .woxi-box { padding: 16px; }
  .woxi-grid { grid-template-columns: 1fr 1fr; }
}
