:root {
  --bg: #f8f6fb;
  --surface: #fff;
  --surface-soft: #f1edf7;
  --ink: #251d35;
  --muted: #6f677b;
  --primary: #67499c;
  --primary-deep: #4d3478;
  --primary-soft: #e9e0f6;
  --green: #73985a;
  --green-soft: #e7eedf;
  --border: #e1dbe9;
  --focus: #a5ce7f;
  --shadow: 0 18px 45px rgba(57,38,89,.09);
  /* Map legacy page tokens to the Onion Toolbox palette. */
  --paper: var(--bg);
  --panel: var(--surface);
  --card: var(--surface);
  --line: var(--border);
  --brand: var(--primary);
  --brand-dark: var(--primary-deep);
  --plum: var(--primary);
  --plum-dark: var(--primary-deep);
  --teal: var(--primary);
  --coral: var(--green);
  --amber: var(--green);
  --mint: var(--green-soft);
  --lime: var(--primary-soft);
  --danger: #a61b1b;
}

body {
  background: var(--bg) !important;
  color: var(--ink) !important;
}

body::before { display: none !important; }
a { color: var(--primary); }
a:hover { color: var(--primary-deep); }

/* Keep legacy components readable while matching the shared surface system. */
.panel, .card, .table-wrap, .stat, .station, .demo-output {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow) !important;
}
input, select, textarea { border-color: var(--border) !important; background: var(--surface) !important; color: var(--ink) !important; }
button.primary, button.button-primary, .button-primary { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }
button.primary:hover, button.button-primary:hover, .button-primary:hover { background: var(--primary-deep) !important; }
th { background: var(--surface-soft) !important; color: var(--ink) !important; }
.eyebrow, .brand, .source a, footer a { color: var(--green) !important; }
