/* ==========================================================================
   Part 1: copied verbatim from theafeai/afe apps/web/src/styles.css (Ink,
   ADR 0015): the tokens, base rules and the components the site shows
   (buttons, theme switch, callouts, badges, confidence, gaps, timeline).
   Keep token values in sync with the app; do not edit them here.
   ========================================================================== */
/*
 * Afe design tokens. Direction "Ink" (ADR 0015, AFE-86): black and white, with
 * colour reserved for signal. Buttons, links and navigation are ink; status,
 * tools and confidence carry the only colours; one blue (--select) marks focus
 * and selection. Every stylesheet reads these; never hard-code a colour or size
 * in a page.
 *
 * --accent is the readable accent (links, accent text): ink.
 * --accent-solid / --on-accent fill primary buttons: ink, inverted in dark.
 * --select / --select-soft: focus rings, selected cells, highlights, active filters.
 *
 * Themes: light values on :root; dark values in two identical blocks, one for the
 * OS setting and one for the in-app choice (data-theme on <html>, see theme.ts).
 * design-system.test.ts checks that the two dark blocks match.
 */
:root {
  color-scheme: light;

  /* Neutrals */
  --bg: #ffffff;
  --sidebar: #fafafa;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --surface-3: #ebebeb;
  --border: #ebebeb;
  --border-strong: #d4d4d4;
  --text: #0a0a0a;
  --text-2: #3d3d3d;
  --muted: #666666;
  --faint: #a3a3a3;

  /* Accent: ink */
  --accent: #0a0a0a;
  --accent-solid: #0a0a0a;
  --accent-solid-hover: #2e2e2e;
  --on-accent: #ffffff;
  --accent-text: #ffffff;
  --accent-soft: #f0f0f0;

  /* Selection and focus: the one blue */
  --select: #2160e0;
  --select-soft: #ebf1fd;
  --accent-ring: rgba(33, 96, 224, 0.28);
  --focus: #2160e0;

  /* Signal */
  --ok: #167a3b;
  --ok-bg: #ecf8f0;
  --bad: #c0281b;
  --bad-bg: #fdf0ee;
  --warn: #8f5500;
  --warn-bg: #fff6e6;
  --warn-border: #efd09a;
  --recon: #a3215f;
  --recon-bg: #fcedf4;
  --backfill: #0a6e80;
  --backfill-bg: #e9f5f7;

  /* Confidence: green (certain) → lime (strong) → amber (probable) → red (weak) */
  --conf-certain: var(--ok);
  --conf-strong: #4a7012;
  --conf-probable: var(--warn);
  --conf-weak: var(--bad);
  --conf-ambiguous: var(--recon);
  --conf-conflict: var(--bad);
  --conf-unknown: var(--muted);
  --env-selected: var(--select-soft);
  --highlight: var(--select);
  --highlight-bg: var(--select-soft);

  /* Tool colours (ADR 0013): tool logos only; never status */
  --github: #6e7781;
  --argocd: #e2582a;
  --vercel: #000000;
  --terraform: #7b42bc;
  --afe: var(--text);

  /* Type */
  --font:
    "Instrument Sans Variable", "Instrument Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --mono:
    "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-xs: 0.75rem; /* 12px: overlines, table heads */
  --fs-sm: 0.8125rem; /* 13px: badges, labels, meta */
  --fs-md: 0.875rem; /* 14px: controls, dense rows */
  --fs-base: 0.9375rem; /* 15px: body */
  --fs-lg: 1.125rem; /* 18px: section and card titles */
  --fs-xl: 1.75rem; /* 28px: page titles */
  --lh: 1.55; /* body and running text */
  --lh-dense: 1.45; /* rows, cells, callouts */
  --lh-tight: 1.2; /* headings */

  /* Space, shape, depth, motion */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --control-h: 2.25rem;
  --shadow-xs: 0 0 0 0 transparent;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
  --sheen: transparent;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur: 120ms;

  /* Layout */
  --sidebar-w: 236px;
  --topbar-h: 0px;
  --sticky-top: 0px;

  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0a0a;
    --sidebar: #0a0a0a;
    --surface: #0f0f0f;
    --surface-2: #181818;
    --surface-3: #232323;
    --border: #262626;
    --border-strong: #3a3a3a;
    --text: #f5f5f5;
    --text-2: #c9c9c9;
    --muted: #9c9c9c;
    --faint: #5c5c5c;

    --accent: #f5f5f5;
    --accent-solid: #f5f5f5;
    --accent-solid-hover: #d6d6d6;
    --on-accent: #0a0a0a;
    --accent-text: #0a0a0a;
    --accent-soft: #1f1f1f;

    --select: #7ea8ff;
    --select-soft: rgba(80, 130, 255, 0.16);
    --accent-ring: rgba(126, 168, 255, 0.4);
    --focus: #7ea8ff;

    --ok: #5fd38a;
    --ok-bg: rgba(52, 199, 105, 0.12);
    --bad: #ff8b80;
    --bad-bg: rgba(240, 70, 60, 0.13);
    --warn: #f2b84f;
    --warn-bg: rgba(242, 166, 30, 0.11);
    --warn-border: rgba(242, 166, 30, 0.35);
    --recon: #f490c0;
    --recon-bg: rgba(236, 90, 160, 0.14);
    --backfill: #67d0dc;
    --backfill-bg: rgba(40, 180, 200, 0.12);

    --conf-strong: #a8d65e;

    --github: #9198a1;
    --argocd: #ff9466;
    --vercel: #ffffff;
    --terraform: #a983ff;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --sidebar: #0a0a0a;
  --surface: #0f0f0f;
  --surface-2: #181818;
  --surface-3: #232323;
  --border: #262626;
  --border-strong: #3a3a3a;
  --text: #f5f5f5;
  --text-2: #c9c9c9;
  --muted: #9c9c9c;
  --faint: #5c5c5c;

  --accent: #f5f5f5;
  --accent-solid: #f5f5f5;
  --accent-solid-hover: #d6d6d6;
  --on-accent: #0a0a0a;
  --accent-text: #0a0a0a;
  --accent-soft: #1f1f1f;

  --select: #7ea8ff;
  --select-soft: rgba(80, 130, 255, 0.16);
  --accent-ring: rgba(126, 168, 255, 0.4);
  --focus: #7ea8ff;

  --ok: #5fd38a;
  --ok-bg: rgba(52, 199, 105, 0.12);
  --bad: #ff8b80;
  --bad-bg: rgba(240, 70, 60, 0.13);
  --warn: #f2b84f;
  --warn-bg: rgba(242, 166, 30, 0.11);
  --warn-border: rgba(242, 166, 30, 0.35);
  --recon: #f490c0;
  --recon-bg: rgba(236, 90, 160, 0.14);
  --backfill: #67d0dc;
  --backfill-bg: rgba(40, 180, 200, 0.12);

  --conf-strong: #a8d65e;

  --github: #9198a1;
  --argocd: #ff9466;
  --vercel: #ffffff;
  --terraform: #a983ff;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Base ------------------------------------------------------------------------ */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
::selection {
  background: var(--accent-ring);
}
/* Ink links: the accent is the text colour, so links carry a quiet underline
   that darkens on hover. Buttons, nav and row links opt out with their classes. */
a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-color: currentColor;
}
p a,
.lede a,
.callout a,
.empty a,
.muted a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
code,
pre,
kbd,
samp {
  font-family: var(--mono);
  font-size: 0.9em;
  font-variant-ligatures: none;
  letter-spacing: 0;
}
h1,
h2,
h3 {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.011em;
  line-height: var(--lh-tight);
  text-wrap: balance;
}
h1 {
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-2);
}
h2 {
  font-size: var(--fs-lg);
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-3);
}
h3 {
  font-size: var(--fs-base);
  margin: var(--space-4) 0 var(--space-2);
}
p {
  text-wrap: pretty;
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-5) 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: var(--fs-md);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* Disclosures: a labelled toggle with a chevron, not the browser's arrow. */
details > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 550;
  color: var(--text);
  border-radius: var(--radius-sm);
}
details > summary::-webkit-details-marker {
  display: none;
}
details > summary::before {
  content: "";
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  margin: 0 0.15rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform var(--dur) var(--ease);
}
details[open] > summary::before {
  transform: rotate(45deg);
}
details > summary:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
  text-underline-offset: 0.2em;
}

/* The Afe wordmark (icons.tsx BrandMark): drawn in currentColor, sized by height. */
.brand-mark {
  height: 1.375rem;
  width: auto;
  flex: none;
  fill: currentColor;
}
/* Theme choice (System / Light / Dark) in the account area; see theme.ts. */
.theme-switch {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.theme-switch button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  height: 1.75rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.theme-switch .icon {
  width: 0.875rem;
  height: 0.875rem;
}
.theme-switch button:hover {
  color: var(--text);
}
.theme-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  font-weight: 550;
  box-shadow: var(--shadow-sm);
}
/* Buttons and forms (AFE-45) -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-size: var(--fs-md);
  font-weight: 550;
  line-height: 1;
  height: var(--control-h);
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.btn:hover {
  background: var(--surface-2);
  text-decoration: none;
}
.btn:active {
  background: var(--surface-3);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn[aria-busy="true"] {
  cursor: progress;
}
.btn-primary {
  background: var(--accent-solid);
  color: var(--on-accent);
  border-color: transparent;
}
.btn-primary:hover {
  background: var(--accent-solid-hover);
}
.btn-primary:active {
  background: var(--accent-solid);
}
.btn-danger {
  color: var(--bad);
}
.btn-danger:hover {
  background: var(--bad-bg);
  border-color: color-mix(in srgb, var(--bad) 45%, transparent);
}
.btn-ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--text-2);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}
.btn-icon {
  width: var(--control-h);
  padding: 0;
}
.btn-sm {
  height: 2rem;
  padding: 0 var(--space-3);
  font-size: var(--fs-sm);
}
.btn-sm.btn-icon {
  width: 2rem;
  padding: 0;
}
.btn-ghost.btn-danger {
  color: var(--muted);
}
.btn-ghost.btn-danger:hover {
  color: var(--bad);
  background: var(--bad-bg);
}
.btn-wide {
  width: 100%;
  margin-top: var(--space-4);
  height: 2.5rem;
}
.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 550;
  padding: 0;
}
.btn-link:hover {
  text-decoration: underline;
}
/* Callouts and states -------------------------------------------------------- */
.callout {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin: 0 0 var(--space-4);
  background: var(--surface);
  font-size: var(--fs-md);
  line-height: var(--lh-dense);
  color: var(--text-2);
}
.callout strong {
  color: var(--text);
  font-weight: 600;
}
.callout p {
  margin: 0.25rem 0;
}
.callout-error {
  border-color: color-mix(in srgb, var(--bad) 30%, transparent);
  background: var(--bad-bg);
}
.callout-error strong {
  color: var(--bad);
}
.callout-ok {
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
  background: var(--ok-bg);
}
.callout-gap {
  border-color: var(--warn-border);
  background: var(--warn-bg);
}
.callout-reconciled {
  border-color: color-mix(in srgb, var(--recon) 30%, transparent);
  background: var(--recon-bg);
}
.alert-tag {
  color: var(--bad);
  font-weight: 600;
}
/* Badges --------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 1.375rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  padding: 0 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
  vertical-align: middle;
  letter-spacing: 0;
}
/* Tools (ADR 0013, ADR 0015): neutral chip with the tool's logo in its colour.
   Rows stay neutral; the logo alone identifies the tool. */
.tool {
  background: var(--surface);
  color: var(--text-2);
  padding-left: 0.375rem;
}
.tool-mark {
  width: 0.875rem;
  height: 0.875rem;
  flex: none;
  fill: var(--tool, var(--muted));
}
.tool-mark-square {
  width: 0.5rem;
  height: 0.5rem;
  margin: 0 0.1875rem;
  border-radius: 2px;
  background: var(--tool, var(--muted));
}
.tool-github {
  --tool: var(--github);
}
.tool-argocd {
  --tool: var(--argocd);
}
.tool-vercel {
  --tool: var(--vercel);
}
.tool-terraform {
  --tool: var(--terraform);
}
.tool-afe {
  --tool: var(--afe);
}
.method-reconciliation {
  color: var(--recon);
  background: var(--recon-bg);
  border-color: transparent;
}
.method-backfill {
  color: var(--backfill);
  background: var(--backfill-bg);
  border-color: transparent;
}
.outcome-succeeded,
.outcome-failed,
.outcome-in_progress,
.outcome-pending {
  border-color: transparent;
  background: transparent;
  padding-left: 0.1rem;
}
.outcome-succeeded::before,
.outcome-failed::before,
.outcome-in_progress::before,
.outcome-pending::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
}
.outcome-succeeded {
  color: var(--ok);
}
.outcome-failed {
  color: var(--bad);
}
.outcome-in_progress,
.outcome-pending {
  color: var(--warn);
}
.outcome-in_progress::before,
.outcome-pending::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.health {
  background: transparent;
  border-color: transparent;
  padding-left: 0;
}
.health .dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--faint);
}
.health-healthy .dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-bg);
}
.health-degraded .dot,
.health-rate_limited .dot {
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-bg);
}
.health-unreachable .dot,
.health-unauthorized .dot,
.health-revoked .dot {
  background: var(--bad);
  box-shadow: 0 0 0 3px var(--bad-bg);
}
.status-revoked,
.status-suspended {
  color: var(--bad);
  background: var(--bad-bg);
  border-color: transparent;
}
.status-disconnected {
  color: var(--muted);
}
/* Gap flags are frequent (any gap after a placement went live), so they
   stay quiet: warn-coloured text with a hollow marker, no fill. The gap panel
   at the top of the page carries the loud version. */
.gap-badge {
  color: var(--warn);
  background: transparent;
  border-color: transparent;
  padding-left: 0.1rem;
}
.gap-badge::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 1px;
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 1.25px currentColor;
}
.alert-badge {
  color: var(--bad);
  background: var(--bad-bg);
  border-color: transparent;
  text-decoration: none;
}
a.alert-badge:hover {
  text-decoration: underline;
}

/* Confidence (AFE-46): a graded glyph (full → empty) plus the word. Confident
   states stay neutral; weak, ambiguous and conflicting ones are tinted. */
.badge.conf {
  --c: var(--conf-unknown);
  --p: 0%;
  text-transform: lowercase;
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
  padding-left: 0.35rem;
}
.badge.conf::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  flex: none;
  background: conic-gradient(var(--c) var(--p), transparent 0);
  box-shadow: inset 0 0 0 1.25px var(--c);
}
.badge.conf-certain {
  --c: var(--conf-certain);
  --p: 100%;
}
.badge.conf-strong {
  --c: var(--conf-strong);
  --p: 75%;
}
.badge.conf-probable {
  --c: var(--conf-probable);
  --p: 50%;
}
.badge.conf-weak {
  --c: var(--conf-weak);
  --p: 25%;
}
.badge.conf-ambiguous {
  --c: var(--conf-ambiguous);
}
.badge.conf-conflict {
  --c: var(--conf-conflict);
}
.badge.conf-weak,
.badge.conf-ambiguous,
.badge.conf-conflict {
  color: var(--c);
  background: color-mix(in srgb, var(--c) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--c) 30%, transparent);
}
.badge.conf-ambiguous::before {
  background: none;
  box-shadow: none;
  border: 1.25px dashed var(--c);
}
.badge.conf-conflict::before {
  background: linear-gradient(45deg, transparent 44%, var(--c) 44%, var(--c) 56%, transparent 56%);
}
.badge.conf-none {
  color: var(--muted);
}
.badge.conf-none::before {
  display: none;
}

/* Observation gaps: one panel, one row per connection */
.gap-banners .callout p {
  margin: 0;
}
.gap-list {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
  display: grid;
  border-top: 1px solid var(--warn-border);
}
.gap-list li {
  display: grid;
  grid-template-columns: minmax(10rem, 16rem) 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--warn-border) 55%, transparent);
}
.gap-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.gap-who {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.gap-why {
  color: var(--text-2);
}
@media (max-width: 640px) {
  .gap-list li {
    grid-template-columns: 1fr auto;
  }
  .gap-why {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Timeline ------------------------------------------------------------------- */
.day-heading {
  position: sticky;
  top: var(--sticky-top);
  background: var(--bg);
  margin: var(--space-5) 0 0;
  padding: var(--space-2) 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
  z-index: 2;
}
.events {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.event-row + .event-row {
  border-top: 1px solid var(--border);
}
.row-link {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  gap: var(--space-4);
  padding: var(--space-3);
  line-height: var(--lh-dense);
  color: inherit;
  text-decoration: none;
  align-items: start;
  transition: background var(--dur) var(--ease);
}
.row-link:hover {
  background: var(--surface-2);
  text-decoration: none;
}
.row-link:focus-visible {
  outline-offset: -2px;
}
.row-time {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  padding-top: 0.1rem;
}
.row-main {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}
.row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}
.row-title .action {
  font-family: var(--mono);
  font-weight: 500;
  font-size: var(--fs-md);
  word-break: break-word;
}
.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.125rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.row-meta strong {
  color: var(--text-2);
  font-weight: 550;
}
.row-note {
  font-size: var(--fs-sm);
  color: var(--muted);
}
.row-badges {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.event-row.row-reconciliation {
  background: var(--recon-bg);
}
.row-reconciliation .row-note {
  color: var(--recon);
}
.event-row.row-backfill {
  background: var(--backfill-bg);
}
.row-backfill .row-note {
  color: var(--backfill);
}
.row-gap {
  background: var(--warn-bg);
  box-shadow: inset 2px 0 0 var(--warn);
}
.row-gap .row-title {
  font-weight: 600;
  color: var(--warn);
}
.row-gap-closed {
  background: color-mix(in srgb, var(--warn-bg) 50%, transparent);
}
.row-has-gap td {
  background: var(--warn-bg);
}

/* Tables and key/value lists ------------------------------------------------ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: var(--space-4);
}
.table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--fs-md);
  font-variant-numeric: tabular-nums;
}
.table th,
.table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: var(--lh-dense);
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table th {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  white-space: nowrap;
}
.table tbody tr {
  transition: background var(--dur) var(--ease);
}
.table tbody tr:hover td {
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}
.table tr.row-reconciliation td {
  background: var(--recon-bg);
}
.table tr.row-backfill td {
  background: var(--backfill-bg);
}
