:root {
  --bg: #f6f1e8;
  --panel: rgba(255, 252, 245, 0.92);
  --ink: #1e1e1a;
  --muted: #696457;
  --line: rgba(30, 30, 26, 0.14);
  --up: #23734d;
  --degraded: #a86e10;
  --down: #b5442d;
  --unknown: #64748b;
  --hero: linear-gradient(135deg, #d4f2d0 0%, #f3deba 50%, #f8f4ef 100%);
  --shadow: 0 20px 50px rgba(71, 53, 24, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(212, 242, 208, 0.9), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, #fdfaf3 100%);
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border-radius: 28px;
  background: var(--hero);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.hero-copy,
.section-head p,
.provider-copy,
.incident-reason,
.empty-state,
.muted {
  color: var(--muted);
  line-height: 1.55;
}

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

.metric-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(30, 30, 26, 0.18);
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
  color: var(--muted);
  background: rgba(255, 253, 250, 0.96);
  cursor: help;
}

.metric-tooltip-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 10;
  width: min(280px, 70vw);
  padding: 10px 12px;
  border: 1px solid rgba(30, 30, 26, 0.14);
  border-radius: 14px;
  background: #fffdfa;
  box-shadow: 0 16px 30px rgba(36, 28, 11, 0.12);
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.45;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.metric-tooltip:hover .metric-tooltip-bubble,
.metric-tooltip:focus-visible .metric-tooltip-bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hero-copy {
  max-width: 620px;
  margin: 14px 0 0;
  font-size: 1.08rem;
}

.hero-meta {
  display: grid;
  gap: 12px;
  min-width: 220px;
}

.stat-chip,
.status-badge,
.metric-chip,
.detail-card,
.capability-item,
.incident-item,
.provider-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffdfa;
}

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

.stat-chip strong {
  display: block;
  margin-top: 6px;
  font-size: 1.6rem;
}

.layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.panel {
  padding: 24px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.section-head,
.provider-card-top,
.metrics-row,
.detail-grid,
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.section-head {
  align-items: flex-start;
  margin-bottom: 18px;
}

.provider-grid,
.capability-list,
.incident-list,
.methodology ul,
.detail-content {
  display: grid;
  gap: 14px;
}

.provider-card {
  width: 100%;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.provider-card:hover,
.provider-card.active {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(36, 28, 11, 0.08);
  border-color: rgba(36, 28, 11, 0.24);
}

.provider-name {
  font-size: 1.18rem;
}

.provider-link,
.provider-copy-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 140ms ease, color 140ms ease;
}

.provider-link:hover,
.provider-link:focus-visible,
.provider-copy-link:hover,
.provider-copy-link:focus-visible {
  color: #14563e;
  border-color: currentColor;
}

.status-badge {
  padding: 6px 12px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.status-up {
  color: var(--up);
}

.status-degraded {
  color: var(--degraded);
}

.status-down {
  color: var(--down);
}

.status-unknown {
  color: var(--unknown);
}

.metrics-row,
.detail-grid {
  flex-wrap: wrap;
}

.metric-chip,
.detail-card,
.capability-item,
.incident-item {
  padding: 14px 16px;
}

.metric-chip {
  min-width: 130px;
}

.metric-value {
  display: block;
  margin-top: 4px;
  font-weight: 600;
}

.sparkline {
  height: 120px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(212, 242, 208, 0.35), rgba(212, 242, 208, 0.08)),
    #fffdfa;
  border: 1px solid var(--line);
  padding: 16px;
}

.sparkline svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }

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

@media (max-width: 640px) {
  .page-shell {
    padding: 16px;
  }

  .panel,
  .hero {
    padding: 20px;
    border-radius: 20px;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }
}
