/* =========================================================================
   TERMINAL CHASSIS — Global Cannabis Terminal
   Shared sticky ticker, region selector, and CIN Take hero banner
   Injected on every page via terminal-chassis.js
   ========================================================================= */

/* Sticky ticker strip — top of every page */
.tc-ticker {
  position: sticky;
  top: 0;
  z-index: 9000;
  background: #060606;
  border-bottom: 1px solid rgba(45, 138, 78, 0.25);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: center;
}
.tc-ticker-label {
  flex-shrink: 0;
  padding: 0 12px;
  background: linear-gradient(90deg, #0a4a24 0%, #2d8a4e 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 10px;
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(0,0,0,0.4);
}
.tc-ticker-label .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 6px;
  animation: tc-pulse 1.5s infinite;
}
@keyframes tc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.tc-ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
}
.tc-ticker-strip {
  display: inline-flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: tc-scroll 240s linear infinite;
  will-change: transform;
}
@keyframes tc-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.tc-ticker-item {
  padding: 0 14px;
  color: #b0b0b0;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tc-ticker-sym { color: #fff; font-weight: 600; }
.tc-ticker-up { color: #4ade80; }
.tc-ticker-down { color: #f87171; }
.tc-ticker-flat { color: rgba(255,255,255,0.4); }

/* Region selector bar */
.tc-regions {
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  scrollbar-width: none;
}
.tc-regions::-webkit-scrollbar { display: none; }
.tc-regions-label {
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 9px;
  font-weight: 700;
  margin-right: 8px;
  flex-shrink: 0;
}
.tc-region-btn {
  padding: 4px 10px;
  border-radius: 3px;
  color: #b0b0b0;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.tc-region-btn:hover {
  color: #fff;
  background: rgba(45, 138, 78, 0.12);
  border-color: rgba(45, 138, 78, 0.3);
}
.tc-region-btn.active {
  color: #fff;
  background: rgba(45, 138, 78, 0.18);
  border-color: #2d8a4e;
}
.tc-region-spacer { flex: 1; }
.tc-region-meta {
  color: rgba(255,255,255,0.35);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.tc-region-meta strong { color: #2d8a4e; font-weight: 700; }

/* CIN Take page-hero banner — appears on every non-home page */
.tc-take {
  max-width: 1400px;
  margin: 16px auto 0;
  padding: 0 24px;
}
.tc-take-inner {
  background: linear-gradient(135deg, rgba(45,138,78,0.06) 0%, rgba(17,17,17,0.9) 100%);
  border: 1px solid rgba(45,138,78,0.25);
  border-left: 3px solid #2d8a4e;
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tc-take-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  color: #2d8a4e;
  background: rgba(45,138,78,0.14);
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.tc-take-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.tc-take-text {
  font-family: 'Satoshi', sans-serif;
  font-size: 14px;
  color: #d8d8d8;
  margin: 0;
  flex: 1;
  min-width: 240px;
  line-height: 1.5;
}
.tc-take-text strong { color: #fff; font-weight: 600; }

/* ============================ HOMEPAGE-ONLY ============================ */
/* Global Terminal hero — the big landing block on index.html */
.gth {
  max-width: 1400px;
  margin: 24px auto 0;
  padding: 0 24px;
}
.gth-stats {
  background: linear-gradient(180deg, #0c0c0c 0%, #060606 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .gth-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
  .gth-stats { grid-template-columns: repeat(2, 1fr); }
}
.gth-stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
}
.gth-stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.gth-stat-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #2d8a4e;
  margin-top: 4px;
}

/* Six regional cards */
.gth-regions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .gth-regions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .gth-regions { grid-template-columns: 1fr; }
}
.gth-rcard {
  background: #0c0c0c;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}
.gth-rcard:hover {
  border-color: rgba(45,138,78,0.5);
  background: #101010;
  transform: translateY(-1px);
}
.gth-rcard::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: #2d8a4e;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.gth-rcard:hover::before { opacity: 1; }
.gth-rcard-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.gth-rcard-region {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.gth-rcard-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.45);
}
.gth-rcard-head {
  font-family: 'Satoshi', sans-serif;
  font-size: 13px;
  color: #b8b8b8;
  line-height: 1.45;
  margin: 0 0 10px;
  min-height: 36px;
}
.gth-rcard-mover {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
}
.gth-rcard-mover-sym { color: #fff; font-weight: 600; }
.gth-rcard-mover-pct.up { color: #4ade80; }
.gth-rcard-mover-pct.down { color: #f87171; }

/* CIN Wire stream */
.gth-wire {
  background: #0c0c0c;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.gth-wire-head {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gth-wire-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  margin: 0;
}
.gth-wire-title .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2d8a4e;
  margin-right: 8px;
  animation: tc-pulse 1.5s infinite;
  vertical-align: middle;
}
.gth-wire-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.gth-wire-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gth-wire-item {
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: grid;
  grid-template-columns: 70px 80px 1fr 90px;
  gap: 12px;
  align-items: baseline;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  transition: background 0.12s ease;
}
.gth-wire-item:hover { background: rgba(45,138,78,0.04); }
.gth-wire-item:last-child { border-bottom: 0; }
.gth-wire-time { color: rgba(255,255,255,0.4); font-size: 10px; }
.gth-wire-region {
  color: #2d8a4e;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.gth-wire-headline {
  font-family: 'Satoshi', sans-serif;
  color: #d8d8d8;
  font-size: 13px;
  line-height: 1.4;
}
.gth-wire-headline a { color: inherit; text-decoration: none; }
.gth-wire-headline a:hover { color: #fff; }
.gth-wire-tag {
  font-size: 9px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: right;
}
@media (max-width: 700px) {
  .gth-wire-item { grid-template-columns: 60px 1fr; }
  .gth-wire-region, .gth-wire-tag { display: none; }
}

/* CMHI gauge */
.gth-cmhi {
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}
@media (max-width: 700px) {
  .gth-cmhi { grid-template-columns: 1fr; }
}
.gth-cmhi-l h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  margin: 0 0 4px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gth-cmhi-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  margin: 4px 0;
}
.gth-cmhi-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.gth-cmhi-desc {
  font-family: 'Satoshi', sans-serif;
  font-size: 13px;
  color: #b8b8b8;
  margin: 8px 0 0;
  line-height: 1.5;
}
.gth-cmhi-r {
  position: relative;
  height: 110px;
}
.gth-cmhi-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, #f87171 0%, #fbbf24 50%, #4ade80 100%);
  border-radius: 4px;
}
.gth-cmhi-marker {
  position: absolute;
  bottom: -4px;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
}
.gth-cmhi-scale {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
