* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--t, #18181B);
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.08), transparent 22%),
    radial-gradient(circle at left 20%, rgba(180, 83, 9, 0.08), transparent 20%),
    linear-gradient(180deg, #F7F4EE 0%, #F3EFE6 100%);
  font-family: 'Outfit', sans-serif;
}

.page-shell {
  width: min(1520px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  margin-bottom: 16px;
}

.card {
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(165, 142, 112, 0.18);
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(24, 24, 27, 0.07);
  backdrop-filter: blur(14px);
}

.hero-card {
  padding: 28px 30px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.12), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(180, 83, 9, 0.24);
  background: rgba(255, 251, 235, 0.94);
  color: #9A5D0B;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #16A34A;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, .35);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .35); }
  50% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
}

.hero-title {
  margin: 16px 0 10px;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1;
  letter-spacing: -0.06em;
  font-family: 'Fraunces', serif;
}

.hero-copy {
  max-width: 760px;
  margin: 0;
  color: var(--m, #78716C);
  font-size: 15px;
  line-height: 1.7;
}

.hero-side {
  padding: 24px 26px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.side-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #9A5D0B;
}

.side-stack {
  display: grid;
  gap: 12px;
}

.side-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(250, 247, 241, 0.94);
  border: 1px solid rgba(165, 142, 112, 0.14);
}

.side-label {
  color: var(--m, #78716C);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
}

.side-value {
  color: var(--t, #18181B);
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.control-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 16px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--m, #78716C);
}

.control-select,
.ghost-btn,
.primary-btn {
  border-radius: 14px;
  border: 1px solid rgba(165, 142, 112, 0.16);
  padding: 10px 14px;
  background: rgba(255,255,255,.92);
  color: var(--t, #18181B);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.control-select {
  min-width: 120px;
}

.ghost-btn,
.primary-btn {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.ghost-btn:hover,
.primary-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(135deg, #111827 0%, #374151 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.14);
}

.status-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.status-pill.live {
  background: rgba(236, 253, 245, 0.92);
  color: #065F46;
  border: 1px solid rgba(6, 95, 70, 0.14);
}

.status-pill.degraded,
.status-pill.connecting {
  background: rgba(255, 251, 235, 0.92);
  color: #B45309;
  border: 1px solid rgba(180, 83, 9, 0.16);
}

.status-pill.offline {
  background: rgba(254, 242, 242, 0.94);
  color: #B91C1C;
  border: 1px solid rgba(185, 28, 28, 0.16);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: .85;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  padding: 18px 18px 16px;
}

.stat-label {
  color: var(--m, #78716C);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.05em;
  font-family: 'Fraunces', serif;
}

.stat-sub {
  margin-top: 8px;
  color: var(--m, #78716C);
  font-size: 12px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.chart-card {
  padding: 18px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.card-sub {
  margin-top: 6px;
  color: var(--m, #78716C);
  font-size: 12px;
}

.chart-meta {
  text-align: right;
}

.chart-meta .value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  font-family: 'Fraunces', serif;
}

.chart-meta .label {
  margin-top: 5px;
  color: var(--m, #78716C);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.bar-stage {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
}

.mini-bar {
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mini-bar-track {
  width: 100%;
  height: 170px;
  display: flex;
  align-items: end;
}

.mini-bar-fill {
  width: 100%;
  min-height: 4px;
  border-radius: 10px 10px 4px 4px;
  transition: height .38s ease, transform .25s ease, opacity .25s ease;
  transform-origin: bottom center;
}

.mini-bar-fill.volume {
  background: linear-gradient(180deg, #1D4ED8 0%, #60A5FA 100%);
}

.mini-bar-fill.cost {
  background: linear-gradient(180deg, #B45309 0%, #F59E0B 100%);
}

.mini-bar-fill.latency {
  background: linear-gradient(180deg, #0F766E 0%, #2DD4BF 100%);
}

.mini-bar-label {
  min-height: 12px;
  color: #8F8578;
  font-size: 10px;
  letter-spacing: .02em;
}

.bar-note {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--m, #78716C);
  font-size: 12px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 12px;
}

.mix-card,
.feed-card {
  padding: 18px;
}

.mix-list,
.feed-list {
  display: grid;
  gap: 10px;
}

.mix-item {
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(250, 247, 241, 0.92);
  border: 1px solid rgba(165, 142, 112, 0.14);
}

.mix-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.mix-name {
  font-size: 13px;
  font-weight: 700;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mix-share {
  font-size: 12px;
  font-weight: 700;
  color: #9A5D0B;
}

.mix-track {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(165, 142, 112, 0.14);
  overflow: hidden;
}

.mix-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #111827 0%, #4B5563 100%);
  transition: width .42s ease;
}

.mix-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--m, #78716C);
  font-size: 12px;
}

.feed-scroll {
  max-height: 620px;
  overflow-y: auto;
  padding-right: 4px;
}

.feed-item {
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(250, 247, 241, 0.92);
  border: 1px solid rgba(165, 142, 112, 0.14);
  transition: transform .22s ease, background .22s ease, border-color .22s ease;
}

.feed-item:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.96);
}

.feed-item.fresh {
  animation: freshFlash 1.1s ease;
}

@keyframes freshFlash {
  0% { background: rgba(255, 251, 235, 1); border-color: rgba(180, 83, 9, 0.30); }
  100% { background: rgba(250, 247, 241, 0.92); border-color: rgba(165, 142, 112, 0.14); }
}

.feed-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.feed-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.feed-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.feed-pill.ok {
  background: rgba(236, 253, 245, 0.94);
  color: #065F46;
}

.feed-pill.warn {
  background: rgba(255, 251, 235, 0.94);
  color: #B45309;
}

.feed-pill.error {
  background: rgba(254, 242, 242, 0.94);
  color: #B91C1C;
}

.feed-meta {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  color: var(--m, #78716C);
  font-size: 12px;
}

.feed-meta strong {
  display: block;
  margin-bottom: 3px;
  color: #5B5347;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.empty-state {
  color: var(--m, #78716C);
  font-size: 14px;
  line-height: 1.7;
  padding: 6px 0;
}

.muted {
  color: var(--m, #78716C);
}

@media (max-width: 1240px) {
  .hero-grid,
  .bottom-grid,
  .chart-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 18px;
  }

  .hero-card,
  .hero-side,
  .control-bar,
  .stat-card,
  .chart-card,
  .mix-card,
  .feed-card {
    padding: 16px;
  }

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

  .feed-meta {
    grid-template-columns: repeat(2, 1fr);
  }

  .status-pill {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}