:root {
  /* Light theme (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --container-bg: linear-gradient(135deg, #f8fafc, #f1f5f9);
  --button-bg: #ffffff;
  --button-hover: #f8fafc;
  --display-bg: rgba(255, 255, 255, 0.98);
  --success: #059669;
  --error: #dc2626;
  --warning: #d97706;
  --info: #0284c7;

  /* Brand palette */
  --brand-navy: #002366;
  --brand-rose: #C08081;
  --brand-maroon: #701C1C;
  --brand-cream: #F0EAD6;
  --brand-blue: #1e40af;
  --brand-gold: #f59e0b;
  --brand-purple: #7c3aed;
  
  /* Enhanced gradients */
  --gradient-primary: linear-gradient(135deg, var(--brand-navy), var(--brand-blue), var(--brand-purple));
  --gradient-secondary: linear-gradient(135deg, var(--brand-rose), var(--brand-gold));
  --gradient-accent: linear-gradient(135deg, var(--brand-maroon), var(--brand-navy));
}

[data-theme="default"] {
  --bg-primary: var(--brand-cream);
  --bg-secondary: #fff7ef;
  --bg-glass: rgba(240, 234, 214, 0.85);
  --text-primary: #0b1224;
  --text-secondary: #4b5563;
  --accent: var(--brand-rose);
  --accent-hover: #a66a6b;
  --border: rgba(0, 35, 102, 0.15);
  --shadow: 0 8px 24px rgba(0, 35, 102, 0.12);
  --container-bg: linear-gradient(135deg, var(--brand-cream), #ffffff);
  --button-bg: #ffffff;
  --button-hover: #f7f3e8;
  --display-bg: rgba(255, 255, 255, 0.96);
  --success: #0f766e;
  --error: var(--brand-maroon);
  --warning: #b45309;
  --info: var(--brand-navy);
}

[data-theme="dark"] {
  --bg-primary: #0b1224;
  --bg-secondary: #1e293b;
  --bg-glass: rgba(15, 23, 42, 0.95);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --border: rgba(148, 163, 184, 0.2);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --container-bg: linear-gradient(135deg, #1e293b, #0f172a);
  --button-bg: rgba(30, 41, 59, 0.8);
  --button-hover: rgba(51, 65, 85, 0.9);
  --display-bg: rgba(15, 23, 42, 0.98);
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #06b6d4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Inter, Arial; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 24px; }
a { color: inherit; }
.header { width: 100%; max-width: 1100px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.logo-icon { width: 34px; height: 34px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; border: 2px solid var(--accent); background: var(--bg-glass); }
.logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 8px 10px; background: var(--button-bg); color: var(--text-primary); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
/* removed slider knob for button-style toggle */
.container { width: 100%; max-width: 1100px; }
.card { background: var(--bg-glass); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); backdrop-filter: blur(10px); padding: 22px; margin: 10px 0; }
.hero h1 { font-size: 28px; margin: 0 0 8px; background: linear-gradient(90deg, var(--brand-navy), var(--brand-rose)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.muted { color: var(--text-secondary); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); text-decoration: none; }
.btn.primary { background: var(--accent); color: #fff; border: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
pre { white-space: pre-wrap; word-break: break-word; margin: 8px 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.footer { width: 100%; margin-top: auto; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 16px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.orb { position: fixed; width: 40vmax; height: 40vmax; border-radius: 50%; mix-blend-mode: screen; filter: blur(40px); opacity: .15; z-index: -1; }
.orb.one { top: -12vmax; left: -12vmax; background: radial-gradient(circle, var(--brand-navy), transparent 60%); }
.orb.two { bottom: -14vmax; right: -10vmax; background: radial-gradient(circle, var(--brand-rose), transparent 60%); }