/*
 * Components. No raw colour and no raw length: everything refers to tokens.css.
 * Colour is verdict: green granted, amber narrowed, red refused. Everything
 * that is not a verdict is ink. Corners are square. On the graph and on a party's
 * own page, motion marks a real event. The conductor's page around them may arrive.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--canvas);
  background-image: radial-gradient(circle, var(--dot) var(--dot-size), transparent var(--dot-edge));
  background-size: var(--grid) var(--grid);
  background-attachment: fixed;
  font-family: var(--sans);
  font-size: var(--type-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul,
pre {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

/* Controls speak in the page's own two typefaces, never the browser's. */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: var(--s1);
}

a:hover {
  text-decoration-color: var(--ink);
}

:focus-visible {
  outline: var(--hair) solid var(--ink-bright);
  outline-offset: var(--s1);
}

.skip {
  position: absolute;
  left: var(--side);
  top: calc(-1 * var(--s10));
  z-index: 20;
  padding: var(--s2) var(--s4);
  background: var(--ink);
  color: var(--canvas-deep);
}

.skip:focus {
  top: var(--s2);
}

.mono,
code,
pre {
  font-family: var(--mono);
  font-size: var(--type-code);
  line-height: 1.7;
  font-variant-ligatures: none;
}

.label {
  font-family: var(--mono);
  font-size: var(--type-label);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-dim);
}

.fine {
  font-size: var(--type-fine);
  line-height: 1.5;
  color: var(--ink-dim);
}

.empty {
  font-family: var(--mono);
  font-size: var(--type-code);
  color: var(--ink-muted);
}

/* ── verdict text ─────────────────────────────────────────────────────── */

.is-granted {
  color: var(--granted);
}
.is-narrowed {
  color: var(--narrowed);
}
.is-refused {
  color: var(--refused);
}
.is-dim {
  color: var(--ink-dim);
}
.is-muted {
  color: var(--ink-muted);
}

.mark {
  display: inline-block;
  width: var(--mark);
  height: var(--mark);
  margin-right: var(--s2);
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}

.status {
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── masthead ─────────────────────────────────────────────────────────── */

.mast {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--mast-h);
  border-bottom: var(--hair) solid var(--line);
  background: var(--canvas);
}

.mast__in {
  display: flex;
  align-items: center;
  gap: var(--s4);
  height: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--side);
}

.sigil {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--sigil);
  height: var(--sigil);
  border: var(--hair) solid var(--line-strong);
  font-family: var(--mono);
  font-size: var(--type-label);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-bright);
}

.mast__name {
  font-size: var(--type-body);
  font-weight: 500;
  color: var(--ink-bright);
  white-space: nowrap;
}

.mast__who {
  display: grid;
  line-height: 1.2;
}

.mast__as {
  color: var(--ink-2);
  font-size: var(--type-fine);
  white-space: nowrap;
}

.mast__role {
  color: var(--ink-dim);
  font-size: var(--type-fine);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mast__spacer {
  flex: 1;
}

.mast__meta {
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-width: 0;
}

/* One piece of a long identifier or address. It moves to the next line whole, and breaks inside only if it must. */
.piece {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  vertical-align: baseline;
  white-space: pre-wrap;
}

/* A piece of a verdict is never broken: `refused:` on one line, the check on the next, if they must part. */
.piece--whole {
  white-space: pre;
  overflow-wrap: normal;
}

/* Whole, or not there. An identifier is never cut to fit a masthead. */
.mast__did {
  white-space: nowrap;
}

/* An identifier is case-sensitive. It is never upper-cased, wherever it sits. */
.id,
.label .mono,
.textbtn.mast__did {
  text-transform: none;
  letter-spacing: 0;
}

/* And it is set at the identifier size, wherever it sits and whatever element holds it. */
.mast__did,
.textbtn.mast__did {
  font-size: var(--type-code);
}

/* Words, and what they hang on, that are never parted at the end of a line. */
.nowrap {
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: var(--hair);
  height: var(--hair);
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── page grid ────────────────────────────────────────────────────────── */

.page {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s6);
  align-items: start;
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--s7) var(--side) var(--s10);
}

.col-main {
  grid-column: span 7;
  display: grid;
  gap: var(--s6);
  min-width: 0;
}

/* A party's own region is one panel, or two when it made two things: spaced as the column's panels are. */
#region {
  display: grid;
  gap: var(--s6);
  min-width: 0;
}

.col-side {
  grid-column: span 5;
  display: grid;
  gap: var(--s6);
  min-width: 0;
}

.col-wide {
  grid-column: span 8;
  display: grid;
  gap: var(--s6);
  min-width: 0;
}

.col-narrow {
  grid-column: span 4;
  display: grid;
  gap: var(--s6);
  min-width: 0;
}

/* ── panel ────────────────────────────────────────────────────────────── */

.panel {
  position: relative;
  border: var(--hair) solid var(--line);
  background: var(--panel);
  min-width: 0;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: var(--control-tab-h);
  padding: 0 var(--s5);
  border-bottom: var(--hair) solid var(--line);
}

.panel__body {
  padding: var(--s5);
}

.panel__note {
  padding: var(--s3) var(--s5);
  border-top: var(--hair) solid var(--line);
}

/* A panel that holds documents holds them edge to edge, divided by hairlines. Never a box inside a box. */
.panel--flush > .panel__body {
  padding: 0;
}

.panel__body > .doc,
.panel__body > .diff,
.panel__body > .trace,
.stack > .doc,
.stack > .diff,
.stack > .trace {
  border: 0;
  border-top: var(--hair) solid var(--line);
  background: none;
}

.panel__body > :first-child,
.stack > :first-child {
  border-top: 0;
}

/* Whatever a block holds wraps inside it. An identifier breaks before it pushes its panel sideways. */
.block {
  min-width: 0;
  overflow-wrap: anywhere;
  padding: var(--s5);
  border-top: var(--hair) solid var(--line);
}

.block > * + * {
  margin-top: var(--s2);
}

/* A request is in flight: a hairline under the label, and nothing else moves. */
.panel[aria-busy="true"] > .panel__head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: var(--control-tab-h);
  height: var(--hair);
  background: linear-gradient(90deg, transparent, var(--ink-dim), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: sweep 1.2s linear infinite;
}

.panel--fixed-list > .panel__body {
  height: var(--list-h);
  overflow-y: auto;
  padding: 0;
}

/* A list that scrolls inside a fixed height says so: its last line fades instead of being cut.
   The room left under the last entry is the height of the fade, so nothing ends its life under it. */
.panel--fixed-list > .panel__body{
  padding-bottom: var(--s6);
  mask-image: linear-gradient(to bottom, var(--ink-bright) calc(100% - var(--s6)), transparent);
}

.panel--keys > .panel__body {
  height: var(--keys-h);
  overflow-y: auto;
}

/* In two columns a side panel is as tall as the block beside it, so the columns share their horizontal edges. */
.panel--tall-view,
.panel--tall-actions {
  display: flex;
  flex-direction: column;
}

.panel--tall-view {
  height: var(--view-h);
}

.panel--tall-actions {
  height: var(--actions-h);
}

.panel--tall-view > .panel__body,
.panel--tall-actions > .panel__body {
  flex: 1;
  height: auto;
  min-height: 0;
}

/* ── my view ──────────────────────────────────────────────────────────── */

.view {
  display: flex;
  flex-direction: column;
  height: var(--view-h);
  /* The label sits where the label of the panel beside it sits. */
  padding: calc((var(--control-tab-h) - 1.4 * var(--type-label)) / 2) var(--s5) 0;
  border: var(--hair) solid var(--line);
  background: var(--panel);
  overflow: hidden;
}

/* What became of this party's latest step, at the foot of its view, large enough to read from the back of a room. */
.view__outcome {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s1) var(--s5);
  margin: auto calc(-1 * var(--s5)) 0;
  padding: var(--s4) var(--s5);
  border-top: var(--hair) solid var(--line);
}

.view__verdict {
  font-family: var(--mono);
  font-size: var(--type-verdict);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ink-bright);
}

.view__verdict.is-granted {
  color: var(--granted);
}

.view__verdict.is-refused {
  color: var(--refused);
}

.view__verdict.is-dim {
  color: var(--ink-dim);
}

/* Nothing to report yet is said quietly. */
.view__verdict--none {
  font-size: var(--type-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
}

.view__headline {
  margin-top: var(--s3);
  font-size: var(--type-headline);
  line-height: 1;
  letter-spacing: var(--track-headline);
  font-weight: 500;
  color: var(--ink-bright);
  text-wrap: balance;
}

.view__lines {
  display: grid;
  gap: var(--s2);
  margin-top: var(--s5);
  max-width: 44rem;
  color: var(--ink-2);
  font-size: var(--type-lead);
}

.view__lines strong,
.view__lines .mono {
  color: var(--ink-bright);
  font-weight: 500;
}

/* ── controls ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  min-height: var(--control-h);
  padding: 0 var(--s6);
  border: var(--hair) solid var(--line-mid);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--control-type);
  font-weight: 500;
  letter-spacing: -0.005em;
  text-align: center;
  /* A link that does a button's job looks like the button, not like a link. */
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out);
}

.btn:hover:not(:disabled) {
  border-color: var(--line-strong);
}

.btn--primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--canvas-deep);
}

.btn--primary:hover:not(:disabled) {
  border-color: var(--ink-bright);
  background: var(--ink-bright);
}

/* An alternative to the one button above it: a plain underlined choice, not a second and third button. */
.linkbtn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: var(--s1);
  cursor: pointer;
}

.linkbtn:hover {
  color: var(--ink-bright);
  text-decoration-color: var(--ink);
}

.btn:disabled {
  border: var(--hair) dashed var(--line-mid);
  background: var(--panel-3);
  color: var(--ink-muted);
  cursor: not-allowed;
}

.btn[aria-busy="true"] {
  cursor: progress;
}

.textbtn {
  padding: var(--s1) 0;
  border: 0;
  background: none;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  cursor: pointer;
}

.textbtn:hover {
  color: var(--ink-bright);
}

.tabs,
.tabs__list {
  display: flex;
  align-items: center;
  gap: var(--s5);
}

.tab {
  height: var(--control-tab-h);
  padding: 0;
  border: 0;
  border-bottom: var(--hair) solid transparent;
  background: none;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: var(--control-tab-type);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.tab {
  white-space: nowrap;
}

.tab[aria-selected="true"],
.tab[aria-pressed="true"] {
  border-bottom-color: var(--ink-bright);
  color: var(--ink-bright);
}

.field {
  display: block;
  width: 100%;
  height: var(--control-field-h);
  padding: 0 var(--s3);
  border: var(--hair) solid var(--line-mid);
  border-radius: var(--radius);
  background: var(--canvas-deep);
  color: var(--ink-bright);
  font-family: var(--mono);
  font-size: var(--type-code);
}

.field:focus {
  border-color: var(--ink-dim);
  outline: none;
}

.disclosure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--control-tab-h);
  padding: 0 var(--s5);
  border: 0;
  border-top: var(--hair) solid var(--line);
  background: none;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.disclosure:hover {
  color: var(--ink-bright);
}

/* ── actions ──────────────────────────────────────────────────────────── */

.actions {
  display: flex;
  flex-direction: column;
  height: var(--actions-h);
  border: var(--hair) solid var(--line);
  background: var(--panel);
}

.actions__now {
  display: grid;
  gap: var(--s3);
  justify-items: start;
  padding: var(--s5);
  border-bottom: var(--hair) solid var(--line);
}

.actions__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}

.actions__narration {
  color: var(--ink-2);
  font-size: var(--type-lead);
  min-height: 1.6em;
}

.actions__alternatives {
  flex-basis: 100%;
}

.actions__now {
  min-height: var(--actions-now-h);
  align-content: start;
}

/* What was done scrolls inside what is left of the panel, and says so: its last line fades instead of being cut.
   The room under the last entry is an element inside the list, so the list itself can still shrink to nothing
   when the buttons beneath it need the space. */
.actions__earlier {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  mask-image: linear-gradient(to bottom, var(--ink-bright) calc(100% - var(--s6)), transparent);
}

.actions__earlier::after {
  content: "";
  display: block;
  height: var(--s6);
}

.actions__more {
  border-top: var(--hair) solid var(--line);
}

/* Open, the things to try stand where what was done stood, inside the same height. One per line, each a plain choice. */
.actions__probes {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
}

.actions__earlier[hidden] {
  display: none;
}

/* Every row of this list puts what became of it underneath, so long rows and short ones read the same way. */
.rows--stacked > .row {
  flex-direction: column;
}

.block:first-child {
  border-top: 0;
}

/* What a row is, in full. What became of it sits beside it when both fit, and beneath it when they do not. */
.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s1) var(--s4);
  padding: var(--s3) var(--s5);
  border-bottom: var(--hair) solid var(--line-hair);
}

/* Declined by an issuer. Not a verifier's verdict, so not a verdict's colour: ink, and the rule of something not asserted. */
.row--declined {
  position: relative;
  background: var(--panel-2);
}

/* The rule is drawn over the edge, not beside it, so what the row holds starts where every other row's does. */
.row--declined::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  border-left: var(--rule) dashed var(--line-strong);
}

.row:last-child {
  border-bottom: 0;
}

.row__main {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row--refused {
  background: var(--refused-dim);
}

/* ── credential document ──────────────────────────────────────────────── */

.doc {
  border: var(--hair) solid var(--line);
  background: var(--panel);
  transition: border-color 0.4s var(--ease-out);
}

.doc--fresh {
  animation: minted 0.6s var(--ease-out);
}

/* Two rows at every width, so the two ways to read it never wrap to a line of their own by accident. */
.doc__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 var(--s4);
  padding: var(--s3) var(--s5) 0;
  border-bottom: var(--hair) solid var(--line);
}

.doc__id {
  color: var(--ink-bright);
  white-space: nowrap;
}

/* With no state word beside it, what the document is takes the whole row. */
.doc__kind--wide {
  grid-column: 1 / -1;
}

.doc__head > .tabs {
  align-items: center;
}

/* A label and its value are one row, with one rule beneath it, however many lines the value takes. */
.doc__row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  align-items: first baseline;
  border-bottom: var(--hair) solid var(--line-hair);
}

.doc__row:last-child {
  border-bottom: 0;
}

.doc__row > dt,
.doc__row > dd {
  padding: var(--s3) var(--s5);
}

.doc__row > dt {
  padding-right: 0;
}

.doc__rows dd {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink-bright);
}

.doc__rows dd .fine {
  display: block;
}

/* Bytes scroll inside a fixed height, and say so the way every list does: the last line fades. */
.doc__bytes {
  max-height: var(--list-h);
  overflow: auto;
  padding: var(--s5) var(--s5) var(--s6);
  color: var(--ink-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: all;
  mask-image: linear-gradient(to bottom, var(--ink-bright) calc(100% - var(--s6)), transparent);
}

/* Dark: every line falls to muted ink together, and the document takes the rule of something refused. */
.doc--revoked {
  box-shadow: inset var(--rule) 0 0 var(--refused-edge);
}

.doc--revoked dd,
.doc--revoked dd .fine,
.doc--revoked dd .is-dim,
.doc--revoked dd .is-narrowed,
.doc--revoked .doc__id {
  color: var(--ink-muted);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s4);
}

.dropped {
  color: var(--ink-muted);
  text-decoration: line-through;
}

/* ── narrowing diff ───────────────────────────────────────────────────── */

.diff {
  border: var(--hair) solid var(--line);
  background: var(--panel);
}

.diff__grid {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) 3rem minmax(0, 1fr);
}

.diff__grid > * {
  padding: var(--s3) var(--s4);
  border-bottom: var(--hair) solid var(--line-hair);
  min-width: 0;
  overflow-wrap: anywhere;
}

/* The row labels start where the panel's own label starts. */
.diff__label {
  padding-left: var(--s5);
}

.diff__state {
  padding: var(--s3) var(--s5);
  border-bottom: var(--hair) solid var(--line-hair);
}

.diff--dark {
  box-shadow: inset var(--rule) 0 0 var(--refused-edge);
}

.diff--dark .diff__parent,
.diff--dark .diff__child,
.diff--dark .diff__child .is-narrowed,
.diff--dark .mono {
  color: var(--ink-muted);
}

.diff--dark .diff__mark {
  color: var(--ink-muted);
}

.diff__head {
  color: var(--ink-dim);
}

/* Between what was granted and what was handed on: whether this row was narrowed or kept as it was. */
.diff__mark {
  text-align: center;
}

.diff__parent {
  color: var(--ink-2);
}

.diff__child {
  color: var(--ink-bright);
}

/* ── trace ────────────────────────────────────────────────────────────── */

.trace {
  border: var(--hair) solid var(--line);
  background: var(--panel);
}

.trace__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3) var(--s5);
  padding: var(--s4) var(--s5);
  border-bottom: var(--hair) solid var(--line);
}

.trace__parties {
  display: flex;
  flex: 1;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
}

.trace__party {
  display: grid;
  gap: var(--s1);
  min-width: 0;
}

.trace__party b {
  font-weight: 500;
  color: var(--ink-bright);
  white-space: nowrap;
}

/* Narrow, the three stand in a column: who answers for it, who presented, what was said. Nothing is cut to fit. */
.trace {
  container-type: inline-size;
}

@container (max-width: 34rem) {
  .trace__head,
  .trace__parties {
    flex-direction: column;
    align-items: flex-start;
  }
  .trace__arrow {
    display: none;
  }
  .trace__party b {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* The line joins the two names, so it sits on their row, not between the labels and the names. */
.trace__arrow {
  flex: 1;
  align-self: flex-end;
  min-width: var(--s6);
  height: var(--hair);
  margin-bottom: 0.7em;
  background: var(--line-strong);
}

.verdict {
  padding: var(--s1) var(--s3);
  border: var(--rule) solid currentColor;
  font-family: var(--mono);
  font-size: var(--type-title);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  animation: appear 0.16s linear;
}

.trace__group {
  position: relative;
  border-bottom: var(--hair) solid var(--line);
}

.trace__group:last-child {
  border-bottom: 0;
}

/* The label starts where the row numbers beneath it start, which is one rule's width in from the panel's edge. */
.trace__group-label {
  padding: var(--s3) var(--s5) var(--s1) calc(var(--s5) + var(--rule));
}

.trace__group-label .mono {
  text-transform: none;
  letter-spacing: 0;
}

.trace__row {
  display: grid;
  grid-template-columns: 1.75rem 10.5rem minmax(0, 1fr) auto;
  gap: var(--s3);
  align-items: baseline;
  padding: var(--s2) var(--s5);
  border-left: var(--rule) solid transparent;
}

.trace__row .fine {
  color: var(--ink-2);
}

.trace__num {
  color: var(--ink-muted);
}

.trace__row--in-walk {
  border-left-color: var(--granted);
}

.trace__group--swept .trace__row--in-walk {
  animation: bracket 0.32s var(--ease-out);
}

.trace__row--failed {
  border-left-color: var(--refused);
  background: var(--refused-dim);
  animation: tint 0.2s linear;
}

.trace__row--unknown {
  border-left: var(--rule) dashed var(--line-strong);
}

.trace__reason {
  grid-column: 2 / -1;
  color: var(--ink-bright);
  overflow-wrap: anywhere;
}

/* Where every other row's state is: at the right. */
.trace__bracket-label {
  padding: 0 var(--s5) var(--s3);
  text-align: right;
  color: var(--granted);
}

/* ── tally ────────────────────────────────────────────────────────────── */

.tally__headline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s6);
  padding: var(--s4) var(--s5);
  border-bottom: var(--hair) solid var(--line);
  font-family: var(--mono);
  font-size: var(--type-code);
  color: var(--ink-2);
}

.tally__headline b {
  color: var(--ink-bright);
  font-weight: 600;
}

/* The names of the columns, on the same grid as the rows beneath them. */
.tally__row,
.tally__head {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) 7rem 5.5rem minmax(0, 9rem);
  gap: var(--s3);
  align-items: baseline;
  padding: var(--s2) var(--s5);
  border-bottom: var(--hair) solid var(--line-hair);
}

.tally__head {
  border-bottom-color: var(--line);
}

/* ── wire ─────────────────────────────────────────────────────────────── */

.wire__entry {
  border-bottom: var(--hair) solid var(--line-hair);
}

.wire__summary {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  gap: var(--s1) var(--s3);
  align-items: baseline;
  width: 100%;
  padding: var(--s3) var(--s5);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  animation: appear 0.16s linear;
}

.wire__summary:hover {
  background: var(--panel-2);
}

/* Who, and what was said, on one line. How it travelled and when on the next, under both, with the whole
   width to itself, so a long verdict never squeezes it. */
.wire__lines {
  display: contents;
}

.wire__lines > :first-child {
  grid-column: 2;
  grid-row: 1;
}

.wire__lines > :last-child {
  grid-column: 2 / -1;
  grid-row: 2;
}

.wire__summary > .status {
  grid-column: 3;
  grid-row: 1;
}

.inbox__summary > .status {
  grid-column: 2;
}

.wire__what {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.wire__what.mono {
  font-size: var(--type-code);
}

.inbox__summary {
  grid-template-columns: minmax(0, 1fr) auto;
}

.key {
  display: grid;
  gap: var(--s1);
  padding-bottom: var(--s4);
  margin-bottom: var(--s4);
  border-bottom: var(--hair) solid var(--line-hair);
}

.record__title {
  font-size: var(--type-title);
  line-height: 1.2;
  letter-spacing: var(--track-title);
  font-weight: 500;
  color: var(--ink-bright);
}

.wire__detail {
  border-top: var(--hair) solid var(--line-hair);
  background: var(--canvas-deep);
}

.wire__detail .panel__head {
  border-bottom-color: var(--line-hair);
}

.no-answer {
  padding: var(--s3) var(--s5);
  background: var(--panel-3);
  color: var(--ink);
}

/* ── status bit ───────────────────────────────────────────────────────── */

.bit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s4);
  align-items: center;
  padding: var(--s4) var(--s5);
}

.bit > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bit__value {
  display: grid;
  place-items: center;
  width: var(--control-h);
  height: var(--control-h);
  border: var(--hair) solid currentColor;
  font-family: var(--mono);
  font-size: var(--type-title);
  font-weight: 600;
}

/* ── stage ────────────────────────────────────────────────────────────── */

/* What a verifier settled, as questions, above the rows it settled them with. */
.questions {
  border-bottom: var(--hair) solid var(--line);
}

.question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s1) var(--s4);
  align-items: baseline;
  padding: var(--s3) var(--s5);
  border-bottom: var(--hair) solid var(--line-hair);
  border-left: var(--rule) solid var(--granted);
}

.question:last-child {
  border-bottom: 0;
}

.question__ask {
  color: var(--ink-bright);
  font-size: var(--type-lead);
}

.question--open {
  border-left: var(--rule) dashed var(--line-strong);
}

.question--open .question__ask {
  color: var(--ink-dim);
}

.question--no {
  border-left-color: var(--refused);
  background: var(--refused-dim);
}

.question__why {
  grid-column: 1 / -1;
  display: grid;
  gap: var(--s1);
  color: var(--ink-bright);
  overflow-wrap: anywhere;
}

.trace__all {
  border-bottom: var(--hair) solid var(--line);
}

.trace__ledger[hidden] {
  display: none;
}

/* What was said, and under it the name of the check that said it. */
.view__said {
  display: grid;
  justify-items: end;
  gap: var(--s1);
  min-width: 0;
}

.view__check {
  color: var(--ink-dim);
  font-size: var(--type-code);
}

/* A step that cannot be taken back is held. The button fills while it is held, and acts when it is full. */
.btn--hold {
  position: relative;
  overflow: hidden;
}

.btn--hold::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: var(--rule);
  background: var(--canvas-deep);
  transform: scaleX(0);
  transform-origin: left;
}

.btn--holding::after {
  transform: scaleX(1);
  transition: transform 0.8s linear;
}

.sigil--small {
  width: auto;
  height: auto;
  padding: 0 var(--s1);
  font-size: var(--type-label);
}

/* ── the conductor: the whole run on one screen ───────────────────────── */

/* The first screen is the step on show and the whole graph. Under it, a chapter at a time, what backs it up. At the
   foot, the close. The page itself runs edge to edge, so the light can reach the edge of the window. */
.page--conduct {
  display: block;
  max-width: none;
  padding: 0;
  overflow-x: clip;
}

/* The film over the whole page. It takes no press. */
body:has(> .page--conduct)::before {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 100;
  background-image: var(--grain);
  opacity: var(--grain-amount);
  pointer-events: none;
}

/* The operator's words are for the operator. On a projector they are not shown. */
:root[data-stage] [data-op] {
  display: none;
}

/* On the conductor the masthead is as wide as the page under it, and the page is seen through it. */
.mast__in--wide {
  max-width: var(--page-wide);
}

.mast--conduct {
  background: var(--mast-glass);
  -webkit-backdrop-filter: blur(var(--mast-blur)) saturate(1.4);
  backdrop-filter: blur(var(--mast-blur)) saturate(1.4);
}

@media (prefers-reduced-transparency: reduce) {
  .mast--conduct {
    background: var(--canvas);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* How far through the whole run, on the masthead's own edge. */
.mast__progress {
  position: absolute;
  left: 0;
  bottom: calc(-1 * var(--hair));
  width: 100%;
  height: var(--hair);
  background: var(--lens-line);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  transition: transform 0.7s var(--ease-out);
}

/* The lockup. The bit in the word stands for the first credential: grey until there is one, then as it stands. */
.brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--s3);
  color: var(--ink-bright);
}

.brand__mark {
  width: var(--brand-mark-w);
  height: var(--brand-mark-h);
}

.brand__word {
  display: inline-flex;
  align-items: baseline;
  font-size: var(--brand-word);
  font-weight: 600;
  letter-spacing: var(--track-brand);
  line-height: 1;
}

.brand__bit,
.chip__dot {
  flex: none;
  width: var(--brand-bit);
  height: var(--brand-bit);
  background: var(--line-strong);
  transition:
    background-color 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
}

.brand__bit {
  margin: 0 var(--rule);
  transform: translateY(calc(-1 * var(--hair)));
}

:root[data-chain="live"] .brand__bit,
:root[data-chain="live"] .chip__dot {
  background: var(--granted);
  box-shadow: 0 0 var(--s3) var(--granted);
}

:root[data-chain="revoked"] .brand__bit,
:root[data-chain="revoked"] .chip__dot {
  background: var(--refused);
  box-shadow: 0 0 var(--s3) var(--refused);
}

/* The run's own name, in plain text with a dot. */
.chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--s2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.chip .mono {
  font-size: inherit;
  line-height: 1;
}

.chip__dot {
  margin: 0;
}

.mast__note {
  white-space: nowrap;
}

/* The five steps, as the masthead's own contents: where the run is. */
.mast__steps {
  display: flex;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.stepper {
  display: flex;
  align-items: center;
  gap: var(--s5);
}

.stepper__step {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s2);
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: color 0.3s var(--ease-out);
}

.stepper__n {
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
  transition: color 0.3s var(--ease-out);
}

.stepper__step--on,
.stepper__step--proved {
  color: var(--ink-bright);
}

.stepper__step--on .stepper__n {
  color: var(--lens-ink);
}

.stepper__step--proved:not(.stepper__step--on) {
  color: var(--ink-2);
}

.is-proved {
  color: var(--ink-bright);
}

.is-proved::before {
  content: "";
  display: inline-block;
  width: 0.35em;
  height: 0.7em;
  margin: 0 0.6em 0.1em 0.1em;
  border-right: var(--rule) solid currentColor;
  border-bottom: var(--rule) solid currentColor;
  transform: rotate(45deg);
}

/* In the line of five steps, a step proved is ticked and no more: five words in a row would be a row of tags.
   The word stays, out of sight, for a screen reader. */
.stepper__word {
  min-width: var(--stepper-tick);
}

.stepper__word.is-proved {
  position: relative;
  align-self: center;
  display: inline-flex;
  align-items: center;
}

.stepper__word.is-proved::before {
  width: 0.3rem;
  height: 0.6rem;
  margin: 0 0.2rem 0.2rem 0;
}

/* The first screen: as tall as the window. The step takes what the graph does not need, so the graph never moves. */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(min-content, 1fr) auto;
  max-width: var(--page-wide);
  min-height: min(calc(100svh - var(--mast-h)), var(--hero-max));
  margin: 0 auto;
  padding: 0 var(--side);
}

/* The lens, over the one button. Its place is reckoned from the foot of the step, which never moves, so it holds still
   from step to step however tall the step's name is. Everything else stands in front of it. */
.hero__orb {
  position: absolute;
  right: calc(-1 * var(--orb-out));
  bottom: var(--orb-lift);
  width: var(--orb-size);
  height: var(--orb-size);
  pointer-events: none;
  animation: orb-in 1.6s var(--ease-out) 0.2s backwards;
}

.hero__orb:not(.has-gl) {
  background: var(--spot);
}

.hero__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* The step on show: a line of small type, its name, what it proves. Beside what it proves, the one button. */
.story {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  min-width: 0;
  padding-block: var(--s5) var(--s6);
}

/* Where the window is too short for the opening and the graph together, the opening's room eases to a step's when the
   showing starts, as long as the step's own words take to rise, so what stands under it settles instead of jumping. */
.story--settling {
  transition: height 0.8s var(--ease-out);
}

.story__block {
  position: relative;
  min-width: 0;
}

.story__now {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s5);
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: var(--track-label);
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow__lead {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
}

/* The step on show changes what kind of thing it is at every press. Its rule ends where it always ends, so what the
   step rests on starts where it always starts: the rule takes up what a shorter word leaves. The page says how many
   letters its longest word has, and every letter of this type is as wide as every other. */
.story__now .eyebrow__lead {
  width: calc((2 + var(--eyebrow-kind, 0)) * (1ch + var(--track-label)) + 2 * var(--s3) + var(--eyebrow-rule));
}

.eyebrow b {
  color: var(--ink-bright);
  font-weight: 500;
}

/* The rule is as long as it is set to be, and gives way first where the line is short of room, before what the line
   rests on wraps. */
.eyebrow i {
  flex: 0 1 auto;
  width: var(--eyebrow-rule);
  min-width: 0;
  height: var(--hair);
  background: var(--line-mid);
}

.story__now .eyebrow i {
  flex: 1 1 0;
  width: auto;
}

.eyebrow__meta {
  flex-shrink: 0;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
  text-transform: none;
}

.story__now .eyebrow {
  animation: rise 0.8s var(--ease-out) backwards;
}

.story__title {
  color: var(--ink-bright);
  font-size: var(--type-story);
  font-weight: 500;
  letter-spacing: var(--track-act);
  line-height: 0.96;
  text-wrap: balance;
}

/* The showing's own title, which is longer. */
.story__title--cover {
  max-width: var(--cover-w);
  font-size: var(--type-cover);
  line-height: 1;
}

.story__proves {
  max-width: min(var(--claim-w), calc(100% - var(--cue-w) - var(--s8)));
  min-height: var(--flow-cue);
  margin-top: var(--s5);
  color: var(--ink-2);
  font-size: var(--type-lead);
  line-height: 1.4;
  text-wrap: pretty;
  animation: rise 0.9s var(--ease-out) 0.18s backwards;
}

/* The opening says more than a step does, so it is set a size down and a little closer, with the whole width beside the button to say it in. */
.story__now:has(> .story__title--cover) > .eyebrow {
  margin-bottom: var(--s4);
}

.story__proves--wide {
  max-width: calc(100% - var(--cue-w) - var(--s8));
  margin-top: var(--s4);
  font-size: var(--type-body);
  line-height: 1.5;
}

.story__thesis {
  color: var(--ink-bright);
}

/* The bright clause's words up to its first comma go to a line together: it never starts with a word left alone at
   the end of a line. */
.story__lead-in {
  white-space: nowrap;
}

/* Each sentence holds together and goes to the next line whole. One longer than the line wraps in itself. */
.story__sentence {
  display: inline-block;
  max-width: 100%;
  text-wrap: balance;
  vertical-align: top;
}

/* What a step has earned, stamped between the claim and the button. It lands, and stays until the next step. */
.story__stamp-slot {
  position: absolute;
  right: calc(var(--cue-w) + var(--s8));
  bottom: var(--s6);
}

.story__stamp {
  padding: var(--s1) var(--s3);
  border: var(--rule) solid currentColor;
  color: var(--ink-bright);
  font-family: var(--mono);
  font-size: var(--type-stamp);
  font-weight: 600;
  letter-spacing: var(--track-stamp);
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(var(--stamp-tilt));
  animation: stamp-in 0.55s var(--ease-pop) backwards;
}

.story__stamp--astray {
  color: var(--refused);
}

.panel--flow {
  position: relative;
  border: 0;
  background: none;
  animation: rise 1.1s var(--ease-out) 0.35s backwards;
}

/* The way to the graph's notes is the last thing in its key, at its foot: there when wanted, never over the graph. */
.flow__notes-toggle {
  color: var(--ink-dim);
  white-space: nowrap;
}

.flow__notes-toggle[aria-pressed="true"] {
  color: var(--ink-bright);
}

/* The graph stands on the page's own ground: no box round it, and no grid of its own. */
.flow {
  position: relative;
}

/* The light behind whoever is acting. It says where to look, and it never says what was decided. */
.flow__spot {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: var(--spot-w);
  height: var(--spot-h);
  background: var(--spot);
  opacity: 0;
  transform: translate(calc(var(--x, 0rem) - 50%), calc(var(--y, 0rem) - 50%));
  pointer-events: none;
  transition:
    transform 0.9s var(--ease-out),
    opacity 0.6s var(--ease-out);
}

.flow__spot--on {
  opacity: 1;
}

/* Across the top, the chain, and beside it whoever would take it. Under each line, what that credential carries.
   Along the bottom, the service: every party that asks comes straight down to it, and it reaches straight up
   to each issuer. So no line crosses another. */
.flow__body {
  display: grid;
  /* The empty column is a second gap: whoever stands outside the chain stands apart from it. */
  grid-template-columns: [c1] minmax(0, 1fr) [c2] minmax(0, 1fr) [c3] minmax(0, 1fr) [c4] minmax(0, 1fr) [c4end] 0 [c5] minmax(0, 1fr) [end];
  /* The strip is two rows. The first is as tall as the taller of the two answers, and only they size it; the second
     takes whatever else the strip needs, so everything that stands its whole height spans both. */
  grid-template-rows: [place] auto [top] auto [band] minmax(var(--flow-band), auto) [bar] auto [bar-foot] 1fr [bar-end];
  column-gap: var(--flow-gap);
}

.node {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: var(--s1);
  min-width: 0;
  padding: var(--s3);
  border: var(--hair) solid var(--line-mid);
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out);
}

.node:hover,
.node--open {
  border-color: var(--ink-2);
}

/* The party the one place to look is over: whose turn it is, or who is acting now. */
.node--turn,
.node--acting {
  border-color: var(--ink-bright);
}

.node--acting {
  animation: acting 1.2s var(--ease-in-out) infinite alternate;
}

.node--root {
  grid-row: top;
  grid-column: c1;
}

.node--delegating {
  grid-row: top;
  grid-column: c2;
}

.node--orchestrator {
  grid-row: top;
  grid-column: c3;
}

.node--agent {
  grid-row: top;
  grid-column: c4 / c4end;
}

.node--adversary {
  grid-row: top;
  grid-column: c5;
}

/* The transport stands in the middle, on one of the agent's two ways down. The other way passes beside it. */
/* It reaches a little past the agent's own edge, so that the way beside it has room to pass clear of the words under the chain. */
/* Under the agent, its right edge on the agent card's right edge: one edge down that side of the column. */
.node--transport {
  grid-row: band;
  grid-column: c4 / c4end;
  justify-self: end;
  align-self: center;
  /* As wide as its name needs on one line, and never narrower than it was made. The agent's way down passes beside
     it, clear of the words under the chain: where that leaves too little room, the name takes two lines instead. */
  width: max-content;
  min-width: var(--flow-gate);
  max-width: max(var(--flow-gate), 100% - var(--flow-gate-clear));
}

.node--transport .node__host {
  display: none;
}

/* As tall as two lines of a name, whichever card it is on: a name takes two lines on any card narrower than it, and the
   sigil every credential's line leaves from stands level in the row, however many lines the name beside it takes. */
.node__head {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
  min-height: calc(var(--type-card) * 1.15 * 2);
}

/* What the party is, in the showing's words: what is read first on a card. */
.node__name {
  color: var(--ink-bright);
  font-size: var(--type-card);
  font-weight: 500;
  letter-spacing: var(--track-title);
  line-height: 1.15;
}

/* What kind of party it is, as a small drawing at the end of its name: read from the back of a room before the words are. */
.node__glyph {
  flex: none;
  width: var(--glyph);
  height: var(--glyph);
  margin-left: auto;
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.node--ghost .node__glyph {
  stroke: var(--ink-muted);
}

/* The address it lives at, whole and on one line: small, because it is long, and it is the same on every page. */
.node__host {
  color: var(--ink-muted);
  font-size: var(--type-label);
  overflow-wrap: anywhere;
}

/* Where it stands, in a word or two. It holds the room of a line before it says anything, so no card grows when it does.
   The line is the fine print's at every size its words are set in, so the sigil after them always fits in it. */
.node__state {
  min-height: 1lh;
  line-height: calc(var(--type-fine) * 1.5);
  color: var(--ink-2);
  white-space: normal;
  text-wrap: balance;
}

.node__state::first-letter {
  text-transform: uppercase;
}

.node__state.is-refused {
  color: var(--refused);
}

.node__state.is-granted {
  color: var(--granted);
}

/* Not in the story yet: the same card, the same size, standing back. */
.node--ghost {
  border-color: var(--line-quiet);
}

.node--ghost .sigil {
  border-color: var(--line-quiet);
}

.node--ghost .sigil,
.node--ghost .node__name,
.node--ghost .node__state {
  color: var(--ink-dim);
}

/* A party whose own check found its authority gone goes dark, the way a revoked credential does. */
.node--dark {
  border-left: var(--rule) solid var(--refused);
}

.node--dark .node__name {
  color: var(--ink-muted);
}

/* A party that has just come into the story is marked, once. So is one that a request has just reached. */
.node--joined {
  animation: minted 0.9s var(--ease-out);
}

.node--reached,
.node--transport.node--joined {
  animation: reached 0.7s var(--ease-out);
}

/* A transport that has been switched off: on the graph still, standing back. */
.node--off {
  border-color: var(--line-quiet);
}

.node--off .sigil {
  border-color: var(--line-quiet);
}

.node--off .sigil,
.node--off .node__name {
  color: var(--ink-dim);
}

.node--off .node__glyph {
  stroke: var(--ink-muted);
}

/* A party that holds something is framed in the line of what it holds, over its card's own edge, so the chain reads
   as one thing from the first card to the last. The root, once its person has said yes. Live, the ink of a live
   credential; revoked, the refused colour; under a revoked one, dashed in it. A copy, in the copy's dotted trace.
   The frame is drawn inside the card, so nothing on the graph moves when one comes or goes. */
.node.node--held {
  border: var(--hair) solid transparent;
}

.node__frame {
  position: absolute;
  top: calc(-1 * var(--hair));
  left: calc(-1 * var(--hair));
  width: calc(100% + 2 * var(--hair));
  height: calc(100% + 2 * var(--hair));
  overflow: visible;
  color: var(--ink-2);
  pointer-events: none;
}

.node__frame path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
}

/* A live credential stands lit, and a revoked one in the colour of the no. */
.node__frame--live {
  filter: drop-shadow(0 0 var(--s1) var(--bloom));
}

.node__frame--revoked {
  filter: drop-shadow(0 0 var(--s2) var(--bloom-refused));
}

.node__frame--revoked,
.node__frame--under {
  color: var(--refused);
}

.node__frame--under path {
  stroke-dasharray: 6 6;
}

.node__frame--copy path {
  stroke-width: 2;
  stroke-dasharray: 0 6;
  stroke-linecap: round;
}

/* Pointed at, open beside the graph, or whose turn it is: a live frame comes up to bright ink, as a border does. */
.node:hover > .node__frame--live,
.node--open > .node__frame--live,
.node--turn > .node__frame--live,
.node--acting > .node__frame--live {
  color: var(--ink-bright);
}

/* Acting, and just reached: what a card's border does, its frame does instead. */
.node.node--held.node--acting,
.node.node--held.node--reached {
  animation: none;
}

.node--acting > .node__frame--live {
  animation: frame-acting 1.2s var(--ease-in-out) infinite alternate;
}

.node--acting > .node__frame:not(.node__frame--live) {
  animation: breathe 1.2s var(--ease-in-out) infinite alternate;
}

.node--reached > .node__frame {
  animation: frame-reached 0.7s var(--ease-out);
}

/* What is done inside a card, on its party's own machine: signing and checking. Nothing crosses the graph for it.
   It is drawn over the card, and the card's words and size never move for it. */
.node__fx {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* The card's four corners close on it, as the phone's do on a face: on the card's own corners, as thick as its frame,
   in bright ink. While they hold, the card's frame steps back, so they are seen on any card, framed, acting or not. */
.node__corner {
  position: absolute;
  width: var(--s5);
  height: var(--s5);
  border: 0 solid var(--ink-bright);
  opacity: 0;
}

.node__corner--tl {
  top: var(--corner);
  left: var(--corner);
  border-top-width: var(--corner-width);
  border-left-width: var(--corner-width);
}

.node__corner--tr {
  top: var(--corner);
  right: var(--corner);
  border-top-width: var(--corner-width);
  border-right-width: var(--corner-width);
}

.node__corner--bl {
  bottom: var(--corner);
  left: var(--corner);
  border-bottom-width: var(--corner-width);
  border-left-width: var(--corner-width);
}

.node__corner--br {
  right: var(--corner);
  bottom: var(--corner);
  border-right-width: var(--corner-width);
  border-bottom-width: var(--corner-width);
}

.node__frame {
  transition: opacity 0.4s var(--ease-out);
}

.node:has(> .node__fx > .node__work) > .node__frame {
  opacity: 0.3;
  transition-duration: 0.2s;
}

/* A signature: the sigil, stamped where it stands. It turns over, its letters in the card's ground on bright ink. */
.node__seal {
  position: absolute;
  border-color: var(--ink-bright);
  background: var(--ink-bright);
  color: var(--canvas);
  opacity: 0;
}

/* An issuer's published key and status list, read: its address underlined in a read's dots while it is. */
.node__read {
  position: absolute;
  height: var(--rule);
  background: repeating-linear-gradient(to right, var(--ink-2) 0 var(--rule), transparent var(--rule) calc(var(--s1) + var(--rule)));
  transform-origin: left center;
}

/* What a card holds, before the words that say it: the credential's mark, in the line of its frame. A copy is the
   copy's dotted trace. One its holder has found no longer valid is struck through, in the refused colour. */
.node__mark {
  position: relative;
  display: inline-block;
  width: var(--mark);
  height: var(--mark);
  margin-right: var(--s2);
  border: var(--rule) solid var(--ink-2);
  vertical-align: baseline;
}

.node__mark--copy {
  border-style: dotted;
}

.node__mark--struck {
  border-color: currentColor;
}

.node__mark--struck::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--s1));
  right: calc(-1 * var(--s1));
  height: var(--rule);
  background: currentColor;
  transform: rotate(-45deg);
}

.node__said {
  display: inline-block;
}

/* The chain's cards, and the intruder's beside them, share a row. Each is as wide as its column, and what it says it
   holds is set to the room it has there. It says that at its foot, so the four say it on one line across, however
   many lines an address takes on one of them. */
.node--root,
.node--delegating,
.node--orchestrator,
.node--agent,
.node--adversary {
  container: card / inline-size;
  grid-template-rows: auto auto 1fr;
}

.node--root > .node__state,
.node--delegating > .node__state,
.node--orchestrator > .node__state,
.node--agent > .node__state,
.node--adversary > .node__state {
  align-self: end;
}

@container card (width >= 12rem) {
  .node__state {
    font-size: var(--type-state);
  }
}

/* Too narrow for the longest of it on one line: the words take two, at the fine print's size, and wrap beside the mark
   before them, not under it. Every card in the row holds room for both lines from the start. */
@container card (width < 12rem) {
  .node__state {
    min-height: 2lh;
  }
  .node__said {
    display: inline;
  }
}

/* Narrower still, at that size the longest of it would take a third line: it is set at the label's size, in the same two. */
@container card (width < 7.25rem) {
  .node__state {
    font-size: var(--type-label);
  }
}

/* Whatever line its words go on to, they go on beside the mark: the mark hangs in the margin before them. */
.node__state:has(> .node__mark) {
  padding-left: calc(var(--mark) + var(--s2));
  text-indent: calc(-1 * (var(--mark) + var(--s2)));
}

.node__state > * {
  text-indent: 0;
}

/* The other party to it, by the sigil on its own card: set in the line, at the line's own height. */
.node__state .node__who {
  display: inline-grid;
  padding: 0 var(--s1);
  line-height: 1.5;
  vertical-align: baseline;
  color: var(--ink);
}

/* Said in, once, when it changes: the mark slides in from where the line meets the card, then the words come up. */
.node__state--new .node__mark {
  animation: held-in 0.55s var(--ease-out) backwards;
}

.node__state--new .node__said,
.node__state--new .node__who {
  animation: said-in 0.5s var(--ease-out) 0.22s backwards;
}

/* The places the parties live: a name and a rule over their cards, with no box round them. */
.flow__region {
  position: relative;
  z-index: 0;
  grid-row: place;
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s3);
  pointer-events: none;
}

.flow__region::after {
  content: "";
  flex: 1;
  height: var(--hair);
  background: var(--line-mid);
}

.flow__region--person {
  grid-column: c1;
}

.flow__region--org {
  grid-column: c2 / c4end;
}

.flow__region--outside {
  grid-column: c5 / end;
}

.flow__region-name {
  color: var(--ink-dim);
  white-space: nowrap;
}

.flow--notes .flow__region::after {
  background: var(--ink-dim);
}

.flow--notes .flow__region-name {
  color: var(--ink-bright);
}

/* What a credential carries, under the line that is the credential, ending where the line ends. Centred on it, the
   last one would run under its holder and into the agent's way down: with four cards in the chain, the columns are
   never wide enough to keep it clear. It starts no further left than half a gap into its giver's column, so the next
   one along is always a gap's half clear of it. */
.flow__link {
  position: relative;
  z-index: 1;
  grid-row: band;
  justify-self: end;
  align-self: start;
  width: min(var(--flow-link), calc(100% + var(--flow-gap) / 2));
  margin-top: var(--s5);
  padding-bottom: var(--s3);
  text-align: right;
  transform: translateX(var(--flow-gap));
}

.flow__link--0 {
  grid-column: c1;
}

.flow__link--1 {
  grid-column: c2;
}

.flow__link--2 {
  grid-column: c3;
}

.flow__link .piece {
  white-space: nowrap;
}

/* What the credential above carried and this one does not. */
.flow__dropped {
  color: var(--ink-2);
  text-decoration: line-through;
  text-decoration-thickness: 0.12em;
}

/* What an issuer would not do: on one line wherever the caption has room for it, and in two, shared evenly, where it
   has not. It never runs past the caption's edge. */
.flow__asked {
  color: var(--ink-2);
  text-wrap: balance;
}

.flow__asked::first-letter {
  text-transform: uppercase;
}

/* What the service said before, one line each, newest first. It stands at the foot of what its answer says, at least
   this far under the reason. */
.flow__earlier {
  display: grid;
  gap: var(--s1);
  margin: auto 0 0;
  padding: var(--s2) 0 0;
  list-style: none;
  color: var(--ink-2);
}

/* How many ways an intruder tried stands at the foot of its answer too, as far under its reason at the least as what
   the agent said earlier stands under its own. */
.flow__tries {
  margin-top: auto;
  padding-top: var(--s2);
}

.flow__link .status {
  white-space: normal;
}

.flow__what {
  color: var(--ink-bright);
}

.flow__where {
  color: var(--ink-2);
}

.flow__link--revoked p,
.flow__link--under p {
  color: var(--ink-muted);
}

.flow__link--fresh {
  animation: appear 0.5s var(--ease-out);
}

/* An answer lands: it comes down onto the bar, and settles. */
.flow__answer--fresh .flow__verdict {
  transform-origin: left center;
  animation: verdict-in 0.6s var(--ease-pop);
}

/* The service, as wide as everyone it answers: a strip between two hairlines, as tall empty as full. At its left end its
   own card, like any party's, whose top and foot are the strip's own rules. Then, each in its own column: what it read
   to decide, and its answer to each party, under that party. */
.flow__bar {
  position: relative;
  z-index: 0;
  grid-row: bar / bar-end;
  grid-column: c1 / end;
  min-height: var(--flow-bar);
  border-block: var(--hair) solid var(--line-mid);
}

.node--service {
  grid-row: bar / bar-end;
  grid-column: c1;
  border-block-color: var(--line-mid);
}

/* The route a party's requests called, set into the strip's top rule where their lines come down. The rule stops either
   side of it: only the rule is painted out, so the light behind the graph and an answer's colour reach it unbroken. In
   ink: it says what was called, and only the answer says how that went. */
.flow__door {
  position: relative;
  z-index: 2;
  grid-row: bar;
  grid-column: c1 / end;
  justify-self: start;
  align-self: start;
  box-sizing: content-box;
  min-width: var(--door-span, 0);
  margin-left: var(--door-at, 0);
  padding-inline: var(--s3);
  background: linear-gradient(var(--canvas), var(--canvas)) center / 100% calc(var(--hair) * 3) no-repeat;
  color: var(--ink-2);
  font-size: var(--type-label);
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, calc(-50% + var(--hair) / 2));
  pointer-events: none;
}

.flow__cell {
  position: relative;
  z-index: 1;
  grid-row: bar / bar-end;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--s1);
  min-width: 0;
  /* Its first line stands level with the first line of the service's card, inside that card's hairline. */
  padding: calc(var(--s3) + var(--hair)) 0 var(--s3);
}

/* An answer stands the strip's whole height, so its rule and its colour do. What it says is in the strip's first row,
   which is as tall as the taller answer, and what it says last stands at that row's foot: two answers side by side end
   on one line however many lines either takes. */
.flow__answer {
  grid-template-rows: subgrid;
  row-gap: 0;
  padding-bottom: 0;
}

.flow__stack {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  min-width: 0;
  padding-bottom: var(--s3);
}

/* A hairline between one answer and whatever is before it, in the middle of the gap. Nothing is ruled off before it has something in it. */
.flow__answer:not(:empty)::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--flow-gap) / -2);
  width: var(--hair);
  background: var(--line-quiet);
}

/* What the service read stands under the issuers it read, between its own card and the agent's answer. */
.flow__reads {
  grid-column: c2 / c4;
}

/* Its words may use the gap beside it as well, so that what it said just before stays on one line and the strip does not grow. */
.flow__answer--agent {
  grid-column: c4 / c4end;
  margin-right: calc(var(--flow-gap) * -1);
}

/* The last answer stands in from the strip's end as far as the service's card stands in from its start. */
.flow__answer--adversary {
  grid-column: c5;
  padding-right: calc(var(--s3) + var(--hair));
}

/* The answer tints its own column, from the top of the strip down, in the colour of the verdict. */
.flow__answer--granted::after,
.flow__answer--refused::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--flow-gap) / -2 + var(--hair));
  z-index: -1;
  pointer-events: none;
}

/* The agent's column runs to the rule before whoever stands outside, and never into the next answer's colour. The last one stops at the page's edge. */
.flow__answer--agent::after {
  right: calc(var(--flow-gap) / -2);
}

.flow__answer--adversary::after {
  right: 0;
}

.flow__answer--granted::after {
  background: linear-gradient(to bottom, var(--granted-wash), transparent);
}

.flow__answer--refused::after {
  background: linear-gradient(to bottom, var(--refused-dim), transparent);
}

.flow__cell .label {
  margin-bottom: var(--s1);
}

.flow__cell:empty {
  padding: 0;
}

.flow__cell p {
  overflow-wrap: anywhere;
}

/* Who an answer is to is where it stands, under that party. It is said only for whoever cannot see that. */
.flow__to {
  position: absolute;
  width: var(--hair);
  height: var(--hair);
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* What the request asked for, on one line so the strip does not grow. A path too long for its column loses its start, and keeps the part that says which record. */
.flow__for {
  margin-bottom: var(--s1);
  overflow: hidden;
  color: var(--ink);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow__for--path {
  direction: rtl;
  font-size: var(--type-path);
  letter-spacing: var(--track-path);
  text-align: left;
}

/* The answer, in one word, read from the back of a room. Under it how it was asked and why, in plain words. */
.flow__verdict {
  font-family: var(--mono);
  font-size: var(--type-answer);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-transform: uppercase;
}

/* A yes from before the chain was ended: what was said then, in ink. */
.flow__verdict--past {
  color: var(--ink-2);
}

/* A reason that takes two lines shares its words between them, so no word or two is left on a line of its own. */
.flow__reason {
  color: var(--ink-2);
  font-size: var(--type-fine);
  line-height: 1.4;
  text-wrap: balance;
}

.flow__why {
  color: var(--ink-bright);
}

.flow__how {
  color: var(--ink-2);
}

/* Asked for, the notes stand over the whole graph, which steps back behind them as it does behind a page: nothing
   is cut in half, and a press anywhere on them puts them away. */
.flow__legend {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
  gap: var(--s7);
  padding: var(--s8) var(--s7);
  background: var(--scrim);
  -webkit-backdrop-filter: blur(var(--scrim-blur)) saturate(0);
  backdrop-filter: blur(var(--scrim-blur)) saturate(0);
  cursor: pointer;
  animation: appear 0.3s var(--ease-out);
}

@media (prefers-reduced-transparency: reduce) {
  .flow__legend {
    background: var(--canvas-deep);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.flow__legend[hidden] {
  display: none;
}

/* The three places, each in a column of the notes' own grid. */
.flow__notes {
  display: contents;
}

/* Read from across a room: the size of a step's claim, in ink. */
.flow__legend dd {
  margin-top: var(--s2);
  color: var(--ink);
  font-size: var(--type-lead);
  line-height: 1.4;
  text-wrap: pretty;
}

/* What this run does not show, and the way out, on one line under a rule. */
.flow__legend-note {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2) var(--s5);
  padding-top: var(--s5);
  border-top: var(--hair) solid var(--line-mid);
  color: var(--ink-2);
}

.flow__legend-close {
  color: var(--ink-bright);
}

/* A label from the showing's setting: what this is to this audience, under what it is. */
.node__as,
.flow__as {
  color: var(--ink-dim);
}

/* What a card is, where its column is too narrow for it on one line, breaks as evenly as it can: between its words,
   never with the last letters of one alone under the rest. */
.node__as {
  text-wrap: balance;
}

/* The lines. A credential is a thick line from sigil to sigil, there only once its holder has checked it and taken it,
   and nothing ever travels it. A way requests go is a hairline: faint until something has crossed it, brighter after. */
.flow__wires {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wire {
  fill: none;
  stroke: var(--line-mid);
  stroke-width: 1;
  /* A line that changes what it says, from held to revoked, changes colour where it stands, and is seen to. */
  transition: stroke 0.6s var(--ease-out);
}

.wire--chain.wire--none {
  stroke: none;
}

.wire--chain.wire--live {
  stroke: var(--ink-2);
  stroke-width: 3;
  filter: drop-shadow(0 0 var(--s1) var(--bloom));
}

.wire--chain.wire--revoked {
  stroke: var(--refused);
  stroke-width: 3;
  filter: drop-shadow(0 0 var(--s2) var(--bloom-refused));
}

/* Its own entry untouched, the one it hangs from revoked: dead all the same, and drawn broken. */
.wire--chain.wire--under {
  stroke: var(--refused);
  stroke-width: 3;
  stroke-dasharray: 6 6;
}

.wire--ask.wire--used {
  stroke: var(--ink-dim);
}

.wire--ask.wire--off {
  stroke: var(--line-quiet);
}

/* A copy leaves a dotted trace, a read's dots. Before it there is no line at all. A checker's reads are no line: each is
   marked at the address it was read from. */
.wire--copy {
  stroke: none;
}

.wire--copy.wire--used {
  stroke: var(--ink-2);
  stroke-width: 2;
  stroke-dasharray: 0 6;
  stroke-linecap: round;
}

.flow__marks {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* A request, crossing: a white point in the lens's light. One for each request that was really made, and none otherwise. */
.flow__mark {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--flow-mark);
  height: var(--flow-mark);
  margin: 0;
  background: var(--ink-bright);
  box-shadow: var(--glint);
  opacity: 0;
  will-change: transform, opacity;
}

/* The way it has just come, fading behind it. */
.flow__trail {
  position: absolute;
  transform-origin: right center;
  top: 0;
  right: 50%;
  width: var(--flow-trail);
  height: 100%;
  background: var(--trail-lens);
}

/* The one place to read, beside the step's claim: the button before a step, what is happening during it. It never
   moves, so the eye has one place to come back to. */
.flow__cue-host {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: var(--cue-w);
  height: var(--flow-cue);
  animation: rise 0.9s var(--ease-out) 0.55s backwards;
}

.flow__cue {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: var(--s2) var(--s4);
  min-width: 0;
  height: 100%;
}

/* Only what can be pressed in it takes a press. The rest lets a press through to the graph. */
.flow__cue {
  pointer-events: none;
}

.flow__cue button {
  pointer-events: auto;
}

/* While a step runs: which part it is and the way to stop, on a line that never moves; under it what is happening,
   in a sentence; under that, once it has landed, what came of it. It hangs from the top of its place. */
.flow__cue--acting,
.flow__cue--waiting,
.flow__cue--next {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  align-content: flex-start;
  justify-content: flex-start;
  gap: var(--s1);
}

/* Balanced: a sentence over two lines is two even lines, never one long and a word or two left over. */
.flow__said {
  color: var(--ink-bright);
  font-size: var(--type-lead);
  line-height: 1.35;
  text-wrap: balance;
}

.flow__cue--next .flow__said {
  color: var(--ink-2);
}

/* Ahead of a step, what comes next stands on the claim's own lines: the word for it on the first, the sentence on the
   lines under it. */
.flow__cue--next {
  gap: 0;
}

.flow__cue--next .flow__now {
  min-height: calc(var(--type-lead) * 1.4);
}

.flow__cue--next .flow__said {
  line-height: 1.4;
}

/* The opening's words are a size down and further apart: so are the lines it stands on. */
.story__now:has(> .story__proves--wide) ~ .flow__cue-host .flow__cue--next .flow__now {
  min-height: calc(var(--type-body) * 1.5);
}

.story__now:has(> .story__proves--wide) ~ .flow__cue-host .flow__cue--next .flow__said {
  line-height: calc(var(--type-body) * 1.5);
}

/* What came of a part, in a few plain words, in the colour of the verdict. A line of its own, never broken into. */
.flow__outcome {
  min-height: 1lh;
  font-size: var(--type-body);
  line-height: 1.35;
}

.flow__said {
  min-height: 1lh;
}

.flow__cue--fresh {
  animation: cue-in 0.5s var(--ease-out);
}

/* The one button: solid, the one bright block on the screen. A light sweeps across it when it is ready, once, so the eye finds it. */
.flow__go {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--s5);
  min-height: var(--go-h);
  overflow: hidden;
  font-size: var(--type-lead);
  text-align: left;
  text-wrap: pretty;
}

.flow__go:active:not(:disabled) {
  transform: translateY(var(--hair));
}

.flow__go:disabled {
  border-style: solid;
}

:root[data-stage] .flow__key {
  display: none;
}

@media (pointer: coarse) {
  .flow__key {
    display: none;
  }
}

/* The key that presses it too, as a key cap inside it, not a second thing to read beside it. */
.flow__key {
  padding: var(--s1) var(--s2);
  border: var(--hair) solid currentColor;
  font-family: var(--mono);
  font-size: var(--type-label);
  letter-spacing: var(--track-label);
  line-height: 1;
  text-transform: uppercase;
  opacity: 0.7;
}

.flow__go::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, var(--shine) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}

.flow__cue--fresh .flow__go:not(:disabled)::before,
.flow__go:hover:not(:disabled)::before {
  animation: shine 0.7s var(--ease-in-out);
}

.flow__now {
  display: inline-flex;
  align-items: center;
  gap: var(--s2) var(--s4);
  color: var(--ink-2);
}

/* The way to stop: a quiet word beside the part's number, never a box that reads as a status. */
.flow__stop {
  padding: 0;
  border: 0;
  color: var(--ink-dim);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.3em;
}

.flow__stop:hover {
  color: var(--ink-bright);
  text-decoration-color: currentColor;
}

.flow__stop[hidden] {
  display: none;
}

/* The phone that was put away is what is waited on: its words stand a step brighter than the way to stop. */
.flow__reopen {
  color: var(--ink-2);
  text-decoration-color: var(--ink-dim);
}

.flow__now::before {
  content: "";
  width: var(--mark);
  height: var(--mark);
  border-radius: 50%;
  background: currentColor;
  animation: breathe 1.2s var(--ease-in-out) infinite alternate;
}

.flow__cue--acting .flow__now {
  color: var(--ink-bright);
}

.flow__cue--waiting .flow__now {
  color: var(--waiting);
}

.flow__cue--next .flow__now::before {
  animation: none;
}

/* A person's own page, as the phone it would be on, over the rest of the screen. Its frame is never moved, only reshaped. */
.drawer.drawer--phone {
  --phone-close: 2.5rem;
  position: fixed;
  right: auto;
  bottom: auto;
  z-index: 31;
  width: auto;
  grid-template-columns: auto minmax(0, 24rem);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: center;
  gap: 0 var(--s7);
  border: 0;
  background: none;
  animation: phone-in 0.6s var(--ease-out);
}

.drawer.drawer--phone .drawer__frames {
  grid-row: 1 / span 2;
  grid-column: 1;
}

/* The way to put the phone away: beside it, level with its top, out of the way of what is read beside it. */
.phone__close {
  display: none;
}

.drawer.drawer--phone .phone__close {
  grid-row: 1;
  grid-column: 2;
  align-self: start;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  cursor: pointer;
}

.phone__close-mark {
  flex: none;
  width: var(--phone-close);
  height: var(--phone-close);
  overflow: visible;
  fill: none;
  transition: transform 0.3s var(--ease-out);
}

/* A ring in four arcs: never four corners, which on this page mean something was signed or checked. At rest, a short
   arc at each diagonal; pointed at, they run on until they meet, a whole ring. */
.phone__close-arc {
  stroke: var(--ink-dim);
  stroke-width: 1;
  stroke-dasharray: 0 32 36 100;
  transition:
    stroke-dasharray 0.55s var(--ease-out),
    stroke 0.3s var(--ease-out);
}

.phone__close-cross {
  stroke: var(--ink-bright);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 0 0 1 2;
  transform-box: view-box;
  transform-origin: 50% 50%;
  transition:
    transform 0.6s var(--ease-out),
    stroke-dasharray 0.22s var(--ease-in);
}

/* The word, and under it the same word again: pointed at, it turns over to the bright one. */
.phone__close-word {
  display: inline-grid;
  overflow: hidden;
  font-family: var(--mono);
  font-size: var(--type-code);
  letter-spacing: var(--track-label);
  line-height: 1.5;
  text-transform: uppercase;
}

.phone__close-word > span,
.phone__close-word::after {
  grid-area: 1 / 1;
  transition: transform 0.5s var(--ease-out);
}

.phone__close-word::after {
  content: attr(data-word);
  color: var(--ink-bright);
  transform: translateY(105%);
}

.phone__close-key {
  transition: opacity 0.3s var(--ease-out);
}

.phone__close:hover .phone__close-arc,
.phone__close:focus-visible .phone__close-arc,
.phone__close--closing .phone__close-arc {
  stroke: var(--ink-bright);
  stroke-dasharray: 0 0 100 100;
}

.phone__close:hover .phone__close-cross,
.phone__close:focus-visible .phone__close-cross {
  transform: rotate(90deg);
}

.phone__close:hover .phone__close-word > span,
.phone__close:focus-visible .phone__close-word > span {
  transform: translateY(-105%);
}

.phone__close:hover .phone__close-word::after,
.phone__close:focus-visible .phone__close-word::after {
  transform: none;
}

.phone__close:hover .phone__close-key,
.phone__close:focus-visible .phone__close-key {
  opacity: 0.85;
}

.phone__close:active .phone__close-mark {
  transform: scale(0.92);
}

/* Pressed, or with Escape: the ring closes, and the cross draws back into its middle. Then the phone drops. */
.phone__close--closing .phone__close-cross {
  stroke-dasharray: 0 0.5 0 2;
}

.phone__close--closing .phone__close-mark {
  transform: scale(0.92);
}

.drawer.drawer--phone .phone__close-arc {
  animation: close-arc 0.6s var(--ease-out) 0.3s backwards;
}

.drawer.drawer--phone .phone__close-cross {
  animation: close-cross 0.38s var(--ease-out) 0.55s backwards;
}

.drawer.drawer--phone .phone__close-cross + .phone__close-cross {
  animation-delay: 0.66s;
}

.drawer.drawer--phone .phone__close-word,
.drawer.drawer--phone .phone__close-key {
  animation: close-word 0.5s var(--ease-out) 0.62s backwards;
}

.drawer.drawer--phone .phone__close-key {
  animation-delay: 0.7s;
}

.drawer.drawer--phone .drawer__head {
  display: none;
}

/* The status bar: signal and battery right of the island, as a locked phone has. Its time is the lock screen's. */
.phone__bar {
  display: none;
}

.drawer.drawer--phone .phone__bar {
  position: absolute;
  top: var(--phone-bezel);
  right: var(--phone-bezel);
  left: var(--phone-bezel);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: var(--phone-status);
  padding: 0 calc(var(--phone-screen-radius) * 0.8);
  color: var(--ink-bright);
  pointer-events: none;
}

.phone__icons {
  width: 2.75rem;
  height: 0.75rem;
  fill: currentColor;
}

.phone__icons .phone__battery {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.5;
}

.drawer.drawer--phone .drawer__frames {
  padding: var(--phone-bezel);
  border-radius: var(--phone-radius);
  background: var(--phone-shell);
  box-shadow: var(--phone-shadow);
}

/* The screen, with a status bar and its island above the page, as a phone has. */
.drawer.drawer--phone .drawer__frames::before,
.drawer.drawer--phone .drawer__frames::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.drawer.drawer--phone .drawer__frames::before {
  inset: var(--phone-bezel);
  border-radius: var(--phone-screen-radius);
  background: var(--phone-wall);
}

.drawer.drawer--phone .drawer__frames::after {
  top: calc(var(--phone-bezel) + (var(--phone-status) - var(--phone-island-h)) / 2);
  left: 50%;
  width: var(--phone-island-w);
  height: var(--phone-island-h);
  border-radius: var(--phone-island-h);
  background: var(--phone-island);
  transform: translateX(-50%);
}

.drawer.drawer--phone .drawer__frames iframe {
  inset: auto;
  top: calc(var(--phone-bezel) + var(--phone-status));
  left: var(--phone-bezel);
  width: calc(100% - 2 * var(--phone-bezel));
  height: calc(100% - 2 * var(--phone-bezel) - var(--phone-status));
  border-radius: 0 0 var(--phone-screen-radius) var(--phone-screen-radius);
}

/* Put away, the phone drops out of the screen whole, gathering speed, and what is beside it is gone before it moves.
   Nothing on it fades through the graph. The graph comes back into focus as it goes. */
.drawer.drawer--away {
  transform: translateY(100vh);
  transition: transform 0.46s var(--ease-in);
}

.drawer.drawer--away .phone__aside,
.drawer.drawer--away .phone__close {
  opacity: 0;
  transition: opacity 0.14s linear;
}

.scrim--away {
  opacity: 0;
  transition: opacity 0.4s var(--ease-in-out) 0.1s;
}

/* Behind a person's phone the graph steps back, out of focus: there, and not to be read while the phone is up. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: var(--scrim);
  /* Out of focus and out of colour: a verdict behind the scrim is not one to read, so it does not glow through. */
  -webkit-backdrop-filter: blur(var(--scrim-blur)) saturate(0);
  backdrop-filter: blur(var(--scrim-blur)) saturate(0);
  animation: appear 0.4s var(--ease-out);
}

@media (prefers-reduced-transparency: reduce) {
  .scrim {
    background: var(--canvas-deep);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.scrim[hidden] {
  display: none;
}

/* Beside the phone: how far the person has got, what to do on it, and why it is theirs to do. */
.phone__aside {
  display: none;
}

/* Under the close, and as far below the phone's middle as the close is tall, so its own middle is the phone's. */
.drawer.drawer--phone .phone__aside {
  grid-row: 2;
  grid-column: 2;
  align-self: center;
  display: grid;
  gap: var(--s4);
  align-content: center;
  margin-bottom: var(--phone-close);
  color: var(--waiting);
}

.drawer.drawer--phone .phone__aside--done.phone__aside--grant {
  color: var(--granted);
}

.drawer.drawer--phone .phone__aside--done.phone__aside--revoke {
  color: var(--refused);
}

/* Once it is done, why it was a person's to do has been said. */
.phone__aside--done .phone__why {
  display: none;
}

.phone__state {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

/* How far the person has got, as a dot that breathes while they are waited for, and stays once they have answered. */
.phone__state::before {
  content: "";
  flex: none;
  width: var(--mark);
  height: var(--mark);
  border-radius: 50%;
  background: currentColor;
}

.phone__aside--asked .phone__state::before,
.phone__aside--working .phone__state::before {
  animation: breathe 1.2s var(--ease-in-out) infinite alternate;
}

.drawer.drawer--phone .phone__aside--working {
  color: var(--ink-bright);
}

/* While a person's page is up as a phone, their own card stands in front of the scrim, and behind the phone where they meet. */
.flow--phone .node--acting {
  z-index: 30;
}

/* The yes or the no a conductor asked for, as the person's phone puts it: its lock screen, and over it a sheet with
   the question, its terms and the one way to answer. */
.ask {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--phone-glow), var(--phone-wall);
  overflow-x: hidden;
  overflow-y: auto;
}

.ask[hidden] {
  display: none;
}

/* The time and the day, in what room the sheet leaves above itself. With too little room they are not drawn. */
.ask__lock {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--s1);
  padding: var(--s4);
  container: lock / size;
  text-align: center;
}

.ask__clock {
  color: var(--ink-bright);
  font-size: var(--phone-clock);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--track-headline);
  line-height: 1;
}

.ask__date {
  color: var(--ink-2);
}

@container lock (max-height: 6.25rem) {
  .ask__clock,
  .ask__date {
    display: none;
  }
}

/* The sheet: risen from the foot of the screen, as tall as what it says. */
.ask__card {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  border-top: var(--hair) solid var(--line-mid);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  background: var(--canvas);
  box-shadow: var(--sheet-shadow);
}

.ask__body {
  display: grid;
  align-content: start;
  gap: var(--s3);
  padding: var(--s6) var(--s5) var(--s4);
}

/* What is asked, centred, under the drawing: the one thing to read first. */
.ask__hero {
  display: grid;
  justify-items: center;
  gap: var(--s2);
  padding-bottom: var(--s1);
  text-align: center;
}

.ask__glyph {
  width: var(--s8);
  height: var(--s8);
  margin-bottom: var(--s1);
  fill: none;
  stroke: var(--ink-bright);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ask__card--asked .ask__glyph {
  animation: breathe 1.6s var(--ease-in-out) infinite alternate;
}

.ask__card--working .ask__glyph {
  animation: scan 0.9s var(--ease-in-out) infinite alternate;
}

/* Answered, the drawing is the answer: larger, and drawn in the colour of what was done. */
.ask__card--said .ask__glyph {
  width: var(--s9);
  height: var(--s9);
}

.ask__card--said.ask__card--grant .ask__glyph,
.ask__card--said.ask__card--grant .ask__eyebrow {
  stroke: var(--granted);
  color: var(--granted);
}

.ask__card--said.ask__card--revoke .ask__glyph,
.ask__card--said.ask__card--revoke .ask__eyebrow {
  stroke: var(--refused);
  color: var(--refused);
}

/* The tick or the cross draws itself, once. */
.ask__card--said .ask__mark {
  stroke-dasharray: 1;
  animation: mark-in 0.5s var(--ease-out) both;
}

.ask__eyebrow {
  color: var(--ink-2);
}

.ask__title {
  color: var(--ink-bright);
  font-size: var(--type-title);
  font-weight: 500;
  letter-spacing: var(--track-title);
  line-height: 1.2;
  text-wrap: balance;
}

.ask__line {
  color: var(--ink-2);
  line-height: 1.45;
  text-wrap: balance;
}

/* Once it is said, the terms stand under it as what was given. */
.ask__card--said {
  padding-bottom: var(--phone-safe);
}

/* The terms, as label and value, one to a line, in sentence case. */
.ask__terms {
  display: grid;
  justify-self: stretch;
  margin: var(--s2) 0 0;
  border-top: var(--hair) solid var(--line);
}

.ask__terms > div {
  display: grid;
  grid-template-columns: var(--ask-term) minmax(0, 1fr);
  gap: var(--s3);
  padding: var(--s1) 0;
  border-bottom: var(--hair) solid var(--line);
}

.ask__terms dt {
  color: var(--ink-dim);
}

.ask__terms dd {
  margin: 0;
  color: var(--ink-bright);
}

/* What a yes lets them do, ticked, or what a no ends, struck: a line each, under a few words that say which. */
.ask__list {
  display: grid;
  gap: var(--s2);
  justify-self: stretch;
  margin-top: var(--s2);
}

.ask__lead {
  color: var(--ink-dim);
}

.ask__list ul {
  display: grid;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Each line's mark stands by its first line of words, however many lines they take. */
.ask__list li {
  display: grid;
  grid-template-columns: var(--s4) minmax(0, 1fr);
  gap: var(--s3);
  align-items: start;
  color: var(--ink-bright);
  line-height: 1.4;
  text-wrap: pretty;
}

.ask__list li::before {
  content: "";
  justify-self: center;
}

.ask__list--grant li::before {
  width: 0.375rem;
  height: 0.75rem;
  margin-top: 0.2em;
  border-right: var(--rule) solid var(--ink-bright);
  border-bottom: var(--rule) solid var(--ink-bright);
  transform: rotate(45deg);
}

.ask__list--revoke li::before {
  width: 0.75rem;
  height: var(--rule);
  margin-top: calc(0.7em - var(--rule) / 2);
  background: var(--refused);
}

.ask__note {
  margin-top: var(--s2);
  color: var(--ink-2);
}

/* On a short screen the sheet keeps every word and its button, and gives up some of its drawing and its air. */
@media (max-height: 36.5rem) {
  .ask__card--asked .ask__glyph,
  .ask__card--working .ask__glyph {
    width: var(--s7);
    height: var(--s7);
    margin-bottom: 0;
  }

  .ask__body {
    gap: var(--s2);
    padding-top: var(--s4);
  }

  .ask__hero {
    gap: var(--s1);
  }

  .ask__list ul {
    gap: var(--s1);
  }

  .ask__terms > div {
    padding: 0.125rem 0;
  }
}

/* Shorter still, the drawing goes: the words and the way to answer are what is left. */
@media (max-height: 31rem) {
  .ask__card--asked .ask__glyph,
  .ask__card--working .ask__glyph {
    display: none;
  }
}

/* Under the sheet the page does not scroll: there is nothing under it to reach. */
:root[data-asked],
:root[data-asked] body {
  overflow: hidden;
}

/* The way to answer stands at the foot of the screen, where a thumb is, and clear of the screen's round corners.
   The other ways to answer go under it, centred, as plain words. */
.ask__actions {
  display: grid;
  gap: var(--s3);
  padding: var(--s2) var(--s5) var(--phone-safe);
  text-align: center;
}

.ask__actions .btn {
  width: 100%;
}

.ask__actions .actions__alternatives {
  text-wrap: balance;
}
.phone__said {
  font-family: var(--mono);
  font-size: var(--type-code);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.phone__lead {
  color: var(--ink-bright);
  font-size: var(--type-title);
  font-weight: 500;
  letter-spacing: var(--track-title);
  line-height: 1.25;
  text-wrap: balance;
}

.phone__why {
  color: var(--ink-2);
}

.phone__where {
  color: var(--ink-dim);
  font-size: var(--type-label);
  overflow-wrap: anywhere;
}

/* What happened, in order, in words: each step's requests under that step's name. */
.log {
  display: grid;
  gap: var(--s7);
}

.log__note {
  display: grid;
  gap: var(--s1);
}

.log__replayed {
  font-weight: 500;
}

.log__group {
  display: grid;
  gap: var(--s2);
  padding-top: var(--s4);
  border-top: var(--hair) solid var(--line-mid);
}

.log__step {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  color: var(--ink-bright);
  font-size: var(--type-body);
  font-weight: 500;
  letter-spacing: var(--track-title);
}

.log__n {
  color: var(--ink-dim);
  font-size: var(--type-code);
  letter-spacing: 0;
}

.log__rows {
  display: grid;
}

.log__row {
  display: grid;
  grid-template-columns: var(--log-at) auto minmax(0, var(--log-said)) minmax(0, 1fr);
  align-items: baseline;
  gap: var(--s1) var(--s5);
  width: calc(100% + 2 * var(--s3));
  margin-inline: calc(-1 * var(--s3));
  padding: var(--s2) var(--s3);
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Only a pointer that can rest lights a row. On a touch screen a tapped row would stay lit. */
@media (hover: hover) {
  .log__row:hover {
    background: var(--panel-2);
  }
}

.log__at {
  color: var(--ink-muted);
  font-size: var(--type-code);
}

.log__said {
  line-height: 1.45;
  text-wrap: pretty;
}

/* What came back, in words, as a sentence: the colour says which way it went. */
.log__outcome {
  display: inline-block;
  max-width: var(--log-outcome);
  font-size: var(--type-fine);
  font-weight: 500;
}

.log__outcome::first-letter {
  text-transform: uppercase;
}

.log__replay,
.log__wire {
  grid-column: 3 / -1;
  font-size: var(--type-label);
}

.log__replay {
  font-family: var(--mono);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.log__wire {
  color: var(--ink-dim);
}

/* Under the first screen, a chapter at a time: a line of small type, one large line, one sentence, and what backs it up. */
.chapter {
  max-width: var(--page-wide);
  margin: 0 auto;
  padding: var(--chapter-gap) var(--side) 0;
}

.chapter__head {
  max-width: var(--chapter-head-w);
  margin-bottom: var(--chapter-head-gap);
}

.chapter__title {
  color: var(--ink-bright);
  font-size: var(--type-chapter);
  font-weight: 500;
  letter-spacing: var(--track-act);
  line-height: 0.96;
  text-wrap: balance;
}

.chapter__lead {
  max-width: var(--claim-w);
  margin-top: var(--s6);
  color: var(--ink-2);
  font-size: var(--type-lead);
  line-height: 1.6;
  text-wrap: pretty;
}

.chapter__tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--s3);
}

/* What a chapter says of itself comes in as it is first scrolled to. A line marked to resolve is not seen before it does. */
[data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal));
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

[data-decrypt]:not(.is-in) {
  visibility: hidden;
}

/* A letter resolving: the real letter keeps its box, and a stand-in is painted over it. */
.dw {
  display: inline-block;
  white-space: nowrap;
}

.dc {
  position: relative;
}

.dc.is-pending {
  opacity: 0;
}

.dc[data-g] {
  color: transparent;
}

.dc[data-g]::after {
  content: attr(data-g);
  position: absolute;
  top: 0;
  left: 0;
  color: var(--ink-muted);
}

.limits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s8);
}

.limits__list {
  display: grid;
  align-content: start;
  gap: var(--s4);
  padding-top: var(--s4);
  border-top: var(--hair) solid var(--line-mid);
}

.limits .fineprint {
  padding: 0;
}

/* The close: the five lines the run has earned, and who signs it. */
.finale {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100svh;
  margin-top: var(--chapter-gap);
  padding: var(--s9) var(--side);
  overflow: hidden;
  border-top: var(--hair) solid var(--line);
}

.finale__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.finale::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(closest-side, transparent 30%, var(--canvas) 100%);
  pointer-events: none;
}

.finale__inner {
  display: grid;
  justify-items: center;
  text-align: center;
}

.finale__title {
  display: grid;
  font-size: var(--type-finale);
  font-weight: 500;
  letter-spacing: var(--track-act);
  line-height: 0.98;
}

/* A line stands back until its step has been proved, here, in this run. */
.finale__line {
  color: var(--ink-muted);
  transition: color 0.6s var(--ease-out);
}

.finale__line--proved {
  color: var(--ink-bright);
}

.finale__sub {
  margin-top: var(--s7);
  color: var(--ink-2);
  font-size: var(--type-lead);
}

.finale__by {
  display: grid;
  justify-items: center;
  gap: var(--s4);
  width: min(var(--finale-by-w), 100%);
  margin-top: var(--s7);
  padding-top: var(--s7);
  border-top: var(--hair) solid var(--line-quiet);
  color: var(--ink-2);
  font-size: var(--control-type);
}

.finale__vouched {
  width: auto;
  height: var(--vouched-h);
  color: var(--ink-bright);
}

.finale__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2) var(--s7);
}

.finale__links a {
  color: var(--ink);
  text-decoration-color: var(--line-strong);
}

.finale__links a:hover {
  color: var(--ink-bright);
}

.flow__key-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s7);
  padding: var(--s3) 0;
  border-top: 0;
}

/* On a smaller laptop the key keeps to one line by standing its items a little closer. */
@media (max-width: 85em) {
  .flow__key-legend {
    column-gap: var(--s6);
  }
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--ink-2);
  text-wrap: balance;
}

.legend__line {
  flex: none;
  width: var(--s7);
  height: var(--s3);
  fill: none;
}

.legend__line--chain path,
.legend__line--chain .legend__holder {
  stroke: var(--ink-2);
  stroke-width: 3;
}

.legend__line--ask path {
  stroke: var(--ink-dim);
  stroke-width: 1;
}

.legend__line--ask circle {
  fill: var(--ink-bright);
}

.legend__line--read path {
  stroke: var(--ink-2);
  stroke-width: 2;
  stroke-dasharray: 0 6;
  stroke-linecap: round;
}

.legend__line--work .legend__corners {
  stroke: var(--ink-bright);
  stroke-width: 1.5;
}

/* The way to the notes stands at the far end of the key. */
.flow__key-legend .flow__notes-toggle {
  margin-left: auto;
}

/* The verify script, whole, for whoever wants to run it with nothing of ours installed. */
.recipe {
  display: grid;
  gap: var(--s3);
  justify-items: start;
}

.recipe > summary {
  cursor: pointer;
}

.recipe__code {
  justify-self: stretch;
  max-height: var(--recipe-h);
  padding: var(--s4);
  overflow: auto;
  border: var(--hair) solid var(--line);
  background: var(--canvas-deep);
  color: var(--ink-2);
  white-space: pre;
}

.check {
  display: grid;
  grid-template-rows: 1fr auto auto;
  max-width: var(--chapter-head-w);
  border-bottom: var(--hair) solid var(--line-mid);
}

/* Each thing the replay offers on a row of its own, ruled off as the limits are. */
.check__row {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: var(--s4);
  padding-block: var(--s5);
  border-top: var(--hair) solid var(--line-mid);
}

/* The replay stands beside its promise, as tall as it is. Its top rule runs on from the rule in the chapter's eyebrow, and what it finds fills the room left under the button, so nothing moves when it does. */
.chapter:has(> .chapter__body > .check) {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
  column-gap: var(--s9);
}

.chapter:has(> .chapter__body > .check) > .chapter__head {
  margin-bottom: 0;
}

.chapter:has(> .chapter__body > .check) > .chapter__body {
  align-self: stretch;
  display: grid;
  margin-top: calc(var(--type-label) * 0.7);
}

.check__result {
  color: var(--ink-bright);
  font-size: var(--type-lead);
}

/* A party's own page, beside the graph. Each is there from the start and is never taken away, only not shown. */
/* A party's page stands the full height of the window, over the masthead too: nothing of the page behind it is
   left showing above it. */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: var(--drawer-w);
  border-left: var(--hair) solid var(--line-strong);
  background: var(--canvas);
}

.drawer[hidden] {
  display: none;
}

/* A party's page slides in from the edge, whole. It is opaque all the way, so nothing is read through it. */
.drawer:not(.drawer--phone) {
  animation: drawer-in 0.36s var(--ease-out);
}

/* Behind a party's page the graph steps back, as it does behind a phone, and a press on it puts the page away. */
.scrim.scrim--sheet {
  z-index: 19;
}

/* Its edges are the framed page's own: the page under it sets its sides at 4% of its width, so the head does too. */
.drawer__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
  padding: var(--s3) clamp(1rem, calc(var(--drawer-w) * 0.04), 3rem);
  border-bottom: var(--hair) solid var(--line);
}

.drawer__who {
  min-width: 0;
  margin-right: auto;
}

/* Whose page the sheet is showing, and the way to anyone else's. */
.drawer__tabs {
  display: flex;
  flex-basis: 100%;
  gap: var(--s2);
}

.drawer__tab {
  border-color: var(--line-mid);
  background: none;
  color: var(--ink-dim);
  cursor: pointer;
}

.drawer__tab:hover,
.drawer__tab[aria-pressed="true"] {
  border-color: var(--ink-2);
  color: var(--ink-bright);
}

.drawer__frames {
  position: relative;
  min-height: 0;
}

.drawer__frames iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--canvas);
}

.drawer__frames iframe[hidden] {
  display: none;
}

/* On a conducted page, the one button the conductor will not press. */
.actions__now--asked {
  border-left: var(--rule) solid var(--ink-bright);
}

.actions__asked {
  margin-bottom: var(--s3);
  color: var(--ink-bright);
}

/* Brought into view by the conductor, the actions clear the masthead that stays at the top. */
.actions {
  scroll-margin-top: calc(var(--mast-h) + var(--s4));
}

/* ── fine print ───────────────────────────────────────────────────────── */

.fineprint {
  display: grid;
  gap: var(--s2);
  padding: var(--s5);
  color: var(--ink-2);
  font-size: var(--type-fine);
  line-height: 1.5;
}

.panel__body > .fineprint {
  padding: 0;
}

.fineprint dd {
  margin-bottom: var(--s2);
}

/* A label that needs two lines takes two of even length, never one line and a single word. */
.fineprint dt,
.label {
  text-wrap: balance;
}

.export {
  display: grid;
  gap: var(--s3);
  justify-items: start;
}

/* ── auditor ──────────────────────────────────────────────────────────── */

/* A place to put a file. Its edge is a hairline: a dashed edge means "not available" everywhere else. */
.drop {
  display: grid;
  gap: var(--s3);
  justify-items: start;
  align-content: center;
  padding: var(--s6) var(--s5);
  border: var(--hair) solid var(--line-mid);
  background: var(--panel);
}

.drop--over {
  border-style: solid;
  border-color: var(--ink-bright);
}

.counters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--hair);
  background: var(--line);
  border: var(--hair) solid var(--line);
}

.counter {
  padding: var(--s5);
  background: var(--canvas);
}

.counter__value {
  font-family: var(--mono);
  font-size: var(--type-headline);
  line-height: 1.1;
  font-weight: 500;
  color: var(--ink-bright);
}

.counter__value.is-granted {
  color: var(--granted);
}

.counter__value.is-refused {
  color: var(--refused);
}

.item {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1fr) 8rem;
  gap: var(--s1) var(--s3);
  align-items: baseline;
  padding: var(--s3) var(--s5);
  border-bottom: var(--hair) solid var(--line-hair);
}

.item > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Whether it agreed, in one column with one left edge. */
.item > .status {
  text-align: left;
}

/* Why a row reads as it does, under the row and not behind a word. */
.item__note {
  grid-column: 2 / -1;
}

.drop .view__lines {
  margin-top: 0;
}

/* ── frame mode: a page framed only to be looked at ───────────────────── */

:root[data-frame] .mast {
  height: var(--s8);
}

/* A framed page's sigil stands on the column its text stands on. */
:root[data-frame] .mast__in {
  padding: 0 var(--s5);
}

:root[data-frame] .mast__meta,
:root[data-frame] .skip {
  display: none;
}

:root[data-frame] .page {
  display: block;
  padding: 0;
}

:root[data-frame] .view {
  height: auto;
  margin-bottom: var(--s4);
  padding: var(--s4) var(--s5);
}

:root[data-frame] .view__headline {
  margin-top: 0;
  font-size: var(--type-title);
  line-height: 1.2;
  letter-spacing: var(--track-title);
}

:root[data-frame] .view__lines,
:root[data-frame] .view > .label,
:root[data-frame] [data-frame-hide] {
  display: none;
}

/* A frame is narrow. What a row is comes first and in full; what became of it goes beneath. */
:root[data-frame] .row {
  flex-direction: column;
}

/* A framed page is cut where its frame ends. It says so the way a list does: its last line fades. */
:root[data-frame] body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: var(--s6);
  background: linear-gradient(to bottom, transparent, var(--canvas));
  pointer-events: none;
}

/* Framed, a page is one surface: no box around its view, none around its panel. The frame is the box. */
:root[data-frame] .view,
:root[data-frame] .panel,
:root[data-frame] .drop {
  border-left: 0;
  border-right: 0;
  background: none;
}

/* The two counters keep the hairline between them, and lose the box around them. */
:root[data-frame] .counters {
  border-left: 0;
  border-right: 0;
}

/* Framed, the sections stand edge to edge with one hairline between each, never two with a gap between them. */
:root[data-frame] .col-wide {
  gap: 0;
}

:root[data-frame] .col-wide > * + * {
  border-top: 0;
}

/* The one button stands on the column the text stands on, with room under it. */
:root[data-frame] .audit__replay {
  padding: var(--s4) var(--s5) var(--s5);
}

:root[data-frame] .view {
  border-top: 0;
  margin-bottom: 0;
}

:root[data-frame] .view__outcome {
  margin-top: var(--s3);
}

:root[data-frame] .panel {
  border-top: 0;
}

/* ── breakpoints, in em: media queries cannot read custom properties ──── */

/* Narrower than this, the longest reason under an answer may take two lines. The strip stands that tall from the start,
   so nothing moves when it does. */
@media (max-width: 89em) {
  .flow__bar {
    min-height: calc(var(--flow-bar) + var(--s5));
  }
}

/* Too narrow for a claim, a stamp and the one button side by side: the stamp goes over the button. */
@media (max-width: 85em) {
  .story__stamp-slot {
    right: var(--s4);
    bottom: calc(var(--flow-cue) + var(--s3));
  }
}

/* Too narrow for a claim and the one button side by side: the button goes under the claim. The word for each step goes first. */
@media (max-width: 75em) {
  .story__proves,
  .story__proves--wide {
    max-width: none;
    min-height: 0;
  }
  /* The replay goes under its promise too. */
  .chapter:has(> .chapter__body > .check) {
    display: block;
  }
  .chapter:has(> .chapter__body > .check) > .chapter__head {
    margin-bottom: var(--chapter-head-gap);
  }
  .chapter:has(> .chapter__body > .check) > .chapter__body {
    margin-top: 0;
  }
  .story__stamp-slot {
    top: 0;
    right: 0;
    bottom: auto;
  }
  .flow__cue-host {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    margin-top: var(--s3);
  }
  .hero__orb {
    top: calc(-1 * var(--orb-rise));
    bottom: auto;
  }
  .stepper {
    gap: var(--s3);
  }
  .stepper__title {
    display: none;
  }
  .stepper__step--on .stepper__title {
    display: inline;
  }
}

/* Where every step says its name, the five steps stand in the middle of the masthead, whatever stands either side. A
   tick takes no room in the row: it stands in the gap after its step, which is as wide as a tick and the gaps either
   side of it, so the row is centred on its words and nothing moves when a step is proved. */
@media (width > 75em) {
  .mast--conduct .brand {
    flex: 1 1 0;
  }
  .mast--conduct .mast__steps {
    flex: none;
  }
  .mast--conduct .stepper {
    gap: calc(var(--s2) + var(--stepper-tick) + var(--s5));
  }
  .mast--conduct .stepper__step {
    position: relative;
  }
  .mast--conduct .stepper__word:empty {
    display: none;
  }
  .mast--conduct .stepper__word.is-proved {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
    margin-left: var(--s2);
  }
}

/* Where only the step on show says its name, the five steps start where they always start, a gap past the lockup, so
   a step that says its name moves nothing before it. */
@media (53.75em < width <= 75em) {
  .mast--conduct .mast__steps {
    flex: none;
    justify-content: flex-start;
    margin-left: var(--s6);
  }
}

/* The run's number stands at the masthead's end, and the note on its pages before it wherever the room beside the steps
   holds it. Where it does not, the note goes whole: it wraps on to a second line, and the masthead shows only the
   first. So it never runs into the steps, whatever it says. */
@media (width > 53.75em) {
  .mast--conduct .mast__meta {
    flex: 1 1 0;
    flex-flow: row-reverse wrap;
    justify-content: flex-start;
    max-height: calc(var(--type-fine) * 1.5);
    overflow: clip;
    overflow-clip-margin: var(--s2);
  }
  .mast--conduct .mast__meta > .chip {
    order: -1;
  }
}

@media (max-width: 53.75em) {
  .mast__note {
    display: none;
  }
}

/* Too narrow for a second gap before whoever stands outside. */
@media (53.75em < width <= 75em) {
  .flow__body {
    grid-template-columns: [c1] minmax(0, 1fr) [c2] minmax(0, 1fr) [c3] minmax(0, 1fr) [c4] minmax(0, 1fr) [c4end c5] minmax(0, 1fr) [end];
  }
  .flow__answer--agent {
    margin-right: 0;
  }
  .flow__answer--agent::after {
    right: calc(var(--flow-gap) / -2);
  }
  .flow__bar {
    min-height: calc(var(--flow-bar) + var(--s9));
  }
}

/* Too narrow a column for the gateway's sigil, name and drawing with the way down clear beside it: the gateway fills
   the agent's column, less the room for the way down, and its drawing goes first. */
@media (53.75em < width < 94em) {
  .node--transport {
    container: gate / inline-size;
    justify-self: stretch;
    width: auto;
    min-width: 0;
    max-width: none;
    margin-left: var(--s7);
  }
  .node--transport .node__glyph {
    display: none;
  }
}

/* Too narrow for its sigil beside the longest word of its name, the gateway's sigil goes too. Its name says what it is. */
@container gate (width < 6.5rem) {
  .node--transport .sigil {
    display: none;
  }
}

/* Where a column is too narrow for the longest word of a name between its sigil and its drawing, every card's drawing
   goes. Its name and its sigil say what it is. */
@media (53.75em < width < 80em) {
  .node__glyph {
    display: none;
  }
}

@media (max-width: 68.75em) {
  .col-main,
  .col-side,
  .col-wide,
  .col-narrow {
    grid-column: 1 / -1;
  }
  .mast__role {
    display: none;
  }
  /* In one column there is nothing beside a side panel to match: it is as tall as its list. */
  .panel--tall-view,
  .panel--tall-actions {
    height: auto;
  }
  .panel--tall-view > .panel__body {
    height: var(--list-h);
  }
  .panel--tall-actions > .panel__body {
    height: var(--keys-h);
  }
}

@media (max-width: 53.75em) {
  /* Narrow, the graph is a list in the order the story is told. The lines are left to the list of requests. */
  .flow__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    gap: var(--s3);
  }
  .flow__body > .node,
  .flow__body > .flow__link {
    grid-row: auto;
    grid-column: 1;
  }
  .flow__body > .flow__link {
    justify-self: start;
    width: auto;
    margin-top: 0;
    padding-left: var(--s4);
    text-align: left;
    transform: none;
  }
  .node--transport {
    width: auto;
    min-width: 0;
    max-width: none;
    justify-self: stretch;
  }
  .node--root {
    order: 1;
  }
  .flow__link--0 {
    order: 2;
  }
  .node--delegating {
    order: 3;
  }
  .flow__link--1 {
    order: 4;
  }
  .node--orchestrator {
    order: 5;
  }
  .flow__link--2 {
    order: 6;
  }
  .node--agent {
    order: 7;
  }
  .node--transport {
    order: 8;
  }
  .node--adversary {
    order: 9;
  }
  .flow__bar,
  .flow__door {
    display: none;
  }
  .flow__answer--agent {
    margin-right: 0;
  }
  /* Each answer is a box of its own, as tall as what it says. */
  .flow__answer {
    grid-template-rows: none;
  }
  .flow__answer--adversary {
    padding-right: var(--s3);
  }
  .flow__stack {
    padding-bottom: 0;
  }
  /* In one long column nothing stands under its party, so each answer says whose it is. */
  .flow__to {
    position: static;
    width: auto;
    height: auto;
    margin-bottom: var(--s1);
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }
  /* A cell with nothing in it yet is not drawn as an empty box. */
  .flow__body > .flow__cell:empty {
    display: none;
  }
  .node--service,
  .flow__body > .flow__cell {
    order: 10;
    grid-row: auto;
    grid-column: 1;
    padding: var(--s3);
    border: var(--hair) solid var(--line-mid);
    background: var(--canvas);
  }
  .flow__region,
  .node--service .flow__region-name,
  .flow__wires,
  .flow__marks,
  .flow__spot,
  .flow__cell::before,
  .flow__answer::after {
    display: none;
  }
  /* A phone's graph is a long column: the notes stand at its foot, just over the words that asked for them. */
  .flow__legend {
    grid-template-columns: minmax(0, 1fr);
    align-content: end;
    gap: var(--s5);
    padding: var(--s5);
  }
  /* The first screen is as long as it needs to be, and the one button stays in reach at the foot of the screen. */
  .hero {
    display: block;
    min-height: 0;
  }
  .hero__orb {
    --orb-size: var(--orb-size-phone);
    --orb-out: var(--s8);
    --orb-rise: var(--s10);
    opacity: 0.55;
  }
  /* The one button is fixed over the graph, so what holds it stands in front of the cards. */
  .story {
    z-index: 9;
    padding-block: var(--s8) var(--s6);
  }
  .eyebrow {
    flex-wrap: wrap;
    gap: var(--s1) var(--s3);
  }
  .eyebrow i {
    display: none;
  }
  .story__now .eyebrow__lead {
    width: auto;
  }
  .eyebrow__meta {
    flex-basis: 100%;
  }
  .story__stamp-slot {
    position: static;
    margin-top: var(--s4);
    justify-self: start;
  }
  .flow__cue-host {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9;
    width: auto;
    height: auto;
    margin: 0;
    padding: var(--s3) var(--side) calc(var(--s3) + env(safe-area-inset-bottom));
    border-top: var(--hair) solid var(--line);
    background: var(--mast-glass);
    -webkit-backdrop-filter: blur(var(--mast-blur)) saturate(1.4);
    backdrop-filter: blur(var(--mast-blur)) saturate(1.4);
  }
  .flow__cue-host:has(> .flow__cue:empty) {
    display: none;
  }
  .flow__go {
    width: 100%;
    justify-content: center;
  }
  /* A screen this narrow is held, not typed at: the button says what it does, on one line, with no key cap. */
  .flow__key {
    display: none;
  }
  .finale {
    padding-bottom: calc(var(--s10) + var(--go-h));
  }
  .limits {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s6);
  }
  .story__sentence {
    display: inline;
  }
  /* On a screen that is itself a phone, the person's page is the whole screen, with no phone drawn round it and
     nothing beside it: the sheet says what is asked. The person's card stays behind with the rest. */
  .drawer.drawer--phone.drawer--whole {
    inset: 0;
    display: block;
  }
  .drawer.drawer--phone.drawer--whole .drawer__frames {
    position: absolute;
    inset: 0;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .drawer.drawer--phone.drawer--whole .drawer__frames::before,
  .drawer.drawer--phone.drawer--whole .drawer__frames::after,
  .drawer.drawer--phone.drawer--whole .phone__bar,
  .drawer.drawer--phone.drawer--whole .phone__aside {
    display: none;
  }
  .drawer.drawer--phone.drawer--whole .drawer__frames iframe {
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  /* The whole screen is the person's page: its close stands in the screen's top corner, over the page's wall. */
  .drawer.drawer--phone.drawer--whole .phone__close {
    position: fixed;
    top: calc(var(--s3) + env(safe-area-inset-top));
    right: var(--s3);
    z-index: 1;
  }
  .flow--phone .node--acting {
    z-index: auto;
  }
  /* Narrow, the five steps are their numbers. The step on show says its name below them. */
  .mast__steps {
    justify-content: flex-end;
  }
  .stepper {
    gap: var(--s2);
  }
  .stepper__title,
  .stepper__step--on .stepper__title,
  .stepper__word {
    display: none;
  }
  .log__row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .log__at {
    grid-column: 1 / -1;
  }
  .log__outcome {
    grid-column: 2;
    text-align: left;
  }
  .log__replay,
  .log__wire {
    grid-column: 2;
  }
  .doc__row {
    grid-template-columns: minmax(0, 1fr);
  }
  .doc__row > dt {
    padding-bottom: 0;
  }
  .doc__row > dd {
    padding-top: var(--s1);
  }
  /* Narrow, what was handed on goes under what was granted, with the mark that says what happened to it beside it. */
  .diff__grid {
    grid-template-columns: 5.5rem 1.5rem minmax(0, 1fr);
  }
  .diff__grid > :nth-child(1),
  .diff__grid > :nth-child(3) {
    display: none;
  }
  .diff__head {
    grid-column: 3;
  }
  .diff__parent {
    grid-column: 3;
  }
  .diff__label {
    grid-row: span 2;
  }
  .diff__mark {
    grid-column: 2;
    padding-left: 0;
    padding-right: 0;
  }
  .diff__child {
    grid-column: 3;
  }

  /* The identifier stays whole. The run and the mode make room for it. */
  .mast__meta .label {
    display: none;
  }
  .tally__row,
  .tally__head {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  /* What was replayed, one thing per line: which, what was recorded, what the replay said, and whether they agree. */
  .item {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s1);
  }
  .item__note {
    grid-column: 1;
  }
  .tally__row > :nth-child(1),
  .tally__row > :nth-child(3),
  .tally__head > :nth-child(1),
  .tally__head > :nth-child(3) {
    display: none;
  }
}

@media (max-width: 37.5em) {
  .trace__row {
    grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  }
  .trace__row .fine {
    grid-column: 2 / -1;
    grid-row: 2;
  }
  /* A phone's masthead is who this is. The identifier is in the keys panel, whole. */
  .mast__meta {
    display: none;
  }
  .counters {
    grid-template-columns: minmax(0, 1fr);
  }
  /* On a phone what became of a row always goes under it. */
  .row {
    flex-direction: column;
  }
  /* The id on its own line, the two ways to read it on the next. */
  .doc__head {
    grid-template-columns: minmax(0, 1fr);
  }
  /* What was said goes under who and how, so a long word does not squeeze them. */
  .wire__summary {
    grid-template-columns: 4.5rem minmax(0, 1fr);
  }
  .wire__summary > .status {
    grid-column: 2;
    grid-row: 3;
  }
  .inbox__summary {
    grid-template-columns: minmax(0, 1fr);
  }
  .inbox__summary > .status {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ── motion: on the graph each one marks a real event; `rise`, `orb-in` and `stamp-in` are the page arriving ──────────────────────────────── */

@keyframes sweep {
  from {
    background-position: -40% 0;
  }
  to {
    background-position: 140% 0;
  }
}

@keyframes appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes tint {
  from {
    background-color: transparent;
  }
}

@keyframes minted {
  from {
    border-color: var(--granted);
  }
}

@keyframes bracket {
  from {
    border-left-color: transparent;
  }
}

@keyframes dark {
  from {
    border-color: var(--line);
  }
}

@keyframes drawn {
  from {
    transform: scaleX(0);
  }
}

@keyframes cut {
  from {
    border-top-color: var(--ink-dim);
  }
}

@keyframes dimmed {
  from {
    color: var(--ink);
  }
}

@keyframes reached {
  from {
    border-color: var(--ink-bright);
  }
}

@keyframes acting {
  to {
    border-color: var(--line-strong);
  }
}

@keyframes frame-acting {
  to {
    color: var(--ink-2);
  }
}

@keyframes frame-reached {
  from {
    color: var(--ink-bright);
  }
}

@keyframes held-in {
  from {
    opacity: 0;
    transform: translateX(calc(-1 * var(--s3)));
  }
}

@keyframes said-in {
  from {
    opacity: 0;
    transform: translateY(var(--s1));
  }
}

/* The close beside the phone comes in as the phone does: each arc grows out of its middle, then the cross is drawn,
   one stroke after the other, then its word. */
@keyframes close-arc {
  from {
    stroke-dasharray: 0 50 0 100;
  }
}

/* Not there at all until it is drawn: a stroke of no length still shows its round ends. */
@keyframes close-cross {
  from {
    stroke-dasharray: 0 0 0 2;
    stroke-opacity: 0;
  }
  1% {
    stroke-opacity: 1;
  }
}

@keyframes close-word {
  from {
    opacity: 0;
    transform: translateX(calc(-1 * var(--s2)));
  }
}

@keyframes cue-in {
  from {
    opacity: 0;
    transform: translateY(calc(-1 * var(--s2)));
  }
}

@keyframes shine {
  to {
    transform: translateX(120%);
  }
}

/* Coming in with the page: not an event of the run, and gone with reduced motion. */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(var(--rise));
  }
}

@keyframes orb-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

@keyframes stamp-in {
  from {
    opacity: 0;
    transform: rotate(var(--stamp-tilt)) scale(1.8);
  }
}

@keyframes verdict-in {
  from {
    opacity: 0;
    transform: scale(1.3);
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
}

@keyframes drawer-in {
  from {
    transform: translateX(100%);
  }
}

@keyframes mark-in {
  from {
    stroke-dashoffset: 1;
  }
}

@keyframes breathe {
  to {
    opacity: 0.45;
  }
}

@keyframes scan {
  to {
    transform: scale(0.9);
    opacity: 0.6;
  }
}

/* The phone rises into view, solid well before it stops: it is never seen through. */
@keyframes phone-in {
  from {
    opacity: 0;
    transform: translateY(var(--s9));
  }
  30% {
    opacity: 1;
  }
}

.doc--revoked {
  animation: dark 0.4s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .panel[aria-busy="true"] > .panel__head::after {
    background: none;
    border-top: var(--hair) dashed var(--ink-dim);
  }
}
