/* ================================================================
   MUR-MAYU.RU — «МУР-МЯУ» MODERN DESIGN SYSTEM
   Full template redesign, 2026-10-06
   Cat-themed: warm cream + charcoal + amber accent, playful yet
   professional. Light + dark (auto), fully responsive.
   Single stylesheet — replaces all legacy CSS.
   ================================================================ */

/* ---------- Tokens ---------- */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --bg: #f6f1ea;
  --surface: #fffdf9;
  --surface-2: #f2ebe1;
  --text: #262019;
  --muted: #75695c;
  --faint: #a2937f;
  --border: #e6dccc;
  --border-strong: #d3c5ae;
  --accent: #e07b28;
  --accent-hover: #c96a1c;
  --accent-soft: #fbeadb;
  --accent-2: #3a8577;
  --accent-2-soft: #e2f0ed;
  --danger: #d64545;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(38,32,25,.05), 0 2px 8px rgba(38,32,25,.06);
  --shadow: 0 6px 24px rgba(38,32,25,.09);
  --shadow-lg: 0 16px 48px rgba(38,32,25,.14);
  --maxw: 1180px;
  --readw: 780px;
  --transition: .18s cubic-bezier(.4,0,.2,1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110d;
    --surface: #1d1913;
    --surface-2: #262019;
    --text: #f0e8dc;
    --muted: #a89a89;
    --faint: #7c7060;
    --border: #2f2820;
    --border-strong: #3d342a;
    --accent: #f08c3a;
    --accent-hover: #f79d52;
    --accent-soft: #332417;
    --accent-2: #4fa393;
    --accent-2-soft: #1c2b28;
    --danger: #e06060;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 6px 24px rgba(0,0,0,.45);
    --shadow-lg: 0 16px 48px rgba(0,0,0,.55);
  }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
h1,h2,h3,h4,h5 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.3px; color: var(--text); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 0; }
::selection { background: var(--accent); color: #fff; }
font { color: inherit; font-size: inherit; font-family: inherit; } /* neutralize legacy <font> */
.pngfix, #bg-2, #bg-3, #bg-4, #bg-6 { display: none !important; }
.thide { display: none !important; }
.clear, .clr { clear: both; }
b, strong { font-weight: 700; color: var(--text); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
#wrapper { max-width: var(--maxw); margin: 0 auto; }
#content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin: 22px 0 40px;
  min-height: 400px;
}
#posts { width: 100%; }

/* ---------- Header ---------- */
#site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #f0a35e);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.logo-text { line-height: 1.1; }
.logo-text .logo-name { font-size: 21px; font-weight: 800; letter-spacing: -.5px; color: var(--text); }
.logo-text .logo-slogan { font-size: 11px; color: var(--muted); letter-spacing: .3px; }

/* Nav */
#main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
#main-nav a {
  display: inline-block; padding: 8px 13px; border-radius: 999px;
  color: var(--muted); font-size: 14px; font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
#main-nav a:hover { background: var(--accent-soft); color: var(--accent); }
#main-nav a.active { background: var(--accent); color: #fff; }

/* Search */
.header-search { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.header-search input[type="text"] {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 9px 16px; color: var(--text);
  font-size: 14px; font-family: var(--font); width: 190px;
  transition: border-color var(--transition), box-shadow var(--transition), width var(--transition);
}
.header-search input[type="text"]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); width: 230px;
}
.header-search input[type="submit"] {
  background: var(--accent); color: #fff; border: none;
  border-radius: 999px; padding: 9px 18px; font-weight: 700;
  font-size: 14px; cursor: pointer; font-family: var(--font);
  transition: background var(--transition), transform var(--transition);
}
.header-search input[type="submit"]:hover { background: var(--accent-hover); transform: translateY(-1px); }
#sign-in { font-size: 13px; color: var(--muted); }
#sign-in a { color: var(--muted); font-weight: 600; }
#sign-in a:hover { color: var(--accent); }

/* ---------- Hero slider (homepage) ---------- */
#features { padding: 0; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.hero-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 210px; display: flex; align-items: flex-end;
  background: var(--surface-2) center/cover no-repeat;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.hero-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.hero-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,17,13,0) 30%, rgba(20,17,13,.78) 100%);
}
.hero-card a {
  position: relative; z-index: 1; display: block;
  padding: 18px 20px; color: #fff; width: 100%;
}
.hero-card a h2 {
  color: #fff; font-size: 19px; font-weight: 750; margin: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,.4); line-height: 1.3;
}
.hero-card:hover a h2 { color: #ffd9b3; }
.hero-card .hero-cat {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  background: rgba(255,255,255,.2); backdrop-filter: blur(4px);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}

/* ---------- Homepage sections ---------- */
.home-cols {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 22px;
  margin-top: 26px;
}
.home-col { min-width: 0; }
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text);
  padding-bottom: 10px; margin-bottom: 14px;
  border-bottom: 2px solid var(--border);
}
.section-title .st-ico { font-size: 17px; }
.section-title a { color: inherit; }
.section-title a:hover { color: var(--accent); }

/* News feature card */
.news-feature {
  display: grid; grid-template-columns: 150px 1fr; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; margin-bottom: 12px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.news-feature:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.news-feature .nf-img {
  border-radius: var(--radius-sm); overflow: hidden;
  aspect-ratio: 3/2; background: var(--surface-2);
}
.news-feature .nf-img img { width: 100%; height: 100%; object-fit: cover; }
.news-feature h5 { margin: 0 0 6px; font-size: 15px; font-weight: 700; line-height: 1.35; }
.news-feature h5 a { color: var(--text); }
.news-feature h5 a:hover { color: var(--accent); }

/* Link lists */
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li {
  padding: 9px 0; border-bottom: 1px solid var(--border);
  display: flex; gap: 10px; align-items: baseline;
}
.link-list li:last-child { border-bottom: none; }
.link-list li::before {
  content: "🐾"; font-size: 11px; flex-shrink: 0; opacity: .7;
}
.link-list li a { color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.4; }
.link-list li a:hover { color: var(--accent); }

/* Category list cards (breeds / health / food) */
.cat-list-card {
  display: grid; grid-template-columns: 120px 1fr; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; margin-bottom: 12px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.cat-list-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-list-card .cl-img {
  border-radius: var(--radius-sm); overflow: hidden;
  aspect-ratio: 1; background: var(--surface-2);
}
.cat-list-card .cl-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-list-card h2 { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.cat-list-card h2 a { color: var(--text); }
.cat-list-card h2 a:hover { color: var(--accent); }

/* Food highlight card */
.food-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.food-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.food-card .fc-img {
  border-radius: var(--radius-sm); overflow: hidden;
  aspect-ratio: 16/10; background: var(--surface-2); margin-bottom: 12px;
}
.food-card .fc-img img { width: 100%; height: 100%; object-fit: cover; }
.food-card h2 { font-size: 16px; font-weight: 750; margin-bottom: 8px; }
.food-card h2 a { color: var(--text); }
.food-card h2 a:hover { color: var(--accent); }
.food-card .more-link { font-size: 13px; font-weight: 700; }

/* Tip of the day */
.tip-card {
  background: linear-gradient(135deg, var(--accent-soft), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius); padding: 18px;
}
.tip-card h2 {
  font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .8px; color: var(--accent); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.tip-card .tip a { color: var(--text); font-weight: 600; font-size: 15px; }
.tip-card .tip a:hover { color: var(--accent); }
.tip-card .more-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; }

/* Q&A block */
.qa-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.qa-card blockquote {
  margin: 0 0 12px; padding: 12px 16px;
  border-left: 4px solid var(--accent-2);
  background: var(--accent-2-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 600;
}
.qa-card blockquote a { color: var(--text); }
.qa-card blockquote a:hover { color: var(--accent-2); }
.qa-meta { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.qa-meta a { color: var(--muted); font-weight: 600; }
.qa-meta a:hover { color: var(--accent); }

/* Popular topics */
.popular-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}

/* Vet finder */
.vet-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.vet-card .vc-title {
  font-size: 15px; font-weight: 800; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.vet-card form { display: flex; gap: 8px; }
.vet-card input[type="text"] {
  flex: 1; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  color: var(--text); font-size: 14px; font-family: var(--font);
}
.vet-card input[type="text"]:focus { outline: none; border-color: var(--accent); }
.vet-card input[type="submit"] {
  background: var(--accent-2); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 10px 16px;
  font-weight: 700; font-size: 14px; cursor: pointer; font-family: var(--font);
  transition: filter var(--transition);
}
.vet-card input[type="submit"]:hover { filter: brightness(1.1); }
.vet-links { margin-top: 12px; }
.vet-links p { margin: 6px 0; font-size: 14px; }
.vet-links a { color: var(--text); font-weight: 500; }
.vet-links a:hover { color: var(--accent); }

/* Breed search */
.breed-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.breed-card .bc-title { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.breed-card input[type="text"] {
  width: 100%;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  color: var(--text); font-size: 14px; font-family: var(--font);
  margin-bottom: 10px;
}
.breed-card input[type="text"]:focus { outline: none; border-color: var(--accent); }
.breed-card .system-text { font-size: 13px; }

/* ---------- Article page ---------- */
.breadcrumb { font-size: 13px; color: var(--faint); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); font-weight: 600; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 6px; opacity: .5; }

.article-title {
  font-size: 36px; font-weight: 800; letter-spacing: -.8px;
  line-height: 1.18; margin: 0 0 14px;
}
.article-meta {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  font-size: 13px; color: var(--muted);
  padding-bottom: 16px; margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.article-meta .meta-item { display: flex; align-items: center; gap: 6px; }
.article-meta .meta-cat {
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.article-meta .meta-cat a { color: inherit; }

/* Article image (from Xfield) */
.article-hero-img {
  border-radius: var(--radius); overflow: hidden;
  margin: 0 0 26px; box-shadow: var(--shadow-sm);
  background: var(--surface-2);
}
.article-hero-img img {
  display: block; width: 100%; height: auto;
  max-height: 460px; object-fit: cover;
  border: none !important; margin: 0 !important;
}

/* Reading column */
.entry {
  font-size: 17px; line-height: 1.75; color: var(--text);
  max-width: var(--readw);
}
.entry > p:first-child { font-size: 18px; color: var(--muted); }
.entry p { margin: 0 0 1.15em; }
.entry h2 { font-size: 26px; font-weight: 800; margin: 1.6em 0 .6em; letter-spacing: -.4px; }
.entry h3 {
  font-size: 21px; font-weight: 750; margin: 1.7em 0 .7em;
  padding-bottom: 8px; position: relative;
}
.entry h3::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 44px; height: 3px; border-radius: 2px;
  background: var(--accent);
}
.entry h4 { font-size: 17px; font-weight: 700; margin: 1.4em 0 .5em; }
.entry ul, .entry ol { margin: 0 0 1.2em; padding-left: 8px; list-style: none; }
.entry ul li { position: relative; padding-left: 26px; margin: 9px 0; }
.entry ul li::before {
  content: "🐾"; position: absolute; left: 0; top: 1px;
  font-size: 13px; opacity: .65;
}
.entry ol { counter-reset: entry-ol; }
.entry ol li { position: relative; padding-left: 34px; margin: 10px 0; counter-increment: entry-ol; }
.entry ol li::before {
  content: counter(entry-ol);
  position: absolute; left: 0; top: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.entry a { text-underline-offset: 3px; }
.entry a:hover { text-decoration: underline; }
.entry img { border-radius: var(--radius-sm); }
.entry div img { border: none !important; margin: 14px 0 !important; }
.entry blockquote {
  margin: 1.4em 0; padding: 14px 20px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.entry hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.entry table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 15px; }
.entry th, .entry td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; vertical-align: top; }
.entry th { background: var(--surface-2); font-weight: 700; }
.entry td small { color: var(--muted); font-size: 12.5px; }
.entry table ul { margin: 4px 0 0; padding-left: 18px; }
.entry table ul li { margin-bottom: 4px; }
.entry table p { margin: 6px 0 0; }

/* Wide tables: horizontal scroll on small screens */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.2em 0; border: 1px solid var(--border); border-radius: var(--radius); }
.tbl-scroll table { margin: 0; min-width: 640px; }
.tbl-wide td, .tbl-wide th { white-space: nowrap; font-size: 13.5px; padding: 8px 10px; }
.tbl-wide thead th { position: sticky; top: 0; }

/* 2-column SI table: zebra + compact */
.tbl-si tbody tr:nth-child(odd) { background: var(--surface-2); }
.tbl-si td:last-child { white-space: nowrap; font-weight: 600; text-align: right; }

/* Mobile: 4-column reference tables become stacked cards */
@media (max-width: 768px) {
  .entry .tbl-cards, .entry .tbl-cards thead, .entry .tbl-cards tbody,
  .entry .tbl-cards tr, .entry .tbl-cards td { display: block; }
  .entry .tbl-cards thead { display: none; }
  .entry .tbl-cards tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 0 0 14px;
    padding: 4px;
    background: var(--surface);
    box-shadow: var(--shadow-sm, none);
  }
  .entry .tbl-cards td {
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 14px;
  }
  .entry .tbl-cards td:last-child { border-bottom: none; }
  .entry .tbl-cards td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
    margin-bottom: 4px;
  }
  .entry .tbl-cards td:first-child::before { content: none; }
  .entry .tbl-cards td:first-child { font-size: 15px; }
  .tbl-si td { font-size: 14px; }
  .tbl-si td:last-child { font-size: 14px; }
}

/* Callout blocks (Совет эксперта / Золотое правило) */
.entry .callout,
.entry div[style*="background"] {
  background: linear-gradient(135deg, var(--accent-soft), var(--surface)) !important;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent) !important;
  border-left: 5px solid var(--accent) !important;
  border-radius: 0 var(--radius) var(--radius) 0 !important;
  padding: 18px 22px !important;
  margin: 1.6em 0 !important;
  box-shadow: var(--shadow-sm);
}
.entry .callout .callout-title,
.entry div[style*="background"] strong:first-child {
  display: block; font-size: 14px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px;
  color: var(--accent) !important; margin-bottom: 8px;
  font-style: normal;
}

/* Related articles */
.related {
  margin-top: 40px; padding-top: 24px;
  border-top: 2px solid var(--border);
}
.related h2 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.related li:last-child { border-bottom: none; }
.related li a { color: var(--text); font-weight: 500; }
.related li a:hover { color: var(--accent); padding-left: 6px; }

/* Navigation / pagination */
.pagination-wrap {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-top: 26px;
}
.page-nav a {
  display: inline-block; padding: 9px 18px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--text); transition: all var(--transition);
}
.page-nav a:hover { border-color: var(--accent); color: var(--accent); }
.pages a, .pages b, .pages span {
  display: inline-block; padding: 7px 13px; margin: 2px;
  border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text);
}
.pages b { background: var(--accent); border-color: var(--accent); color: #fff; }
.pages a:hover { border-color: var(--accent); color: var(--accent); }
.to-top { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- Category / list pages ---------- */
.cat-page-title {
  font-size: 32px; font-weight: 800; letter-spacing: -.5px;
  margin: 0 0 20px; padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}
.cat-page-title:empty { display: none; }
.list-header { margin-bottom: 22px; }
.list-header h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 6px; }
.list-header p { color: var(--muted); margin: 0; }

.story-list { display: grid; gap: 16px; }
.story-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.story-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.story-item .si-img {
  border-radius: var(--radius-sm); overflow: hidden;
  aspect-ratio: 16/11; background: var(--surface-2);
}
.story-item .si-img img { width: 100%; height: 100%; object-fit: cover; border: none !important; }
.story-item h2, .story-item h3 { font-size: 18px; font-weight: 750; margin: 0 0 8px; line-height: 1.3; }
.story-item h2 a, .story-item h3 a { color: var(--text); }
.story-item h2 a:hover, .story-item h3 a:hover { color: var(--accent); }
.story-item .si-text { font-size: 14.5px; color: var(--muted); margin-bottom: 10px; }
.story-item .si-more { font-size: 14px; font-weight: 700; }
.story-item .si-meta { font-size: 12.5px; color: var(--faint); margin-top: 8px; }

/* Short/full preview (preview.tpl) */
.base { margin-bottom: 18px; }
.dpad { padding: 16px 18px; }
.btl { font-size: 18px; font-weight: 750; margin-bottom: 8px; }
.btl a { color: var(--text); }
.btl a:hover { color: var(--accent); }
.bhinfo { font-size: 13px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 14px; flex-wrap: wrap; }
.maincont { font-size: 15px; color: var(--muted); }
.mlink {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 18px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
}
.mlink .argmore a { font-weight: 700; }
.mlink .argcat { margin-left: auto; }

/* ---------- Search results ---------- */
.search-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px;
}
.search-item h3 { font-size: 17px; font-weight: 750; margin-bottom: 6px; }
.search-item h3 a { color: var(--text); }
.search-item h3 a:hover { color: var(--accent); }
.search-item .si-meta { font-size: 13px; color: var(--faint); margin-bottom: 8px; }
.search-item .maincont { font-size: 14.5px; color: var(--muted); }
.search-form {
  display: flex; gap: 10px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
}
.search-form input[type="text"] {
  flex: 1; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 11px 18px; color: var(--text);
  font-size: 15px; font-family: var(--font);
}
.search-form input[type="text"]:focus { outline: none; border-color: var(--accent); }
.search-form input[type="submit"] {
  background: var(--accent); color: #fff; border: none;
  border-radius: 999px; padding: 11px 22px; font-weight: 700;
  font-size: 15px; cursor: pointer; font-family: var(--font);
}
.search-form input[type="submit"]:hover { background: var(--accent-hover); }

/* ---------- Static pages ---------- */
.basecont .dpad { padding: 6px 4px; }
.heading { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 16px; }
.storenumber { margin-top: 24px; }

/* ---------- Comments ---------- */
#comments { font-size: 20px; font-weight: 800; margin: 36px 0 18px;
  padding-left: 14px; border-left: 4px solid var(--accent); }
.commentlist { list-style: none; padding: 0; margin: 0; }
.commentlist li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px;
}
.commentlist cite { font-style: normal; font-weight: 700; color: var(--text); }
.commentlist .com-date { font-size: 12.5px; color: var(--faint); margin-left: 8px; }
.commentlist p { margin: 8px 0 0; font-size: 15px; }
.comedit { margin-top: 10px; font-size: 13px; }
.comedit a { margin-right: 12px; color: var(--muted); font-weight: 600; }
.comedit a:hover { color: var(--danger); }

/* Comment form */
#addcform {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-top: 20px;
}
#addcform h3 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
#addcform p { margin: 10px 0; }
#addcform input[type="text"], #addcform textarea {
  width: 100%; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; color: var(--text); font-size: 15px; font-family: var(--font);
}
#addcform input:focus, #addcform textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
#addcform label { font-size: 13px; color: var(--muted); display: block; margin-top: 4px; }
#addcform .req { color: var(--danger); }
#addcform input[name="submit"] {
  width: auto; background: var(--accent); color: #fff; border: none;
  border-radius: 999px; padding: 12px 28px; font-weight: 700;
  font-size: 15px; cursor: pointer; font-family: var(--font);
  transition: background var(--transition);
}
#addcform input[name="submit"]:hover { background: var(--accent-hover); }

/* ---------- Sidebar (article page) ---------- */
#sidebar ul { list-style: none; padding: 0; margin: 0; }
#sidebar .side-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
#sidebar .side-title {
  font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted); margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
#sidebar .side-block p { font-size: 14px; color: var(--muted); }
#sidebar .side-block ul li { padding: 8px 0; border-bottom: 1px solid var(--border); }
#sidebar .side-block ul li:last-child { border-bottom: none; }
#sidebar .side-block ul li a { color: var(--text); font-size: 14px; font-weight: 500; }
#sidebar .side-block ul li a:hover { color: var(--accent); }
#searchform { display: flex; flex-direction: column; gap: 8px; }
#searchform input[type="text"] {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text); font-size: 14px;
}
#searchform input[type="submit"] {
  width: 100%; background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 10px; font-weight: 700;
  font-size: 14px; cursor: pointer; font-family: var(--font);
}
#searchform input[type="submit"]:hover { background: var(--accent-hover); }

/* ---------- Footer ---------- */
#footer {
  background: #191512; color: #cbbfae;
  border-radius: var(--radius-lg); margin-top: 10px;
  padding: 36px 0 24px;
}
@media (prefers-color-scheme: dark) {
  #footer { background: #0e0c09; border: 1px solid var(--border); }
}
.footer-grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px;
}
.footer-brand .logo-name { font-size: 20px; font-weight: 800; color: #fff; }
.footer-brand p { font-size: 13.5px; color: #9a8d7c; margin-top: 10px; line-height: 1.6; }
.footer-col h3 {
  font-size: 12.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: #8d8070; margin-bottom: 14px;
  width: auto; height: auto; text-indent: 0; background: none;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 5px 0; }
.footer-col a { color: #cbbfae; font-size: 14px; transition: color var(--transition); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--maxw); margin: 26px auto 0; padding: 18px 20px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: #7d715f;
}
.footer-bottom a { color: #9a8d7c; margin-left: 14px; }
.footer-bottom a:hover { color: var(--accent); }
#footer .system-text { font-size: 12px; color: #7d715f; }
#schetchik { margin-top: 14px; }

/* ---------- Misc DLE bits ---------- */
#extra-nav { display: none; }
.informer { font-size: 14px; }
.informer p { margin: 4px 0; }
.bcomment {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.bcomment .dtop { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.bcomment .dtop img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.bcomment h4 { margin: 0; font-size: 15px; }
.bcomment .cominfo { font-size: 12.5px; color: var(--faint); }
.bcomment .dcont h3 { font-size: 15px; margin-bottom: 6px; }

/* Question page (vopros_otvet) */
.questionPage { max-width: var(--readw); }
.questionPage h1 { font-size: 28px; font-weight: 800; }
.question { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
#answers h3 { font-size: 20px; font-weight: 800; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .home-cols { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-search input[type="text"] { width: 140px; }
}
@media (max-width: 768px) {
  #content { padding: 18px 14px; border-radius: var(--radius); margin: 14px 10px 26px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 180px; }
  .home-cols { grid-template-columns: 1fr; gap: 18px; }
  .article-title { font-size: 27px; }
  .entry { font-size: 16px; }
  .entry h3 { font-size: 19px; }
  .story-item { grid-template-columns: 130px 1fr; gap: 12px; }
  .story-item .si-img { aspect-ratio: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .header-inner { gap: 10px; }
  .logo-text .logo-slogan { display: none; }
  #main-nav { overflow-x: auto; flex-wrap: nowrap; max-width: 100%;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  #main-nav::-webkit-scrollbar { display: none; }
  .header-search { width: 100%; margin-left: 0; }
  .header-search input[type="text"] { flex: 1; width: auto; }
  .header-search input[type="text"]:focus { width: auto; }
}
@media (max-width: 420px) {
  .article-title { font-size: 23px; }
  .story-item { grid-template-columns: 1fr; }
  .story-item .si-img { aspect-ratio: 16/9; }
  .news-feature { grid-template-columns: 1fr; }
  .news-feature .nf-img { aspect-ratio: 16/9; }
  .cat-list-card { grid-template-columns: 1fr; }
  .cat-list-card .cl-img { aspect-ratio: 16/9; }
}

/* ---------- Print ---------- */
@media print {
  #site-header, #footer, #sidebar, .header-search, .pagination-wrap,
  #addcform, .related { display: none !important; }
  body { background: #fff; color: #000; }
  #content { border: none; box-shadow: none; padding: 0; }
  .entry { max-width: none; font-size: 12pt; }
  a { color: #000; }
}
