:root {
  --bg: #000000;
  --bg-panel: #0a0a0a;
  --border: #262626;
  --text: #e5e5e5;
  --muted: #a3a3a3;
  --yellow: #facc15;
  --yellow-dim: rgba(250, 204, 21, 0.15);
  --green: #4ade80;
  --red: #f87171;
  --font: "JetBrains Mono", ui-monospace, monospace;
  --header-h: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0 clamp(12px, 3vw, 28px);
  background: #050505;
  border-bottom: 1px solid var(--border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 2rem);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(250, 204, 21, 0.2));
}

.hero-brand {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.hero-logo {
  width: min(200px, 42vw);
  height: auto;
  max-height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 12px 40px rgba(250, 204, 21, 0.18));
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-pill {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.nav-pill:hover {
  color: var(--text);
}

.nav-pill.is-active {
  color: var(--yellow);
  border-color: var(--border);
  background: var(--bg-panel);
}

.header-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: flex-end;
}

.ca-soon {
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.85;
}

.social-x {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
}

.social-x:hover {
  color: var(--yellow);
}

.status-live {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.header-clock {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.hero {
  position: relative;
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(16px, 4vw, 32px) 2rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background: radial-gradient(ellipse at 50% 40%, var(--yellow-dim) 0%, transparent 55%);
  pointer-events: none;
}

.hero-title {
  position: relative;
  margin: 0 auto 1rem;
  max-width: 22ch;
  font-size: clamp(1.35rem, 3.8vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--yellow);
  text-shadow: 0 0 40px rgba(250, 204, 21, 0.35);
}

.hero-sub {
  position: relative;
  margin: 0 auto 1.75rem;
  max-width: 52ch;
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.ca-box {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  max-width: min(920px, 100%);
  margin: 0 auto 1.5rem;
  padding: 14px 18px;
  border: 1px solid var(--yellow);
  background: rgba(250, 204, 21, 0.04);
}

.ca-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--yellow);
}

.ca-value {
  font-size: 12px;
  word-break: break-all;
  color: var(--text);
}

.btn-copy {
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--yellow);
  cursor: pointer;
}

.btn-copy:hover {
  border-color: var(--yellow);
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 12px 28px;
  border-radius: 0;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 0.15s, border-color 0.15s, background 0.15s;
}

.btn-solid {
  background: var(--yellow);
  color: #000;
  border-color: var(--yellow);
}

.btn-solid:hover {
  filter: brightness(1.08);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.hazard-strip {
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    #000,
    #000 8px,
    var(--yellow) 8px,
    var(--yellow) 16px
  );
}

.alert-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 14px clamp(16px, 4vw, 32px);
  background: #0a0a0a;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.alert-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.alert-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.alert-title {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--yellow);
}

.alert-sub {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.countdown {
  display: flex;
  gap: 8px;
}

.cd-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  background: #050505;
}

.cd-val {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--yellow);
}

.cd-lbl {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.dashboard {
  padding: clamp(16px, 2vw, 24px);
}

.dash-grid {
  display: grid;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .dash-grid {
    grid-template-columns: 1fr 280px;
    grid-template-rows: auto auto auto;
  }

  .panel-fuel {
    grid-column: 1;
    grid-row: 1;
  }

  .dash-right {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .panel-dual {
    grid-column: 1;
    grid-row: 2;
  }

  .panel-map {
    grid-column: 1;
    grid-row: 3;
  }

  .panel-terminal {
    grid-column: 2;
    grid-row: 3;
    min-height: 220px;
  }
}

@media (max-width: 1023px) {
  .dash-right {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
  }

  .panel-tracker {
    grid-column: span 1;
  }

  .panel-hedge {
    grid-column: span 1;
  }

  .panel-reserve {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .dash-right {
    grid-template-columns: 1fr;
  }

  .panel-reserve {
    grid-column: span 1;
  }

  .header-nav {
    width: 100%;
    order: 3;
  }

  .header-left {
    width: 100%;
  }
}

.panel {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 12px 14px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-head-tight {
  margin-bottom: 8px;
}

.panel-title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-title.accent {
  color: var(--yellow);
}

.panel-title.muted {
  color: var(--muted);
}

.panel-unit {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.chart-wrap {
  position: relative;
  height: 220px;
}

.chart-tall {
  height: 200px;
}

@media (min-width: 1024px) {
  .chart-wrap {
    height: 260px;
  }

  .chart-tall {
    height: 240px;
  }
}

.dual-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 1px;
}

.leg-gas .leg-dot {
  background: var(--red);
}

.leg-nbr .leg-dot {
  background: var(--yellow);
}

.leg-split {
  color: var(--yellow);
  margin-left: auto;
}

.chart-scrub {
  margin-top: 8px;
  padding: 0 4px;
}

.chart-scrub input[type="range"] {
  width: 100%;
  accent-color: var(--yellow);
  height: 4px;
}

.panel-compact .panel-title {
  margin-bottom: 8px;
}

.tracker-price {
  margin: 0;
  line-height: 1.1;
}

.tracker-dollar {
  font-size: 2rem;
  font-weight: 700;
  color: var(--yellow);
}

.tracker-unit {
  font-size: 12px;
  color: var(--text);
  margin-left: 4px;
}

.tracker-delta {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--red);
}

.delta-up {
  margin-right: 4px;
}

.hedge-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.hedge-label {
  color: var(--green);
  font-weight: 700;
}

.hedge-score {
  color: var(--muted);
}

.hedge-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  height: 72px;
  padding-top: 4px;
}

.hedge-bars .bar {
  flex: 1;
  min-width: 6px;
  max-width: 14px;
  border-radius: 1px 1px 0 0;
  transition: opacity 0.2s;
}

.reserve-val {
  margin: 4px 0 6px;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--yellow);
}

.reserve-arrow {
  color: var(--green);
  margin-left: 6px;
  font-size: 1.25rem;
}

.reserve-sub {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.map-hint {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.map-stage {
  position: relative;
}

.supply-map {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  border: 1px solid var(--border);
  background: #050505;
}

.map-land {
  opacity: 0.9;
}

.map-nodes .node {
  cursor: pointer;
  stroke: #000;
  stroke-width: 1.5;
}

.map-nodes .node:hover {
  filter: drop-shadow(0 0 6px var(--yellow));
}

.map-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 10px 0 0;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.map-legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-y {
  background: var(--yellow);
}

.dot-g {
  background: var(--green);
}

.dot-b {
  background: #60a5fa;
}

.map-tooltip {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 12px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--bg);
  background: var(--yellow);
  border: 1px solid var(--yellow);
  white-space: nowrap;
}

.panel-terminal {
  display: flex;
  flex-direction: column;
}

.terminal {
  flex: 1;
  min-height: 160px;
  max-height: 220px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
  padding: 8px 10px;
  background: #000;
  border: 1px solid var(--border);
}

.terminal .line {
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal .ts {
  color: var(--text);
}

.terminal .tag {
  font-weight: 600;
}

.terminal .ok {
  color: var(--green);
}

.terminal .warn {
  color: var(--yellow);
}

.term-cursor {
  margin-top: 4px;
  font-size: 14px;
  color: var(--yellow);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px clamp(16px, 4vw, 32px) 24px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--yellow);
}

.footer-disclaimer {
  width: 100%;
  text-align: center;
  opacity: 0.75;
  max-width: 720px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .footer-disclaimer {
    width: auto;
    margin: 0;
    text-align: right;
    flex: 1;
  }
}
