/* =========================================================================
   oslemoncat.github.io — site.css
   分层：1 设计令牌  2 基础重置  3 布局骨架  4 组件  5 文章排版  6 响应式
   ========================================================================= */

/* ---------------------------------------------------------------- 1 令牌 */
:root {
  color-scheme: light;

  --bg: #f7f8fa;
  --bg-elevated: #ffffff;
  --bg-sunken: #eef0f4;
  --bg-code: #1f2430;

  --text: #1a1d23;
  --text-muted: #5b6270;
  --text-faint: #868d9b;
  --text-invert: #f4f6f9;

  --border: #e2e5ea;
  --border-strong: #ccd1d9;

  --accent: #3b6fd4;
  --accent-soft: rgba(59, 111, 212, 0.1);
  --accent-text: #2f5cb0;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(16, 20, 28, 0.06);
  --shadow: 0 4px 16px rgba(16, 20, 28, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 20, 28, 0.12);

  --wrap: 1120px;
  --wrap-narrow: 760px;
  --header-h: 60px;

  --font-sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-serif: "Iowan Old Style", "Songti SC", "Noto Serif SC", Georgia, serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #14171c;
  --bg-elevated: #1b1f26;
  --bg-sunken: #101317;
  --bg-code: #10131a;

  --text: #e6e9ef;
  --text-muted: #a2aab8;
  --text-faint: #7a828f;
  --text-invert: #14171c;

  --border: #2a2f38;
  --border-strong: #3a414d;

  --accent: #6f9dfb;
  --accent-soft: rgba(111, 157, 251, 0.14);
  --accent-text: #93b6fd;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
}

/* ------------------------------------------------------------ 2 基础重置 */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }

button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------ 3 布局骨架 */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand__mark {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #b06fd0));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex: none;
}

.site-nav { display: flex; gap: 4px; margin-left: 6px; }
.site-nav a {
  color: var(--text-muted);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.site-nav a:hover { background: var(--bg-sunken); color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); font-weight: 600; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; }

.nav-toggle { display: none; }

main { flex: 1 0 auto; padding-bottom: 64px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 34px;
  color: var(--text-faint);
  font-size: 13.5px;
}
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.site-footer a { color: var(--text-muted); }

/* -------------------------------------------------------------- 4 组件 */
/* 4.1 首页 hero */
.hero {
  padding: 68px 0 44px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.hero__eyebrow {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 600;
  margin: 0 0 14px;
}
.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.22;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.hero__lead {
  font-size: 17.5px;
  color: var(--text-muted);
  max-width: 62ch;
  margin: 0 0 26px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.14s var(--ease), box-shadow 0.14s var(--ease), background 0.16s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { box-shadow: var(--shadow); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { background: var(--bg-elevated); }

/* 4.2 区块标题 */
.section { margin: 54px 0; }
.section__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.section__title { font-size: 21px; margin: 0; letter-spacing: -0.005em; }
.section__more { margin-left: auto; font-size: 14.5px; }

.page-head { padding: 46px 0 8px; }
.page-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 36px);
  margin: 0 0 12px;
  line-height: 1.25;
}
.page-head p { color: var(--text-muted); max-width: 66ch; margin: 0; font-size: 16.5px; }

/* 4.3 卡片网格 */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
}
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), transform 0.16s var(--ease);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card__title { font-size: 17px; font-weight: 650; margin: 0; color: var(--text); line-height: 1.4; }
.card__title a { color: inherit; }
.card__title a:hover { color: var(--accent); text-decoration: none; }
.card:hover .card__title a { color: var(--accent); }
.card__desc { color: var(--text-muted); font-size: 14.5px; margin: 0; }
.card__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 12px;
  font-size: 13px; color: var(--text-faint);
}
.card__accent { height: 3px; width: 40px; border-radius: 2px; background: var(--card-accent, var(--accent)); }
.card--module { padding-top: 22px; }
.card--module .card__count { margin-left: auto; }

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--text-muted);
  font-size: 12.5px;
  border: 1px solid var(--border);
}
.tag--accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }

/* 4.4 文章列表（行式） */
.list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.list__item {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 15px 4px;
  border-bottom: 1px solid var(--border);
  transition: background 0.14s var(--ease);
}
.list__item:hover { background: var(--bg-elevated); }
.list__date { flex: none; width: 96px; color: var(--text-faint); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.list__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.list__title { font-size: 16px; font-weight: 600; color: var(--text); }
.list__item:hover .list__title { color: var(--accent); }
.list__summary {
  color: var(--text-muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.list__module { flex: none; font-size: 13px; color: var(--text-faint); }

/* 4.5 筛选条 */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 26px;
}
.filter-chip {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 14px;
  transition: all 0.15s var(--ease);
}
.filter-chip:hover { border-color: var(--border-strong); color: var(--text); }
.filter-chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-text);
  font-weight: 600;
}
.search-input {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 14.5px;
}
.search-input::placeholder { color: var(--text-faint); }

.article-card__cover {
  margin: 4px -4px -4px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--bg-sunken);
}
.article-card__cover img { width: 100%; height: 100%; object-fit: cover; }

/* 4.6 面包屑 */
.crumbs { padding: 24px 0 0; font-size: 13.5px; color: var(--text-faint); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 7px; color: var(--border-strong); }
.crumbs a { color: var(--text-muted); }

/* 4.7 空态与骨架 */
.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.empty code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-sunken);
  padding: 2px 6px;
  border-radius: 4px;
}

.skeleton { padding: 40px 0; }
.skeleton__bar {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-sunken) 25%, var(--border) 50%, var(--bg-sunken) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
  margin-bottom: 12px;
}
.skeleton__bar--title { height: 30px; width: 52%; margin-bottom: 20px; }
.skeleton__bar--short { width: 38%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.notice {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14.5px;
  color: var(--text-muted);
  margin: 22px 0;
}
.notice code { font-family: var(--font-mono); font-size: 13px; }

/* ---------------------------------------------------------- 5 文章排版 */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 228px;
  gap: 52px;
  align-items: start;
  padding-top: 6px;
}

.article { max-width: var(--wrap-narrow); min-width: 0; }

.article__header { padding: 22px 0 26px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.article__summary { color: var(--text-muted); font-size: 17px; margin: 0 0 14px; max-width: 62ch; }
.article__module { font-size: 13.5px; font-weight: 600; color: var(--accent-text); letter-spacing: 0.02em; }
.article__title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4.2vw, 38px);
  line-height: 1.25;
  margin: 10px 0 14px;
  letter-spacing: -0.012em;
}
.article__meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  color: var(--text-faint); font-size: 13.5px;
}
.article__cover {
  margin: 26px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.article__cover img { width: 100%; }

.article-resources { margin: 32px 0; padding-top: 24px; border-top: 1px solid var(--border); }
.article-resources h2 { margin: 0 0 16px; font-size: 20px; }
.article-images { display: grid; gap: 20px; }
.article-image { margin: 0; }
.article-image img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.article-image figcaption { margin-top: 8px; color: var(--text-muted); font-size: 14px; text-align: center; overflow-wrap: anywhere; }
.article-attachments { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.article-attachment { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); }
.article-attachment__header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.article-attachment__header > div { flex: 1; min-width: 0; }
.article-attachment__title { font-weight: 600; overflow-wrap: anywhere; }
.article-attachment__type { display: block; margin-top: 4px; color: var(--text-faint); font-size: 12px; }
.article-attachment .btn { flex: none; padding: 6px 14px; }
.article-attachment video, .article-attachment audio { display: block; width: 100%; margin-top: 16px; }
.article-attachment video, .article-attachment > img { max-height: 480px; border-radius: var(--radius-sm); }
.article-attachment > img { display: block; max-width: 100%; margin-top: 16px; object-fit: contain; }

.toc {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  font-size: 13.5px;
  border-left: 1px solid var(--border);
  padding-left: 18px;
  max-height: calc(100vh - var(--header-h) - 60px);
  overflow-y: auto;
}
.toc__title {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 600; margin: 0 0 12px;
}
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.toc a { color: var(--text-muted); display: block; }
.toc a:hover { color: var(--accent); text-decoration: none; }
.toc a.is-active { color: var(--accent-text); font-weight: 600; }
.toc__lvl-3 { padding-left: 14px; font-size: 13px; }

.article__footer {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  font-size: 14px; color: var(--text-faint);
}

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.pager__link {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--bg-elevated);
  min-width: 0;
}
.pager__link:hover { border-color: var(--border-strong); text-decoration: none; }
.pager__label { font-size: 12.5px; color: var(--text-faint); display: block; margin-bottom: 4px; }
.pager__title { color: var(--text); font-weight: 600; font-size: 14.5px; display: block; overflow: hidden; text-overflow: ellipsis; }
.pager__link--next { text-align: right; }
.pager__link--empty { visibility: hidden; }

/* 5.1 prose */
.prose { font-size: 16.5px; line-height: 1.78; color: var(--text); overflow-wrap: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose h2,
.prose h3,
.prose h4 { line-height: 1.35; margin: 2em 0 0.7em; scroll-margin-top: calc(var(--header-h) + 18px); }
.prose h2 {
  font-size: 24px;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border);
}
.prose h3 { font-size: 19.5px; }
.prose h4 { font-size: 17px; color: var(--text-muted); }
.prose p { margin: 0 0 1.15em; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.5em; }
.prose li { margin-bottom: 0.4em; }
.prose li > ul, .prose li > ol { margin: 0.4em 0 0; }
.prose blockquote {
  margin: 1.4em 0;
  padding: 2px 20px;
  border-left: 3px solid var(--border-strong);
  color: var(--text-muted);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }
.prose strong { font-weight: 650; }
.prose a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  padding: 0.1em 0.38em;
  border-radius: 5px;
}
.prose pre {
  margin: 1.4em 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-code);
  overflow-x: auto;
  border: 1px solid var(--border);
  line-height: 1.6;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13.8px;
  color: #dbe2ee;
}
html[data-theme="light"] .prose pre code { color: #dbe2ee; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose th { background: var(--bg-sunken); font-weight: 650; }

.prose img { border-radius: var(--radius-sm); margin: 1.4em 0; border: 1px solid var(--border); }
.prose figcaption,
.prose .caption { font-size: 13.5px; color: var(--text-faint); text-align: center; margin-top: -0.8em; }

/* 提示块 */
.callout {
  margin: 1.5em 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 3px solid var(--callout-accent, var(--accent));
  background: var(--bg-elevated);
}
.callout__title { font-weight: 650; font-size: 14.5px; margin: 0 0 5px; color: var(--callout-accent, var(--accent-text)); }
.callout p:last-child { margin-bottom: 0; }
.callout--note { --callout-accent: #5b8def; }
.callout--tip  { --callout-accent: #3fb08a; }
.callout--warn { --callout-accent: #d9a13b; }
.callout--key  { --callout-accent: #a06fd0; }

/* 定理 / 例题 */
.theorem {
  margin: 1.5em 0;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.theorem__label { font-weight: 700; margin-right: 6px; }
.theorem--definition .theorem__label { color: #5b8def; }
.theorem--theorem .theorem__label { color: #a06fd0; }
.theorem--example .theorem__label { color: #3fb08a; }
.theorem--proof { background: transparent; border-style: dashed; }
.theorem--proof .theorem__label { color: var(--text-muted); font-style: italic; }
.theorem__body > *:last-child { margin-bottom: 0; }

/* 视频外链卡 */
.video-card {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 1.5em 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.video-card__icon {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.video-card__icon svg { width: 20px; height: 20px; }
.video-card__body { min-width: 0; }
.video-card__title { font-weight: 600; font-size: 15px; color: var(--text); margin: 0 0 2px; }
.video-card__meta { font-size: 13px; color: var(--text-faint); margin: 0; }

/* 数学 */
.katex { font-size: 1.04em; }
.katex-display { margin: 1.5em 0; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.math-error {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: #c0392b;
  background: rgba(192, 57, 43, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 1px dashed rgba(192, 57, 43, 0.4);
}

/* 图片画廊 */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 1.5em 0;
}
.gallery img { margin: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery a { display: block; }

/* ------------------------------------------------------------ 6 响应式 */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .toc {
    position: static;
    border-left: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    max-height: none;
    order: -1;
  }
  .toc__title { margin-bottom: 10px; }
}

@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 16px; }

  .nav-toggle { display: grid; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 10px 12px; font-size: 15.5px; }

  .hero { padding: 40px 0 32px; margin-bottom: 28px; }
  .section { margin: 38px 0; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }

  .list__item { flex-direction: column; gap: 4px; }
  .list__date { width: auto; }
  .list__module { display: none; }

  .article-layout { gap: 24px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 21px; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager__link--next { text-align: left; }
}

@media print {
  .site-header, .site-footer, .toc, .pager, .article__footer, .crumbs { display: none; }
  .article-layout { grid-template-columns: 1fr; }
  body { background: #fff; color: #000; }
  .prose pre { background: #f4f4f4; border-color: #ddd; }
  .prose pre code { color: #111; }
}
