:root{
  --bg:#0b0e14;
  --bg-elevated:#141821;
  --ink:#f2efe6;
  --ink-dim:#939aa8;
  --accent:#e8a33d;
  --accent-2:#4f89a8;
  --line:#232936;
}
*{box-sizing:border-box;margin:0;padding:0}
html{color-scheme:dark;scroll-behavior:smooth}
body{background:var(--bg);color:var(--ink);font-family:'Manrope',system-ui,sans-serif;line-height:1.55;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.wrap{max-width:1160px;margin:0 auto;padding:0 24px}

.site-header{padding-top:28px}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;padding-bottom:18px}
.wordmark{font-family:'Unbounded',sans-serif;font-weight:700;font-size:22px;letter-spacing:-0.01em}
.wordmark.small{font-size:16px;color:var(--ink-dim)}
.main-nav{display:flex;gap:28px;flex-wrap:wrap}
.main-nav a{font-size:15px;color:var(--ink-dim);transition:color .15s}
.main-nav a:hover{color:var(--ink)}
.river-line{display:block;width:100%;height:14px}
.river-line path{fill:none;stroke:var(--accent);stroke-width:1.4;opacity:.55}

/* HERO */
.hero{padding:52px 24px 44px}
.hero-meta{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.tag{font-size:14px;color:var(--accent)}
.dot-sep{width:4px;height:4px;background:var(--ink-dim);display:inline-block;border-radius:50%;vertical-align:middle}
.time{font-size:14px;color:var(--ink-dim)}
.hero-title{
  font-family:'Unbounded',sans-serif;
  font-weight:700;
  font-size:clamp(26px,3.6vw,40px);
  line-height:1.12;
  letter-spacing:-0.015em;
  max-width:24ch;
  text-wrap:balance;
  animation:rise .6s ease-out;
}
.hero-title a:hover{color:var(--accent)}
.hero-excerpt{margin-top:18px;max-width:64ch;font-size:17px;color:var(--ink-dim);line-height:1.6}
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@media (prefers-reduced-motion:reduce){.hero-title{animation:none}}

/* GRID */
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--line);border:1px solid var(--line);margin-top:8px}
.card{background:var(--bg);padding:26px 22px;display:flex;flex-direction:column;gap:12px;transition:background .15s}
.card:hover{background:var(--bg-elevated)}
.card-wide{grid-column:span 2}
.card-meta{display:flex;align-items:center;gap:10px}
.card-title{
  font-family:'Unbounded',sans-serif;
  font-weight:500;
  font-size:clamp(16px,1.5vw,19px);
  line-height:1.3;
  letter-spacing:-0.005em;
  text-wrap:balance;
}
.card-wide .card-title{font-size:clamp(18px,1.9vw,23px)}
.card-title a:hover{color:var(--accent)}
.card-excerpt{margin-top:8px;font-size:14.5px;color:var(--ink-dim);line-height:1.55}

/* ARTICLE PAGE */
.article-page{padding:48px 24px 64px;max-width:820px;margin:0 auto}
.article-title{
  font-family:'Unbounded',sans-serif;
  font-weight:700;
  font-size:clamp(24px,3vw,36px);
  line-height:1.15;
  letter-spacing:-0.015em;
  max-width:26ch;
  text-wrap:balance;
  margin-bottom:8px;
}
.article-cover{width:100%;max-height:520px;object-fit:cover;margin:24px 0;border-radius:4px}
.article-body{margin-top:24px;max-width:70ch}
.article-body p{margin-bottom:20px;font-size:17px;line-height:1.7;color:#e6e2d8}
.article-body p:first-of-type::first-letter{
  font-family:'Unbounded',sans-serif;
  font-weight:700;
  font-size:2.4em;
  float:left;
  line-height:0.95;
  margin:4px 12px 0 0;
  color:var(--accent);
}
.article-video{margin-top:24px;font-size:15px}
.article-video a{color:var(--accent);border-bottom:1px solid var(--accent)}

/* FOOTER */
.site-footer{border-top:1px solid var(--line);margin-top:64px}
.footer-inner{padding:32px 24px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px}
.footer-links{display:flex;gap:20px}
.footer-links a{font-size:14px;color:var(--ink-dim)}
.footer-links a:hover{color:var(--accent)}
.colophon{width:100%;font-size:13px;color:var(--ink-dim);margin-top:8px}

@media (max-width:900px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .card-wide{grid-column:span 2}
}
@media (max-width:640px){
  .grid{grid-template-columns:1fr}
  .card-wide{grid-column:span 1}
  .hero{padding:36px 20px 32px}
  .hero-title{font-size:clamp(22px,6vw,30px)}
  .article-page{padding:32px 20px 48px}
}

/* ARTICLE META */
.article-meta{display:flex;align-items:center;gap:10px;margin-bottom:18px;flex-wrap:wrap}
.article-lead{font-size:19px;line-height:1.55;color:#c9c5bc;margin:6px 0 24px;max-width:70ch;font-weight:500}

/* SECTIONS */
.section{margin-top:56px}
.section-head{display:flex;align-items:baseline;justify-content:space-between;
gap:16px;margin-bottom:20px;padding-bottom:12px;
border-bottom:2px solid var(--accent)}
.section-title{font-family:'Unbounded',sans-serif;font-weight:700;
font-size:clamp(20px,2.6vw,28px);letter-spacing:-0.01em;margin:0}
.section-more{font-size:14px;color:var(--accent);white-space:nowrap}
.section-more:hover{text-decoration:underline}

.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}

.grid-2 .card,
.grid-3 .card{background:var(--bg);border:1px solid var(--line);
padding:22px 20px;border-radius:8px;transition:background .15s,border-color .15s}
.grid-2 .card:hover,
.grid-3 .card:hover{background:var(--bg-elevated);border-color:var(--accent)}

@media(max-width:900px){
  .grid-2{grid-template-columns:1fr 1fr}
  .grid-3{grid-template-columns:1fr 1fr}
}
@media(max-width:640px){
  .grid-2,.grid-3{grid-template-columns:1fr}
  .section{margin-top:36px}
  .section-head{flex-direction:column;align-items:flex-start;gap:8px}
}

/* LOGO ACCENT */
.wordmark .accent,
.wordmark.small .accent{color:var(--accent)}
.footer-tagline{font-size:13px;color:var(--ink-dim);margin-top:6px}

/* Подзаголовки внутри статьи (для обзоров) */
.article-body .article-h3,
.article-body h3{
  font-family:'Unbounded',sans-serif;
  font-weight:600;
  font-size:clamp(18px,2vw,22px);
  letter-spacing:-0.01em;
  margin:32px 0 14px;
  color:var(--ink);
}
.article-body .article-h3:first-child,
.article-body h3:first-child{margin-top:8px}

/* SEO + a11y */
.skip-link{
  position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;
}
.skip-link:focus{
  position:fixed;left:16px;top:16px;width:auto;height:auto;
  padding:12px 20px;background:var(--accent);color:#050505;
  border-radius:8px;font-weight:700;z-index:1000;
}

/* Хлебные крошки */
.breadcrumbs{display:flex;gap:8px;font-size:13px;color:var(--ink-dim);
margin-bottom:20px;flex-wrap:wrap}
.breadcrumbs a{color:var(--ink-dim);transition:color .15s}
.breadcrumbs a:hover{color:var(--accent)}
.breadcrumbs span[aria-hidden]{opacity:.4}

/* Mobile touch-targets */
@media (hover:none){
  .main-nav a{padding:8px 4px}
  .card-title a{display:block;padding:4px 0}
}

/* Читаемость на мобильных */
@media (max-width:640px){
  body{font-size:16px;line-height:1.6}
  .article-body p{font-size:16.5px;line-height:1.7}
  .hero-excerpt{font-size:16px}
  .card-excerpt{font-size:14px}
  .section-more{font-size:15px}
}

/* Мобильный футер */
@media (max-width:640px){
  .footer-inner{flex-direction:column;align-items:flex-start;gap:20px}
  .footer-links{flex-direction:column;gap:10px}
  .footer-links a{font-size:15px;padding:4px 0}
}

/* Улучшение читаемости обзоров */
.article-body .article-h3{
  margin-top:36px;
  padding-top:18px;
  border-top:1px solid var(--line);
}

/* Изображения */
img{max-width:100%;height:auto}
.article-cover{background:var(--bg-elevated)}

/* HERO-обложка */
.hero-cover-link{display:block;margin-bottom:20px;border-radius:8px;overflow:hidden}
.hero-cover{width:100%;max-height:480px;object-fit:cover;display:block}

/* Карточки с обложками */
.card-with-cover{padding:0;overflow:hidden}
.card-cover-link{display:block;overflow:hidden;background:var(--bg-elevated)}
.card-cover{
  width:100%;
  aspect-ratio:16/10;
  object-fit:cover;
  display:block;
  transition:transform .3s ease;
}
.card-cover-link:hover .card-cover{transform:scale(1.03)}
.card-content{padding:20px}
.card-with-cover .card-title{margin-bottom:8px}

/* Обрезка обложек на странице статьи — не режем, показываем как есть */
.article-cover{
  width:100%;
  height:auto;
  max-height:none;
  object-fit:contain;
  margin:24px 0;
  border-radius:6px;
  display:block;
  background:var(--bg-elevated);
}

@media (max-width:640px){
  .hero-cover{max-height:280px}
  .card-cover{aspect-ratio:16/10}
}

/* SEARCH */
.search-page{padding:48px 24px 64px;max-width:900px;margin:0 auto}
.search-form{margin:24px 0 32px}
.search-input{
  width:100%;padding:16px 18px;font-size:17px;
  background:var(--bg-elevated);color:var(--ink);
  border:1px solid var(--line);border-radius:10px;
  font-family:inherit;
}
.search-input:focus{outline:2px solid var(--accent);border-color:transparent}
.search-filters{
  display:grid;grid-template-columns:1fr 1fr 1fr auto;
  gap:12px;margin-top:14px;align-items:end;
}
.search-filter label{
  display:block;font-size:12px;color:var(--ink-dim);
  text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px;
}
.search-filter select,
.search-filter input{
  width:100%;padding:11px 12px;background:var(--bg-elevated);
  color:var(--ink);border:1px solid var(--line);border-radius:8px;
  font-family:inherit;font-size:15px;
}
.search-quick{
  display:flex;flex-wrap:wrap;gap:10px;align-items:center;
  margin-top:14px;font-size:13px;color:var(--ink-dim);
}
.search-quick a{
  padding:5px 10px;border:1px solid var(--line);border-radius:14px;
  color:var(--ink-dim);transition:.15s;
}
.search-quick a:hover{border-color:var(--accent);color:var(--accent)}
.search-count{color:var(--ink-dim);margin-bottom:20px;font-size:15px}
.search-count b{color:var(--ink)}
.search-hint{color:var(--ink-dim);font-size:15px;line-height:1.6}
.search-list{display:flex;flex-direction:column;gap:16px}
.search-item{
  display:grid;grid-template-columns:180px 1fr;gap:16px;
  padding:16px;background:var(--bg-elevated);border:1px solid var(--line);
  border-radius:10px;transition:border-color .15s;
}
.search-item:hover{border-color:var(--accent)}
.search-item-cover-link{display:block;overflow:hidden;border-radius:8px}
.search-item-cover{
  width:100%;aspect-ratio:16/10;object-fit:cover;display:block;
}
.search-item-content{display:flex;flex-direction:column;gap:8px;min-width:0}
.search-item-title{
  font-family:'Unbounded',sans-serif;font-weight:500;
  font-size:18px;line-height:1.25;margin:0;
}
.search-item-title a:hover{color:var(--accent)}
.search-item-excerpt{color:var(--ink-dim);font-size:14px;line-height:1.5;margin:0}

.nav-search{
  padding:0 10px;border-left:1px solid var(--line);
  margin-left:4px;color:var(--accent) !important;
  font-weight:600;
}

@media (max-width:720px){
  .search-filters{grid-template-columns:1fr 1fr;gap:10px}
  .search-filters .btn{grid-column:span 2}
  .search-item{grid-template-columns:1fr}
  .search-item-cover{aspect-ratio:16/9}
}

/* ==== ФИНАЛЬНЫЙ ФИКС КАРТОЧЕК С ОБЛОЖКАМИ (переопределяет всё выше) ==== */
.card.card-with-cover{
  display: block !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.card.card-with-cover .card-cover-link{
  display: block !important;
  width: 100% !important;
  height: 200px !important;
  max-height: 200px !important;
  overflow: hidden !important;
  position: relative !important;
  background: var(--bg-elevated);
  flex: none !important;
}
.card.card-with-cover img.card-cover{
  width: 100% !important;
  height: 200px !important;
  max-height: 200px !important;
  object-fit: cover !important;
  object-position: center !important;
  aspect-ratio: auto !important;
  display: block !important;
}
.card.card-with-cover .card-content{
  display: block !important;
  padding: 20px !important;
}

/* Grid-2 (Главное) — обложки повыше */
.grid-2 .card.card-with-cover .card-cover-link,
.grid-2 .card.card-with-cover img.card-cover{
  height: 260px !important;
  max-height: 260px !important;
}

/* Hero */
.hero-cover-link{
  display: block !important;
  width: 100% !important;
  height: 420px !important;
  max-height: 420px !important;
  overflow: hidden !important;
  border-radius: 8px;
  margin-bottom: 20px;
}
img.hero-cover{
  width: 100% !important;
  height: 420px !important;
  max-height: 420px !important;
  object-fit: cover !important;
  object-position: center !important;
  aspect-ratio: auto !important;
  display: block !important;
}

/* Мобильные */
@media (max-width: 640px){
  .card.card-with-cover .card-cover-link,
  .card.card-with-cover img.card-cover{
    height: 180px !important;
    max-height: 180px !important;
  }
  .grid-2 .card.card-with-cover .card-cover-link,
  .grid-2 .card.card-with-cover img.card-cover{
    height: 200px !important;
    max-height: 200px !important;
  }
  .hero-cover-link,
  img.hero-cover{
    height: 240px !important;
    max-height: 240px !important;
  }
}

/* Страница статьи — НЕ режем обложку, показываем целиком */
.article-cover{
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  aspect-ratio: auto !important;
}
