/* Compute debt views — article board and Space debt pages (scripts/compute-debt.js).
   Monochrome like the rest of the site: identity comes from shape, fill and line pattern,
   never from hue. Marks: debt = solid circle · lease liability = half-tone circle ·
   lease not yet started = dashed ring · commitment = ring · backlog = dotted muted ring ·
   guarantee cap = dashed diamond · equity-linked = half-tone square. */

.debt-sans,
.debt-tabs,
.debt-legend,
.debt-note,
.debt-chip,
.debt-tip,
.debt-row,
.debt-matrix,
.debt-detail,
.debt-key,
.debt-meter,
.debt-sofr,
.debt-implied,
.debt-watch__meta,
.debt-watch,
.debt-how,
.debt-src-stats,
.debt-details summary,
.debt-net__controls,
.debt-net__count {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* —— marks —— */
.dm circle,
.dm path,
.dm rect {
  stroke: var(--ink);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.dm--A circle { fill: var(--ink); stroke: none; }
.dm--B circle { fill: color-mix(in srgb, var(--ink) 48%, var(--bg)); stroke: none; }
.dm--C circle { fill: var(--bg); stroke-dasharray: 3 2; }
.dm--D circle { fill: var(--bg); }
.dm--E circle { fill: var(--bg); stroke: var(--muted); stroke-dasharray: 1 2; }
.dm--G path { fill: var(--bg); stroke-dasharray: 3 2; }
.dm--Q rect { fill: color-mix(in srgb, var(--ink) 32%, var(--bg)); stroke: none; }

.dm-icon {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -0.15em;
  overflow: visible;
}

/* —— shared bits —— */
.debt-note {
  max-width: 760px;
  margin: 0.6rem 0 0;
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--muted);
}

.debt-chip {
  display: inline-block;
  margin: 0 0 0 0.45em;
  padding: 0 0.4em;
  border: 1px solid color-mix(in srgb, var(--muted) 70%, transparent);
  border-radius: 2px;
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  vertical-align: 0.1em;
}

.debt-tip {
  position: fixed;
  z-index: 60;
  max-width: 21rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.45;
  pointer-events: none;
}

.debt-tip strong {
  display: block;
  margin-bottom: 0.15rem;
  font-weight: 600;
}

.debt-tip span {
  display: block;
  color: var(--muted);
}

.debt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.debt-tabs button {
  appearance: none;
  margin: 0;
  padding: 0.3rem 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  font: inherit;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}

:lang(zh) .debt-tabs button {
  letter-spacing: 0.06em;
}

.debt-tabs button:hover {
  color: var(--ink);
}

.debt-tabs button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: currentColor;
}

.debt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.debt-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: help;
}

.debt-filter {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 0 0.85rem;
  border-bottom: 1px solid var(--ink);
}

.debt-tabs button:focus-visible,
.debt-cell:focus-visible,
.debt-matrix__pick:focus-visible,
.debt-net__chip:focus-visible,
.debt-node:focus-visible {
  outline: 1px dashed var(--ink);
  outline-offset: 3px;
}

/* —— article board —— */
.debt-board {
  margin: 1.75rem 0 1rem;
}

.debt-board__head {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ink);
}

.debt-board__lede {
  margin: 0.8rem 0 1rem;
  font-style: italic;
}

.debt-board__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.6rem 1.75rem;
}

.debt-card {
  min-width: 0;
  padding-top: 0.55rem;
  border-top: 2px solid var(--ink);
}

.debt-card__name {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.debt-card__rating,
.debt-matrix__rating {
  margin-left: 0.5rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.debt-card__head {
  margin: 0.3rem 0 0.6rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.debt-card__rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.debt-row {
  display: grid;
  grid-template-columns: 6.6rem minmax(3rem, 1fr) auto;
  grid-template-areas:
    "col bar amt"
    ". what what";
  gap: 0.1rem 0.55rem;
  align-items: center;
  padding: 0.28rem 0;
  font-size: 0.74rem;
  line-height: 1.35;
}

.debt-row--first {
  border-top: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
}

.debt-row__col {
  grid-area: col;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.debt-row__bar {
  grid-area: bar;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.debt-row__track {
  flex: 1 1 auto;
  height: 0.5rem;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

.debt-row__fill {
  display: block;
  box-sizing: border-box;
  height: 100%;
}

.debt-row__fill--A { background: var(--ink); }
.debt-row__fill--B { background: color-mix(in srgb, var(--ink) 48%, var(--bg)); }
.debt-row__fill--C { border: 1px dashed var(--ink); }
.debt-row__fill--D { border: 1px solid var(--ink); }
.debt-row__fill--E { border: 1px dotted var(--muted); }
.debt-row__fill--G { border: 1px dashed var(--ink); }
.debt-row__fill--Q { background: color-mix(in srgb, var(--ink) 32%, var(--bg)); }

.debt-row__amt {
  grid-area: amt;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* Amounts given only as text (several currencies) wrap instead of widening the card. */
.debt-row__amt--text {
  max-width: 8.5rem;
  white-space: normal;
  font-size: 0.86em;
  line-height: 1.3;
}

.debt-row__what {
  grid-area: what;
  color: var(--muted);
}

.debt-card__note {
  margin: 0.55rem 0 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
}

/* —— Space matrix —— */
.debt-matrix__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.debt-matrix {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.75rem;
}

.debt-matrix thead th {
  padding: 0.75rem 0.35rem 0.45rem;
  border-bottom: 1px solid var(--ink);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-align: left;
  text-transform: uppercase;
  vertical-align: bottom;
  color: var(--muted);
  cursor: help;
}

:lang(zh) .debt-matrix thead th {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.debt-matrix thead th.debt-matrix__corner {
  width: 10.5rem;
  cursor: default;
}

.debt-matrix__group th {
  padding: 1.1rem 0.35rem 0.3rem;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 400;
  text-align: left;
}

.debt-matrix tbody td,
.debt-matrix tbody th.debt-matrix__co {
  padding: 0.2rem 0.35rem;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
  vertical-align: middle;
}

.debt-matrix tr.is-selected > * {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.debt-matrix__pick,
.debt-cell {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.debt-matrix__pick {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  width: 100%;
  min-height: 2.4rem;
}

.debt-matrix__name {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 0.88rem;
}

.debt-matrix__pick:hover .debt-matrix__name {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.debt-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  max-width: 100%;
}

.debt-cell svg {
  display: block;
  overflow: visible;
}

.debt-cell__amt {
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  white-space: nowrap;
}

.debt-cell__more {
  font-size: 0.62rem;
  color: var(--muted);
}

.debt-cell:hover .debt-cell__amt {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* —— detail panel —— */
.debt-detail {
  margin: 1.75rem 0 0;
  padding-top: 0.85rem;
  border-top: 2px solid var(--ink);
  scroll-margin-top: 1rem;
}

.debt-detail__name {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
}

.debt-detail__head {
  max-width: 760px;
  margin: 0.35rem 0 0.4rem;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1rem;
  line-height: 1.5;
}

.debt-detail__note {
  max-width: 760px;
  margin: 0 0 1rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
}

.debt-detail__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr));
  gap: 0.5rem 1.6rem;
}

.debt-detail__col {
  min-width: 0;
  scroll-margin-top: 1rem;
}

.debt-detail__col h4 {
  margin: 0.6rem 0 0;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.debt-detail__col.is-target h4 {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.debt-item {
  padding: 0.55rem 0 0.6rem;
  border-bottom: 1px dotted color-mix(in srgb, var(--muted) 45%, transparent);
}

.debt-item__top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.debt-item__title {
  margin: 0.25rem 0 0.1rem;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 0.92rem;
  line-height: 1.4;
}

.debt-item__amt {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.debt-item__meta,
.debt-item__note {
  margin: 0.2rem 0 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--muted);
}

.debt-item__note {
  color: var(--ink);
}

.debt-src {
  margin: 0.35rem 0 0;
  font-size: 0.66rem;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.debt-src__k {
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.debt-src a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.debt-detail__dates,
.debt-detail__link {
  max-width: 760px;
  margin: 1rem 0 0;
  font-size: 0.78rem;
  line-height: 1.55;
}

.debt-detail__link a,
.debt-net__story a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

/* —— SVG charts —— */
.debt-chart {
  display: block;
  width: 100%;
  height: auto;
}

.debt-chart text,
.debt-net text {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 11px;
  fill: var(--ink);
}

.debt-chart .t-muted { fill: var(--muted); }
.debt-chart .t-strong { font-size: 12px; font-weight: 600; }
.debt-chart .grid { stroke: var(--muted); stroke-opacity: 0.28; stroke-width: 1; }
.debt-chart .axis { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.debt-chart .rowline { stroke: var(--muted); stroke-opacity: 0.2; stroke-width: 1; }
.debt-chart .today { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.debt-chart .dot { fill: var(--ink); stroke: var(--bg); stroke-width: 2; }
.debt-chart .dot-open { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.debt-chart .win { fill: color-mix(in srgb, var(--ink) 38%, var(--bg)); }
.debt-chart .test { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.debt-chart .evt { stroke: var(--ink); stroke-width: 2; }
.debt-chart .hit,
.debt-net .hit { fill: transparent; stroke: none; }
.debt-chart .debt-hit { cursor: default; }
.debt-chart .debt-hit:hover .dot,
.debt-chart .debt-hit:hover .test,
.debt-chart .debt-hit:hover .win { stroke: var(--ink); stroke-width: 2.5; }

.debt-chart-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.debt-timeline {
  min-width: 920px;
}

.debt-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: pre;
}

.debt-key span {
  display: inline-block;
  flex: 0 0 auto;
}

/* One entry: the swatch and its words wrap together; entries sit further apart than swatch and words. */
.debt-key:has(> .debt-key__item) { column-gap: 1rem; }
/* .debt-key span would make the entry an inline block; restate it as a group that may shrink and wrap its words. */
.debt-key > .debt-key__item { display: inline-flex; flex: 0 1 auto; align-items: center; gap: 0.35rem; min-width: 0; white-space: normal; }
.debt-key__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.debt-key__open { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); }
.debt-key__test { width: 8px; height: 8px; margin: 0 2px; border: 1.5px solid var(--ink); transform: rotate(45deg); }
.debt-key__win { width: 20px; height: 7px; background: color-mix(in srgb, var(--ink) 38%, var(--bg)); }
.debt-key__evt { width: 2px; height: 13px; background: var(--ink); }

/* —— pressure meters —— */
.debt-meters {
  margin: 0;
  padding: 0;
  list-style: none;
}

.debt-meter {
  display: grid;
  grid-template-columns: 10.5rem minmax(6rem, 1fr) 3.6rem;
  grid-template-areas:
    "who track val"
    "who what what";
  gap: 0.25rem 0.9rem;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
}

.debt-meter__who {
  grid-area: who;
  align-self: start;
}

.debt-meter__who strong {
  display: block;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 0.92rem;
  font-weight: 400;
}

.debt-meter__who span {
  font-size: 0.7rem;
  color: var(--muted);
}

.debt-meter__track {
  grid-area: track;
  position: relative;
  height: 0.65rem;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

.debt-meter__fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--ink);
}

.debt-meter__one {
  position: absolute;
  top: -4px;
  bottom: -4px;
  border-left: 1px dashed var(--ink);
  mix-blend-mode: difference;
}

.debt-meter__val {
  grid-area: val;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.debt-meter__what {
  grid-area: what;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--muted);
}

/* —— tables —— */
.debt-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.debt-implied {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.78rem;
  line-height: 1.45;
}

.debt-implied th {
  padding: 0.45rem 0.55rem 0.4rem 0;
  border-bottom: 1px solid var(--ink);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  color: var(--muted);
}

.debt-implied td {
  padding: 0.45rem 0.55rem 0.45rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
  vertical-align: top;
}

.debt-implied .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.debt-implied__v {
  display: grid;
  grid-template-columns: minmax(5rem, 1fr) 7.6rem;
  gap: 0.6rem;
  align-items: center;
  min-width: 13rem;
}

.debt-implied__bar {
  position: relative;
  height: 0.5rem;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

.debt-implied__lo,
.debt-implied__hi {
  position: absolute;
  top: 0;
  bottom: 0;
}

.debt-implied__lo { left: 0; background: var(--ink); }
.debt-implied__hi { background: color-mix(in srgb, var(--ink) 35%, var(--bg)); }

.debt-sofr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.9rem;
}

.debt-sofr label {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.debt-sofr input {
  width: 5.5rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.debt-sofr .debt-note {
  flex: 1 1 22rem;
  margin: 0;
}

.debt-details {
  margin: 0.9rem 0 0;
}

.debt-details summary {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}

.debt-details summary::-webkit-details-marker {
  display: none;
}

.debt-details summary::before {
  content: "+ ";
}

.debt-details[open] summary::before {
  content: "− ";
}

.debt-details[open] summary {
  margin-bottom: 0.5rem;
  color: var(--ink);
}

/* —— monitoring and provenance —— */
.debt-watch__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.3rem;
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
}

.debt-watch {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 0.25rem 1.4rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.debt-watch__item {
  min-width: 0;
  padding: 0.5rem 0 0.55rem;
  border-top: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
}

.debt-watch__item--review {
  border-top: 2px solid var(--ink);
}

.debt-watch__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.4rem;
  margin: 0;
}

.debt-watch__head strong {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 0.9rem;
  font-weight: 400;
}

.debt-watch__head .debt-chip {
  margin-left: 0;
}

.debt-watch__tic,
.debt-watch__items {
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.debt-watch__sub {
  margin: 0.2rem 0 0;
  font-size: 0.7rem;
  color: var(--muted);
}

.debt-watch__filings {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.74rem;
  line-height: 1.6;
}

.debt-watch__filings a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* What an offering document says, read by scripts/debt/terms.py: one line under the filing link. */
.debt-watch__terms {
  display: block;
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--muted);
}

/* XBRL check: dataset figure, filed value, status. A newer period or a difference is drawn in ink. */
.debt-recon {
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.7rem;
  line-height: 1.45;
}

.debt-recon__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.35rem;
  padding: 0.12rem 0;
  color: var(--muted);
}

.debt-recon__t {
  color: var(--ink);
}

.debt-recon__item .debt-chip {
  margin-left: 0;
}

.debt-recon__item--newer,
.debt-recon__item--differs {
  padding-left: 0.45rem;
  border-left: 2px solid var(--ink);
  color: var(--ink);
}

.debt-watch__manual {
  margin: 1rem 0 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78rem;
}

.debt-how {
  max-width: 760px;
  margin: 1.6rem 0 0;
  padding: 0.1rem 0 0.1rem 0.9rem;
  border-left: 2px solid var(--ink);
}

.debt-how h3 {
  margin: 0 0 0.4rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.debt-how ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.55;
}

.debt-how li + li {
  margin-top: 0.3rem;
}

.debt-src-stats {
  max-width: 760px;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
}

.debt-src-stats__flag {
  display: inline-block;
  margin-right: 0.9rem;
  white-space: nowrap;
}

.debt-src-stats__flag .debt-chip {
  margin-left: 0;
}

.debt-sources td {
  font-size: 0.74rem;
}

.debt-sources__id {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.debt-sources__id a {
  color: var(--ink);
}

.debt-sources__title {
  display: block;
  max-width: 16rem;
  white-space: normal;
  color: var(--muted);
}

.debt-sources__lines {
  color: var(--muted);
}

/* —— network —— */
.debt-net__controls {
  display: grid;
  gap: 0.55rem;
  padding: 0 0 0.8rem;
  border-bottom: 1px solid var(--ink);
}

.debt-net__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.8rem;
}

.debt-net__label {
  flex: 0 0 auto;
  min-width: 5.5rem;
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.debt-net__types,
.debt-net__loops {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.debt-net__chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.25rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--muted) 60%, transparent);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.debt-net__chip svg {
  display: block;
}

.debt-net__types .debt-net__chip[aria-pressed="false"] {
  border-style: dashed;
  color: var(--muted);
  opacity: 0.6;
}

.debt-net__loops .debt-net__chip[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.debt-net__controls select {
  max-width: 100%;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
}

.debt-net__story {
  max-width: 760px;
  min-height: 3.2em;
  margin: 0.9rem 0 0.4rem;
  font-size: 0.98rem;
  line-height: 1.55;
}

.debt-net__hint {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
}

.debt-net__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.debt-net {
  display: block;
  width: 100%;
  min-width: 860px;
  height: auto;
}

.debt-net__bg {
  fill: transparent;
}

.debt-net .debt-net__group {
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 4px;
  stroke-linejoin: round;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--muted);
}

.debt-net .edge,
.debt-net__chip .edge {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
}

.edge--equity { stroke-opacity: 0.5; }
.edge--warrant { stroke-opacity: 0.8; }
.arrow { fill: var(--ink); }
.arrow--equity { fill-opacity: 0.5; }

.debt-net .edge-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 12;
  pointer-events: stroke;
  cursor: pointer;
}

.debt-edge {
  transition: opacity 0.15s ease;
}

.debt-net.is-idle .debt-edge {
  opacity: 0.55;
}

.debt-net .debt-edge:hover,
.debt-net .debt-edge.is-on {
  opacity: 1;
}

.debt-net .debt-edge.is-off {
  opacity: 0.07;
}

.debt-edge.is-on .edge {
  stroke-opacity: 1;
}

.debt-edge:hover .edge {
  stroke-opacity: 1;
}

.debt-node {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.debt-node__dot {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 1.6;
}

.debt-node--hyper .debt-node__dot,
.debt-node--chips .debt-node__dot {
  fill: var(--ink);
}

.debt-node--labs .debt-node__dot {
  stroke-width: 3;
}

.debt-node--vehicles .debt-node__dot {
  stroke-dasharray: 2.5 2;
}

.debt-node--capital .debt-node__dot {
  fill: color-mix(in srgb, var(--ink) 30%, var(--bg));
  stroke: none;
}

.debt-node.is-focus .debt-node__dot {
  fill: var(--ink);
  stroke: var(--ink);
  stroke-width: 4;
}

.debt-node.is-off {
  opacity: 0.22;
}

.debt-net .debt-node__label {
  font-size: 11.5px;
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 3.5px;
  stroke-linejoin: round;
}

.debt-node:hover .debt-node__label {
  font-weight: 600;
}

.debt-net .debt-net__amt {
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 3.5px;
  stroke-linejoin: round;
  pointer-events: none;
}

.debt-net__count {
  margin: 1.5rem 0 0.4rem;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.debt-flows td:nth-child(5) {
  min-width: 16rem;
}

@media (max-width: 640px) {
  .debt-meter {
    grid-template-columns: minmax(0, 1fr) 3.4rem;
    grid-template-areas:
      "who val"
      "track track"
      "what what";
  }

  .debt-row {
    grid-template-columns: 5.6rem minmax(2.5rem, 1fr) auto;
  }

  .debt-net__label {
    min-width: 0;
    width: 100%;
  }
}

@media (forced-colors: active) {
  .dm circle,
  .dm path,
  .dm rect,
  .debt-node__dot,
  .debt-net .edge {
    stroke: CanvasText;
  }

  .dm--A circle,
  .debt-row__fill--A,
  .debt-meter__fill,
  .debt-implied__lo {
    fill: CanvasText;
    background: CanvasText;
  }
}

/* —— interest: prior → latest, HTML so it reflows on phones —— */
.debt-dumb {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.debt-dumb__row {
  display: grid;
  grid-template-columns: 10.5rem minmax(8rem, 1fr) 3.6rem;
  gap: 0.25rem 0.9rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
}

.debt-dumb__row--scale {
  padding: 0 0 0.2rem;
  border-bottom: 1px solid var(--ink);
}

.debt-dumb__who strong {
  display: block;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 0.92rem;
  font-weight: 400;
}

.debt-dumb__who span {
  display: block;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--muted);
}

.debt-dumb__track {
  position: relative;
  height: 1.1rem;
}

.debt-dumb__row--scale .debt-dumb__track {
  height: 1rem;
}

.debt-dumb__tick {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font-size: 0.64rem;
  color: var(--muted);
  white-space: nowrap;
}

.debt-dumb__tick:first-child {
  transform: none;
}

.debt-dumb__grid {
  position: absolute;
  top: -0.5rem;
  bottom: -0.5rem;
  border-left: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
}

.debt-dumb__line {
  position: absolute;
  top: 50%;
  height: 1.5px;
  margin-top: -0.75px;
  background: var(--ink);
}

.debt-dumb__dot {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: var(--ink);
  box-sizing: border-box;
}

.debt-dumb__dot--prior {
  border: 1.5px solid var(--ink);
  background: var(--bg);
}

.debt-dumb__val {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@media (max-width: 640px) {
  .debt-dumb__row {
    grid-template-columns: minmax(0, 1fr) 3.4rem;
  }

  .debt-dumb__track {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0.2rem 0.4rem 0.1rem;
  }

  .debt-dumb__row--scale .debt-dumb__who,
  .debt-dumb__row--scale .debt-dumb__val {
    display: none;
  }

  .debt-dumb__row--scale .debt-dumb__track {
    grid-row: 1;
  }
}

/* —— bars: amounts, limits and shortfalls on one scale, HTML so they reflow ——
   Segments: --solid firm or drawn; --soft the rest of a whole; --hatch a shortfall
   that is paid for anyway; --outline a limit with nothing drawn; --dash an amount
   that can be cancelled or has not happened. A --mark is a threshold line. */
.debt-bars {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.debt-bars__title {
  margin: 0 0 0.55rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--muted);
}

.debt-bars__row {
  display: grid;
  grid-template-columns: 10.5rem minmax(8rem, 1fr) 7.6rem;
  gap: 0.25rem 0.9rem;
  align-items: center;
  margin: 0;
  padding: 0.6rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
}

.debt-bars__row--scale {
  padding: 0 0 0.25rem;
  border-bottom: 1px solid var(--ink);
}

.debt-bars__who strong {
  display: block;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.3;
}

.debt-bars__who span {
  display: block;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}

.debt-bars__track {
  position: relative;
  height: 0.95rem;
}

.debt-bars__row--scale .debt-bars__track {
  height: 1.05rem;
}

.debt-bars__tick,
.debt-bars__marklabel {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font-size: 0.64rem;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--muted);
}

.debt-bars__tick--start { transform: none; }
.debt-bars__tick--end { transform: translateX(-100%); }

.debt-bars__marklabel {
  font-weight: 700;
  color: var(--ink);
}

.debt-bars__grid {
  position: absolute;
  top: -0.6rem;
  bottom: -0.6rem;
  border-left: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
}

.debt-bars__seg {
  position: absolute;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
}

/* A 2px gap between touching segments, so each one reads on its own. */
.debt-bars__seg + .debt-bars__seg { clip-path: inset(0 0 0 2px); }

.debt-bars__seg--solid { background: var(--ink); }
.debt-bars__seg--soft { background: color-mix(in srgb, var(--ink) 32%, var(--bg)); }
.debt-bars__seg--outline { border: 1px solid var(--ink); }
.debt-bars__seg--dash { border: 1px dashed var(--ink); }
.debt-bars__seg--hatch {
  border: 1px solid var(--ink);
  background: repeating-linear-gradient(135deg, var(--ink) 0 1px, transparent 1px 5px);
}

.debt-bars__mark {
  position: absolute;
  top: -0.45rem;
  bottom: -0.45rem;
  margin-left: -0.75px;
  border-left: 1.5px dashed var(--ink);
}

.debt-bars__val {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.debt-key__seg {
  width: 18px;
  height: 9px;
  box-sizing: border-box;
}

.debt-key__seg--solid { background: var(--ink); }
.debt-key__seg--soft { background: color-mix(in srgb, var(--ink) 32%, var(--bg)); }
.debt-key__seg--outline { border: 1px solid var(--ink); }
.debt-key__seg--dash { border: 1px dashed var(--ink); }
.debt-key__seg--hatch {
  border: 1px solid var(--ink);
  background: repeating-linear-gradient(135deg, var(--ink) 0 1px, transparent 1px 5px);
}
.debt-key__seg--mark { width: 0; height: 13px; border-left: 1.5px dashed var(--ink); }

/* —— curve: what is paid or received at the end, against one value; an illustration on a 0–100 axis.
   Lines are SVG with non-scaling strokes; every label is HTML, so nothing stretches. —— */
.debt-curve {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.debt-fig .debt-curve__y {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--muted);
}

.debt-curve__plot {
  position: relative;
  height: 12.5rem;
  border-bottom: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.debt-curve__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.debt-curve__line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.debt-curve__line--pay { stroke-width: 2.5px; }
.debt-curve__line--dash { stroke-dasharray: 4 4; }

.debt-curve__vmark {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px dashed var(--muted);
}

.debt-curve__hmark {
  position: absolute;
  right: 0;
  left: 0;
  border-top: 1px dashed var(--muted);
}

.debt-curve__hmark > span {
  position: absolute;
  right: 0;
  bottom: 0.2rem;
  width: max-content;
  max-width: 48%;
  padding: 0 0.25rem;
  text-align: right;
  background: var(--bg);
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--muted);
}

.debt-curve__note {
  position: absolute;
  width: max-content;
  max-width: 13rem;
  padding: 0.1rem 0.3rem;
  transform: translate(-50%, 50%);
  background: var(--bg);
  font-size: 0.74rem;
  line-height: 1.35;
  text-align: center;
}

.debt-fig .debt-curve__x {
  position: relative;
  height: 1.1rem;
  margin: 0.3rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--muted);
}

.debt-curve__x > li {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.debt-fig .debt-curve__xtitle {
  margin: 0.1rem 0 0;
  font-size: 0.68rem;
  line-height: 1.3;
  text-align: right;
  color: var(--muted);
}

.debt-curve__note--start { transform: translate(0, 50%); text-align: left; }
.debt-curve__note--end { transform: translate(-100%, 50%); text-align: right; }

@media (max-width: 720px) {
  .debt-curve__plot { height: 11rem; }
  .debt-curve__note { max-width: 8.5rem; font-size: 0.68rem; }
}

/* —— columns: one value per period, with an optional reference line —— */
.debt-cols {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.debt-cols__plot {
  position: relative;
  height: 11rem;
  margin-top: 0.4rem;
  border-bottom: 1px solid var(--ink);
}

.debt-cols__bars,
.debt-cols__x {
  display: grid;
  grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.debt-cols__bars {
  position: absolute;
  inset: 0;
  align-items: end;
}

.debt-cols__bars > li {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  margin: 0;
}

.debt-cols__bar {
  display: block;
  width: min(2.4rem, 56%);
  height: var(--h);
  background: var(--ink);
}

.debt-cols__v {
  margin-bottom: 0.25rem;
  padding: 0 0.2rem;
  background: var(--bg);
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.debt-cols__ref {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1.5px dashed var(--ink);
}

.debt-cols__ref span {
  position: absolute;
  right: 0;
  bottom: 0.25rem;
  padding: 0 0.25rem;
  background: var(--bg);
  font-size: 0.68rem;
  font-weight: 700;
}

.debt-cols__x {
  margin-top: 0.3rem;
}

.debt-cols__x > li {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.25;
  text-align: center;
  color: var(--muted);
}

.debt-cols__xtitle {
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 640px) {
  .debt-bars__row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .debt-bars__track {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0.25rem 0.25rem 0.1rem;
  }

  .debt-bars__row--scale .debt-bars__who,
  .debt-bars__row--scale .debt-bars__val {
    display: none;
  }

  .debt-bars__row--scale .debt-bars__track {
    grid-row: 1;
  }

  .debt-bars__val {
    font-size: 0.82rem;
  }

  .debt-cols__plot {
    height: 9.5rem;
  }

  .debt-cols__v {
    font-size: 0.64rem;
  }
}

/* —— Article: The Compute Debt Map (content/ai/compute-debt) ——
   Static figures reuse the Space marks, meters and dumbbells above. */

.prose .debt-lead {
  font-size: 1.14em;
  line-height: 1.6;
}

.prose .debt-bases,
.prose .debt-wirekey {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 1.6rem;
  display: grid;
  gap: 0.55rem;
}

.prose .debt-bases li {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  margin: 0;
  line-height: 1.5;
}

.prose .debt-bases .dm-icon { margin-top: 0.3em; }

.prose .debt-bases strong,
.debt-method__meta,
.debt-toc__h,
.debt-toc__fam,
.debt-loop a,
.debt-book__d {
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prose .debt-bases strong {
  font-size: 0.72rem;
  margin-right: 0.4rem;
}

.prose .debt-wirekey li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

.debt-wirekey__s {
  position: relative;
  flex: 0 0 2.6rem;
  height: 0;
  border-top: 1px solid var(--ink);
}

.debt-wirekey__s::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  border-left: 6px solid var(--ink);
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
}

.debt-wirekey__s--pay { border-top-width: 2px; }
.debt-wirekey__s--pay::after { top: -4.5px; }
.debt-wirekey__s--dash { border-top-style: dashed; }

/* Bar swatches in the same key: a limit with nothing drawn, and a covered shortfall. */
.debt-wirekey__s--box,
.debt-wirekey__s--hatch {
  height: 0.7rem;
  border: 1px solid var(--ink);
  box-sizing: border-box;
}
.debt-wirekey__s--box::after,
.debt-wirekey__s--hatch::after { content: none; }
.debt-wirekey__s--hatch {
  background: repeating-linear-gradient(135deg, var(--ink) 0 1px, transparent 1px 5px);
}

.prose .debt-toc {
  margin: 2.2rem 0 2.6rem;
  padding: 1.1rem 0 0.4rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  line-height: 1.45;
}

.prose .debt-toc a {
  color: inherit;
  text-decoration: none;
}

.prose .debt-toc a:hover { text-decoration: underline; }

.prose .debt-toc__h {
  margin: 0 0 0.7rem;
  font-size: 0.7rem;
}

.prose .debt-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.prose .debt-toc__fams,
.prose .debt-toc__ch2 {
  columns: 2 15rem;
  column-gap: 2rem;
  margin-bottom: 1.2rem;
}

.prose .debt-toc li { margin: 0.12rem 0; }

.prose .debt-toc .debt-toc__fams > li {
  break-inside: avoid;
  margin: 0 0 0.95rem;
}

.debt-toc__fam {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.66rem;
  color: var(--muted);
}

.prose .debt-toc__fams ol span {
  display: inline-block;
  width: 1.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.prose h4.debt-method__title {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  margin-top: 2.8rem;
  scroll-margin-top: 1rem;
}

.debt-method__no {
  flex: 0 0 auto;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Inline flow, so a long "who uses it" list wraps like text instead of leaving the dot behind. */
.prose .debt-method__meta {
  margin: 0.3rem 0 0.95rem;
  font-size: 0.68rem;
  line-height: 1.6;
  color: var(--muted);
}

.prose .debt-method__meta .dm-icon {
  margin-right: 0.45rem;
  vertical-align: -0.22em;
}

.prose .debt-method__meta > span[aria-hidden="true"] { margin: 0 0.45rem; }

.prose .debt-method__like { font-style: italic; }
:lang(zh) .prose .debt-method__like { font-style: normal; color: var(--muted); }

.prose .debt-fam__lede { color: var(--muted); }

.prose .debt-dg { margin: 1.4rem 0 1.2rem; }

.prose .debt-aside {
  margin: 2.6rem 0 1.6rem;
  padding: 0.9rem 1.1rem 0.2rem;
  border: 1px dashed var(--ink);
}

.prose .debt-aside h4 { margin-top: 0.2rem; }

.debt-fig { margin: 1.6rem 0 1rem; }
.debt-fig .debt-dumb,
.debt-fig .debt-meters { margin: 0; padding: 0; }
/* .prose p and .prose ol outrank the chart classes; restate their spacing inside a figure. */
.debt-fig .debt-bars,
.debt-fig .debt-cols__bars { margin: 0; padding: 0; line-height: 1.4; }
.debt-fig .debt-cols__x { margin: 0.3rem 0 0; padding: 0; line-height: 1.25; }
.debt-fig .debt-bars__title { margin: 0 0 0.55rem; line-height: 1.3; }
.debt-fig .debt-cols__xtitle { margin: 0.2rem 0 0; line-height: 1.3; }
.debt-fig .debt-key,
.debt-dg .debt-key { margin: 0.55rem 0 0; line-height: 1.4; }
.debt-dg .table-scroll > table { margin: 0.3rem 0 0.2rem; }


.prose .debt-books th[scope="row"] { white-space: nowrap; }
.prose .debt-books thead th { vertical-align: bottom; }
.prose .debt-books thead .dm-icon { display: block; margin: 0 0 0.3rem auto; }
.prose .debt-books td.debt-date { text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }

.debt-book__d {
  display: block;
  font-size: 0.6rem;
  color: var(--muted);
  white-space: nowrap;
}

/* The ladder: rate ranges need a wider label and value column than the interest dumbbells. */
.debt-dumb--range .debt-dumb__row { grid-template-columns: 11.5rem minmax(8rem, 1fr) 6.4rem; }
.debt-dumb--range .debt-dumb__val { white-space: nowrap; font-size: 0.86rem; }

.debt-nowrap { white-space: nowrap; }

.prose .debt-loops {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr));
  gap: 0.8rem;
}

.debt-loop {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--ink);
}

.debt-loop strong {
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
}

.prose .debt-loop p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.prose .debt-loop a {
  margin-top: auto;
  padding-top: 0.3rem;
  font-size: 0.66rem;
  color: var(--ink);
}

.prose .debt-space {
  padding: 0.7rem 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
}

.prose .debt-watchlist li { margin: 0.4rem 0; }
.prose .debt-method-note {
  margin-top: 2.2rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Slides: the same figures, tighter. */
.presentation-page .debt-fig--slide { margin: 0.4rem 0 0.6rem; }
.presentation-page .debt-dg--slide { margin: 0.2rem 0 0.4rem; }
.presentation-page .debt-loops--slide {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}
.presentation-page .debt-loops--slide p { margin: 0; font-size: 0.86rem; line-height: 1.45; }
.presentation-page .presentation-card h3 .dm-icon { vertical-align: -0.1em; }

/* Dumbbells on a slide: one line per row, name and note side by side. */
.presentation-page .debt-fig--slide .debt-dumb__row { padding: 0.22rem 0; }
.presentation-page .debt-fig--slide .debt-dumb__row--scale { padding: 0 0 0.15rem; }
.presentation-page .debt-fig--slide .debt-dumb__who {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.presentation-page .debt-fig--slide .debt-dumb__who strong { display: inline; font-size: 0.86rem; }
.presentation-page .debt-fig--slide .debt-dumb__who span { font-size: 0.62rem; overflow: hidden; text-overflow: ellipsis; }
.presentation-page .debt-fig--slide .debt-dumb__grid { top: -0.22rem; bottom: -0.22rem; }

@media (min-width: 641px) {
  .presentation-page .debt-fig--slide .debt-dumb__row { grid-template-columns: 17rem minmax(8rem, 1fr) 4rem; }
  .presentation-page .debt-fig--slide .debt-dumb--range .debt-dumb__row { grid-template-columns: 20rem minmax(8rem, 1fr) 7rem; }
}

/* Meters on a slide: tighter rows, smaller notes. */
.presentation-page .debt-fig--slide .debt-meter { padding: 0.38rem 0; gap: 0.15rem 0.9rem; }
.presentation-page .debt-fig--slide .debt-meter__who strong { font-size: 0.86rem; }
.presentation-page .debt-fig--slide .debt-meter__who span { font-size: 0.64rem; }
.presentation-page .debt-fig--slide .debt-meter__what { font-size: 0.68rem; line-height: 1.35; }

/* Method figures on a slide: smaller type and tighter rows, same structure. */
.presentation-page .debt-dg--slide .diagram-node,
.presentation-page .debt-dg--slide .diagram-exit { padding: 0.45rem 0.6rem 0.5rem; }
.presentation-page .debt-dg--slide .diagram-node strong,
.presentation-page .debt-dg--slide .diagram-exit strong { margin: 0.12rem 0 0.12rem; font-size: 0.9rem; }
.presentation-page .debt-dg--slide .diagram-node p,
.presentation-page .debt-dg--slide .diagram-exit p { font-size: 0.76rem; line-height: 1.38; }
.presentation-page .debt-dg--slide.diagram,
.presentation-page .debt-dg--slide .diagram { --diagram-gap: 1rem; --diagram-link: 0.95rem; }
.presentation-page .debt-dg--slide .diagram-cashline { --cash-unit: 0.72rem; }
.presentation-page .debt-dg--slide .diagram-cashline + .diagram-cashline { margin-top: 0.7rem; }
.presentation-page .debt-dg--slide .diagram-cashline__in .diagram-cashline__label { padding-top: 0.3rem; }
.presentation-page .debt-dg--slide .diagram-cashline__out .diagram-cashline__label { padding-bottom: 0.3rem; }
.presentation-page .debt-dg--slide .diagram-cashline__label { font-size: 0.78rem; }
.presentation-page .debt-dg--slide .diagram-scale__steps > li { min-height: 0.95rem; }
.presentation-page .debt-dg--slide .diagram-scale__step--named { padding: 0.12rem 0; }
.presentation-page .debt-dg--slide .diagram-scale__who strong { font-size: 0.86rem; }
.presentation-page .debt-dg--slide .diagram-scale__who span { display: inline; margin-left: 0.5rem; font-size: 0.74rem; }
.presentation-page .debt-dg--slide .debt-bars__row { padding: 0.38rem 0; }
.presentation-page .debt-dg--slide .debt-bars__row--scale { padding: 0 0 0.2rem; }
.presentation-page .debt-dg--slide .debt-cols__plot { height: 8.5rem; }
.presentation-page .debt-dg--slide .debt-curve__plot { height: 8.5rem; }
.presentation-page .debt-dg--slide .debt-key { margin-top: 0.35rem; }
.presentation-page .debt-dg--slide .presentation-table td,
.presentation-page .debt-dg--slide .presentation-table th { font-size: 0.82rem; }

@media (min-width: 641px) {
  .presentation-page .debt-dg--slide .debt-bars__row { grid-template-columns: 15rem minmax(8rem, 1fr) 9rem; }
}

/* Method slides carry a figure under the title, so a long method name gets a wider measure
   and fewer lines. Chinese keeps its own 12em rule. */
.presentation-page:not(:lang(zh)) .presentation-slide__content:has(> .debt-dg--slide) > h2 { max-width: 21ch; }
.presentation-page .presentation-slide__content:has(> .debt-dg--slide) > .presentation-slide__lede { margin-top: 0.6rem; }
.presentation-page .debt-dg--slide + .presentation-note { margin-top: 0.5rem; }

/* Two cash lanes sit side by side on a slide; the article stacks them. --lanes sets the column split.
   Each lane spans four shared rows (title, dates, received, paid), so both axes sit on one line. */
@media (min-width: 900px) {
  .presentation-page .debt-dg--slide.debt-dg--cash:has(> .diagram-cashline + .diagram-cashline) {
    display: grid;
    grid-template-columns: var(--lanes, 1fr 1fr);
    column-gap: 2.2rem;
  }
  .presentation-page .debt-dg--slide.debt-dg--cash > .diagram-cashline {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
  }
  .presentation-page .debt-dg--slide.debt-dg--cash > .diagram-cashline + .diagram-cashline { margin-top: 0; }
  .presentation-page .debt-dg--slide.debt-dg--cash > :not(.diagram-cashline) { grid-column: 1 / -1; }
}

/* Party diagrams on a slide: a little less air between rows. */
/* The slide has no prose styles, so the caption restates them: a note under the figure, not body text. */
.presentation-page .debt-dg--slide .figure-caption { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.presentation-page .debt-dg--slide .diagram-net__camps { row-gap: 0.55rem; }
.presentation-page .presentation-slide__lede:has(+ .debt-dg--slide) { margin-bottom: 0.6rem; }

@media (max-width: 640px) {
  .prose .debt-toc__fams,
  .prose .debt-toc__ch2 { columns: 1; }
  .debt-dumb--range .debt-dumb__row { grid-template-columns: minmax(0, 1fr) auto; }
  .presentation-page .debt-loops--slide { grid-template-columns: 1fr; }
  .presentation-page .debt-fig--slide .debt-dumb__who { flex-wrap: wrap; white-space: normal; }
}

/* Article tables on phones: each row becomes a small card. Column names move into
   data-label; cells with no value (.debt-nil) are dropped, as the caption explains. */
@media (max-width: 640px) {
  .prose .table-scroll table.debt-stack { min-width: 0; margin: 1rem 0; }
  .prose .debt-stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .prose .debt-stack,
  .prose .debt-stack tbody,
  .prose .debt-stack tr { display: block; }
  .prose .debt-stack tr {
    padding: 0.7rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  }
  .prose .debt-stack tr:first-child { border-top: 1px solid var(--ink); }
  .prose .debt-stack th[scope="row"] {
    display: block;
    padding: 0 0 0.3rem;
    border: 0;
    white-space: normal;
  }
  .prose .debt-stack td {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.12rem 0;
    border: 0;
    text-align: right;
  }
  .prose .debt-stack td::before {
    content: attr(data-label);
    flex: none;
    max-width: 42%;
    margin-right: auto;
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    line-height: 1.5;
    text-align: left;
    text-transform: uppercase;
    color: var(--muted);
  }
  .prose .debt-stack td.debt-nil { display: none; }
  .prose .debt-stack .debt-book__d { display: inline; }

  /* Dates: date line, then company and event, amount on the right. */
  .prose .debt-dates tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1rem;
  }
  .prose .debt-dates td { display: block; grid-column: 1; padding: 0; text-align: left; }
  .prose .debt-dates td::before { content: none; }
  .prose .debt-dates td.debt-date {
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    white-space: normal;
  }
  .prose .debt-dates td:nth-child(2) { font-weight: 700; }
  .prose .debt-dates td.num {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    font-weight: 600;
  }
}

/* Deck typography for this article's slides.
   Chinese titles break at punctuation or spaces, never inside a word; a run with no break point
   may still wrap anywhere rather than overflow. 12em holds about twelve characters a line. */
.presentation-page:lang(zh) .presentation-slide h1,
.presentation-page:lang(zh) .presentation-slide h2 {
  max-width: 12em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* A table that follows the title directly gets the same gap a lede would. */
.presentation-page .presentation-slide h2 + .presentation-table {
  margin-top: clamp(0.85rem, 1.6vw, 1.4rem);
}
