:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #66716d;
  --line: #d8ded8;
  --surface: #f6f8f4;
  --panel: #ffffff;
  --accent: #226b5f;
  --amber: #a65f00;
}

* { box-sizing: border-box; }

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

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

.topline {
  display: grid;
  gap: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.topline p,
.topline span {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 22px 0;
}

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

.metric {
  padding: 14px;
}

.metric strong {
  display: block;
  font-size: 1.6rem;
  color: var(--accent);
}

.metric span {
  color: var(--muted);
  font-size: 0.86rem;
}

.rows {
  display: grid;
  gap: 12px;
}

.row {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.row-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.row h2 {
  margin: 0;
  font-size: 1.25rem;
}

.state {
  color: var(--amber);
  font-size: 0.85rem;
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.cell {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.cell span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 4px;
}

code {
  display: block;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  background: #eef3ee;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .row-header { display: grid; }
  .state { white-space: normal; }
}
