:root {
  --ink: #202922;
  --muted: #565e54;
  --paper: #f5f4ee;
  --surface: #fffefa;
  --edge: #dedfd4;
  --accent: #964218;
}

body {
  background: var(--paper);
  color: var(--ink);
}

.page-width { max-width: 1140px; }

.topbar {
  padding: 1.05rem 0;
  background: #222b24;
  border-bottom: 3px solid #bd683b;
}

.brand {
  color: #fffefa;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: .03em;
}

.brand:hover { color: #fffefa; }
.brand span { color: #e0a37c; }

h1 {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  line-height: 1;
  letter-spacing: -.06em;
  font-weight: 650;
}

.latest {
  display: grid;
  font-size: .88rem;
  gap: .15rem;
}

.latest time {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.surface {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: .85rem;
}

.metric-card {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  height: 100%;
  min-height: 8.5rem;
  padding: 1rem 1.2rem;
}

.metric-card:hover {
  border-color: var(--accent);
  color: inherit;
}

.metric-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
}

.metric-heading h2 {
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.25;
  margin: 0;
}

.card-arrow { color: var(--accent); }

.metric-value {
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.metric-unit, .status-code {
  color: var(--muted);
  font-size: .9rem;
  letter-spacing: normal;
}

.silo-card { background: #f5e5d5; border-color: #e8cfb9; }
.silo-meter { width: 100%; height: .75rem; }
.silo-meter::-webkit-meter-bar { background: #e3c9b0; border: 0; border-radius: 1rem; }
.silo-meter::-webkit-meter-optimum-value { background: var(--accent); border-radius: 1rem; }
.silo-meter::-moz-meter-bar { background: var(--accent); border-radius: 1rem; }

.status-value { display: flex; align-items: center; gap: .55rem; }
.status-dot { flex: 0 0 .65rem; height: .65rem; border-radius: 50%; background: #826341; }
.status-dot.is-running { background: #397545; }

.back-link { color: var(--accent); text-underline-offset: .2em; }
.back-link:hover { color: #71320f; }
.form-label { font-weight: 600; }

.btn-filter, .btn-filter:focus-visible {
  --bs-btn-color: white;
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: white;
  --bs-btn-hover-bg: #71320f;
  --bs-btn-hover-border-color: #71320f;
  --bs-btn-active-color: white;
  --bs-btn-active-bg: #71320f;
  --bs-btn-active-border-color: #71320f;
}

.form-select { border-color: #8a9183; }
:is(a, button, select):focus-visible { outline: 3px solid #1e6a78; outline-offset: 3px; }
.topbar a:focus-visible { outline-color: #e0a37c; }
.chart-panel, .empty-state { padding: clamp(1rem, 3vw, 1.75rem); }
.chart-frame { height: clamp(16rem, 42vh, 29rem); position: relative; }
.series-list { display: flex; flex-wrap: wrap; gap: .85rem 2rem; margin-bottom: 1.5rem; }
.series-entry { display: flex; gap: .6rem; color: var(--muted); font-size: .82rem; }
.series-label { color: var(--ink); font-size: .93rem; font-weight: 600; }
.series-count { color: var(--muted); font-weight: 400; }
.series-line { width: 1.5rem; flex-shrink: 0; margin-top: .65rem; border-top: 2px solid var(--accent); }
.comparison-line { border-top: 2px dashed #176271; }
.chart-empty { color: var(--muted); padding-block: 1.75rem; border-top: 1px solid var(--edge); }
