/* Семейная вики — оформление */
:root {
  --bg: #f5f1e8;
  --bg-soft: #efe9dc;
  --surface: #fffdf8;
  --surface-2: #f9f5ec;
  --ink: #202823;
  --ink-soft: #3c453f;
  --muted: #67716a;
  --line: #d9d1c0;
  --line-strong: #c6bba6;
  --accent: #2f5d50;
  --accent-ink: #f4efe3;
  --accent-2: #a97636;
  --link: #245c4c;
  --link-hover: #123b31;
  --mark: #f2dfae;
  --shadow: 0 10px 30px rgba(58, 47, 28, .08);
  --shadow-sm: 0 2px 8px rgba(58, 47, 28, .07);
  --radius: 14px;
  --radius-sm: 9px;
  --serif: Georgia, "Times New Roman", "PT Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #141915;
  --bg-soft: #1b211c;
  --surface: #1d241f;
  --surface-2: #232b25;
  --ink: #e9e5d8;
  --ink-soft: #cfd3c8;
  --muted: #9aa59c;
  --line: #354038;
  --line-strong: #46544a;
  --accent: #8ec4b0;
  --accent-ink: #10201a;
  --accent-2: #d6a45f;
  --link: #a9d6c5;
  --link-hover: #d3eee3;
  --mark: #5a4a1f;
  --shadow: 0 10px 30px rgba(0, 0, 0, .28);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .24);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-decoration-thickness: .06em; text-underline-offset: .18em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--mark); color: var(--ink); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px;
  border-radius: 0 0 8px 8px; text-decoration: none;
}
.skip-link:focus { top: 0; }

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1240px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 42px; height: 42px; border-radius: 50%; box-shadow: var(--shadow-sm); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 19px; letter-spacing: .01em; }
.brand-text small { color: var(--muted); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.search { flex: 1 1 280px; display: flex; max-width: 460px; margin-left: auto; position: relative; }
.search input {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); border-radius: 999px; padding: 9px 44px 9px 16px;
  font: inherit; font-size: 14.5px; box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center;
}
.search button:hover { filter: brightness(1.08); }
.header-nav { display: flex; gap: 16px; font-size: 14px; white-space: nowrap; }
.header-nav a { text-decoration: none; color: var(--ink-soft); }
.header-nav a:hover { color: var(--link); text-decoration: underline; }
.theme-toggle, .menu-toggle {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  flex: none; font-size: 17px;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle { display: none; }

/* Каркас */
.layout {
  max-width: 1240px; margin: 0 auto; padding: 30px 22px 64px;
  display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 36px; align-items: start;
}
.sidebar { position: sticky; top: 86px; max-height: calc(100vh - 108px); overflow: auto; padding-right: 6px; scrollbar-width: thin; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.nav-group { margin-bottom: 22px; }
.nav-group h3 {
  margin: 0 0 8px; font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group li { margin: 1px 0; }
.nav-group a {
  display: block; padding: 5px 10px; border-radius: 7px; text-decoration: none;
  color: var(--ink-soft); font-size: 14.2px; border-left: 2px solid transparent;
}
.nav-group a:hover { background: var(--surface-2); color: var(--link); }
.nav-group a.active { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--link); border-left-color: var(--accent); font-weight: 600; }
.nav-group a.active-trail { color: var(--ink); font-weight: 600; }
.section-tree ul ul { margin-left: 12px; border-left: 1px solid var(--line); padding-left: 4px; }
.section-tree ul ul a { font-size: 13.5px; padding: 4px 8px; }
.section-tree ul ul ul a { font-size: 13px; color: var(--muted); }
.sidebar-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 15px;
  box-shadow: var(--shadow-sm); font-size: 13.2px; color: var(--ink-soft);
}
.sidebar-card h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 15.5px; color: var(--ink); }
.sidebar-card ul { margin: 0; padding-left: 17px; }
.sidebar-card li { margin: 5px 0; }
.sidebar-card .date { color: var(--accent-2); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Контент */
.content { min-width: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; font-size: 12.8px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--link); text-decoration: underline; }
.breadcrumbs .sep { opacity: .55; }
.breadcrumbs .current { color: var(--ink-soft); }
.article-header { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 24px; }
.article-kicker { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; margin-bottom: 7px; }
.article-title { font-family: var(--serif); font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; margin: 0 0 10px; letter-spacing: -.015em; font-weight: 700; }
.article-subtitle { color: var(--muted); font-size: 16.5px; max-width: 70ch; margin: 0 0 12px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.8px; color: var(--muted); }
.article-meta span { display: inline-flex; align-items: center; gap: 5px; }
.article-body { font-size: 17px; line-height: 1.75; }
.article-body p { margin: 0 0 1.05em; }
.article-body h2 {
  font-family: var(--serif); font-size: 27px; line-height: 1.2; margin: 2em 0 .55em;
  padding-bottom: .28em; border-bottom: 1px solid var(--line); scroll-margin-top: 92px;
}
.article-body h3 { font-family: var(--serif); font-size: 21px; margin: 1.6em 0 .45em; scroll-margin-top: 92px; }
.article-body ul, .article-body ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.article-body li { margin: .35em 0; }
.article-body blockquote {
  margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--accent-2);
  background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--serif); font-size: 18px; color: var(--ink-soft);
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .12em .35em; border-radius: 4px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 14.5px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.article-body th { background: var(--surface-2); font-weight: 700; }
.article-body figure { margin: 1.5em 0; }
.article-body figure img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.article-body figcaption { color: var(--muted); font-size: 13px; margin-top: 7px; line-height: 1.5; }
.article-body .lead { font-size: 18.5px; color: var(--ink-soft); }
.article-body .hatnote, .article-body .note {
  background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  padding: 11px 15px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px; color: var(--ink-soft); margin: 1.2em 0;
}
.article-body .note.warn { border-left-color: var(--accent-2); }
.article-body .stub {
  margin-top: 2em; padding: 13px 16px; border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm); color: var(--muted); font-size: 13.5px; background: var(--surface-2);
}

/* Инфобокс и TOC */
.infobox {
  float: right; width: 302px; margin: 4px 0 20px 26px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  font-size: 13.5px; overflow: hidden;
}
.infobox-title { background: var(--accent); color: var(--accent-ink); padding: 10px 14px; font-family: var(--serif); font-size: 16.5px; text-align: center; }
.infobox img { display: block; width: 100%; border-bottom: 1px solid var(--line); }
.infobox table { width: 100%; border-collapse: collapse; margin: 0; font-size: 13.2px; }
.infobox th, .infobox td { border: 0; border-bottom: 1px solid var(--line); padding: 7px 12px; vertical-align: top; }
.infobox tr:last-child th, .infobox tr:last-child td { border-bottom: 0; }
.infobox th { width: 42%; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.toc {
  display: table; min-width: 260px; max-width: 100%; margin: 0 0 1.6em; padding: 13px 20px 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px;
}
.toc-title { font-weight: 700; color: var(--ink); margin-bottom: 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 3px 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc .toc-h3 { margin-left: 14px; font-size: 13px; color: var(--muted); list-style: none; }

/* Подвал статьи */
.article-footer { margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.article-footer .cats { display: flex; flex-wrap: wrap; gap: 7px; margin: 6px 0 18px; }
.cat {
  display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; font-size: 12.5px;
}
.cat:hover { border-color: var(--accent); color: var(--link); }
.related { margin: 16px 0; }
.related h2 { font-family: var(--serif); font-size: 19px; margin: 0 0 8px; border: 0; padding: 0; }
.related ul { margin: 0; padding-left: 19px; }
.article-license { font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; }

/* Главная */
.home-hero {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr); gap: 30px;
  align-items: center; padding: 30px 32px; margin-bottom: 30px;
  background:
    radial-gradient(120% 130% at 100% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 55%),
    linear-gradient(155deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.home-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(color-mix(in srgb, var(--accent) 18%, transparent) 1px, transparent 1px);
  background-size: 18px 18px; mask-image: linear-gradient(120deg, transparent 40%, #000);
}
.home-hero-text { position: relative; z-index: 1; }
.home-hero h1 { font-family: var(--serif); font-size: clamp(34px, 5vw, 53px); line-height: 1.04; margin: 0 0 14px; letter-spacing: -.025em; }
.home-hero p { color: var(--ink-soft); font-size: 17px; max-width: 56ch; margin: 0 0 20px; }
.home-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 14px; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.btn-ghost:hover { border-color: var(--accent); color: var(--link); }
.hero-art { position: relative; z-index: 1; }
.hero-art img { display: block; width: 100%; filter: drop-shadow(0 18px 24px rgba(40, 55, 40, .16)); }
.home-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 22px; font-size: 13px; color: var(--muted); }
.home-stats strong { display: block; font-family: var(--serif); font-size: 23px; color: var(--ink); line-height: 1.1; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; margin-bottom: 34px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 22px;
}
.card h2 { font-family: var(--serif); font-size: 23px; margin: 0 0 12px; }
.featured { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: center; }
.featured img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.featured .kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; margin-bottom: 6px; }
.featured h2 { margin: 0 0 7px; }
.featured h2 a { color: var(--ink); text-decoration: none; }
.featured h2 a:hover { color: var(--link); }
.featured p { margin: 0 0 10px; color: var(--ink-soft); font-size: 14.5px; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.recent-list li:last-child { border-bottom: 0; }
.recent-list time { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 2px; }
.recent-list a { text-decoration: none; }
.recent-list a:hover { text-decoration: underline; }
.section-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 14px 0 34px; }
.section-card {
  display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: transform .18s ease, border-color .18s ease;
}
.section-card:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--ink); }
.section-card .icon { width: 34px; height: 34px; color: var(--accent); }
.section-card strong { font-family: var(--serif); font-size: 18px; }
.section-card span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.home-lower { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 24px; }
.fact-list { margin: 0; padding-left: 19px; color: var(--ink-soft); font-size: 14.5px; }
.fact-list li { margin: 7px 0; }
.archive-figure { margin: 0; }
.archive-figure img { border-radius: var(--radius-sm); border: 1px solid var(--line); display: block; }
.archive-figure figcaption { color: var(--muted); font-size: 12.5px; margin-top: 7px; }

/* Портал разделов */
.portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.portal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.portal-card h2 { font-family: var(--serif); font-size: 20px; margin: 0 0 6px; border: 0; padding: 0; }
.portal-card p { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; }
.portal-card ul { margin: 0; padding-left: 18px; font-size: 14px; }
.portal-card li { margin: 4px 0; }

/* Списки страниц */
.page-list { columns: 2; column-gap: 34px; margin: 18px 0; padding: 0; list-style: none; }
.page-list li { break-inside: avoid; margin: 0 0 7px; font-size: 14.5px; }
.page-list .meta { color: var(--muted); font-size: 12px; display: block; }
.group-heading { font-family: var(--serif); font-size: 22px; margin: 30px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.recent-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.recent-table td, .recent-table th { border-bottom: 1px solid var(--line); padding: 9px 8px; text-align: left; vertical-align: top; }
.recent-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.recent-table td.date { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; width: 140px; }

/* Поиск */
.search-page-form { display: flex; gap: 10px; margin: 20px 0 8px; }
.search-page-form input {
  flex: 1; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit;
}
.search-page-form button { border: 0; border-radius: 999px; padding: 0 24px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; }
.search-status { color: var(--muted); font-size: 13.5px; margin: 12px 0 20px; }
.search-results { display: flex; flex-direction: column; gap: 2px; }
.result { padding: 15px 0; border-bottom: 1px solid var(--line); }
.result h3 { font-family: var(--serif); font-size: 19px; margin: 0 0 3px; }
.result h3 a { text-decoration: none; }
.result h3 a:hover { text-decoration: underline; }
.result .result-path { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.result p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.result mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }

/* Разное */
.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 24px 0; }
.figure-grid figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-sm); }
.figure-grid img { display: block; width: 100%; border-radius: 8px; }
.figure-grid figcaption { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 8px; }
.timeline { list-style: none; margin: 20px 0; padding: 0; border-left: 2px solid var(--line-strong); }
.timeline li { position: relative; padding: 0 0 18px 22px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.timeline .year { font-family: var(--serif); font-weight: 700; color: var(--accent-2); font-size: 17px; }

.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 26px 22px;
  display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 12.8px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--link); text-decoration: underline; }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 42px; height: 42px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow); cursor: pointer; display: none; place-items: center; font-size: 18px;
}
.to-top.show { display: grid; }

@media (max-width: 1040px) {
  .header-nav { display: none; }
  .layout { grid-template-columns: 220px minmax(0, 1fr); gap: 26px; }
  .section-grid { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 150px minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .menu-toggle { display: grid; }
  .header-inner { flex-wrap: wrap; gap: 10px 12px; padding: 10px 14px; }
  .brand-text strong { font-size: 17px; }
  .brand-text small { font-size: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .theme-toggle { margin-left: auto; }
  .layout { display: block; padding: 20px 16px 50px; }
  .sidebar {
    display: none; position: fixed; inset: 70px 0 auto 0; z-index: 35; max-height: calc(100vh - 70px);
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 18px 20px 26px;
    box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { display: block; }
  body.nav-open { overflow: hidden; }
  .infobox { float: none; width: auto; margin: 0 0 22px; }
  .home-hero { grid-template-columns: 1fr; padding: 24px 20px; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
  .home-grid, .home-lower { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; }
  .featured img { max-width: 300px; }
  .section-grid, .portal-grid, .figure-grid { grid-template-columns: 1fr; }
  .page-list { columns: 1; }
  .article-title { font-size: 34px; }
  .recent-table td.date { width: 105px; font-size: 12px; }
}
@media (max-width: 480px) {
  .brand img { width: 36px; height: 36px; }
  .theme-toggle, .menu-toggle { width: 34px; height: 34px; }
  .home-stats { gap: 8px 18px; }
  .home-stats strong { font-size: 20px; }
  .article-body { font-size: 16px; }
  .search-page-form { flex-direction: column; }
  .search-page-form button { padding: 12px; }
}
@media print {
  .site-header, .sidebar, .site-footer, .to-top, .article-footer .related { display: none !important; }
  .layout { display: block; max-width: none; }
  body { background: #fff; color: #000; }
  .article-body { font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
}
