:root {
  color-scheme: light;
  --ink: #1c2329;
  --muted: #5c6670;
  --line: #d8dee4;
  --surface: #ffffff;
  --band: #f4f7f8;
  --accent: #0f6b6e;
  --accent-strong: #114f63;
  --warn: #a24814;
  --good: #237144;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--band);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(16px, 4vw, 48px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 720;
}

h2 {
  font-size: 1rem;
}

.topbar p,
.panel-header span,
.meta,
.empty {
  color: var(--muted);
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

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

main {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

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

.metric {
  padding: 16px;
}

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

.panel {
  margin-top: 16px;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.event-list {
  display: grid;
  gap: 0;
}

.event {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.event:last-child {
  border-bottom: 0;
}

.event-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.76rem;
  color: #fff;
  background: var(--accent-strong);
}

.badge.changed {
  background: var(--warn);
}

.changes {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.92rem;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.source-links a {
  color: var(--accent-strong);
  font-weight: 700;
}

.empty {
  padding: 18px 16px;
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
