/* fx18: labeled infographics, never-empty live box, no heading glyphs. */

/* The node-glyph before path/chain h2s was a generic accent. */
h2.k-h2 > svg,
.k-h2 > svg { display: none !important; }
h2.k-h2 {
  display: block;
  gap: 0;
}

/* Live box: typographic, 14px floor, no uppercase mono kicker, no empty credit. */
.k-live {
  border-radius: 0;
  gap: 8px 16px;
  align-items: baseline;
}
.k-live .p-kick,
.k-live .ig-live-state {
  font: 600 14px/1.3 var(--font) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--muted, #667);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.k-live [data-live] {
  font: 700 18px/1.3 var(--display, var(--font));
  letter-spacing: -0.02em;
}
.k-live [data-live] b {
  font-family: var(--mono, ui-monospace, monospace);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.k-live .p-note,
.k-live .ig-src {
  font-size: 14px !important;
  line-height: 1.4;
  flex: 1 1 100%;
  margin: 0;
  color: var(--muted, #667);
}
.k-live .ig-src:has([data-src]:empty) { display: none; }

/* Infographics: the picture itself teaches. */
.ig {
  width: 100%;
  background: var(--bg-2, #f6f6f7);
  border: 1px solid var(--line);
  padding: 16px 18px;
  overflow-x: auto;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}
.ig-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.ig-table th,
.ig-table td {
  text-align: left;
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ig-table th {
  font: 600 14px/1.3 var(--font);
  color: var(--muted, #667);
  border-bottom-color: var(--text);
}
.ig-table td:nth-child(n+3),
.ig-table th:nth-child(n+3) { text-align: right; padding-right: 0; }
.ig-table caption,
.ig-label {
  font: 600 14px/1.3 var(--font);
  color: var(--muted, #667);
  text-align: left;
  margin: 0 0 8px;
}
.ig-num { font-family: var(--mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; }
.ig-hilite td { font-weight: 700; }
.ig-q { margin: 12px 0 0; font-weight: 600; }

/* Double-spend fork. */
.ig-fork .ig-shared {
  border-bottom: 1px solid var(--text);
  padding: 0 0 10px;
  margin: 0 0 12px;
}
.ig-branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.ig-br {
  border-left: 3px solid var(--line);
  padding: 0 0 0 12px;
}
.ig-br p { margin: 0 0 6px; }
.ig-br-a { border-left-color: #c47a1a; }
.ig-br-b { border-left-color: #a8441a; }
.ig-fork .ig-conflict { color: #a8441a; font-weight: 600; margin: 12px 0 0; }

/* Labeled block page. */
.ig-block {
  display: grid;
  gap: 8px;
}
.ig-block .ig-field {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.ig-block .ig-field b { font-family: var(--mono, ui-monospace, monospace); font-weight: 600; }

/* Batch vs one-at-a-time. */
.ig-batch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ig-batch p { margin: 6px 0 0; }
.ig-pay {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ig-pay span {
  border: 1px solid var(--line);
  padding: 4px 8px;
  font-size: 14px;
  font-family: var(--mono, ui-monospace, monospace);
}

/* Writer methods / keepers. */
.ig-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.ig-col .ig-label { margin-bottom: 6px; }
.ig-col ul { margin: 8px 0 0; padding: 0; list-style: none; }
.ig-col li { padding: 2px 0; }

/* Official node sizes. */
.ig-bars { display: grid; gap: 10px; }
.ig-bar-row { display: grid; grid-template-columns: 7.5em 1fr auto; gap: 10px; align-items: center; }
.ig-bar-track { height: 12px; background: var(--line); position: relative; }
.ig-bar-fill { height: 100%; background: var(--text); }
.ig-bar-fill.kas { background: var(--fx-blue, #1f5be0); }
.ig-bar-row .ig-num { font-size: 14px; white-space: nowrap; }

/* Pace comparison (index + chain how-it-works). */
.ig-axis {
  position: relative;
  margin: 28px 0 8px;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--text);
  min-height: 72px;
}
.ig-axis-lane { position: relative; height: 36px; margin: 0 0 8px; }
.ig-axis-name {
  position: absolute;
  left: 0;
  top: 8px;
  font: 600 14px/1.2 var(--font);
  width: 5.5em;
}
.ig-axis-lane .ig-mark,
.ig-axis-lane .ig-fin {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  text-align: center;
  font: 600 12px/1.2 var(--font);
  white-space: nowrap;
}
.ig-axis-lane .ig-mark i,
.ig-axis-lane .ig-fin i {
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto 4px;
  background: var(--text);
  font-style: normal;
}
.ig-axis-lane .ig-fin i {
  width: auto;
  min-width: 10px;
  height: 16px;
  margin-top: -3px;
  background: color-mix(in oklab, var(--text) 35%, transparent);
  border: 1px solid var(--text);
}
.ig-axis-lane.kas .ig-mark i { background: var(--fx-blue, #1f5be0); }
.ig-axis-lane.kas .ig-fin i {
  background: color-mix(in oklab, var(--fx-blue, #1f5be0) 30%, transparent);
  border-color: var(--fx-blue, #1f5be0);
}
.ig-axis-lane.warm .ig-mark i { background: #c47a1a; }
.ig-axis-ticks {
  position: absolute;
  left: 5.5em;
  right: 0;
  bottom: 0;
  height: 24px;
  font: 600 12px/1 var(--font);
  color: var(--muted, #667);
}
.ig-axis-ticks span { position: absolute; transform: translateX(-50%); }

/* Path map tiles: real mini diagrams, not abstract marks. */
a.pb-step .ig {
  min-height: 110px;
  padding: 12px 14px;
  margin: 0;
}
a.pb-step .ig-table { font-size: 14px; }
a.pb-step .ig-table th,
a.pb-step .ig-table td { padding: 4px 8px 4px 0; }

.pb-fig figcaption,
a.pb-step .pb-cap {
  max-width: 42em;
}

/* Line toy: labels live on the graphic; 14px floor for mark labels. */
.k-tline text.ig-line-lab {
  font: 600 14px/1 var(--font);
  fill: var(--text);
}
@media (max-width: 760px) {
  .ig, .ig-table, .ig-label, .ig-q, .k-live .p-note, .k-live .ig-live-state, .k-live .ig-src {
    font-size: 14px !important;
  }
  .ig-cols,
  .ig-batch,
  .ig-branches { grid-template-columns: 1fr; }
  .ig-bar-row { grid-template-columns: 1fr; gap: 4px; }
  a.pb-step .ig-table { font-size: 14px; }
  .k-tline text.k-tl { font-size: 12px; } /* short axis exception */
}
@media (prefers-reduced-motion: reduce) {
  .ig-fork .ig-br, .ig-axis-lane .ig-mark { animation: none !important; }
}

/* Linear labeled time axis (chain how-it-works). */
.ig-scale { position: relative; margin: 8px 0 28px 7em; height: 64px; }
.ig-scale-track { position: absolute; left: 0; right: 0; top: 28px; border-top: 1px solid var(--text); }
.ig-scale .ig-mark, .ig-scale .ig-fin {
  position: absolute; top: 0; transform: translateX(-50%); text-align: center;
  font: 600 14px/1.2 var(--font); white-space: nowrap;
}
.ig-scale .ig-mark i, .ig-scale .ig-fin i {
  display: block; width: 10px; height: 10px; margin: 18px auto 0; background: var(--text);
  font-style: normal;
}
.ig-scale.kas .ig-mark i, .ig-scale .ig-mark.kas i { background: var(--fx-blue, #1f5be0); }
.ig-scale .ig-fin i {
  width: auto; min-width: 12px; height: 14px; margin-top: 16px;
  background: color-mix(in oklab, var(--text) 30%, transparent);
  border: 1px solid var(--text);
}
.ig-scale .ig-fin.kas i {
  background: color-mix(in oklab, var(--fx-blue, #1f5be0) 30%, transparent);
  border-color: var(--fx-blue, #1f5be0);
}
.ig-scale-name {
  position: absolute; left: -7em; top: 18px; width: 6.5em;
  font: 600 14px/1.2 var(--font);
}
.ig-scale-ticks { position: absolute; left: 0; right: 0; top: 42px; height: 20px;
  font: 600 12px/1 var(--font); color: var(--muted, #667); }
.ig-scale-ticks span { position: absolute; transform: translateX(-50%); }
.ig-slots { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 8px; }
.ig-slot { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.ig-slot.on { border-color: var(--text); }
.ig-slot b { display: block; font-family: var(--mono, ui-monospace, monospace); }
.ig-stat { font: 700 28px/1.1 var(--display, var(--font)); letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; }
.ig-stat small { display: block; font: 600 14px/1.3 var(--font); letter-spacing: 0; margin-top: 4px; color: var(--muted, #667); }
@media (max-width: 760px) {
  .ig-scale { margin-left: 0; height: 88px; }
  .ig-scale-name { position: static; width: auto; margin: 0 0 4px; }
  .ig-slots { grid-template-columns: 1fr; }
  .ig-stat { font-size: 24px; }
}

/* Full-width comparison clock sits under the other how-it-works figures. */
@media (min-width: 800px) {
  .pb-flow:has(.ig-clock) {
    grid-template-columns: 1fr 1fr;
  }
  .pb-flow:has(.ig-clock) .pb-fig:has(.ig-clock) {
    grid-column: 1 / -1;
  }
}
.ig-clock { margin-top: 8px; }
.ig-clock-row { display: grid; grid-template-columns: 6em 1fr; gap: 10px; align-items: center; margin: 0 0 22px; }
.ig-clock-name { font: 600 14px/1.2 var(--font); }
.ig-clock-track { position: relative; height: 14px; border-top: 1px solid var(--text); }
.ig-clock-dot {
  position: absolute; top: -5px; width: 10px; height: 10px; background: var(--text);
  transform: translateX(-50%); font-style: normal;
}
.ig-clock-dot.kas { background: var(--fx-blue, #1f5be0); }
.ig-clock-mark {
  position: absolute; font: 600 14px/1 var(--font); white-space: nowrap;
  transform: translateX(-50%);
}
.ig-clock-mark.above { bottom: 16px; }
.ig-clock-mark.below { top: 10px; }
.ig-clock-fin {
  position: absolute; top: -8px; height: 16px;
  background: color-mix(in oklab, var(--fx-blue, #1f5be0) 28%, transparent);
  border: 1px solid var(--fx-blue, #1f5be0);
  font: 600 14px/16px var(--font); text-align: center; color: var(--text);
  box-sizing: border-box;
}
.ig-clock-ticks { position: relative; margin: 0 0 0 6em; height: 18px;
  font: 600 12px/1 var(--font); color: var(--muted, #667); }
.ig-clock-ticks span { position: absolute; transform: translateX(-50%); }
.ig-clock-ticks span:first-child { transform: none; }
.ig-clock-ticks span:last-child { transform: translateX(-100%); }
.ig-dag { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: flex-start; height: auto; min-height: 0; }
.ig-dag-col { flex: 0 1 auto; min-width: 12em; max-width: 28em; }
.ig-dag-k { font: 600 14px/1.3 var(--font); margin: 0 0 8px; }
.ig-dag-row, .ig-dag-hist { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.ig-dag-block {
  display: inline-block; border: 1px solid var(--text); padding: 8px 10px;
  font: 600 14px/1.2 var(--font); background: var(--bg, #fff);
}
.ig-dag-then, .ig-dag-join { font: 600 14px/1.2 var(--font); color: var(--muted, #667); margin: 0; }
.ig-dag-col p { margin: 0; font: 14px/1.45 var(--font); }

/* Keep the chain name in a left column on every width so marks never sit on the name. */
.ig-clock-row { grid-template-columns: 6.2em 1fr; gap: 10px; align-items: center; margin: 0 0 34px; }
.ig-clock-ticks { margin-left: 6.2em; }
.ig-clock-ticks span, .ig-clock-mark { white-space: nowrap; }
.ig-clock-mark.start { transform: none; }
.ig-clock-mark.start.below, .ig-clock-mark.start.above { /* still vertical */ }
@media (min-width: 800px) {
  .pb-flow:has(.ig-dag) { grid-template-columns: 1fr 1fr; }
  .pb-flow:has(.ig-dag) .pb-fig:has(.ig-dag) { grid-column: 1 / -1; }
}
.ig-dag-then { margin: 6px 0 0; align-self: center; }
.pb-fig:has(.ig-dag) .ig { height: auto; min-height: 0; }
@media (max-width: 760px) {
  .ig-dag { flex-direction: column; }
  .ig-dag-then { margin: 2px 0; align-self: flex-start; }
}

/* Comparison tables need the full row; prose cells stay left and not mono. */
@media (min-width: 800px) {
  .pb-flow:has(.ig-compare) .pb-fig:has(.ig-compare) {
    grid-column: 1 / -1;
  }
}
.ig-table td, .ig-table th { text-align: left; }
.ig p { text-align: left; }
.ig-table td.ig-num { white-space: nowrap; }
