  /* Nothing moves on load (Settle): out of sight while settling, laid out all the same; then in together */
  html.settling #page { visibility: hidden; }
  html.settled #page { animation: settle-in .18s ease-out; }
  @keyframes settle-in { from { opacity: 0; } }
  @media (prefers-reduced-motion: reduce) { html.settled #page { animation: none; } }

  :root {
    --trend-news: #946c00; --trend-news-line: #946c00; --trend-pod: #946c00; --trend-pod-line: #946c00;   /* AI trends: news and podcasts gold */
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-alt: #eef1f7;
    --border: #dbe1ec;
    --border-strong: #c3cbdc;
    --text: #16202e;
    --text-muted: #5b6779;
    --text-faint: #8b96a8;
    --accent: #1f9c7e;
    --accent-strong: #167a63;
    --accent-soft: #dcf5ee;
    --accent-text-on: #ffffff;
    --error: #c2412d;
    --error-soft: #fbe9e5;
    --danger-soft-ink: #cf5a43; --danger-soft-bg: #fdf4f1;   /* Delete all my data: a lighter red */
    --danger-deep-ink: #9b2615; --danger-deep-bg: #f6d8cf;   /* Delete my account: a darker red */
    --notice-bg: #fdf2dc;
    --notice-border: #f0d9a6;
    --notice-text: #7a4f00;
    --logo-yellow: #FFE600;          /* the logo's donut */
    --yellow-bg: #fff7b3;
    --yellow-bg-strong: #ffef70;
    --yellow-border: #e6cf00;
    --ui-blue: #3b5bab;          /* "click here" */
    --ui-arrow: #5f86e0;         /* open/close arrows: a lighter blue */
    --tabs-bg: #dfe6f4;          /* the input tabs, a shade apart from the upload area */
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {   /* Auto on a dark device (not when Light is chosen) */
    :root:not([data-theme="light"]) {
      --trend-news: #e8c55a; --trend-news-line: #e8c55a; --trend-pod: #e8c55a; --trend-pod-line: #e8c55a;
      --bg: #0e1320;
      --surface: #161d2e;
      --surface-alt: #1c2438;
      --border: #2a3350;
      --border-strong: #3a4568;
      --text: #e8ecf4;
      --text-muted: #93a0ba;
      --text-faint: #66718c;
      --accent: #7fe0c4;
      --accent-strong: #59c9a9;
      --accent-soft: #17352d;
      --accent-text-on: #06140f;
      --error: #f08b78;
      --error-soft: #3a1d18;
      --danger-soft-ink: #f2a596; --danger-soft-bg: #2c1a17;
      --danger-deep-ink: #ff6a52; --danger-deep-bg: #4d1d15;
      --notice-bg: #2e240e;
      --notice-border: #5a4718;
      --notice-text: #f3c56b;
      --yellow-bg: #332f0a;
      --yellow-bg-strong: #4a430c;
      --yellow-border: #8a7a00;
      --ui-blue: #9db8f2;
      --ui-arrow: #9db8f2;
      --tabs-bg: #232e4a;
      color-scheme: dark;
    }
  }
  /* Dark, chosen with the theme switch */
  :root[data-theme="dark"] {
    --trend-news: #e8c55a; --trend-news-line: #e8c55a; --trend-pod: #e8c55a; --trend-pod-line: #e8c55a;
      --bg: #0e1320;
      --surface: #161d2e;
      --surface-alt: #1c2438;
      --border: #2a3350;
      --border-strong: #3a4568;
      --text: #e8ecf4;
      --text-muted: #93a0ba;
      --text-faint: #66718c;
      --accent: #7fe0c4;
      --accent-strong: #59c9a9;
      --accent-soft: #17352d;
      --accent-text-on: #06140f;
      --error: #f08b78;
      --error-soft: #3a1d18;
      --danger-soft-ink: #f2a596; --danger-soft-bg: #2c1a17;
      --danger-deep-ink: #ff6a52; --danger-deep-bg: #4d1d15;
      --notice-bg: #2e240e;
      --notice-border: #5a4718;
      --notice-text: #f3c56b;
      --yellow-bg: #332f0a;
      --yellow-bg-strong: #4a430c;
      --yellow-border: #8a7a00;
      --ui-blue: #9db8f2;
      --ui-arrow: #9db8f2;
      --tabs-bg: #232e4a;
      color-scheme: dark;
    }

  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  }
  h1, h2 { font-family: "Sora", system-ui, sans-serif; margin: 0; }
  .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
  button, input, select, textarea { font-family: inherit; }
  [hidden] { display: none !important; }

