/* ============================================================
   Silence, Interests, and Betrayal — site styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@300;400;500;600;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* -------- Tokens -------- */
:root, [data-theme="light"] {
  --bg:        #f7f6f2;
  --bg-2:      #efece6;
  --paper:     #fbfaf6;
  --ink:       #1a1715;
  --ink-soft:  #3d3833;
  --muted:     #6f6a64;
  --faint:     #b3aea7;
  --rule:      #d6d1c8;
  --rule-soft: #e6e2db;
  --crimson:        #8a2a2a;
  --crimson-deep:   #5a1313;
  --crimson-soft:   #f1d9d4;
  --teal:           #01696F;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-meta:    'Source Sans 3', 'Inter', system-ui, sans-serif;

  --text-xs:   clamp(0.75rem, 0.7rem + 0.2vw, 0.825rem);
  --text-sm:   clamp(0.875rem, 0.85rem + 0.15vw, 0.95rem);
  --text-base: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1vw, 2.125rem);
  --text-2xl:  clamp(2rem, 1.4rem + 2vw, 3rem);
  --text-3xl:  clamp(2.5rem, 1.4rem + 4vw, 4.5rem);
  --text-hero: clamp(3rem, 1rem + 7vw, 7rem);

  --w-narrow:  640px;
  --w-prose:   720px;
  --w-default: 1000px;
  --w-wide:    1280px;

  --r-sm: 4px;
  --r-md: 6px;
}

[data-theme="dark"] {
  --bg:        #16130f;
  --bg-2:      #1c1815;
  --paper:     #1f1b17;
  --ink:       #ece7df;
  --ink-soft:  #c8c1b6;
  --muted:     #8a847b;
  --faint:     #5a554f;
  --rule:      #322d27;
  --rule-soft: #28231f;
  --crimson:        #c84a4a;
  --crimson-deep:   #8a2a2a;
  --crimson-soft:   #3b1d1d;
  --teal:           #4f98a3;
}

/* -------- Reset / base -------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
::selection { background: var(--crimson); color: #fff; }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; border-radius: var(--r-sm); }

/* -------- Site frame -------- */
.site-band-top, .site-band-bottom {
  height: 14px;
  background: var(--crimson-deep);
}
.site-band-top  { border-bottom: 4px solid var(--crimson); }
.site-band-bottom { border-top: 4px solid var(--crimson); }

/* -------- Header -------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
.header-inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 14px clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark .ring { stroke: var(--crimson); }
.brand-mark .bar  { fill: var(--crimson); }
.brand-text strong { font-weight: 400; color: var(--ink); }
.brand-text em { font-style: normal; color: var(--crimson); }
.nav {
  margin-left: auto;
  display: flex;
  gap: clamp(14px, 2.5vw, 28px);
  font-family: var(--font-meta);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.nav a {
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--crimson); }
.theme-toggle {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.theme-toggle:hover { color: var(--ink); background: var(--bg-2); }

.lang-switch {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--rule, currentColor);
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  padding: 4px 26px 4px 10px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: color .2s, border-color .2s;
}
.lang-switch:hover { color: var(--ink); border-color: var(--crimson); }
.lang-switch option { color: #000; background: #fff; }
[dir="rtl"] body { text-align: right; }

@media (max-width: 720px) {
  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--rule);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    white-space: nowrap;
    font-size: .82rem;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
  .header-inner { flex-wrap: wrap; }
}

/* -------- Reusable -------- */
.container, .container-wide, .container-narrow, .container-prose {
  max-width: var(--w-default);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}
.container-wide { max-width: var(--w-wide); }
.container-narrow { max-width: var(--w-narrow); }
.container-prose { max-width: var(--w-prose); }

.section {
  padding-block: clamp(64px, 9vw, 128px);
}
.section-tight {
  padding-block: clamp(48px, 6vw, 88px);
}
.section-divider {
  border-top: 1px solid var(--rule-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-meta);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--crimson);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--crimson);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  text-wrap: balance;
  color: var(--ink);
}

p { max-width: 68ch; }

/* -------- Hero -------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(72px, 11vw, 160px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 0%, color-mix(in oklab, var(--crimson) 10%, transparent), transparent 60%),
    radial-gradient(ellipse 70% 50% at 0% 100%, color-mix(in oklab, var(--crimson) 6%, transparent), transparent 60%);
  z-index: -1;
  pointer-events: none;
}
.hero-grid {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-title {
  font-size: var(--text-hero);
  letter-spacing: -0.015em;
  margin-bottom: 28px;
}
.hero-title .crimson { color: var(--crimson); font-style: italic; }
.hero-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--ink-soft);
  margin-bottom: 32px;
  max-width: 28ch;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  font-family: var(--font-meta);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 32px;
}
.hero-meta span::before {
  content: '·';
  margin-right: 22px;
  color: var(--faint);
}
.hero-meta span:first-child::before { content: ''; margin: 0; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-meta);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 13px 22px;
  border-radius: 2px;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn-primary {
  background: var(--crimson);
  color: #fff8f3;
  border: 1px solid var(--crimson);
}
.btn-primary:hover { background: var(--crimson-deep); border-color: var(--crimson-deep); }
.btn-ghost {
  border: 1px solid var(--rule);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* -------- Hero image -------- */
.hero-figure {
  position: relative;
}
.hero-figure img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 1px;
  box-shadow: 0 30px 60px -28px rgba(20,10,5,0.35);
  filter: saturate(0.92);
}
.hero-figure figcaption {
  margin-top: 12px;
  font-family: var(--font-meta);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hero-figure figcaption a { color: var(--teal); border-bottom: 1px dotted var(--teal); }

/* -------- Pull quote / dedication -------- */
.dedication {
  background: var(--paper);
  border-block: 1px solid var(--rule-soft);
}
.dedication blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xl);
  line-height: 1.35;
  color: var(--ink);
  text-wrap: balance;
  text-align: center;
  max-width: 28ch;
  margin: 0 auto;
}
.dedication cite {
  display: block;
  margin-top: 24px;
  text-align: center;
  font-style: normal;
  font-family: var(--font-meta);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

/* -------- Section heads -------- */
.section-head {
  max-width: var(--w-prose);
  margin: 0 auto clamp(40px, 6vw, 72px);
  text-align: center;
}
.section-head--left { text-align: left; margin-left: 0; }
.section-head h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.section-head p {
  font-size: var(--text-lg);
  font-style: italic;
  font-family: var(--font-display);
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 38ch;
}
.section-head--left p { margin-left: 0; }

/* -------- Timeline -------- */
.timeline {
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  padding-left: 64px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 28px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent 0%,
    var(--rule) 6%,
    var(--rule) 94%,
    transparent 100%);
}
.t-item { position: relative; margin-bottom: clamp(40px, 5vw, 64px); }
.t-item::before {
  content: '';
  position: absolute;
  left: -49px; top: 12px;
  width: 13px; height: 13px;
  border-radius: 999px;
  background: var(--bg);
  border: 2px solid var(--crimson);
}
.t-year {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--crimson);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.t-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 14px;
}
.t-body {
  font-size: var(--text-base);
  color: var(--ink-soft);
  line-height: 1.7;
}
.t-body strong { color: var(--ink); font-weight: 600; }
.t-body a { color: var(--teal); border-bottom: 1px dotted var(--teal); }
.t-body a:hover { color: var(--crimson); border-bottom-color: var(--crimson); }
.t-body + .t-body { margin-top: 12px; }

@media (max-width: 640px) {
  .timeline { padding-left: 40px; }
  .timeline::before { left: 16px; }
  .t-item::before { left: -29px; }
}

/* -------- Photo gallery -------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  max-width: var(--w-wide);
  margin: 0 auto;
}
.gallery figure {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
}
.gallery img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  filter: saturate(0.95);
  transition: transform .8s cubic-bezier(.16,1,.3,1), filter .4s;
}
.gallery figure:hover img { transform: scale(1.03); filter: saturate(1.05); }
.gallery .cap {
  font-family: var(--font-meta);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.45;
  letter-spacing: 0.01em;
}
.gallery a { color: var(--teal); border-bottom: 1px dotted var(--teal); }

/* spans */
.s-12 { grid-column: span 12; }
.s-8  { grid-column: span 8; }
.s-6  { grid-column: span 6; }
.s-4  { grid-column: span 4; }
.s-3  { grid-column: span 3; }

@media (max-width: 900px) {
  .s-8, .s-6, .s-4, .s-3 { grid-column: span 6; }
  .s-12 { grid-column: span 12; }
}
@media (max-width: 520px) {
  .s-8, .s-6, .s-4, .s-3 { grid-column: span 12; }
}

.gallery .ar-portrait img,
.gallery .ar-landscape img,
.gallery .ar-square img,
.gallery .ar-wide img { aspect-ratio: auto; }

/* -------- Names wall -------- */
.names {
  background: var(--paper);
  border-block: 1px solid var(--rule-soft);
}
.names-grid {
  max-width: var(--w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px 32px;
}
.name-card {
  border-left: 2px solid var(--crimson);
  padding: 4px 0 6px 16px;
}
.name-card .n {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 4px;
}
.name-card .meta {
  font-family: var(--font-meta);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.names-foot {
  max-width: var(--w-prose);
  margin: clamp(48px, 6vw, 72px) auto 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--ink-soft);
}

/* -------- Numbers / massacre count -------- */
.numbers {
  max-width: var(--w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.num-card {
  background: var(--paper);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.num-source {
  font-family: var(--font-meta);
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.num-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--crimson);
  line-height: 1;
  letter-spacing: -0.01em;
}
.num-desc {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* -------- Content warning banner -------- */
.content-warning {
  max-width: var(--w-wide);
  margin: 0 auto clamp(28px, 4vw, 48px);
  padding: 14px 20px;
  border-left: 3px solid var(--crimson);
  background: rgba(138, 42, 42, 0.06);
  font-family: var(--font-meta);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

/* -------- Portrait cards (executed prisoners) -------- */
.portrait-row {
  max-width: var(--w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(24px, 3vw, 40px);
}
.portrait-card {
  background: var(--paper);
  border-top: 2px solid var(--crimson);
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 20px 24px;
  align-items: start;
}
.portrait-card img {
  width: 110px;
  height: 132px;
  object-fit: cover;
  filter: saturate(0.92);
}
.portrait-card figcaption {
  font-family: var(--font-meta);
  font-size: 0.83rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.portrait-card figcaption strong {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.005em;
}
.portrait-card figcaption a { color: var(--teal); border-bottom: 1px dotted var(--teal); }
.portrait-card figcaption a:hover { color: var(--crimson); border-bottom-color: var(--crimson); }
@media (max-width: 480px) {
  .portrait-card { grid-template-columns: 1fr; }
  .portrait-card img { width: 100%; height: auto; aspect-ratio: 4/5; }
}

/* -------- Quotes (testimonies) -------- */
.testimonies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 3vw, 40px);
  max-width: var(--w-wide);
  margin: 0 auto;
}
.testi {
  background: var(--paper);
  padding: clamp(24px, 3vw, 36px);
  border-top: 2px solid var(--crimson);
}
.testi blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 16px;
}
.testi cite {
  font-style: normal;
  font-family: var(--font-meta);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.testi cite strong { color: var(--ink); font-weight: 600; }

/* -------- Two-column editorial -------- */
.editorial {
  max-width: var(--w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 900px) {
  .editorial { grid-template-columns: 1fr; }
}
.editorial-image img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  filter: saturate(0.93);
}
.editorial-image figcaption {
  font-family: var(--font-meta);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
}
.editorial-image a { color: var(--teal); border-bottom: 1px dotted var(--teal); }
.editorial-text h2 {
  font-size: var(--text-2xl);
  margin-bottom: 24px;
  letter-spacing: -0.005em;
}
.editorial-text p { margin-bottom: 18px; color: var(--ink-soft); }
.editorial-text p strong { color: var(--ink); font-weight: 600; }
.editorial-text a { color: var(--teal); border-bottom: 1px dotted var(--teal); }
.editorial-text a:hover { color: var(--crimson); border-bottom-color: var(--crimson); }

/* -------- Call to action list -------- */
.cta-grid {
  max-width: var(--w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
}
@media (max-width: 1100px) {
  .cta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .cta-grid { grid-template-columns: 1fr; }
}
.cta-card {
  padding: clamp(28px, 3vw, 36px);
  background: var(--paper);
  border-top: 3px solid var(--crimson);
}
.cta-card h3 {
  font-size: var(--text-lg);
  font-family: var(--font-display);
  margin-bottom: 16px;
  color: var(--ink);
}
.cta-card ol {
  list-style: none;
  counter-reset: c;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cta-card li {
  counter-increment: c;
  position: relative;
  padding-left: 36px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}
.cta-card li::before {
  content: counter(c, decimal-leading-zero);
  position: absolute;
  left: 0; top: 1px;
  font-family: var(--font-display);
  color: var(--crimson);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

/* -------- Download -------- */
.download {
  background: var(--paper);
  border-block: 1px solid var(--rule-soft);
}
.download-inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
@media (max-width: 720px) { .download-inner { grid-template-columns: 1fr; } }
.download h2 {
  font-size: var(--text-2xl);
  margin-bottom: 14px;
}
.download p {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-soft);
  font-size: var(--text-lg);
  max-width: 50ch;
}

/* -------- Sources / footer -------- */
.sources {
  max-width: var(--w-wide);
  margin: 0 auto;
}
.sources-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}
@media (max-width: 1100px) {
  .sources-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .sources-cols { grid-template-columns: 1fr; }
}
.src-col h3 {
  font-family: var(--font-meta);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--crimson);
  margin-bottom: 16px;
}
.src-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.src-col a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
}
.src-col a:hover { color: var(--crimson); border-bottom-color: var(--crimson); }

.footer {
  border-top: 1px solid var(--rule-soft);
  padding-block: 36px;
  margin-top: clamp(64px, 8vw, 120px);
  background: var(--bg);
}
.footer-inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-meta);
  font-size: 0.82rem;
  color: var(--muted);
}
.footer .slogan {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--crimson);
  font-size: 1rem;
}

/* -------- Reveal on scroll -------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.16,1,.3,1);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* -------- Active nav state -------- */
.nav a.is-active {
  color: var(--crimson);
  border-bottom-color: var(--crimson);
}

/* -------- Chapter prev/next nav -------- */
.chapter-nav {
  border-top: 1px solid var(--rule);
  padding: clamp(28px,4vw,48px) 0;
  background: var(--bg);
}
.chapter-nav-inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.chapter-nav a {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 16px 22px;
  border-radius: 4px;
  transition: border-color .2s ease, background .2s ease;
  max-width: 360px;
}
.chapter-nav a:hover {
  border-color: var(--crimson);
  background: var(--bg-2);
}
.chapter-nav .cn-eyebrow {
  font-family: var(--font-meta);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.chapter-nav .cn-label {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: 600;
}
.chapter-nav .chapter-next {
  text-align: right;
  margin-left: auto;
}
@media (max-width: 640px) {
  .chapter-nav-inner { flex-direction: column; }
  .chapter-nav .chapter-next { margin-left: 0; text-align: left; }
}

/* -------- Footer nav links -------- */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  width: 100%;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.footer-nav a {
  font-family: var(--font-meta);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}
.footer-nav a:hover { color: var(--crimson); }

/* -------- Mobile nav: horizontal scroll if many links -------- */
@media (max-width: 980px) and (min-width: 641px) {
  .nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
}

/* -------- Social share floating widget -------- */
.share-fab-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: inherit;
}
[dir="rtl"] .share-fab-wrap { right: auto; left: 18px; align-items: flex-start; }
.share-fab {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--crimson, #8a2a2a);
  color: #fff;
  border: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.14);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .18s ease, background .2s ease;
}
.share-fab:hover { transform: translateY(-2px); background: #a13030; }
.share-fab svg { width: 22px; height: 22px; }
.share-panel {
  background: var(--bg, #fff);
  color: var(--ink, #1a1a1a);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 6px;
  min-width: 200px;
  max-height: 70vh;
  overflow: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,.18), 0 4px 10px rgba(0,0,0,.08);
  display: flex; flex-direction: column;
}
.share-panel[hidden] { display: none !important; }
@media (max-width: 480px) {
  .share-fab-wrap { right: 12px; bottom: 12px; gap: 8px; }
  [dir="rtl"] .share-fab-wrap { right: auto; left: 12px; }
  .share-fab { width: 46px; height: 46px; }
  .share-fab svg { width: 20px; height: 20px; }
  .share-panel {
    min-width: 0;
    width: calc(100vw - 24px);
    max-width: 280px;
    max-height: 60vh;
  }
  .share-item { padding: 11px 12px; font-size: 15px; }
}
[data-theme="dark"] .share-panel {
  background: #1c1c1f; color: #f1f1f1;
  border-color: rgba(255,255,255,.08);
}
.share-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  font-size: 14px;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
[dir="rtl"] .share-item { text-align: right; }
.share-item:hover { background: rgba(138,42,42,.08); }
[data-theme="dark"] .share-item:hover { background: rgba(255,255,255,.06); }
.share-ic {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; color: var(--crimson, #8a2a2a);
}
[data-theme="dark"] .share-ic { color: #e08a8a; }
.share-ic svg { width: 20px; height: 20px; }
.share-ic-x  { color: #000; } [data-theme="dark"] .share-ic-x  { color: #fff; }
.share-ic-fb { color: #1877f2; }
.share-ic-li { color: #0a66c2; }
.share-ic-tg { color: #229ed9; }
.share-ic-wa { color: #25d366; }
.share-ic-rd { color: #ff4500; }
@media print { .share-fab-wrap { display: none !important; } }
