/* Illumid — dark ("candlelight") colors. Applied when <html> has .theme-dark (see /theme.js).
   Most of each page follows the shared color tokens; the rest are the light-only touches below. */

html.theme-dark {
  --parchment: #24140A;
  --vellum: #2B1A0D;
  --candlelight: rgba(221,174,98,.22);
  --ochre: #DDAE62;
  --ember: #DDAE62;
  --ash: #CDB894;
  --sienna: #E3CFAB;
  --dusk: #F3E7CF;
  --smoke: #EADBC0;
  --line: rgba(221,174,98,.18);
  --dk-field: rgba(255,240,210,.06);
  --dk-field-focus: rgba(255,240,210,.1);
  --dk-card: rgba(255,240,210,.05);
  --dk-card-hover: rgba(255,240,210,.09);
  --dk-border: rgba(221,174,98,.3);
  background: #170B02;
}

/* Background: a warm glow at the top, deepening to near-black */
html.theme-dark body {
  background: #170B02 !important;
  background-image: radial-gradient(ellipse at 50% 0%, #3A2410 0%, #24140A 45%, #170B02 100%) !important;
  background-attachment: fixed !important;
  color: var(--dusk);
}
html.theme-dark body::before { opacity: .035; }

/* Fields */
html.theme-dark textarea,
html.theme-dark .profile-input,
html.theme-dark .auth-input,
html.theme-dark .otp-input,
html.theme-dark .reflect-editor textarea,
html.theme-dark .refl textarea,
html.theme-dark .email-step input,
html.theme-dark #restore-email,
html.theme-dark #save-email {
  background: var(--dk-field) !important;
  border-color: var(--dk-border) !important;
  color: var(--dusk) !important;
}
html.theme-dark textarea:focus,
html.theme-dark .profile-input:focus,
html.theme-dark .auth-input:focus,
html.theme-dark .reflect-editor textarea:focus { background: var(--dk-field-focus) !important; border-color: var(--ember) !important; }
html.theme-dark ::placeholder { color: rgba(205,184,148,.7); }

/* Gold buttons get dark text */
html.theme-dark .reflect-save,
html.theme-dark .save-btn,
html.theme-dark .cta { color: #1C0E00 !important; }
html.theme-dark .seg button[aria-pressed="true"] { color: #1C0E00; }

/* Cards and panels */
html.theme-dark .card,
html.theme-dark .pane,
html.theme-dark .price-card,
html.theme-dark .welcome { background: var(--dk-card) !important; border-color: var(--dk-border) !important; }
html.theme-dark .card:hover { background: var(--dk-card-hover) !important; }
html.theme-dark .avatar { background: #3A2410; }
html.theme-dark .plan.selected { background: rgba(221,174,98,.14); }
html.theme-dark .chip:hover, html.theme-dark .chip.on { color: var(--dusk); }

/* Week dots, errors */
html.theme-dark .dot { border-color: rgba(221,174,98,.4); }
html.theme-dark .day.today .dot { box-shadow: 0 0 0 3px rgba(221,174,98,.3), 0 0 14px rgba(240,160,64,.45); }
html.theme-dark .err, html.theme-dark .otp-msg { color: #EFA27E !important; }

/* Aa button */
html.theme-dark .aa-toggle { background: rgba(255,240,210,.06); border-color: rgba(221,174,98,.35); color: #CDB894; }
html.theme-dark .aa-toggle[aria-pressed="true"] { background: #DDAE62; border-color: #DDAE62; color: #1C0E00; }
