:root {
  color-scheme: light;
  --paper: #faf7f2;
  --card: #ffffff;
  --ink: #1f1a14;
  --ink-2: #4f463b;
  --ink-3: #8a8378;
  --line: #e8e1d6;
  --line-strong: #d7cbbb;
  --muted: #f3ede2;
  --ok: #1f7a3a;
  --warn: #b25e0a;
  --info: #2f5c8a;
  --err: #b23232;
  --shadow: 0 14px 34px rgba(31, 26, 20, 0.07);
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 0 14px;
  text-decoration: none;
}

button:hover,
.button-link:hover {
  border-color: var(--ink-3);
}

code {
  font-family: var(--font-mono);
}

.shell {
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.topbar,
.brand,
.top-actions,
.status-row,
.status-pills,
.install,
.section-head,
.card-head,
.bar-row,
.legend-row {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.brand {
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1;
}

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

h1 {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.05;
}

.brand p {
  color: var(--ink-3);
  font-size: 14px;
}

.status-row {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.status-pills {
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-3);
  font-size: 12px;
  padding: 4px 10px;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 7px;
}

.pill.ok {
  border-color: rgba(31, 122, 58, 0.24);
  color: var(--ok);
}

.pill.warn {
  border-color: rgba(178, 94, 10, 0.24);
  color: var(--warn);
}

.pill.info {
  border-color: rgba(47, 92, 138, 0.24);
  color: var(--info);
}

.pill.bad {
  border-color: rgba(178, 50, 50, 0.24);
  color: var(--err);
}

.status-meta,
.desc,
.metric-sub,
.card-head span,
.muted {
  color: var(--ink-3);
}

.status-meta {
  font-size: 12px;
  white-space: nowrap;
}

.install,
.metric,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.install {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  margin-bottom: 26px;
}

.eyebrow,
.metric-label {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cmd {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  padding: 0 12px;
}

.prompt {
  color: var(--ink-3);
  font-family: var(--font-mono);
  margin-right: 9px;
}

.cmd code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.section {
  margin-top: 14px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
}

.section-head span {
  color: var(--ink-3);
  font-size: 12px;
}

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

.metric {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 18px;
}

.metric::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.metric-value {
  margin-top: 13px;
  font-family: var(--font-serif);
  font-size: 46px;
  font-weight: 400;
  line-height: 0.95;
}

.metric-sub {
  margin-top: 12px;
  font-size: 12px;
}

.charts {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.primary-charts {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
}

.secondary-charts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  min-width: 0;
  padding: 16px;
}

.card-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-head h3 {
  font-size: 14px;
  font-weight: 700;
}

.card-head span {
  font-size: 12px;
  white-space: nowrap;
}

.area-card {
  min-height: 220px;
}

.area-chart {
  display: block;
  width: 100%;
  height: 190px;
}

.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-axis {
  fill: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
}

.chart-area {
  fill: rgba(47, 92, 138, 0.12);
}

.chart-line {
  fill: none;
  stroke: var(--info);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-dot {
  fill: var(--card);
  stroke: var(--info);
  stroke-width: 2;
}

.area-foot {
  display: flex;
  justify-content: space-between;
  color: var(--ink-3);
  font-size: 11px;
  padding-left: 34px;
  padding-right: 10px;
}

.bar-list {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(112px, 0.72fr) minmax(0, 1fr) 34px;
  gap: 10px;
  min-width: 0;
}

.bar-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-name code {
  font-size: 12px;
}

.bar-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: var(--muted);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
}

.bar-num {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 15px;
  text-align: right;
}

.activity-card {
  padding-bottom: 10px;
}

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

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

th,
td {
  border-top: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

td {
  color: var(--ink-2);
  font-size: 13px;
}

td code {
  color: var(--ink);
  font-size: 12px;
}

.tag,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--ink-2);
  font-size: 12px;
  padding: 3px 8px;
  white-space: nowrap;
}

.status.clean {
  background: rgba(31, 122, 58, 0.08);
  color: var(--ok);
}

.status.warn {
  background: rgba(178, 94, 10, 0.08);
  color: var(--warn);
}

@media (max-width: 940px) {
  .metrics,
  .primary-charts,
  .secondary-charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .install {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 20px, 1120px);
    padding-top: 18px;
  }

  .topbar,
  .status-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .metrics,
  .primary-charts,
  .secondary-charts {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: minmax(92px, 0.72fr) minmax(0, 1fr) 30px;
  }
}
