/* TGCC Grid History. Everything is scoped to .tgcc-gh-wrap so nothing can
   clash with the live tgcc-grid dashboard (#tgcc-grid / .tg-*). */
.tgcc-gh-wrap {
  --tgh-bg: #0b0814;
  --tgh-panel: #150e1f;
  --tgh-panel2: #1d1430;
  --tgh-line: rgba(255,255,255,.09);
  --tgh-line2: rgba(255,255,255,.14);
  --tgh-txt: #f3f1f6;
  --tgh-mut: #b3aac4;
  --tgh-lead: #ddd6e8;
  --tgh-purple: #8e43f0;
  --tgh-lilac: #c79bff;
  --tgh-cyan: #00ccff;
  --tgh-coral: #ff6b61;
  --tgh-sky: #5ec8ff;
  --tgh-gold: #ffb020;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  background: var(--tgh-bg);
  border-top: 1px solid var(--tgh-line);
  border-bottom: 1px solid var(--tgh-line);
  padding: 8px 0 20px;
  overflow: hidden;
}
.tgcc-gh-wrap, .tgcc-gh-wrap * { box-sizing: border-box; }

.tgcc-gh-wrap .tgcc-gh {
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  color: var(--tgh-txt);
  width: 100%;
  max-width: 1360px;
  min-width: 0;
  margin: 0 auto;
  padding: 16px 16px 8px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
}
@media (min-width: 960px) {
  .tgcc-gh-wrap .tgcc-gh { padding: 16px 24px 8px; }
}

.tgcc-gh-wrap .tgh-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.tgcc-gh-wrap .tgh-kicker {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tgh-lilac);
  font-weight: 700;
  margin: 0 0 4px;
}
.tgcc-gh-wrap h2.tgh-title {
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  font-weight: 800;
  letter-spacing: .2px;
  margin: 0;
  color: var(--tgh-txt);
  line-height: 1.15;
  text-transform: none;
}

/* Range switcher */
.tgcc-gh-wrap .tgh-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--tgh-panel);
  border: 1px solid var(--tgh-line2);
  border-radius: 999px;
}
.tgcc-gh-wrap .tgh-btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  min-width: 52px;
  padding: 9px 14px;
  margin: 0;
  color: var(--tgh-mut);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: none;
  text-transform: none;
  transition: background-color .2s ease, color .2s ease;
}
.tgcc-gh-wrap .tgh-btn:hover { color: var(--tgh-txt); background: rgba(255,255,255,.05); }
.tgcc-gh-wrap .tgh-btn:focus { outline: none; }
.tgcc-gh-wrap .tgh-btn:focus-visible { outline: 2px solid var(--tgh-cyan); outline-offset: 2px; }
.tgcc-gh-wrap .tgh-btn.is-on {
  color: #fff;
  background: var(--tgh-purple);
  box-shadow: 0 0 0 1px rgba(199,155,255,.35) inset, 0 6px 18px rgba(142,67,240,.35);
}

/* Panels */
.tgcc-gh-wrap .tgh-panel {
  background: var(--tgh-panel);
  border: 1px solid var(--tgh-line);
  border-radius: 18px;
  padding: 16px 18px 18px;
  margin-bottom: 16px;
  min-width: 0;
}
.tgcc-gh-wrap .tgh-h3 {
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tgh-lilac);
  font-weight: 700;
  line-height: 1.4;
}
.tgcc-gh-wrap .tgh-caption {
  margin: -6px 0 10px;
  color: var(--tgh-mut);
  font-size: 12px;
}

/* Chart */
.tgcc-gh-wrap .tgh-chart { position: relative; width: 100%; min-height: 240px; touch-action: pan-y; }
.tgcc-gh-wrap .tgh-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.tgcc-gh-wrap .tgh-axis { fill: var(--tgh-mut); font-size: 11px; font-family: Montserrat, Arial, sans-serif; }
.tgcc-gh-wrap .tgh-grid { stroke: var(--tgh-line); stroke-width: 1; }
.tgcc-gh-wrap .tgh-cursor { stroke: var(--tgh-cyan); stroke-width: 1.2; stroke-dasharray: 3 3; }
.tgcc-gh-wrap .tgh-chart.is-loading {
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 100%);
  background-size: 200% 100%;
  animation: tgh-shimmer 1.4s ease-in-out infinite;
}
@keyframes tgh-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.tgcc-gh-wrap .tgh-tip {
  position: absolute;
  top: 6px;
  z-index: 3;
  pointer-events: none;
  min-width: 170px;
  max-width: 230px;
  background: rgba(21,14,31,.96);
  border: 1px solid var(--tgh-line2);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--tgh-lead);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  display: none;
}
.tgcc-gh-wrap .tgh-tip.is-on { display: block; }
.tgcc-gh-wrap .tgh-tip b { display: block; color: var(--tgh-txt); font-weight: 700; margin-bottom: 4px; }
.tgcc-gh-wrap .tgh-tip div { display: flex; justify-content: space-between; gap: 10px; }
.tgcc-gh-wrap .tgh-tip span { font-variant-numeric: tabular-nums; color: var(--tgh-txt); font-weight: 600; }
.tgcc-gh-wrap .tgh-tip i, .tgcc-gh-wrap .tgh-legend i, .tgcc-gh-wrap .tgh-row .tgh-sw {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.tgcc-gh-wrap .tgh-tip .tgh-tot { border-top: 1px solid var(--tgh-line2); margin-top: 4px; padding-top: 4px; }

.tgcc-gh-wrap .tgh-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--tgh-lead);
}

/* Summary cards */
.tgcc-gh-wrap .tgh-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (min-width: 640px) { .tgcc-gh-wrap .tgh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tgcc-gh-wrap .tgh-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tgcc-gh-wrap .tgh-card {
  background: var(--tgh-panel2);
  border: 1px solid var(--tgh-line);
  border-radius: 14px;
  padding: 14px 14px 12px;
  min-width: 0;
}
.tgcc-gh-wrap .tgh-card:first-child {
  background: radial-gradient(500px 240px at 0 0, rgba(142,67,240,.22), transparent 70%), var(--tgh-panel2);
}
.tgcc-gh-wrap .tgh-card h4 {
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tgh-mut);
  font-weight: 700;
  line-height: 1.35;
}
.tgcc-gh-wrap .tgh-big {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--tgh-txt);
  font-variant-numeric: tabular-nums;
}
.tgcc-gh-wrap .tgh-big small { font-size: .95rem; font-weight: 700; color: var(--tgh-mut); margin-left: 3px; }
.tgcc-gh-wrap .tgh-card p { margin: 8px 0 0; color: var(--tgh-lead); font-size: 13px; line-height: 1.45; }

/* Share rows */
.tgcc-gh-wrap .tgh-shares { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 28px; }
@media (min-width: 760px) { .tgcc-gh-wrap .tgh-shares { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tgcc-gh-wrap .tgh-row {
  display: grid;
  grid-template-columns: 8.4rem minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 5px 0;
  font-size: 14px;
}
.tgcc-gh-wrap .tgh-row .tgh-name { color: var(--tgh-lead); font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgcc-gh-wrap .tgh-bar { height: 10px; background: rgba(255,255,255,.06); border-radius: 99px; overflow: hidden; }
.tgcc-gh-wrap .tgh-bar > span { display: block; height: 100%; border-radius: 99px; transition: width .6s ease; }
.tgcc-gh-wrap .tgh-val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--tgh-txt); text-align: right; white-space: nowrap; min-width: 5.2rem; }
.tgcc-gh-wrap .tgh-val small { font-weight: 500; color: var(--tgh-mut); font-size: 11px; margin-left: 4px; }

.tgcc-gh-wrap .tgh-sources { color: var(--tgh-mut); font-size: 12px; margin: 0; }

@media (max-width: 480px) {
  .tgcc-gh-wrap .tgcc-gh { padding: 12px 12px 6px; }
  .tgcc-gh-wrap .tgh-head { flex-direction: column; align-items: stretch; }
  .tgcc-gh-wrap .tgh-switch { display: flex; width: 100%; }
  .tgcc-gh-wrap .tgh-btn { flex: 1 1 0; min-width: 0; padding: 10px 6px; }
  .tgcc-gh-wrap h2.tgh-title { font-size: 1.25rem; }
  .tgcc-gh-wrap .tgh-panel { padding: 14px 12px 14px; }
  .tgcc-gh-wrap .tgh-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name val" "bar bar";
    gap: 4px 8px;
  }
  .tgcc-gh-wrap .tgh-row .tgh-name { grid-area: name; }
  .tgcc-gh-wrap .tgh-row .tgh-val { grid-area: val; min-width: 0; }
  .tgcc-gh-wrap .tgh-row .tgh-bar { grid-area: bar; }
  .tgcc-gh-wrap .tgh-big { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tgcc-gh-wrap .tgh-chart.is-loading { animation: none; }
  .tgcc-gh-wrap .tgh-bar > span, .tgcc-gh-wrap .tgh-btn { transition: none; }
}

/* Fuel toggles (1.1.0) */
.tgcc-gh-wrap .tgh-legend-bar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin-top: 10px; }
.tgcc-gh-wrap .tgh-legend-bar .tgh-legend { margin-top: 0; gap: 6px; flex: 1 1 320px; min-width: 0; }
.tgcc-gh-wrap .tgh-key, .tgcc-gh-wrap .tgh-mini {
  appearance: none;
  -webkit-appearance: none;
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  min-height: 32px;
  margin: 0;
  padding: 6px 11px;
  color: var(--tgh-lead);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--tgh-line2);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  transition: opacity .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.tgcc-gh-wrap .tgh-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; transition: opacity .2s ease; }
.tgcc-gh-wrap .tgh-key:hover, .tgcc-gh-wrap .tgh-mini:hover { color: #fff; border-color: rgba(199,155,255,.5); background: rgba(142,67,240,.14); }
.tgcc-gh-wrap .tgh-key:focus, .tgcc-gh-wrap .tgh-mini:focus { outline: none; }
.tgcc-gh-wrap .tgh-key:focus-visible, .tgcc-gh-wrap .tgh-mini:focus-visible { outline: 2px solid var(--tgh-cyan); outline-offset: 2px; }
.tgcc-gh-wrap .tgh-key.is-off { opacity: .45; text-decoration: line-through; text-decoration-color: rgba(255,255,255,.6); background: transparent; border-style: dashed; }
.tgcc-gh-wrap .tgh-key.is-off i { opacity: .35; }
.tgcc-gh-wrap .tgh-legend-ctl { display: inline-flex; gap: 6px; flex: 0 0 auto; }
.tgcc-gh-wrap .tgh-mini { color: var(--tgh-lilac); font-weight: 700; }
.tgcc-gh-wrap .tgh-legend-hint { margin: 8px 0 0; font-size: 11px; color: var(--tgh-mut); }
.tgcc-gh-wrap .tgh-area { transition: d .45s ease, opacity .3s ease; }
.tgcc-gh-wrap .tgh-area.is-off { opacity: 0; }
.tgcc-gh-wrap .tgh-empty { font-size: 13px; fill: var(--tgh-lead); }

/* Gas note under the legend */
.tgcc-gh-wrap .tgh-gasnote {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 12px 0 0; padding: 8px 10px;
  background: rgba(142,67,240,.08); border: 1px solid rgba(199,155,255,.18); border-radius: 12px;
  font-size: 12px; line-height: 1.45; color: var(--tgh-lead);
}
.tgcc-gh-wrap .tgh-gasnote-i {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--tgh-lilac);
  color: var(--tgh-lilac); font: italic 700 11px/16px Georgia, "Times New Roman", serif; text-align: center;
}
.tgcc-gh-wrap .tgh-gasnote a { color: var(--tgh-cyan); white-space: nowrap; }
.tgcc-gh-wrap .tgh-gasnote a[hidden] { display: none; }

@media (max-width: 480px) {
  .tgcc-gh-wrap .tgh-key, .tgcc-gh-wrap .tgh-mini { min-height: 40px; padding: 8px 12px; font-size: 13px; }
  .tgcc-gh-wrap .tgh-legend-ctl { width: 100%; }
  .tgcc-gh-wrap .tgh-legend-ctl .tgh-mini { flex: 1 1 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .tgcc-gh-wrap .tgh-area, .tgcc-gh-wrap .tgh-key, .tgcc-gh-wrap .tgh-mini { transition: none; }
}
