* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: var(--c-ground);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: var(--t-base);
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
}
.top-nav {
  background-color: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
  padding: var(--s-3) var(--s-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
}
.brand-row { display: flex; align-items: center; gap: var(--s-2); white-space: nowrap; }
.brand-name { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--c-ink); }
.nav-ctx { font-family: var(--f-mono); letter-spacing: 0; font-size: 11px; line-height: 16px; color: var(--c-ink-2); }
.nav-right { display: flex; align-items: center; gap: var(--s-3); white-space: nowrap; }
.btn {
  height: 32px;
  padding: 0 var(--s-3);
  border-radius: var(--r-ctl);
  font-family: var(--f-sans);
  font-size: var(--t-label);
  line-height: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--c-line-strong);
  background-color: var(--c-surface);
  color: var(--c-ink);
  cursor: pointer;
}
.btn--primary {
  background-color: var(--c-ink);
  border-color: var(--c-ink);
  color: var(--c-on-accent);
}
.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--s-6);
}
.ledger-sheet {
  background-color: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.summary-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--c-line);
}
.metric-cell {
  padding: var(--s-4) var(--s-5);
  border-right: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-cell:last-child { border-right: none; }
.metric-label { font-size: var(--t-label); line-height: 16px; color: var(--c-ink-2); }
.metric-val-lg { font-size: 28px; line-height: 32px; font-weight: 600; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.metric-val { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.metric-sub { font-size: var(--t-label); line-height: 16px; color: var(--c-ink-3); }
.workbench-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.pane {
  border-right: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
}
.pane:last-child { border-right: none; }
.pane-hdr {
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--c-line);
  background-color: var(--c-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pane-title { font-size: var(--t-sm); line-height: 20px; font-weight: 600; color: var(--c-ink); }
.pane-body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); }
.section-box {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.box-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--t-sm);
  line-height: 20px;
  font-weight: 600;
  color: var(--c-ink);
}
.mono-code { font-family: var(--f-mono); letter-spacing: 0; font-size: 11px; line-height: 16px; color: var(--c-ink-2); }
.status-ok { color: var(--c-ok); font-weight: 500; font-size: var(--t-label); line-height: 16px; }
.status-warn { color: var(--c-warn); font-weight: 500; font-size: var(--t-label); line-height: 16px; }
.kv-table { width: 100%; border-collapse: collapse; font-size: var(--t-label); line-height: 18px; }
.kv-table td { padding: 8px 0; border-bottom: 1px solid var(--c-line-soft); vertical-align: top; }
.kv-table tr:last-child td { border-bottom: none; }
.kv-key { color: var(--c-ink-2); width: 136px; white-space: nowrap; }
.kv-val { color: var(--c-ink); overflow-wrap: anywhere; word-break: break-word; }
.kv-val--mono { font-family: var(--f-mono); letter-spacing: 0; font-size: 11px; color: var(--c-ink); overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 960px) {
  .summary-band { grid-template-columns: repeat(2, 1fr); }
  .workbench-grid { grid-template-columns: 1fr; }
  .pane { border-right: none; border-bottom: 1px solid var(--c-line); }
  .pane:last-child { border-bottom: none; }
}
