:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --ink: #15201b;
  --muted: #5e6a64;
  --line: #d9ded8;
  --green: #1c7c54;
  --amber: #b7791f;
  --red: #b83232;
  --green-bg: #e9f5ee;
  --amber-bg: #fff5dd;
  --red-bg: #fae9e8;
  --stale-bg: #ecefed;
  --shadow: 0 1px 2px rgba(21, 32, 27, 0.08);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.topbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a {
  border-radius: 6px;
  color: var(--muted);
  padding: 8px 10px;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: #eef2ef;
  color: var(--ink);
}

.shell {
  margin: 0 auto;
  max-width: 1120px;
  padding: 32px 24px 56px;
}

.summary {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 24px;
}

.kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 40px;
  line-height: 1.1;
  margin-bottom: 10px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
}

.lede {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 0;
  max-width: 680px;
}

.signal {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 10px;
  min-width: 160px;
  padding: 14px 16px;
}

.signal-dot {
  background: var(--muted);
  border-radius: 999px;
  display: inline-block;
  height: 16px;
  width: 16px;
}

.signal-state {
  font-size: 18px;
  font-weight: 700;
}

.state-green .signal-dot,
.state-green .tag-state {
  background: var(--green);
}

.state-amber .signal-dot,
.state-amber .tag-state {
  background: var(--amber);
}

.state-red .signal-dot,
.state-red .tag-state {
  background: var(--red);
}

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

.metric,
.panel,
.indicator,
.disclaimer,
.banner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 14px;
}

.metric span,
.indicator-body span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.metric strong {
  display: block;
  font-size: 20px;
  margin-top: 4px;
}

.panel {
  margin-bottom: 20px;
  padding: 20px;
}

.panel p:last-child {
  margin-bottom: 0;
}

.banner {
  border-color: #e0b75f;
  background: var(--amber-bg);
  color: #5d3b00;
  margin-bottom: 20px;
  padding: 14px 16px;
}

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

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

.indicator-list {
  display: grid;
  gap: 12px;
}

.indicator {
  border-left: 6px solid var(--line);
  padding: 16px;
}

.indicator.state-green {
  border-left-color: var(--green);
}

.indicator.state-amber {
  border-left-color: var(--amber);
}

.indicator.state-red {
  border-left-color: var(--red);
}

.indicator.is-stale {
  background: var(--stale-bg);
  color: #56615b;
}

.indicator-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.indicator-head h3 {
  margin-bottom: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: end;
}

.tag {
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
}

.tag-stale {
  background: #64716a;
}

.indicator-body {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.2fr 1fr 0.8fr 1fr;
}

.indicator-body strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.indicator-body a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.note {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 0;
}

.disclaimer {
  color: var(--muted);
  font-size: 14px;
  margin-top: 20px;
  padding: 16px;
}

.text-page {
  max-width: 900px;
}

.stack-table {
  border-collapse: collapse;
  width: 100%;
}

.stack-table th,
.stack-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.stack-table th {
  background: #f1f4f1;
}

.telemetry-notice {
  align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--line);
  bottom: 0;
  box-shadow: 0 -2px 8px rgba(21, 32, 27, 0.12);
  display: flex;
  gap: 16px;
  left: 0;
  padding: 14px 24px;
  position: fixed;
  right: 0;
  z-index: 20;
}

.telemetry-notice p {
  color: var(--muted);
  flex: 1;
  font-size: 14px;
  margin: 0;
}

.telemetry-notice button {
  background: var(--ink);
  border: 0;
  border-radius: 6px;
  color: var(--surface);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 8px 14px;
}

@media (max-width: 760px) {
  .topbar {
    align-items: start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    position: static;
  }

  .shell {
    padding: 24px 16px 40px;
  }

  .summary {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 32px;
  }

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

  .section-head,
  .indicator-head {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .metrics,
  .indicator-body {
    grid-template-columns: 1fr;
  }

  .nav {
    width: 100%;
  }

  .telemetry-notice {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 16px;
  }
}
