:root {
  --bg: #130f18;
  --bg-soft: #1b1623;
  --panel: rgba(20, 15, 28, 0.78);
  --line: rgba(233, 219, 180, 0.18);
  --text: #efe6d0;
  --muted: #bcae93;
  --accent: #d9aa5b;
  --accent-2: #7fc9b8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(217, 170, 91, 0.18), transparent 34%),
    radial-gradient(circle at 80% 20%, rgba(127, 201, 184, 0.12), transparent 24%),
    linear-gradient(180deg, #0b0910 0%, #130f18 38%, #1a1521 100%);
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.24;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { color: #f4c980; }
.veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, transparent, rgba(0, 0, 0, 0.34) 68%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.3));
}
.hero, .layout, .site-footer, .notebook, .room-shell { position: relative; z-index: 1; }
.hero, .room-shell { max-width: 1100px; margin: 0 auto; padding: 5rem 1.5rem 2rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.74rem;
  color: var(--accent-2);
  margin: 0 0 1rem;
}
h1, h2, h3 {
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.04em;
  margin-top: 0;
}
h1 { font-size: clamp(2.8rem, 6vw, 5.8rem); line-height: 0.95; margin-bottom: 1rem; max-width: 12ch; }
.lede { max-width: 48rem; font-size: 1.15rem; line-height: 1.7; color: var(--muted); }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.3rem;
  border: 1px solid rgba(217, 170, 91, 0.55);
  border-radius: 999px;
  background: rgba(217, 170, 91, 0.12);
  color: var(--text);
  box-shadow: var(--shadow);
}
.button-ghost { background: transparent; border-color: rgba(127, 201, 184, 0.4); }
.layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.panel {
  grid-column: span 6;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.panel-feature, .panel-wide { grid-column: span 12; }
.card-grid, .rule-grid, .split-grid, .ledger-grid, .vault-grid {
  display: grid;
  gap: 1rem;
}
.card-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.rule-grid, .vault-grid, .split-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card, .tile, .list-block, .signal, .constellation, .mirror-block {
  display: block;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.card:hover, .tile:hover, .signal:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 170, 91, 0.45);
  background: rgba(255, 255, 255, 0.05);
}
.card-tag, .meta-label {
  display: inline-block;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.ghost-note, .notebook-small, .meta-copy, .muted { color: var(--muted); }
.notebook {
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(11, 9, 16, 0.72);
  backdrop-filter: blur(12px);
}
.notebook ol { margin: 1rem 0 0; padding-left: 1.4rem; }
.site-footer { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 3rem; color: var(--muted); }
.site-footer span { opacity: 0.45; margin: 0 0.4rem; }
.room-shell { display: grid; gap: 1.25rem; }
.room-banner, .room-content, .room-sidebar, .fragment-panel, .vault-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.room-banner, .fragment-panel, .vault-panel { padding: 1.5rem; }
.room-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); gap: 1.25rem; }
.room-content, .room-sidebar { padding: 1.5rem; }
.room-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
}
.room-nav a { color: var(--muted); }
.timeline, .whisper-list, .resident-roll, .signal-list { display: grid; gap: 0.9rem; }
.timeline article, .whisper-list li, .resident-roll li, .signal-list li {
  list-style: none;
  border-left: 2px solid rgba(127, 201, 184, 0.3);
  padding-left: 1rem;
}
.whisper-list, .resident-roll, .signal-list { margin: 0; padding: 0; }
.code-strip {
  font-family: "Courier New", Courier, monospace;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(217, 170, 91, 0.22);
  border-radius: 18px;
  padding: 1rem;
  overflow-x: auto;
}
.fragment-panel { border-color: rgba(217, 170, 91, 0.35); }
.fragment-value {
  display: inline-flex;
  align-items: center;
  margin-top: 0.8rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.16em;
  background: rgba(217, 170, 91, 0.12);
  border: 1px solid rgba(217, 170, 91, 0.34);
}
.inline-path { white-space: nowrap; }
.vault-form { display: grid; gap: 1rem; }
.vault-form label {
  font-family: "Courier New", Courier, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}
.vault-form input {
  width: 100%;
  min-height: 3.2rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  padding: 0.9rem 1rem;
  font-size: 1rem;
  font-family: "Courier New", Courier, monospace;
}
.vault-output {
  min-height: 5rem;
  border: 1px dashed rgba(127, 201, 184, 0.32);
  border-radius: 20px;
  padding: 1rem;
  color: var(--muted);
}
.status-ok { color: #9ce3a9; }
.status-bad { color: #ffab94; }
.micro-links { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.micro-links a {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}
@media (max-width: 840px) {
  .panel, .panel-feature, .panel-wide { grid-column: span 12; }
  .room-layout { grid-template-columns: 1fr; }
  .hero, .room-shell { padding-top: 3rem; }
}
