:root {
  --bg: #f6f4ee;
  --bg-subtle: #ede9df;
  --surface: #ffffff;
  --surface-elevated: #fcfbf8;
  --border: #dcd6c9;
  --border-strong: #bfb7a6;
  --ink: #121519;
  --ink-muted: #525965;
  --ink-faint: #7c828d;
  --emerald: #0b6e4f;
  --emerald-soft: rgba(11, 110, 79, 0.1);
  --emerald-border: rgba(11, 110, 79, 0.28);
  --vermilion: #c83e2b;
  --vermilion-soft: rgba(200, 62, 43, 0.09);
  --amber: #b45309;
  --amber-soft: rgba(180, 83, 9, 0.11);
  --amber-border: rgba(180, 83, 9, 0.32);
  --indigo: #2c4b8c;
  --indigo-soft: rgba(44, 75, 140, 0.1);
  --shadow-sm: 0 1px 2px rgba(18, 21, 25, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(18, 21, 25, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-display: 'Newsreader', 'Georgia', 'Songti SC', serif;
  --font-sans: 'Plus Jakarta Sans', 'PingFang SC', 'Hiragino Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
}

[data-theme='dark'] {
  --bg: #0c1014;
  --bg-subtle: #141a21;
  --surface: #121820;
  --surface-elevated: #18202a;
  --border: #25303d;
  --border-strong: #374659;
  --ink: #f1f3f5;
  --ink-muted: #9aa5b4;
  --ink-faint: #6c7787;
  --emerald: #2dd49f;
  --emerald-soft: rgba(45, 212, 159, 0.13);
  --emerald-border: rgba(45, 212, 159, 0.34);
  --vermilion: #f87171;
  --vermilion-soft: rgba(248, 113, 113, 0.13);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --amber-border: rgba(245, 158, 11, 0.34);
  --indigo: #60a5fa;
  --indigo-soft: rgba(96, 165, 250, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 36px -14px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Urgent Sunset Alert Strip */
.sunset-strip {
  background: var(--amber-soft);
  border-bottom: 1px solid var(--amber-border);
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
}

.sunset-strip a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  text-align: center;
}

.sunset-strip a:hover {
  text-decoration: underline;
}

/* Top Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 18px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--emerald);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--bg-subtle);
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-select,
.theme-toggle {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.lang-select {
  padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23525965' d='M2.5 4.2L6 7.7l3.5-3.5.8.8L6 9.3 1.7 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.lang-select:hover,
.theme-toggle:hover {
  border-color: var(--border-strong);
}

/* Editorial Hero */
.hero {
  position: relative;
  padding: 44px 0 28px;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--border) 42%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--border) 42%, transparent) 1px, transparent 1px);
  background-size: 40px 40px;
  border-bottom: 1px solid var(--border);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 25% 0%, transparent 20%, var(--bg) 78%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.breadcrumb a:hover {
  color: var(--emerald);
  text-decoration: underline;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emerald);
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.eyebrow.warning {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: var(--amber-border);
}

.hero h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 900px;
}

.hero-sub {
  margin: 0;
  max-width: 780px;
  font-size: 16px;
  color: var(--ink-muted);
}

/* Main Workspace */
.workspace {
  padding: 28px 0 48px;
}

.ledger-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.controls-bar {
  padding: 22px 24px;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.segmented button {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.segmented button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.action-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.btn-primary {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.06);
  background: var(--emerald);
  border-color: var(--emerald);
  color: #fff;
}

.inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 0 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap:focus-within {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-soft);
}

.input-prefix {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-muted);
  margin-right: 6px;
}

.input-wrap input,
.input-wrap select {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  padding: 10px 0;
  outline: none;
}

.input-wrap select {
  font-family: var(--font-sans);
  font-size: 14px;
}

.presets-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.preset-chip:hover {
  border-color: var(--emerald);
  color: var(--emerald);
}

/* Hidden Fee Switches */
.toggles-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggles-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.toggles-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.toggle-pill input {
  accent-color: var(--emerald);
  width: 15px;
  height: 15px;
  margin: 0;
}

.toggle-pill:has(input:checked) {
  border-color: var(--emerald);
  background: var(--emerald-soft);
  color: var(--ink);
}

.overhead-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.overhead-control {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 260px;
}

.overhead-control input[type='range'] {
  flex: 1;
  accent-color: var(--emerald);
}

/* Filter + Sort Toolbar */
.table-toolbar {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cat-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-pill {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
}

.cat-pill.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.micro-alert {
  margin: 14px 24px 0;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--vermilion-soft);
  border: 1px solid color-mix(in srgb, var(--vermilion) 32%, transparent);
  color: var(--vermilion);
  font-size: 13px;
  font-weight: 600;
}

/* KPI Summary Strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.kpi-card {
  background: var(--surface);
  padding: 18px 22px;
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.kpi-value.emerald {
  color: var(--emerald);
}

.kpi-value.vermilion {
  color: var(--vermilion);
}

.kpi-sub {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Matrix Table */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ledger-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.ledger-table th.num,
.ledger-table td.num {
  text-align: right;
}

.ledger-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.ledger-table tbody tr {
  transition: background 0.12s ease;
}

.ledger-table tbody tr:hover {
  background: var(--surface-elevated);
}

.ledger-table tbody tr.row-best {
  background: color-mix(in srgb, var(--emerald-soft) 55%, var(--surface));
}

.ledger-table tbody tr.row-sunset {
  opacity: 0.85;
}

.provider-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 195px;
}

.provider-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.provider-link {
  font-weight: 700;
  color: var(--ink);
}

.provider-link:hover {
  color: var(--emerald);
  text-decoration: underline;
}

.provider-tier-sub {
  font-size: 12px;
  color: var(--ink-muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tag-best {
  background: var(--emerald);
  color: #fff;
}

.tag-mor {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.tag-gateway {
  background: var(--bg-subtle);
  color: var(--ink-muted);
}

.tag-sunset {
  background: var(--amber-soft);
  color: var(--amber);
}

.tag-new {
  background: var(--indigo-soft);
  color: var(--indigo);
}

.net-strong {
  font-weight: 700;
  color: var(--emerald);
}

.fee-loss {
  color: var(--vermilion);
}

.diff-pill {
  display: block;
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 2px;
}

/* Waterfall Breakdown Bar */
.waterfall-box {
  padding: 22px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-elevated);
}

.waterfall-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.waterfall-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.waterfall-track {
  height: 22px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.wf-seg {
  height: 100%;
  transition: width 0.25s ease;
}

.wf-net { background: var(--emerald); }
.wf-base { background: #dc5b3e; }
.wf-fixed { background: #e8833a; }
.wf-intl { background: #c0264c; }
.wf-fx { background: #7c3aed; }
.wf-sub { background: #2563eb; }
.wf-tax { background: #0891b2; }
.wf-plan { background: #64748b; }

.wf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  font-size: 12.5px;
}

.wf-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wf-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Interactive Scale Chart */
.chart-box {
  padding: 22px 24px;
  border-top: 1px solid var(--border);
}

.chart-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chart-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.chart-header p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.svg-chart-wrap {
  width: 100%;
  overflow-x: auto;
}

.scale-svg {
  width: 100%;
  min-width: 520px;
  height: auto;
  display: block;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
}

.crossover-note {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--emerald);
}

/* Comparison Duel Header Cards */
.duel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.duel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  position: relative;
}

.duel-card.winner {
  border-color: var(--emerald);
  box-shadow: 0 0 0 2px var(--emerald-soft);
}

.duel-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.verdict-banner {
  background: var(--surface);
  border: 1px solid var(--emerald-border);
  border-left: 4px solid var(--emerald);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 22px;
}

.verdict-banner h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.verdict-banner p {
  margin: 0;
  color: var(--ink-muted);
}

/* Content Sections & Directories */
.content-section {
  margin-top: 38px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 14px;
}

.link-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: var(--emerald);
  box-shadow: var(--shadow-sm);
}

.link-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.link-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.link-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--emerald);
  font-weight: 600;
  margin-top: 6px;
}

.pros-cons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}

.pc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
}

.pc-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.pc-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-muted);
}

.pc-card li {
  margin-bottom: 8px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--emerald);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin: 10px 0 0;
  color: var(--ink-muted);
}

/* Extension Promo Banner & Ad Slot */
.ext-banner {
  margin-top: 38px;
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0d2b22 0%, #103c2f 60%, #194d3c 100%);
  color: #f3f7f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.ext-banner h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
}

.ext-banner p {
  margin: 0;
  max-width: 660px;
  color: rgba(243, 247, 245, 0.84);
  font-size: 14.5px;
}

.ext-banner .btn-light {
  background: #fff;
  color: #0d2b22;
  border: 0;
  padding: 11px 18px;
  font-weight: 700;
  border-radius: 9px;
}

.ad-slot {
  margin-top: 28px;
  padding: 16px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ad-slot-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.partner-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 0;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--emerald);
  text-decoration: underline;
}

/* Static prose pages */
.prose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 860px;
}

.prose-card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-top: 26px;
}

.prose-card ul {
  padding-left: 20px;
}

@media (max-width: 760px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .controls-bar,
  .waterfall-box,
  .chart-box {
    padding: 16px;
  }
  .ledger-table th,
  .ledger-table td {
    padding: 11px 10px;
    font-size: 13px;
  }
  .ext-banner {
    padding: 20px;
  }
}
