/* Shadow Ledger — app styles.
   Media-family ecosystem tokens in tokens.css drive this file.
   Editorial density, zero border-radius, tabular numerics, Playfair + Source Serif. */

/* ---------- Topbar (ecosystem strip) ----------
   Compact strip with Brian Louden attribution on the left and a dropdown on
   the right that covers viupdate's subdomain network + sibling sites. Uses
   <details>/<summary> so it's keyboard-accessible and works without JS. */
.sl-topbar {
  background: var(--sl-navy-deep);
  padding: 7px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 20;
}
.sl-topbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sl-topbar__pin { display: inline-flex; gap: 2px; flex-shrink: 0; }
.sl-pip { width: 14px; height: 3px; display: inline-block; }
.sl-pip--red { background: var(--sl-red); }
.sl-pip--white { background: rgba(255, 255, 255, 0.8); }
.sl-pip--blue { background: var(--sl-blue); }

.sl-topbar__attrib {
  color: rgba(255, 255, 255, 0.68);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.sl-topbar__attrib a {
  color: var(--sl-gold);
  font-weight: 600;
  border-bottom: none;
  margin-left: 2px;
}
.sl-topbar__attrib a:hover { color: #ffd780; }

/* Ecosystem dropdown */
.sl-topbar__menu { position: relative; flex-shrink: 0; }
.sl-topbar__menu > summary {
  list-style: none;
  cursor: pointer;
  padding: 2px 6px;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}
.sl-topbar__menu > summary::-webkit-details-marker { display: none; }
.sl-topbar__menu > summary:hover,
.sl-topbar__menu[open] > summary { color: var(--sl-gold); }
.sl-topbar__menu-chev {
  font-size: 9px;
  transition: transform 120ms;
}
.sl-topbar__menu[open] .sl-topbar__menu-chev { transform: rotate(180deg); }

.sl-topbar__menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--sl-navy-deep);
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-width: 280px;
  max-width: calc(100vw - 24px);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  z-index: 21;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  animation: sl-topbar-menu-in 120ms ease-out;
}
@keyframes sl-topbar-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sl-topbar__menu-group {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}
.sl-topbar__menu-group + .sl-topbar__menu-group {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
  padding-top: 8px;
}
.sl-topbar__menu-heading {
  font-family: var(--sl-font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sl-gold);
  padding: 4px 14px 6px;
}
.sl-topbar__menu-panel a {
  padding: 7px 14px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-bottom: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0.01em;
  font-family: var(--sl-font-body);
}
.sl-topbar__menu-panel a strong {
  font-family: var(--sl-font-display);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  letter-spacing: 0;
}
.sl-topbar__menu-panel a span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}
.sl-topbar__menu-panel a:hover {
  background: rgba(245, 183, 49, 0.08);
}
.sl-topbar__menu-panel a:hover strong { color: var(--sl-gold); }

/* Phone: tighten attribution (keep dropdown full) */
@media (max-width: 640px) {
  .sl-topbar { padding: 6px 12px; font-size: 10px; gap: 8px; }
  .sl-topbar__attrib { font-size: 10px; letter-spacing: 0.06em; }
  .sl-topbar__menu > summary { font-size: 10px; }
  .sl-topbar__menu-panel { min-width: 240px; }
}
@media (max-width: 420px) {
  /* Swap long attribution text for a single-word signature on ultra-narrow */
  .sl-topbar__attrib { font-size: 0; letter-spacing: 0; }
  .sl-topbar__attrib::before {
    content: "BY BRIAN LOUDEN";
    font-size: 10px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.68);
  }
  .sl-topbar__attrib a { display: none; }
}

/* ---------- Main container ---------- */
.sl-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 24px 24px;
}

/* ---------- Landing masthead + hero ----------
   The masthead echoes the OG card: cast-shadow wordmark on cream, set over
   faint horizontal ledger rules. Red margin line is implied by the hero
   border; the gold rule below the wordmark is the "ledger bottom line". */
.sl-masthead {
  text-align: center;
  padding: 24px 0 14px;
  position: relative;
}
.sl-masthead::before {
  /* Faint horizontal ledger rules behind the wordmark — taupe on cream */
  content: "";
  position: absolute;
  inset: 16px 0 14px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 34px,
    rgba(212, 200, 178, 0.55) 34px,
    rgba(212, 200, 178, 0.55) 35px
  );
  pointer-events: none;
  z-index: 0;
}
.sl-masthead > * { position: relative; z-index: 1; }
.sl-masthead__overline {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--sl-navy);
  margin-bottom: 10px;
}
.sl-masthead__overline::before,
.sl-masthead__overline::after {
  content: "·";
  margin: 0 8px;
  color: var(--sl-gold-ink);
}
.sl-masthead__title {
  font-family: var(--sl-font-display);
  font-size: clamp(44px, 9vw, 76px);
  font-weight: var(--sl-w-display-bold);
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--sl-navy);
  margin-bottom: 8px;
}
.sl-masthead__tagline {
  font-family: var(--sl-font-display);
  font-size: clamp(16px, 2vw, 20px);
  color: var(--sl-navy-deep);
  font-style: italic;
  font-weight: 500;
}
.sl-masthead::after {
  /* Gold ledger rule under the masthead */
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: var(--sl-gold);
  margin: 18px auto 0;
  position: relative;
  z-index: 1;
}

.sl-hero {
  margin: 28px 0 20px;
  padding: 18px 0;
  border-top: 1px solid var(--sl-border);
  border-bottom: 1px solid var(--sl-border);
}
.sl-hero__sentence {
  font-family: var(--sl-font-display);
  font-size: clamp(19px, 2.6vw, 23px);
  line-height: 1.35;
  color: var(--sl-navy);
  max-width: 44em;
}

/* ---------- Top-of-page chips strip ----------
   Two compact links right after the hero sentence that anchor to the full
   ask cards further down. Keeps the prime view (Explore tiles) above the
   fold while still surfacing the data-ask + workbench-application paths
   immediately. */
.sl-top-asks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}
.sl-top-asks__chip {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-left-width: 4px;
  text-decoration: none;
  color: var(--sl-ink);
  transition: background-color 120ms ease, transform 120ms ease;
}
.sl-top-asks__chip:hover { background: rgba(245, 183, 49, 0.08); transform: translateY(-1px); }
.sl-top-asks__chip:focus-visible { outline: 2px solid var(--sl-gold); outline-offset: 2px; }
.sl-top-asks__chip--data { border-left-color: var(--sl-gold); }
.sl-top-asks__chip--workbench { border-left-color: var(--sl-navy); }
.sl-top-asks__chip--workbench:hover { background: rgba(28, 58, 90, 0.05); }
.sl-top-asks__icon {
  font-family: var(--sl-font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--sl-ink-soft);
  width: 22px;
  text-align: center;
  flex: 0 0 auto;
}
.sl-top-asks__chip--data .sl-top-asks__icon { color: var(--sl-gold); }
.sl-top-asks__chip--workbench .sl-top-asks__icon { color: var(--sl-navy); }
.sl-top-asks__label {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.sl-top-asks__label strong {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: 15px;
  color: var(--sl-navy);
}
.sl-top-asks__sub {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--sl-ink-soft);
  margin-top: 2px;
  text-transform: uppercase;
}
.sl-top-asks__hint {
  margin: -10px 0 26px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--sl-ink-soft);
  font-style: italic;
  border-left: 2px solid var(--sl-gold);
  padding: 4px 0 4px 10px;
  max-width: 56em;
}
.sl-top-asks__hint strong { font-style: normal; color: var(--sl-navy); font-weight: 600; }
@media (max-width: 540px) {
  .sl-top-asks { gap: 8px; margin: 14px 0 18px; }
  .sl-top-asks__chip { padding: 10px 12px; flex: 1 1 100%; }
  .sl-top-asks__label strong { font-size: 14px; }
  .sl-top-asks__hint { margin: -8px 0 18px; font-size: 12px; }
}

/* ---------- Landing CTAs (data ask + investigator application) ----------
   Full cards live below the Explore tiles, anchored from the top chips.
   Two side-by-side panels on desktop, stacked on phone. Distinct accent
   color per card so readers can tell them apart at a glance. */
.sl-asks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 28px 0 32px;
}
.sl-ask {
  padding: 20px 22px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-left-width: 4px;
  scroll-margin-top: 16px;
}
.sl-ask--data      { border-left-color: var(--sl-gold); }
.sl-ask--workbench { border-left-color: var(--sl-navy); }
.sl-ask__kicker {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sl-ink-soft);
  margin: 0 0 6px;
}
.sl-ask__title {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: clamp(22px, 2.4vw, 26px);
  color: var(--sl-navy);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 10px;
}
.sl-ask__body {
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0 0 10px;
  color: var(--sl-ink);
}
.sl-ask__priority {
  background: linear-gradient(135deg, rgba(245, 183, 49, 0.14), rgba(245, 183, 49, 0.06));
  border: 1px solid rgba(245, 183, 49, 0.55);
  padding: 12px 14px;
  margin: 0 0 16px;
}
.sl-ask__priority-kicker {
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a5500;
  margin: 0 0 6px;
  font-weight: 600;
}
.sl-ask__priority-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--sl-ink);
}
.sl-ask__priority-body strong { color: var(--sl-navy); }
.sl-ask__priority-body em {
  display: block;
  margin-top: 6px;
  font-style: italic;
  color: #6a4500;
}

.sl-ask__list {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--sl-ink);
}
.sl-ask__list li { margin: 0 0 5px; }
.sl-ask__cta {
  font-size: 14px;
  line-height: 1.5;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--sl-border);
  color: var(--sl-ink-soft);
}
.sl-ask__cta a { color: var(--sl-navy); }
.sl-ask code {
  font-size: 12.5px;
  background: rgba(28, 58, 90, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
}
@media (max-width: 720px) {
  .sl-asks { grid-template-columns: 1fr; gap: 14px; margin: 20px 0 24px; }
  .sl-ask { padding: 16px 16px; }
  .sl-ask__title { font-size: 20px; }
  .sl-ask__body, .sl-ask__list, .sl-ask__cta { font-size: 14px; }
}

/* ---------- Landing tiles ---------- */
.sl-explore { margin: 32px 0 20px; }
.sl-explore h2,
.sl-sources h2,
.sl-source-category__title {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display);
  font-size: 22px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--sl-border-strong);
  padding-bottom: 6px;
}
.sl-tiles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.sl-tile {
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  transition: border-color 120ms, transform 120ms;
}
.sl-tile:hover { border-color: var(--sl-navy); }
.sl-tile a {
  display: block;
  padding: 14px 16px;
  color: inherit;
  border-bottom: none;
  text-decoration: none;
}
.sl-tile h3 {
  font-size: 18px;
  color: var(--sl-navy);
  margin-bottom: 4px;
  font-weight: var(--sl-w-display);
}
.sl-tile__stamp {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--sl-gold-ink);
  margin-bottom: 6px !important;
  font-variant-numeric: tabular-nums;
}
.sl-tile p {
  font-size: 14px;
  color: var(--sl-ink-soft);
  line-height: 1.5;
}
.sl-tile--muted a h3 { color: var(--sl-ink-soft); }

/* ---------- Sources table on landing ---------- */
.sl-sources { margin: 36px 0 20px; }
.sl-sources-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sl-sources-table caption {
  text-align: left;
  padding-bottom: 6px;
  color: var(--sl-ink-soft);
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.sl-sources-table th, .sl-sources-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--sl-border);
  text-align: left;
  vertical-align: top;
}
.sl-sources-table thead th {
  background: transparent;
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sl-ink-soft);
  font-weight: 500;
  border-bottom: 1.5px solid var(--sl-border-strong);
}
.sl-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--sl-font-mono);
}
.sl-mono-small {
  font-family: var(--sl-font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--sl-ink);
}
.sl-mono-small--muted { color: var(--sl-ink-soft); font-size: 11px; }

.sl-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.sl-dot--live { background: var(--sl-dot-live); }
.sl-dot--stale { background: var(--sl-dot-stale); }
.sl-dot--out { background: var(--sl-dot-out); }
.sl-ok { color: var(--sl-green); }
.sl-pending { color: var(--sl-gold-ink); }

/* ---------- Dataset page header ---------- */
.sl-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 18px;
  color: var(--sl-ink-soft);
}
.sl-breadcrumb a { color: var(--sl-ink-soft); border-bottom: none; }
.sl-breadcrumb a:hover { color: var(--sl-navy); }

/* Back link — first <a> in every breadcrumb. Bigger pill button so it
   reads as a primary navigation control and meets the ≥44px tap target
   from Rule 9 (phone-first). */
.sl-breadcrumb a:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--sl-border-strong);
  background: var(--sl-surface);
  color: var(--sl-navy);
  font-family: var(--sl-font-mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  border-radius: 4px;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}
.sl-breadcrumb a:first-child:hover {
  background: var(--sl-surface-soft);
  border-color: var(--sl-navy);
  color: var(--sl-navy);
}
.sl-breadcrumb a:first-child:focus-visible {
  outline: 2px solid var(--sl-gold);
  outline-offset: 2px;
}

.sl-dataset__head { margin-bottom: 16px; }
.sl-dataset__kicker {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--sl-ink-soft);
  margin-bottom: 6px;
}
.sl-dataset__title {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: clamp(28px, 4.4vw, 40px);
  color: var(--sl-navy);
  margin: 0 0 6px;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.sl-dataset__sub {
  font-family: var(--sl-font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--sl-ink-soft);
  line-height: 1.5;
  max-width: 40em;
}
.sl-dataset__sub a { color: var(--sl-navy); font-style: normal; }

/* ---------- Filter bar — two rows: row 1 data pickers, row 2 display controls ---------- */
.sl-filter-bar {
  display: grid;
  gap: 12px 18px;
  align-items: end;
  padding: 12px 14px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
}
.sl-filter-bar--row {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.sl-filter-bar + .sl-filter-bar {
  border-top: none;
  margin-top: 0;
}
.sl-filter-bar:first-of-type { margin-top: 14px; }
.sl-filter-bar:last-of-type { margin-bottom: 8px; }
.sl-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.sl-filter > label {
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sl-ink-soft);
  font-weight: 500;
}
.sl-filter select {
  font: inherit;
  font-family: var(--sl-font-body);
  font-size: 14px;
  padding: 6px 8px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border-strong);
  color: var(--sl-ink);
  width: 100%;
}
.sl-filter select:focus { outline: 2px solid var(--sl-navy); outline-offset: -2px; }

/* Year range: stacked sliders with value on the left and reset on the right */
.sl-year-range {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 2px;
}
.sl-year-range input[type="range"] {
  width: 100%;
  accent-color: var(--sl-navy);
  margin: 0;
  height: 18px;
}
.sl-year-range-readout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.sl-year-range output {
  font-family: var(--sl-font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--sl-navy);
  font-weight: 500;
}

.sl-ghost-btn {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--sl-border-strong);
  color: var(--sl-ink-soft);
  cursor: pointer;
  text-transform: uppercase;
}
.sl-ghost-btn:hover { border-color: var(--sl-navy); color: var(--sl-navy); }

/* Scale toggle */
.sl-toggle {
  display: inline-flex;
  border: 1px solid var(--sl-border-strong);
  overflow: hidden;
  height: 30px;
}
.sl-toggle__btn {
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 0 12px;
  background: var(--sl-surface);
  border: none;
  border-right: 1px solid var(--sl-border-strong);
  color: var(--sl-ink-soft);
  cursor: pointer;
  text-transform: uppercase;
}
.sl-toggle__btn:last-child { border-right: none; }
.sl-toggle__btn.is-active {
  background: var(--sl-navy);
  color: var(--sl-warm-white);
}

.sl-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--sl-ink-soft);
  cursor: pointer;
  text-transform: uppercase;
  height: 30px;
}
.sl-switch input[type="checkbox"] { accent-color: var(--sl-navy); }
.sl-filter.is-disabled .sl-switch { opacity: 0.45; cursor: not-allowed; }
.sl-filter.is-disabled .sl-switch input { cursor: not-allowed; }

/* Indicator description — subtle italic line, not a huge gold-bordered box */
.sl-indicator-desc {
  margin: 4px 2px 6px;
  font-family: var(--sl-font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--sl-ink-soft);
  line-height: 1.5;
  max-width: 52em;
}
.sl-transform-note {
  margin: 0 2px 10px;
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--sl-gold-ink);
  padding: 4px 8px;
  background: #fff8dc;
  border-left: 3px solid var(--sl-gold);
  display: inline-block;
}
.sl-transform-note[hidden] { display: none; }

/* Lead-stat hero — the single-number headline on a dataset page.
   Used on /fema-public-assistance. Keeps to the ledger-paper palette. */
.sl-lead-stat {
  margin: 16px 0 20px;
  padding: 18px 20px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-left: 4px solid var(--sl-gold);
}
.sl-lead-stat__kicker {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sl-ink-soft);
  margin-bottom: 4px;
}
.sl-lead-stat__value {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: clamp(32px, 5vw, 48px);
  color: var(--sl-navy);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.sl-lead-stat__per-capita {
  font-family: var(--sl-font-display);
  font-size: 17px;
  color: var(--sl-navy);
  margin: 4px 0 8px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.sl-lead-stat__per-capita strong {
  font-weight: var(--sl-w-display-bold);
}
.sl-lead-stat__per-capita-meta {
  display: inline-block;
  margin-left: 4px;
  font-size: 12px;
  font-style: italic;
  color: var(--sl-ink-soft);
  font-variant-numeric: normal;
}
.sl-lead-stat__sub {
  font-family: var(--sl-font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--sl-ink-soft);
}

/* Top-list — ranked list ("Top disasters by obligation", etc.) */
.sl-top-list { margin: 22px 0 8px; }
.sl-top-list h2 {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display);
  font-size: 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--sl-border-strong);
  padding-bottom: 6px;
}
.sl-top-list h2 .sl-muted {
  font-family: var(--sl-font-mono);
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 8px;
}
.sl-top-list__kicker {
  font-family: var(--sl-font-display);
  font-style: italic;
  font-size: 13.5px;
  color: var(--sl-ink-soft);
  margin: 4px 0 10px;
  line-height: 1.45;
  max-width: 48em;
}
.sl-top-list__kicker code {
  font-size: 12px;
  font-style: normal;
  background: var(--sl-warm-white);
  padding: 0 3px;
  border: 1px solid var(--sl-border);
}
.sl-top-list__rows {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sl-top-list__row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 12px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
}
.sl-top-list__rank {
  font-family: var(--sl-font-mono);
  font-size: 13px;
  color: var(--sl-gold-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sl-top-list__title strong {
  font-family: var(--sl-font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--sl-navy);
  display: block;
}
.sl-top-list__meta {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  color: var(--sl-ink-soft);
  letter-spacing: 0.02em;
}
.sl-top-list__value {
  font-family: var(--sl-font-mono);
  font-size: 16px;
  color: var(--sl-navy);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Clickable rows
   Two variants:
    (1) In-page filter (.is-clickable) — used on FEMA PA + federal-awards,
        clicking filters the chart without navigating. Chevron on hover.
    (2) In-page drill anchor (a.sl-top-list__row) — used on /usvi-checkbook,
        navigates to a detail URL. Chevron is ALWAYS visible so users know
        clicking takes them somewhere, and hover amplifies it. */
.sl-top-list__row.is-clickable,
a.sl-top-list__row {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms, background 120ms, box-shadow 120ms;
  position: relative;
}
.sl-top-list__row.is-clickable:hover,
a.sl-top-list__row:hover {
  border-color: var(--sl-navy);
  background: var(--sl-surface-soft);
  box-shadow: 0 1px 0 var(--sl-gold);
}
.sl-top-list__row.is-clickable:hover strong,
a.sl-top-list__row:hover strong { color: var(--sl-navy); }

/* In-page filter rows (FEMA/USAspending): chevron is a hover hint. */
.sl-top-list__row.is-clickable::after {
  content: "→";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sl-font-mono);
  font-size: 12px;
  color: transparent;
  transition: color 120ms, transform 120ms;
}
.sl-top-list__row.is-clickable:hover::after {
  color: var(--sl-gold-ink);
  transform: translateY(-50%) translateX(3px);
}
.sl-top-list__row.is-clickable .sl-top-list__value { margin-right: 20px; }

/* Drill-down anchor rows (checkbook): chevron is ALWAYS visible + labelled
   in the meta line ("see breakdown →") so the link's purpose is obvious. */
a.sl-top-list__row::after {
  content: "→";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sl-font-mono);
  font-size: 16px;
  color: var(--sl-gold-ink);
  transition: transform 140ms, color 140ms;
}
a.sl-top-list__row:hover::after {
  color: var(--sl-red);
  transform: translateY(-50%) translateX(4px);
}
a.sl-top-list__row .sl-top-list__value { margin-right: 28px; }
/* External-tab drill: different glyph, different color (warning it leaves) */
a.sl-top-list__row[target="_blank"]::after {
  content: "↗";
  color: var(--sl-ink-soft);
  font-size: 14px;
}
a.sl-top-list__row[target="_blank"]:hover::after { color: var(--sl-navy); }

/* Active filter pip — used by FEMA/FA is-active rows */
.sl-top-list__row.is-active {
  border-color: var(--sl-gold);
  background: rgba(245, 183, 49, 0.08);
}
.sl-top-list__row.is-active::before {
  content: "●";
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--sl-gold);
}

/* Back-button in the filter bar of a drilled-in page */
.sl-ghost-btn--back {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--sl-border-strong);
  background: var(--sl-surface);
  color: var(--sl-navy);
  font-family: var(--sl-font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}
.sl-ghost-btn--back:hover {
  border-color: var(--sl-navy);
  background: var(--sl-surface-soft);
}

/* Breadcrumb drill separator */
.sl-breadcrumb__sep { margin: 0 6px; color: var(--sl-ink-soft); }
.sl-breadcrumb__current {
  color: var(--sl-navy);
  font-weight: 500;
}

/* Filter chips — active drill filters shown as removable chips */
.sl-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--sl-surface-soft);
  border: 1px solid var(--sl-border);
  margin: 14px 0 6px;
}
.sl-filter-chips__label {
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sl-ink-soft);
  margin-right: 4px;
}
.sl-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-navy);
  color: var(--sl-navy);
  font-family: var(--sl-font-body);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid var(--sl-navy);
  transition: background 120ms, color 120ms;
}
.sl-filter-chip:hover {
  background: var(--sl-red);
  color: #fff;
  border-color: var(--sl-red);
}
.sl-filter-chip__axis {
  font-family: var(--sl-font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sl-gold-ink);
}
.sl-filter-chip:hover .sl-filter-chip__axis { color: #fff; opacity: 0.9; }
.sl-filter-chip__value {
  font-weight: 500;
}
.sl-filter-chip__close {
  font-family: var(--sl-font-mono);
  font-size: 16px;
  line-height: 1;
  color: var(--sl-ink-soft);
  margin-left: 2px;
}
.sl-filter-chip:hover .sl-filter-chip__close { color: #fff; }

/* Description cell in the transaction table */
.sl-cb-desc {
  font-family: var(--sl-font-body);
  font-size: 12.5px;
  color: var(--sl-ink-soft);
  line-height: 1.4;
  max-width: 34em;
}

.sl-muted {
  color: var(--sl-ink-soft);
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
}

/* ---------- "Also loaded" browse grid on landing ---------- */
.sl-browse { margin: 32px 0 16px; }
.sl-browse h2 {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display);
  font-size: 22px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--sl-border-strong);
  padding-bottom: 6px;
}
.sl-browse__kicker {
  font-family: var(--sl-font-display);
  font-style: italic;
  font-size: 14.5px;
  color: var(--sl-ink-soft);
  margin-bottom: 14px;
  max-width: 44em;
}
.sl-browse__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.sl-browse__group {
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  padding: 12px 14px;
}
.sl-browse__group h3 {
  font-family: var(--sl-font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--sl-navy);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--sl-border);
}
.sl-browse__group ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sl-browse__group a {
  display: block;
  padding: 4px 0;
  color: var(--sl-ink);
  border-bottom: none;
  font-size: 13.5px;
}
.sl-browse__group a strong {
  font-weight: 600;
  color: var(--sl-navy);
  margin-right: 4px;
}
.sl-browse__group a:hover { color: var(--sl-gold-ink); }
.sl-browse__group a:hover strong { color: var(--sl-gold-ink); }

/* Sparse / limited-data warning — same weight as transform-note, warmer color */
.sl-sparse-warning {
  margin: 4px 2px 8px;
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: #7a3a1f;
  padding: 4px 10px;
  background: #fcefe3;
  border-left: 3px solid #C84B31;
  display: inline-block;
}
.sl-sparse-warning[hidden] { display: none; }
.sl-sparse-warning strong { color: #5a2815; font-weight: 600; }

/* Continuity link — "also published {other cadence} — see →" */
.sl-continuity-link {
  margin: 4px 2px 8px;
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--sl-ink-soft);
  padding: 4px 10px;
  background: #f0f4f4;
  border-left: 3px solid #2a7a7a;
  display: inline-block;
}
.sl-continuity-link[hidden] { display: none; }
.sl-continuity-link a {
  color: #1f5c5c;
  font-weight: 500;
  border-bottom: 1px solid rgba(42, 122, 122, 0.3);
}

/* Compare-mode chart legend */
.sl-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  margin-top: 8px;
  padding: 6px 4px 0;
  border-top: 1px solid var(--sl-border);
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  color: var(--sl-ink-soft);
}
.sl-chart__swatch {
  display: inline-block;
  width: 22px; height: 3px;
  vertical-align: middle;
  margin-right: 2px;
}
.sl-chart__swatch--dashed {
  background: linear-gradient(to right, #8a6a00 0 5px, transparent 5px 8px, #8a6a00 8px 13px, transparent 13px 16px, #8a6a00 16px 22px) !important;
}
.sl-chart__legend-label { color: var(--sl-ink); margin-right: 10px; }

/* ---------- Chart ---------- */
.sl-chart-figure { margin: 10px 0 18px; }
.sl-chart {
  width: 100%;
  min-height: 320px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  padding: 14px 10px 8px;
}
.sl-chart svg { max-width: 100%; height: auto; }
.sl-chart__caption {
  font-size: 12.5px;
  color: var(--sl-ink-soft);
  padding: 6px 4px 0;
  line-height: 1.45;
}
.sl-chart__empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--sl-ink-soft);
  font-style: italic;
}

/* ---- FRED-style meta strip above chart ---- */
.sl-chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 8px 0 0;
  padding: 8px 12px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-bottom: none;
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--sl-ink);
}
.sl-chart-meta__item { white-space: nowrap; }
.sl-chart-meta__k {
  color: var(--sl-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 400;
  margin-right: 3px;
}
.sl-chart-meta__item strong { font-weight: 600; color: var(--sl-navy); }

/* Plot renders title (h2) + subtitle (h3) inside .sl-chart when title/subtitle
   options are set. Override Plot's default fonts to match the ecosystem. */
.sl-chart h2 {
  font-family: var(--sl-font-display) !important;
  font-weight: 700 !important;
  font-size: 18px !important;
  color: var(--sl-navy) !important;
  letter-spacing: -0.01em !important;
  margin: 0 0 2px !important;
  line-height: 1.2 !important;
}
.sl-chart h3 {
  font-family: var(--sl-font-mono) !important;
  font-weight: 500 !important;
  font-size: 11px !important;
  color: var(--sl-ink-soft) !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  margin: 0 0 10px !important;
  font-variant-numeric: tabular-nums;
}

/* Source + downloads line below the chart */
.sl-chart__footer {
  margin-top: 0;
  padding: 8px 12px;
  border: 1px solid var(--sl-border);
  border-top: 1px dashed var(--sl-border-strong);
  background: var(--sl-surface);
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  color: var(--sl-ink-soft);
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.sl-chart__footer strong { color: var(--sl-ink); font-weight: 500; }
.sl-chart__footer a {
  color: var(--sl-navy);
  border-bottom: 1px solid rgba(28, 58, 90, 0.25);
}
.sl-chart-footer__source { flex: 1 1 auto; min-width: 0; }
.sl-chart-footer__dl { margin-left: auto; white-space: nowrap; }

/* ---------- Stats grid ---------- */
.sl-stats { margin: 16px 0 22px; }
.sl-stats__row {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}
.sl-stats__row--primary {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.sl-stats__row--secondary {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.sl-stats__empty {
  padding: 16px;
  color: var(--sl-ink-soft);
  font-style: italic;
  grid-column: 1 / -1;
}

.sl-stat {
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  padding: 10px 12px;
  position: relative;
  min-width: 0;
}
.sl-stats__row--primary .sl-stat { padding: 12px 14px; }

.sl-stat__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}
.sl-stat h4 {
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--sl-ink-soft);
  text-transform: uppercase;
}
.sl-stat__value {
  font-family: var(--sl-font-display);
  font-size: 22px;
  font-weight: var(--sl-w-display);
  color: var(--sl-navy);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.sl-stats__row--primary .sl-stat__value { font-size: 28px; }
.sl-stat__sub {
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  color: var(--sl-ink-soft);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* Explainer popover — small "?" that opens below */
.sl-stat__explain {
  display: inline-block;
  font-size: 11px;
}
.sl-stat__explain summary {
  display: inline-block;
  width: 16px; height: 16px;
  text-align: center;
  line-height: 14px;
  border: 1px solid var(--sl-border-strong);
  font-family: var(--sl-font-mono);
  font-size: 11px;
  color: var(--sl-ink-soft);
  cursor: pointer;
  background: var(--sl-surface);
  list-style: none;
}
.sl-stat__explain summary::-webkit-details-marker { display: none; }
.sl-stat__explain summary:hover { border-color: var(--sl-navy); color: var(--sl-navy); }
.sl-stat__explain[open] {
  position: absolute;
  top: 8px; right: 12px;
  background: var(--sl-warm-white);
  border: 1px solid var(--sl-border-strong);
  padding: 8px 12px 10px;
  width: min(280px, calc(100% - 24px));
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--sl-ink);
  z-index: 2;
  font-family: var(--sl-font-body);
  font-style: normal;
  box-shadow: 0 2px 6px rgba(28, 58, 90, 0.12);
}
.sl-stat__explain[open] summary { margin-bottom: 6px; }
.sl-stat__explain p { margin-top: 4px; }

.sl-stat--good   { border-left: 3px solid var(--sl-green); }
.sl-stat--bad    { border-left: 3px solid var(--sl-red); }
.sl-stat--neutral { }

/* ---------- How-to-read disclosure ---------- */
.sl-howto {
  margin: 18px 0;
  border: 1px solid var(--sl-border);
  background: var(--sl-surface);
}
.sl-howto summary {
  padding: 10px 14px;
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sl-ink-soft);
  cursor: pointer;
  list-style: none;
}
.sl-howto summary::-webkit-details-marker { display: none; }
.sl-howto summary::before { content: "▸ "; color: var(--sl-gold-ink); }
.sl-howto[open] summary::before { content: "▾ "; }
.sl-howto__body {
  padding: 0 18px 18px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--sl-ink);
  max-width: 44em;
}
.sl-howto__body h3 {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display);
  font-size: 17px;
  margin-top: 16px;
  margin-bottom: 6px;
  color: var(--sl-navy);
}
.sl-howto__body ul { padding-left: 20px; margin-bottom: 8px; }
.sl-howto__body ul li { margin-bottom: 4px; }
.sl-howto__stats {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin-top: 6px;
}
.sl-howto__stats dt {
  font-weight: var(--sl-w-display);
  color: var(--sl-navy);
  font-family: var(--sl-font-display);
  padding-top: 1px;
}
.sl-howto__stats dd { margin-left: 0; margin-bottom: 4px; }

/* ---------- Methodology + citation ---------- */
.sl-methodology {
  background: var(--sl-surface-soft);
  border: 1px solid var(--sl-border);
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 13.5px;
  line-height: 1.55;
}
.sl-methodology h2 {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sl-ink-soft);
  margin-bottom: 8px;
  border: none; padding: 0;
}
.sl-methodology ul { list-style: none; }
.sl-methodology li { padding: 2px 0; }
.sl-methodology li strong { color: var(--sl-navy); }
.sl-methodology code {
  background: var(--sl-warm-white);
  padding: 1px 5px;
  border: 1px solid var(--sl-border);
  font-size: 12px;
}
.sl-freshness {
  font-size: 12.5px;
  color: var(--sl-ink-soft);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--sl-border);
}
.sl-source-links {
  margin-top: 8px;
  font-family: var(--sl-font-mono);
  font-size: 12px;
  color: var(--sl-ink-soft);
}

/* ---------- Data table ---------- */
/* overflow-x here rather than on the page: a wide table must scroll
   INSIDE its own container. Without this the body scrolls sideways on a
   phone, which under Rule 9 (375px baseline) is a launch blocker rather
   than a polish item. A procurement row is wider than a checkbook row. */
.sl-datatable-wrap { margin: 18px 0; overflow-x: auto; }
.sl-datatable-wrap h2 {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sl-ink-soft);
  margin-bottom: 6px;
  border: none; padding: 0;
}
.sl-datatable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sl-datatable caption {
  text-align: left;
  padding-bottom: 4px;
  color: var(--sl-ink-soft);
  font-family: var(--sl-font-body);
  font-size: 12.5px;
  font-style: italic;
}
.sl-datatable th, .sl-datatable td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--sl-border);
  text-align: left;
}
.sl-datatable thead th {
  background: transparent;
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sl-ink-soft);
  border-bottom: 1.5px solid var(--sl-border-strong);
}
.sl-datatable th[scope="row"] {
  font-family: var(--sl-font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--sl-ink-soft);
}
.sl-datatable td.sl-num { color: var(--sl-ink); }
.sl-datatable__empty {
  padding: 14px;
  color: var(--sl-ink-soft);
  font-style: italic;
  text-align: center;
}
.sl-datatable__unit {
  font-family: var(--sl-font-mono);
  font-weight: 400;
  color: var(--sl-ink-soft);
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0;
}

/* ---------- Footer ---------- */
.sl-footer {
  margin-top: 48px;
  background: var(--sl-navy-deep);
  color: rgba(255, 255, 255, 0.78);
}
.sl-footer__inner { max-width: 980px; margin: 0 auto; padding: 24px 24px; }
.sl-footer__rule {
  font-family: var(--sl-font-display);
  font-size: 15px;
  font-style: italic;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 12px;
  max-width: 40em;
}
.sl-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 12px;
  font-family: var(--sl-font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sl-footer__nav a { color: var(--sl-gold); border-bottom: none; }
.sl-footer__nav a:hover { border-bottom: 1px solid var(--sl-gold); }
.sl-footer__legal {
  font-size: 11.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
  max-width: 48em;
}

/* ---------- Sources page ---------- */
.sl-source-totals dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 14px 0 20px;
  border-top: 1px solid var(--sl-border);
  border-bottom: 1px solid var(--sl-border);
}
.sl-source-totals div {
  padding: 12px 14px;
  border-right: 1px solid var(--sl-border);
  background: var(--sl-surface);
}
.sl-source-totals div:last-child { border-right: none; }
.sl-source-totals dt {
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sl-ink-soft);
  margin-bottom: 4px;
}
.sl-source-totals dd {
  font-family: var(--sl-font-display);
  font-size: 26px;
  font-weight: var(--sl-w-display);
  color: var(--sl-navy);
  font-variant-numeric: tabular-nums;
}
.sl-source-totals dd.sl-ok { color: var(--sl-green); }
.sl-source-totals dd.sl-pending { color: var(--sl-gold-ink); }

.sl-legend {
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 12.5px;
}
.sl-legend h2 {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sl-ink-soft);
  margin-bottom: 8px;
}
.sl-legend__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.sl-legend__list li { display: flex; align-items: center; gap: 6px; }

.sl-badge {
  display: inline-block;
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 7px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
  text-transform: uppercase;
}
.sl-badge--portal       { background: #eaf3ea; color: #265a2a; border-color: #c2dcc4; }
.sl-badge--warehouse    { background: #f1eadb; color: #6a5600; border-color: #dccba8; }
.sl-badge--needs-key    { background: #fff5d4; color: #8a6a00; border-color: #e8cf73; }
.sl-badge--dead         { background: #f6d9d1; color: #8a2417; border-color: #d89b8c; }
.sl-badge--intermittent { background: #fbeacc; color: #8a5500; border-color: #e6c282; }
.sl-badge--info         { background: #e6edf4; color: #20456b; border-color: #c0d0e1; }
.sl-badge--workbench    { background: #1C3A5A; color: #F5B731; border-color: #1C3A5A; margin-left: 8px; }
.sl-badge--link         { text-decoration: none; cursor: pointer; }
.sl-badge--link:hover   { background: #14304d; color: #ffd166; }

/* The link back to usvipublicrecords.com, in the topbar on every page.
   Outlined, not filled: on gated pages it sits beside the filled Workbench
   badge, and two solid chips next to each other read as a button pair rather
   than as navigation. Declared AFTER .sl-badge--link:hover, which is the same
   specificity and would otherwise win and paint it navy. */
.sl-badge--archive {
  background: transparent;
  color: var(--sl-gold);
  border-color: rgba(245, 183, 49, 0.45);
  flex-shrink: 0;       /* the topbar ellipsises the attribution, never this */
}
.sl-badge--archive:hover {
  background: rgba(245, 183, 49, 0.12);
  color: #ffd780;
  border-color: var(--sl-gold);
}

.sl-workbench-callout {
  margin: 28px 0 12px;
  padding: 16px 20px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-left: 4px solid var(--sl-navy);
  font-size: 14px;
  line-height: 1.55;
}
.sl-workbench-callout__kicker {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sl-ink-soft);
  margin: 0 0 6px;
}
.sl-workbench-callout p { margin: 0 0 8px; }
.sl-workbench-callout p:last-child { margin: 0; color: var(--sl-ink-soft); font-size: 13px; }

.sl-source-category { margin: 28px 0 18px; }
.sl-source-list { list-style: none; display: grid; gap: 10px; }
.sl-source-card {
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  padding: 12px 14px;
  scroll-margin-top: 60px;
}
.sl-source-card__head h3 {
  font-family: var(--sl-font-display);
  font-size: 17px;
  font-weight: var(--sl-w-display);
  color: var(--sl-navy);
  margin-bottom: 2px;
}
.sl-source-card__publisher {
  font-size: 12.5px;
  color: var(--sl-ink-soft);
  margin-bottom: 6px;
  font-style: italic;
}
.sl-source-card__publisher a { color: var(--sl-navy); }
.sl-source-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-bottom: 8px;
}
.sl-source-card__short {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 4px;
}
.sl-source-card__details {
  border-top: 1px solid var(--sl-border);
  margin-top: 8px;
  padding-top: 6px;
}
.sl-source-card__details summary {
  cursor: pointer;
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sl-ink-soft);
  padding: 3px 0;
}
.sl-source-card__details summary:hover { color: var(--sl-navy); }
.sl-source-card__body { padding: 6px 0 4px; font-size: 13.5px; line-height: 1.55; }
.sl-source-card__body p { margin-bottom: 6px; }
.sl-source-card__body pre {
  background: var(--sl-warm-white);
  border: 1px solid var(--sl-border);
  padding: 6px 8px;
  font-size: 12px;
  overflow-x: auto;
  word-break: break-all;
  white-space: pre-wrap;
}
.sl-source-card__label {
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sl-ink-soft);
  margin-top: 8px !important;
  margin-bottom: 2px !important;
}
.sl-source-card__note { color: var(--sl-ink-soft); }
.sl-source-card__issues { padding-left: 18px; color: var(--sl-ink-soft); }
.sl-source-card__issues li { margin-bottom: 3px; }

/* ---------- Combobox (filterable indicator / compare picker) ---------- */
.sl-combo { position: relative; display: block; min-width: 0; }
.sl-combo__wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.sl-combo__input {
  font: inherit;
  font-family: var(--sl-font-body);
  font-size: 14px;
  padding: 6px 28px 6px 8px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border-strong);
  color: var(--sl-ink);
  width: 100%;
  min-width: 0;
}
.sl-combo__input::placeholder { color: var(--sl-ink-soft); font-style: italic; }
.sl-combo__input:focus { outline: 2px solid var(--sl-navy); outline-offset: -2px; }
.sl-combo__toggle {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 6px;
  background: transparent;
  border: none;
  color: var(--sl-ink-soft);
  cursor: pointer;
  font-family: var(--sl-font-mono);
  font-size: 13px;
}
.sl-combo__list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  margin-top: 2px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border-strong);
  box-shadow: 0 4px 12px rgba(28, 58, 90, 0.12);
  list-style: none;
  padding: 0;
  font-size: 13.5px;
}
.sl-combo__heading {
  padding: 6px 10px 2px;
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sl-ink-soft);
  background: var(--sl-surface-soft);
  border-top: 1px solid var(--sl-border);
}
.sl-combo__heading:first-child { border-top: none; }
.sl-combo__opt {
  padding: 6px 10px;
  cursor: pointer;
  color: var(--sl-ink);
  user-select: none;
}
.sl-combo__opt:hover,
.sl-combo__opt.is-active {
  background: var(--sl-navy);
  color: var(--sl-warm-white);
}
.sl-combo__opt[aria-selected="true"]::before {
  content: "● ";
  color: var(--sl-gold-ink);
  margin-right: 4px;
}
.sl-combo__opt[aria-selected="true"]:hover::before,
.sl-combo__opt[aria-selected="true"].is-active::before {
  color: var(--sl-gold);
}
.sl-combo__empty {
  padding: 10px;
  color: var(--sl-ink-soft);
  font-style: italic;
  text-align: center;
}
@media (pointer: coarse) {
  .sl-combo__opt { padding: 10px 12px; }
}

/* Coverage readout — small mono text under year sliders */
.sl-coverage-readout {
  margin-top: 4px;
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--sl-ink-soft);
  line-height: 1.5;
}
.sl-coverage-readout strong { color: var(--sl-navy); font-weight: 500; }
.sl-coverage-gaps { color: #8a2417; }

/* Honesty block — the editorial rule about data + projections.
   Appears visibly on every dataset page + /sources. Warm cream surface
   with a gold left border so it reads as editorial commentary, not a
   warning or error. */
.sl-honesty {
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--sl-surface-soft);
  border: 1px solid var(--sl-border);
  border-left: 3px solid var(--sl-gold);
  font-size: 13.5px;
  line-height: 1.6;
}
.sl-honesty h2 {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sl-ink-soft);
  margin-bottom: 6px;
  border: none; padding: 0;
}
.sl-honesty p { color: var(--sl-ink); max-width: 42em; }
.sl-honesty p + p { margin-top: 8px; }

/* ---------- Cross-reference callout (court-records page) ----------
   The journalism hook: "143 named parties also got $1.76B from the
   government checkbook". Surfaced as count + sum only on public — names
   live on the gated court_parties table. Visually distinct from the
   honesty block: navy left border (the workbench accent), slightly
   warmer than the standard meta strip. */
.sl-callout {
  margin: 20px 0 24px;
  padding: 16px 20px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-left: 4px solid var(--sl-navy);
}
.sl-callout--xref { border-left-color: var(--sl-navy); }
.sl-callout__kicker {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sl-ink-soft);
  margin: 0 0 8px;
  font-weight: 500;
}
.sl-callout__lead {
  font-family: var(--sl-font-display);
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.45;
  margin: 0 0 10px;
  color: var(--sl-navy);
}
.sl-callout__detail {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 8px;
  color: var(--sl-ink);
}
.sl-callout__cta {
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--sl-border);
  color: var(--sl-ink-soft);
}
.sl-callout__cta a { color: var(--sl-navy); }

/* ---------- Workbench landing ----------
   Different chrome from the public landing — search bar prominent,
   stats grid, entry-point cards. Same base.html topbar (with the
   Workbench badge), same color tokens. */

.sl-wb-search {
  margin: 24px 0 18px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(28, 58, 90, 0.08), rgba(28, 58, 90, 0.02));
  border: 1px solid var(--sl-border);
  border-left: 4px solid var(--sl-navy);
}
.sl-wb-search__label {
  display: block;
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sl-ink-soft);
  margin: 0 0 8px;
}
.sl-wb-search__row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.sl-wb-search__input {
  flex: 1;
  font-family: var(--sl-font-mono);
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--sl-border);
  background: #fff;
  color: var(--sl-ink);
  letter-spacing: 0.02em;
}
.sl-wb-search__input:focus {
  outline: 2px solid var(--sl-gold);
  outline-offset: -1px;
  border-color: var(--sl-gold);
}
.sl-wb-search__btn {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: 15px;
  padding: 10px 22px;
  background: var(--sl-navy);
  color: #fff;
  border: 1px solid var(--sl-navy);
  cursor: pointer;
}
.sl-wb-search__btn:hover { background: #14304d; }
.sl-wb-search__hint {
  margin: 8px 0 0;
  font-size: 12.5px;
  font-style: italic;
  color: var(--sl-ink-soft);
}
@media (max-width: 540px) {
  .sl-wb-search { padding: 14px 14px; }
  .sl-wb-search__input { font-size: 15px; padding: 9px 10px; }
  .sl-wb-search__btn { font-size: 14px; padding: 9px 16px; }
}

.sl-wb-stats {
  margin: 28px 0 24px;
}
.sl-wb-stats h2 {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sl-ink-soft);
  margin: 0 0 12px;
}
.sl-wb-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.sl-wb-stats__grid li {
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}
.sl-wb-stats__grid li.sl-wb-stats__money { border-left: 3px solid var(--sl-gold); }
.sl-wb-stats__num {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: 22px;
  color: var(--sl-navy);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.sl-wb-stats__lbl {
  font-size: 12px;
  color: var(--sl-ink-soft);
  margin-top: 4px;
  line-height: 1.35;
}
.sl-wb-stats__note {
  display: block;
  font-style: italic;
  font-size: 11px;
  color: #b35900;
}

.sl-wb-entries { margin: 28px 0 16px; }
.sl-wb-entries h2 {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sl-ink-soft);
  margin: 0 0 12px;
}
.sl-wb-entries__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.sl-wb-entry {
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  padding: 14px 16px;
}
.sl-wb-entry--gated {
  border-left: 4px solid var(--sl-navy);
  background: linear-gradient(135deg, rgba(28, 58, 90, 0.06), rgba(28, 58, 90, 0.01));
}
.sl-wb-entry__kicker {
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sl-ink-soft);
  margin: 0 0 4px;
}
.sl-wb-entry h3 {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: 17px;
  margin: 0 0 6px;
}
.sl-wb-entry h3 a { color: var(--sl-navy); text-decoration: none; }
.sl-wb-entry h3 a:hover { text-decoration: underline; }
.sl-wb-entry p { font-size: 13px; line-height: 1.5; color: var(--sl-ink); margin: 0; }

/* Always-on disclaimer below the search bar — "verify with originals" */
.sl-wb-disclaimer {
  margin: 0 0 22px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(245, 183, 49, 0.16), rgba(245, 183, 49, 0.04));
  border: 1px solid rgba(245, 183, 49, 0.55);
  border-left-width: 4px;
}
.sl-wb-disclaimer__kicker {
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a5500;
  font-weight: 600;
  margin: 0 0 4px;
}
.sl-wb-disclaimer__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--sl-ink);
}
.sl-wb-disclaimer__body strong { color: var(--sl-navy); }

/* Five rules — replaces the wall-of-text honesty block on workbench
   landing. Numbered cards in a vertical list. */
.sl-wb-rules {
  margin: 32px 0 24px;
}
.sl-wb-rules h2 {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: 22px;
  color: var(--sl-navy);
  margin: 0 0 14px;
}
.sl-wb-rules__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sl-wb-rule {
  display: flex;
  gap: 14px;
  padding: 12px 14px 12px 12px;
  margin: 0 0 8px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-left: 3px solid var(--sl-navy);
}
.sl-wb-rule__num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sl-navy);
  color: var(--sl-gold);
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.sl-wb-rule__body { flex: 1 1 auto; min-width: 0; }
.sl-wb-rule__head {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: 15px;
  color: var(--sl-navy);
  margin: 0 0 3px;
  line-height: 1.3;
}
.sl-wb-rule__body p:not(.sl-wb-rule__head) {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--sl-ink);
}
.sl-wb-rule__body p:not(.sl-wb-rule__head) em { color: var(--sl-ink-soft); }
.sl-wb-rule code {
  background: rgba(28, 58, 90, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12.5px;
}
@media (max-width: 540px) {
  .sl-wb-rule { padding: 10px 12px; gap: 10px; }
  .sl-wb-rule__num { width: 24px; height: 24px; font-size: 12px; }
  .sl-wb-rule__head { font-size: 14px; }
}

/* Search results */
.sl-wb-results { margin: 24px 0 28px; }
.sl-wb-results h2 {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: 22px;
  color: var(--sl-navy);
  margin: 0 0 6px;
}
.sl-wb-results__lead {
  font-size: 14px;
  line-height: 1.5;
  color: var(--sl-ink-soft);
  margin: 0 0 16px;
  max-width: 50em;
}
.sl-wb-results__more {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--sl-border);
  font-size: 13px;
  font-style: italic;
  color: var(--sl-ink-soft);
}
.sl-wb-people { list-style: none; padding: 0; margin: 0; }
.sl-wb-person {
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  padding: 14px 16px;
  margin: 0 0 10px;
}
.sl-wb-person__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}
.sl-wb-person__name {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: 17px;
  color: var(--sl-navy);
  letter-spacing: -0.005em;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.sl-wb-person__sources {
  font-size: 12px;
  color: var(--sl-ink-soft);
  font-family: var(--sl-font-mono);
}
.sl-wb-person__sources strong { color: var(--sl-navy); font-size: 13px; }
.sl-wb-person__sources em { font-style: italic; color: var(--sl-ink-soft); margin-left: 4px; }
.sl-wb-person__metrics {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 14px;
}
.sl-wb-metric {
  font-size: 13px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
}
.sl-wb-metric__k {
  font-family: var(--sl-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sl-ink-soft);
}
.sl-wb-metric__v {
  font-family: var(--sl-font-display);
  font-weight: 600;
  color: var(--sl-ink);
  font-variant-numeric: tabular-nums;
}
.sl-wb-metric__v--link { color: var(--sl-navy); text-decoration: none; }
.sl-wb-metric__v--link:hover { text-decoration: underline; }
.sl-wb-metric__sub {
  font-size: 11.5px;
  color: var(--sl-ink-soft);
  font-style: italic;
}
.sl-wb-person__variants,
.sl-wb-person__links {
  font-size: 12px;
  color: var(--sl-ink-soft);
  margin: 6px 0 0;
}
.sl-wb-person__variants-k {
  font-family: var(--sl-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10.5px;
  margin-right: 4px;
}
.sl-wb-person__links a { color: var(--sl-navy); }

/* Phase-note card — used on empty states */
.sl-phase-note {
  margin: 20px 0;
  padding: 14px 16px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-left: 3px solid var(--sl-gold);
  font-size: 13.5px;
  color: var(--sl-ink-soft);
}
.sl-phase-note code {
  background: var(--sl-warm-white);
  padding: 1px 5px;
  border: 1px solid var(--sl-border);
}

@media (max-width: 720px) {
  .sl-main { padding: 16px 14px 20px; }
  .sl-filter-bar {
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
  }
}

/* Phone portrait — compress header + filters, keep chart above the fold */
@media (max-width: 640px) {
  .sl-main { padding: 10px 12px 20px; }
  .sl-breadcrumb { margin-bottom: 6px; font-size: 11px; }
  .sl-dataset__head { margin-bottom: 8px; }
  .sl-dataset__kicker { display: none; }
  .sl-dataset__title { font-size: clamp(22px, 6.5vw, 30px); margin-bottom: 4px; }
  .sl-dataset__sub { font-size: 13.5px; line-height: 1.45; }

  .sl-filter-bar {
    padding: 8px 10px;
    gap: 8px 10px;
    grid-template-columns: 1fr 1fr;
  }
  .sl-filter-bar:first-of-type { margin-top: 8px; }
  .sl-filter > label {
    font-size: 10px;
    letter-spacing: 0.06em;
  }
  .sl-filter select {
    font-size: 13px;
    padding: 5px 6px;
  }

  /* Put wide fields on their own full-width row */
  #sl-indicator-box { width: 100%; }
  .sl-filter--wide { grid-column: 1 / -1; }
  .sl-filter--range { grid-column: 1 / -1; }

  /* Chart meta strip wraps tighter */
  .sl-chart-meta { gap: 6px 10px; font-size: 11px; }

  /* Indicator description tighter */
  .sl-indicator-desc { font-size: 14px; margin: 4px 0; line-height: 1.4; }

  /* Let chart breathe: it's the main event on phone */
  .sl-chart svg { max-width: 100%; height: auto !important; }

  /* Stats: smaller values, less vertical padding */
  .sl-stats__row--primary .sl-stat { padding: 10px 12px; }
  .sl-stats__row--primary .sl-stat__value { font-size: 22px; }

  /* Landing masthead compresses too */
  .sl-masthead { padding: 6px 0 2px; }
  .sl-masthead__title { font-size: clamp(32px, 9vw, 44px); }
  .sl-masthead__tagline { font-size: 14px; }
  .sl-hero { margin: 16px 0 14px; padding: 12px 0; }
  .sl-hero__sentence { font-size: clamp(17px, 4.5vw, 20px); }
}

@media (max-width: 420px) {
  /* Ultra-narrow: one column for filters */
  .sl-filter-bar { grid-template-columns: 1fr; }
  .sl-stats__row--primary .sl-stat__value { font-size: 20px; }
  .sl-howto__stats { grid-template-columns: 1fr; gap: 2px 0; }
  .sl-howto__stats dd { margin-bottom: 8px; }
}

/* ============================================================
 * Workbench v2: badges, previews, profile pages (2026-05-02)
 * ============================================================ */

/* Type badges in unified search results */
.sl-wb-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
}
.sl-wb-badge--person  { background: rgba(28, 58, 90, 0.10); color: var(--sl-navy); }
.sl-wb-badge--org     { background: rgba(245, 183, 49, 0.18); color: #5a3d00; }
.sl-wb-badge--address { background: rgba(0, 100, 100, 0.10); color: #024a4a; }

/* Search results buckets */
.sl-wb-results__bucket {
  margin: 28px 0 10px;
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: 18px;
  border-bottom: 1px solid var(--sl-rule);
  padding-bottom: 4px;
}
.sl-wb-results__split {
  font-size: 13px;
  font-weight: 400;
  font-family: var(--sl-font-body);
  color: var(--sl-ink-soft);
}

/* Top-of-list previews on the landing */
.sl-wb-previews { margin: 28px 0; }
.sl-wb-previews__lead {
  margin: 4px 0 14px;
  color: var(--sl-ink-soft);
  font-size: 14px;
}
.sl-wb-previews__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.sl-wb-preview {
  background: var(--sl-surface);
  border: 1px solid var(--sl-rule);
  border-radius: 4px;
  padding: 14px;
}
.sl-wb-preview__h {
  margin: 0 0 4px;
  font-size: 15px;
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
}
.sl-wb-preview__sub {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--sl-ink-soft);
}
.sl-wb-preview__list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
}
.sl-wb-preview__list li {
  padding: 6px 0;
  border-top: 1px solid var(--sl-rule);
}
.sl-wb-preview__list li:first-child { border-top: 0; }
.sl-wb-preview__meta {
  display: block;
  font-size: 11px;
  color: var(--sl-ink-soft);
  margin-top: 2px;
}
.sl-wb-preview__kinds {
  display: block;
  font-size: 11px;
  color: var(--sl-ink-soft);
  font-style: italic;
  margin-top: 1px;
}

/* Profile page sections */
.sl-wb-profile { margin: 24px 0; }
.sl-wb-profile h2 {
  font-family: var(--sl-font-display);
  font-weight: var(--sl-w-display-bold);
  font-size: 20px;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--sl-rule);
  padding-bottom: 4px;
}
.sl-wb-profile__lead {
  margin: 0 0 14px;
  color: var(--sl-ink-soft);
  font-size: 14px;
}
.sl-wb-profile__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.sl-wb-profile__card {
  background: var(--sl-surface);
  border: 1px solid var(--sl-rule);
  border-radius: 4px;
  padding: 14px;
}
.sl-wb-profile__card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sl-navy);
}
.sl-wb-profile__card dl {
  margin: 0;
  font-size: 13px;
}
.sl-wb-profile__card dt {
  font-weight: 600;
  color: var(--sl-ink-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 6px;
}
.sl-wb-profile__card dd {
  margin: 0 0 4px;
  font-size: 14px;
}
.sl-wb-profile__drill {
  margin: 10px 0 0;
  font-size: 13px;
}
.sl-wb-profile__variants {
  background: rgba(28, 58, 90, 0.04);
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.sl-wb-profile__officer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sl-wb-profile__officer-links li {
  padding: 8px 0;
  border-top: 1px solid var(--sl-rule);
  font-size: 14px;
}
.sl-wb-profile__officer-links li:first-child { border-top: 0; }
.sl-wb-profile__meta {
  display: block;
  font-size: 12px;
  color: var(--sl-ink-soft);
  margin-top: 2px;
}
.sl-wb-profile__scores {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sl-wb-profile--meta ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sl-wb-profile--meta li {
  padding: 4px 0;
  font-size: 13px;
}

/* Risk-indicator score row */
.sl-wb-score {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  margin: 4px 0;
  background: var(--sl-surface);
  border: 1px solid var(--sl-rule);
  border-left-width: 4px;
  border-radius: 3px;
  font-size: 13px;
}
.sl-wb-score--high   { border-left-color: #b03030; }
.sl-wb-score--medium { border-left-color: var(--sl-gold, #F5B731); }
.sl-wb-score--low    { border-left-color: var(--sl-ink-soft); }
.sl-wb-score__verdict {
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 11px;
  text-align: center;
}
.sl-wb-score--high   .sl-wb-score__verdict { color: #b03030; }
.sl-wb-score--medium .sl-wb-score__verdict { color: #8a5a00; }
.sl-wb-score__kind {
  font-family: var(--sl-font-mono, monospace);
  font-size: 12px;
}
.sl-wb-score__num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sl-wb-score__detail {
  grid-column: 1 / -1;
  margin-top: 6px;
}
.sl-wb-score__detail summary {
  font-size: 11px;
  color: var(--sl-ink-soft);
  cursor: pointer;
}
.sl-wb-score__detail pre {
  margin: 6px 0 0;
  background: rgba(28, 58, 90, 0.04);
  padding: 8px;
  border-radius: 3px;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================================
 * Workbench v3: data directory + tools home + tabs
 * ============================================================ */

.sl-wb-data-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}
.sl-wb-data-list li {
  padding: 6px 0;
  border-top: 1px solid var(--sl-rule);
}
.sl-wb-data-list li:first-child { border-top: 0; }
.sl-wb-data-list li a {
  font-family: var(--sl-font-mono, monospace);
  font-weight: 600;
}

.sl-wb-entries__lead {
  margin: 4px 0 14px;
  color: var(--sl-ink-soft);
  font-size: 14px;
}

/* Tab strip used on /workbench/anomalies and similar */
.sl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 2px solid var(--sl-navy);
}
.sl-tab {
  padding: 8px 14px;
  background: rgba(28, 58, 90, 0.04);
  color: var(--sl-ink-soft);
  border: 1px solid var(--sl-rule);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.sl-tab:hover {
  background: rgba(28, 58, 90, 0.08);
  color: var(--sl-navy);
}
.sl-tab--active {
  background: var(--sl-navy);
  color: white;
  border-color: var(--sl-navy);
}
.sl-tab--active:hover {
  background: var(--sl-navy);
  color: white;
}

/* Filter bar (used on tool pages) — minimal version since some tools use it */
.sl-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  padding: 10px 14px;
  background: rgba(28, 58, 90, 0.04);
  border-radius: 4px;
}
.sl-filter-bar label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 600;
  color: var(--sl-ink-soft);
  gap: 2px;
  /* A flex item defaults to min-width:auto, so a <select> whose longest option
     is "Virgin Islands Fire and Emergency Medical Services" (356px) refuses to
     shrink and pushes the whole page sideways on a 375px phone. Rule 9. */
  min-width: 0;
  max-width: 100%;
}
.sl-filter-bar input,
.sl-filter-bar select {
  font-size: 14px;
  padding: 4px 6px;
  border: 1px solid var(--sl-rule);
  border-radius: 3px;
  background: var(--sl-surface);
  /* A native select sizes to its longest option unless it is told not to. */
  min-width: 0;
  max-width: 100%;
}
.sl-filter-bar button {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  background: var(--sl-navy);
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}
.sl-filter-bar button:hover { background: #15324b; }

/* =========================================================================
   Procurement surface (/procurement and its eight sub-pages), 2026-09-02.

   Rule 9 governs everything here: the baseline is a 375px phone, and no page
   may render a horizontal body scroll at 420px. Every wide table on this
   surface sits inside .sl-proc-scroll, and the coverage matrix re-renders as
   one card per row at <=720px rather than scrolling at all.
   ========================================================================= */

/* Wide content scrolls inside its own box, never by moving the page.

   It must also SAY that it scrolls. On iOS the overflow scrollbar is an
   overlay that does not exist until a finger touches it, so a column that is
   off to the right — Money, Dollars drawn, Term — is not merely off-screen,
   it is unannounced. A reader who is never told a column exists cannot know
   to look for it, and on this surface those columns are the money.

   The affordance is drawn with the local/scroll background pair: the two
   radial shadows are attached to the BOX (they never move), the two flat
   cover gradients are attached to the CONTENT (they move with the scroll).
   At the left end the left cover sits over the left shadow and hides it; the
   moment the reader scrolls, the cover travels away and the shadow appears.
   So a shadow is visible on exactly the side that has more to read, and no
   shadow is drawn when nothing is hidden. No script, no markup.

   --sl-scroll-bg must match whatever the scroller is sitting on, or the
   cover gradients read as a smudge. Overrides for the tinted panels follow. */
.sl-proc-scroll {
  --sl-scroll-bg: var(--sl-warm-white);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 6px;
  /* Grid and flex items default to min-width:auto: without this a wide table
     inflates its parent track instead of scrolling inside it. */
  min-width: 0;

  background-image:
    linear-gradient(to right, var(--sl-scroll-bg) 40%, rgba(255, 255, 255, 0)),
    linear-gradient(to left,  var(--sl-scroll-bg) 40%, rgba(255, 255, 255, 0)),
    /* 0.55, not the 0.40 first shipped: composited over the three surfaces a
       scroller actually sits on here — #faf9f6, #ffffff, #f3f1ec — 0.40 gives
       2.14:1, 2.17:1 and 2.21:1 against its own background, under the 3:1 that
       WCAG 2.1 SC 1.4.11 asks of a non-text control. This shadow IS the
       control: it is the only thing on an iPhone that says a column is hidden
       to the right. 0.55 measures 3.05:1, 3.11:1 and 3.15:1. Measured in
       Chrome at 320/375/420, 2026-09-02. */
    radial-gradient(farthest-side at 0 50%,   rgba(28, 58, 90, 0.55), rgba(28, 58, 90, 0)),
    radial-gradient(farthest-side at 100% 50%, rgba(28, 58, 90, 0.55), rgba(28, 58, 90, 0));
  background-position: 0 0, 100% 0, 0 0, 100% 0;
  background-repeat: no-repeat;
  background-size: 34px 100%, 34px 100%, 20px 100%, 20px 100%;
  background-attachment: local, local, scroll, scroll;

  /* Where the platform draws a real scrollbar, make it a visible one rather
     than a hairline that fades. iOS ignores this; the shadows carry it there. */
  scrollbar-width: thin;
  scrollbar-color: var(--sl-border-strong) transparent;
}
.sl-proc-scroll::-webkit-scrollbar { height: 10px; }
.sl-proc-scroll::-webkit-scrollbar-track {
  background: var(--sl-surface-soft);
  border-top: 1px solid var(--sl-border);
}
.sl-proc-scroll::-webkit-scrollbar-thumb { background: var(--sl-border-strong); }
.sl-proc-scroll:hover::-webkit-scrollbar-thumb { background: var(--sl-ink-soft); }

/* The scroller is meant to carry tabindex="0" + role="region" + aria-label so
   it is reachable by keyboard and announced by VoiceOver. That is markup, not
   CSS; this is the focus ring it lands in. */
.sl-proc-scroll:focus { outline: none; }
.sl-proc-scroll:focus-visible {
  outline: 2px solid var(--sl-gold);
  outline-offset: 2px;
}

/* Match the cover gradients to the panel the scroller sits on. */
.sl-proc-col .sl-proc-scroll,
.sl-proc-callout .sl-proc-scroll,
.sl-proc-clock .sl-proc-scroll { --sl-scroll-bg: var(--sl-surface); }
.sl-proc-notyet .sl-proc-scroll,
.sl-proc-strip .sl-proc-scroll,
.sl-proc-namedparty .sl-proc-scroll,
.sl-proc-evidence .sl-proc-scroll { --sl-scroll-bg: var(--sl-surface-soft); }

.sl-proc-scroll > table { min-width: 0; }

/* The freshness line. Identical on all nine pages because it is one partial
   reading one view; styled a little heavier than the site default because on
   this surface it is a claim, not a footnote. */
.sl-proc-freshness {
  margin: 10px 0 18px;
  padding: 8px 12px;
  background: var(--sl-surface-soft);
  border-left: 3px solid var(--sl-navy);
  font-size: 12.5px;
  line-height: 1.55;
}

/* The six question cards, at identical weight — including the sixth. */
.sl-proc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin: 16px 0 24px;
}
.sl-proc-card {
  display: block;
  padding: 14px 16px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-left: 3px solid var(--sl-gold);
  border-bottom: 1px solid var(--sl-border);
  transition: border-color 120ms;
}
.sl-proc-card:hover { border-color: var(--sl-navy); border-left-color: var(--sl-navy); }
.sl-proc-card.is-current { background: var(--sl-surface-soft); border-left-color: var(--sl-navy); }
.sl-proc-card__q {
  display: block;
  font-family: var(--sl-font-display);
  font-size: 16px;
  line-height: 1.3;
  color: var(--sl-navy);
}
.sl-proc-card__fact {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--sl-ink-soft);
}

/* Definition-beside-the-number. Constraint 51: every number carries its
   definition inline, never on a methodology page. */
.sl-proc-defn {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--sl-ink-soft);
  max-width: 46em;
}
.sl-proc-defn code { font-family: var(--sl-font-mono); font-size: 11.5px; }
.sl-proc-asof {
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  color: var(--sl-ink-soft);
  margin-bottom: 8px;
}
.sl-proc-rung {
  margin-top: 8px;
  font-size: 13px;
  color: var(--sl-ink);
}

.sl-proc-h2, .sl-proc-section > h2, .sl-proc-col > h2 {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sl-ink-soft);
  margin: 22px 0 6px;
}
.sl-proc-section { margin: 20px 0; }
.sl-proc-section h3 {
  font-family: var(--sl-font-display);
  font-size: 15px;
  margin: 14px 0 4px;
  color: var(--sl-navy);
}
.sl-proc-facts { list-style: none; margin: 8px 0; }
.sl-proc-facts li { padding: 10px 0; border-bottom: 1px solid var(--sl-border); font-size: 14px; }
.sl-proc-numlist { margin: 8px 0 8px 20px; font-size: 14px; line-height: 1.6; }
.sl-proc-numlist li { padding: 4px 0; }

/* A bordered callout for the "what this number is not" blocks. Navy rather
   than gold so it does not read as the honesty aside, which is a different
   editorial register. */
.sl-proc-callout {
  margin: 18px 0;
  padding: 14px 18px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-left: 4px solid var(--sl-navy);
  font-size: 13.5px;
  line-height: 1.6;
}
.sl-proc-callout h2 {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sl-ink-soft);
  margin-bottom: 6px;
}
.sl-proc-callout p + p { margin-top: 8px; }
.sl-proc-callout ul { margin: 6px 0 0 20px; }
.sl-proc-callout li { padding: 3px 0; }

/* "Not yet fetched" — the wave-2 empty state. It must never look like a zero
   and never look like an error: it is a request cost we have not spent. */
.sl-proc-notyet {
  margin: 16px 0;
  padding: 14px 18px;
  background: var(--sl-surface-soft);
  border: 1px dashed var(--sl-border-strong);
  font-size: 13.5px;
  line-height: 1.6;
}
.sl-proc-notyet h2, .sl-proc-notyet h3 {
  font-family: var(--sl-font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sl-ink-soft);
  margin-bottom: 6px;
}

/* State badges (coverage cells) and strength pills (chain edges). */
.sl-proc-badge, .sl-proc-pill {
  display: inline-block;
  font-family: var(--sl-font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid var(--sl-border-strong);
  color: var(--sl-ink-soft);
  background: var(--sl-surface);
  white-space: nowrap;
}
.sl-proc-badge--held { border-color: var(--sl-green); color: var(--sl-green); }
.sl-proc-badge--partial { border-color: var(--sl-gold-ink); color: var(--sl-gold-ink); }
.sl-proc-badge--notheld { border-color: var(--sl-red); color: var(--sl-red); }
.sl-proc-badge--notmeasurable { border-color: var(--sl-ink-soft); color: var(--sl-ink-soft); }
.sl-proc-badge--notyet {
  border-style: dashed;
  color: var(--sl-ink-soft);
  background: var(--sl-surface-soft);
}
.sl-proc-pill--hardkey { border-color: var(--sl-green); color: var(--sl-green); }
.sl-proc-pill--sourcedeclared { border-color: var(--sl-navy); color: var(--sl-navy); }
.sl-proc-pill--softlist { border-color: var(--sl-gold-ink); color: var(--sl-gold-ink); }
.sl-proc-pill--namematchonly { border-color: var(--sl-gold-ink); color: var(--sl-gold-ink); }
.sl-proc-pill--documentcorrected { border-color: var(--sl-navy-deep); color: var(--sl-navy-deep); }
.sl-proc-pill--absent { border-color: var(--sl-red); color: var(--sl-red); }
.sl-proc-pill--notyet { border-style: dashed; }

/* The source's own string, shown where we will not print a dollar figure. */
.sl-proc-sourcetext {
  font-family: var(--sl-font-mono);
  font-size: 11.5px;
  padding: 1px 5px;
  background: var(--sl-surface-soft);
  border: 1px solid var(--sl-border);
  color: var(--sl-ink-soft);
}

/* The permanently visible ABSENT strip on the chain page. */
.sl-proc-strip {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--sl-surface-soft);
  border-left: 4px solid var(--sl-red);
  font-size: 13.5px;
  line-height: 1.55;
}
.sl-proc-strip .sl-proc-pill { margin-right: 8px; }

/* Two columns that are never one number. They stack on a phone, which is the
   correct reading order: ordered, then paid, each under its own heading. */
.sl-proc-twocol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin: 16px 0;
}
.sl-proc-col {
  padding: 14px 16px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  /* Without this the column's min-content (a 342px department table) inflates
     the 1fr track to 370px inside a 351px container and the PAGE scrolls
     sideways instead of the table. Rule 9 again. */
  min-width: 0;
}
.sl-proc-colstat {
  font-family: var(--sl-font-display);
  font-size: clamp(18px, 3.2vw, 24px);
  color: var(--sl-navy);
  margin: 8px 0;
}
.sl-proc-colnote {
  font-size: 12.5px;
  color: var(--sl-ink-soft);
  background: var(--sl-surface-soft);
  line-height: 1.55;
}

/* The match ladder, drawn as four labelled bands so the withheld rung is
   visible rather than folded away into the bottom one. */
.sl-proc-ladder { list-style: none; margin: 10px 0; }
.sl-proc-ladder__band {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 4px;
  border-left: 4px solid var(--sl-border-strong);
  background: var(--sl-surface-soft);
}
.sl-proc-ladder__band--l1 { border-left-color: var(--sl-green); }
.sl-proc-ladder__band--l2 { border-left-color: var(--sl-navy); }
.sl-proc-ladder__band--l3 { border-left-color: var(--sl-gold-ink); border-style: dashed; }
.sl-proc-ladder__band--l4 { border-left-color: var(--sl-red); }
.sl-proc-ladder__n {
  font-family: var(--sl-font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--sl-navy);
  min-width: 4.5em;
}
.sl-proc-ladder__label { font-size: 13px; line-height: 1.45; }

/* The chain, with the breaks drawn as breaks. */
.sl-proc-chain { list-style: none; margin: 10px 0; }
.sl-proc-chain__step {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 8px 12px;
  margin-bottom: 3px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-left: 3px solid var(--sl-green);
  font-size: 13px;
}
.sl-proc-chain__step strong { grid-column: 2; font-family: var(--sl-font-display); font-size: 15px; }
.sl-proc-chain__step > span:last-child { grid-column: 2; color: var(--sl-ink-soft); line-height: 1.5; }
.sl-proc-chain__step--gap { border-left-color: var(--sl-red); border-style: dashed; background: var(--sl-surface-soft); }
.sl-proc-chain__step--absent { border-left-color: var(--sl-red); }

/* Coverage cells: state, count, and the query behind a disclosure toggle —
   invisible to the ordinary reader, decisive for the one who checks us. */
.sl-proc-cell { vertical-align: top; min-width: 128px; }
.sl-proc-cell__n {
  display: inline-block;
  font-family: var(--sl-font-mono);
  font-size: 12px;
  margin-left: 4px;
  color: var(--sl-ink);
}
.sl-proc-cell__drill { display: block; font-size: 11.5px; margin-top: 2px; }
.sl-proc-cell__na { color: var(--sl-ink-soft); }
.sl-proc-evidence { margin-top: 4px; }
.sl-proc-evidence > summary {
  cursor: pointer;
  font-family: var(--sl-font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sl-ink-soft);
}
.sl-proc-evidence p { font-size: 12px; line-height: 1.5; margin: 6px 0; max-width: 40em; }
.sl-proc-evidence pre {
  overflow-x: auto;
  font-family: var(--sl-font-mono);
  font-size: 11px;
  line-height: 1.45;
  padding: 8px 10px;
  background: var(--sl-surface-soft);
  border: 1px solid var(--sl-border);
  white-space: pre;
}
.sl-proc-runrow > td { padding-top: 0; }
.sl-proc-runmeta { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 2px 14px; font-size: 12px; }
.sl-proc-runmeta dt { color: var(--sl-ink-soft); font-family: var(--sl-font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.sl-proc-runmeta dd { word-break: break-word; }

.sl-proc-deflist { display: grid; grid-template-columns: minmax(0, 12em) minmax(0, 1fr); gap: 6px 14px; font-size: 13px; margin: 8px 0; }
.sl-proc-deflist dd { line-height: 1.5; }

.sl-proc-clocks {
  display: grid;
  /* 300px, not 230px: each card carries a fixed 43-character column name, and
     once that name is allowed to wrap (below) a 230px floor let the desktop
     grid hand it a 274px card and break it one character from the end. The
     longest name measures 277.2px at the desktop 10.5px, so the card needs
     308px of it; 312px is that plus a little, and still leaves three columns
     at 1024. Below 420px the card is full width and the name wraps honestly
     instead — at 320 no size fits it, which is what the wrap is for. */
  grid-template-columns: repeat(auto-fit, minmax(312px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.sl-proc-clock {
  padding: 12px 14px;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-top: 3px solid var(--sl-navy);
}
.sl-proc-clock__label {
  display: block;
  font-size: 11.5px;
  color: var(--sl-ink-soft);
  line-height: 1.4;
}
.sl-proc-clock__label code { font-family: var(--sl-font-mono); font-size: 10.5px; }
/* The column name is a single unbreakable token — procurement_refresh_runs.
   source_observed_utc is 43 characters with no space in it — so its MIN-CONTENT
   width is the whole string. A grid track cannot shrink below its min-content,
   so on a 320px phone that one token pushed the card, the grid and then the
   PAGE sideways: 346px of content in a 320px viewport, a body scroll on a page
   whose whole job is to be read on a phone (Rule 9).

   It has to wrap, and `overflow-wrap: anywhere` is the rule that does it —
   `break-word` breaks the same glyphs at paint time but leaves min-content
   unchanged, so the track stays inflated and the page still scrolls. `anywhere`
   is the variant that also shrinks min-content, which is the part that matters
   here. Giving the token its own line first maximises how much of it fits
   before the break, so the wrap lands near the end of the name rather than in
   the middle of it. The 11.5px reading size stays. */
.sl-proc-clock__label code {
  display: block;
  overflow-wrap: anywhere;
}
/* Same reasoning, one line down: the value is a timestamp, short enough today
   but written straight from a column, so it gets the same guarantee rather
   than depending on how long a future value happens to be. */
.sl-proc-clock__value { overflow-wrap: anywhere; }
.sl-proc-clock__value {
  display: block;
  margin-top: 6px;
  font-family: var(--sl-font-mono);
  font-size: 14px;
  color: var(--sl-navy);
  word-break: break-word;
}

.sl-proc-mentions { list-style: none; margin: 8px 0; }
.sl-proc-mentions li { padding: 6px 0; border-bottom: 1px solid var(--sl-border); font-size: 13.5px; }
.sl-proc-namedparty {
  padding: 10px 14px;
  background: var(--sl-surface-soft);
  border-left: 3px solid var(--sl-gold);
  font-size: 13.5px;
  line-height: 1.6;
}
.sl-proc-row--absent td, .sl-proc-row--absent th { color: var(--sl-ink-soft); }

/* Phone. The matrix stops being a table and becomes one card per row — a
   coverage matrix is unreadable at 375px however far it scrolls. */
@media (max-width: 720px) {
  .sl-proc-matrix thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sl-proc-matrix tr {
    display: block;
    margin-bottom: 10px;
    border: 1px solid var(--sl-border);
    background: var(--sl-surface);
  }
  .sl-proc-matrix th, .sl-proc-matrix td {
    display: grid;
    grid-template-columns: minmax(0, 8em) minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--sl-border);
    text-align: left;
  }
  .sl-proc-matrix th[data-label]::before,
  .sl-proc-matrix td[data-label]::before {
    content: attr(data-label);
    font-family: var(--sl-font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sl-ink-soft);
  }
  .sl-proc-cell { min-width: 0; }
}
@media (max-width: 640px) {
  .sl-proc-twocol { grid-template-columns: 1fr; }
  .sl-proc-deflist { grid-template-columns: 1fr; }
  .sl-proc-deflist dt { margin-top: 6px; }
  .sl-proc-runmeta { grid-template-columns: 1fr; }
  .sl-proc-runmeta dd { margin-bottom: 4px; }
}
@media (max-width: 420px) {
  .sl-proc-cards { grid-template-columns: 1fr; }
  .sl-proc-clocks { grid-template-columns: 1fr; }
  .sl-proc-chain__step { grid-template-columns: 1fr; }
  .sl-proc-chain__step strong, .sl-proc-chain__step > span:last-child { grid-column: 1; }
  .sl-proc-ladder__band { flex-wrap: wrap; gap: 4px; }
  .sl-proc-ladder__n { min-width: 0; }
  .sl-proc-callout, .sl-proc-notyet, .sl-proc-col { padding: 12px 13px; }
  .sl-proc-freshness { padding: 8px 10px; font-size: 12px; }
}

/* -------------------------------------------------------------------------
   Phone reading of the wide tables, 2026-09-02.

   Two separate failures, one cause: a table 1,092px wide inside a 351px box.

   (a) The row key scrolled away. On /procurement/chain the Money column sits
       741px to the right of the Document column, so a reader who scrolled to
       a dollar figure had no way left on the screen to tell WHICH document it
       belonged to. A money figure with no identifier attached is not a fact
       about a government, it is a number. The identifying column is therefore
       pinned inside the scroller.

   (b) The Money column alone measured 485px — wider than any iPhone — because
       .sl-proc-badge and the source-text code both refuse to wrap. It could
       never be read beside anything. Cells now wrap and are capped.

   Excludes .sl-proc-matrix, which is not a table on a phone at all: it is
   re-laid as one card per row above, and pinning a card is meaningless.
   Excludes [colspan] cells, which are the full-width note rows.
   ------------------------------------------------------------------------- */

.sl-proc-scroll > table:not(.sl-proc-matrix) > thead > tr > th:first-child:not([colspan]),
.sl-proc-scroll > table:not(.sl-proc-matrix) > tbody > tr > th:first-child:not([colspan]),
.sl-proc-scroll > table:not(.sl-proc-matrix) > tbody > tr > td:first-child:not([colspan]) {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--sl-scroll-bg);
  /* A hairline rule plus a soft shadow, so the pinned column reads as an edge
     the content passes under rather than as a column that happens to be first. */
  box-shadow:
    1px 0 0 0 var(--sl-border-strong),
    /* 0.52, not 0.45, for the same reason as the end shadows above: at 0.45
       the pinned edge measured 2.67-2.75:1 against the surfaces it sits on,
       and the hairline beside it is only 1.34-1.51:1, so on a phone in
       daylight the pinned column read as an unexplained overlap rather than
       an edge. 0.52 measures just over 3:1 on all three. */
    8px 0 8px -8px rgba(15, 38, 64, 0.52);
  /* A floor as well as a ceiling. `overflow-wrap: anywhere` would let the
     column's min-content fall to ONE CHARACTER, and auto table layout takes
     that offer: /procurement/refresh rendered its run timestamps as a vertical
     stack of single characters. break-word breaks only what would otherwise
     overflow and leaves min-content alone. */
  min-width: 5.5em;
  max-width: 42vw;
  overflow-wrap: break-word;
}

/* No cell may be wider than the phone it is read on. Phone only: on a desktop
   the Money column has room for one line and reads better with it. */
@media (max-width: 720px) {
  .sl-proc-scroll > table:not(.sl-proc-matrix) > tbody > tr > td:not([colspan]),
  .sl-proc-scroll > table:not(.sl-proc-matrix) > thead > tr > th:not([colspan]) {
    max-width: 15em;
  }
  .sl-proc-scroll > table:not(.sl-proc-matrix) > tbody > tr > td[data-label="Money"] {
    max-width: 13em;
    white-space: normal;
  }
  .sl-proc-scroll td .sl-proc-badge,
  .sl-proc-scroll td .sl-proc-pill { white-space: normal; }
  .sl-proc-scroll td .sl-proc-sourcetext {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: break-word;
  }
}

/* -------------------------------------------------------------------------
   Touch targets, 2026-09-02.

   /procurement/coverage carried 146 controls under 24 CSS px tall: the
   "browse" links were 18.3px at 11.5px type and the "evidence" disclosures
   15px at 10px type, 14px apart. The matrix itself stacks into readable
   cards, but the controls that open a cell could not be hit with a thumb, and
   a cell nobody can open is a cell nobody can check. Apple's HIG floor is
   44px; the label type may stay quiet, the tappable box may not.
   ------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .sl-proc-cell__drill {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-top: 2px;
    font-size: 14px;
  }
  .sl-proc-evidence { margin-top: 0; }
  /* display is left alone so the disclosure triangle survives. */
  .sl-proc-evidence > summary {
    min-height: 44px;
    padding: 13px 0;
    font-size: 12px;
    line-height: 1.45;
  }
  .sl-proc-evidence p { font-size: 13.5px; }
  .sl-proc-evidence pre { font-size: 12px; }
  .sl-proc-cell__n { font-size: 14px; }
  .sl-proc-badge, .sl-proc-pill { font-size: 11px; padding: 3px 7px; }
  .sl-proc-matrix th[data-label]::before,
  .sl-proc-matrix td[data-label]::before { font-size: 11px; }
  .sl-proc-matrix th, .sl-proc-matrix td { padding: 8px 10px; }

  /* Every other tappable thing on the surface gets the same floor. */
  .sl-proc-facts li a,
  .sl-proc-mentions li a,
  .sl-source-links a,
  .sl-proc-numlist li a,
  .sl-proc-runmeta dd a {
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
  }
  .sl-proc-runrow summary,
  .sl-datatable-wrap details > summary {
    min-height: 44px;
    padding: 13px 0;
    font-size: 12px;
  }
  .sl-filter-bar { gap: 10px 12px; padding: 12px 14px; }
  .sl-filter-bar input,
  .sl-filter-bar select { min-height: 44px; font-size: 16px; }
  .sl-filter-bar button { min-height: 44px; font-size: 15px; }
}

/* Phone legibility + the tap targets outside the matrix.

   An inline link inside a running sentence is the one target that cannot be
   made 44px without breaking the sentence it sits in, so those keep their line
   and gain size instead. Everything that stands on its own line gets the
   floor. */
@media (max-width: 720px) {
  /* Standalone navigation and source links. */
  .sl-breadcrumb a {
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
  }
  /* An inline link inside a sentence is the one control that cannot be given
     44px of height without wrecking the line it sits in. Vertical padding on
     an INLINE box does not affect the line box, but it does enter hit-testing
     — so the hit area grows to ~38px while the paragraph is unmoved. The
     extra list spacing keeps two links on neighbouring lines from overlapping. */
  .sl-methodology li { padding: 6px 0; }
  .sl-methodology li a,
  .sl-proc-defn a,
  .sl-proc-callout p a,
  .sl-proc-section > p a,
  .sl-proc-freshness a {
    padding: 11px 2px;
    margin: -11px -2px;
    overflow-wrap: break-word;
  }

  /* One link per data cell: pad the box, not the column. No horizontal
     padding, so no table gets wider than it was. */
  /* :not(.sl-proc-matrix) because the matrix is cards on a phone, not cells,
     and this rule outranks .sl-proc-cell__drill on specificity — without the
     exclusion it quietly took the drill link back down to 42.6px. */
  .sl-datatable:not(.sl-proc-matrix) > tbody > tr > th > a,
  .sl-datatable:not(.sl-proc-matrix) > tbody > tr > td > a {
    display: inline-block;
    min-height: 40px;
    padding: 11px 0;
    line-height: 1.4;
  }

  /* Body type. 10px and 11.5px are not reading sizes on a phone. */
  .sl-proc-defn { font-size: 13.5px; }
  .sl-proc-defn code { font-size: 12.5px; }
  .sl-proc-asof { font-size: 12.5px; }
  .sl-proc-card__fact { font-size: 13.5px; }
  .sl-proc-colnote { font-size: 13.5px; }
  .sl-proc-clock__label { font-size: 12.5px; }
  .sl-proc-clock__label code { font-size: 11.5px; }
  .sl-proc-runmeta { font-size: 13px; }
  .sl-proc-runmeta dt { font-size: 11.5px; }
  .sl-datatable caption { font-size: 13px; }
  .sl-proc-sourcetext { font-size: 12.5px; }
}
@media (max-width: 420px) {
  /* Was 12px. This line is a claim about how current the data is, not a
     footnote, and it is the first thing on every one of the nine pages. */
  .sl-proc-freshness { font-size: 13px; }
}
