/* Scoped to #temp-chart-app, following food_map.css: bordered card, header, control panel, chart, legend/readout row */
body { background: #ffffff; } /* standalone page only; not needed when embedded */

#temp-chart-app {
  --tc-bg: #ffffff;
  --tc-panel: #f6f9fc;
  --tc-border: #c9dcee;
  --tc-text: #000000;
  --tc-text-faint: #5b7fa6;
  --tc-deep: #0466C8;
  --tc-grid: #e3edf7;
  --tc-hist: rgba(91, 110, 135, .26);
  --tc-y1: #e9b800;
  --tc-y2: #ec6200;
  --tc-y3: #c4122f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--tc-text);
  background: var(--tc-bg);
  border: 1px solid var(--tc-border);
  border-radius: 8px;
  padding: 24px;
  margin: 16px auto 32px;
  max-width: 1100px;
  color-scheme: light;
}
#temp-chart-app * { box-sizing: border-box; }

#temp-chart-app .tc-header {
  border-bottom: 2px solid var(--tc-border);
  padding-bottom: 16px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}
#temp-chart-app .tc-header h2 { margin: 0; font-size: 20px; font-weight: 700; color: #000000; }
#temp-chart-app .tc-header p { margin: 4px 0 0; font-size: 13px; color: var(--tc-text-faint); max-width: 560px; line-height: 1.5; }
#temp-chart-app .tc-source-tag { font-size: 11px; color: var(--tc-text-faint); }

#temp-chart-app .tc-controls {
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  background: var(--tc-panel); border: 1.5px solid var(--tc-border); border-radius: 6px;
  padding: 12px 16px; margin-bottom: 16px; font-size: 13px;
}
#temp-chart-app .tc-controls > label { font-weight: 600; margin-right: -10px; }
#temp-chart-app select {
  padding: 6px 10px; border-radius: 6px; border: 1.5px solid var(--tc-deep);
  background: #ffffff; color: var(--tc-text); font-size: 13px; font-family: inherit;
}
#temp-chart-app select:focus-visible { outline: 2px solid var(--tc-deep); outline-offset: 2px; }
#temp-chart-app .tc-record {
  font-size: 12px; color: var(--tc-text-faint); line-height: 1.4; font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--tc-border); padding-left: 16px;
}

#temp-chart-app canvas {
  display: block; width: 100%; aspect-ratio: 2 / 1; min-height: 300px; max-height: 520px; touch-action: pan-y;
  border: 1.5px solid var(--tc-border); border-radius: 6px; background: #ffffff;
}

#temp-chart-app .tc-legend {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: flex-start; min-height: 3em;
  margin-top: 10px; font-size: 12px; font-variant-numeric: tabular-nums;
}
#temp-chart-app .tc-legend span { display: flex; align-items: center; gap: 6px; }
#temp-chart-app .tc-legend [hidden] { display: none; }
#temp-chart-app .tc-legend b { min-width: 4.5em; color: var(--tc-deep); }
#temp-chart-app .tc-val { font-weight: 700; }
#temp-chart-app .tc-sw { width: 18px; height: 3px; border-radius: 2px; flex: none; }
#temp-chart-app .tc-sw.tc-hist { background: var(--tc-hist); }
#temp-chart-app .tc-sw.tc-y1 { background: var(--tc-y1); opacity: .6; }
#temp-chart-app .tc-sw.tc-y2 { background: var(--tc-y2); opacity: .6; }
#temp-chart-app .tc-sw.tc-y3 { background: var(--tc-y3); height: 4px; }
#temp-chart-app .tc-sw.tc-mean { background: var(--tc-text); }
#temp-chart-app .tc-sw.tc-pick { background: var(--tc-deep); }

@media (max-width: 760px) {
  #temp-chart-app { padding: 16px; }
  #temp-chart-app .tc-record { border-left: none; padding-left: 0; }
}
