/* =========================================================
   DESIGN TOKENS — H.E.R.O. Institutional Dark Theme
   ========================================================= */
:root {
  /* Backgrounds */
  --bg-root:         #070a13;
  --bg-body:         #0b0f1e;
  --bg-header:       #131a2e;
  --bg-subnav:       #1a2338;
  --bg-card:         #131a2e;
  --bg-card-alt:     #0e1220;
  --bg-footer:       #070a13;
  --bg-tobin:        #171d30;

  /* Borders */
  --border-main:     #262f47;
  --border-subtle:   #1a2338;
  --border-card:     #1e2540;
  --border-dashed:   #4a5470;

  /* Text */
  --text-primary:    #eef1f6;
  --text-body:       #c3c9d6;
  --text-secondary:  #97a0b5;
  --text-muted:      #6b7690;
  --text-faint:      #4a5470;
  --text-nav:        #8891a0;

  /* Gold */
  --gold:            #c9a565;
  --gold-bright:     #e2c48a;

  /* Emerald — corruption/damage/rune ONLY */
  --emerald:         #2bd68b;
  --emerald-dim:     #17b06b;
  --emerald-dark:    #0b6b3f;
  --emerald-pale:    #9dffce;
  --emerald-glow:    rgba(43, 214, 139, 0.8);

  /* Spacing / sizing */
  --content-width:   900px;
  --page-gutter:     1.75rem;
  --nav-height:      58px;
}

/* =========================================================
   KEYFRAMES — glitch corruption system
   ========================================================= */
@keyframes runeBlink {
  0%, 100% { background: transparent; box-shadow: none; border-color: var(--text-nav); }
  46%       { background: transparent; box-shadow: none; border-color: var(--text-nav); }
  48%       { background: var(--emerald); box-shadow: 0 0 8px 2px var(--emerald-glow); border-color: var(--emerald); }
  52%       { background: transparent; box-shadow: none; border-color: var(--text-nav); }
  68%       { background: transparent; box-shadow: none; border-color: var(--text-nav); }
  70%       { background: var(--emerald); box-shadow: 0 0 8px 2px var(--emerald-glow); border-color: var(--emerald); }
  74%       { background: transparent; box-shadow: none; border-color: var(--text-nav); }
}

@keyframes glitchA {
  0%, 100% { clip-path: inset(0 0 100% 0); opacity: 0; transform: translate(0,0); }
  41%       { clip-path: inset(0 0 100% 0); opacity: 0; }
  42%       { clip-path: inset(8% 0 58% 0); opacity: 0.9; transform: translate(-3px,0); }
  44%       { clip-path: inset(55% 0 5% 0); opacity: 0.7; transform: translate(2px,0); }
  46%       { clip-path: inset(0 0 100% 0); opacity: 0; }
  77%       { clip-path: inset(0 0 100% 0); opacity: 0; }
  78%       { clip-path: inset(30% 0 40% 0); opacity: 0.85; transform: translate(3px,0); }
  79%       { clip-path: inset(2% 0 80% 0); opacity: 0.6; transform: translate(-2px,0); }
  81%       { clip-path: inset(0 0 100% 0); opacity: 0; }
}

@keyframes glitchB {
  0%, 100% { clip-path: inset(0 0 100% 0); opacity: 0; transform: translate(0,0); }
  24%       { clip-path: inset(0 0 100% 0); opacity: 0; }
  25%       { clip-path: inset(62% 0 8% 0); opacity: 0.75; transform: translate(3px,0); }
  27%       { clip-path: inset(15% 0 60% 0); opacity: 0.55; transform: translate(-3px,0); }
  29%       { clip-path: inset(0 0 100% 0); opacity: 0; }
  63%       { clip-path: inset(0 0 100% 0); opacity: 0; }
  64%       { clip-path: inset(20% 0 50% 0); opacity: 0.8; transform: translate(-2px,0); }
  66%       { clip-path: inset(0 0 100% 0); opacity: 0; }
}

@keyframes glitchJitter {
  0%, 87%, 100% { transform: translate(0,0); }
  89% { transform: translate(-1px, 1px); }
  91% { transform: translate(1px, 0); }
  93% { transform: translate(0, -1px); }
  95% { transform: translate(-2px, 0); }
  97% { transform: translate(1px, 1px); }
}

@keyframes staticFlicker {
  0%, 90%, 100% { opacity: 1; }
  92% { opacity: 0.35; }
  94% { opacity: 1; }
  96% { opacity: 0.5; }
  98% { opacity: 1; }
}

@keyframes scanSweep {
  0%   { background-position: 0 -20px; }
  100% { background-position: 0 220px; }
}

@keyframes statusCycle {
  0%,  29% { content: '0 ACTIVE HEROES DETECTED'; }
  33%, 62% { content: 'SENDING STONE: NO RESPONSE'; }
  66%, 99% { content: 'REGISTRY QUERY: PENDING'; }
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: var(--bg-root);
  scroll-behavior: smooth;
}

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

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--gold-bright);
}

::selection {
  background: rgba(43, 214, 139, 0.35);
  color: var(--text-primary);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-main);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Wordmark lockup */
.site-wordmark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
  color: inherit;
}

.site-wordmark:hover,
.site-wordmark:focus {
  color: inherit;
}

.wordmark-crest {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: #11182c;
  box-shadow: 0 0 0 1px var(--border-main) inset;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wordmark-crest-inner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(201, 165, 101, 0.5);
}

.wordmark-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.wordmark-name {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.wordmark-tagline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* =========================================================
   MOBILE HAMBURGER — CSS-only checkbox toggle
   ========================================================= */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  background: transparent;
  border: 1px solid var(--border-main);
  border-radius: 4px;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.nav-toggle-label span {
  width: 20px;
  height: 2px;
  background: var(--text-body);
  display: block;
}

/* =========================================================
   TIER-1 NAV (desktop)
   ========================================================= */
.tier1-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tier1-nav__link {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 1.55rem 1rem;
  cursor: pointer;
  display: block;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tier1-nav__link:hover,
.tier1-nav__link:focus {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
}

.tier1-nav__link.is-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* =========================================================
   TIER-2 SUBNAV (desktop, shows active section's items)
   ========================================================= */
.tier2-nav {
  background: var(--bg-subnav);
  border-top: 1px solid var(--border-main);
  padding: 0.65rem var(--page-gutter);
}

.tier2-nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.tier2-nav__link {
  font-family: 'Manrope', sans-serif;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.tier2-nav__link:hover,
.tier2-nav__link:focus,
.tier2-nav__link.is-active {
  color: var(--gold);
}

/* =========================================================
   MOBILE NAV PANEL
   ========================================================= */
.mobile-nav-panel {
  display: none;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-main);
  padding: 1rem var(--page-gutter) 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
  position: sticky;
  top: var(--nav-height);
  z-index: 49;
}

.mobile-nav__section {
  margin-bottom: 1.15rem;
}

.mobile-nav__section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.mobile-nav__link {
  display: block;
  padding: 0.4rem 0;
  font-family: 'Manrope', sans-serif;
  font-size: 0.88rem;
  color: var(--text-body);
  text-decoration: none;
}

.mobile-nav__link:hover,
.mobile-nav__link:focus {
  color: var(--gold);
}

/* Show mobile controls at ≤900px */
@media (max-width: 900px) {
  .nav-toggle-label {
    display: flex;
  }

  .tier1-nav {
    display: none;
  }

  .tier2-nav {
    display: none;
  }

  /* Checkbox hack: #nav-toggle is a sibling before .mobile-nav-panel */
  #nav-toggle:checked ~ .mobile-nav-panel {
    display: block;
  }
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */
.site-main {
  flex: 1;
}

/* =========================================================
   HOMEPAGE — Tobin notice
   ========================================================= */
.homepage-notice-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.75rem var(--page-gutter) 0;
}

/* =========================================================
   HOMEPAGE — Hero section
   ========================================================= */
.homepage-hero {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4.5rem var(--page-gutter) 3.5rem;
  text-align: center;
}

.hero-crest-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 6px var(--bg-body), 0 0 0 7px #2a3350;
  margin-bottom: 1.75rem;
}

.hero-crest-inner {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 1px solid rgba(201, 165, 101, 0.5);
}

.hero-wordmark-large {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.hero-acronym {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2.75rem;
}

.homepage-hero h1 {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0 0 1.5rem;
}

.homepage-hero > p {
  font-family: 'Manrope', sans-serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 3rem;
}

/* Stats strip */
.stats-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-main);
  border-bottom: 1px solid var(--border-main);
}

.stats-strip__item {
  padding: 1.75rem 2.75rem;
  text-align: center;
  border-right: 1px solid var(--border-main);
}

.stats-strip__item:last-child {
  border-right: none;
}

.stats-strip__value {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 2.1rem;
  color: var(--text-primary);
}

.stats-strip__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* =========================================================
   CTA CARDS — three-up grid
   ========================================================= */
.cta-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem var(--page-gutter) 4.5rem;
}

.cta-grid {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-block {
  flex: 1 1 300px;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-main);
  padding: 2.25rem 2rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.cta-block:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.cta-block h3 {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--gold);
  margin: 0 0 0.9rem;
}

.cta-block p {
  font-family: 'Manrope', sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  min-height: 4.8rem;
}

.cta-block a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.2rem;
}

.cta-block a:hover,
.cta-block a:focus {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
}

/* =========================================================
   SPONSOR STRIP
   ========================================================= */
.sponsor-strip {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem var(--page-gutter) 4.5rem;
  border-top: 1px solid var(--bg-subnav);
}

.sponsor-strip__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 1.75rem;
}

.sponsor-strip__logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.25rem;
  flex-wrap: wrap;
}

.sponsor-strip__name {
  font-family: 'Cinzel', serif;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: var(--text-nav);
  text-align: center;
}

/* =========================================================
   INTERIOR PAGE LAYOUT (page.njk)
   ========================================================= */
.page-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3.5rem var(--page-gutter) 5rem;
  position: relative;
}

.page-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* Glitch-title: h1 with RGB-split clones via ::before / ::after + data-text */
.glitch-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  position: relative;
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  pointer-events: none;
}

.glitch-title::before {
  color: var(--emerald-pale);
  left: 2px;
  mix-blend-mode: screen;
  animation: glitchA 3.4s steps(1) infinite;
}

.glitch-title::after {
  color: var(--emerald-dark);
  left: -2px;
  mix-blend-mode: screen;
  animation: glitchB 4.1s steps(1) infinite;
  animation-delay: 0.4s;
}

.page-standfirst {
  font-family: 'Manrope', sans-serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
}

.page-body {
  /* inherits */
}

/* =========================================================
   INTERIOR TYPOGRAPHY — markdown-generated elements
   ========================================================= */
.page-body h1 {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
  line-height: 1.2;
}

.page-body h2 {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--gold);
  margin: 2.5rem 0 1.1rem;
  line-height: 1.25;
}

.page-body h3 {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-body);
  margin: 1.75rem 0 0.75rem;
  line-height: 1.3;
}

.page-body h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.5rem 0 0.4rem;
}

.page-body p {
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 1.1em;
}

.page-body p:last-child {
  margin-bottom: 0;
}

.page-body strong {
  color: var(--text-primary);
  font-weight: 700;
}

.page-body em {
  font-style: italic;
}

.page-body a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(201, 165, 101, 0.4);
  text-underline-offset: 2px;
}

.page-body a:hover,
.page-body a:focus {
  color: var(--gold-bright);
  text-decoration-color: var(--gold-bright);
}

/* Horizontal rules */
.page-body hr {
  border: none;
  border-top: 1px solid var(--border-main);
  margin: 2rem 0;
}

/* Blockquotes — Tobin's voice / records notes */
.page-body blockquote {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-body);
  border-left: 2px solid var(--gold);
  padding: 0.3rem 0 0.3rem 1.4rem;
  margin: 1.5rem 0;
  background: transparent;
}

.page-body blockquote strong {
  color: var(--gold-bright);
}

.page-body blockquote em {
  font-style: italic;
}

/* Lists */
.page-body ul,
.page-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1em;
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  color: var(--text-body);
}

.page-body li {
  margin-bottom: 0.3em;
}

.page-body li:last-child {
  margin-bottom: 0;
}

/* Tables */
.page-body table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  display: block;
  min-width: 420px;
}

.page-body thead {
  background: var(--bg-subnav);
}

.page-body th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--bg-subnav);
  color: var(--gold-bright);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-main);
}

.page-body td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-body);
  vertical-align: top;
}

.page-body tr:last-child td {
  border-bottom: none;
}

.page-body td:first-child {
  color: var(--text-primary);
}

/* Code — inline: monochrome terminal style */
.page-body code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85em;
  color: var(--emerald);
  background: rgba(43, 214, 139, 0.07);
  padding: 0.1em 0.3em;
  border: 1px solid rgba(43, 214, 139, 0.2);
  border-radius: 2px;
  animation: glitchJitter 4.2s steps(9) infinite;
}

.page-body pre {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.page-body pre code {
  background: none;
  border: none;
  padding: 0;
  animation: none;
  color: var(--emerald);
}

/* del / strikethrough — used in roster entries */
.page-body del,
del {
  text-decoration: line-through;
  color: var(--text-faint);
}

/* =========================================================
   TOBIN PATCH — taped-on notice box
   ========================================================= */
.tobin-patch {
  position: relative;
  background: var(--bg-tobin);
  border: 1.5px dashed var(--border-dashed);
  padding: 1.4rem 1.6rem 1.3rem;
  transform: rotate(-1.3deg);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  margin: 2rem 0;
}

/* Tape strips */
.tobin-patch::before,
.tobin-patch::after {
  content: '';
  position: absolute;
  width: 46px;
  height: 16px;
  background: rgba(201, 165, 101, 0.22);
  border: 1px solid rgba(201, 165, 101, 0.4);
}

.tobin-patch::before {
  top: -10px;
  left: 22px;
  transform: rotate(-8deg);
}

.tobin-patch::after {
  top: -10px;
  right: 26px;
  transform: rotate(6deg);
}

.tobin-patch__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.tobin-patch__label span {
  color: var(--text-muted);
}

.tobin-patch p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--text-body);
  margin: 0 0 0.75rem;
}

.tobin-patch p:last-child {
  margin-bottom: 0;
}

.tobin-patch strong {
  color: var(--text-primary);
}

.tobin-patch__sig {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Tobin patch inside page body — blockquote-style trigger */
.page-body .tobin-patch {
  transform: rotate(0.8deg);
  margin: 2.5rem 0;
}

/* =========================================================
   STAMP — corrupted-record badge
   ========================================================= */
.stamp {
  position: absolute;
  top: 3.25rem;
  right: var(--page-gutter);
  transform: rotate(6deg);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--emerald);
  border: 2px solid var(--emerald);
  padding: 0.3em 0.6em;
  opacity: 0.85;
  text-shadow: 0.5px 0.5px 0 rgba(23, 176, 107, 0.35);
  animation: glitchJitter 6s steps(10) infinite;
  white-space: nowrap;
}

/* Inline stamp variant */
.stamp-inline {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald);
  border: 1px solid rgba(43, 214, 139, 0.5);
  padding: 0.3em 0.7em;
  margin-bottom: 2rem;
}

/* =========================================================
   CORRUPT — inline glitch span (emerald, jitter, RGB-split clones)
   ========================================================= */
.corrupt {
  position: relative;
  display: inline-block;
  color: var(--emerald);
  font-family: 'IBM Plex Mono', monospace;
  animation: glitchJitter 4.2s steps(9) infinite, staticFlicker 5.1s steps(5) infinite;
}

.corrupt::before {
  content: attr(data-text);
  position: absolute;
  left: 2px;
  top: 0;
  width: 100%;
  color: var(--emerald-pale);
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: glitchA 3.4s steps(1) infinite;
}

.corrupt::after {
  content: attr(data-text);
  position: absolute;
  left: -2px;
  top: 0;
  width: 100%;
  color: var(--emerald-dark);
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: glitchB 4.1s steps(1) infinite;
  animation-delay: 0.4s;
}

/* Scan overlay for roster blocks */
.scan-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(43, 214, 139, 0.16) 0px,
    rgba(43, 214, 139, 0.16) 1px,
    transparent 1px,
    transparent 4px
  );
  background-size: 100% 220px;
  opacity: 0.6;
  mix-blend-mode: screen;
  animation: scanSweep 2.3s linear infinite;
}

/* =========================================================
   HOMEPAGE — direct-in-main styling
   (index.md renders into .site-main without a page-content wrapper)
   ========================================================= */
.site-main > .tobin-patch {
  max-width: 680px;
  margin: 2.75rem auto 0;
  transform: rotate(-1.3deg);
}

/* h1 on homepage is the brand mission statement */
.site-main > h1 {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: var(--text-primary);
  line-height: 1.3;
  text-align: center;
  margin: 3rem auto 1.5rem;
  max-width: 860px;
  padding: 0 var(--page-gutter);
}

/* Lead paragraph after h1 */
.site-main > p {
  font-family: 'Manrope', sans-serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 1rem;
  text-align: center;
  padding: 0 var(--page-gutter);
}

/* Stats bar — bold items in paragraph */
.site-main > p strong {
  color: var(--text-primary);
  font-family: 'Cinzel', serif;
  font-size: 1.15em;
}

/* hr separators on homepage */
.site-main > hr {
  border: none;
  border-top: 1px solid var(--border-main);
  max-width: 1280px;
  margin: 2rem auto;
}

/* h2 section headers on homepage */
.site-main > h2 {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--gold);
  text-align: center;
  margin: 2rem auto 1.5rem;
  max-width: 1280px;
  padding: 0 var(--page-gutter);
}

/* CTA grid on homepage */
.site-main .cta-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--page-gutter) 4.5rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* =========================================================
   NOTICES — bulletin board
   ========================================================= */
.notices-board {
  max-width: var(--content-width);
  margin: 0 auto;
}

.notices-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notices-list__item {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-main);
  position: relative;
}

.notices-list__item:first-child {
  border-top: 1px solid var(--border-main);
}

.notices-list__pin {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  opacity: 0.75;
  margin-top: 0.2em;
}

.notices-list__body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  flex: 1;
}

.notices-list__title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--gold);
  text-decoration: none;
  flex-shrink: 0;
}

.notices-list__title:hover,
.notices-list__title:focus {
  color: var(--gold-bright);
}

.notices-list__desc {
  font-family: 'Manrope', sans-serif;
  font-style: italic;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.notices-empty {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.84rem;
  color: var(--text-muted);
  padding: 1.5rem 0;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--bg-footer);
  border-top: 1px solid var(--border-main);
  margin-top: auto;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem var(--page-gutter) 2rem;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.footer-brand {
  max-width: 260px;
}

.footer-brand__name {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.footer-brand__tagline {
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.footer-section {
  min-width: 150px;
}

.footer-section__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--text-nav);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: block;
}

.footer-section__link {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-decoration: none;
}

.footer-section__link:hover,
.footer-section__link:focus {
  color: var(--gold);
}

/* Network status widget */
.footer-status {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.4rem;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  margin-bottom: 2rem;
  max-width: 420px;
}

.rune-dot {
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--text-nav);
  transform: rotate(45deg);
  flex-shrink: 0;
  animation: runeBlink 3.4s infinite;
}

.footer-status__info {
  display: flex;
  flex-direction: column;
}

.footer-status__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.footer-status__word {
  position: relative;
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--emerald);
  letter-spacing: 0.03em;
  margin-top: 0.15rem;
  animation: glitchJitter 4.6s steps(8) infinite, staticFlicker 3.8s steps(5) infinite;
}

.footer-status__word::after {
  content: '0 ACTIVE HEROES DETECTED';
  animation: statusCycle 9.6s steps(1) infinite;
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--emerald);
}

/* Hide the direct text content in favour of ::after */
.footer-status__word > span {
  display: none;
}

/* Bottom bar */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-bottom__copy {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-faint);
}

.footer-bottom__clerk {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: var(--text-faint);
  display: block;
  margin-top: 0.2rem;
}

.footer-bottom__pub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: var(--gold);
  text-decoration: none;
}

.footer-bottom__pub:hover,
.footer-bottom__pub:focus {
  color: var(--gold-bright);
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .rune-dot,
  .corrupt,
  .corrupt::before,
  .corrupt::after,
  .glitch-title::before,
  .glitch-title::after,
  .stamp,
  .scan-overlay,
  .footer-status__word,
  .page-body code {
    animation: none !important;
  }

  .corrupt::before,
  .corrupt::after,
  .glitch-title::before,
  .glitch-title::after {
    display: none;
  }

  .scan-overlay {
    opacity: 0;
  }

  .tobin-patch {
    transform: none;
  }

  .stamp {
    transform: rotate(6deg);
  }
}

/* =========================================================
   RESPONSIVE — mobile (≤640px)
   ========================================================= */
@media (max-width: 640px) {
  :root {
    --page-gutter: 1rem;
  }

  .stats-strip {
    flex-direction: column;
  }

  .stats-strip__item {
    border-right: none;
    border-bottom: 1px solid var(--border-main);
    padding: 1.25rem;
  }

  .stats-strip__item:last-child {
    border-bottom: none;
  }

  .cta-grid {
    flex-direction: column;
  }

  .cta-block {
    max-width: 100%;
  }

  .footer-cols {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-brand {
    max-width: 100%;
  }

  .footer-status {
    max-width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-content {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .stamp {
    position: static;
    display: inline-block;
    transform: rotate(2deg);
    margin-bottom: 1rem;
  }
}

/* =========================================================
   PRINT
   ========================================================= */
@media print {
  .site-header,
  .tier2-nav,
  .site-footer,
  .nav-toggle-label {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .page-content {
    max-width: 100%;
    padding: 0;
  }

  .page-body blockquote {
    border-left: 2pt solid #888;
  }

  .tobin-patch {
    transform: none;
    border: 1pt dashed #888;
    background: #f5f5f5;
  }

  .stamp {
    transform: none;
    border: 1.5pt solid #000;
    color: #000;
  }

  .corrupt {
    color: #000;
    animation: none;
  }

  .corrupt::before,
  .corrupt::after {
    display: none;
  }

  .scan-overlay {
    display: none;
  }
}

/* ============================================================
   CONTINENTAL STATUS BOARD (map widget)
   ============================================================ */
.status-board { margin: 2.5rem 0; padding: 0; border: 1px solid var(--border-main); background: var(--bg-card); }
.status-board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-subtle); }
.status-board-title { font-family: 'Cinzel', serif; font-weight: 600; letter-spacing: 0.18em; font-size: 0.85rem; color: var(--text-primary); }
.status-board-sub { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; letter-spacing: 0.12em; color: var(--text-muted); }
.map-svg { display: block; width: 100%; height: auto; background: var(--bg-root); --map-grid: rgba(136,145,160,0.08); }
.map-landmass { fill: rgba(136,145,160,0.10); stroke: var(--text-secondary); stroke-width: 1.5; }
.map-water { fill: var(--bg-root); stroke: var(--text-faint); stroke-width: 1; }
.map-relief path { fill: none; stroke: var(--text-faint); stroke-width: 1.2; }
.map-label { fill: var(--text-muted); font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.2em; text-anchor: middle; }
.map-citadel rect { fill: none; stroke: var(--gold); stroke-width: 1.5; }
.map-label-citadel { fill: var(--gold); }
.map-garble { fill: var(--emerald); font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.1em; opacity: 0.85; animation: staticFlicker 3.1s infinite steps(2); }
.ping { fill: var(--emerald); }
.map-pings .ping { transform-box: fill-box; transform-origin: center; animation: pingPulse 2.4s infinite; }
.ping.p2 { animation-delay: .3s } .ping.p3 { animation-delay: 1.1s } .ping.p4 { animation-delay: .7s }
.ping.p5 { animation-delay: 1.7s } .ping.p6 { animation-delay: .5s } .ping.p7 { animation-delay: 2s }
.ping.p8 { animation-delay: 1.3s } .ping.p9 { animation-delay: .9s } .ping.p10 { animation-delay: .2s }
.ping.p11 { animation-delay: 1.5s } .ping.p12 { animation-delay: 2.2s } .ping.p13 { animation-delay: .6s }
.ping.p14 { animation-delay: 1.9s }
@keyframes pingPulse {
  0% { opacity: 0.25; transform: scale(0.7); filter: drop-shadow(0 0 0 rgba(43,214,139,0)); }
  18% { opacity: 1; transform: scale(1.25); filter: drop-shadow(0 0 6px rgba(43,214,139,0.9)); }
  45%, 100% { opacity: 0.25; transform: scale(0.7); filter: drop-shadow(0 0 0 rgba(43,214,139,0)); }
}
.map-scan { fill: rgba(43,214,139,0.25); animation: mapScan 7s linear infinite; }
@keyframes mapScan { 0% { transform: translateY(0); } 100% { transform: translateY(760px); } }
.status-board-foot { padding: 0.75rem 1rem; font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border-subtle); }
.status-board-foot .foot-tw { font-family: 'IBM Plex Mono', monospace; color: var(--emerald-dim); }
@media (prefers-reduced-motion: reduce) {
  .map-pings .ping, .map-garble, .map-scan { animation: none; }
  .map-pings .ping { opacity: 0.9; }
  .map-scan { display: none; }
}
