/*
 * GARS solar-terrestrial panel  (markup generated by js/solar-panel.js)
 * Container: <div id="gars-solar" class="gsp"></div>
 * All classes are prefixed gsp- and override the global table/link rules
 * in gars-typography.css.
 */
.gsp {
  --gsp-ink: #DCE6F5;
  --gsp-muted: #8C9AB3;
  --gsp-panel-1: #1A2232;
  --gsp-panel-2: #0C111A;
  --gsp-line: rgba(255, 255, 255, .08);
  --gsp-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 8px auto 24px;
  box-sizing: border-box;
  border-radius: 16px;
  overflow: hidden;
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--gsp-ink);
  text-align: left;
  background:
    radial-gradient(120% 70% at 18% 0%, rgba(74, 130, 232, .16), transparent 60%),
    radial-gradient(80% 60% at 100% 100%, rgba(26, 63, 168, .18), transparent 70%),
    linear-gradient(180deg, var(--gsp-panel-1), var(--gsp-panel-2));
  border: 1px solid #0A0E15;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 2px 4px rgba(26, 63, 168, .10),
    0 12px 28px rgba(16, 32, 80, .22),
    0 28px 60px rgba(16, 32, 80, .18);
}
/* Compact variant (home page): everything at 80% */
.gsp.gsp--compact { zoom: .8; margin: 12px auto; }

/* fine grain for depth */
.gsp::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.gsp *, .gsp *::before, .gsp *::after { box-sizing: border-box; }

/* ── Header strip: GARS royal glass ─────────────────────────────────── */
.gsp-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 12px 8px 20px;
  background: linear-gradient(160deg, #4A82E8 0%, #2A58C8 45%, #1A3FA8 100%);
  border-bottom: 1px solid #0E2A78;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 12px rgba(5, 12, 30, .35);
}
.gsp-head::before { /* specular highlight */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 52%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.gsp-title { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; }
.gsp .gsp-title h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 1px 2px rgba(5, 15, 50, .45);
}
.gsp-when {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
}
.gsp-date { font-size: 14px; font-weight: 600; letter-spacing: .01em; }
.gsp-credit { font-size: 11.5px; color: #CFE1FF; }
.gsp-credit a, .gsp-credit a:visited {
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
  display: inline-block;
  transition: opacity .2s ease, transform .3s var(--gsp-spring);
}
.gsp-credit a:hover { text-decoration: underline; transform: translateY(-1px); }
.gsp-credit a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(125, 200, 240, .6); }
.gsp-credit a:active { transform: translateY(0); opacity: .8; }

/* Storm status chip: a recessed black window with a lamp */
.gsp-storm {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  padding: 6px 14px 6px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #05080D, #121925);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .25);
  line-height: 1.2;
}
.gsp-storm strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tone);
  text-shadow: 0 0 8px var(--tone-glow);
}
.gsp-storm small { display: block; font-size: 12px; color: var(--gsp-muted); }
.gsp-lamp {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--tone) 45%, rgba(0, 0, 0, .55) 100%);
  box-shadow: 0 0 10px 2px var(--tone-glow), inset 0 -2px 3px rgba(0, 0, 0, .4);
}
.gsp-tone-green  { --tone: #3DF27E; --tone-glow: rgba(61, 242, 126, .55); }
.gsp-tone-yellow { --tone: #FFE04A; --tone-glow: rgba(255, 224, 74, .55); }
.gsp-tone-amber  { --tone: #FFAA2B; --tone-glow: rgba(255, 170, 43, .6); }
.gsp-tone-red    { --tone: #FF4B3A; --tone-glow: rgba(255, 75, 58, .65); }
.gsp-tone-amber .gsp-lamp, .gsp-tone-red .gsp-lamp { animation: gsp-pulse 1.6s ease-in-out infinite; }

/* ── Body ───────────────────────────────────────────────────────────── */
.gsp-body {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  padding: 14px 20px 14px;
}
.gsp-gauges { display: flex; align-items: center; gap: 12px; }
.gsp-k { width: 184px; flex: none; }
.gsp-small {
  display: grid;
  grid-template-columns: repeat(2, 90px);
  gap: 4px 8px;
}
.gsp-gauge {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)) drop-shadow(0 2px 2px rgba(0, 0, 0, .5));
}
.gsp-gauge-label, .gsp-ledword {
  font-family: 'Source Sans 3', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
}
.gsp-ledword { letter-spacing: .04em; }

/* Recessed LCD-style screens for the band tables */
.gsp-screen {
  position: relative;
  padding: 10px 16px 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, #04070B 0%, #0B1119 100%);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, .8),
    inset 0 0 0 1px rgba(0, 0, 0, .6),
    0 1px 0 rgba(255, 255, 255, .07);
  overflow: hidden;
}
.gsp-screen::after { /* glass gloss */
  content: "";
  position: absolute;
  left: -10%; right: -10%; top: 0;
  height: 46%;
  border-radius: 0 0 50% 50% / 0 0 30% 30%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.gsp-screen-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7DC8F0;
  padding-bottom: 4px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--gsp-line);
}

/* reset gars-typography table rules */
.gsp table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; background: none; }
.gsp table tr,
.gsp table tr:nth-child(odd),
.gsp table tr:nth-child(even),
.gsp table tr:hover { background: none; }
.gsp table th, .gsp table td { padding: 3px 0; border: none; vertical-align: middle; color: var(--gsp-ink); }
.gsp thead th {
  padding: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gsp-muted);
  text-align: left;
}
.gsp tbody th {
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  padding-right: 12px;
  line-height: 1.15;
}
.gsp tbody th small { font-size: 12px; font-weight: 400; color: var(--gsp-muted); }
.gsp tbody tr + tr th, .gsp tbody tr + tr td { border-top: 1px solid rgba(255, 255, 255, .04); }
.gsp td { white-space: nowrap; }

/* mini LED bar graph */
.gsp-bar { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 8px; }
.gsp-hf td .gsp-bar { margin-right: 0; }
.gsp-hf .gsp-bar i { width: 11px; }
.gsp-bar i {
  display: block;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  font-style: normal;
  background: var(--c);
  opacity: .1;
}
.gsp-bar i.on {
  opacity: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55) 0 18%, var(--c) 45%);
  box-shadow: 0 0 6px var(--c);
  animation: gsp-on .5s ease-out both;
}
.gsp-cond {
  display: inline-block;
  min-width: 44px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c);
  vertical-align: middle;
}
.gsp-cond.is-off { color: #5B677C; }

/* HF colour legend */
.gsp-legend { display: flex; gap: 16px; padding-top: 6px; margin-top: 2px; border-top: 1px solid var(--gsp-line); }
.gsp-legend span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gsp-muted);
}
.gsp-legend span::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); box-shadow: 0 0 5px var(--c);
}

/* ── Sample-data badge ─────────────────────────────────────────────── */
.gsp-sample {
  padding: 2px 8px;
  border-radius: 50px;
  background: rgba(5, 10, 25, .45);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #FFAA2B;
}

/* ── Motion ─────────────────────────────────────────────────────────── */
.gsp-seg { animation: gsp-on .45s ease-out both; }
@keyframes gsp-on { from { opacity: 0; } to { opacity: 1; } }
@keyframes gsp-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .gsp-seg, .gsp-bar i.on, .gsp-lamp { animation: none !important; }
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .gsp-body { grid-template-columns: 1fr 1fr; }
  .gsp-gauges { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 760px) {
  .gsp-head { flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; }
  .gsp-when { align-items: flex-start; order: 3; white-space: normal; }
  .gsp-storm { order: 2; flex: 1 1 100%; }
  .gsp-title { flex: 1 1 100%; }
  .gsp-body { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .gsp-gauges { flex-wrap: wrap; justify-content: center; }
  .gsp-k { width: 200px; }
  .gsp-small { grid-template-columns: repeat(2, 120px); gap: 12px 16px; }
}
@media (max-width: 400px) {
  .gsp-small { grid-template-columns: repeat(2, 112px); }
}
