/* The Infinite Archive — design-language CSS
 *
 * Tokens, reset, base typography, scanline overlay, and shared header /
 * logo / nav chrome. Loaded by every page; page-specific styles continue
 * to live in each page's <style> block until Phase 1 step 3 moves them
 * out into per-page CSS or templates.
 *
 * Phase 1 step 1: extracted from the duplicated inline <style> blocks in
 * the seven v0 pages. Canonical values are the majority across those
 * pages; the two divergent rules (html/body line-height on index,
 * awakenings, strength-index; .logo-text font-size on quantum) are kept
 * as one-line overrides in those pages' inline <style> blocks so v0
 * rendering is preserved exactly.
 */

:root {
  --bg: #050807;
  --bg-card: #0a120e;
  --bg-card-hover: #0d1812;
  --bg-input: #050907;
  --border: #1a3a26;
  --border-bright: #2e5a3e;
  --grid: #112016;
  --green: #4ade80;
  --green-bright: #86efac;
  --green-dim: #15803d;
  --green-mute: #166534;
  --text: #d1fae5;
  --text-mute: #6ee7b7;
  --text-faint: #5fc26a;
  --warn: #fbbf24;
  --warn-dim: #92400e;
  --danger: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Share Tech Mono', 'JetBrains Mono', monospace;
  font-size: 15.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  min-height: 100vh;
}

body {
  background-image:
    radial-gradient(ellipse at top, rgba(34,197,94,0.06) 0%, transparent 50%),
    linear-gradient(to bottom, var(--bg) 0%, #030604 100%);
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(74,222,128,0.018) 2px,
    rgba(74,222,128,0.018) 3px
  );
  z-index: 1;
  mix-blend-mode: screen;
}

header {
  position: relative; z-index: 10;
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex; align-items: center; gap: 32px;
  background: rgba(5, 8, 7, 0.9);
  backdrop-filter: blur(4px);
}

.logo { display: flex; align-items: center; gap: 14px; }
a.logo { text-decoration: none; }
.logo svg { width: 46px; height: 46px; filter: drop-shadow(0 0 5px rgba(74,222,128,0.32)); }
.logo-text {
  font-size: 18px;
  letter-spacing: 0.32em;
  color: var(--green);
  font-weight: 600;
  line-height: 1.2;
}
.logo-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 0.45em;
  color: var(--text-faint);
  margin-top: 3px;
}

nav { display: flex; gap: 22px; flex: 1; }
nav a {
  display: flex; flex-direction: column; gap: 2px;
  color: var(--text-faint);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
nav a .nav-name { font-size: 12px; letter-spacing: 0.2em; }
nav a .nav-desc { font-size: 8.5px; letter-spacing: 0.16em; opacity: 0.6; }
nav a.active { color: var(--green); border-bottom-color: var(--green); }
nav a:hover { color: var(--green-bright); }
nav a.active .nav-desc, nav a:hover .nav-desc { opacity: 0.95; }

/* ===========================================================================
   Section bands
   The labelled, max-width content band used across the landing page and the
   section landings (Protocol, Chronicle, Dossiers, Matrix). Each band is a
   <section class="band"> with an optional .band-head label and .band-rule
   separator. Centralised here in Phase 1 step 4 so the new section landings
   compose against the same chrome as index.html without re-declaring it.
   =========================================================================== */
section.band {
  position: relative; z-index: 5;
  padding: 40px 32px;
  max-width: 1320px; margin: 0 auto;
}
.band-head {
  font-size: 12px; letter-spacing: 0.4em; color: var(--green);
  margin-bottom: 6px; font-weight: 500;
}
.band-rule { height: 1px; background: var(--border); margin-bottom: 24px; }

/* ===========================================================================
   Section landing pages (Protocol, Chronicle, Dossiers, Matrix)
   A common structural skeleton: title-hero, Archivist intro paragraph,
   "What's here now" / "Coming" list-grids, closing line. The four pages
   share these classes; their own pageStyle blocks stay empty.
   =========================================================================== */

/* Title hero — section name + functional descriptor + tagline. */
.section-hero {
  position: relative; z-index: 5;
  padding: 56px 32px 32px;
  max-width: 1320px; margin: 0 auto;
}
.section-hero .descriptor {
  font-size: 12px; letter-spacing: 0.4em; color: var(--green);
  margin-bottom: 8px; font-weight: 500;
}
.section-hero .title {
  font-size: 52px; letter-spacing: 0.1em; color: var(--green-bright);
  line-height: 1.04; margin-bottom: 14px;
}
.section-hero .tagline {
  font-size: 18px; color: var(--text-mute); line-height: 1.55;
  max-width: 760px;
}

/* Archivist-voice intro paragraph, left-border accented to echo the hero
   motto on the landing page (signals "this is the voice of the section"). */
.section-intro {
  position: relative; z-index: 5;
  padding: 8px 32px 24px;
  max-width: 1320px; margin: 0 auto;
}
.section-intro p {
  font-size: 16px; line-height: 1.85; color: var(--text-mute);
  max-width: 880px;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--green);
}

/* List grids for "What's here now" and "Coming" items.
   list-block: a card with a name (green-bright), a description (muted),
   and an optional .go link to the existing tool page.
   list-empty: a dashed-border placeholder for sections that have no
   live items yet (Protocol, Chronicle). */
.list-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 14px;
}
.list-block {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 16px 18px; position: relative;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.2s, background 0.2s;
}
.list-block.live:hover { border-color: var(--green); background: var(--bg-card-hover); }
.list-block .name {
  font-size: 15px; color: var(--green-bright); letter-spacing: 0.03em;
  font-weight: 500;
}
.list-block .desc {
  font-size: 13px; color: var(--text-mute); line-height: 1.65;
}
.list-block a.go {
  display: inline-block; margin-top: 8px;
  color: var(--green); font-size: 11px; letter-spacing: 0.22em;
  text-decoration: none; border-bottom: 1px dashed currentColor;
  align-self: flex-start;
}
.list-block a.go:hover { color: var(--green-bright); }
.list-block.live { cursor: pointer; }
.list-empty {
  border: 1px dashed var(--border-bright);
  background: rgba(74,222,128,0.025);
  padding: 18px 20px;
  font-size: 14px; color: var(--text-faint); line-height: 1.75;
  max-width: 880px;
}

/* Closing line — a measured sign-off, separated by a faint top rule. */
.section-closing {
  position: relative; z-index: 5;
  padding: 4px 32px 48px;
  max-width: 1320px; margin: 0 auto;
}
.section-closing p {
  font-size: 14.5px; line-height: 1.8; color: var(--text-faint);
  max-width: 820px;
  padding-top: 22px; border-top: 1px solid var(--grid);
  letter-spacing: 0.015em;
}
.section-closing p strong { color: var(--green-bright); font-weight: 500; }

@media (max-width: 880px) {
  .section-hero { padding: 36px 32px 24px; }
  .section-hero .title { font-size: 38px; }
}
