/* ===================================================
   PENCIPTAAN UANG MODERN — styles.css
   Dark Analytical Financial Theme
   =================================================== */

/* --- Variables --- */
:root {
  --bg-base: #050911;
  --bg-surface: #090f1e;
  --bg-card: #0d1528;
  --bg-card-alt: #111d35;
  --bg-elevated: #172240;
  --border-subtle: #182440;
  --border-default: #1f304e;
  --border-strong: #2a4170;
  --text-primary: #dde8f8;
  --text-secondary: #7090b8;
  --text-muted: #364f6e;
  --text-code: #a0c4e8;
  --accent: #22d3ee;
  --accent-dim: #0e7490;
  --creation: #34d399;
  --creation-dim: #065f46;
  --destruction: #fb7185;
  --destruction-dim: #9f1239;
  --reserves: #a78bfa;
  --reserves-dim: #4c1d95;
  --neutral: #fbbf24;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', Courier, monospace;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 20px;
  --trans: 0.18s ease;
  --shadow: 0 2px 12px rgba(0,0,0,0.6), 0 0 0 1px var(--border-subtle);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--font-mono); font-size: 0.875em; color: var(--text-code); }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.3rem; }

/* --- Typography --- */
.display { font-family: var(--font-display); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; font-weight: 500; margin-bottom: 0.6rem; }
h4 { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); margin-bottom: 0.4rem; }
p { margin-bottom: 0.85rem; }
strong { font-weight: 600; color: var(--text-primary); }

/* --- Layout --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 5rem 0; }
.section-alt { background: var(--bg-surface); }

.section-header { max-width: 700px; margin-bottom: 3rem; }
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.9;
}
.section-title { margin-bottom: 1rem; }
.section-desc { font-size: 1.05rem; color: var(--text-secondary); max-width: 600px; }

/* Color utilities */
.accent-color { color: var(--accent); }
.creation-color { color: var(--creation); }
.destruction-color { color: var(--destruction); }
.reserves-color { color: var(--reserves); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--trans);
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #040a14;
  border-color: var(--accent);
}
.btn-primary:hover { background: #38e7ff; text-decoration: none; }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-elevated); border-color: var(--accent); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-default);
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text-primary); text-decoration: none; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }
button.btn { line-height: 1; }
button:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(5, 9, 17, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--trans);
}
.nav.scrolled { border-bottom-color: var(--border-default); }
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo-sym {
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--r-sm);
  transition: var(--trans);
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: var(--trans);
}

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 8rem 0 5rem;
}
.hero-ledger-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-ledger-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, var(--bg-base) 100%),
    radial-gradient(ellipse 60% 50% at 60% 50%, rgba(34,211,238,0.04) 0%, transparent 70%);
}
/* Animated grid lines */
.hero-grid-line {
  position: absolute;
  background: var(--border-subtle);
  opacity: 0.6;
}
.hero-grid-line.h { left: 0; right: 0; height: 1px; }
.hero-grid-line.v { top: 0; bottom: 0; width: 1px; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}
.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.2);
  padding: 0.35rem 0.8rem;
  border-radius: 100px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-title {
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 4rem;
}
.hero-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
}
.hero-stat { display: flex; flex-direction: column; gap: 0.3rem; }
.hero-stat-val {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 180px;
  line-height: 1.4;
}

/* --- TABS --- */
.tabs { margin-top: 1rem; }
.tabs-nav {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0;
}
.tab-btn {
  background: none;
  border: none;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: var(--trans);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.2s ease; }

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

/* --- CONCEPT CARDS (Tab 1) --- */
.concept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.concept-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}
.concept-icon {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.concept-note {
  margin-top: 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  line-height: 1.45;
}
.note-neutral { background: rgba(34,211,238,0.07); border-left: 2px solid var(--accent); color: var(--text-secondary); }
.note-creation { background: rgba(52,211,153,0.07); border-left: 2px solid var(--creation); color: var(--text-secondary); }
.note-destruction { background: rgba(251,113,133,0.07); border-left: 2px solid var(--destruction); color: var(--text-secondary); }

/* --- COMPARISON (Tab 2) --- */
.comparison-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: start;
}
.comparison-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}
.comp-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}
.comp-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 3rem;
}
.comp-divider span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  padding: 0.3rem 0.5rem;
  border-radius: var(--r-sm);
}
.bs-mini { margin-bottom: 1rem; }
.bs-mini-header {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0.5rem;
  background: var(--bg-elevated);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.bs-mini-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.bs-mini-row:last-child { border-bottom: none; }
.comp-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.55; }

/* --- ACCOUNTING BASICS (Tab 3) --- */
.accounting-basics h3 { margin-bottom: 0.75rem; }
.formula-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.formula-item {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  padding: 0.5rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border-default);
}
.formula-eq, .formula-plus {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text-muted);
}
.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.rule-card {
  padding: 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
}
.rule-dr { background: rgba(52,211,153,0.05); border-color: rgba(52,211,153,0.2); }
.rule-cr { background: rgba(251,113,133,0.05); border-color: rgba(251,113,133,0.2); }
.rule-dr h4 { color: var(--creation); }
.rule-cr h4 { color: var(--destruction); }
.insight-box {
  background: rgba(34,211,238,0.06);
  border: 1px solid rgba(34,211,238,0.2);
  border-radius: var(--r-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}
.insight-box.insight-critical {
  background: rgba(251,113,133,0.06);
  border-color: rgba(251,113,133,0.2);
}
.insight-journal {
  background: var(--bg-base);
  border-radius: var(--r-sm);
  padding: 0.75rem 1rem;
  margin: 0.75rem 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.ij-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.25rem 0; }
.ij-dr { color: var(--creation); font-weight: 600; min-width: 24px; }
.ij-cr { color: var(--destruction); font-weight: 600; min-width: 24px; padding-left: 12px; }
.ij-acc { flex: 1; color: var(--text-secondary); }
.ij-amt { color: var(--creation); font-weight: 600; }
.causal-flow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.causal-flow span { background: var(--bg-elevated); padding: 0.2rem 0.5rem; border-radius: var(--r-sm); color: var(--text-secondary); }
.cf-arrow { color: var(--accent); background: none !important; padding: 0 !important; font-size: 0.85rem; }

/* --- RESERVES TAB --- */
.function-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.function-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 1.25rem;
}
.func-icon { font-size: 1.4rem; margin-bottom: 0.6rem; }

/* --- FLOW SECTION --- */
.flow-wrapper { max-width: 800px; }
.flow-display {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  min-height: 280px;
  animation: fadeIn 0.25s ease;
}
.flow-step-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.flow-step-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.flow-step-desc { color: var(--text-secondary); font-size: 0.95rem; max-width: 560px; }
.flow-step-diagram {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.fsd-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  padding: 0.5rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
}
.fsd-box.active-box {
  border-color: var(--accent);
  background: rgba(34,211,238,0.1);
  color: var(--accent);
}
.fsd-box.creation-box { border-color: var(--creation); background: rgba(52,211,153,0.08); color: var(--creation); }
.fsd-arrow { color: var(--text-muted); font-size: 0.9rem; }
.flow-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.flow-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--trans);
  font-family: var(--font-body);
}
.flow-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.flow-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.flow-dots { display: flex; gap: 6px; }
.flow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: var(--trans);
  cursor: pointer;
}
.flow-dot.active { background: var(--accent); }

/* --- LEDGER SECTION --- */
.ledger-container {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.ledger-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.ledger-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--trans);
}
.ledger-step-item:last-child { border-bottom: none; }
.ledger-step-item:hover { background: var(--bg-elevated); }
.ledger-step-item.active { background: rgba(34,211,238,0.08); border-right: 2px solid var(--accent); }
.lsi-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 18px;
  padding-top: 2px;
}
.ledger-step-item.active .lsi-num { color: var(--accent); }
.lsi-text {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
}
.ledger-step-item.active .lsi-text { color: var(--text-primary); }

.ledger-main {}
.ledger-display {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.2s ease;
}
.ld-header { margin-bottom: 1.5rem; }
.ld-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.ld-title { font-family: var(--font-display); font-size: 1.4rem; }

.ld-parties {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.party-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  border: 1px solid;
}
.party-bank { color: var(--accent); border-color: var(--accent-dim); background: rgba(34,211,238,0.06); }
.party-customer { color: var(--creation); border-color: var(--creation-dim); background: rgba(52,211,153,0.06); }
.party-cb { color: var(--reserves); border-color: var(--reserves-dim); background: rgba(167,139,250,0.06); }

.ld-journal {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.ld-journal-header {
  background: var(--bg-elevated);
  padding: 0.5rem 1rem;
  display: grid;
  grid-template-columns: 2.5rem 4rem 1fr 6rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  gap: 0.5rem;
}
.ld-journal-row {
  display: grid;
  grid-template-columns: 2.5rem 4rem 1fr 6rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.3s ease;
}
.ld-journal-row:hover { background: var(--bg-elevated); }
.jr-entity {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.jr-dr { color: var(--creation); font-weight: 600; }
.jr-cr { color: var(--destruction); font-weight: 600; padding-left: 1.25rem; }
.jr-acc { color: var(--text-secondary); }
.jr-amt-pos { color: var(--creation); font-weight: 600; text-align: right; }
.jr-amt-neg { color: var(--destruction); font-weight: 600; text-align: right; }

.ld-effects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.ld-effect-card {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
}
.ld-effect-card.positive { border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.05); }
.ld-effect-card.negative { border-color: rgba(251,113,133,0.3); background: rgba(251,113,133,0.05); }
.ld-effect-card.neutral { border-color: rgba(34,211,238,0.25); background: rgba(34,211,238,0.04); }
.lec-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.3rem; }
.lec-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
}
.lec-val.pos { color: var(--creation); }
.lec-val.neg { color: var(--destruction); }
.lec-val.neutral-val { color: var(--accent); }
.ld-assumption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-base);
  border-radius: var(--r-sm);
  border-left: 2px solid var(--border-strong);
}

.ledger-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  padding-top: 0.5rem;
}
.ledger-counter {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 60px;
  text-align: center;
}

/* --- MATRIX SECTION --- */
.matrix-tx-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.matrix-instructions {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.matrix-tx-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tx-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--r-md);
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--trans);
  font-family: var(--font-mono);
}
.tx-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.tx-btn.applied { border-color: var(--creation); color: var(--creation); background: rgba(52,211,153,0.07); }

.matrix-log-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-height: 140px;
  overflow-y: auto;
}
.matrix-log-entry {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border-subtle);
  line-height: 1.4;
}
.matrix-log-entry:last-child { border-bottom: none; }
.mle-badge { color: var(--accent); margin-right: 0.5rem; }

.money-supply-display {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}
.ms-item { display: flex; flex-direction: column; gap: 0.2rem; }
.ms-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.ms-value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.5s ease;
}
.ms-value.changed-pos { color: var(--creation); }
.ms-value.changed-neg { color: var(--destruction); }
.ms-divider { width: 1px; height: 40px; background: var(--border-subtle); }

.balance-sheets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.bs-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.bs-card.changed { border-color: var(--accent); }
.bs-card-header {
  background: var(--bg-elevated);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}
.bs-entity-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}
.bs-entity-type {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.bs-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.bs-side { padding: 0.75rem; }
.bs-side:first-child { border-right: 1px solid var(--border-subtle); }
.bs-side-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.bs-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.75rem;
}
.bs-row:last-child { border-bottom: none; }
.bs-row-label { color: var(--text-secondary); }
.bs-row-val {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.4s ease;
}
.bs-row-val.highlight-pos { color: var(--creation); animation: flashPos 0.6s ease; }
.bs-row-val.highlight-neg { color: var(--destruction); animation: flashNeg 0.6s ease; }
@keyframes flashPos { 0% { background: rgba(52,211,153,0.25); } 100% { background: transparent; } }
@keyframes flashNeg { 0% { background: rgba(251,113,133,0.25); } 100% { background: transparent; } }
.bs-total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0.75rem;
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-default);
}

/* --- SIMULATOR --- */
.sim-layout { display: grid; grid-template-columns: 320px 1fr; gap: 2rem; align-items: start; }
.sim-controls {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.sim-group { display: flex; flex-direction: column; gap: 0.4rem; }
.sim-label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.sim-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 0.6rem 0.8rem;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--trans);
  width: 100%;
}
.sim-select:focus { border-color: var(--accent); outline: none; }
.sim-amount-val { font-family: var(--font-mono); font-weight: 600; color: var(--accent); }
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}
.sim-number-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 0.4rem 0.6rem;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  width: 100%;
}
.sim-number-input:focus { border-color: var(--accent); outline: none; }
.sim-scenario-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border-subtle);
}

.sim-results {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  min-height: 300px;
}
.sim-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 240px; gap: 1rem; text-align: center; }
.sim-placeholder-icon { font-size: 2.5rem; opacity: 0.2; }
.sim-placeholder p { color: var(--text-muted); font-size: 0.9rem; max-width: 280px; }

.sim-result-header { margin-bottom: 1.5rem; }
.sim-result-title { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 0.3rem; }
.sim-result-desc { font-size: 0.85rem; color: var(--text-secondary); }
.sim-assumption { font-size: 0.75rem; color: var(--text-muted); font-style: italic; margin-top: 0.3rem; }

.sim-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.sim-metric {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-subtle);
}
.sim-metric.changed-pos { border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.06); }
.sim-metric.changed-neg { border-color: rgba(251,113,133,0.4); background: rgba(251,113,133,0.06); }
.sm-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.3rem; }
.sm-delta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-bottom: 0.15rem;
}
.sm-delta.pos { color: var(--creation); }
.sm-delta.neg { color: var(--destruction); }
.sm-delta.zero { color: var(--text-muted); }
.sm-val {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sim-journal-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}
.sim-journal-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.sim-journal-table th {
  text-align: left;
  padding: 0.4rem 0.5rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sim-journal-table td {
  padding: 0.5rem 0.5rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.sim-journal-table .dr-cell { color: var(--creation); font-weight: 600; }
.sim-journal-table .cr-cell { color: var(--destruction); font-weight: 600; padding-left: 1rem; }
.sim-journal-table .pos-cell { color: var(--creation); font-weight: 600; }
.sim-journal-table .neg-cell { color: var(--destruction); font-weight: 600; }

/* --- RESERVES SECTION --- */
.reserves-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.myth-card, .reality-card {
  border-radius: var(--r-lg);
  padding: 1.75rem;
}
.myth-card {
  background: rgba(251,113,133,0.04);
  border: 1px solid rgba(251,113,133,0.2);
}
.reality-card {
  background: rgba(52,211,153,0.04);
  border: 1px solid rgba(52,211,153,0.2);
}
.myth-badge, .reality-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}
.myth-badge { background: rgba(251,113,133,0.12); color: var(--destruction); border: 1px solid rgba(251,113,133,0.3); }
.reality-badge { background: rgba(52,211,153,0.12); color: var(--creation); border: 1px solid rgba(52,211,153,0.3); }
.myth-problems {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(0,0,0,0.2);
  border-radius: var(--r-md);
  font-size: 0.85rem;
}
.reality-list { margin: 0.75rem 0 1.25rem; font-size: 0.9rem; }
.causal-chain { display: flex; flex-direction: column; gap: 0; margin-top: 0.75rem; }
.cc-step {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
}
.cc-loan { background: rgba(167,139,250,0.1); color: var(--reserves); border: 1px solid rgba(167,139,250,0.2); }
.cc-deposit { background: rgba(52,211,153,0.1); color: var(--creation); border: 1px solid rgba(52,211,153,0.2); }
.cc-payment, .cc-borrow { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border-default); }
.cc-settlement { background: rgba(34,211,238,0.08); color: var(--accent); border: 1px solid rgba(34,211,238,0.2); }
.cc-arrow { text-align: left; padding-left: 1rem; color: var(--text-muted); font-size: 0.8rem; line-height: 1.8; }

.comparison-table-wrap h3 { margin-bottom: 1rem; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.data-table th {
  background: var(--bg-elevated);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-default);
}
.col-myth { color: var(--destruction) !important; }
.col-real { color: var(--creation) !important; }
.data-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table td:first-child { color: var(--text-primary); font-weight: 500; }
.val-myth { color: rgba(251,113,133,0.8); }
.val-real { color: rgba(52,211,153,0.9); }

/* --- CREATION/DESTRUCTION --- */
.cd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.creation-panel, .destruction-panel {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}
.ph-creation { background: rgba(52,211,153,0.1); border-bottom: 1px solid rgba(52,211,153,0.2); }
.ph-destruction { background: rgba(251,113,133,0.1); border-bottom: 1px solid rgba(251,113,133,0.2); }
.ph-icon { font-size: 1.4rem; line-height: 1; }
.panel-header h3 { font-size: 1rem; font-weight: 600; flex: 1; margin: 0; }
.panel-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
}
.pb-creation { background: rgba(52,211,153,0.15); color: var(--creation); }
.pb-destruction { background: rgba(251,113,133,0.15); color: var(--destruction); }

.cd-items { background: var(--bg-card); padding: 0.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.cd-item {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  padding: 1rem;
  border: 1px solid var(--border-subtle);
}
.cdi-title { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text-primary); }
.cdi-desc { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.mini-journal {
  background: var(--bg-base);
  border-radius: var(--r-sm);
  padding: 0.6rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}
.mj-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.15rem 0; }
.mj-dr { color: var(--creation); font-weight: 600; min-width: 22px; }
.mj-cr { color: var(--destruction); font-weight: 600; min-width: 22px; padding-left: 10px; }
.mj-row span:nth-child(2) { flex: 1; color: var(--text-secondary); }
.mj-plus { color: var(--creation); font-weight: 600; }
.mj-minus { color: var(--destruction); font-weight: 600; }
.cdi-effect {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--r-sm);
}
.eff-creation { background: rgba(52,211,153,0.1); color: var(--creation); }
.eff-destruction { background: rgba(251,113,133,0.1); color: var(--destruction); }

.net-effect-box {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}
.net-effect-box h3 { margin-bottom: 0.75rem; }

/* --- FAQ --- */
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; max-width: 820px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: background var(--trans);
  background: none;
  border: none;
  text-align: left;
  width: 100%;
  font-family: var(--font-body);
}
.faq-question:hover { background: var(--bg-elevated); }
.faq-chevron {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  margin-top: 2px;
  flex-shrink: 0;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--accent); }
.faq-answer {
  display: none;
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}
.faq-item.open .faq-answer { display: block; animation: fadeIn 0.2s ease; }

/* --- GLOSSARY --- */
.glossary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0.75rem; }
.glossary-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
}
.glossary-term {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.glossary-def { font-size: 0.83rem; color: var(--text-secondary); line-height: 1.5; }

/* --- SOURCES --- */
.sources-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.source-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}
.source-org {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.source-title { font-size: 0.92rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.3rem; line-height: 1.4; }
.source-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.source-desc { font-size: 0.83rem; color: var(--text-secondary); line-height: 1.55; }
.source-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

/* --- FOOTER --- */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: space-between;
}
.footer-logo { display: flex; align-items: center; gap: 0.75rem; }
.footer-sym { font-size: 2rem; color: var(--accent); line-height: 1; }
.footer-name { font-family: var(--font-display); font-size: 1rem; font-weight: 600; }
.footer-sub { font-size: 0.75rem; color: var(--text-muted); }
.footer-note { font-size: 0.78rem; color: var(--text-muted); max-width: 480px; line-height: 1.5; }

/* --- HIGHLIGHT PULSE (for matrix changes) --- */
.val-changed {
  animation: pulseBorder 1.5s ease;
}
@keyframes pulseBorder {
  0% { box-shadow: 0 0 0 0 rgba(34,211,238,0.5); }
  50% { box-shadow: 0 0 0 4px rgba(34,211,238,0.15); }
  100% { box-shadow: none; }
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .sim-layout { grid-template-columns: 1fr; }
  .reserves-layout { grid-template-columns: 1fr; }
  .cd-grid { grid-template-columns: 1fr; }
  .comparison-container { grid-template-columns: 1fr; }
  .comp-divider { display: none; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(5,9,17,0.98);
    border-bottom: 1px solid var(--border-default);
    padding: 1rem;
    flex-direction: column;
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 0.75rem; font-size: 0.9rem; }
  .nav-toggle { display: flex; }

  .ledger-container { grid-template-columns: 1fr; }
  .ledger-sidebar { display: none; }

  .balance-sheets-grid { grid-template-columns: 1fr; }
  .rule-grid { grid-template-columns: 1fr; }

  h1 { font-size: 2.5rem; }
  .hero-stats { gap: 1.5rem; }
  .formula-box { gap: 0.75rem; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; }
  .ld-journal-header,
  .ld-journal-row { grid-template-columns: 2rem 2.5rem 1fr 4.5rem; font-size: 0.74rem; }
  .bs-sides { grid-template-columns: 1fr; }
  .bs-side:first-child { border-right: none; border-bottom: 1px solid var(--border-subtle); }
}
