:root {
  --bg: #000000;
  --panel: #050505;
  --panel-2: #101010;
  --panel-soft: #0b0704;

  --line: #3a3a3a;
  --line-soft: #202020;
  --line-orange: #2a1f14;

  --orange: #ff8a1f;
  --orange-2: #ff9a2f;
  --orange-hot: #ffb15c;
  --orange-soft: rgba(255, 138, 31, 0.18);

  --cyan: #21d4ff;
  --text: #ffffff;
  --muted: #9a9a9a;

  --green: #65f06f;
  --yellow: #ffd84d;
  --red: #ff6b4a;

  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
  scrollbar-color: #555555 #050505;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

*::-webkit-scrollbar-track {
  background: #050505;
}

*::-webkit-scrollbar-thumb {
  background: #555555;
  border: 2px solid #050505;
}

*::-webkit-scrollbar-thumb:hover {
  background: #777777;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 138, 31, 0.07), transparent 28%),
    radial-gradient(circle at top left, rgba(255, 177, 92, 0.045), transparent 24%),
    repeating-linear-gradient(90deg, rgba(255, 138, 31, 0.025) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(255, 138, 31, 0.015) 0 1px, transparent 1px 24px),
    #000000;
  color: var(--text);
  font-family: "Cascadia Mono", "Consolas", "Roboto Mono", monospace;
  overflow-x: hidden;
}

.station-header {
  position: fixed;
  inset: 0 0 auto 0;
  min-height: 88px;
  z-index: 10;
  background: #000000;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
}

.station-title {
  min-width: 0;
}

.eyebrow {
  color: var(--orange);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

h1 {
  margin: 6px 0 0;
  color: var(--orange);
  font-family: "Bahnschrift", "Orbitron", "Rajdhani", "Segoe UI", sans-serif;
  font-size: 31px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.online {
  color: var(--green);
}

.shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 108px 0 32px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--panel);
}

.metric-card {
  min-height: 128px;
  padding: 18px;
  background: #050505;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.metric-card:hover {
  outline: 1px solid var(--orange);
  outline-offset: -1px;
  background: #111111;
}

.metric-card.primary {
  background:
    linear-gradient(135deg, rgba(255, 138, 31, 0.16), rgba(0, 0, 0, 0.2)),
    #050505;
}

.metric-label,
.metric-card span {
  color: var(--orange);
  font-size: 12px;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin: 12px 0 6px;
  color: #ffffff;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-card .noaa-reading {
  margin-top: 6px;
  color: var(--cyan);
  line-height: 1.25;
  text-transform: uppercase;
}

.iaq-card strong {
  color: var(--orange-hot);
}

.iaq-card.iaq-green strong {
  color: var(--green);
}

.iaq-card.iaq-yellow strong {
  color: var(--yellow);
}

.iaq-card.iaq-orange strong {
  color: var(--orange);
}

.iaq-card.iaq-red strong {
  color: var(--red);
}

.iaq-bar {
  height: 8px;
  margin: 10px 0 8px;
  background: #1a1a1a;
  border: 1px solid var(--line);
}

.iaq-bar i {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--green);
  transition: width 0.25s ease, background 0.25s ease;
}

/* Wind instrument area: orange/black port of the blue design. */

.instrument-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.instrument-card {
  background:
    radial-gradient(circle at top right, rgba(255, 138, 31, 0.06), transparent 34%),
    linear-gradient(180deg, #0b0704 0%, #060402 100%);
  border: 1px solid var(--line-orange);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  overflow: hidden;
}

.instrument-card h2,
.panel h2 {
  margin: 0 0 12px 0;
  color: #ffe7cc;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
}

.compass-card {
  min-height: 374px;
}

.compass-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 8px;
}

.compass-stack {
  width: 100%;
  max-width: 300px;
}

#compass {
  display: block;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

#compass text {
  fill: #ffd7a6;
  font-size: 14px;
  font-weight: 600;
}

.compass-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: #d8a56a;
  font-size: 0.92rem;
}

.compass-meta strong {
  color: #ffffff;
  font-weight: 800;
}

.wind-chart-card {
  min-height: 374px;
}

.wind-chart-card canvas {
  width: 100%;
  height: 300px;
  display: block;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0));
  border-radius: 14px;
}

.panel {
  margin-top: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 138, 31, 0.045), transparent 32%),
    linear-gradient(180deg, #0b0704 0%, #060402 100%);
  border: 1px solid var(--line-orange);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#weatherChart {
  width: 100%;
  height: 340px !important;
  display: block;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0));
  border-radius: 14px;
}

@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .instrument-grid {
    grid-template-columns: 1fr;
  }

  .compass-card {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .station-header {
    position: static;
    display: block;
    padding: 18px;
  }

  .status-strip {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .shell {
    padding-top: 18px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 24px;
  }

  .instrument-card,
  .panel {
    padding: 14px;
  }

  #compass {
    width: 260px;
    height: 260px;
  }

  .wind-chart-card canvas {
    height: 260px;
  }
}
