/*
  theme-ember-light.css — warm paper background with deep midnight ink
  and a deepened ember accent (brightened orange fails AA on light
  paper, so this variant darkens it slightly rather than reusing the
  native hex verbatim).

  Scoped under `body[data-theme="ember"].theme-light` (compound
  selector, beats theme-ember.css's single-attribute rules on
  specificity). Toggled at runtime by js/color_scheme.js. Radius/font
  stay the same as the native file — only surfaces/text/accent flip.
*/

body[data-theme="ember"].theme-light {
  --accent:      #ae431f;
  --accent-dark: #8b3619;
  --accent-soft: #ffb088;
  --success:     #15803d;
  --danger:      #b91c1c;
  --warning:     #92400e;

  --gradient-brand: linear-gradient(135deg, #ae431f 0%, #8b3619 100%);

  --bg:        #f7f2ea;
  --bg-alt:    #f0eadd;
  --bg-card:   #fbf8f2;
  --bg-card2:  #f3ede1;
  --surface:   rgba(18,22,29,.045);
  --surface-hover: rgba(18,22,29,.08);
  --border:    rgba(18,22,29,.14);
  --border-strong: rgba(18,22,29,.28);

  --text:      #12161d;
  --text-muted: rgba(18,22,29,.62);
  --text-dim:  rgba(18,22,29,.42);

  --shadow: 0 10px 30px rgba(18,22,29,.1), 0 2px 10px rgba(18,22,29,.05);
}

/* ---- Header / hero-stats glass — light, not dark ---- */
body[data-theme="ember"].theme-light header {
  background: rgba(247,242,234,.85);
}
body[data-theme="ember"].theme-light .hero-stats-panel {
  background: rgba(251,248,242,.7);
}

/* ---- Primary button ---- */
body[data-theme="ember"].theme-light .btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(174,67,31,.32);
}
body[data-theme="ember"].theme-light .btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 6px 20px rgba(174,67,31,.42);
}
body[data-theme="ember"].theme-light .option-btn:hover:not(:disabled) .option-letter,
body[data-theme="ember"].theme-light .subtab.active,
body[data-theme="ember"].theme-light .level-tab.active {
  color: #fff;
}

/* ---- Hero: light wash, ink-tinted grain, no glow on the mono tag ---- */
body[data-theme="ember"].theme-light .hero-canvas-wrap {
  background:
    radial-gradient(900px 500px at 78% 20%, rgba(174,67,31,.12), transparent 60%),
    radial-gradient(700px 420px at 10% 100%, rgba(174,67,31,.07), transparent 55%),
    var(--bg);
}
body[data-theme="ember"].theme-light .hero-grain {
  background-image:
    linear-gradient(rgba(18,22,29,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,22,29,.045) 1px, transparent 1px);
}
body[data-theme="ember"].theme-light .hero-heading em {
  text-shadow: none;
}

/* ---- Badges/chips/progress bars/toast — ink-tinted ---- */
body[data-theme="ember"].theme-light .topic-progress-bar,
body[data-theme="ember"].theme-light .quiz-progress-bar,
body[data-theme="ember"].theme-light .mini-bar-track {
  background: rgba(18,22,29,.09);
}
body[data-theme="ember"].theme-light .score-circle-bg {
  stroke: rgba(18,22,29,.1);
}
body[data-theme="ember"].theme-light .topic-progress-table th {
  background: rgba(18,22,29,.035);
}
body[data-theme="ember"].theme-light .topic-progress-table tr:hover td {
  background: rgba(18,22,29,.04);
}
body[data-theme="ember"].theme-light .answer-chip {
  background: rgba(18,22,29,.06);
}
body[data-theme="ember"].theme-light .answer-chip-remove {
  background: rgba(18,22,29,.12);
}
body[data-theme="ember"].theme-light .format-help-panel code {
  background: rgba(18,22,29,.08);
}
body[data-theme="ember"].theme-light .topic-chip {
  background: rgba(18,22,29,.07);
}
body[data-theme="ember"].theme-light .ai-points {
  border-top-color: rgba(18,22,29,.12);
}
body[data-theme="ember"].theme-light .toast {
  background: rgba(255,255,255,.95);
  color: var(--text);
  border-color: rgba(18,22,29,.12);
}

/* ---- Accent-tinted glows/focus-rings ---- */
body[data-theme="ember"].theme-light .marks-badge,
body[data-theme="ember"].theme-light .option-btn:hover:not(:disabled),
body[data-theme="ember"].theme-light .setup-option:hover,
body[data-theme="ember"].theme-light .setup-option.selected,
body[data-theme="ember"].theme-light .symbol-btn:hover,
body[data-theme="ember"].theme-light .explanation-box.feedback-reveal {
  background: rgba(174,67,31,.1);
}
body[data-theme="ember"].theme-light .quiz-timer {
  border-color: rgba(174,67,31,.28);
}
body[data-theme="ember"].theme-light .explanation-box {
  background: rgba(174,67,31,.06);
  border-color: rgba(174,67,31,.28);
}
body[data-theme="ember"].theme-light .explanation-box.feedback-reveal {
  border-color: rgba(174,67,31,.38);
}
body[data-theme="ember"].theme-light .answer-input:focus {
  box-shadow: 0 0 0 3px rgba(174,67,31,.16);
}
body[data-theme="ember"].theme-light .quiz-progress-fill {
  box-shadow: none;
}

/* ---- Difficulty badges — light-appropriate generic pair ---- */
body[data-theme="ember"].theme-light .diff-easy   { background: rgba(22,163,74,.12); color: #15803d; }
body[data-theme="ember"].theme-light .diff-medium { background: rgba(180,83,9,.14); color: #92400e; }
body[data-theme="ember"].theme-light .diff-hard   { background: rgba(220,38,38,.12); color: #b91c1c; }
