/* 50 Plus Hub — Design Tokens, Reset & Fonts */

:root {
  --white: #FFFFFF;
  --bg: #FAFAF7;
  --text: #1A1A1A;
  --text-muted: #4A4A4A;
  --nav-bg: #1B2838;
  --scam-red: #C62828;
  --link: #1256A3;
  --border: #D5D5D5;
  --bg-light: #F2F1ED;
  --bg-warm: #F5F3EE;
  --max-w: 1200px;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;

  /* Category colors */
  --cat-family: #2E7D32;
  --cat-health: #C62828;
  --cat-retirement: #00838F;
  --cat-travel: #2E7D32;
  --cat-money: #1565C0;
  --cat-technology: #283593;
  --cat-hobbies: #E65100;
  --cat-nostalgia: #6A1B9A;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --white: #1E1E1E;
  --bg: #121212;
  --text: #E0E0E0;
  --text-muted: #A0A0A0;
  --nav-bg: #0D1117;
  --scam-red: #EF5350;
  --link: #5B9BD5;
  --border: #333333;
  --bg-light: #1A1A1A;
  --bg-warm: #1C1A17;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.4);
  --cat-family: #43A047;
  --cat-health: #EF5350;
  --cat-retirement: #26C6DA;
  --cat-travel: #43A047;
  --cat-money: #42A5F5;
  --cat-technology: #5C6BC0;
  --cat-hobbies: #FF7043;
  --cat-nostalgia: #AB47BC;
}

/* Dark mode overrides for hardcoded colors */
[data-theme="dark"] .key-takeaways {
  background: linear-gradient(135deg, #1a2332 0%, #1c2536 100%);
  border-color: #2a4a6b;
}
[data-theme="dark"] .pro-tip {
  background: #1a261a;
  border-left-color: #43A047;
}
[data-theme="dark"] .pro-tip strong { color: #66BB6A; }
[data-theme="dark"] .warning-box {
  background: #261a10;
  border-left-color: #FF7043;
}
[data-theme="dark"] .warning-box strong { color: #FF8A65; }
[data-theme="dark"] .faq-item .faq-q {
  background: var(--bg-light);
  color: var(--text);
}
[data-theme="dark"] .faq-item .faq-q:hover { background: #252525; }
[data-theme="dark"] .comparison-table tbody tr:nth-child(even) { background: #1A1A1A; }
[data-theme="dark"] .comparison-table tbody tr:hover { background: #1f2a3a; }
[data-theme="dark"] .tool-widget {
  background: linear-gradient(135deg, #1a2332 0%, #1c2030 100%);
  border-color: var(--link);
}
[data-theme="dark"] .tool-widget input,
[data-theme="dark"] .tool-widget select {
  background: #1E1E1E;
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] .newsletter {
  background: var(--nav-bg);
}
[data-theme="dark"] .newsletter input {
  background: #1E1E1E;
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] .promo-banner {
  background: #1A1A1A !important;
}
[data-theme="dark"] .feat-overlay {
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
}
[data-theme="dark"] .scam-banner {
  background: #2a1010;
}
[data-theme="dark"] .community-strip img { opacity: 0.85; }
[data-theme="dark"] .email-capture-form input {
  background: #1E1E1E;
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] .article-cta form input {
  background: #1E1E1E;
  color: var(--text);
  border-color: var(--border);
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  transition: background 0.2s, border-color 0.2s;
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* Base typography */
body {
  font-family: var(--font-sans);
  font-size: 19px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }

/* Font-size toggle classes */
body.fs-normal { font-size: 19px; }
body.fs-large  { font-size: 22px; }
body.fs-xl     { font-size: 26px; }

/* Legacy fallbacks */
body.fs-small  { font-size: 19px; }
body.fs-medium { font-size: 19px; }

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}
