:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #10131a;
  color: #f6f7fb;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at top right, #24314d 0, #10131a 42rem);
}

button {
  font: inherit;
}

.shell {
  width: min(100% - 2rem, 960px);
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.topbar,
.panel-heading,
.strategy-row,
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: 1.25rem;
}

.eyebrow {
  color: #8ea7d9;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.muted,
small {
  color: #9da8bb;
}

.button {
  border: 0;
  border-radius: 0.75rem;
  cursor: pointer;
  padding: 0.7rem 1rem;
}

.button-secondary {
  background: #26334d;
  color: #f6f7fb;
}

.button-secondary:hover {
  background: #304263;
}

.notice {
  margin: 1.25rem 0;
  border: 1px solid #344563;
  border-radius: 0.8rem;
  background: #172033;
  color: #d4def2;
  padding: 0.85rem 1rem;
}

.notice.error {
  border-color: #863f55;
  background: #301b27;
  color: #ffb8c8;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.metric-card,
.panel {
  border: 1px solid #2b3850;
  border-radius: 1rem;
  background: rgb(21 27 39 / 92%);
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 12%);
}

.metric-card {
  display: grid;
  gap: 0.35rem;
  min-height: 8rem;
  padding: 1rem;
}

.metric-card span {
  color: #a7b5cf;
  font-size: 0.83rem;
}

.metric-card strong {
  align-self: end;
  font-size: 1.45rem;
}

.panel {
  margin-top: 1rem;
  padding: 1.15rem;
}

.strategy-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.strategy-row {
  width: 100%;
  border: 1px solid #33425e;
  border-radius: 0.8rem;
  background: #1a2435;
  color: inherit;
  cursor: pointer;
  padding: 0.9rem 1rem;
  text-align: left;
}

.strategy-row:hover {
  border-color: #7093d7;
}

.strategy-main,
.strategy-side {
  display: grid;
  gap: 0.3rem;
}

.strategy-side {
  justify-items: end;
}

.state-badge {
  border-radius: 999px;
  background: #35425c;
  color: #dae5fb;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
}

.state-badge.fresh {
  background: #15563d;
  color: #aef2cf;
}

.state-badge.stale,
.state-badge.unknown {
  background: #5e4422;
  color: #ffdc9d;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.detail-row {
  border-bottom: 1px solid #2b3850;
  padding: 0.55rem 0;
}

.detail-row span:first-child {
  color: #9da8bb;
}

.hidden {
  display: none;
}

@media (max-width: 640px) {
  .summary-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }
}
