:root {
  --bg: #ffffff;
  --surface: #f4f6fa;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1f5eff;
  --accent-soft: #e8efff;
  --radius: 12px;
  --font: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: Georgia, "PT Serif", "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --surface: #181b22; --text: #e8eaef; --muted: #9aa1ad;
    --line: #262a33; --accent: #6d97ff; --accent-soft: #1b2440;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 14px; letter-spacing: -.03em; }
.search-form input, .search-big input {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px; width: 220px; outline: none;
}
.search-form input:focus, .search-big input:focus { border-color: var(--accent); }
.rubrics { border-top: 1px solid var(--line); }
.rubrics-row { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; height: 44px; align-items: center; white-space: nowrap; font-size: 14px; font-weight: 600; }
.rubrics-row::-webkit-scrollbar { display: none; }
.rubrics-row a { color: var(--muted); }
.rubrics-row a:hover, .rubrics-row a.active { color: var(--accent); }

main { padding-top: 28px; padding-bottom: 48px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 14px; }
.page-title { font-size: 34px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 24px; }
.empty { color: var(--muted); padding: 40px 0; }

/* Home top */
.top { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; margin-bottom: 28px; }
.latest ul { list-style: none; margin: 0; padding: 0; }
.latest li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.latest li:first-child { padding-top: 0; }
.latest time { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.latest a { font-weight: 600; line-height: 1.35; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 24px; }
.card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-img { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.03); }
.card-meta { font-size: 13px; color: var(--muted); }
.card-meta a { color: var(--accent); font-weight: 600; }
.card-title { font-size: 18px; line-height: 1.3; margin: 4px 0 0; letter-spacing: -.01em; }
.card.hero .card-img { aspect-ratio: 16 / 9; }
.card.hero .card-title { font-size: 32px; line-height: 1.15; letter-spacing: -.02em; }
.card-lead { margin: 8px 0 0; color: var(--muted); font-size: 17px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
.tag-cloud a { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.tag-cloud a:hover { background: var(--accent-soft); color: var(--accent); }

.pager { display: flex; justify-content: space-between; margin-top: 40px; font-weight: 600; }
.pager a { color: var(--accent); }

/* Article */
.article-layout { display: grid; grid-template-columns: minmax(0, 720px) 1fr; gap: 56px; margin-bottom: 48px; }
.article h1 { font-size: 38px; line-height: 1.15; letter-spacing: -.02em; margin: 10px 0 18px; }
.article .lead { font-size: 21px; line-height: 1.5; font-weight: 500; margin: 0 0 24px; }
.article .lead a, .article .source a, .prose a { color: var(--accent); border-bottom: 1px solid currentColor; }
.article p { font-family: var(--serif); font-size: 19px; line-height: 1.65; margin: 0 0 20px; }
.article .lead, .article .source { font-family: var(--font); }
.article figure { margin: 0 0 28px; }
.article figure img { width: 100%; border-radius: var(--radius); }
.article figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.article .source { font-size: 15px; color: var(--muted); margin-top: 28px; }
.article .tag-cloud { margin-top: 20px; }

.prose { max-width: 720px; }
.prose p, .prose li { font-size: 18px; }

/* Search */
.search-big input { width: 100%; max-width: 720px; font-size: 18px; padding: 12px 20px; }
.search-results { list-style: none; padding: 0; max-width: 720px; }
.search-results li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.search-results a { font-size: 20px; font-weight: 700; }
.search-results p { margin: 6px 0 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0; font-size: 14px; }
.footer-row { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-row p { max-width: 520px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 900px) {
  .top, .article-layout { grid-template-columns: 1fr; }
  .article-layout .latest { display: none; }
  .card.hero .card-title { font-size: 26px; }
  .article h1 { font-size: 30px; }
  .article .lead { font-size: 19px; }
  .article p { font-size: 18px; }
}
@media (max-width: 560px) {
  .search-form input { width: 130px; }
  .logo-text { font-size: 17px; }
  .page-title { font-size: 28px; }
}
