/* ==========================================================================
   UNIVERSAL AI VAULT SYNC — DESIGN TOKENS (LOCKED, PHASE 0)
   Direction: "Field Logbook" — a shared archive gets entries filed into it
   by hand, dated and stamped, not a neon control-room readout.

   This pass: structural skeleton. Section order/hierarchy, spacing rhythm,
   type-scale application, and a layout grid for the 5 real modules —
   built strictly on the locked tokens below. Palette, type families, and
   the ledger-stack signature concept are NOT renegotiated here.
   ========================================================================== */

:root {
  /* ── 8-Point Spatial Rhythm ── */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* ── Container Widths ── */
  --container-max: 1320px;

  /* ── Ink & Paper (locked) ── */
  --ink: #17140f;             /* bound-cover near-black, warm not neutral */
  --ink-well: #100e0a;        /* deeper recess, for insets */
  --paper: #1f1a13;           /* a page laid on the cover */
  --paper-raised: #262016;    /* a card set slightly above the page */
  --rule: rgba(242, 237, 225, 0.12);   /* faint ruled line */
  --rule-strong: rgba(242, 237, 225, 0.22);

  /* ── Cream ink-on-paper text (locked) ── */
  --cream: #f2ede1;
  --cream-70: rgba(242, 237, 225, 0.72);
  --cream-50: rgba(242, 237, 225, 0.52);
  --cream-30: rgba(242, 237, 225, 0.3);

  /* ── Stamp Red — the single accent that gets to be loud (locked #c9502a) ── */
  --stamp: #c9502a;
  --stamp-bright: #e2683e;
  --stamp-15: rgba(201, 80, 42, 0.15);
  --stamp-35: rgba(201, 80, 42, 0.35);

  /* ── Moss — verification / passing ink (locked #8ca06e) ── */
  --moss: #8ca06e;
  --moss-15: rgba(140, 160, 110, 0.15);
  --moss-35: rgba(140, 160, 110, 0.35);

  /* ── Graphite — meta text, labels ── */
  --graphite: #a89d84;

  /* ── Agent Identity Colors (factual — each tool's real brand hue) ── */
  --agent-claude: #d97706;
  --agent-antigravity: #4285f4;
  --agent-cursor: #f43f5e;
  --agent-windsurf: #0ea5a3;
  --agent-aider: #eab308;
  --agent-cline: #8b5cf6;
  --agent-copilot: #6e7781;
  --agent-kimi: #ec4899;
  --agent-codex: #10a37f;

  /* ── Font Stacks (locked) ── */
  --font-display: 'Fraunces', 'Iowan Old Style', serif;
  --font-prose: 'Inter', 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Mono', monospace;

  /* ── Type Scale — applied consistently across every module below ──
     Two label tiers, both tokens, no hardcoded px: --text-label is the
     primary tier (eyebrows, module-meta, nav, buttons, tab names) and
     --text-micro is the tertiary tier (terminal headers, stat captions,
     small in-panel readouts) — the size difference is deliberate, the
     magic numbers are not. */
  --text-display-hero: clamp(2.4rem, 5.6vw, 4.6rem);
  --text-section-title: clamp(1.5rem, 3vw, 2.1rem);
  --text-label: clamp(0.68rem, 1vw, 0.75rem);
  --text-micro: clamp(0.58rem, 0.85vw, 0.64rem);
  --text-body: clamp(0.98rem, 1.05vw, 1.08rem);

  /* ── Structural grid: the "margin rail" beside every module body ──
     Wide enough for a dated log-entry annotation, narrow enough that
     it never competes with the module content for attention. */
  --rail-width: 172px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  width: 100%;
  min-height: 100dvh;
  background-color: var(--ink);
  background-image: linear-gradient(var(--rule) 1px, transparent 1px);
  background-size: 100% 42px;
  background-attachment: local;
  color: var(--cream);
  font-family: var(--font-prose);
  font-size: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

*:focus-visible {
  outline: 2px solid var(--stamp-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

a { color: inherit; }

/* ==========================================================================
   TYPOGRAPHY — scale roles used identically in every module
   ========================================================================== */
.display-heading {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: var(--text-display-hero);
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.display-heading em {
  font-style: italic;
  font-weight: 500;
  color: var(--stamp-bright);
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-section-title);
  line-height: 1.1;
  letter-spacing: -0.005em;
}

.prose {
  font-family: var(--font-prose);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--cream-70);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--graphite);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

code, pre {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
}

/* ==========================================================================
   HEADER — Ledger Spine
   ========================================================================== */
#site-header {
  position: sticky;
  top: 0;
  width: 100%;
  padding: var(--space-sm) var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(23, 20, 15, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.logo {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
}

.logo h1 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.logo .dim { color: var(--cream-30); }

.status-indicator {
  display: none;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--moss);
  letter-spacing: 0.08em;
  border: 1px solid var(--moss-35);
  padding: 2px 10px;
  border-radius: 2px;
}

@media (min-width: 640px) {
  .status-indicator { display: inline-flex; }
}

.status-dot {
  width: 5px; height: 5px;
  background: var(--moss);
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

nav ul {
  display: none;
  list-style: none;
  gap: var(--space-lg);
}

@media (min-width: 860px) {
  nav ul { display: flex; }
}

nav a {
  color: var(--cream-50);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

nav a:hover { color: var(--stamp-bright); border-color: var(--stamp-35); }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cream);
  text-decoration: none;
  border: 1px solid var(--rule-strong);
  padding: 7px 14px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.header-cta:hover {
  border-color: var(--stamp);
  color: var(--stamp-bright);
  background: var(--stamp-15);
}

/* ==========================================================================
   HERO — the hook. Full editorial width, no rail: this is the one section
   that earns an exception to the margin-rail grid used everywhere below.
   ========================================================================== */
main {
  position: relative;
  width: 100%;
}

.hero-section {
  padding: var(--space-4xl) var(--space-xl) var(--space-3xl);
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-3xl);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-section { grid-template-columns: 1fr; padding-top: var(--space-3xl); }
}

.hero-content .eyebrow { margin-bottom: var(--space-md); display: block; }

.hero-content p.prose {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xl);
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.ledger-btn {
  position: relative;
  padding: 0 var(--space-xl);
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-decoration: none;
  border-radius: 2px;
}

.ledger-btn.primary {
  background: var(--stamp);
  /* True black, not --ink: #17140f on #c9502a measures 4.08:1, under the
     4.5:1 AA floor for this button's ~12px text. #000 clears it at 4.66:1
     without touching the locked --stamp background. */
  color: #000;
  border: 1px solid var(--stamp);
}

.ledger-btn.primary:hover {
  background: var(--stamp-bright);
  transform: translateY(-2px);
  box-shadow: 3px 4px 0 0 var(--ink-well), 3px 4px 0 1px var(--rule-strong);
}

.ledger-btn.secondary {
  background: transparent;
  color: var(--cream-70);
  border: 1px solid var(--rule-strong);
}

.ledger-btn.secondary:hover {
  border-color: var(--cream);
  color: var(--cream);
  transform: translateY(-2px);
}

/* Agent Pill Matrix */
.agent-pill-matrix {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-sm);
}

.agent-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--pill-color, var(--graphite));
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--cream-70);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.agent-pill.claude       { --pill-color: var(--agent-claude); }
.agent-pill.antigravity  { --pill-color: var(--agent-antigravity); }
.agent-pill.cursor       { --pill-color: var(--agent-cursor); }
.agent-pill.windsurf     { --pill-color: var(--agent-windsurf); }
.agent-pill.aider        { --pill-color: var(--agent-aider); }
.agent-pill.cline        { --pill-color: var(--agent-cline); }
.agent-pill.copilot      { --pill-color: var(--agent-copilot); }
.agent-pill.kimi         { --pill-color: var(--agent-kimi); }
.agent-pill.codex        { --pill-color: var(--agent-codex); }

/* ── Signature (locked): The Ledger Stack ──
   Fanned index-card tabs, one per tool, converging into the vault. */
.ledger-stack {
  position: relative;
  height: 420px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.stack-cards {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 300px;
}

.stack-card {
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: -105px; /* half of width, keeps GSAP's transform (y/rotate) free of % units */
  width: 210px;
  height: 78px;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-left: 4px solid var(--card-color, var(--graphite));
  border-radius: 2px;
  padding: var(--space-sm) var(--space-md);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  transform-origin: top center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  /* transform is GSAP-driven (rest/hover/filing) in app.js; a CSS
     transition on transform here would fight GSAP's own interpolation. */
  transition: box-shadow 0.25s ease;
  will-change: transform;
}

.stack-card:hover {
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
  z-index: 20 !important;
}

.stack-card .tool-name {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 700;
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stack-card .tool-file {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--cream-50);
}

.stack-card.claude       { --card-color: var(--agent-claude); }
.stack-card.antigravity  { --card-color: var(--agent-antigravity); }
.stack-card.cursor       { --card-color: var(--agent-cursor); }
.stack-card.windsurf     { --card-color: var(--agent-windsurf); }
.stack-card.aider        { --card-color: var(--agent-aider); }
.stack-card.cline        { --card-color: var(--agent-cline); }
.stack-card.copilot      { --card-color: var(--agent-copilot); }
.stack-card.kimi         { --card-color: var(--agent-kimi); }
.stack-card.codex        { --card-color: var(--agent-codex); }

.stack-converge {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.stack-converge svg {
  width: 28px; height: 28px;
  color: var(--cream-30);
}

.vault-folder {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--ink-well);
  border: 1px solid var(--stamp-35);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--stamp-bright);
  letter-spacing: 0.06em;
}

.vault-folder svg { width: 15px; height: 15px; }

/* ==========================================================================
   MODULE GRID — the structural skeleton for this pass.
   Every module below the hero is a two-column "ledger entry": a narrow
   margin rail (eyebrow + heading + meta, like the date/tag column of a
   logbook) beside the module body. Two modules sit at half width
   (PARA tree, test coverage); those collapse the rail to a horizontal
   header row instead, since --rail-width would crowd a half column.
   ========================================================================== */
.content-wrapper {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-4xl);
}

.ledger-section {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  column-gap: var(--space-2xl);
  padding-top: var(--space-3xl);
  border-top: 1px solid var(--rule);
}

.module-rail {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  align-self: start;
}

.module-rail .section-heading { margin-top: 2px; }

.module-meta {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px dashed var(--rule);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--graphite);
  letter-spacing: 0.06em;
}

@media (max-width: 780px) {
  .ledger-section { grid-template-columns: 1fr; row-gap: var(--space-md); }
  .module-rail { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-md); }
  .module-rail .section-heading { width: 100%; order: 2; }
  .module-meta { margin-top: 0; padding-top: 0; border-top: none; order: 3; }
}

/* Half-width pair (PARA + Coverage): rail collapses to a header row —
   the two-column margin layout only works when there's room for it. */
.ledger-section.compact {
  grid-template-columns: 1fr;
  row-gap: var(--space-md);
}

.ledger-section.compact .module-rail {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: var(--space-md);
}

.ledger-section.compact .module-rail .section-heading { order: 2; width: 100%; }
.ledger-section.compact .module-meta { margin: 0; padding: 0; border-top: none; order: 3; }

/* ==========================================================================
   MODULE: CONDENSER — Split-Pane
   ========================================================================== */
.condenser-split-pane {
  display: grid;
  grid-template-columns: 1fr 130px 1fr;
  align-items: stretch;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 2px;
  overflow: hidden;
}

@media (max-width: 860px) {
  .condenser-split-pane { grid-template-columns: 1fr; }
}

.terminal-view {
  background: var(--ink-well);
  display: flex;
  flex-direction: column;
}

.raw-pane   { border-right: 1px solid var(--rule); }
.condensed-pane { border-left: 1px solid var(--rule); }

@media (max-width: 860px) {
  .raw-pane { border-right: none; border-bottom: 1px solid var(--rule); }
  .condensed-pane { border-left: none; border-top: 1px solid var(--rule); }
}

.terminal-header {
  background: var(--paper);
  padding: 7px var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--graphite);
  border-bottom: 1px solid var(--rule);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.terminal-view pre {
  padding: var(--space-sm);
  margin: 0;
  overflow-x: auto;
  color: var(--cream-50);
  font-size: 10.5px;
  line-height: 1.6;
}

.conduit-metrics {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--paper);
  border-left: 1px dashed var(--rule);
  border-right: 1px dashed var(--rule);
}

@media (max-width: 860px) {
  .conduit-metrics { border-left: none; border-right: none; border-top: 1px dashed var(--rule); border-bottom: 1px dashed var(--rule); flex-direction: row; }
}

.metric-block { text-align: center; }

.metric-lbl {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--graphite);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sync-arrow {
  position: relative;
}

.sync-arrow svg {
  width: 22px; height: 22px;
  color: var(--stamp);
  animation: arrow-breathe 2.2s ease-in-out infinite;
}

@keyframes arrow-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* The transfer packet — a session literally traveling from raw log to
   filed markdown, position driven by scroll progress through the module. */
.packet-dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--stamp-bright);
  box-shadow: 0 0 6px 1px var(--stamp-35);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

@media (max-width: 860px) {
  .sync-arrow svg { transform: rotate(90deg); }
}

.checksum {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  /* cream-30 measured 2.50:1 against --paper here — fails AA. cream-50
     clears 4.88:1. */
  color: var(--cream-50);
}

.markdown-preview {
  padding: var(--space-sm);
  font-family: var(--font-prose);
  font-size: 11px;
}

.md-tag {
  display: inline-block;
  background: var(--stamp-15);
  color: var(--stamp-bright);
  padding: 2px 8px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  margin-bottom: var(--space-sm);
}

.markdown-preview h4 { font-family: var(--font-prose); font-weight: 600; color: var(--cream); margin-bottom: var(--space-xs); }
.markdown-preview ul { padding-left: var(--space-md); color: var(--cream-70); }
/* cream-30 measured 2.43:1 against --ink-well here — fails AA. cream-50
   clears 5.03:1. */
.markdown-preview .note { margin-top: 12px; font-size: 11px; color: var(--cream-50); }

/* ==========================================================================
   MODULE: SETUP MATRIX — Tabbed
   ========================================================================== */
.matrix-player {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}

/* Tabs as index-tab dividers, not a generic underline-indicator bar —
   the same "pull a card forward" gesture as the hero's ledger stack:
   the active tab is notched and lifted above its neighbors like a
   card-catalog divider pulled toward you. */
.tab-triggers {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 3px;
  padding: var(--space-sm) var(--space-sm) 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.tab-btn {
  flex: 1;
  min-width: 160px;
  background: var(--ink-well);
  border: 1px solid var(--rule);
  border-bottom: none;
  clip-path: polygon(0 100%, 0 9px, 9px 0, calc(100% - 9px) 0, 100% 9px, 100% 100%);
  padding: var(--space-sm) var(--space-md) calc(var(--space-sm) + 5px);
  color: var(--cream-50);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  min-height: 44px;
  transform: translateY(5px);
}

.tab-btn:hover { transform: translateY(2px); color: var(--cream); }

.tab-btn.active {
  background: var(--ink-well);
  color: var(--stamp-bright);
  border-color: var(--stamp-35);
  transform: translateY(0);
  z-index: 2;
}

@media (max-width: 640px) {
  .tab-btn { clip-path: none; transform: none; min-width: 0; }
  .tab-btn:hover { transform: none; }
}

.tab-content {
  padding: var(--space-xl);
  background: var(--ink-well);
  min-height: 170px;
}

.step-view { display: none; }
.step-view.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-view h4 {
  font-family: var(--font-prose);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
  color: var(--cream);
}

.step-view p {
  color: var(--cream-70);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.step-view code {
  display: block;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: var(--space-sm) var(--space-md);
  margin-top: var(--space-sm);
  color: var(--graphite);
  border-radius: 2px;
}

/* ==========================================================================
   SPLIT ROW — the two half-width "compact" modules share one row
   ========================================================================== */
.split-row {
  display: flex;
  gap: var(--space-2xl);
}

@media (max-width: 900px) {
  .split-row { flex-direction: column; }
}

.half-width { flex: 1; min-width: 0; }

.vault-note {
  margin-bottom: var(--space-md);
  font-size: 13px;
  color: var(--cream-70);
  line-height: 1.6;
}

.vault-note a {
  color: var(--stamp-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* PARA File Tree */
.para-explorer {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--ink-well);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: var(--space-md);
  overflow-x: auto;
}

.tree-root, .tree-children { list-style: none; }

.tree-children {
  padding-left: var(--space-lg);
  border-left: 1px dashed var(--rule-strong);
  margin-left: 12px;
  display: none;
}

.folder.open > .tree-children { display: block; }

.para-explorer li { margin: 3px 0; }

.folder-name, .file-name {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
  color: var(--cream-70);
}

.folder-name:hover, .file-name:hover { background: var(--paper); color: var(--cream); }
.file-name { color: var(--moss); }

.tree-icon { width: 14px; height: 14px; flex-shrink: 0; }

/* Test Coverage — Ledger Stamps */
.verified-banner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  background: var(--moss-15);
  border: 1px solid var(--moss-35);
  border-radius: 2px;
}

.verified-stamp {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border: 2px solid var(--moss);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-8deg);
}

.verified-stamp svg { width: 24px; height: 24px; color: var(--moss); }

.verified-banner .banner-text strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--moss);
  letter-spacing: 0.04em;
}

.verified-banner .banner-text span {
  font-size: 12px;
  /* cream-50 measured 4.52:1 against the moss-tinted banner background —
     technically AA, but by a 0.02 margin too thin to trust. cream-70
     clears 7.25:1. */
  color: var(--cream-70);
}

.coverage-radar {
  background: var(--ink-well);
  border: 1px solid var(--rule);
  border-radius: 2px;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  padding: var(--space-xl) var(--space-md);
}

.stat-circle { width: 90px; text-align: center; }

.circular-chart {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.circle-bg {
  fill: none;
  stroke: var(--rule);
  stroke-width: 2.5;
}

.circle {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke: var(--stamp);
}

.percentage {
  fill: var(--cream);
  font-family: var(--font-mono);
  font-size: 8px;
  text-anchor: middle;
}

.stat-label {
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--graphite);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  border-top: 1px solid var(--rule);
  background: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  /* cream-30 measured 2.48:1 against --ink here — fails AA. cream-50
     clears 4.99:1. */
  color: var(--cream-50);
}

footer a { color: var(--cream-50); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--stamp-bright); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 640px) {
  #site-header { padding: var(--space-sm) var(--space-md); }
  .logo h1 { font-size: 10px; }

  .hero-section { padding: var(--space-2xl) var(--space-md) var(--space-2xl); }
  .hero-actions { flex-direction: column; }
  .ledger-btn { width: 100%; }

  .content-wrapper { padding: 0 var(--space-md) var(--space-3xl); }

  .tab-triggers { flex-direction: column; align-items: stretch; padding: var(--space-sm); gap: 1px; }
  .tab-btn { border-bottom: 1px solid var(--rule); }
  .tab-btn:last-child { border-bottom: none; }

  .coverage-radar { gap: var(--space-xl) var(--space-sm); justify-content: center; }
  .stat-circle { width: 40%; }

  .ledger-stack { height: 340px; }
}
