:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(14, 165, 233, 0.08), transparent 28rem),
    #f8fafc;
}

a {
  color: inherit;
}

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

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 40px;
  line-height: 1.05;
}

h2 {
  font-size: 18px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
}

.status.ok .dot {
  background: #10b981;
}

.status.down .dot {
  background: #ef4444;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metrics article,
.panel {
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.metrics article {
  padding: 16px;
}

.metrics span,
dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metrics strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #1d4ed8;
  border-radius: 7px;
  background: #2563eb;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.market-list {
  display: grid;
  gap: 10px;
}

.market {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.market h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.market p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.pill {
  align-self: start;
  min-width: 80px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

dl {
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
}

dl div {
  display: grid;
  gap: 4px;
}

dd {
  margin: 0;
  font-weight: 800;
  word-break: break-word;
}

.empty,
.error {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #475569;
  background: #ffffff;
}

.error {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff1f2;
}

@media (max-width: 860px) {
  .topbar,
  .workspace {
    display: grid;
  }

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

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

@media (max-width: 520px) {
  .shell {
    width: min(100vw - 20px, 1180px);
    padding: 20px 0;
  }

  h1 {
    font-size: 32px;
  }

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

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