/* ═══════════════════════════════════════════════════
   MINT Lab — Light Theme Overrides
   Loaded on every page after the base stylesheet.
   Dark remains the default; light activates via
   html[data-theme="light"], set by /assets/theme.js.
   ═══════════════════════════════════════════════════ */

html[data-theme="light"] {
  color-scheme: light;

  /* Surfaces — warm off-white paper */
  --bg-0: #ece8dc;
  --bg-1: #f6f3ea;
  --bg-2: #efebe0;
  --bg-3: #e6e1d3;
  --bg-4: #ddd7c7;

  /* Accent — darkened mint for contrast on off-white */
  --accent: #0d7c73;
  --accent-soft: rgba(13, 124, 115, 0.10);
  --accent-dim: rgba(13, 124, 115, 0.55);
  --accent-bright: #0f948a;

  /* Semantic hues — darkened for legibility on light ground */
  --amber: #b45309;
  --red: #bb2d3b;
  --cyan: #0e7490;
  --green: #4d7c0f;
  --purple: #7e22ce;
  --pink: #be185d;
  --yellow: #a16207;
  --blue: #2563eb;
  --mint: #0d7c73;
  --indigo: #4f46e5;
  --teal: #0f766e;

  /* Text */
  --text-1: #3b4048;
  --text-2: #6a7180;
  --text-3: #8d93a0;
  --text-bright: #16181d;

  /* Lines */
  --border: rgba(0, 0, 0, 0.14);
  --border-hover: rgba(13, 124, 115, 0.5);
}

/* Bleed behind safe areas (Dynamic Island / home indicator) */
html[data-theme="light"] {
  background: #e5e1d2;
}

/* Softer scanlines on paper */
html[data-theme="light"] body::after {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.015) 2px,
    rgba(0, 0, 0, 0.015) 4px
  );
}

/* White-alpha hairlines from the dark theme vanish on paper —
   restate them as black-alpha */
html[data-theme="light"] .ref-table th + th { border-left-color: rgba(0, 0, 0, 0.08); }

/* ===== Theme toggle button ===== */
.theme-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-2);
  cursor: pointer;
  font-family: var(--font, monospace);
  font-size: 10px;
  letter-spacing: 0.5px;
  line-height: 1;
  padding: 3px 8px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--border-hover);
}
.theme-toggle .theme-toggle-icon { margin-right: 4px; }

/* Placement inside the statusline */
.statusline .theme-toggle {
  margin-left: 10px;
}

/* Fallback fixed placement for pages without a statusline */
.theme-toggle--floating {
  position: fixed;
  right: 14px;
  bottom: 52px; /* clear page-specific bottom bars (e.g. lab-overview slide nav) */
  z-index: 10000;
  background: var(--bg-2, #1a1a1a);
  padding: 6px 10px;
  font-size: 11px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
