/*
 * The design system.
 *
 * Frosted white glass floating over a pale, softly lit field. Calm and
 * financial, not neon crypto. One typeface throughout, separated by weight and
 * tracking rather than by a second family. Nothing shouts: the only solid,
 * saturated object on a page is the primary button.
 *
 * Two rules do most of the work, and both are here rather than in a comment on
 * a component:
 *
 *   - Shadows are tinted blue, never grey. Blue is the colour of what is behind
 *     the glass, and a grey shadow makes the same surface look like paper.
 *   - Buttons are never pills. A rounded rectangle says this holds numbers and
 *     decisions; a pill says toy.
 *
 * The one idea the product needs on top of that: every surface says which half
 * of the protocol it belongs to. Public is indigo, private is lavender, and the
 * word is on the surface as well as the colour, so it survives greyscale.
 */

/*
 * Plus Jakarta Sans, self-hosted: the latin subset of the variable font, 27 kB,
 * every weight the interface uses. In this repository rather than on a font
 * CDN, so there is no third party in the render path. Addresses, hashes and
 * amounts use the system monospace, which loads nothing.
 */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('./fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* ------------------------------------------------------------------ ink */
  /*
   * Darker than they were. These were set against a near-white field; the
   * mesh is a good deal darker, and measuring the real contrast of the rendered
   * text against the pixels actually behind it put the small secondary type
   * around 3:1, which is not readable. Body text wants 4.5:1.
   */
  --ink:        #14181d;
  --ink-2:      #3b4451;
  --ink-3:      #414a56;
  /* The names the rest of the sheet grew up with. */
  --ink-dim:    var(--ink-2);
  --ink-faint:  var(--ink-3);

  /* --------------------------------------------------------------- accent */
  --accent:     #2f4cab;
  --lavender:   #6552b8;
  --brand:      #14181d;

  /* ------------------------------------------------------------- semantic */
  --mint:  #065c3a;
  --clay:  #8a4034;
  --steel: #2e4760;
  --slate: #5d6382;
  --teal:  #2c6b72;
  --plum:  #7d5f78;
  --ok:   var(--mint);
  --warn: var(--clay);
  --stop: var(--clay);

  /* --------------------------------------------------- the two halves -- */
  --public:       var(--accent);
  --public-soft:  rgb(58 91 199 / 0.10);
  --public-edge:  rgb(58 91 199 / 0.24);
  --private:      var(--lavender);
  --private-soft: rgb(101 82 184 / 0.10);
  --private-edge: rgb(101 82 184 / 0.26);

  /* ---------------------------------------------------------- the glass -- */
  /*
   * The field, sampled from the reference rather than guessed: blue-grey at the
   * top left, aqua at the top right, periwinkle at the bottom left and a
   * pink-lilac at the bottom right, with a soft blue through the middle. Five
   * corners of one iridescent mesh.
   *
   * It is darker than the field it replaced, so the glass alphas go up again:
   * white glass needs more white to read as glass over a tinted ground, and the
   * panels have to stay the brightest thing on the page for the text on them.
   */
  --page:        #b4bfe0;
  --mesh-tl:     #afc6d2;
  --mesh-tr:     #a9d5e2;
  --mesh-bl:     #b3b7e4;
  --mesh-br:     #d6b9e9;
  --mesh-mid:    #a4c3f3;
  --glass-panel:   rgb(255 255 255 / 0.42);
  --glass-card:    rgb(255 255 255 / 0.52);
  --glass-control: rgb(255 255 255 / 0.62);
  --glass-modal:   rgb(255 255 255 / 0.80);
  /* Inner highlight, and an outer hairline so an edge never vanishes on white. */
  --edge-in:  rgb(255 255 255 / 0.62);
  --edge-out: rgb(20 26 33 / 0.045);
  --rule:      rgb(20 26 33 / 0.10);
  --rule-soft: rgb(20 26 33 / 0.055);
  --sunken:    rgb(255 255 255 / 0.36);

  --shadow:
    0 1px 1px rgb(20 26 33 / 0.03),
    0 18px 44px -24px rgb(70 90 160 / 0.22);
  --shadow-lift:
    0 1px 2px rgb(20 26 33 / 0.05),
    0 22px 50px -22px rgb(70 90 160 / 0.30);

  /* ------------------------------------------------------------- shape -- */
  --r-card: 16px;
  --r-btn:  11px;
  --r-sm:   8px;
  /* Older names, pointed at the new scale. Nothing in here is a pill. */
  --r-tile: var(--r-sm);
  --r-pill: var(--r-btn);

  --mono: ui-monospace, SFMono-Regular, Menlo, "SF Mono", Consolas, monospace;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --sans: var(--font-sans);

  --gutter: 32px;
  --measure: 1200px;
  --bar: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/*
 * `clip`, not `hidden`. Background blooms are deliberately wider than the page;
 * `hidden` on the body still let the document grow to fit them, which put a
 * horizontal scrollbar on every screen. `clip` cuts the overflow without making
 * a scroll container, so `position: sticky` on the top bar keeps working.
 */
html { scroll-behavior: smooth; overflow-x: clip; }
/* Spacing is set deliberately below and nowhere else. */
p, dl, dd, h1, h2, h3, figure, ul, ol { margin: 0; }

body {
  min-height: 100vh;
  background-color: var(--page);
  /* Five overlapping washes, one per sampled corner. Fixed, so it never moves. */
  background-image:
    radial-gradient(95% 85% at 0% 0%,     var(--mesh-tl), transparent 62%),
    radial-gradient(95% 85% at 100% 0%,   var(--mesh-tr), transparent 62%),
    radial-gradient(100% 95% at 0% 100%,  var(--mesh-bl), transparent 64%),
    radial-gradient(105% 95% at 100% 100%, var(--mesh-br), transparent 64%),
    radial-gradient(70% 60% at 22% 52%,   var(--mesh-mid), transparent 68%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/*
 * The field. Fixed behind everything, so it never moves when the page scrolls:
 * three very soft blooms off the corners, blurred past the point where any edge
 * of them is visible. It is the light the glass is lit by, not a picture.
 */
body::before {
  content: '';
  position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(30vmax 26vmax at 14% 6%,  rgb(255 255 255 / 0.42), transparent 66%),
    radial-gradient(26vmax 23vmax at 86% 14%, rgb(255 255 255 / 0.26), transparent 68%);
  filter: blur(120px);
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: #fff; color: var(--ink);
  padding: 10px 14px; border-radius: var(--r-btn); box-shadow: var(--shadow);
}
.skip:focus { left: 12px; top: 12px; }

.boot {
  padding: 120px var(--gutter); color: var(--ink-2);
  font-family: var(--mono); font-size: 12.5px; text-align: center;
}

/* ================================================================== shell == */

/*
 * One shell for every screen. The top bar is the navigation; there is no
 * sidebar, because a rail of links down the left is a second place to look for
 * the same five words.
 */
.shell, .landing { display: flex; flex-direction: column; min-height: 100vh; }

.top {
  position: sticky; top: 0; z-index: 40;
  height: var(--bar); flex: 0 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter);
  background: var(--glass-panel);
  backdrop-filter: blur(30px) saturate(1.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  border-bottom: 1px solid var(--edge-out);
  box-shadow: inset 0 1px 0 var(--edge-in);
  transition: box-shadow .2s ease;
}
/* On scroll it keeps the blur and gains the soft shadow. */
.top.is-scrolled { box-shadow: inset 0 1px 0 var(--edge-in), var(--shadow); }

.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit; margin-right: 8px;
}
.brand .mark { display: block; width: 26px; height: 26px; flex: 0 0 auto; }
.brand .mark path { fill: var(--brand); }
.brand-words { display: flex; flex-direction: column; line-height: 1.15; }
.brand-words b { font-size: 14.5px; font-weight: 700; letter-spacing: -0.025em; }
.brand-words span { font-size: 11px; color: var(--ink-3); letter-spacing: -0.005em; }

/* Text links: no boxes, no chips. The active one gets a 2px accent underline. */
.top-nav { display: flex; align-items: center; gap: 22px; }
.top-nav a {
  position: relative; padding: 4px 0;
  font-size: 13px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink-2); text-decoration: none;
  transition: color .15s ease;
}
.top-nav a:hover { color: var(--ink); }
.top-nav a[aria-current="page"] { color: var(--ink); }
.top-nav a[aria-current="page"]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--accent); border-radius: 2px;
}

.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* The network pill is the one pill in the system, and it is not a button. */
.netpill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px;
  background: var(--glass-control); border: 1px solid var(--edge-in);
  box-shadow: 0 0 0 1px var(--edge-out);
  font-size: 11.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
}
.netpill i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 0 3px rgb(10 112 72 / 0.12);
}
.netpill.is-sim i { background: var(--clay); box-shadow: 0 0 0 3px rgb(156 79 67 / 0.12); }

.idbtn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 7px; border-radius: var(--r-btn);
  background: var(--glass-control); border: 1px solid var(--edge-in);
  box-shadow: 0 0 0 1px var(--edge-out);
  text-decoration: none; color: var(--ink);
  font-size: 12.5px; font-weight: 500;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.idbtn:hover { transform: translateY(-1px); background: var(--glass-modal); box-shadow: 0 0 0 1px var(--edge-out), var(--shadow); }
.idbtn .mono { font-size: 11.5px; color: var(--ink-2); }

/* Derived from the address, so two identities are told apart without reading hex. */
.identicon {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgb(20 26 33 / 0.10);
}

main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.view {
  width: 100%; max-width: var(--measure); margin: 0 auto;
  padding: 28px var(--gutter) 72px;
  display: flex; flex-direction: column; gap: 36px;
}

/* A screen's title, and one line under it saying what the screen is. */
.topbar {
  width: 100%; max-width: var(--measure); margin: 0 auto;
  padding: 36px var(--gutter) 0;
}
.topbar h1 {
  font-size: clamp(26px, 3.2vw, 32px); font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.1;
}
.topbar .spacer { flex: 1 1 auto; }
.lede {
  color: var(--ink-2); font-size: 13.5px; line-height: 1.6;
  letter-spacing: -0.008em; text-wrap: pretty;
}

/* ------------------------------------------------------------------ footer */

.foot {
  border-top: 1px solid var(--edge-out);
  padding: 26px var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 10px;
}
.foot-row {
  width: 100%; max-width: var(--measure); margin: 0 auto;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-2);
}
.foot-row .brand .mark { width: 20px; height: 20px; }
.foot-row .faint { margin-right: auto; }
.foot-row a { color: var(--ink-2); text-decoration: none; }
.foot-row a:hover { color: var(--accent); }
.foot-row.mono { font-size: 11px; }

/* ================================================================ glass == */

/*
 * Four surfaces, four alphas. A panel is the quietest thing that still has an
 * edge; a card sits on a panel; a control sits on a card; a modal sits over
 * everything. Each one is a step brighter than what it sits on, which is what
 * makes the stack read as depth rather than as outlines.
 */
.panel {
  position: relative;
  border-radius: var(--r-card);
  background: var(--glass-panel);
  border: 1px solid var(--edge-in);
  box-shadow: 0 0 0 1px var(--edge-out), var(--shadow);
  backdrop-filter: blur(30px) saturate(1.3);
  -webkit-backdrop-filter: blur(30px) saturate(1.3);
  overflow: hidden;
}
.panel > header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 20px 24px 12px;
}
.panel > header h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.025em; }
.panel > header .hint { font-size: 12px; color: var(--ink-3); }
.panel > .body { padding: 0 24px 22px; }
/* A screen that failed to load. It carries no half, because it is not one. */
.panel.is-error { padding-top: 6px; }

/* Which half, on the surface itself: a 2px edge and a word in the tag. */
.panel::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: currentColor; opacity: 0.5;
}
.panel.is-public  { color: var(--public); }
.panel.is-private { color: var(--private); }
.panel.is-plain::before { display: none; }
.panel > header h2, .panel > .body { color: var(--ink); }

.card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px; border-radius: var(--r-card);
  background: var(--glass-card);
  border: 1px solid var(--edge-in);
  box-shadow: 0 0 0 1px var(--edge-out), var(--shadow);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  transition: transform .15s ease-out, box-shadow .15s ease-out, background-color .15s ease-out;
}
.card:hover {
  transform: translateY(-1px); background: var(--glass-control);
  box-shadow: 0 0 0 1px var(--edge-out), var(--shadow-lift);
}
.card > header { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.card h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.025em; margin-right: auto; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.split { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.split-wide { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }

/* =============================================================== type == */

.kicker, .side-group {
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--steel);
}

.hero { padding: 56px 0 8px; }
.hero-words {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  text-align: center;
}
.hero h1 {
  max-width: 26ch;
  font-size: clamp(38px, 6.4vw, 66px);
  font-weight: 800; line-height: 1.02; letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero h1 .soft { display: block; color: var(--ink-3); font-weight: 600; }
.hero p.lede { max-width: 58ch; font-size: clamp(14px, 1.4vw, 16px); }
.hero .actions { justify-content: center; margin-top: 4px; }

/*
 * With the render beside it the hero becomes two columns and the words go
 * left-aligned; the object is the only thing on any page that is allowed to be
 * decoration, so it is the first thing to go when the screen gets narrow.
 */
.hero.has-art {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  align-items: center; gap: 16px; padding: 44px 0 12px;
}
.hero.has-art .hero-words { align-items: flex-start; text-align: left; }
.hero.has-art h1 { max-width: 20ch; font-size: clamp(34px, 4.6vw, 58px); }
.hero.has-art p.lede { max-width: 46ch; }
.hero.has-art .actions { justify-content: flex-start; }

.hero-art {
  position: relative;
  display: block; width: 100%; max-width: 660px; aspect-ratio: 1;
  justify-self: end; margin: -16px 0;
  /* The render has no ground plane, so the page provides the contact shadow. */
  filter: drop-shadow(0 34px 44px rgb(70 74 140 / 0.20));
  /* One slow settle on arrival, then the object's own turn carries it. */
  animation: float-in 1.1s cubic-bezier(.16, .84, .3, 1) both;
}
/*
 * The still and the live canvas occupy the same square. The still is what is in
 * the markup; the canvas fades over it once it has actually drawn a frame, and
 * `is-live` is only set at that point — swapping any earlier shows a gap.
 */
.hero-art-still,
.hero-art-live {
  position: absolute; inset: 0;
  display: block; width: 100%; height: 100%;
}
.hero-art-live { opacity: 0; transition: opacity .4s ease-out; }
.hero-art.is-live .hero-art-live { opacity: 1; }
.hero-art.is-live .hero-art-still { opacity: 0; }
@keyframes float-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art { animation: none; }
  /* The canvas is never mounted in this case, but say so in the sheet too. */
  .hero-art-live { display: none; }
}
@media (max-width: 900px) {
  .hero.has-art { grid-template-columns: minmax(0, 1fr); }
  .hero.has-art .hero-words { align-items: center; text-align: center; }
  .hero.has-art .actions { justify-content: center; }
  .hero-art { justify-self: center; max-width: 420px; order: -1; margin: 0 0 8px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--r-sm);
  background: rgb(255 255 255 / 0.62); border: 1px solid var(--public-edge);
  color: #2b46a0; font-size: 11.5px; font-weight: 600; letter-spacing: -0.005em;
}
.eyebrow::before { content: ''; width: 5px; height: 5px; border-radius: 1px; background: currentColor; }

.band { display: flex; flex-direction: column; gap: 18px; }
.band-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.band-head h2 {
  font-size: clamp(22px, 2.6vw, 28px); font-weight: 800;
  letter-spacing: -0.032em; margin-right: auto;
}
.band-head h2 .soft { color: var(--ink-3); font-weight: 600; }
.band-head .kicker { width: 100%; margin-bottom: -8px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.hash { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.soft { color: var(--ink-3); }

/* ============================================================ components == */

/* Metric tile: a label, a number, and one line of context. No glyph. */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px 16px; border-radius: var(--r-card);
  background: var(--glass-control);
  border: 1px solid var(--edge-in);
  border-top: 2px solid var(--public-edge);
  box-shadow: 0 0 0 1px var(--edge-out), var(--shadow);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}
.stat.is-private { border-top-color: var(--private-edge); }
.stat dt {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
}
.stat dd {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: clamp(19px, 2.2vw, 22px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.25; word-break: break-all;
}
.stat .sub { color: var(--ink-3); font-size: 11.5px; margin-top: 3px; }

/* Row: label left, value right, inside a soft strip. Replaces dense tables. */
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 1px 20px; margin-top: 10px; }
dl.facts dt {
  color: var(--ink-3); font-size: 12.5px; padding: 8px 0;
  border-top: 1px solid var(--rule-soft);
}
dl.facts dd {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 12.5px; padding: 8px 0; text-align: right; word-break: break-all;
  border-top: 1px solid var(--rule-soft);
}
dl.facts dt:first-of-type, dl.facts dd:first-of-type { border-top: 0; }

/*
 * Tables, kept light. Nothing in the app is a dense grid: these are rows with
 * air in them, a hairline between, and no vertical rules at all.
 */
table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 10px; }
th {
  text-align: left; font-weight: 600; color: var(--ink-3); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 0 14px 10px 0; white-space: nowrap;
}
td {
  padding: 11px 14px 11px 0; border-top: 1px solid var(--rule-soft);
  vertical-align: middle; letter-spacing: -0.005em;
}
/* Right-aligned numbers need a gap on their LEFT, or they run into the column
   before them; and they keep the gap on their right so the next column clears. */
td.num, th.num { text-align: right; padding-left: 24px; }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
th:last-child, td:last-child { padding-right: 0; }
tr.pick { cursor: pointer; }
tr.pick:hover td { background: rgb(255 255 255 / 0.30); }

/* Badge: 12% of its own hue behind it, the hue at full strength in front. */
.tag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--r-sm); white-space: nowrap;
  border: 1px solid currentColor;
}
.tag.public  { color: #2b46a0; background: rgb(255 255 255 / 0.62); border-color: var(--public-edge); }
.tag.private { color: #50409a; background: rgb(255 255 255 / 0.62); border-color: var(--private-edge); }

.state {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--r-sm);
  border: 1px solid var(--rule); color: var(--ink-2); background: var(--glass-control);
}
.state.OPEN, .state.SETTLED {
  color: var(--mint); border-color: rgb(10 112 72 / 0.26); background: rgb(10 112 72 / 0.10);
}
.state.CLOSED, .state.SETTLING, .state.PENDING {
  color: var(--clay); border-color: rgb(156 79 67 / 0.26); background: rgb(156 79 67 / 0.10);
}
.state.GRADUATED { color: var(--accent); border-color: var(--public-edge); background: var(--public-soft); }
.state.HALTED { color: var(--clay); border-color: rgb(156 79 67 / 0.34); background: rgb(156 79 67 / 0.12); }

.meter { min-width: 110px; height: 6px; border-radius: 3px; background: rgb(20 26 33 / 0.07); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--lavender)); }
.card-meter { display: flex; align-items: center; gap: 10px; }
.card-meter .meter { flex: 1 1 auto; }
.card-meter span { font-size: 11px; color: var(--ink-3); min-width: 46px; text-align: right; font-family: var(--mono); }

.avatar {
  position: relative; overflow: hidden;
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: var(--r-sm);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  color: var(--accent); background: var(--public-soft); border: 1px solid var(--public-edge);
}
/*
 * The picture covers the initial only once it has decoded. Until then — and
 * forever, for a launch whose image is a placeholder or whose blob is gone —
 * the letter is what shows, which is the truth rather than a broken-image icon.
 */
.avatar img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .18s ease-out;
}
.avatar.has-art img { opacity: 1; }
.avatar.has-art { color: transparent; background: var(--sunken); }

/*
 * Picking a logo. The preview only appears once something has been hosted, so
 * an empty box is never shown pretending to be an image.
 */
.logo-pick { display: flex; align-items: center; gap: 12px; }
.logo-pick .logo-preview {
  display: none; width: 44px; height: 44px; flex: 0 0 auto;
  object-fit: cover; border-radius: var(--r-sm);
  border: 1px solid var(--edge-in); box-shadow: 0 0 0 1px var(--edge-out);
}
.logo-pick.has-image .logo-preview { display: block; }
.logo-pick input[type="file"] {
  flex: 1 1 auto; min-width: 0;
  font: inherit; font-size: 12.5px; color: var(--ink-2);
}
.logo-pick input[type="file"]::file-selector-button {
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  margin-right: 10px; padding: 7px 12px;
  border-radius: var(--r-sm); border: 1px solid var(--edge-in);
  background: var(--glass-control); color: var(--ink);
  box-shadow: 0 0 0 1px var(--edge-out);
}

/* The launch page's own header: the picture, the ticker and the state. */
.launch-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.launch-head .avatar { width: 40px; height: 40px; font-size: 16px; }
.launch-head .mono { font-size: 13px; color: var(--ink-2); }

/* ---------------------------------------------------------------- controls */

button, .btn {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--glass-control); color: var(--ink);
  border: 1px solid var(--edge-in);
  border-radius: var(--r-btn);
  padding: 9px 16px; letter-spacing: -0.01em;
  box-shadow: 0 0 0 1px var(--edge-out);
  text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
  transition: transform .15s ease-out, box-shadow .15s ease-out, background-color .15s ease-out;
}
button:hover:not(:disabled), .btn:hover {
  transform: translateY(-1px); background: var(--glass-modal);
  box-shadow: 0 0 0 1px var(--edge-out), var(--shadow);
}
button:active:not(:disabled) { transform: translateY(0); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

/* The only solid, saturated object on a page. No gradient, no glow. */
button.primary, .btn.primary {
  background: var(--brand); border-color: transparent; color: #fff;
  box-shadow: 0 1px 2px rgb(20 26 33 / 0.16), 0 10px 24px -12px rgb(20 26 33 / 0.45);
}
button.primary:hover:not(:disabled), .btn.primary:hover {
  background: #1c2129;
  box-shadow: 0 1px 3px rgb(20 26 33 / 0.2), 0 16px 32px -14px rgb(20 26 33 / 0.5);
}

button.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); font-weight: 500; }
button.ghost:hover:not(:disabled) { background: var(--glass-control); box-shadow: 0 0 0 1px var(--edge-out); color: var(--ink); }
button.tiny { padding: 6px 11px; font-size: 12px; }

/* A button that is a heading. It navigates, so it is a button, not a div. */
button.linkish {
  background: none; border: 0; box-shadow: none; padding: 0;
  font: inherit; color: inherit; text-align: left;
}
button.linkish:hover:not(:disabled) {
  background: none; box-shadow: none; transform: none;
  text-decoration: underline; text-underline-offset: 3px;
}

label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
input, select, textarea {
  font: inherit; font-family: var(--mono); font-size: 12.5px;
  background: var(--glass-control); color: var(--ink);
  border: 1px solid var(--edge-in);
  box-shadow: 0 0 0 1px var(--edge-out);
  border-radius: var(--r-btn);
  padding: 10px 12px; width: 100%;
}
select { font-family: var(--font-sans); }
textarea { resize: vertical; min-height: 78px; font-family: var(--font-sans); line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(58 91 199 / 0.16);
}
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:disabled { background: rgb(255 255 255 / 0.2); color: var(--ink-3); cursor: not-allowed; }

/* A checkbox and its words on one line; the box is not a text field. */
label.check {
  flex-direction: row; align-items: center; gap: 10px;
  font-size: 13px; color: var(--ink); align-self: end; padding: 9px 0;
}
input[type="checkbox"] {
  width: 18px; height: 18px; flex: 0 0 auto; padding: 0;
  border-radius: 5px; accent-color: var(--accent); box-shadow: none;
}

.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 14px; }
/*
 * Not a `.fields` grid: a long label inside an auto-fit track blows the track
 * out to its own width and drags every field after it across the panel.
 */
.gate-row { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.gate-row > label:not(.check) { width: 240px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }

.note {
  font-size: 12px; color: var(--ink-2); line-height: 1.6;
  border-left: 2px solid var(--rule); padding: 3px 0 3px 12px; margin: 14px 0 0;
}
.note.warn {
  border-left-color: var(--clay); color: var(--ink);
  background: rgb(156 79 67 / 0.07);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 10px 12px;
}

.empty { color: var(--ink-3); font-size: 12.5px; padding: 18px 0 8px; }

.flow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 11.5px; }
.flow span {
  padding: 3px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--rule); color: var(--ink-3); background: var(--glass-control);
}
.flow span.done { color: var(--mint); border-color: rgb(10 112 72 / 0.26); background: rgb(10 112 72 / 0.09); }
.flow span.now { color: var(--accent); border-color: var(--public-edge); background: var(--public-soft); }
.flow i { color: var(--ink-3); font-style: normal; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 50;
  max-width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--edge-in); border-radius: var(--r-card);
  background: var(--glass-modal); color: var(--ink);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  padding: 13px 17px; font-size: 12.5px;
  box-shadow: 0 0 0 1px var(--edge-out), var(--shadow-lift);
}
.toast.bad { border-left: 3px solid var(--clay); }
.toast.good { border-left: 3px solid var(--mint); }

/* ------------------------------------------------------------- the search */

.searchbar {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: var(--r-btn);
  background: var(--glass-control); border: 1px solid var(--edge-in);
  box-shadow: 0 0 0 1px var(--edge-out);
  backdrop-filter: blur(22px);
}
.searchbar .ico { color: var(--ink-3); font-size: 14px; }
.searchbar input {
  flex: 1 1 auto; border: 0; background: none; box-shadow: none; padding: 0;
  font-family: var(--font-sans); font-size: 13px; color: var(--ink);
}
.searchbar input:focus { outline: none; box-shadow: none; border: 0; }
.searchbar kbd {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  padding: 3px 7px; border-radius: 5px;
  background: rgb(255 255 255 / 0.5); border: 1px solid var(--edge-out);
}

/* `display: flex` beats the `hidden` attribute's UA `display: none`, so without
   this the empty results box is painted under the bar on every screen. */
.search-results[hidden] { display: none; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 20;
  padding: 8px; border-radius: var(--r-card);
  background: var(--glass-modal); border: 1px solid var(--edge-in);
  backdrop-filter: blur(40px) saturate(1.4);
  box-shadow: 0 0 0 1px var(--edge-out), var(--shadow-lift);
  display: flex; flex-direction: column; gap: 2px;
}
.search-hit {
  display: flex; align-items: baseline; gap: 10px; width: 100%;
  background: none; border: 0; box-shadow: none; border-radius: var(--r-sm);
  padding: 9px 11px; text-align: left; font-size: 13px; font-weight: 500;
}
.search-hit:hover:not(:disabled) { background: rgb(255 255 255 / 0.5); box-shadow: none; transform: none; }

/* ================================================== page-specific pieces == */

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px; border-radius: var(--r-card);
  background: var(--glass-card); border: 1px solid var(--edge-in);
  box-shadow: 0 0 0 1px var(--edge-out), var(--shadow);
  backdrop-filter: blur(22px);
}
.step .n {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; color: #fff; background: var(--brand);
}
.step h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.025em; }
.step p { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }

.claims { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.claim {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 20px; border-radius: var(--r-card);
  background: var(--glass-card); border: 1px solid var(--edge-in);
  border-top: 2px solid var(--public-edge);
  box-shadow: 0 0 0 1px var(--edge-out), var(--shadow);
  backdrop-filter: blur(22px);
}
.claim.is-private { border-top-color: var(--private-edge); }
.claim h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.025em; }
.claim p { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.claim .tag { align-self: flex-start; margin-top: 4px; }

.explain { display: flex; flex-direction: column; gap: 26px; }
.explain-head { display: flex; flex-direction: column; gap: 14px; max-width: 70ch; }
.explain-head .kicker { margin-bottom: -8px; }
.explain-head h2 {
  font-size: clamp(24px, 3vw, 34px); font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.1;
}
.explain-head h2 .soft { display: block; color: var(--ink-3); font-weight: 600; }

.figure { display: flex; flex-direction: column; gap: 12px; }
.figure figcaption { font-size: 12px; color: var(--ink-3); max-width: 74ch; }
.diagram {
  padding: 20px; border-radius: var(--r-card);
  background: var(--glass-card); border: 1px solid var(--edge-in);
  box-shadow: 0 0 0 1px var(--edge-out), var(--shadow);
  backdrop-filter: blur(22px);
}
.diagram svg { display: block; width: 100%; height: auto; font-family: var(--font-sans); }

.dgm-private { color: var(--private); }
.dgm-public { color: var(--accent); }
.dgm-zone { fill: color-mix(in srgb, currentColor 6%, transparent); stroke: currentColor; stroke-width: 1.2; opacity: 0.9; }
.dgm-zone-label { fill: currentColor; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; }
.dgm-note rect { fill: rgb(255 255 255 / 0.7); stroke: color-mix(in srgb, currentColor 45%, transparent); stroke-width: 1.2; }
.dgm-title { fill: var(--ink); font-size: 15px; font-weight: 700; letter-spacing: -0.025em; }
.dgm-sm { fill: var(--ink-2); font-size: 12px; }
.dgm-xs { fill: var(--ink-3); font-size: 11px; }
.dgm-none { fill: var(--ink-3); }
.dgm-mono { fill: var(--ink); font-family: var(--mono); font-size: 12.5px; }
.dgm-right { text-anchor: end; }
.dgm-center { text-anchor: middle; }
.dgm-rule { stroke: var(--rule); stroke-width: 1; }
.dgm-axis { stroke: var(--rule); stroke-width: 1.2; }
.dgm-curve { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.dgm-curve-fill { fill: var(--public-soft); stroke: none; }
.dgm-lock rect { fill: var(--public-soft); stroke: var(--public-edge); stroke-width: 1; }
.dgm-flow { color: var(--ink-3); }
.dgm-flow path { fill: none; stroke: currentColor; stroke-width: 1.4; }
.dgm-flow-back path { stroke-dasharray: 5 4; }
.dgm-flow-label { fill: var(--ink-2); font-size: 11.5px; font-weight: 500; }

.faq { display: flex; flex-direction: column; }
.faq-wide { max-width: 78ch; }
.faq details { border-bottom: 1px solid var(--rule-soft); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 28px 16px 0; position: relative;
  font-size: 14px; font-weight: 600; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); font-size: 17px; line-height: 1;
}
.faq details[open] summary::after { content: '\2013'; }
.faq summary:hover { color: var(--accent); }
.faq details p { padding: 0 24px 18px 0; font-size: 13px; color: var(--ink-2); line-height: 1.65; max-width: 64ch; }

.feed { list-style: none; display: flex; flex-direction: column; margin-top: 8px; }
.feed li {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--rule-soft); font-size: 12.5px;
}
.feed li:first-child { border-top: 0; }
.feed .kind {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--r-sm); white-space: nowrap;
  color: var(--accent); background: var(--public-soft); border: 1px solid var(--public-edge);
}
.feed .what { color: var(--ink-2); }

.ops { display: flex; flex-direction: column; margin-top: 8px; }
.op { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 15px 0; border-top: 1px solid var(--rule-soft); }
.op:first-child { border-top: 0; }
.op-name { color: var(--accent); font-family: var(--mono); font-size: 13px; }
.op p { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.op-where { margin-top: 5px; color: var(--ink-3); font-size: 11.5px; }
.op-where code { font-family: var(--mono); }

pre.code {
  margin-top: 10px; padding: 15px; border-radius: var(--r-sm);
  background: rgb(255 255 255 / 0.42); border: 1px solid var(--edge-out);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.75;
  color: var(--ink-2); overflow-x: auto;
}

.running { display: flex; flex-direction: column; margin-top: 6px; }
.running-row { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--rule-soft); }
.running-row:first-child { border-top: 0; }
.running-row .k { width: 92px; flex: 0 0 auto; color: var(--ink-3); font-size: 12.5px; }
.running-row .v { font-family: var(--mono); font-size: 12.5px; }
.running-row .v.is-good { color: var(--mint); }
.running-row .v.is-warn { color: var(--clay); }

.triptych { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.col {
  padding: 20px; border-radius: var(--r-card);
  background: var(--glass-card); border: 1px solid var(--edge-in);
  box-shadow: 0 0 0 1px var(--edge-out), var(--shadow);
  backdrop-filter: blur(22px);
}
.col h3 { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; margin-bottom: 12px; text-transform: uppercase; }
.col.is-public h3 { color: var(--accent); }
.col.is-private h3 { color: var(--private); }
.col.is-plain h3 { color: var(--clay); }
.col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.col li { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; padding-left: 14px; position: relative; }
.col li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 1px; background: currentColor; opacity: 0.45;
}

.keyrow { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 13px 0; border-top: 1px solid var(--rule-soft); }
.keyrow:first-of-type { border-top: 0; padding-top: 6px; }
.keyrow .k { grid-column: 1 / -1; font-size: 10px; font-weight: 600; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; }
.keyrow code { font-family: var(--mono); font-size: 12px; color: var(--ink); word-break: break-all; line-height: 1.5; }

.wizard-rail { display: flex; align-items: center; list-style: none; margin: 8px 0 6px; flex-wrap: wrap; }
.wizard-rail li { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); padding-right: 14px; }
.wizard-rail li + li::before { content: ''; width: 22px; height: 1px; background: var(--rule); margin-right: 14px; }
.wizard-rail li .n {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; border: 1px solid var(--rule); color: var(--ink-3);
}
.wizard-rail li.done { color: var(--ink-2); cursor: pointer; }
.wizard-rail li.done .n { border-color: var(--public-edge); color: var(--accent); background: var(--public-soft); }
.wizard-rail li.now { color: var(--ink); font-weight: 600; }
.wizard-rail li.now .n { border-color: transparent; color: #fff; background: var(--brand); }

.wizard-body { display: flex; flex-direction: column; padding-top: 6px; }
.wizard-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule-soft); }
.wizard-foot > :last-child { margin-left: auto; }

/* ================================================================ motion == */

/*
 * Sections fade up on first view, staggered. Nothing bounces, nothing loops,
 * nothing parallaxes, and all of it goes away for anybody who asked it to.
 */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.view > * { animation: rise .4s ease-out both; }
.view > :nth-child(1) { animation-delay: 0ms; }
.view > :nth-child(2) { animation-delay: 60ms; }
.view > :nth-child(3) { animation-delay: 120ms; }
.view > :nth-child(4) { animation-delay: 180ms; }
.view > :nth-child(5) { animation-delay: 240ms; }
.view > :nth-child(n+6) { animation-delay: 300ms; }

/*
 * The proving status line. A real Groth16 proof takes seconds and its key is
 * tens of megabytes; a silent pause is indistinguishable from a hang.
 */
.toast.proving {
  border-left: 3px solid var(--accent);
  display: flex; align-items: center; gap: 11px;
  font-family: var(--mono); font-size: 12px;
}
.toast.proving::before {
  content: ''; width: 11px; height: 11px; flex: 0 0 auto;
  border: 2px solid var(--accent); border-top-color: transparent; border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .toast.proving::before { animation: none; border-top-color: var(--accent); }
  .view > * { animation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ================================================================= small == */

@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .top { gap: 12px; }
  .brand-words span { display: none; }
  /* The centre links collapse into a glass bottom bar of four. */
  .top-nav {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
    justify-content: space-around; gap: 4px;
    padding: 10px 8px; border-radius: var(--r-card);
    background: var(--glass-modal); border: 1px solid var(--edge-in);
    box-shadow: 0 0 0 1px var(--edge-out), var(--shadow-lift);
    backdrop-filter: blur(40px) saturate(1.4);
    -webkit-backdrop-filter: blur(40px) saturate(1.4);
    overflow-x: auto; scrollbar-width: none;
  }
  .top-nav::-webkit-scrollbar { display: none; }
  .top-nav a { white-space: nowrap; font-size: 12.5px; padding: 4px 8px; }
  .top-nav a[aria-current="page"]::after { bottom: -4px; }
  main { padding-bottom: 76px; }
  .view { padding: 20px var(--gutter) 40px; gap: 26px; }
  .topbar { padding: 24px var(--gutter) 0; }
  .hero { padding: 32px 0 0; }
  .netpill { display: none; }
  .op { grid-template-columns: 1fr; gap: 6px; }
  .running-row { flex-direction: column; gap: 2px; }
  .running-row .k { width: auto; }
  .diagram { padding: 12px; overflow-x: auto; }
  /* The drawing has a minimum width below which its labels collide; it scrolls
     sideways inside its own box rather than shrinking into illegibility. */
  .diagram svg { min-width: 620px; }
  .foot { padding: 22px var(--gutter) 90px; }
}
