/* Actor boards (site/demo/rm, site/demo/gs), drawn by board.js.
   Design rules: apps/demonstrator/DESIGN.md. Colour is state (green, red, amber) or the
   signer's group (violet authority, blue actor), position is actor, shape is the kind of
   asset, line style is the relation. */
:root{
  --petrol:#00556E; --cyan:#00AFF0; --red:#D2001E;
  --paper:#FFFFFF; --raise:#FFFFFF; --wash:#F3F5F6; --wallet:#F4F7F2; --line:#DADEE1;
  --ink:#14232A; --muted:#56656D; --soft:#8A979E;
  --ok:#1B7A47; --ok-wash:#E7F4EC; --bad:#C8102E; --bad-wash:#FCEBEE;
  --unk:#9A5B00; --unk-wash:#FFF3DC; --off:#8A979E; --off-wash:#F3F5F6; --on-petrol:#FFFFFF;
  --v-ok:#1B7A47; --v-bad:#C8102E; --v-unk:#8A5300; --v-busy:#56656D;
  /* Who signs: an authority (grants or recognizes) or an actor (works under a grant). */
  --g-auth:#6A4C9C; --g-act:#2D6CB5;
  --hatch:repeating-linear-gradient(135deg, transparent 0 7px, rgba(86,101,109,.09) 7px 14px);
  --s1:.25rem; --s2:.5rem; --s3:.75rem; --s4:1rem; --s5:1.5rem; --s6:2rem; --s7:3rem;
  --radius:10px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){ --g-auth:#B79CF2; --g-act:#7FB2F0; --paper:#0E1A1F; --raise:#132228; --wash:#16262D; --wallet:#15261F; --line:#2A3B43; --ink:#E6ECEE; --muted:#A3B2B8; --soft:#7D8E95; --petrol:#0A6A86;
    --ok:#52C98C; --ok-wash:#10291C; --bad:#FF6B7D; --bad-wash:#35161C; --unk:#F2B84B; --unk-wash:#33260E; --off:#7D8E95; --off-wash:#16262D;
    --hatch:repeating-linear-gradient(135deg, transparent 0 7px, rgba(163,178,184,.10) 7px 14px); }
}
:root[data-theme="dark"]{ --g-auth:#B79CF2; --g-act:#7FB2F0; --paper:#0E1A1F; --raise:#132228; --wash:#16262D; --wallet:#15261F; --line:#2A3B43; --ink:#E6ECEE; --muted:#A3B2B8; --soft:#7D8E95; --petrol:#0A6A86;
  --ok:#52C98C; --ok-wash:#10291C; --bad:#FF6B7D; --bad-wash:#35161C; --unk:#F2B84B; --unk-wash:#33260E; --off:#7D8E95; --off-wash:#16262D;
  --hatch:repeating-linear-gradient(135deg, transparent 0 7px, rgba(163,178,184,.10) 7px 14px); }
:root{ box-sizing:border-box; padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px); }
*,*::before,*::after{ box-sizing:inherit; }
/* The scrollbar's room is kept, so a step that scrolls does not shift the board sideways. */
html{ font-size:16px; -webkit-text-size-adjust:100%; scrollbar-gutter:stable; }
@media (min-width:64rem){ html{ font-size:17px; } }
@media (min-width:110rem){ html{ font-size:18px; } }
body{ margin:0; background:var(--paper); color:var(--ink); font:1rem/1.5 var(--sans); }
main{ max-width:92rem; margin:0 auto; padding:0 16px var(--s7); }
a{ color:inherit; text-underline-offset:3px; }
button, input, select{ font:inherit; color:inherit; }
:focus-visible{ outline:3px solid var(--cyan); outline-offset:2px; border-radius:4px; }
[hidden]{ display:none !important; }
.mono{ font-family:var(--mono); }

/* top bar */
.topbar{ border-bottom:1px solid var(--line); background:var(--paper); }
.topbar .in{ max-width:92rem; margin:0 auto; padding:var(--s2) 16px; display:flex; align-items:center; gap:var(--s4); }
.brand{ font-size:.9rem; text-decoration:none; white-space:nowrap; } .brand strong{ color:var(--red); }
.links{ display:flex; gap:var(--s1); margin-left:auto; flex-wrap:wrap; }
.links a{ text-decoration:none; font-weight:650; font-size:.9rem; padding:.35rem .8rem; border-radius:999px; color:var(--muted); }
.links a:hover{ background:var(--wash); color:var(--ink); }
.links a[aria-current="page"]{ background:var(--petrol); color:var(--on-petrol); }
@media (max-width:36rem){ .topbar .in{ flex-wrap:wrap; gap:var(--s1) var(--s3); } .topbar .links{ margin-left:0; flex:1 1 100%; } .topbar .links a{ padding:.3rem .65rem; font-size:.85rem; } }

/* story navigation */
.storynav{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--s3); padding:var(--s3) 0; border-bottom:1px solid var(--line); }
.parts{ display:flex; flex-wrap:wrap; gap:var(--s2); list-style:none; padding:0; margin:0; counter-reset:part; }
.parts li{ counter-increment:part; }
.parts button{ border:1px solid var(--line); background:var(--paper); color:var(--muted); font-size:.8rem; font-weight:600; padding:.25rem .55rem; border-radius:999px; cursor:pointer; white-space:nowrap; }
.parts button::before{ content:counter(part); margin-right:.35rem; color:var(--soft); font-variant-numeric:tabular-nums; }
.parts button:hover{ border-color:var(--muted); color:var(--ink); }
.parts button[aria-current="step"]{ background:var(--petrol); border-color:var(--petrol); color:var(--on-petrol); }
.parts button[aria-current="step"]::before{ color:#BFE3EE; }
.stepper{ display:flex; align-items:center; gap:var(--s2); }
.stepper span{ margin-right:var(--s1); font-size:.85rem; color:var(--muted); font-variant-numeric:tabular-nums; }
.stepper button{ border:1px solid var(--line); background:var(--paper); border-radius:8px; padding:.3rem .8rem; font-weight:650; cursor:pointer; white-space:nowrap; }
/* Wide screens: parts and stepper on one line. */
@media (min-width:64rem){
  .storynav{ flex-wrap:nowrap; padding:var(--s2) 0; }
  .parts{ flex-wrap:nowrap; min-width:0; overflow-x:auto; scrollbar-width:none; gap:var(--s1); }
}
.stepper #next{ background:var(--petrol); border-color:var(--petrol); color:var(--on-petrol); }
.stepper button:disabled{ opacity:.35; cursor:default; }

/* step header: one line of title and one sentence; the rest folds into "More". */
.stephead{ position:relative; padding:var(--s2) 0; display:grid; gap:var(--s1); }
.kicker{ margin:0; font-size:.82rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--petrol); }
h1{ margin:0; font-size:clamp(1.3rem, 1.1rem + .5vw, 1.6rem); line-height:1.25; font-weight:750; letter-spacing:-.01em; }
.acts{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--s2) var(--s3); margin:0; font-size:1.05rem; font-weight:650; min-height:1.7rem; }
.acts .arrow{ color:var(--muted); font-weight:400; }
.acts .who{ display:inline-flex; align-items:center; gap:var(--s2); }
.lead{ margin:0; font-size:1rem; line-height:1.45; color:var(--muted); }
/* "More" opens over what is below it: opening it moves nothing. */
.more{ display:inline; }
.more summary{ display:inline; cursor:pointer; font-weight:650; color:var(--petrol); list-style:none; }
.more summary::-webkit-details-marker{ display:none; }
.more summary::after{ content:" ▾"; font-size:.8em; }
.more[open] summary::after{ content:" ▴"; }
.more p{ position:absolute; z-index:30; right:0; left:0; margin:var(--s1) 0 0; padding:var(--s3) var(--s4); border:1px solid var(--line); border-radius:var(--radius); background:var(--raise); color:var(--ink); box-shadow:0 8px 24px rgba(0,0,0,.14); max-width:48rem; margin-left:auto; }
.legend code, .lede code, .map code{ font:600 .82rem var(--mono); color:var(--petrol); }
@media (min-width:64rem){
  /* Title and sentence on one line; each keeps one line, so the board starts at the same height. */
  .stephead{ grid-template-columns:auto minmax(0, 1fr); column-gap:var(--s5); align-items:baseline; }
  .stephead h1{ white-space:nowrap; }
  .stephead .lead{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .stephead .lead:has(.more[open]){ overflow:visible; }
}

/* monograms: level 3 */
.mono-badge{ flex:none; display:inline-grid; place-items:center; min-width:2.25rem; height:2.25rem; padding:0 .45rem; border-radius:999px; border:2px solid var(--ink); font:750 .78rem/1 var(--sans); letter-spacing:.02em; color:var(--ink); background:var(--paper); }
.mono-badge.sm{ min-width:1.7rem; height:1.7rem; padding:0 .35rem; font-size:.68rem; border-width:1.5px; }
.mono-badge.g-authority{ border-color:var(--g-auth); color:var(--g-auth); }
.mono-badge.g-actor{ border-color:var(--g-act); color:var(--g-act); }
.who-inline{ display:inline-flex; align-items:center; gap:.3rem; font-weight:700; color:var(--ink); }

/* placeholders: grey, dashed, hatched, never a state colour */
.placeholder{ border:2px dashed var(--soft); border-radius:var(--radius); background:var(--hatch), var(--wash); color:var(--ink); }
.placeholder .tag{ display:inline-block; font-size:.82rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
/* Under the board, so that showing it never moves the board. */
.band{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--s1) var(--s3); padding:.3rem var(--s4); margin:var(--s3) 0 0; font-size:.88rem; }
.band b{ font-weight:650; }
#presentation{ padding:var(--s4) var(--s5); margin:var(--s2) 0 var(--s4); }
#presentation p{ margin:0 0 var(--s2); max-width:60rem; }
table{ width:100%; border-collapse:collapse; font-size:.92rem; margin:var(--s2) 0 0; }
th{ text-align:left; font-size:.82rem; font-weight:700; color:var(--muted); border-bottom:1px solid var(--line); padding:var(--s1) var(--s2); }
td{ padding:var(--s2); border-bottom:1px solid var(--line); vertical-align:top; }

/* the board: one column per actor; rows line up across columns (subgrid) */
.board{ position:relative; display:grid; gap:var(--s4); }
.board > svg{ display:none; }
.col{ position:relative; min-width:0; display:flex; flex-direction:column; gap:var(--s2); padding:var(--s3); border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.col[data-actor="holder"]{ background:var(--wallet); }
.col[data-actor="verifier"]{ order:-1; }
.col.acting{ border-color:var(--petrol); box-shadow:0 0 0 2px var(--petrol); }
.col.dim > .actions{ opacity:.42; }
.col.absent{ display:none; }
body[data-mode="build"] .col.dim > .slot{ opacity:.42; }
.colhead{ display:grid; gap:.4rem; align-content:start; }
.colhead .name{ display:flex; align-items:center; gap:var(--s2); }
.colhead h2{ margin:0; font-size:1.15rem; line-height:1.2; font-weight:700; color:var(--ink); }
.colhead .does{ margin:0; font-size:.82rem; line-height:1.4; color:var(--muted); }
.pubs{ display:flex; flex-wrap:wrap; gap:var(--s1); }
.pub{ font-size:.82rem; line-height:1.2; padding:.15rem .5rem; border-radius:6px; border:1px solid var(--line); color:var(--muted); background:var(--paper); }
.pub.changed{ border-color:var(--petrol); background:var(--petrol); color:var(--on-petrol); }
.vh{ position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
/* Role pills sit on the column's top edge: hovering a credential moves nothing. */
.roles{ position:absolute; top:-.75rem; left:var(--s3); right:var(--s3); z-index:3; display:flex; flex-wrap:wrap; gap:var(--s1); pointer-events:none; }
.role{ font-size:.82rem; font-weight:700; padding:.1rem .5rem; border-radius:999px; background:var(--petrol); color:var(--on-petrol); }
.slot{ display:grid; gap:var(--s3); align-content:start; min-height:0; }
.slot:empty{ display:none; }
.actions{ display:flex; flex-wrap:wrap; gap:var(--s2); align-content:start; }
.actions:empty{ display:none; }
@media (min-width:64rem){
  /* The verifier's column spans every row; with the last row flexible, its height goes to
     that row only, so the credentials' rows keep their place from step to step. */
  .board{ grid-template-columns:repeat(var(--actors, 4), minmax(0, 1fr)) minmax(0, 1.5fr); grid-template-rows:auto auto auto 1fr; column-gap:var(--s4); row-gap:var(--s2); }
  .board > svg{ display:block; position:absolute; inset:0; width:100%; height:100%; pointer-events:none; overflow:visible; z-index:1; }
  /* A column's content never widens it: text wraps inside, so wrapping and heights stay put. */
  .col{ display:grid; grid-row:1 / span 4; grid-template-rows:subgrid; grid-template-columns:minmax(0, 1fr); order:0 !important; }
  .col[data-actor="verifier"]{ order:0; }
  .slot:empty{ display:grid; }
  .actions:empty{ display:flex; }
  .slot.r1{ grid-row:2; } .slot.r2{ grid-row:3; } .actions{ grid-row:4; }
  .colhead .does{ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; overflow:hidden; }
  /* Room for a citation between two credentials of the same actor (D → O). */
  .slot.r2, .slot.r3{ margin-top:1.75rem; }
  .board.rows-3{ grid-template-rows:repeat(4, auto) 1fr; }
  .board.rows-3 .col{ grid-row:1 / span 5; }
  .board.rows-3 .slot.r3{ grid-row:4; } .board.rows-3 .actions{ grid-row:5; }
  .col.absent{ display:grid; visibility:hidden; }
  .board .card.pending{ display:block; visibility:hidden; }
  /* On the board the lines show what a credential cites. */
  .card .cites{ display:none; }
  /* The verifier does not hold credentials: its verdict and settings flow on their own. */
  .col[data-actor="verifier"]{ display:flex; flex-direction:column; }
  .col[data-actor="verifier"] .slot{ grid-row:auto; }
}

/* assets: level 4. Grants standard, evidence tagged, the claim thicker. State is the border. */
.card{ position:relative; z-index:2; display:block; width:100%; text-align:left; background:var(--raise); color:var(--ink); border:2px solid var(--line); border-radius:var(--radius); padding:var(--s2) var(--s3); cursor:pointer; box-shadow:0 1px 3px rgba(0,0,0,.07); }
.card:hover{ border-color:var(--muted); }
.card.claim{ border-width:3.5px; }
/* The signer's group: a stripe on the card's left edge, inside the state border. */
.card.by-authority, .card.by-actor{ padding-left:calc(var(--s3) + 4px); }
.card.by-authority::before, .card.by-actor::before{ content:""; position:absolute; left:3px; top:5px; bottom:5px; width:4px; border-radius:2px; background:var(--g-auth); }
.card.by-actor::before{ background:var(--g-act); }

/* The top line may wrap and the state icon sits outside its flow, so a card lays out the same
   with or without the icon (a button grows to its widest unbreakable line). */
.card .top{ display:flex; flex-wrap:wrap; align-items:center; gap:.2rem var(--s2); padding-right:1.25rem; }
.code{ white-space:nowrap; font:700 .9rem/1 var(--mono); padding:.2rem .4rem; border-radius:5px; background:var(--wash); border:1px solid var(--line); }
.card .kind{ font-size:.95rem; font-weight:650; line-height:1.25; }
.card .kind .tag{ vertical-align:2px; white-space:nowrap; }
.card .icon{ position:absolute; top:.7rem; right:var(--s3); font-weight:800; font-size:1rem; line-height:1; }
/* The credential's own type, under its label. */
.card .type, code.type{ display:block; font:600 .76rem/1.3 var(--mono); color:var(--petrol); overflow-wrap:anywhere; }
.card .fact{ display:block; margin-top:var(--s1); font-size:.88rem; line-height:1.35; overflow-wrap:anywhere; }
.card .fact + .fact{ margin-top:0; }
.card .foot{ display:flex; flex-wrap:wrap; align-items:center; gap:.2rem .4rem; margin-top:var(--s2); padding-top:var(--s1); border-top:1px solid var(--line); font-size:.82rem; color:var(--muted); }
.tags{ display:flex; flex-wrap:wrap; gap:var(--s1); margin-top:var(--s1); }
.card .tag{ line-height:1.25; }
/* A card keeps a line for its tags, so a tag that comes or goes does not move the row below. */
.card .tags{ min-height:calc(.82rem * 1.25 + .1rem + 2px); }
.tag{ font-size:.82rem; font-weight:700; padding:.05rem .45rem; border-radius:999px; border:1px solid var(--line); color:var(--muted); }
.tag.t-bad{ border-color:var(--bad); color:var(--bad); }
.tag.t-new{ border-color:var(--petrol); background:var(--petrol); color:var(--on-petrol); }
.tag.t-live{ border-color:var(--petrol); color:var(--petrol); }
/* Seven columns at laptop width: smaller tags, so "beyond the root" stays on one line and
   no row grows when evaluation starts. */
@media (max-width: 90rem){
  .board:not(.vertical) .card .tag{ font-size:.72rem; padding:.05rem .35rem; }
  .board:not(.vertical) .card .tags{ min-height:calc(.72rem * 1.25 + .1rem + 2px); }
}
.card.s-established{ border-color:var(--ok); } .card.s-established .icon{ color:var(--ok); }
.card.s-contradicted{ border-color:var(--bad); background:var(--bad-wash); } .card.s-contradicted .icon{ color:var(--bad); }
.card.s-not_established{ border-color:var(--unk); background:var(--unk-wash); } .card.s-not_established .icon{ color:var(--unk); }
.card.missing{ border-style:dashed; box-shadow:none; }
.card.fresh{ border-color:var(--petrol); box-shadow:0 0 0 3px var(--petrol); }
.card.cited{ box-shadow:0 0 0 3px var(--paper), 0 0 0 5px var(--petrol); }
/* Not issued yet: holds its place on wide screens, invisible (board.js). */
.card.pending{ display:none; }
.card.selected{ outline:3px solid var(--cyan); outline-offset:3px; }
.card.empty{ cursor:default; border-style:dashed; color:var(--muted); background:transparent; box-shadow:none; }
@media (prefers-reduced-motion: no-preference){ .card.handover{ animation:handover .3s ease-out; } }
@keyframes handover{ from{ transform:translateX(-24px); opacity:0; } to{ transform:none; opacity:1; } }

/* the wallet: what the holder has */
.wallet{ display:grid; gap:var(--s2); }
.object{ display:inline-flex; align-items:center; gap:var(--s2); justify-self:start; padding:.3rem .8rem; border-radius:999px; border:1.5px solid var(--muted); background:var(--paper); font-size:.95rem; font-weight:650; }
.object::before{ content:"◼"; color:var(--muted); }
.wallet .refs{ margin:0; font-size:.82rem; color:var(--muted); }
.wallet .refs s{ color:var(--unk); }

/* actions: buttons in the actor's own column */
.act{ border:1.5px solid var(--ink); background:var(--paper); color:var(--ink); border-radius:8px; padding:.4rem .75rem; font-size:.9rem; font-weight:650; cursor:pointer; }
.act[aria-pressed="true"]{ background:var(--ink); color:var(--paper); }
.act:disabled{ opacity:.45; cursor:not-allowed; border-style:dashed; }
.seg{ display:grid; grid-auto-flow:column; grid-auto-columns:1fr; border:1px solid var(--line); border-radius:8px; overflow:hidden; width:100%; }
.seg button{ border:0; background:var(--paper); padding:.35rem .4rem; font-size:.88rem; cursor:pointer; line-height:1.2; }
.seg button small{ display:block; font-size:.82rem; color:var(--muted); }
.seg button[aria-pressed="true"]{ background:var(--ink); color:var(--paper); font-weight:650; }
.seg button[aria-pressed="true"] small{ color:var(--paper); opacity:.85; }
.seg button + button{ border-left:1px solid var(--line); }
.seg button:disabled{ cursor:not-allowed; }
.seg.locked{ opacity:.45; border-style:dashed; }
/* Four choices with two-line labels (the verifier's roots): two by two in a narrow column. */
.col .seg:has(> button:nth-child(4) small){ grid-auto-flow:row; grid-template-columns:repeat(2, minmax(0, 1fr)); }
.col .seg:has(> button:nth-child(4) small) button:nth-child(3){ border-left:0; }
.col .seg:has(> button:nth-child(4) small) button:nth-child(n+3){ border-top:1px solid var(--line); }
.field{ display:grid; gap:.2rem; width:100%; }
.field > span{ font-size:.82rem; font-weight:700; color:var(--muted); }
.custom{ display:grid; grid-template-columns:1fr 1fr; gap:var(--s2); width:100%; }
.custom label{ display:grid; gap:.15rem; font-size:.82rem; font-weight:700; color:var(--muted); }
.custom input, .custom select{ width:100%; padding:.3rem .4rem; border:1px solid var(--line); border-radius:6px; background:var(--paper); font:.95rem var(--mono); color:var(--ink); }
.custom .act{ align-self:end; }
.limit{ margin:0; font-size:.82rem; color:var(--muted); }
.limit b{ color:var(--ink); }

/* verdict: level 1. The six questions: level 6. */
.verdict{ display:flex; gap:var(--s3); align-items:center; border-radius:var(--radius); padding:var(--s3) var(--s4); color:#fff; background:var(--v-ok); }
.verdict.reject{ background:var(--v-bad); } .verdict.unknown{ background:var(--v-unk); } .verdict.busy{ background:var(--v-busy); }
.verdict.idle{ background:var(--hatch), var(--wash); color:var(--ink); border:2px dashed var(--soft); }
.verdict .mark{ flex:none; width:2.4rem; height:2.4rem; border-radius:50%; background:#fff; display:grid; place-items:center; font-size:1.2rem; font-weight:800; color:var(--v-ok); }
.verdict.reject .mark{ color:var(--v-bad); } .verdict.unknown .mark{ color:var(--v-unk); } .verdict.busy .mark{ color:var(--v-busy); }
.verdict.idle .mark{ color:var(--muted); background:var(--paper); border:1.5px solid var(--soft); }
.verdict b{ display:block; font-size:1.5rem; line-height:1.2; font-weight:750; }
.verdict small{ display:block; margin-top:var(--s1); font-size:1rem; line-height:1.35; overflow-wrap:anywhere; }
.questions{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--s2); }
.q{ border-radius:8px; background:var(--off-wash); border-left:5px solid var(--off); }
.q.s-established{ background:var(--ok-wash); border-left-color:var(--ok); }
.q.s-contradicted{ background:var(--bad-wash); border-left-color:var(--bad); }
.q.s-not_established{ background:var(--unk-wash); border-left-color:var(--unk); }
.q summary{ list-style:none; cursor:pointer; padding:.35rem var(--s3); display:flex; flex-wrap:wrap; justify-content:space-between; gap:0 var(--s2); }
.q summary::-webkit-details-marker{ display:none; }
.q summary b{ font-size:.9rem; font-weight:650; }
.q[open]{ grid-column:1 / -1; }
.state{ font-size:.9rem; font-weight:700; white-space:nowrap; }
.st-established{ color:var(--ok); } .st-contradicted{ color:var(--bad); } .st-not_established{ color:var(--unk); }
.st-not_asked, .st-not_required{ color:var(--muted); }
.why{ margin:0 var(--s3) var(--s2); font-size:.9rem; overflow-wrap:anywhere; }

/* lines: solid = authority, dotted = evidence, dashed grey = handed over */
.edge{ fill:none; stroke-width:3; }
.edge.support{ stroke-dasharray:2 6; stroke-linecap:round; stroke-width:4; }
/* A recognition (RecognitionPolicy) grants no authority: dash-dot, never solid. */
.edge.recognition{ stroke-dasharray:14 5 3 5; }
.edge.handover{ stroke:var(--soft); stroke-dasharray:8 6; stroke-width:2; }
/* An evaluated line is thicker than a grey one, so its colour reads at a glance. */
.edge.e-established, .edge.e-not_required{ stroke:var(--ok); stroke-width:4.5; } .edge.e-unused{ stroke:var(--soft); stroke-width:2.5; }
.edge.e-contradicted{ stroke:var(--bad); stroke-width:4.5; } .edge.e-not_established{ stroke:var(--unk); stroke-width:4.5; }
.edge.support.e-established, .edge.support.e-contradicted, .edge.support.e-not_established{ stroke-width:5; }
.edge.e-plain{ stroke:var(--soft); }
/* The click target of a line that can leave its credential out: wide, invisible. */
/* In a build step, a new line names its field (termsOfUse, evidence). */
.edge-label{ font:600 .74rem var(--mono); fill:var(--petrol); text-anchor:middle; dominant-baseline:middle; paint-order:stroke; stroke:var(--paper); stroke-width:5px; stroke-linejoin:round; }
.edge-label .f{ font-weight:500; fill:var(--muted); }
.edge-hit{ fill:none; stroke:transparent; stroke-width:18; pointer-events:stroke; cursor:pointer; }
.edge-hit:hover{ stroke:rgba(0,85,110,.14); }
/* The key sits under the board (beside it in the vertical layout): the board starts higher. */
.legend{ margin:var(--s3) 0 0; font-size:.82rem; color:var(--muted); }
.legend{ display:flex; flex-wrap:wrap; gap:.15rem 1rem; }
.legend > span{ white-space:nowrap; }
.legend .g{ display:inline-block; width:.8rem; height:.8rem; border-radius:3px; vertical-align:-1px; margin-right:.35rem; background:var(--g-auth); }
.legend .g.ga{ background:var(--g-act); }
.legend b{ color:var(--ink); font-weight:650; }
.legend i{ display:inline-block; width:2rem; height:0; vertical-align:middle; margin-right:.35rem; border-top:3px solid var(--soft); }
.legend i.dot{ border-top-style:dotted; } .legend i.dash{ border-top:2px dashed var(--soft); }
.legend i.rec{ border-top:none; height:3px; background:repeating-linear-gradient(90deg, var(--soft) 0 12px, transparent 12px 16px, var(--soft) 16px 18px, transparent 18px 22px); }

dialog{ border:0; border-radius:14px; width:min(46rem, 100%); padding:var(--s4) var(--s5) var(--s5); background:var(--paper); color:var(--ink); max-height:86vh; }
dialog::backdrop{ background:rgba(0,20,26,.45); }
dialog h2{ margin:0 0 var(--s3); font-size:1.15rem; }
dialog .close{ float:right; border:1px solid var(--line); background:var(--paper); border-radius:8px; padding:.3rem .7rem; cursor:pointer; }
.map{ display:grid; grid-template-columns:8.5rem 1fr; gap:var(--s1) var(--s3); margin:0 0 var(--s3); font-size:.95rem; }
.map dt{ color:var(--muted); font-size:.85rem; padding-top:.15rem; } .map dd{ margin:0; overflow-wrap:anywhere; }
details.raw summary{ cursor:pointer; font-weight:600; padding:var(--s2) 0; font-size:.9rem; }
pre{ font:.78rem/1.45 var(--mono); background:var(--wash); padding:var(--s4); border-radius:8px; overflow-x:auto; max-height:24rem; margin:0; }

footer{ margin-top:var(--s6); border-top:1px solid var(--line); padding-top:var(--s4); font-size:.82rem; color:var(--muted); }
footer p{ margin:var(--s1) 0; max-width:60rem; }

/* panel pages (a step's `panel`): drawn instead of the board, nothing evaluated.
   Neutral: no state colours; direction is shown by arrow shape and line style. */
.panel{ display:grid; gap:var(--s4); margin:var(--s2) 0 var(--s4); }
.panel > .tag{ justify-self:start; }
.panel .tag{ display:inline-block; font-size:.82rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.panel h3{ margin:0 0 var(--s2); font-size:1.05rem; line-height:1.3; font-weight:700; color:var(--ink); }
.panel ul{ margin:0; padding-left:1.1rem; display:grid; gap:var(--s1); }
.panel .term{ font-family:var(--mono); font-size:.86rem; color:var(--ink); background:var(--wash); border-radius:4px; padding:0 .3rem; white-space:nowrap; }
.panel .src{ font-size:.82rem; color:var(--muted); }
/* The opening page (rm/config.js credential): the chain on one wide graph, the design rules
   under it as chips (hovering one lights its numbers on the links), and folds for the rest. */
.credpage{ display:grid; gap:var(--s3); }
.credfig{ margin:0; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper); padding:var(--s2) var(--s3); }
.credfig svg{ display:block; width:100%; height:auto; max-height:calc(100vh - 17rem); }
.credfig text{ font-family:var(--sans); font-size:15px; fill:var(--ink); }
.credfig text.b{ font-weight:700; font-size:16px; }
.credfig text.s{ font-size:13.5px; fill:var(--muted); }
.credfig text.code{ font:700 14px var(--mono); }
.credfig text.type{ font:600 13px var(--mono); fill:var(--petrol); }
.credfig text.kindt{ font-size:12px; font-weight:700; fill:var(--ink); }
.credfig text.lf{ font:700 13.5px var(--mono); fill:var(--petrol); }
.credfig text.lm{ font:13px var(--mono); fill:var(--muted); }
.credfig text.mkn{ font-size:12px; font-weight:800; fill:var(--paper); }
.credfig .nb{ fill:var(--raise); stroke:var(--line); stroke-width:2; }
.credfig .nb.claim{ stroke:var(--ink); stroke-width:3.5; }
.credfig .nb.plain{ stroke-dasharray:6 4; }
.credfig .chip{ fill:var(--wash); stroke:var(--line); }
.credfig .g-authority{ fill:var(--g-auth); } .credfig .g-actor{ fill:var(--g-act); }
.credfig .kind{ fill:none; stroke:var(--muted); stroke-width:1.2; }
.credfig .kind.k-recognition{ stroke-dasharray:4 3; }
.credfig .ln{ fill:none; stroke:var(--muted); stroke-width:2.2; }
.credfig .ln.dot{ stroke-dasharray:2 5; stroke-linecap:round; stroke-width:3; }
.credfig .ln.rec{ stroke-dasharray:12 4 2 4; }
.credfig .ah{ fill:var(--muted); }
.credfig .mk circle{ fill:var(--soft); transition:fill .15s; }
.credfig figcaption{ font-size:.82rem; color:var(--muted); padding-top:var(--s1); }
.credfig figcaption .g, .credpage .g{ display:inline-block; width:.8rem; height:.8rem; border-radius:3px; vertical-align:-1px; background:var(--g-auth); }
.credfig figcaption .g.ga{ background:var(--g-act); margin-left:.4rem; }
.rulechips{ list-style:none; margin:0; padding:0; display:grid; gap:var(--s2); grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr)); }
.rulechip{ border:1px solid var(--line); border-radius:8px; padding:.35rem .6rem; font-size:.86rem; line-height:1.35; color:var(--muted); cursor:default; }
.rulechip b{ color:var(--ink); }
.rulechip .n{ display:inline-grid; place-items:center; width:1.35rem; height:1.35rem; margin-right:.35rem; border-radius:50%; background:var(--soft); color:var(--paper); font-size:.75rem; font-weight:800; }
.rulechip:hover, .rulechip:focus-visible{ border-color:var(--petrol); }
.rulechip:hover .n, .rulechip:focus-visible .n{ background:var(--petrol); }
.credpage:has(.rulechip[data-r="1"]:is(:hover, :focus-visible)) .mk.r1 circle,
.credpage:has(.rulechip[data-r="2"]:is(:hover, :focus-visible)) .mk.r2 circle,
.credpage:has(.rulechip[data-r="3"]:is(:hover, :focus-visible)) .mk.r3 circle,
.credpage:has(.rulechip[data-r="4"]:is(:hover, :focus-visible)) .mk.r4 circle,
.credpage:has(.rulechip[data-r="5"]:is(:hover, :focus-visible)) .mk.r5 circle,
.credpage:has(.rulechip[data-r="6"]:is(:hover, :focus-visible)) .mk.r6 circle,
.credpage:has(.rulechip[data-r="7"]:is(:hover, :focus-visible)) .mk.r7 circle,
.credpage:has(.rulechip[data-r="8"]:is(:hover, :focus-visible)) .mk.r8 circle{ fill:var(--petrol); }
/* A fold: secondary detail, closed until asked for. */
details.fold{ border:1px solid var(--line); border-radius:var(--radius); padding:var(--s2) var(--s3); background:var(--paper); }
details.fold > summary{ cursor:pointer; font-weight:650; }
details.fold[open] > summary{ margin-bottom:var(--s3); }
/* Start page: the credential drawn (left) and the design rules (right). */
.rulespage{ display:grid; gap:var(--s4); align-items:start; }
.vcfig{ margin:0; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper); padding:var(--s3); }
.vcfig svg{ display:block; width:100%; height:auto; max-height:62vh; }
.vcfig text{ font-family:var(--sans); font-size:15px; fill:var(--ink); }
.vcfig text.b{ font-weight:700; }
.vcfig text.s{ font-size:13px; fill:var(--muted); }
.vcfig text.m{ font-family:var(--mono); font-size:13px; fill:var(--muted); }
.vcfig text.m2{ font-family:var(--mono); }
.vcfig .nb{ fill:var(--raise); stroke:var(--line); stroke-width:1.5; }
.vcfig .vc{ fill:var(--raise); stroke:var(--ink); stroke-width:2.5; }
.vcfig .ln{ stroke:var(--ink); stroke-width:2; }
.vcfig .ln.dot{ stroke-dasharray:2 5; stroke-linecap:round; stroke-width:3; }
.vcfig .ah{ fill:var(--ink); }
.rules{ border:1px solid var(--line); border-radius:var(--radius); padding:var(--s3) var(--s4); background:var(--paper); }
.rules ol{ margin:0; padding-left:1.4rem; display:grid; gap:var(--s2); font-size:1.02rem; line-height:1.4; }
.rules li b{ font-weight:700; }
.rules .terms{ white-space:normal; }
.rules .src{ margin:var(--s3) 0 0; }
.proposal{ display:grid; gap:var(--s4); }
.proposal .compare th{ font-size:.86rem; }
.proposal .compare thead th{ font-size:.95rem; color:var(--ink); }
.proposal .compare tbody th{ width:14rem; color:var(--ink); font-weight:650; font-size:.95rem; border-bottom:1px solid var(--line); vertical-align:top; padding:var(--s2); }
.proposal .compare td{ font-size:.98rem; }
.proposal .compare td.ours{ background:var(--wash); }
.proposal .boxes{ display:grid; gap:var(--s4); }
.proposal .boxes section{ border:1px solid var(--line); border-radius:var(--radius); padding:var(--s3) var(--s4); }
.proposal .boxes section.open{ border-style:dashed; }
.panel .limit{ margin:0; font-size:.82rem; color:var(--muted); }
/* The opening page: a credential's parts (rm/config.js anatomy) */
.anatomy{ display:grid; gap:var(--s4); }
.anatomy q{ quotes:"“" "”"; color:var(--ink); }
.taxonomy{ font-size:.95rem; }
.taxonomy thead th{ font-size:.86rem; color:var(--ink); }
.taxonomy tbody th{ width:13rem; vertical-align:top; padding:var(--s2); border-bottom:1px solid var(--line); text-align:left; }
.taxonomy tbody th code{ font:600 .95rem var(--mono); color:var(--petrol); }
.taxonomy tbody th small{ display:block; font-size:.78rem; font-weight:400; color:var(--muted); }
.taxonomy td{ vertical-align:top; }
.taxonomy td code{ font:600 .88rem var(--mono); }
.taxonomy tr.group th{ padding:var(--s3) var(--s2) var(--s1); font-size:.8rem; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); border-bottom:1px solid var(--line); }
.taxonomy tr.star th, .taxonomy tr.star td{ background:var(--wash); }
.taxonomy tr.star th{ box-shadow:inset 4px 0 0 var(--petrol); }
.why h3{ margin:0 0 var(--s2); font-size:1.15rem; }
.why .three{ display:grid; gap:var(--s4); }
.why .three > div{ border:1px solid var(--line); border-radius:var(--radius); padding:var(--s3) var(--s4); }
.why h4{ margin:0 0 var(--s2); font-size:1rem; color:var(--petrol); }
.why p, .why li{ font-size:.95rem; line-height:1.45; }
.why p{ margin:0 0 var(--s2); }
.why ul{ margin:0 0 var(--s2); padding-left:1.1rem; display:grid; gap:var(--s1); }
.why code, .reconcile code{ font:600 .85rem var(--mono); color:var(--petrol); }
/* The reconciliation page (rm/config.js reconcile) */
.reconcile .lede{ font-size:1.1rem; }
.reconcile .pair{ display:grid; gap:var(--s4); align-items:start; }
.reconcile .json{ margin:0; }
.reconcile .json figcaption{ font-size:.82rem; font-weight:700; color:var(--muted); margin-bottom:var(--s1); }
.reconcile .json pre{ max-height:none; font-size:.78rem; }
.reconcile h3{ margin:0 0 var(--s2); font-size:1.05rem; }
.chainmap{ display:grid; grid-template-columns:4.5rem 1fr; gap:var(--s2) var(--s3); margin:0; font-size:.95rem; line-height:1.4; }
.chainmap dt{ font:700 .95rem var(--mono); }
.chainmap dd{ margin:0; }
.reconcile .def ol{ margin:0; padding-left:1.3rem; display:grid; gap:var(--s1); font-size:.95rem; line-height:1.4; }
@media (min-width:64rem){
  .rulespage{ grid-template-columns:minmax(0, 1.15fr) minmax(0, 1fr); }
  .proposal .boxes{ grid-template-columns:1fr 1fr; }
  .why .three{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .reconcile .pair{ grid-template-columns:minmax(0, 1fr) minmax(0, 1.1fr); }
  /* More than four actors: a narrower verifier column, and a name may drop below its monogram. */
  .board.many{ grid-template-columns:var(--cols, repeat(var(--actors, 5), minmax(0, 1fr)) minmax(0, 1.3fr)); column-gap:var(--s3); }
  .board.many .colhead .name{ flex-wrap:wrap; row-gap:var(--s1); }
  /* Actors keep their description on every step (the rows must not move). The verifier's column
     is outside those rows: once it decides, the room goes to the verdict. */
  body:not([data-mode="build"]) .col[data-actor="verifier"] .colhead .does{ display:none; }
}

/* the Terms button, in the top bar beside the page links */
.links .terms{ border:1px solid var(--line); background:var(--paper); color:var(--ink); border-radius:999px; padding:.3rem .8rem; font-size:.9rem; font-weight:650; cursor:pointer; }

/* explaining a credential or a link (the sheet on the board, the side in the vertical layout) */
/* One column that never widens: a long line of signed bytes scrolls inside its own box. */
.detail, .explain-list{ display:grid; grid-template-columns:minmax(0, 1fr); gap:var(--s2); min-width:0; }
.detail h3{ margin:var(--s2) 0 0; font-size:.8rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
/* Folding sections: only "What it says" is open at first. */
details.sec{ border-top:1px solid var(--line); padding-top:var(--s1); }
details.sec > summary{ list-style:none; cursor:pointer; display:flex; align-items:center; gap:var(--s2); }
details.sec > summary::-webkit-details-marker{ display:none; }
details.sec > summary h3{ margin:var(--s1) 0; }
details.sec > summary::before{ content:"▸"; color:var(--muted); font-size:.8rem; }
details.sec[open] > summary::before{ content:"▾"; }
details.sec > :not(summary){ margin-top:var(--s1); }
.dhead{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--s2); font-size:1.1rem; }
.dhead .verb{ font-weight:650; color:var(--petrol); }
.dhead code.type{ display:inline; }
.dhead .state{ margin-left:auto; }
button.code{ cursor:pointer; color:var(--ink); }
.lede{ margin:0; font-size:.98rem; line-height:1.45; }
.none, .hint{ margin:0; font-size:.88rem; color:var(--muted); }
.qhead{ margin:var(--s1) 0 0; display:flex; gap:var(--s2); align-items:baseline; font-size:.92rem; }
.linklist, .checks, .trace{ margin:0; padding:0; list-style:none; display:grid; gap:var(--s1); }
.linkbtn{ border:1px solid var(--line); background:var(--paper); color:var(--ink); border-radius:999px; padding:.15rem .65rem; cursor:pointer; font-size:.92rem; text-align:left; }
.linkbtn:hover{ border-color:var(--petrol); }
.linkbtn b{ font-family:var(--mono); }
.linkbtn code{ font:600 .78rem var(--mono); color:var(--petrol); }
.checks li{ position:relative; padding-left:1.2rem; font-size:.92rem; line-height:1.4; }
.checks li::before{ content:"→"; position:absolute; left:0; color:var(--muted); }
.trace li{ display:grid; grid-template-columns:1.2rem minmax(0, 1fr); gap:var(--s1); font-size:.86rem; line-height:1.35; overflow-wrap:anywhere; }
.trace code{ display:block; font:.72rem/1.3 var(--mono); color:var(--muted); }
.q .trace{ margin:0 var(--s3) var(--s2); }
.gloss{ grid-template-columns:11rem 1fr; }
article.explain{ border:1px solid var(--line); border-radius:var(--radius); padding:var(--s3); display:grid; gap:var(--s2); background:var(--raise); }
#sheetContent .raw pre{ max-height:18rem; }

/* The vertical layout (rm/vertical.html): the step and the policy check on the left, the
   chain top to bottom in the middle, the selected credential on the right. The graph stays
   in one place: compact cards, and the middle column sticks while the page scrolls. */
.vcols{ display:grid; gap:var(--s4); }
.vleft{ display:grid; gap:var(--s3); align-content:start; min-width:0; }
.vleft .stephead{ padding:0; display:grid; grid-template-columns:minmax(0, 1fr); gap:var(--s2); }
.vleft .stephead > *, .vleft .stephead .lead{ grid-column:1; grid-row:auto; align-self:start; }
.vleft .stephead h1{ font-size:1.55rem; min-height:0; display:block; }
.vleft .stephead .lead{ font-size:1rem; }
.vleft .legend{ margin:0; display:grid; gap:.2rem; }
/* What the other parties can do in an evaluated step: their live controls, under their monogram. */
.doers{ display:grid; gap:var(--s2); padding-top:var(--s2); border-top:1px solid var(--line); }
.doers h3{ margin:0; font-size:.8rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.doer{ display:grid; gap:var(--s1); }
.doer .who{ display:flex; align-items:center; gap:var(--s2); font-weight:650; font-size:.92rem; }
/* The lanes show the chain only: no wallet text. */
.flow .wallet .refs{ display:none; }
.vcheck{ display:grid; gap:var(--s2); padding:var(--s3); border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.vcheck .settings{ display:grid; gap:var(--s2); }
.vcheck .questions{ grid-template-columns:1fr 1fr; }
.vmain{ display:grid; gap:var(--s3); min-width:0; align-content:start; }
.board.vertical{ display:grid; gap:var(--s4); }
.flow{ position:relative; display:grid; gap:var(--s3); min-width:0; }
.flow > svg{ display:none; }
.lane{ position:relative; display:grid; gap:var(--s2); padding:var(--s3) var(--s4); border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.lane[data-lane="hold"]{ background:var(--wallet); }
.lane.acting{ border-color:var(--petrol); box-shadow:0 0 0 2px var(--petrol); }
.lane.absent{ display:none; }
/* Two lanes in one row (the two roots): stacked on narrow screens, side by side on wide. */
.lanerow{ display:contents; }
/* Hovering a credential tags the lanes it touches, as on the board: on the top edge, so no lane grows. */
.lane > .roles{ left:var(--s4); right:var(--s4); }
.lane.dim > .lanehead .actions{ opacity:.42; }
body[data-mode="build"] .lane.dim .cells{ opacity:.42; }
.lanehead{ display:grid; gap:.3rem; align-content:start; }
.lanehead .verb{ margin:0; font-size:.74rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--petrol); }
.lanehead .name{ display:flex; align-items:center; gap:var(--s2); }
.lanehead .mono-badge{ min-width:1.9rem; height:1.9rem; font-size:.68rem; padding:0 .35rem; }
.lanehead h2{ margin:0; font-size:.95rem; line-height:1.2; font-weight:700; }
.lanehead .pubs:empty{ display:none; }
.cells{ display:grid; gap:var(--s2); }
/* Cards in the lanes, as on the opening graph: the code, the name, the type, who signs it
   about whom, and the tags, in smaller type; the content opens in the sheet. */
.flow .card{ padding:var(--s1) var(--s2); }
.flow .card.by-authority, .flow .card.by-actor{ padding-left:calc(var(--s2) + 6px); }
.flow .card .code{ font-size:.76rem; padding:.15rem .35rem; }
.flow .card .kind{ font-size:.86rem; line-height:1.2; }
.flow .card .type{ font-size:.68rem; }
.flow .card .tag{ font-size:.72rem; }
.flow .card .tags{ min-height:calc(.72rem * 1.25 + .1rem + 2px); }
.flow .card .icon{ top:.5rem; font-size:.9rem; }
.flow .card .fact, .flow .card .foot{ display:none; }
/* Who signs it about whom: on lane cards only (the board's columns and footers say it). */
.card .sig{ display:none; margin-top:.15rem; font-size:.74rem; color:var(--muted); }
.card .sig b{ font-weight:750; color:var(--ink); }
.card .sig b.g-authority{ color:var(--g-auth); } .card .sig b.g-actor{ color:var(--g-act); }
.flow .card .sig{ display:block; }
.sidehead{ margin:0; display:flex; align-items:center; gap:var(--s2); font-size:1.05rem; }
/* What a credential says (cfg.content), laid out for reading. */
.says{ display:grid; gap:var(--s2); }
.says .kv{ display:grid; grid-template-columns:8rem 1fr; gap:var(--s1) var(--s3); margin:0; font-size:.95rem; }
.says .kv dt{ color:var(--muted); font-size:.85rem; padding-top:.1rem; }
.says .kv dd{ margin:0; overflow-wrap:anywhere; }
.says table{ font-size:.9rem; margin:0; }
.says td.num, .says th.num{ text-align:right; font-variant-numeric:tabular-nums; }
.says tr.sel td{ background:var(--wash); font-weight:650; }
.says .records{ display:grid; gap:var(--s2); margin:0; padding:0; list-style:none; }
.says .records li{ border:1px solid var(--line); border-radius:8px; padding:var(--s2) var(--s3); font-size:.92rem; line-height:1.4; }
@media (min-width:64rem){
  .vcols{ grid-template-columns:minmax(17rem, 21rem) minmax(0, 1fr); column-gap:var(--s5); align-items:start; }
  /* The left column scrolls on its own: what it shows never moves the chain. */
  .vleft{ position:sticky; top:var(--s3); max-height:calc(100vh - 2 * var(--s3)); overflow-y:auto; overscroll-behavior:contain; padding-right:var(--s1); }
  .vleft .stephead h1{ white-space:normal; }
  .vleft .stephead .lead{ white-space:normal; overflow:visible; }
  /* A page step (the credential, the proposals) takes the full width. */
  body[data-mode="panel"] .vcols{ grid-template-columns:minmax(0, 1fr); }
  body[data-mode="panel"] .vleft{ position:static; max-height:none; overflow:visible; }
  body[data-mode="panel"] .vleft .stephead{ grid-template-columns:auto minmax(0, 1fr); column-gap:var(--s5); align-items:baseline; }
  body[data-mode="panel"] .vleft .stephead > *{ grid-column:auto; }
  .board.vertical{ grid-template-columns:minmax(0, 1fr); grid-template-rows:none; align-items:start; }
  /* Open space between the lanes: each link's name sits on its line in that space. */
  .flow{ gap:3.25rem; }
  .flow > svg{ display:block; position:absolute; inset:0; width:100%; height:100%; pointer-events:none; overflow:visible; z-index:1; }
  .board > svg.labels, .flow > svg.labels{ z-index:3; }
  .lane{ grid-template-columns:10.5rem minmax(0, 1fr); column-gap:var(--s4); }
  .lane.absent{ display:grid; visibility:hidden; }
  .lanerow{ display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); column-gap:var(--s4); align-items:stretch; }
  .lanerow > .lane:nth-child(1){ grid-column:1; } .lanerow > .lane:nth-child(2){ grid-column:2; }
  .lanerow .cells{ column-gap:0; }
  /* Cards of one width, either side of a wide middle gap (room for a link's name between
     two cards of one lane); a lone card sits in the middle. */
  .cells{ grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); column-gap:9rem; row-gap:var(--s2); }
  .cell{ width:min(100%, 19rem); }
  .cell.c1{ grid-column:1; justify-self:end; } .cell.c2{ grid-column:2; justify-self:start; }
  .cell.mid{ grid-column:1 / -1; justify-self:center; }
  .flow .card .cites{ display:none; }
}


/* A build step's line under the title: what it maps, and the issuer rules it applies. */
.maps{ grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:center; gap:var(--s1) var(--s2); margin:0; font-size:.88rem; color:var(--muted); }
.maps[hidden]{ display:none; }
.maps .qi b{ font-size:.75rem; letter-spacing:.06em; text-transform:uppercase; color:var(--petrol); margin-right:.3rem; }
.maps .rule{ display:inline-flex; align-items:center; gap:.3rem; border:1px solid var(--line); border-radius:999px; padding:.05rem .55rem .05rem .15rem; color:var(--ink); font-weight:600; cursor:help; }
.maps .rule .n{ display:inline-grid; place-items:center; width:1.2rem; height:1.2rem; border-radius:50%; background:var(--petrol); color:var(--on-petrol); font-size:.7rem; font-weight:800; }

/* Scenarios: one button each over the board; one click applies one. */
.scenarios{ margin:0 0 var(--s3); display:grid; gap:var(--s2); }
.scenarios[hidden]{ display:none; }
.scnbar{ display:flex; align-items:center; justify-content:space-between; gap:var(--s3); font-size:.85rem; color:var(--muted); }
.scnbar .reset{ border:1px solid var(--line); background:var(--paper); border-radius:8px; padding:.2rem .6rem; font-weight:650; color:var(--ink); cursor:pointer; white-space:nowrap; }
.scnbar .reset:disabled{ opacity:.4; cursor:default; }
.scnlist{ display:grid; gap:var(--s2); grid-template-columns:repeat(auto-fit, minmax(14rem, 1fr)); }
.scn{ display:grid; grid-template-columns:auto auto minmax(0, 1fr); column-gap:var(--s2); align-items:start; text-align:left; border:1.5px solid var(--line); border-radius:var(--radius); background:var(--paper); color:var(--ink); padding:var(--s2) var(--s3); cursor:pointer; font:inherit; }
.scn:hover{ border-color:var(--petrol); }
.scn[aria-pressed="true"]{ border-color:var(--ink); box-shadow:inset 0 0 0 1.5px var(--ink); background:var(--wash); }
.scn .scn-n{ font-weight:800; color:var(--soft); font-size:.9rem; padding-top:.3rem; }
.scn-body{ display:grid; gap:.15rem; min-width:0; }
.scn-body b{ font-size:.9rem; line-height:1.3; }
.scn-body small{ font-size:.78rem; line-height:1.35; color:var(--muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.likely{ display:inline-block; font-size:.66rem; font-weight:750; letter-spacing:.04em; text-transform:uppercase; border-radius:999px; padding:0 .4rem; border:1px solid var(--line); color:var(--muted); vertical-align:1px; }
.likely.l-everyday{ border-color:var(--ok); color:var(--ok); }
.likely.l-occasional{ border-color:var(--unk); color:var(--unk); }
.likely.l-rare{ border-color:var(--soft); color:var(--soft); border-style:dashed; }
/* The vertical layout's left column is narrow: the scenarios stack. */
.vleft .scnlist{ grid-template-columns:minmax(0, 1fr); }

/* The dates the "When" scenarios turn on. */
.timeline{ list-style:none; margin:0; padding:var(--s2) 0 0; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr); border-top:2px solid var(--line); }
.timeline li{ position:relative; padding:.55rem .4rem 0 0; font-size:.8rem; line-height:1.3; }
.timeline li::before{ content:""; position:absolute; top:calc(-1 * var(--s2) - 6px); left:0; width:10px; height:10px; border-radius:50%; background:var(--soft); }
.timeline .d{ display:block; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; }
.timeline .w{ color:var(--muted); }
.timeline li.t-not{ opacity:.45; }
.timeline li.t-asked::before{ background:var(--petrol); box-shadow:0 0 0 4px rgba(0,85,110,.18); }
.timeline li.t-asked .w b{ color:var(--petrol); }
.tlnote{ margin:0; font-size:.82rem; color:var(--muted); }
.vleft .timeline{ grid-auto-flow:row; border-top:0; border-left:2px solid var(--line); padding:0 0 0 var(--s3); gap:var(--s1); }
.vleft .timeline li{ padding:0; }
.vleft .timeline li::before{ top:.25rem; left:calc(-1 * var(--s3) - 6px); }

/* An answer a scenario changed. */
.q.changed{ box-shadow:inset 0 0 0 2px var(--ink); }
.q .chg{ display:block; font-size:.66rem; font-weight:750; letter-spacing:.05em; text-transform:uppercase; color:var(--ink); }
.act small{ display:block; font-size:.74rem; font-weight:500; opacity:.8; }

/* The opening page: one credential with its links, and what each link names. */
.taxo{ display:grid; gap:var(--s4); }
.taxocols{ display:grid; gap:var(--s4); align-items:start; }
@media (min-width:64rem){ .taxocols{ grid-template-columns:minmax(0, 1.1fr) minmax(0, 1fr); } }
.org{ display:inline-block; font-size:.68rem; font-weight:800; letter-spacing:.04em; padding:0 .35rem; border-radius:4px; vertical-align:1px; border:1px solid currentColor; }
.org.o-w3c{ color:var(--ok); } .org.o-ebsi{ color:var(--g-auth); } .org.o-ours{ color:var(--unk); }
.orgs{ display:flex; gap:.25rem; flex-wrap:wrap; }
.anat svg{ max-height:none; }
.anat text.rv{ font-size:15px; fill:var(--ink); }
.anat text.lf{ font-size:14.5px; }
.anat text.lm{ font-size:14px; }
.anat text.org{ font:800 11.5px var(--sans); fill:var(--ok); letter-spacing:.04em; }
.anat text.org.o-vc4qi{ fill:var(--unk); }
.linkset h3, .rulesrow h3{ margin:0 0 var(--s2); font-size:1.05rem; }
.links{ margin:0; font-size:.88rem; }
.links th{ text-align:left; font-size:.8rem; color:var(--muted); font-weight:650; padding:0 var(--s2) var(--s1); border-bottom:1px solid var(--line); }
.links td{ vertical-align:top; padding:var(--s1) var(--s2); border-bottom:1px solid var(--line); }
.links td code{ font:600 .8rem var(--mono); color:var(--petrol); }
.links td small code{ color:var(--muted); }
.links tr.beside td{ background:var(--wash); }
.links .pair{ display:inline-flex; align-items:center; gap:.3rem; white-space:nowrap; }
.links .none{ color:var(--muted); font-size:.82rem; }
.orglegend{ margin:var(--s2) 0 0; font-size:.8rem; color:var(--muted); }

/* The verifier's pages: its profile and its six checks. */
.vpanel{ display:grid; gap:var(--s3); }
.vpanel .lede{ margin:0; font-size:1.02rem; }
.vpanel table{ margin:0; font-size:.92rem; }
.vpanel th, .vpanel td{ text-align:left; vertical-align:top; padding:var(--s2); border-bottom:1px solid var(--line); }
.vpanel thead th{ font-size:.82rem; color:var(--muted); font-weight:650; }
.vpanel tbody th{ color:var(--ink); font-weight:700; white-space:nowrap; }
.vpanel td code{ font:600 .84rem var(--mono); color:var(--petrol); }
.vpanel td.num{ font-variant-numeric:tabular-nums; white-space:nowrap; }
.vpanel .four{ list-style:none; padding:0; display:grid; gap:var(--s1) var(--s4); grid-template-columns:repeat(auto-fill, minmax(20rem, 1fr)); }
.vpanel .four code{ font:600 .8rem var(--mono); color:var(--muted); }
.vpanel .notes{ margin:0; padding-left:1.1rem; display:grid; gap:var(--s1); font-size:.92rem; color:var(--muted); }
.links td:last-child, .links .pair{ white-space:nowrap; }
