/* fcc-light — site-specific Field Bulletin layer.
 *
 * Per-site accent: sunlight lemon yellow — the color of a quantum-dot
 * solar cell's peak emission and the bright lemon of a halogen lamp.
 * Distinct from morse signal-amber (#f5c43c) by being cleaner and more
 * lemon vs. morse's mustard.
 */

/* !important required because /shared/fcc-theme-boot.js writes --accent
   as inline-style on <html>, beating stylesheet specificity. */
:root, html[data-mode="dark"] {
  --accent:      #fde047 !important;
  --accent-2:    #fef08a !important;
  --accent-wash: color-mix(in srgb, #fde047 12%, transparent) !important;
  --accent-ink:  #0a0b0d !important;
}
html[data-mode="light"] {
  --accent:      #a16207 !important;
  --accent-2:    #b8770e !important;
  --accent-wash: color-mix(in srgb, #a16207 8%, transparent) !important;
  --accent-ink:  #ffffff !important;
}

/* ── Hero — Ray tracer ──────────────────────────────────────── */
.hero-card { padding: 1.75rem 1.5rem 1.5rem; }
.hero-lab { display: flex; flex-direction: column; gap: 0.85rem; }
.hero-canvas {
  width: 100%;
  height: 420px;
  display: block;
  background: var(--bg);
  border-top: 1px solid var(--border);
  cursor: crosshair;
}
.hero-controls {
  display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: end;
}
.hero-controls .control-group { flex: 0 0 auto; min-width: 180px; }

.component-palette {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
}
.component-btn {
  font: 500 0.74rem/1 var(--mono);
  letter-spacing: 0.04em;
  padding: 0.45rem 0.85rem;
  border-radius: var(--r-1);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-3, var(--dim));
  cursor: pointer;
  transition:
    color var(--dur-1) var(--ease-in-out),
    border-color var(--dur-1) var(--ease-in-out),
    background var(--dur-1) var(--ease-in-out);
}
.component-btn:hover { color: var(--ink-2, var(--text)); border-color: var(--rule-strong); }
.component-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-wash);
}

/* ── Snell's Law ────────────────────────────────────────────── */
.snell-layout { display: flex; flex-direction: column; gap: 0.85rem; }
.snell-controls {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.snell-canvas {
  width: 100%; height: 320px;
  display: block;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.snell-result {
  padding: 0.85rem 1rem;
  background: var(--panel-2);
  border-top: 1px solid var(--border);
  font: 500 0.95rem var(--mono);
  color: var(--accent);
  font-feature-settings: "tnum" 1, "zero" 1;
  letter-spacing: -0.01em;
}

/* ── EM Spectrum ────────────────────────────────────────────── */
.spectrum-layout { display: flex; flex-direction: column; gap: 0.85rem; }
.spectrum-bar {
  width: 100%;
  height: 80px;
  background: linear-gradient(
    90deg,
    #6c1f7a 0%,    /* gamma */
    #4f1e9c 8%,    /* X-ray */
    #5f4cc0 16%,   /* UV */
    #9b7cc9 22%,   /* near-UV */
    #5e9bbf 30%,   /* visible-violet */
    #5dade2 35%,   /* blue */
    #22d3ee 40%,   /* cyan */
    #34d399 45%,   /* green */
    #fde047 50%,   /* yellow */
    #fb923c 55%,   /* orange */
    #ef4444 60%,   /* red */
    #b91c1c 68%,   /* near-IR */
    #7c2d12 76%,   /* IR */
    #c2410c 86%,   /* microwave */
    #78350f 100%   /* radio */
  );
  cursor: pointer;
  border-top: 1px solid var(--border);
  position: relative;
}
.spectrum-info {
  padding: 0.85rem 1rem;
  background: var(--panel-2);
  border-top: 1px solid var(--border);
  font: 500 0.92rem var(--serif);
  color: var(--text);
  line-height: 1.55;
}
.spectrum-table {
  display: grid; gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.spectrum-row {
  padding: 0.65rem 0.85rem;
  background: var(--panel-2);
  border-top: 1px solid var(--border);
  cursor: pointer;
  display: flex; flex-direction: column; gap: 0.3rem;
  transition: border-top-color var(--dur-1) var(--ease-in-out);
}
.spectrum-row:hover, .spectrum-row.active {
  border-top-color: var(--accent);
}
.spectrum-row-name {
  font: 600 0.92rem var(--serif);
  color: var(--text);
}
.spectrum-row-range {
  font: 500 0.78rem var(--mono);
  color: var(--accent);
  font-feature-settings: "tnum" 1, "zero" 1;
}
.spectrum-row-use {
  font: 500 0.7rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3, var(--dim));
}

/* ── Inverse Square Law ─────────────────────────────────────── */
.inverse-layout { display: flex; flex-direction: column; gap: 0.85rem; }
.inverse-controls {
  display: grid; gap: 0.75rem;
  grid-template-columns: 1fr;
}
.inverse-visual {
  width: 100%; height: 220px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.inverse-examples {
  display: grid; gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.inverse-example {
  padding: 0.7rem 0.9rem;
  background: var(--panel-2);
  border-top: 1px solid var(--border);
}
.inverse-example-label {
  display: block;
  font: 500 0.66rem/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3, var(--dim));
  margin-bottom: 0.35rem;
}
.inverse-example-value {
  display: block;
  font: 500 0.95rem var(--mono);
  color: var(--accent);
  font-feature-settings: "tnum" 1, "zero" 1;
}

@media (max-width: 720px) {
  .hero-canvas { height: 320px; }
  .snell-canvas { height: 240px; }
  .spectrum-bar { height: 60px; }
}
@media (max-width: 480px) {
  .hero-canvas { height: 260px; }
}
