/* ═══════════════════════════════════════════════════════════════
   ARCHIWUM DOOM TROOPER — "Painterly War Dossier"
   Paleta: oliwkowa zieleń Kapitolu + mosiądz Brotherhood + bone.
   Inspiracja: Paul Bonner, Mutant Chronicles RPG, editorial magazines.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── KOLORY: oliwa + mosiądz + kamień ── */
  --void:      #0A0E08;
  --canvas:    #131810;
  --canvas-2:  #1A2115;
  --moss:      #22291C;
  --moss-hi:   #2C3524;
  --fern:      #4F6C3A;
  --lichen:    #7A9254;
  --brass:     #B8924E;
  --brass-hi:  #D4AE6C;
  --brass-lo:  #7A5E30;
  --bone:      #E8DAB5;
  --bone-mute: #B5A68A;
  --ash:       #7B7566;
  --oxide:     #8B4A3A;
  --rule:      #2E3628;
  --rule-hi:   #465038;
  --gold-glow: rgba(212, 174, 108, 0.22);

  /* ── KAMIEŃ: szare granitowe akcenty dla reliefów ── */
  --stone:     #2A2D26;
  --stone-hi:  #3B3F35;
  --stone-lo:  #1B1D17;
  --carve-hi:  rgba(232, 218, 181, 0.08);   /* jasny brzeg ryty w kamieniu */
  --carve-lo:  rgba(0, 0, 0, 0.55);          /* głęboki cień rytu */

  /* ── TYPOGRAFIA: klasyczno-archiwalna (bez Black Ops One) ── */
  --f-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --f-brand:   "Cinzel", "Trajan Pro", Georgia, serif;
  --f-accent:  "IM Fell English", "Cinzel", Georgia, serif;
  --f-ui:      "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body:    "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --f-mono:    "JetBrains Mono", "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 18px; }
body {
  font-family: var(--f-body);
  font-weight: 400;
  background: var(--canvas);
  color: var(--bone);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 30% 0%, rgba(184, 146, 78, 0.06), transparent 60%),
    radial-gradient(ellipse 100% 60% at 70% 100%, rgba(34, 41, 28, 0.8), transparent 70%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch' seed='3'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.05 0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
  background-blend-mode: multiply, normal, overlay;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse 100% 80% at 50% 50%, transparent 40%, rgba(0,0,0,0.35) 100%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--fern); color: var(--bone); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* ═══ SCROLL REVEAL ANIMATIONS ═══ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s cubic-bezier(0.2,0,0.2,1), transform 0.9s cubic-bezier(0.2,0,0.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.9s cubic-bezier(0.2,0,0.2,1), transform 0.9s cubic-bezier(0.2,0,0.2,1); }
.reveal-left.in { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.9s cubic-bezier(0.2,0,0.2,1), transform 0.9s cubic-bezier(0.2,0,0.2,1); }
.reveal-right.in { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.94); transition: opacity 0.9s ease, transform 1.2s cubic-bezier(0.2,0,0.2,1); }
.reveal-scale.in { opacity: 1; transform: scale(1); }
.stagger > * { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2,0,0.2,1); }
.stagger.in > * { opacity: 1; transform: translateY(0); }
.stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.in > *:nth-child(2) { transition-delay: 0.15s; }
.stagger.in > *:nth-child(3) { transition-delay: 0.25s; }
.stagger.in > *:nth-child(4) { transition-delay: 0.35s; }
.stagger.in > *:nth-child(5) { transition-delay: 0.45s; }
.stagger.in > *:nth-child(6) { transition-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1 !important; transform: none !important; }
  .stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ═══ TYPOGRAPHY ═══ */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--brass); opacity: 0.7; }
.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ash); }

/* ═══ HEADER ═══ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(19, 24, 16, 0.72);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; cursor: pointer; user-select: none; }
.brand-logo-svg {
  width: 180px; height: 44px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
  transition: filter 0.25s ease;
}
.brand:hover .brand-logo-svg {
  filter: drop-shadow(0 2px 6px rgba(212, 174, 108, 0.5)) drop-shadow(0 0 12px var(--gold-glow));
}
.brand-logo {
  font-family: var(--f-brand); font-size: 22px; line-height: 1;
  font-weight: 900; letter-spacing: 0.04em;
  background: linear-gradient(180deg, var(--brass-hi) 0%, var(--brass) 55%, #8a6d3a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}
.brand-sub {
  font-family: var(--f-ui); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--bone-mute);
}
.header-spacer { flex: 1; }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  color: var(--bone-mute); border: 1px solid transparent;
  transition: all 0.2s; border-radius: 2px;
}
.icon-btn:hover { color: var(--brass-hi); background: var(--moss); border-color: var(--rule-hi); }
.icon-btn svg { width: 18px; height: 18px; stroke-width: 1.5; }

.btn-cta {
  padding: 10px 20px 9px;
  font-family: var(--f-ui); font-weight: 600; font-size: 13px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--void);
  background: linear-gradient(180deg, var(--brass-hi), var(--brass));
  border: 1px solid var(--brass-hi);
  display: inline-flex; align-items: center; gap: 10px;
  transition: all 0.2s; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 2px 4px rgba(0,0,0,0.4);
}
.btn-cta:hover {
  background: linear-gradient(180deg, #ecc47f, var(--brass-hi));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 6px 20px var(--gold-glow);
}
.btn-cta svg { width: 14px; height: 14px; }

kbd {
  font-family: var(--f-mono); font-size: 10px; padding: 2px 7px;
  border: 1px solid var(--rule-hi); background: var(--moss);
  color: var(--bone-mute); border-radius: 2px;
}

/* ═══ HERO ═══ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  padding: 80px 32px 120px;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 75% 25%, rgba(184, 146, 78, 0.2), transparent 55%),
    radial-gradient(ellipse 50% 70% at 10% 80%, rgba(10, 14, 8, 0.85), transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(79, 108, 58, 0.08), transparent 70%),
    linear-gradient(170deg, #1A2217 0%, #131810 100%);
  will-change: transform;
  transition: transform 0.2s ease-out;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch' seed='11'/><feColorMatrix values='0 0 0 0 0.6 0 0 0 0 0.5 0 0 0 0 0.3 0 0 0 0.13 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay; opacity: 0.8;
}
.hero-inner {
  max-width: 1400px; width: 100%; margin: 0 auto;
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 80px; align-items: center;
}

.hero-eyebrow {
  font-family: var(--f-mono); font-size: 11px; color: var(--brass);
  letter-spacing: 0.22em; text-transform: uppercase;
  margin-bottom: 36px; display: flex; align-items: center; gap: 14px;
}
.hero-eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--brass); }

.hero-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(48px, 7.5vw, 108px);
  line-height: 0.92; letter-spacing: -0.02em;
  color: var(--bone); margin-bottom: 24px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.5), 0 8px 32px rgba(0,0,0,0.6);
}
.hero-title em { font-style: italic; font-weight: 400; color: var(--brass-hi); }

/* DUŻE LOGO DOOM TROOPER w hero - zastępuje poprzedni .hero-title-brand */
.hero-logo {
  display: block;
  width: 100%;
  max-width: 540px;
  height: auto;
  aspect-ratio: 520 / 300;
  margin: 8px 0 36px;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.7)) drop-shadow(0 0 28px rgba(184, 146, 78, 0.15));
}

/* Sylwetka Kapitolowego żołnierza w tle hero - Bonner-inspired */
.hero-trooper {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  height: 88%;
  width: auto;
  max-width: 42%;
  z-index: 1;
  opacity: 0.9;
  pointer-events: none;
  filter: drop-shadow(0 16px 40px rgba(0,0,0,0.6));
}

.hero-lede {
  font-family: var(--f-body); font-size: clamp(18px, 1.3vw, 21px);
  line-height: 1.55; color: var(--bone-mute);
  margin-bottom: 44px; max-width: 56ch;
}
.hero-lede strong { color: var(--bone); font-weight: 500; font-style: italic; }

.hero-ctas { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.btn-primary {
  padding: 16px 28px;
  font-family: var(--f-ui); font-weight: 600; font-size: 14px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--void);
  background: linear-gradient(180deg, var(--brass-hi), var(--brass));
  border: 1px solid var(--brass-hi);
  display: inline-flex; align-items: center; gap: 12px;
  transition: all 0.2s; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 4px 14px rgba(0,0,0,0.5);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #ecc47f, var(--brass-hi));
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 8px 24px var(--gold-glow);
}
.btn-primary svg { width: 16px; height: 16px; stroke-width: 2; }
.btn-secondary {
  padding: 15px 28px;
  font-family: var(--f-ui); font-weight: 500; font-size: 14px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone);
  background: transparent; border: 1px solid var(--rule-hi);
  display: inline-flex; align-items: center; gap: 12px;
  transition: all 0.2s; cursor: pointer;
}
.btn-secondary:hover {
  border-color: var(--fern); color: var(--lichen);
  background: rgba(79, 108, 58, 0.1);
}

.hero-side {
  position: relative; border-left: 1px solid var(--rule-hi);
  padding-left: 48px; max-width: 360px;
}
.hero-side::before {
  content: ""; position: absolute; top: 0; left: -2px;
  width: 3px; height: 48px; background: var(--brass);
}
.hero-file-id {
  font-family: var(--f-mono); font-size: 11px; color: var(--brass);
  letter-spacing: 0.15em; margin-bottom: 32px;
}
.hero-file-id .lbl { color: var(--ash); margin-right: 8px; }

.stats-editorial { display: flex; flex-direction: column; gap: 20px; }
.stat-line {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 16px; border-bottom: 1px dashed var(--rule);
}
.stat-line:last-child { border-bottom: 0; }
.stat-line-label {
  font-family: var(--f-ui); font-size: 12px;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--bone-mute);
}
.stat-line-num {
  font-family: var(--f-display); font-weight: 700;
  font-size: 30px; line-height: 1; color: var(--bone);
  font-variant-numeric: tabular-nums;
}

.hero-scroll {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%); z-index: 3;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.2em; color: var(--bone-mute);
  text-transform: uppercase; opacity: 0.5;
  animation: pulseDown 2.4s ease-in-out infinite;
}
@keyframes pulseDown {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50%      { transform: translateX(-50%) translateY(10px); opacity: 0.9; }
}

/* ═══ KAMIENNY DIVIDER (ornament między sekcjami) ═══ */
.stone-divider {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
  transition: opacity 1.2s cubic-bezier(0.2,0,0.2,1), transform 1.2s cubic-bezier(0.2,0,0.2,1);
}
.stone-divider svg {
  width: 100%;
  height: auto;
  max-height: 70px;
  display: block;
}
.stone-divider::before,
.stone-divider::after {
  content: "";
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass) 80%);
  opacity: 0.4;
}
.stone-divider::before { left: 32px; }
.stone-divider::after {
  right: 32px;
  background: linear-gradient(90deg, var(--brass) 20%, transparent);
}

/* ═══ SECTIONS ═══ */
.section {
  max-width: 1400px; margin: 0 auto;
  padding: 120px 32px;
  position: relative; z-index: 2;
}

.section-head {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: end; gap: 32px;
  margin-bottom: 64px; padding-bottom: 24px;
  border-bottom: 1px solid var(--rule-hi); position: relative;
}
.section-head::after {
  content: ""; position: absolute; bottom: -1px; left: 0;
  width: 96px; height: 2px; background: var(--brass);
}
.section-num {
  font-family: var(--f-mono); font-size: 13px; color: var(--brass);
  letter-spacing: 0.2em; padding-bottom: 8px;
}
.section-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(36px, 4.5vw, 56px);
  letter-spacing: -0.02em; line-height: 1; color: var(--bone);
}
.section-title em { font-style: italic; color: var(--brass); font-weight: 400; }
.section-meta {
  font-family: var(--f-ui); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone-mute); padding-bottom: 10px; text-align: right;
}

/* ═══ NICODEMUS SECTION ═══ */
.nicodemus-section {
  position: relative;
  padding: 120px 32px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(ellipse 50% 100% at 25% 50%, rgba(184, 146, 78, 0.1), transparent 60%),
    radial-gradient(ellipse 60% 100% at 80% 50%, rgba(79, 108, 58, 0.06), transparent 60%),
    var(--canvas-2);
  overflow: hidden;
}
.nicodemus-section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch' seed='22'/><feColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.42 0 0 0 0 0.25 0 0 0 0.12 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

.nicodemus-inner {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 380px 1fr; gap: 80px;
  align-items: center; position: relative;
}

/* Nicodemus "portrait" - CSS illustration evoking a hooded monk */
.nicodemus-portrait {
  position: relative;
  aspect-ratio: 3/4;
  background:
    radial-gradient(ellipse 80% 50% at 50% 20%, rgba(184, 146, 78, 0.25), transparent 60%),
    radial-gradient(ellipse 70% 70% at 50% 70%, rgba(34, 41, 28, 0.4), transparent 70%),
    linear-gradient(180deg, #1F2818 0%, #0F130C 100%);
  border: 1px solid var(--rule-hi);
  overflow: hidden;
  box-shadow: var(--shadow-deep), inset 0 0 60px rgba(0,0,0,0.4);
}
.nicodemus-portrait::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 300 400' preserveAspectRatio='xMidYMid slice'><defs><linearGradient id='g1' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23463824'/><stop offset='1' stop-color='%231a1510'/></linearGradient><linearGradient id='g2' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23352a1a'/><stop offset='1' stop-color='%230e0b06'/></linearGradient><radialGradient id='flame' cx='50%25' cy='50%25'><stop offset='0' stop-color='%23f0c36a' stop-opacity='0.8'/><stop offset='0.4' stop-color='%23b8924e' stop-opacity='0.4'/><stop offset='1' stop-color='%23b8924e' stop-opacity='0'/></radialGradient></defs><!-- hood silhouette --><path d='M 40 400 L 60 180 Q 80 80 150 70 Q 220 80 240 180 L 260 400 Z' fill='url(%23g1)'/><!-- inner face shadow --><path d='M 110 180 Q 110 155 150 145 Q 190 155 190 180 L 190 240 Q 150 260 110 240 Z' fill='%23080604'/><!-- robe shoulders --><path d='M 0 400 L 40 250 L 60 280 L 90 400 Z' fill='url(%23g2)'/><path d='M 300 400 L 260 250 L 240 280 L 210 400 Z' fill='url(%23g2)'/><!-- lantern (right hand) --><ellipse cx='220' cy='340' rx='45' ry='55' fill='url(%23flame)'/><rect x='212' y='290' width='16' height='4' fill='%23806330'/><rect x='215' y='290' width='10' height='70' fill='%239e7d42' opacity='0.7'/><!-- scroll (left hand) --><rect x='72' y='320' width='50' height='8' fill='%23e8dab5' opacity='0.6' rx='2'/><rect x='68' y='325' width='58' height='4' fill='%23b5a68a' opacity='0.5' rx='2'/></svg>");
  opacity: 0.85;
}
.nicodemus-portrait::after {
  content: ""; position: absolute; inset: 0;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch' seed='33'/><feColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.3 0 0 0 0 0.15 0 0 0 0.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay; pointer-events: none;
}
.nicodemus-portrait-frame {
  position: absolute; inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(0deg, var(--brass) 0, var(--brass) 2px, transparent 2px, transparent calc(100% - 2px), var(--brass) calc(100% - 2px), var(--brass) 100%),
    linear-gradient(90deg, var(--brass) 0, var(--brass) 2px, transparent 2px, transparent calc(100% - 2px), var(--brass) calc(100% - 2px), var(--brass) 100%);
  background-size: 100% 40px, 40px 100%;
  background-position: 0 0, 0 0;
  background-repeat: no-repeat;
  opacity: 0.6;
}

.nicodemus-content { padding: 20px 0; }
.nicodemus-eyebrow {
  font-family: var(--f-mono); font-size: 11px; color: var(--brass);
  letter-spacing: 0.22em; text-transform: uppercase;
  margin-bottom: 24px; display: flex; align-items: center; gap: 14px;
}
.nicodemus-eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--brass); }

.nicodemus-name {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(56px, 7vw, 92px); line-height: 0.95;
  letter-spacing: -0.02em; color: var(--bone);
  margin-bottom: 28px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.4);
}
.nicodemus-name em {
  display: block; font-style: italic; font-weight: 400;
  font-size: 0.42em; color: var(--brass); margin-bottom: 8px;
  letter-spacing: 0.08em;
}

.nicodemus-bio {
  font-family: var(--f-body); font-size: 19px; line-height: 1.6;
  color: var(--bone-mute); margin-bottom: 36px; max-width: 58ch;
}
.nicodemus-bio p + p { margin-top: 1em; }
.nicodemus-bio strong { color: var(--bone); font-style: italic; font-weight: 500; }

.nicodemus-scope {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-bottom: 40px; padding: 24px 28px;
  background: rgba(10, 14, 8, 0.4);
  border: 1px solid var(--rule-hi);
  border-left: 2px solid var(--brass);
}
.nicodemus-scope-item {
  display: flex; flex-direction: column; gap: 4px;
}
.nicodemus-scope-num {
  font-family: var(--f-display); font-weight: 700; font-size: 24px;
  color: var(--bone); line-height: 1;
}
.nicodemus-scope-label {
  font-family: var(--f-ui); font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--bone-mute);
}

/* ═══ RULES SEARCH — big section ═══ */
.rules-search {
  max-width: 900px; margin: 0 auto;
  padding: 100px 32px;
  text-align: center;
}
.rules-search-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(36px, 4.5vw, 56px); line-height: 1;
  margin-bottom: 20px; color: var(--bone);
  letter-spacing: -0.02em;
}
.rules-search-title em { font-style: italic; color: var(--brass); font-weight: 400; }
.rules-search-desc {
  font-family: var(--f-body); font-size: 18px;
  color: var(--bone-mute); margin-bottom: 44px; max-width: 54ch;
  margin-left: auto; margin-right: auto;
}

.rules-search-box {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 28px;
  background: var(--moss);
  border: 1px solid var(--rule-hi);
  transition: all 0.2s;
  max-width: 680px; margin: 0 auto;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.rules-search-box:focus-within {
  border-color: var(--brass);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px var(--brass), 0 0 40px var(--gold-glow);
}
.rules-search-box svg { width: 22px; height: 22px; color: var(--brass); flex-shrink: 0; }
.rules-search-box input {
  flex: 1; background: transparent; border: 0; outline: 0;
  font-family: var(--f-ui); font-size: 18px; color: var(--bone);
  letter-spacing: 0.02em;
}
.rules-search-box input::placeholder {
  color: var(--ash); font-style: italic;
}

.rules-filters {
  display: flex; justify-content: center; gap: 10px;
  flex-wrap: wrap; margin-top: 24px;
}
.filter-chip {
  padding: 8px 18px 7px;
  font-family: var(--f-ui); font-weight: 500; font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone-mute);
  background: transparent; border: 1px solid var(--rule-hi);
  transition: all 0.15s; cursor: pointer;
}
.filter-chip:hover { border-color: var(--fern); color: var(--lichen); }
.filter-chip.active {
  background: var(--fern); border-color: var(--fern); color: var(--bone);
}

/* ═══ DYWIZJE (categories) — editorial asymmetric ═══ */
.divisions { display: flex; flex-direction: column; gap: 80px; }
.division {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 48px; align-items: start;
  padding-bottom: 72px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.division:last-child { border-bottom: 0; padding-bottom: 0; }

.division-num {
  font-family: var(--f-display); font-weight: 900; font-style: italic;
  font-size: 96px; line-height: 0.9;
  color: var(--brass);
  text-shadow: 0 2px 0 rgba(0,0,0,0.4);
  letter-spacing: -0.03em;
}
.division-content {
  display: grid; gap: 8px;
}
.division-name {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(28px, 3.5vw, 44px); line-height: 1.05;
  color: var(--bone); letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.division-meta {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--bone-mute); letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 24px;
}
.division-boards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px; background: var(--rule);
  border: 1px solid var(--rule-hi);
}
.board {
  background: var(--canvas-2);
  padding: 24px 24px 22px;
  cursor: pointer; transition: all 0.25s;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 160px; position: relative;
}
.board::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: 0; height: 2px; background: var(--brass);
  transition: width 0.3s cubic-bezier(0.2,0,0.2,1);
}
.board:hover {
  background: var(--moss-hi);
}
.board:hover::before { width: 100%; }
.board:hover .board-name { color: var(--brass-hi); }

.board-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
}
.board-name {
  font-family: var(--f-display); font-weight: 700; font-size: 19px;
  line-height: 1.2; color: var(--bone); transition: color 0.2s;
}
.board-id {
  font-family: var(--f-mono); font-size: 10px; color: var(--ash);
  letter-spacing: 0.1em; white-space: nowrap; padding-top: 2px;
}
.board-desc {
  font-family: var(--f-body); font-size: 14px;
  line-height: 1.5; color: var(--bone-mute); flex: 1;
}
.board-stats {
  display: flex; gap: 22px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--ash); letter-spacing: 0.05em;
  padding-top: 12px; border-top: 1px dashed var(--rule);
}
.board-stats strong { color: var(--brass); font-weight: 500; }

/* RULES BADGE on rules-related boards */
.board-rules-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--f-ui); font-weight: 600; font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--brass); margin-top: 2px;
}
.board-rules-badge::before { content: "◆"; font-size: 8px; }

/* ═══ FEATURED TOPICS (magazine cards) ═══ */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--moss);
  border: 1px solid var(--rule-hi);
  position: relative; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2,0,0.2,1);
  padding: 32px 28px 28px;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 340px;
}
.feature-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 120px;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(184, 146, 78, 0.22), transparent 65%),
    radial-gradient(ellipse at 80% 80%, rgba(79, 108, 58, 0.32), transparent 70%),
    linear-gradient(180deg, var(--canvas-2) 0%, var(--moss) 100%);
  z-index: 0; border-bottom: 1px solid var(--rule-hi);
}
.feature-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 120px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch' seed='5'/><feColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 0.45 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay; z-index: 1; pointer-events: none;
}
.feature-card > * { position: relative; z-index: 2; }
.feature-card:hover {
  border-color: var(--brass); transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.5), 0 0 0 1px var(--brass);
}
.feature-card:nth-child(2)::before {
  background:
    radial-gradient(ellipse at 70% 30%, rgba(139, 74, 58, 0.3), transparent 65%),
    radial-gradient(ellipse at 20% 90%, rgba(20, 25, 17, 0.9), transparent 70%),
    linear-gradient(180deg, #1a2217 0%, var(--moss) 100%);
}
.feature-card:nth-child(3)::before {
  background:
    radial-gradient(ellipse at 40% 40%, rgba(79, 108, 58, 0.35), transparent 65%),
    radial-gradient(ellipse at 85% 70%, rgba(184, 146, 78, 0.18), transparent 70%),
    linear-gradient(180deg, #202818 0%, var(--moss) 100%);
}

.feature-tag {
  display: inline-block; margin-bottom: 12px;
  font-family: var(--f-ui); font-weight: 600; font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass);
  padding: 4px 10px; border: 1px solid var(--brass); opacity: 0.85;
}
.feature-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: 24px; line-height: 1.15;
  margin-bottom: 12px; color: var(--bone);
  transition: color 0.2s;
  padding-top: 82px;
}
.feature-card:hover .feature-title { color: var(--brass-hi); }
.feature-excerpt {
  font-family: var(--f-body); font-size: 15px; line-height: 1.55;
  color: var(--bone-mute); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.feature-meta {
  display: flex; align-items: center; gap: 14px; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--rule);
  font-family: var(--f-mono); font-size: 10px;
  color: var(--ash); letter-spacing: 0.08em;
}
.feature-meta strong { color: var(--bone-mute); font-weight: 500; }
.feature-meta .dot { width: 3px; height: 3px; background: var(--rule-hi); border-radius: 50%; }

/* ═══ TOPICS LIST ═══ */
.topics-list { border-top: 1px solid var(--rule); }
.topic-row {
  display: grid; grid-template-columns: 1fr auto auto auto;
  align-items: center; gap: 28px;
  padding: 22px 16px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer; transition: all 0.15s;
  position: relative;
}
.topic-row::before {
  content: ""; position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 0; height: 1px; background: var(--brass);
  transition: width 0.25s;
}
.topic-row:hover::before { width: 8px; }
.topic-row:hover { background: var(--moss); padding-left: 24px; }
.topic-row:hover .topic-title { color: var(--brass-hi); }

.topic-main { min-width: 0; }
.topic-title {
  font-family: var(--f-display); font-weight: 600;
  font-size: 18px; line-height: 1.25; color: var(--bone);
  transition: color 0.15s; display: inline;
}
.topic-meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 6px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--ash); letter-spacing: 0.04em;
}
.topic-meta .author { color: var(--bone-mute); font-weight: 500; }
.topic-meta .dot { width: 3px; height: 3px; background: var(--rule-hi); border-radius: 50%; }

.topic-replies, .topic-views {
  font-family: var(--f-mono); font-size: 12px;
  color: var(--bone-mute); text-align: right;
  font-variant-numeric: tabular-nums; min-width: 64px;
}
.topic-replies strong, .topic-views strong {
  display: block; font-size: 16px; color: var(--bone);
  font-weight: 500; font-family: var(--f-display);
}
.topic-date {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--ash); min-width: 92px; text-align: right;
}

.badge {
  display: inline-flex; align-items: center;
  font-family: var(--f-ui); font-weight: 600; font-size: 10px;
  padding: 3px 9px 2px; letter-spacing: 0.18em;
  text-transform: uppercase; line-height: 1.3;
  margin-right: 10px; vertical-align: middle;
  border: 1px solid; white-space: nowrap;
}
.badge--sticky { color: var(--brass); border-color: var(--brass); background: rgba(184, 146, 78, 0.1); }
.badge--locked { color: var(--ash); border-color: var(--ash); }
.badge--rules  { color: var(--lichen); border-color: var(--fern); background: rgba(79, 108, 58, 0.15); }

/* ═══ BREADCRUMB ═══ */
.breadcrumb {
  display: flex; align-items: center; gap: 10px;
  padding: 32px 0 8px;
  font-family: var(--f-ui); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone-mute);
}
.breadcrumb a { transition: color 0.15s; cursor: pointer; }
.breadcrumb a:hover { color: var(--brass); }
.breadcrumb .sep { color: var(--brass); }

/* ═══ THREAD VIEW ═══ */
.thread-header {
  padding: 16px 0 48px;
  border-bottom: 1px solid var(--rule); margin-bottom: 48px;
  position: relative;
}
.thread-file-id {
  font-family: var(--f-mono); font-size: 12px;
  color: var(--brass); letter-spacing: 0.12em;
  margin-bottom: 20px; display: flex; gap: 20px; align-items: center;
}
.thread-header h1 {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.05; letter-spacing: -0.015em;
  color: var(--bone); margin-bottom: 24px;
  max-width: 28ch;
  text-shadow: 0 2px 0 rgba(0,0,0,0.4);
}
.thread-info {
  display: flex; flex-wrap: wrap; gap: 24px;
  font-family: var(--f-mono); font-size: 12px;
  color: var(--bone-mute); letter-spacing: 0.05em;
}
.thread-info strong { color: var(--bone); font-weight: 500; }

.post {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 40px; padding: 40px 0;
  border-bottom: 1px solid var(--rule); position: relative;
}
.post:last-child { border-bottom: 0; }
.post-entry-num {
  position: absolute; top: 40px; right: 0;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.12em; color: var(--ash);
}
.post-entry-num::before { content: "ENTRY "; color: var(--brass); }

.post-author-col {
  padding: 20px;
  background: var(--moss); border: 1px solid var(--rule-hi);
  height: fit-content; position: relative;
}
.post-avatar {
  width: 72px; height: 72px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--fern), var(--moss));
  border: 2px solid var(--brass);
  color: var(--bone); display: grid; place-items: center;
  font-family: var(--f-display); font-size: 26px; font-weight: 900;
  position: relative;
}
.post-avatar::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg,
    transparent 0, transparent 4px,
    rgba(0,0,0,0.1) 4px, rgba(0,0,0,0.1) 5px);
}
.post-author-name {
  font-family: var(--f-display); font-weight: 600; font-size: 15px;
  text-align: center; color: var(--bone);
  letter-spacing: 0.01em; margin-bottom: 8px; word-break: break-word;
}
.post-author-meta {
  font-family: var(--f-mono); font-size: 10px; text-align: center;
  color: var(--ash); line-height: 1.6; letter-spacing: 0.05em;
}
.post-author-meta strong { color: var(--brass); }

.post-content { min-width: 0; }
.post-date-row {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--ash); margin-bottom: 26px;
  letter-spacing: 0.06em;
}
.post-date-row::before {
  content: ""; width: 20px; height: 1px; background: var(--brass);
}

.post-body {
  font-family: var(--f-body); font-size: 18px;
  line-height: 1.72; color: var(--bone);
}
.post-body p { margin-bottom: 1em; }
.post-body p:last-child { margin-bottom: 0; }
.post-body strong { color: var(--bone); font-weight: 600; }
.post-body em { color: var(--bone-mute); }
.post-body a {
  color: var(--brass); border-bottom: 1px dashed var(--brass);
  transition: color 0.15s;
}
.post-body a:hover { color: var(--brass-hi); border-bottom-style: solid; }

.post-body blockquote {
  margin: 18px 0; padding: 16px 20px;
  background: rgba(79, 108, 58, 0.08);
  border-left: 3px solid var(--fern);
  font-size: 15px; color: var(--bone-mute);
  font-style: italic; position: relative;
}
.post-body blockquote cite {
  display: block; font-family: var(--f-ui);
  font-style: normal; font-size: 10px;
  letter-spacing: 0.2em; color: var(--brass);
  text-transform: uppercase; margin-bottom: 6px; font-weight: 600;
}
.post-body pre {
  font-family: var(--f-mono); font-size: 13px;
  background: var(--void); border: 1px solid var(--rule-hi);
  border-left: 3px solid var(--brass);
  padding: 14px 18px; margin: 16px 0;
  overflow-x: auto; color: var(--bone-mute); line-height: 1.5;
}
.post-body code {
  font-family: var(--f-mono); font-size: 0.88em;
  padding: 1px 6px;
  background: var(--void); border: 1px solid var(--rule);
  color: var(--brass);
}
.post-body pre code { padding: 0; background: none; border: 0; color: inherit; }
.post-body img { max-width: 100%; margin: 12px 0; border: 1px solid var(--rule); }

.post-modified {
  margin-top: 20px; padding: 10px 14px;
  background: var(--moss); border: 1px solid var(--rule);
  font-family: var(--f-mono); font-size: 11px;
  color: var(--ash); letter-spacing: 0.04em;
}
.post-modified strong { color: var(--brass); font-weight: 500; }

/* ═══ SEARCH OVERLAY ═══ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(10, 14, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: none; align-items: flex-start; justify-content: center;
  padding: 80px 20px 20px;
  opacity: 0; transition: opacity 0.2s ease;
}
.overlay.active { display: flex; opacity: 1; }

.search-panel {
  width: 100%; max-width: 760px;
  background: var(--canvas-2);
  border: 1px solid var(--rule-hi);
  box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 0 1px var(--brass);
  max-height: calc(100vh - 120px);
  display: flex; flex-direction: column;
  transform: translateY(-10px); transition: transform 0.3s ease;
  position: relative;
}
.overlay.active .search-panel { transform: translateY(0); }

.search-header {
  padding: 12px 22px;
  background: var(--void); border-bottom: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-ui); font-size: 11px; font-weight: 600;
  letter-spacing: 0.22em; color: var(--brass);
  text-transform: uppercase;
}

.search-input-wrap {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--rule);
}
.search-input-wrap svg { width: 22px; height: 22px; color: var(--brass); flex-shrink: 0; }
.search-input {
  flex: 1;
  font-family: var(--f-ui); font-size: 18px;
  background: transparent; border: 0; outline: 0;
  color: var(--bone); letter-spacing: 0.02em;
}
.search-input::placeholder { color: var(--ash); font-style: italic; font-family: var(--f-body); }

.search-mode-toggle {
  display: flex; padding: 12px 24px; gap: 8px;
  border-bottom: 1px solid var(--rule);
  background: var(--moss);
}
.search-mode {
  padding: 6px 14px;
  font-family: var(--f-ui); font-weight: 500; font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bone-mute); border: 1px solid var(--rule-hi);
  cursor: pointer; transition: all 0.15s;
}
.search-mode:hover { border-color: var(--fern); color: var(--lichen); }
.search-mode.active {
  background: var(--fern); border-color: var(--fern); color: var(--bone);
}
.search-mode-count {
  margin-left: auto; padding: 6px 0;
  font-family: var(--f-mono); font-size: 10px;
  color: var(--ash); letter-spacing: 0.08em;
}

.search-results {
  flex: 1; overflow-y: auto; padding: 8px 4px;
}
.search-result {
  padding: 14px 20px; cursor: pointer;
  transition: all 0.1s;
  border-left: 3px solid transparent;
  display: flex; flex-direction: column; gap: 4px;
}
.search-result:hover, .search-result.focused {
  background: var(--moss); border-left-color: var(--brass);
}
.search-result-tag {
  font-family: var(--f-ui); font-weight: 600; font-size: 9px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--lichen); margin-bottom: 2px;
}
.search-result-tag.is-rules { color: var(--brass); }
.search-result-title {
  font-family: var(--f-display); font-weight: 600; font-size: 16px;
  color: var(--bone); line-height: 1.25;
}
.search-result-title mark {
  background: rgba(212, 174, 108, 0.3); color: var(--brass-hi);
  padding: 0 3px;
}
.search-result-snippet {
  font-family: var(--f-body); font-size: 13px;
  color: var(--bone-mute); line-height: 1.5;
}
.search-result-snippet mark {
  background: rgba(212, 174, 108, 0.3); color: var(--brass-hi);
  padding: 0 3px; font-weight: 500;
}
.search-result-meta {
  font-family: var(--f-mono); font-size: 10px;
  color: var(--ash); letter-spacing: 0.08em; margin-top: 3px;
}
.search-result-meta span::before { content: "· "; margin: 0 5px; color: var(--rule-hi); }
.search-result-meta span:first-child::before { content: ""; margin: 0; }

.search-hint, .search-empty {
  padding: 52px 24px; text-align: center;
  color: var(--bone-mute); font-family: var(--f-body);
  font-size: 14px; line-height: 1.6;
}
.search-hint .shortcuts {
  margin-top: 24px; display: inline-flex; gap: 20px;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.08em; color: var(--ash);
}

/* ═══ CHAT — NICODEMUS ═══ */
.chat-toggle {
  position: fixed; bottom: 28px; right: 28px;
  width: 60px; height: 60px;
  background: linear-gradient(135deg, #1e2918, #0d1108);
  color: var(--brass);
  border: 2px solid var(--brass);
  display: grid; place-items: center;
  box-shadow: 0 12px 36px rgba(0,0,0,0.6), 0 0 0 2px var(--canvas), 0 0 28px var(--gold-glow);
  z-index: 90;
  transition: all 0.25s;
  cursor: pointer;
}
.chat-toggle:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 44px rgba(0,0,0,0.7), 0 0 0 2px var(--canvas), 0 0 40px var(--gold-glow);
}
.chat-toggle::after {
  content: ""; position: absolute; inset: -3px;
  border: 1px solid var(--brass); opacity: 0.4;
  animation: pulse-ring 2.6s ease-in-out infinite;
}
@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  50% { transform: scale(1.2); opacity: 0; }
}
.chat-toggle svg { width: 24px; height: 24px; stroke-width: 1.5; }

.chat-panel {
  position: fixed; bottom: 28px; right: 28px;
  width: min(440px, calc(100vw - 40px));
  height: min(640px, calc(100vh - 80px));
  background: var(--canvas-2);
  border: 1px solid var(--rule-hi);
  box-shadow: 0 24px 64px rgba(0,0,0,0.75), 0 0 0 2px var(--canvas), 0 0 40px var(--gold-glow);
  display: none; flex-direction: column;
  z-index: 150; overflow: hidden;
}
.chat-panel.active { display: flex; animation: chatOpen 0.3s cubic-bezier(0.2,0,0.2,1); }
@keyframes chatOpen {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
  padding: 16px 20px;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(184, 146, 78, 0.1), transparent 60%),
    var(--void);
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; gap: 12px;
}
.chat-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #302516, #120d07);
  border: 1px solid var(--brass);
  display: grid; place-items: center;
  color: var(--brass);
  font-family: var(--f-display); font-weight: 900; font-size: 14px;
  position: relative; flex-shrink: 0;
}
.chat-avatar::after {
  content: ""; position: absolute;
  bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  background: var(--lichen); border: 2px solid var(--canvas-2);
  box-shadow: 0 0 6px var(--lichen);
  animation: blink-online 2.4s ease-in-out infinite;
}
@keyframes blink-online {
  0%, 100% { opacity: 1; } 50% { opacity: 0.5; }
}
.chat-header-text { flex: 1; line-height: 1.1; }
.chat-header-text strong {
  display: block; font-family: var(--f-display); font-size: 15px;
  color: var(--bone); letter-spacing: 0.02em;
}
.chat-header-text small {
  font-family: var(--f-ui); font-size: 10px;
  color: var(--brass); letter-spacing: 0.18em;
  text-transform: uppercase;
}
.chat-close {
  width: 28px; height: 28px; display: grid; place-items: center;
  color: var(--bone-mute); transition: color 0.15s; cursor: pointer;
}
.chat-close:hover { color: var(--oxide-hi); }

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
.chat-msg {
  max-width: 85%;
  font-family: var(--f-body); font-size: 15px;
  line-height: 1.6;
  padding: 12px 16px;
  position: relative;
}
.chat-msg.user {
  align-self: flex-end;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass));
  color: var(--void);
  font-family: var(--f-ui); font-size: 14px; font-weight: 500;
  letter-spacing: 0.01em;
}
.chat-msg.bot {
  align-self: flex-start;
  background: var(--moss);
  border: 1px solid var(--rule-hi);
  border-left: 3px solid var(--brass);
  color: var(--bone);
}
.chat-msg.bot strong { color: var(--brass-hi); font-weight: 600; }
.chat-msg.bot em { color: var(--bone-mute); font-style: italic; }
.chat-msg.bot p + p { margin-top: 0.7em; }

.chat-msg .sources {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--rule-hi);
  font-family: var(--f-ui); font-size: 10px; font-weight: 600;
  color: var(--ash); letter-spacing: 0.2em; text-transform: uppercase;
}
.chat-msg .sources a {
  display: block; color: var(--brass);
  font-family: var(--f-body); font-size: 13px; font-style: italic;
  letter-spacing: 0; text-transform: none; font-weight: 400;
  margin-top: 8px; padding: 4px 0;
  border-bottom: 1px dashed var(--rule);
  cursor: pointer; transition: color 0.15s;
}
.chat-msg .sources a:hover { color: var(--brass-hi); }
.chat-msg .sources a::before { content: "▸ "; color: var(--brass); }

.chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 20px 12px;
}
.chat-chip {
  font-family: var(--f-ui); font-weight: 500; font-size: 10px;
  padding: 5px 11px;
  background: transparent; border: 1px solid var(--rule-hi);
  color: var(--bone-mute);
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; transition: all 0.15s;
}
.chat-chip:hover {
  background: var(--fern); border-color: var(--fern); color: var(--bone);
}

.chat-input-wrap {
  padding: 14px 16px;
  background: var(--void);
  border-top: 1px solid var(--rule);
  display: flex; gap: 8px; align-items: flex-end;
}
.chat-input {
  flex: 1;
  font-family: var(--f-body); font-size: 15px;
  padding: 10px 14px;
  background: var(--moss);
  border: 1px solid var(--rule-hi);
  border-left: 2px solid var(--brass);
  outline: 0; resize: none; max-height: 120px;
  color: var(--bone); transition: border-color 0.15s;
}
.chat-input:focus { border-color: var(--brass); }
.chat-input::placeholder { color: var(--ash); font-style: italic; }

.chat-send {
  width: 44px; height: 44px;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass));
  color: var(--void);
  display: grid; place-items: center;
  transition: all 0.15s; flex-shrink: 0;
  border: 1px solid var(--brass-hi);
  cursor: pointer;
}
.chat-send:hover {
  background: linear-gradient(180deg, #ecc47f, var(--brass-hi));
}
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-send svg { width: 16px; height: 16px; }

.typing-indicator { display: inline-flex; gap: 5px; padding: 4px 0; }
.typing-indicator span {
  width: 6px; height: 6px; background: var(--brass);
  border-radius: 50%;
  animation: typing 1.3s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.16s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.32s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ═══ LOADING ═══ */
.loading {
  text-align: center; padding: 80px 20px;
  color: var(--bone-mute); font-family: var(--f-ui); font-weight: 500;
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
}
.loading::before {
  content: ""; display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--rule-hi);
  border-top-color: var(--brass);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  vertical-align: middle; margin-right: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ FOOTER ═══ */
footer {
  margin-top: 120px;
  padding: 56px 32px 72px;
  border-top: 1px solid var(--rule);
  background: linear-gradient(to bottom, transparent, rgba(10, 14, 8, 0.4));
  position: relative;
}
footer::before {
  content: ""; position: absolute; top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 96px; height: 3px; background: var(--brass);
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 56px;
}
.footer-brand {
  font-family: var(--f-body); font-size: 14px;
  color: var(--bone-mute); line-height: 1.6; max-width: 56ch;
}
.footer-brand strong {
  display: block; font-family: var(--f-display); font-weight: 700;
  color: var(--bone); font-size: 15px;
  letter-spacing: 0.02em; margin-bottom: 10px;
}
.footer-col h4 {
  font-family: var(--f-ui); font-size: 11px; font-weight: 600;
  letter-spacing: 0.22em; color: var(--brass);
  text-transform: uppercase; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--rule);
}
.footer-col ul { list-style: none; font-family: var(--f-mono); font-size: 11px; color: var(--ash); }
.footer-col li { padding: 3px 0; letter-spacing: 0.05em; }
.footer-col strong { color: var(--bone); }

/* ═══ VIEWS ═══ */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.5s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-side { border-left: 0; border-top: 1px solid var(--rule-hi); padding-left: 0; padding-top: 32px; max-width: 100%; }
  .hero-side::before { left: 0; top: -2px; width: 48px; height: 3px; }
  .hero-trooper { opacity: 0.22; right: -80px; max-width: 60%; }
  .hero-logo { max-width: 440px; }
  .nicodemus-inner { grid-template-columns: 260px 1fr; gap: 48px; }
  .division { grid-template-columns: 80px 1fr; gap: 24px; }
  .division-num { font-size: 64px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stone-divider { padding: 0 20px; }
  .stone-divider::before, .stone-divider::after { display: none; }
}
@media (max-width: 720px) {
  .header-inner { padding: 14px 20px; gap: 12px; }
  .brand-sub { display: none; }
  .brand-logo-svg { width: 150px; height: 38px; }
  .hero { padding: 56px 20px 100px; min-height: 80vh; }
  .hero-trooper { display: none; }
  .hero-logo { max-width: 360px; margin-bottom: 28px; }
  .section { padding: 80px 20px; }
  .nicodemus-section { padding: 80px 20px; }
  .nicodemus-inner { grid-template-columns: 1fr; gap: 32px; }
  .nicodemus-portrait { max-width: 260px; margin: 0 auto; }
  .nicodemus-scope { grid-template-columns: 1fr; gap: 14px; }
  .rules-search { padding: 64px 20px; }
  .division { grid-template-columns: 1fr; gap: 16px; }
  .division-num { font-size: 48px; }
  .division-boards { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
  .post-author-col { display: flex; align-items: center; gap: 14px; padding: 14px; }
  .post-avatar { width: 52px; height: 52px; font-size: 20px; margin: 0; }
  .post-author-name { text-align: left; margin: 0; font-size: 14px; }
  .post-author-meta { text-align: left; }
  .post-entry-num { position: static; margin-bottom: 8px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .topic-row { grid-template-columns: 1fr; gap: 6px; padding: 16px 10px; }
  .topic-replies, .topic-views, .topic-date { text-align: left; min-width: 0; font-size: 11px; }
  .topic-row:hover { padding-left: 18px; }
  .section-head { grid-template-columns: 1fr; gap: 12px; }
  .section-title { font-size: 32px; }
}
@media (max-width: 480px) {
  .btn-cta span { display: none; }
  .hero-ctas .btn-primary, .hero-ctas .btn-secondary { padding: 14px 22px; font-size: 12px; }
}
