/* DepMesh console. Color roles follow the validated reference palette:
   single-series charts use series-1 blue; text wears text tokens, never the
   series color. Light and dark are both explicitly selected values. */

:root {
  --surface-0: #f6f6f4;
  --surface-1: #fcfcfb;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --border: #e2e1dc;
  --series-1: #2a78d6;
  --danger: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface-0: #131312;
    --surface-1: #1a1a19;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --border: #33322f;
    --series-1: #3987e5;
    --danger: #e66767;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--surface-0);
  color: var(--text-primary);
}
a { color: var(--series-1); }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 1.4rem;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand span { color: var(--series-1); }
.topbar nav { display: flex; gap: 1rem; align-items: center; }
.topbar .who { color: var(--text-secondary); font-size: 0.9rem; }

main { max-width: 880px; margin: 0 auto; padding: 1.5rem 1.4rem 4rem; }

h1 { font-size: 1.5rem; margin: 1rem 0 0.5rem; }
h2 { font-size: 1.05rem; margin: 0 0 0.6rem; }
.lede { color: var(--text-secondary); max-width: 46rem; }
.fineprint { color: var(--text-secondary); font-size: 0.82rem; }

/* inline-flex, not inline-block: the sign-in button carries the GitHub mark,
   and a baseline-aligned icon sits visibly low next to the label. */
.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  /* An inline-flex box takes its baseline from its first item, so the button
     carrying the mark would otherwise sit a few pixels off from the plain
     "Set it up" beside it. */
  vertical-align: middle;
  padding: 0.45rem 1rem; border-radius: 6px;
  background: var(--series-1); color: #fff; text-decoration: none;
  border: none; font: inherit; cursor: pointer;
}
.button.danger { background: var(--danger); font-size: 0.82rem; padding: 0.25rem 0.7rem; }
.button.ghost { background: transparent; color: var(--series-1); border: 1px solid var(--border); }

/* Sized in em so the mark tracks the label, and filled with currentColor so it
   is white on the blue button and the link color in running text. */
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* Landing page */
.landing h1 { font-size: 2rem; max-width: 24em; line-height: 1.2; }
.landing .lede { font-size: 1.1rem; }
.explain { max-width: 46rem; }
.explain h2 { font-size: 1.15rem; margin-top: 1.6rem; }
.explain p { color: var(--text-primary); }
.verdicts { list-style: none; padding: 0; max-width: 46rem; }
.verdicts li { padding: 0.3rem 0; }
.v {
  display: inline-block; min-width: 5.4em; text-align: center;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.1rem 0.5rem; border-radius: 4px; margin-right: 0.5rem;
  color: #fff;
}
.v.adopt { background: #008300; }      /* status green */
.v.caution { background: #b06a00; }    /* status amber, ships with a label (never color alone) */
.v.reject { background: var(--danger); }

.steps { max-width: 46rem; padding-left: 1.2rem; }
.steps li { margin: 0.8rem 0; }

/* "What signing in gives you". Check marks are decorative and sit in the
   padding, so the wrapped second line stays aligned with the first. */
.perks { list-style: none; padding: 0; max-width: 46rem; }
.perks li { position: relative; padding: 0.3rem 0 0.3rem 1.5rem; }
.perks li::before {
  content: "✓"; position: absolute; left: 0; top: 0.3rem;
  color: var(--series-1); font-weight: 700;
}

/* Tabs */
/* One card per vetted ecosystem. The number of them changes without this
   repository being touched, so the grid is sized by content rather than by a
   column count that would need revisiting. */
.ecosystems {
  list-style: none; padding: 0; margin: 0.8rem 0; max-width: 46rem;
  display: grid; gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}
.ecosystems li {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.5rem 0.7rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.ecosystems span { color: var(--text-secondary); font-size: 0.82rem; }

.tabs { display: flex; gap: 0.3rem; border-bottom: 1px solid var(--border); margin-top: 1rem; flex-wrap: wrap; }
.tabs [role="tab"] {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-secondary); font: inherit; font-weight: 600;
  padding: 0.5rem 0.9rem; cursor: pointer; margin-bottom: -1px;
}
.tabs [role="tab"][aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--series-1); }
.tabs [role="tab"]:hover { color: var(--text-primary); }
.tabpanels { max-width: 46rem; }
.tabpanels [data-panel] { padding-top: 0.8rem; }

.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem; margin: 1rem 0;
}
.tile {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.8rem 1rem;
}
.tile .value {
  font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile .value.text { font-size: 1.15rem; } /* non-numeric values (names, dates) */
.tile .label { color: var(--text-secondary); font-size: 0.82rem; }

.card, .chart-card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 8px; padding: 1rem 1.1rem; margin: 1rem 0;
}
figure.chart-card { position: relative; }
figcaption { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 0.6rem; }

/* Single-series bar chart: thin marks, 2px gaps via column gap, 4px rounded
   data ends (top only), baseline-anchored, recessive axis text. */
.chart {
  display: flex; align-items: flex-end; gap: 2px;
  height: 140px; padding-top: 4px;
  border-bottom: 1px solid var(--border);
}
.chart .bar {
  flex: 1 1 0; min-width: 3px;
  background: var(--series-1);
  border-radius: 4px 4px 0 0;
}
.chart .bar.zero { background: transparent; }
.chart .bar:hover { filter: brightness(1.15); }
.axis {
  display: flex; justify-content: space-between;
  color: var(--text-secondary); font-size: 0.72rem; margin-top: 0.25rem;
}
.tooltip {
  position: absolute; pointer-events: none;
  background: var(--text-primary); color: var(--surface-1);
  padding: 0.25rem 0.55rem; border-radius: 5px; font-size: 0.78rem;
  transform: translate(-50%, -130%);
  white-space: nowrap;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.42rem 0.5rem; border-bottom: 1px solid var(--border); }
th { color: var(--text-secondary); font-weight: 600; font-size: 0.8rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }

pre {
  background: var(--surface-0); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.7rem 0.9rem; overflow-x: auto; font-size: 0.82rem;
}
code { font-size: 0.86em; }
