:root {
    --ground: #f4f6f6;
    --surface: #ffffff;
    --surface-sunk: #fafbfb;
    --line: #dde4e4;
    --line-soft: #eaeeee;
    --ink: #12181c;
    --ink-soft: #4a575e;
    --ink-faint: #79878e;
    --accent: #1c6b66;
    --ok: #2e8a58;
    --ok-soft: #7bbd97;
    --warn: #b5852f;
    --down: #b0453c;
    --ok-wash: #e4f0ea;
    --shadow: 0 1px 1px rgba(18, 24, 28, .04), 0 10px 28px -20px rgba(18, 24, 28, .22);
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --ground: #0e1316;
      --surface: #151b1f;
      --surface-sunk: #111719;
      --line: #242e33;
      --line-soft: #1c2428;
      --ink: #e6eced;
      --ink-soft: #9fadb3;
      --ink-faint: #6b7980;
      --accent: #46b2a9;
      --ok: #46a86f;
      --ok-soft: #2d6b48;
      --warn: #cb9d51;
      --down: #cf6459;
      --ok-wash: #1a2b22;
      --shadow: 0 1px 1px rgba(0, 0, 0, .35), 0 10px 28px -20px rgba(0, 0, 0, .8);
    }
  }

  :root[data-theme="dark"] {
    --ground: #0e1316;
    --surface: #151b1f;
    --surface-sunk: #111719;
    --line: #242e33;
    --line-soft: #1c2428;
    --ink: #e6eced;
    --ink-soft: #9fadb3;
    --ink-faint: #6b7980;
    --accent: #46b2a9;
    --ok: #46a86f;
    --ok-soft: #2d6b48;
    --warn: #cb9d51;
    --down: #cf6459;
    --ok-wash: #1a2b22;
    --shadow: 0 1px 1px rgba(0, 0, 0, .35), 0 10px 28px -20px rgba(0, 0, 0, .8);
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  .wrap { max-width: 780px; margin: 0 auto; padding: 0 24px 80px; }

  header.top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; flex-wrap: wrap;
    padding: 30px 0 22px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 36px;
  }

  .brand {
    font-family: var(--mono);
    font-size: 15px; font-weight: 600; letter-spacing: -.015em;
    display: flex; align-items: center; gap: 9px;
  }
  .brand .mark {
    width: 16px; height: 16px; flex: none;
    display: block;
  }
  .brand .sub { color: var(--ink-faint); font-weight: 400; }

  nav.meta {
    display: flex; gap: 18px;
    font-family: var(--mono); font-size: 12px; color: var(--ink-faint);
  }

  .head-row {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 28px; flex-wrap: wrap; margin-bottom: 30px;
  }

  h1 {
    font-size: clamp(25px, 4.2vw, 32px);
    font-weight: 600; letter-spacing: -.024em; line-height: 1.16;
    margin: 12px 0 12px; text-wrap: balance; max-width: 22ch;
  }

  .lede { color: var(--ink-soft); max-width: 56ch; margin: 0; font-size: 14.5px; }

  .pill {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .04em;
    padding: 5px 11px 5px 9px; border-radius: 999px;
    background: var(--ok-wash); color: var(--ok);
    border: 1px solid color-mix(in srgb, var(--ok) 28%, transparent);
  }
  .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); position: relative; flex: none; }
  .dot::after {
    content: ""; position: absolute; inset: -4px; border-radius: 50%;
    border: 1px solid var(--ok); opacity: 0; animation: ping 2.8s ease-out infinite;
  }
  @keyframes ping { 0% { transform: scale(.5); opacity: .65; } 70% { transform: scale(1.6); opacity: 0; } 100% { opacity: 0; } }

  .probe {
    font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint);
    text-align: right; padding-top: 4px; white-space: nowrap;
  }
  .probe b { color: var(--ink-soft); font-weight: 500; font-variant-numeric: tabular-nums; }

  .card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 10px; box-shadow: var(--shadow);
  }

  section.chart { padding: 20px 20px 16px; margin-bottom: 14px; }

  .chart-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 20px; flex-wrap: wrap; margin-bottom: 18px;
  }
  .node { font-family: var(--mono); font-size: 13px; font-weight: 500; }
  .node em {
    display: block; font-family: var(--sans); font-style: normal;
    font-size: 12px; color: var(--ink-faint); margin-top: 3px;
  }
  .figure {
    font-family: var(--mono); font-variant-numeric: tabular-nums;
    font-size: 29px; font-weight: 500; letter-spacing: -.03em; line-height: 1; text-align: right;
  }
  .figure small {
    display: block; font-family: var(--sans);
    font-size: 10.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink-faint); margin-top: 7px;
  }

  .plot { position: relative; padding-bottom: 1px; }
  .plot::before {
    content: ""; position: absolute; left: 0; right: 0; top: 33%;
    border-top: 1px dashed var(--line); pointer-events: none;
  }
  .bars { display: flex; align-items: flex-end; gap: 2px; height: 66px; position: relative; }
  .bar {
    flex: 1 1 0; min-width: 3px; border-radius: 2px 2px 1px 1px;
    background: var(--ok-soft);
    transform-origin: bottom;
    animation: rise .55s cubic-bezier(.2, .75, .3, 1) both;
    transition: background .12s;
  }
  .bar.warn { background: var(--warn); }
  .bar.down { background: var(--down); }
  .bar:hover { background: var(--ink-soft); }
  @keyframes rise { from { transform: scaleY(.04); opacity: .25; } to { transform: scaleY(1); opacity: 1; } }

  .baseline { border-top: 1px solid var(--line); margin-top: 6px; }

  .axis {
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--mono); font-size: 11px; color: var(--ink-faint);
    margin-top: 9px;
  }
  .legend { display: flex; gap: 14px; }
  .legend span { display: flex; align-items: center; gap: 5px; }
  .legend i { width: 7px; height: 7px; border-radius: 2px; display: block; }

  .strip {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    margin-bottom: 34px; overflow: hidden;
  }
  .strip div {
    padding: 14px 18px; border-right: 1px solid var(--line-soft);
    background: var(--surface-sunk);
  }
  .strip div:last-child { border-right: 0; }
  .strip dt {
    font-family: var(--sans); font-size: 10.5px; font-weight: 500;
    letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint);
  }
  .strip dd {
    margin: 5px 0 0; font-family: var(--mono); font-size: 17px;
    font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  }
  .strip dd span { font-size: 11px; color: var(--ink-faint); letter-spacing: 0; }

  h2 {
    font-family: var(--sans); font-size: 10.5px; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint);
    margin: 0 0 12px;
  }
  section.block { margin-bottom: 32px; }

  ul.rows {
    list-style: none; margin: 0; padding: 0;
    border: 1px solid var(--line); border-radius: 10px;
    overflow: hidden; background: var(--surface);
  }
  ul.rows li {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft);
  }
  ul.rows li:last-child { border-bottom: 0; }
  .svc { font-family: var(--mono); font-size: 13px; }
  .svc em {
    display: block; font-family: var(--sans); font-style: normal;
    font-size: 12px; color: var(--ink-faint); margin-top: 2px;
  }
  .state {
    font-family: var(--mono); font-size: 11px; letter-spacing: .03em;
    display: flex; align-items: center; gap: 7px; flex: none; color: var(--ok);
  }
  .state.warn { color: var(--warn); }
  .state.idle { color: var(--ink-faint); }
  .state i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: block; }

  dl.log { margin: 0; }
  dl.log div {
    display: grid; grid-template-columns: 88px 1fr; gap: 18px;
    padding: 11px 0; border-bottom: 1px solid var(--line-soft);
  }
  dl.log div:last-child { border-bottom: 0; }
  dl.log dt {
    font-family: var(--mono); font-size: 12px; color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
  }
  dl.log dd { margin: 0; font-size: 14px; color: var(--ink-soft); }
  dl.log dd b { color: var(--ink); font-weight: 500; }

  footer {
    border-top: 1px solid var(--line); padding-top: 18px;
    font-family: var(--mono); font-size: 11px; color: var(--ink-faint);
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  }

  .tip {
    position: fixed; pointer-events: none; z-index: 5;
    background: var(--ink); color: var(--ground);
    font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums;
    padding: 5px 8px; border-radius: 4px; white-space: nowrap;
    opacity: 0; transition: opacity .1s;
  }
  .tip.on { opacity: 1; }

  @media (prefers-reduced-motion: reduce) {
    .bar { animation: none; }
    .dot::after { animation: none; }
  }

/* ---- shared nav + inner pages ---- */
nav.meta a {
  color: var(--ink-faint);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .12s, border-color .12s;
}
nav.meta a:hover { color: var(--ink); border-bottom-color: var(--line); }
nav.meta a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
nav.meta a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.brand a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 9px; }
.brand a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }

.page-head { margin-bottom: 34px; }
.page-head h1 { max-width: 26ch; margin-top: 6px; }
.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent);
}

h3 {
  font-size: 15px; font-weight: 600; letter-spacing: -.012em;
  margin: 0 0 8px;
}
.prose { color: var(--ink-soft); font-size: 14.5px; max-width: 62ch; }
.prose code {
  font-family: var(--mono); font-size: .88em;
  background: var(--surface-sunk); border: 1px solid var(--line-soft);
  border-radius: 4px; padding: 1px 5px;
}

pre {
  margin: 0; padding: 14px 16px;
  background: var(--surface-sunk); border: 1px solid var(--line);
  border-radius: 8px; overflow-x: auto;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  color: var(--ink-soft);
}
pre b { color: var(--ink); font-weight: 500; }
pre .c { color: var(--ink-faint); }
pre .s { color: var(--accent); }

.endpoint {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--mono); font-size: 13px; margin-bottom: 6px; flex-wrap: wrap;
}
.verb {
  font-size: 10.5px; font-weight: 500; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 4px;
  background: var(--ok-wash); color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 26%, transparent);
}
.verb.ws { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

.stack { display: grid; gap: 26px; }

table {
  width: 100%; border-collapse: collapse; font-size: 14px;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
thead th {
  text-align: left; font-family: var(--sans); font-size: 10.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint);
  padding: 10px 14px; background: var(--surface-sunk);
  border-bottom: 1px solid var(--line);
}
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
tbody td:nth-child(2) { color: var(--ink-soft); }
.tablewrap { overflow-x: auto; border-radius: 10px; }

.rel { display: grid; gap: 0; }
.rel article {
  display: grid; grid-template-columns: 132px 1fr; gap: 22px;
  padding: 20px 0; border-bottom: 1px solid var(--line-soft);
}
.rel article:last-child { border-bottom: 0; }
.rel .ver {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
}
.rel .ver time {
  display: block; font-size: 11.5px; color: var(--ink-faint); margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.rel .tag {
  display: inline-block; margin-top: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .05em;
  padding: 2px 6px; border-radius: 4px;
  color: var(--ink-faint); border: 1px solid var(--line);
}
.rel ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 14px; }
.rel ul li { margin-bottom: 5px; }
.rel ul li:last-child { margin-bottom: 0; }
.rel code {
  font-family: var(--mono); font-size: .86em;
  background: var(--surface-sunk); border: 1px solid var(--line-soft);
  border-radius: 4px; padding: 1px 4px;
}

@media (max-width: 560px) {
  .rel article { grid-template-columns: 1fr; gap: 10px; }
  dl.log div { grid-template-columns: 1fr; gap: 4px; }
}

.bar.nodata { background: var(--line); }
.bar.nodata:hover { background: var(--ink-faint); }

section.chart + section.chart { margin-top: 14px; }
.pill.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.pill.warn .dot, .pill.warn .dot::after { background: var(--warn); border-color: var(--warn); }
.pill.down { background: color-mix(in srgb, var(--down) 14%, transparent); color: var(--down); border-color: color-mix(in srgb, var(--down) 32%, transparent); }
.pill.down .dot, .pill.down .dot::after { background: var(--down); border-color: var(--down); }
#charts { margin-bottom: 34px; }
