/**
 * Santal Studies — Public Site CSS
 * public/assets/css/reset.css + typography.css + layout.css + nav.css
 * + cards.css + hero.css + knowledge-map.css + reading.css + responsive.css
 *
 * All in one file for simplicity. Uses tokens from tokens.css.
 * Warm academic aesthetic: Source Serif 4 body, Playfair Display headings.
 */

/* ═══════════════════════════════════════════════════════════════════════════
   RESET
═══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-serif); background: var(--bg-page); color: var(--text-primary); line-height: 1.7; }
img, video, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
a { color: var(--accent); }
ul, ol { list-style: none; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

/* Reading progress bar */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--accent); z-index: var(--z-toast);
  width: 0%; transition: width .1s linear;
  animation-timeline: scroll(); animation-range: 0% 100%;
}
@supports (animation-timeline: scroll()) {
  #reading-progress { animation: reading-progress-fill linear; animation-timeline: scroll(); width: 100% !important; }
  @keyframes reading-progress-fill { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); } }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════════════════════════════════ */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 400; line-height: 1.25; color: var(--text-primary); }
h1 { font-size: clamp(2rem,5vw,3.5rem); }
h2 { font-size: clamp(1.5rem,3.5vw,2.25rem); }
h3 { font-size: clamp(1.2rem,2.5vw,1.6rem); }
h4 { font-size: 1.15rem; font-weight: 600; font-family: var(--font-serif); }
p  { line-height: 1.75; margin-bottom: 0; }
.public-id { font-family: var(--font-mono); font-size: .85em; letter-spacing: .04em; color: var(--accent); }
.visually-hidden { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════════════════════════ */
.container { max-width: var(--site-max); margin: 0 auto; padding: 0 var(--space-6); }
.container--reading { max-width: var(--reading-max); margin: 0 auto; padding: 0 var(--space-6); }
.section { padding: var(--space-20) 0; }
.section--lg { padding: var(--space-24) 0; }
.section--sm { padding: var(--space-12) 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--space-5); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: var(--space-5); }

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════════════════════════ */
.site-nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: var(--bg-dark); border-bottom: 1px solid rgba(255,255,255,.06);
  height: var(--nav-height); display: flex; align-items: center;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.nav-inner { display: flex; align-items: center; gap: var(--space-6); width: 100%; }
.nav-logo { text-decoration: none; display: flex; flex-direction: column; flex-shrink: 0; }
.nav-logo__name { font-family: var(--font-ui,'Inter',sans-serif); font-size: 15px; font-weight: 800; letter-spacing: .12em; color: #fff; line-height: 1; }
.nav-logo__sub  { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-top: 2px; }

.nav-links { display: flex; align-items: center; gap: var(--space-1); flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,.65); text-decoration: none;
  padding: 6px 12px; border-radius: var(--radius-full); white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link--branch { display: flex; align-items: center; gap: 6px; }
.nav-link--branch .branch-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.nav-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; flex-shrink: 0; }

/* Language switcher */
.lang-switcher {
  display: flex; align-items: center; gap: 2px;
  background: rgba(255,255,255,.07); border-radius: var(--radius-full);
  padding: 3px; border: 1px solid rgba(255,255,255,.1);
}
.lang-btn {
  font-size: 11px; font-weight: 600; letter-spacing: .05em; padding: 4px 10px;
  border-radius: var(--radius-full); border: none; cursor: pointer; transition: all var(--transition-fast);
  background: transparent; color: rgba(255,255,255,.5);
}
.lang-btn.active { background: #fff; color: var(--bg-dark); }
.lang-btn:hover:not(.active) { color: #fff; }

/* Search button */
.nav-search-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-full); background: transparent; color: rgba(255,255,255,.6);
  cursor: pointer; transition: all var(--transition-fast); text-decoration: none;
}
.nav-search-btn:hover { border-color: rgba(255,255,255,.4); color: #fff; }

/* Dark mode toggle */
.dark-mode-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-full); background: transparent; color: rgba(255,255,255,.6);
  cursor: pointer; transition: all var(--transition-fast); font-size: 15px;
}
.dark-mode-btn:hover { border-color: rgba(255,255,255,.4); color: #fff; }

/* Hamburger */
.nav-hamburger { display: none; background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer; padding: 6px; }

/* Mobile drawer */
.nav-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 85vw;
  background: var(--bg-dark); z-index: var(--z-modal); padding: var(--space-6);
  transform: translateX(-100%); transition: transform var(--transition-slow);
  overflow-y: auto;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: calc(var(--z-modal) - 1); opacity: 0;
  pointer-events: none; transition: opacity var(--transition);
}
.nav-drawer-overlay.open { opacity: 1; pointer-events: all; }

/* Branch pills (homepage) */
.branch-pills { display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: var(--space-2); scrollbar-width: none; }
.branch-pills::-webkit-scrollbar { display: none; }
.branch-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; transition: all var(--transition-fast);
}
.branch-pill:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════════════════════════════════════ */
.hero {
  background: var(--bg-dark);
  padding: var(--space-20) 0 var(--space-16);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 60%, rgba(24,95,165,.25) 0%, transparent 55%),
              radial-gradient(ellipse at 80% 30%, rgba(92,45,138,.15) 0%, transparent 55%);
  pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-full); padding: 5px 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.7); margin-bottom: var(--space-5);
}
.hero-title { font-family: var(--font-display); font-size: clamp(2rem,4.5vw,3.75rem); font-weight: 400; line-height: 1.15; color: #fff; margin-bottom: var(--space-5); }
.hero-title span { color: var(--accent-muted); font-style: italic; }
.hero-desc { font-size: 1.05rem; color: rgba(255,255,255,.65); line-height: 1.75; margin-bottom: var(--space-8); max-width: 500px; }
.hero-ctas { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 0 var(--space-6); height: 44px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; border: none; transition: all var(--transition-fast); white-space: nowrap; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(24,95,165,.4); }
.btn--outline { background: transparent; color: rgba(255,255,255,.8); border: 1.5px solid rgba(255,255,255,.25); }
.btn--outline:hover { border-color: rgba(255,255,255,.6); color: #fff; background: rgba(255,255,255,.05); }
.btn--light { background: #fff; color: var(--text-primary); }
.btn--light:hover { background: var(--bg-subtle); transform: translateY(-1px); }
.btn--sm { height: 36px; padding: 0 var(--space-5); font-size: 13px; }
.btn--lg { height: 52px; padding: 0 var(--space-8); font-size: 15px; }

/* ═══════════════════════════════════════════════════════════════════════════
   KNOWLEDGE MAP (SVG)
═══════════════════════════════════════════════════════════════════════════ */
.knowledge-map-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.knowledge-map-wrap svg { max-width: 100%; height: auto; }

/* SVG node styles */
.km-node { cursor: pointer; transition: all .2s ease; }
.km-node:hover .km-circle { filter: brightness(1.2); }
.km-circle { transition: r .15s ease, opacity .15s ease; }
.km-label { font-family: var(--font-serif); pointer-events: none; }

/* Tooltip */
.km-tooltip {
  position: absolute; background: var(--bg-dark); color: #fff;
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-md);
  padding: 8px 12px; font-size: 12px; font-family: var(--font-ui,'system-ui',sans-serif);
  pointer-events: none; opacity: 0; transition: opacity .15s;
  white-space: nowrap; z-index: var(--z-above); box-shadow: var(--shadow-md);
}
.km-tooltip.visible { opacity: 1; }
.km-tooltip__count { color: rgba(255,255,255,.5); margin-left: 6px; }

/* ═══════════════════════════════════════════════════════════════════════════
   STATS STRIP
═══════════════════════════════════════════════════════════════════════════ */
.stats-strip { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: var(--space-6) 0; }
.stats-inner { display: flex; gap: var(--space-8); justify-content: center; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-item__value { font-family: var(--font-display); font-size: 2rem; font-weight: 400; color: var(--text-primary); line-height: 1; }
.stat-item__label { font-size: 13px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; }

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════════════════════ */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition); }
.card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-2px); }
.card--branch { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); text-decoration: none; color: inherit; }
.card--branch:hover { color: inherit; }
.card--entry { display: flex; flex-direction: column; gap: var(--space-3); text-decoration: none; color: inherit; }
.card--entry:hover { color: inherit; }

.branch-card-code { font-family: var(--font-mono); font-size: 2rem; font-weight: 800; line-height: 1; }
.branch-card-name { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.branch-card-desc { font-size: .875rem; color: var(--text-muted); line-height: 1.6; flex: 1; }
.branch-card-count { font-size: .8rem; color: var(--text-faint); margin-top: auto; }

.entry-card-id { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; }
.entry-card-branch { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 700; letter-spacing: .05em; color: #fff; }
.entry-card-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 400; line-height: 1.3; color: var(--text-primary); }
.entry-card-summary { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }
.entry-card-meta { display: flex; align-items: center; gap: var(--space-3); font-size: 12px; color: var(--text-faint); margin-top: auto; }

/* Domain tile */
.domain-tile { display: flex; flex-direction: column; gap: 4px; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); text-decoration: none; color: inherit; transition: all var(--transition); }
.domain-tile:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); color: inherit; }
.domain-tile__code { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: .05em; }
.domain-tile__name { font-size: 13px; font-weight: 500; color: var(--text-primary); line-height: 1.3; }
.domain-tile__count { font-size: 11px; color: var(--text-faint); margin-top: auto; }

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════════════════════════════════════════════ */
.section-header { margin-bottom: var(--space-8); }
.section-header--center { text-align: center; }
.section-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-2); }
.section-title { font-size: clamp(1.5rem,3vw,2.2rem); font-weight: 400; line-height: 1.2; }
.section-subtitle { font-size: 1rem; color: var(--text-muted); margin-top: var(--space-3); max-width: 600px; }
.section-header--center .section-subtitle { margin-left: auto; margin-right: auto; }

/* ═══════════════════════════════════════════════════════════════════════════
   READING PAGE
═══════════════════════════════════════════════════════════════════════════ */
.reading-layout {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: var(--space-10);
  align-items: start;
  padding: var(--space-10) 0 var(--space-20);
  max-width: var(--site-max);
  margin: 0 auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}
.reading-sidebar { position: sticky; top: calc(var(--nav-height) + 24px); max-height: calc(100vh - var(--nav-height) - 48px); overflow-y: auto; scrollbar-width: thin; }
.reading-panel   { position: sticky; top: calc(var(--nav-height) + 24px); max-height: calc(100vh - var(--nav-height) - 48px); overflow-y: auto; }
.reading-main    { min-width: 0; }

/* TOC */
.toc { font-size: 13px; }
.toc__title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-3); }
.toc__list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc__item a { display: block; padding: 4px 0 4px 8px; border-left: 2px solid var(--border); color: var(--text-muted); text-decoration: none; transition: all var(--transition-fast); line-height: 1.4; }
.toc__item a:hover { color: var(--text-primary); border-left-color: var(--accent); }
.toc__item.active a { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.toc__item--h3 { padding-left: var(--space-4); }
.toc__item--h4 { padding-left: var(--space-8); }

/* Language indicator */
.reading-langs { margin-bottom: var(--space-5); }
.reading-langs__title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-2); }
.reading-langs__list { display: flex; gap: var(--space-2); }
.reading-lang-dot { width: 10px; height: 10px; border-radius: 50%; cursor: pointer; transition: transform var(--transition-fast); position: relative; }
.reading-lang-dot:hover { transform: scale(1.3); }
.reading-lang-dot[data-status="available"]    { background: var(--success); }
.reading-lang-dot[data-status="unavailable"]  { background: var(--border); }

/* Entry body */
.entry-header { margin-bottom: var(--space-8); padding-bottom: var(--space-6); border-bottom: 1px solid var(--border); }
.entry-branch-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #fff; margin-bottom: var(--space-4); }
.entry-public-id { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-faint); margin-bottom: var(--space-3); display: block; }
.entry-title { font-family: var(--font-display); font-size: clamp(1.75rem,4vw,2.5rem); font-weight: 400; line-height: 1.2; margin-bottom: var(--space-4); }
.entry-meta { display: flex; align-items: center; gap: var(--space-4); font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.entry-meta-sep { color: var(--border-strong); }

/* Article body typography */
.entry-body { font-family: var(--font-serif); font-size: 1rem; line-height: 1.82; color: var(--text-secondary); }
.entry-body p  { margin-bottom: 1.25em; }
.entry-body h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; margin: 2em 0 .75em; color: var(--text-primary); border-bottom: 1px solid var(--border); padding-bottom: .4em; }
.entry-body h3 { font-size: 1.15rem; font-weight: 600; font-family: var(--font-serif); margin: 1.75em 0 .6em; color: var(--text-primary); }
.entry-body h4 { font-size: 1rem; font-weight: 700; margin: 1.5em 0 .5em; }
.entry-body blockquote { border-left: 3px solid var(--accent); margin: 1.5em 0; padding: .5em 0 .5em 1.5em; color: var(--text-muted); font-style: italic; }
.entry-body blockquote.pull-quote { border: none; font-family: var(--font-display); font-size: 1.3em; text-align: center; padding: 1em; color: var(--accent); }
.entry-body ul, .entry-body ol { margin: 1em 0 1em 1.5em; }
.entry-body ul { list-style: disc; }
.entry-body ol { list-style: decimal; }
.entry-body li { margin-bottom: .4em; }
.entry-body code { font-family: var(--font-mono); font-size: .875em; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 3px; padding: .1em .35em; }
.entry-body table { width: 100%; margin: 1.5em 0; font-size: .9em; }
.entry-body th { background: var(--bg-subtle); font-weight: 600; text-align: left; padding: 8px 12px; border: 1px solid var(--border); }
.entry-body td { padding: 8px 12px; border: 1px solid var(--border); }
.entry-body strong { font-weight: 700; color: var(--text-primary); }
.entry-body a { color: var(--accent); }
.entry-body a[data-entry-id] { border-bottom: 1px dashed var(--accent); text-decoration: none; }
.entry-body sup.fn-marker a { color: var(--accent); text-decoration: none; font-size: .7em; vertical-align: super; }
.entry-body mark { background: rgba(245,158,11,.15); }
.entry-body img { max-width: 100%; border-radius: var(--radius-md); margin: 1em 0; }
.entry-body figure { margin: 1.5em 0; }
.entry-body figcaption { font-size: .85em; color: var(--text-muted); text-align: center; margin-top: .4em; font-style: italic; }

/* Footnotes */
.footnotes { margin-top: var(--space-12); padding-top: var(--space-8); border-top: 1px solid var(--border); }
.footnotes__heading { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-4); }
.footnotes__list { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.footnotes__item { display: flex; gap: var(--space-3); font-size: .875rem; line-height: 1.6; }
.fn-number { font-family: var(--font-mono); font-weight: 700; color: var(--accent); font-size: .8rem; flex-shrink: 0; padding-top: 2px; }
.fn-content { color: var(--text-secondary); }
.fn-back { color: var(--text-faint); text-decoration: none; font-size: .75rem; margin-left: var(--space-2); }
.fn-back:hover { color: var(--accent); }
.fn-source-badge { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 1px 5px; border-radius: 3px; margin-right: 5px; background: var(--bg-subtle); color: var(--text-muted); }

/* Right panel */
.reading-panel__section { margin-bottom: var(--space-6); }
.reading-panel__title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-3); }

/* Cite this entry */
.cite-formats { display: flex; flex-direction: column; gap: var(--space-2); }
.cite-format { background: var(--bg-subtle); border-radius: var(--radius-md); padding: var(--space-3); font-size: 12px; line-height: 1.5; color: var(--text-secondary); position: relative; }
.cite-format__label { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 4px; }
.cite-copy-btn { position: absolute; top: 8px; right: 8px; background: none; border: none; font-size: 11px; color: var(--accent); cursor: pointer; }

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH PAGE
═══════════════════════════════════════════════════════════════════════════ */
.search-form { display: flex; gap: var(--space-3); margin-bottom: var(--space-8); }
.search-input {
  flex: 1; height: 52px; padding: 0 var(--space-5);
  border: 2px solid var(--border); border-radius: var(--radius-lg);
  font-size: 1rem; font-family: var(--font-serif); background: var(--bg-card);
  color: var(--text-primary); outline: none; transition: border-color var(--transition-fast);
}
.search-input:focus { border-color: var(--accent); }
.search-filters { display: flex; gap: var(--space-3); margin-bottom: var(--space-6); flex-wrap: wrap; }
.filter-chip { padding: 5px 14px; border-radius: var(--radius-full); border: 1px solid var(--border); font-size: 13px; color: var(--text-muted); cursor: pointer; text-decoration: none; transition: all var(--transition-fast); }
.filter-chip:hover, .filter-chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.search-result { padding: var(--space-5) 0; border-bottom: 1px solid var(--border-light); }
.search-result:last-child { border-bottom: none; }
.search-result__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 400; margin-bottom: 6px; }
.search-result__title a { color: var(--text-primary); text-decoration: none; }
.search-result__title a:hover { color: var(--accent); }
.search-result__excerpt { font-size: .9rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 8px; }
.search-result__meta { display: flex; align-items: center; gap: var(--space-3); font-size: 12px; color: var(--text-faint); }
.search-result__excerpt mark { background: rgba(245,158,11,.2); border-radius: 2px; padding: 0 1px; }

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════════════════ */
.site-footer { background: var(--bg-dark); color: var(--text-on-dark); padding: var(--space-16) 0 var(--space-8); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-10); margin-bottom: var(--space-10); }
.footer-about__name { font-size: 16px; font-weight: 800; letter-spacing: .1em; color: #fff; margin-bottom: var(--space-3); }
.footer-about__text { font-size: 13.5px; color: rgba(255,255,255,.45); line-height: 1.7; max-width: 280px; }
.footer-col__title { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.35); margin-bottom: var(--space-4); }
.footer-links { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-links a { font-size: 13.5px; color: rgba(255,255,255,.55); text-decoration: none; transition: color var(--transition-fast); }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: var(--space-6); border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: rgba(255,255,255,.3); flex-wrap: wrap; gap: var(--space-3); }

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT
═══════════════════════════════════════════════════════════════════════════ */
@media print {
  .site-nav, .reading-sidebar, .reading-panel, .site-footer, #reading-progress { display: none !important; }
  .reading-layout { display: block; }
  .reading-main { max-width: none; }
  .entry-body { font-size: 11pt; line-height: 1.6; }
  .footnotes__item { page-break-inside: avoid; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .knowledge-map-wrap { display: none; }
  .reading-layout { grid-template-columns: 1fr; }
  .reading-sidebar, .reading-panel { position: static; max-height: none; }
  .reading-panel { display: none; }
  .toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .lang-switcher { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stats-inner { gap: var(--space-6); }
  .footer-grid { grid-template-columns: 1fr; }
  .search-form { flex-direction: column; }
  .hero { padding: var(--space-12) 0; }
}
@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
  .hero-title { font-size: 1.9rem; }
  .grid-4 { grid-template-columns: 1fr; }
  .entry-meta { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
  .section { padding: var(--space-12) 0; }
  .reading-layout { padding: var(--space-6) var(--space-4) var(--space-12); }
  .stat-item__value { font-size: 1.5rem; }
}
