/* X10 light theme — operator addition.
   Consolidates the light palette into one source of truth.

   Before this file, three stylesheets each declared their own body.light block
   with conflicting values: platform.css used teal #047f70, product.css used
   indigo #4856c8, claude-design.css used #007f70. Whichever loaded last won for
   any given token, so accent colour and sidebar tone shifted between views.
   This file loads last and states the palette once.

   Dark values are kept in :root so the existing dark/light toggle still works. */

:root {
  --bg: #080c14;
  --panel: #0d1117;
  --panel2: #151c28;
  --panel3: #1a2332;
  --line: #212d3f;
  --text: #e6eaf2;
  --muted: #8b95a8;
  --accent: #00c9a7;
  --accent-dim: rgba(0, 201, 167, 0.15);
  --positive: #00d68f;
  --negative: #ff6b6b;
  --flat: #f0c040;
  --sidebar: #0c1422;
  --shadow: 0 12px 35px #0002;
  --accent-ink: #061d1a;
}

/* Light: near-white ground, white panels, hairline grey rules, deep blue-black
   text, teal accent. */
body.light {
  color-scheme: light;

  --bg: #f7f9fb;
  --panel: #ffffff;
  --panel2: #f4f7fa;
  --panel3: #eaf0f5;
  --line: #e2e8f0;
  --sidebar: #ffffff;

  --text: #10243a;
  --muted: #5a6b80;

  --accent: #00806c;
  --accent-dim: rgba(0, 128, 108, 0.1);
  --accent-ink: #ffffff;

  --positive: #0b7a56;
  --negative: #c0392f;
  --flat: #a16207;

  --shadow: 0 1px 2px rgba(16, 36, 58, 0.04);
}

/* Hairline rules: the dark theme leaned on contrast between near-black panels,
   which disappears on white. Borders carry the separation instead. */
body.light .panel,
body.light .metric {
  border-color: var(--line);
}

body.light th {
  background: var(--panel2);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

body.light td {
  border-bottom-color: var(--line);
}

/* Filled buttons: rules like `.search button { color: var(--panel) }` assumed
   --panel was near-black, so on light they rendered white-on-teal. Give filled
   buttons white ink and leave every other button on normal text colour. */
body.light .search button,
body.light .primary-button,
body.light #search,
body.light #compare-open,
body.light #ask-ai {
  color: #ffffff;
}

/* Tiles are white surfaces, not filled buttons: keep text dark. */
body.light .index-tile,
body.light .mover-row {
  color: var(--text);
}

body.light button.subtle,
body.light .top-actions button {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}

body.light button.subtle:hover,
body.light .top-actions button:hover {
  background: var(--panel2);
}

/* Inputs sit on the tinted ground, not on white, so their edge reads as a field. */
body.light input,
body.light select,
body.light textarea {
  background: var(--panel);
  border-color: #d3dce6;
}

body.light input::placeholder,
body.light textarea::placeholder {
  color: #93a1b3;
}

/* Chips were hardcoded to the dark accent rgba(#57e4c4). Re-derive from token. */
body.light .chip,
body.light .pill {
  color: var(--accent);
  border-color: rgba(0, 128, 108, 0.28);
  background: rgba(0, 128, 108, 0.07);
}

body.light #badge {
  background: rgba(0, 128, 108, 0.12);
  color: var(--accent);
}

body.light .notice {
  color: #7a4c07;
  background: #fdf6e6;
  border-color: #e8d3a2;
}

body.light .alert {
  background: var(--panel2);
}

body.light .alert.warning {
  border-color: #c08a2e;
}

body.light .flat {
  color: #a16207;
}

body.light .empty {
  color: #6c7d92;
}

body.light nav a.active {
  background: rgba(0, 128, 108, 0.09);
  color: var(--accent);
  box-shadow: inset 3px 0 var(--accent);
}

body.light .bar-track {
  background: var(--panel3);
}

body.light .breadth {
  background: var(--panel3);
}

body.light .mark {
  color: #ffffff;
}

body.light pre {
  background: var(--panel2);
  border-color: var(--line);
}

body.light .source {
  border-left-color: var(--accent);
}

/* The dark theme used a translucent black scrim; on light, a soft slate scrim
   keeps the dialog readable without going muddy. */
body.light dialog::backdrop {
  background: rgba(16, 36, 58, 0.28);
}

body.light .compare-tray {
  background: var(--panel);
  border-color: var(--line);
}

@media (max-width: 760px) {
  body.light nav a.active {
    box-shadow: inset 0 -2px var(--accent);
  }
}
