/* Stein Chain brand tokens: the navy and blue of steinscan and steinwallet. */
:root {
  --bg: #070d1a;
  --bg-deep: #040913;
  --panel: #0b1426;
  --fg: #f1f5f9;
  --muted: #94a3b8;
  --faint: #64748b;
  --line: #1e293b;
  --brand: #1366d6;
  --accent: #3b82f6;
  --accent-soft: #60a5fa;
  --ok: #34d399;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 520px at 50% -160px, rgba(19, 102, 214, 0.25), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--fg); }

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--brand);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}

:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Header */
.top { border-bottom: 1px solid #0f1a2e; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); }
.mark { width: 36px; height: 36px; flex: none; }
.mark.small { width: 28px; height: 28px; }
.wordmark { font-weight: 650; font-size: 1.5rem; letter-spacing: -0.015em; }
.wordmark.small { font-size: 0.95rem; }
.accent { color: var(--accent-soft); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-size: 0.92rem; }
.nav a:hover { color: var(--fg); }
.nav .gh { display: flex; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.97rem;
  border: 1px solid var(--brand);
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-small { padding: 7px 14px; font-size: 0.88rem; }
/* A button with an icon before its label. */
.btn-icon { gap: 8px; }
.btn-icon svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-ghost { background: transparent; border-color: #334155; color: var(--fg) !important; }
.btn-ghost:hover { background: #0f1a2e; border-color: var(--accent); }
.link { font-weight: 600; font-size: 0.95rem; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 88px 0 72px; }
/* The video behind the hero, dimmed and tinted navy so the text over it reads. */
.hero-bg { position: absolute; inset: 0; z-index: 0; background: var(--bg-deep); }
.hero-bg video { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 13, 26, 0.86) 0%, rgba(7, 13, 26, 0.6) 48%, rgba(7, 13, 26, 0.34) 100%),
    linear-gradient(180deg, rgba(7, 13, 26, 0.3) 0%, rgba(7, 13, 26, 0) 28%, rgba(7, 13, 26, 0.55) 82%, var(--bg) 100%);
}
.hero > .wrap { position: relative; z-index: 1; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 5px 12px;
  border: 1px solid #1e3a5f;
  border-radius: 999px;
  background: rgba(19, 102, 214, 0.1);
  color: var(--accent-soft);
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.pill.live .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15); }
.pill.down .dot { background: #f59e0b; }

h1 {
  margin: 0 0 20px;
  max-width: 820px;
  font-size: clamp(2.3rem, 5.2vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.lede { max-width: 720px; margin: 0 0 32px; color: #cbd5e1; font-size: 1.15rem; }
.lede strong { color: var(--fg); font-weight: 600; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }

.status {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 56px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}
.status > div { background: rgba(11, 20, 38, 0.92); padding: 16px 18px; }
.status .wide { grid-column: 1 / -1; }
.status .half { grid-column: span 2; }
.status dt { color: var(--faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.status dd {
  margin: 4px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.25rem;
  color: var(--fg);
  overflow-wrap: anywhere;
}
.status .wide dd, .status .half dd { font-size: 0.98rem; color: #cbd5e1; overflow-wrap: anywhere; }
.status dd.sub { margin-top: 2px; color: var(--faint); font-family: inherit; font-size: 0.74rem; font-weight: 400; overflow-wrap: anywhere; }
.fine { margin: 0; color: var(--faint); font-size: 0.8rem; }

/* Sections */
section { padding: 80px 0; }
.band { background: rgba(4, 9, 19, 0.55); border-top: 1px solid #0f1a2e; border-bottom: 1px solid #0f1a2e; }
h2 { margin: 0 0 12px; font-size: clamp(1.7rem, 3vw, 2.25rem); letter-spacing: -0.02em; line-height: 1.2; }
h3 { margin: 0 0 8px; font-size: 1.06rem; }
/* A section's opening lines run the full width of the column. */
.sub { margin: 0 0 36px; color: var(--muted); }
p { margin: 0 0 14px; }

.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.two p { color: #cbd5e1; }
.checks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.checks li {
  padding: 14px 16px 14px 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: #cbd5e1;
  position: relative;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 19px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.checks b { color: var(--fg); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* How it works: cards that turn over like a coin when pressed. */
.flip {
  display: block; height: 232px; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer; perspective: 1100px;
}
.flip-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.3, 0.7, 0.2, 1); }
.flip[aria-pressed="true"] .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; display: flex; flex-direction: column; padding: 22px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(19, 102, 214, 0.06), rgba(11, 20, 38, 0.6)), var(--bg);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.flip-front { align-items: center; justify-content: center; gap: 16px; text-align: center; }
.flip-front svg {
  width: 58px; height: 58px; overflow: visible;
  color: var(--accent-soft); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.2s;
}
.flip-title { font-size: 1.06rem; font-weight: 600; color: var(--fg); line-height: 1.3; }
.flip-hint { color: var(--faint); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0; transition: opacity 0.2s; }
.flip:hover .flip-front, .flip:focus-visible .flip-front { border-color: rgba(59, 130, 246, 0.6); }
.flip:hover .flip-front svg { transform: scale(1.08); }
.flip:hover .flip-hint, .flip:focus-visible .flip-hint { opacity: 1; }
.flip-back { transform: rotateY(180deg); gap: 10px; border-color: rgba(59, 130, 246, 0.45); overflow-y: auto; }
.flip-text { color: #dbe3ee; font-size: 0.92rem; line-height: 1.55; text-shadow: 0 1px 10px rgba(4, 9, 19, 0.9); }
/* A picture behind each card's explanation, under a navy veil that keeps the words readable. */
.flip-back { --veil: linear-gradient(180deg, rgba(7, 13, 26, 0.28), rgba(7, 13, 26, 0.52)); background-size: cover; background-position: center; }
.flip-back .flip-title { text-shadow: 0 1px 10px rgba(4, 9, 19, 0.9); }
.back-blocks { background-image: var(--fade), url("/how/blocks.jpg"); }
.back-transfers { background-image: var(--fade), url("/how/transfers.jpg"); }
.back-verified { background-image: var(--fade), url("/how/verified.jpg"); }
.back-safe { background-image: var(--veil), url("/how/safe.jpg"); }
.back-roles { background-image: var(--fade), url("/how/roles.jpg"); }
.back-shards { background-image: var(--fade), url("/how/shards.jpg"); }
/* Five pictures have their subject at the lower right. They are drawn smaller,
   in that corner and clear of the words, and fade into the card above and to
   the left, so no edge shows. */
.back-blocks, .back-transfers, .back-verified, .back-roles, .back-shards {
  --fade: linear-gradient(180deg, #050a14 30%, rgba(5, 10, 20, 0) 62%), linear-gradient(90deg, #050a14 30%, rgba(5, 10, 20, 0) 58%);
  background-color: #050a14; background-repeat: no-repeat;
  background-size: auto, auto, 70% auto; background-position: center, center, right bottom;
}
/* Without scripts nothing can be pressed: show each card's text under its title. */
@media (scripting: none) {
  .flip { height: auto; cursor: default; }
  .flip-inner { transform: none !important; }
  .flip-face { position: static; }
  .flip-front { display: none; }
  .flip-back { transform: none; }
}
/* No turning for a visitor who asks for less motion: the sides swap at once. */
@media (prefers-reduced-motion: reduce) { .flip-inner { transition: none; } }
.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(19, 102, 214, 0.06), rgba(11, 20, 38, 0.6));
}
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 40px; }
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(19, 102, 214, 0.1), rgba(11, 20, 38, 0.7));
  overflow: hidden;
}
/* A short rule of the brand's blue along the top of each figure. */
.stat::before { content: ""; position: absolute; left: 22px; top: 0; width: 38px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.stat .big { font-size: 2.15rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--fg); font-variant-numeric: tabular-nums; }
.stat .big small { font-size: 0.5em; font-weight: 600; letter-spacing: 0; color: var(--accent-soft); }
.stat span:last-child { color: var(--muted); font-size: 0.88rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(11, 20, 38, 0.6); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.94rem; min-width: 640px; }
caption { caption-side: bottom; text-align: left; padding: 14px 20px; color: var(--faint); font-size: 0.8rem; border-top: 1px solid var(--line); }
th, td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { color: var(--muted); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(4, 9, 19, 0.6); }
tbody th { color: #cbd5e1; font-weight: 500; }
td { color: var(--muted); font-variant-numeric: tabular-nums; }
tbody tr:hover th, tbody tr:hover td { background-color: rgba(148, 163, 184, 0.04); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
/* Stein's column stands out: lit, and set between two blue rules. */
.compare th.us, .compare td:last-child {
  color: var(--fg); font-weight: 600;
  background-color: rgba(59, 130, 246, 0.1);
  border-left: 1px solid rgba(59, 130, 246, 0.4); border-right: 1px solid rgba(59, 130, 246, 0.4);
}
.compare tbody tr:hover td:last-child { background-color: rgba(59, 130, 246, 0.16); }
.compare th.us { color: var(--fg); border-top: 2px solid var(--accent); }
/* A chain's own mark before its name, in the table's headings. */
.chain-name { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.chain-icon { width: 22px; height: 22px; flex: none; }
.compare th.us .tag { margin-left: 8px; padding: 1px 8px; font-size: 0.66rem; letter-spacing: 0.06em; border-color: rgba(59, 130, 246, 0.5); color: var(--accent-soft); }
.compare td.yes, .compare td.no { font-weight: 600; }
.compare td.yes { color: var(--ok); }
.compare td.no { color: var(--faint); }
.compare td.yes::before, .compare td.no::before {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-right: 8px; border-radius: 50%; font-size: 0.7rem; line-height: 1;
}
.compare td.yes::before { content: "\2713"; background: rgba(52, 211, 153, 0.16); color: var(--ok); }
.compare td.no::before { content: "\2715"; background: rgba(148, 163, 184, 0.12); color: var(--faint); }
/* For screen readers only. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Roadmap: a timeline track on the left that fills as the section scrolls by. */
.road-wrap { position: relative; padding-left: 40px; }
.road-track {
  position: absolute;
  left: 13px;
  top: 22px;
  bottom: 22px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.road-fill {
  position: absolute;
  inset: 0;
  transform-origin: 50% 0;
  transform: scaleY(0);
  background: linear-gradient(180deg, var(--ok), var(--accent) 55%, rgba(59, 130, 246, 0.2));
}
.road { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.road li {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 20, 38, 0.5);
  transition: border-color 0.4s, background 0.4s;
}
.road li.lit { border-color: #1e3a5f; background: rgba(19, 102, 214, 0.07); }
.marker {
  position: absolute;
  left: -33px;
  top: 21px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #334155;
  background: var(--bg);
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.road li.done.lit .marker { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15); }
.road li.next .marker { border-color: var(--accent-soft); background: var(--accent); }
.marker .ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--accent-soft);
  opacity: 0;
}
.road b { color: var(--fg); }
.road p { margin: 2px 0 0; color: var(--muted); font-size: 0.93rem; }
.tag {
  justify-self: start;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #334155;
  color: var(--muted);
}
.road li.done .tag { color: var(--ok); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); }
.road li.next .tag { color: var(--accent-soft); border-color: rgba(96, 165, 250, 0.45); background: rgba(59, 130, 246, 0.1); }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent-soft); font-weight: 400; font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { margin: 12px 0 0; color: var(--muted); }

/* Forms: the message form on the home page, and the inbox page. */
.label {
  display: block;
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
textarea, input[type="password"], input[type="file"], input[type="text"], input[type="email"],
input[type="tel"], input[type="search"] {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(4, 9, 19, 0.6);
  color: var(--fg);
  font: inherit;
  font-size: 0.97rem;
}
textarea { min-height: 190px; resize: vertical; }
textarea::placeholder { color: var(--faint); }
textarea:focus, input:focus { outline: none; border-color: var(--accent); }
input[type="file"] { color: var(--muted); font-size: 0.88rem; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.count { color: var(--faint); font-size: 0.8rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.count.over { color: #f59e0b; }
button.btn { font-family: inherit; cursor: pointer; }
button.btn:disabled { opacity: 0.45; cursor: default; }
.btn-quiet { background: none; border-color: transparent; color: var(--faint) !important; font-weight: 500; padding-left: 0; padding-right: 0; }
.btn-quiet:hover { background: none; border-color: transparent; color: #f59e0b !important; }
.form-state, .card p.form-state { min-height: 1.6em; margin: 12px 0 0; font-size: 0.88rem; color: var(--muted); }
.form-state.ok, .card p.form-state.ok { color: var(--ok); }
.form-state.bad, .card p.form-state.bad { color: #f59e0b; }
.form-fine { margin-top: 16px; }
/* The contact form: what it promises on the left, the fields on the right. */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
/* Every section's title: an icon in a tile, then the words. */
h2.titled { display: flex; align-items: center; gap: 16px; }
h2.titled svg {
  box-sizing: content-box; width: 24px; height: 24px; padding: 9px; flex: none;
  border: 1px solid rgba(59, 130, 246, 0.35); border-radius: 12px; background: rgba(59, 130, 246, 0.12);
  color: var(--accent-soft); fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.contact h2 { margin-bottom: 14px; }
.contact-lede { margin: 0 0 30px; max-width: 46ch; color: #cbd5e1; font-size: 1.03rem; }
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 18px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); }
.contact-list .k { color: var(--faint); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.contact-list .v { color: #cbd5e1; font-size: 0.9rem; }
/* An info tip beside a heading: a note shown when the icon is hovered, focused or pressed. */
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.title-row h2 { margin: 0; }
.tip { position: relative; display: inline-flex; }
.tip-button {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px;
  border: 0; border-radius: 8px; background: none; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 0.82rem; font-weight: 500;
}
.tip-button svg { width: 20px; height: 20px; flex: none; color: var(--accent-soft); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tip:hover .tip-button, .tip.open .tip-button { color: var(--fg); }
.tip-note {
  display: none; position: absolute; top: 100%; left: 0; z-index: 5; width: min(380px, 80vw);
  padding: 12px 14px; border: 1px solid #334155; border-radius: 10px;
  background: var(--panel); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  color: var(--muted); font-size: 0.8rem; font-weight: 400; line-height: 1.55;
}
.tip:hover .tip-note, .tip:focus-within .tip-note, .tip.open .tip-note { display: block; }
/* With a mouse and room for it, the icon alone: its label is for screen readers. */
@media (hover: hover) and (min-width: 901px) {
  .tip-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px;
  color: var(--muted); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.form-group label .count { margin-left: auto; letter-spacing: 0; font-size: 0.72rem; }
.form-group input, .form-group textarea { padding: 13px 15px; background: var(--panel); transition: border-color 0.2s, box-shadow 0.2s; }
.form-group input:hover, .form-group textarea:hover { border-color: #334155; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16); }
.form-group textarea { min-height: 150px; }
.btn-wide { display: flex; width: 100%; padding: 15px 20px; }
.btn-wide + .btn-wide { margin-top: 10px; }
.contact-form .form-state { min-height: 0; margin-top: 16px; }
.contact-form .form-state:empty { display: none; }
.contact-form .form-state.ok, .contact-form .form-state.bad { padding: 12px 16px; border-radius: 10px; font-size: 0.86rem; }
.contact-form .form-state.ok { background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.35); }
.contact-form .form-state.bad { background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.35); }
.form input::placeholder { color: var(--faint); }
.optional { text-transform: none; letter-spacing: 0; opacity: 0.7; }
.form-fine b { color: var(--muted); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
/* Tokens and liquidity pools: two cards of points, then the transaction types. */
.built { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: -18px 0 28px; color: var(--muted); font-size: 0.92rem; }
.built .tag { color: var(--ok); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); }
.defi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.defi .card { padding: 26px; }
.defi h3 { margin-bottom: 16px; font-size: 1.2rem; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.points li { position: relative; padding-left: 20px; color: var(--muted); font-size: 0.95rem; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.points b { color: var(--fg); font-weight: 600; }
.tx-types { list-style: none; margin: 22px 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tx-types code {
  display: block; padding: 6px 12px; border: 1px solid #1e3a5f; border-radius: 999px;
  background: rgba(19, 102, 214, 0.1); color: var(--accent-soft);
  font-size: 0.8rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Our team: a card each, with a round photo. */
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.member { display: flex; flex-direction: column; align-items: center; padding: 34px 22px 28px; text-align: center; }
.member-photo {
  width: 168px; height: 168px; border-radius: 50%; object-fit: cover; background: var(--panel);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent), 0 18px 40px rgba(0, 0, 0, 0.45);
}
.member h3 { margin: 24px 0 4px; font-size: 1.22rem; letter-spacing: -0.01em; }
.card p.member-role { color: var(--accent-soft); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.card p.member-focus { margin-top: 10px; color: var(--fg); font-size: 0.98rem; font-weight: 500; }
.card p.member-place { margin-top: 4px; color: var(--muted); font-size: 0.88rem; }
.member-link { margin-top: 20px; }
.member-link svg { fill: currentColor; stroke: none; }

/* An inbox for your wallet: three steps, then what is kept beside the buttons. */
.steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step { position: relative; padding-top: 26px; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-bottom: 14px;
  border: 1px solid rgba(59, 130, 246, 0.45); border-radius: 50%;
  background: rgba(59, 130, 246, 0.12); color: var(--accent-soft);
  font-size: 0.82rem; font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* The line that joins one step to the next. */
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 41px; left: 66px; right: -19px;
  border-top: 1px dashed #334155;
}
.wallet-panel { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; align-items: center; padding: 26px; }
.wallet-panel .contact-list { border-top: 0; }
.wallet-panel .contact-list li:first-child { padding-top: 0; }
.wallet-panel .contact-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.wallet-actions .form-state { min-height: 0; margin-top: 16px; }
.wallet-actions .form-state:empty { display: none; }
.wallet-actions .form-state.ok, .wallet-actions .form-state.bad { padding: 12px 16px; border-radius: 10px; font-size: 0.86rem; }
.wallet-actions .form-state.ok { background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.35); }
.wallet-actions .form-state.bad { background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.35); }

/* Inbox page */
.inbox .wrap > * { max-width: 760px; }
.inbox form .label { margin-top: 16px; }
.inbox form .label:first-of-type { margin-top: 14px; }
.inbox .tag { display: inline-block; }
textarea.key { min-height: 0; font: 0.75rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.inbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inbox-bar .label { margin: 0; }
.inbox-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.messages { display: grid; gap: 12px; margin-top: 4px; }
.card.msg p { margin: 8px 0 0; color: var(--fg); font-size: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.card.msg p.unread { color: var(--faint); font-style: italic; }
.card.msg .label { margin: 0; text-transform: none; letter-spacing: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.signer { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ok); font-size: 0.82rem; overflow-wrap: anywhere; }
.signer.bad { color: #f59e0b; }
.address { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; }
.wallets-head { margin: 40px 0 6px; }
.wallets { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; color: var(--faint); font-size: 0.8rem; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

/* The mail reader (/admin and /mailbox): folders, a list, a reading pane. */
/* As wide as the page's column, like the reader: the card that opens a wallet's inbox. */
.inbox .wrap > .mail, .inbox .wrap > #view-closed, .inbox .wrap > .sub { max-width: none; }
.narrow-card p { margin-top: 12px; }
.mail-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mail-bar .label { margin: 0; flex: 1 1 auto; }
.mail-bar input[type="search"] { flex: 1 1 220px; max-width: 340px; padding: 8px 12px; font-size: 0.9rem; }
.mail .form-state:empty { display: none; }
.mail-frame {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  min-height: 520px;
}
.mail-folders { display: flex; flex-direction: column; gap: 4px; padding: 12px 10px; border-right: 1px solid var(--line); background: rgba(4, 9, 19, 0.5); }
.mail-folder {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font: inherit; font-size: 0.9rem; text-align: left; cursor: pointer;
}
.mail-folder:hover { background: #0f1a2e; color: var(--fg); }
.mail-folder.selected { background: rgba(59, 130, 246, 0.16); color: var(--fg); font-weight: 600; }
.mail-n { color: var(--accent-soft); font-size: 0.78rem; font-weight: 600; }
.mail-panes { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); min-width: 0; }
.mail-list { border-right: 1px solid var(--line); max-height: 72vh; overflow-y: auto; }
.mail-row {
  display: block; width: 100%; padding: 11px 14px 11px 18px;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--muted); font: inherit; text-align: left; cursor: pointer; position: relative;
}
.mail-row:hover { background: #0f1a2e; }
.mail-row.selected { background: rgba(59, 130, 246, 0.14); }
.mail-row.unread::before { content: ""; position: absolute; left: 6px; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.mail-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mail-from { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; color: #cbd5e1; }
.mail-row.unread .mail-from { color: var(--fg); font-weight: 650; }
.mail-badge { margin-left: 8px; padding: 1px 6px; border: 1px solid rgba(52, 211, 153, 0.4); border-radius: 999px; color: var(--ok); font-size: 0.66rem; font-weight: 500; vertical-align: 1px; }
.mail-day { flex: none; color: var(--faint); font-size: 0.74rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mail-subject { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.84rem; }
.mail-row.unread .mail-subject { color: #cbd5e1; }
.mail-empty { margin: 0; padding: 28px 18px; color: var(--faint); font-size: 0.88rem; text-align: center; }
.mail-read { min-width: 0; padding: 22px 26px 26px; max-height: 72vh; overflow-y: auto; }
.mail-back { display: none; margin-bottom: 16px; }
.mail-title { margin: 0 0 14px; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.mail-fields { display: grid; gap: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.mail-field { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 10px; }
.mail-field-label { color: var(--faint); }
.mail-field-value { color: #cbd5e1; overflow-wrap: anywhere; }
.mail-field-value .warn { color: #f59e0b; }
.mail-body { margin: 18px 0 0; color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-body.unreadable { color: var(--faint); font-style: italic; }
/* Room for the scrollbar is kept, so the page does not shift sideways when a long message makes it scroll. */
html:has(main.inbox) { scrollbar-gutter: stable; }
/* What can be done with the selected message: above the reader, always in the same place. */
.mail-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mail-tools + .form-state { margin-top: 10px; }
.mail-tools a[aria-disabled="true"] { opacity: 0.45; pointer-events: none; cursor: default; }
.mail-wallets { padding: 22px 26px; }
.mail-wallets h3 { margin: 0 0 6px; }
.mail-share { margin-top: 22px; max-width: 760px; }
.mail-share .label { text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; }
.mail-link { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .mail-frame { grid-template-columns: minmax(0, 1fr); }
  .mail-folders { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); }
  .mail-panes { grid-template-columns: minmax(0, 1fr); }
  .mail-list { border-right: 0; }
  .mail-read { display: none; }
  .mail-panes.reading .mail-list { display: none; }
  .mail-panes.reading .mail-read { display: block; }
  .mail-back { display: inline-block; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .tip { display: block; flex: 1 1 100%; }
  .tip-button { padding-left: 0; }
  .tip-note { position: static; width: auto; margin-top: 6px; box-shadow: none; }
  .steps, .wallet-panel { grid-template-columns: minmax(0, 1fr); }
  .team { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
  .defi { grid-template-columns: minmax(0, 1fr); }
  .wallet-panel { gap: 24px; }
  .step:not(:last-child)::after { content: none; }
}
@media (max-width: 640px) {
  .contact-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* Footer */
.foot { background: var(--bg-deep); border-top: 1px solid #0f1a2e; padding: 32px 0 28px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.foot-nav .social { display: flex; }
.foot-nav a { color: var(--muted); font-size: 0.9rem; }
.foot-nav a:hover { color: var(--accent-soft); }
.legal {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #0f172a;
  color: #475569;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.legal.credits { margin-top: 8px; padding-top: 0; border-top: 0; font-family: inherit; }
.legal.credits a { color: inherit; text-decoration: underline; }

/* Hero: copy on the left, the lattice and the latest blocks on the right. */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px; align-items: center; }
.hero h1 { max-width: none; }
.grad {
  background: linear-gradient(100deg, #60a5fa 0%, #a5f3fc 30%, #3b82f6 60%, #34d399 100%);
  background-size: 250% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Words of the headline, split by app.js so they can rise in one by one. */
.word { display: inline-block; white-space: nowrap; }

/* A frosted panel under the lattice and the latest blocks, so they read over the video. */
.hero-visual {
  position: relative; padding: 18px 18px 16px;
  border: 1px solid rgba(148, 163, 184, 0.14); border-radius: 18px;
  background: rgba(7, 13, 26, 0.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
#lattice { display: block; width: 100%; height: auto; overflow: visible; }
#lattice .edge { stroke: #1e3a5f; stroke-width: 1; fill: none; }
#lattice .pt { fill: #3b82f6; }
#lattice .beam { stroke: #93c5fd; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* The quantum side, in violet: qubits as Bloch spheres, their probes and the
   interference they spread. The lattice answers in blue and green. */
#lattice .wave { fill: none; stroke: #a78bfa; stroke-width: 1; opacity: 0; }
#lattice .q-shell { fill: rgba(139, 92, 246, 0.08); stroke: #a78bfa; stroke-width: 1.2; }
#lattice .q-orbit { fill: none; stroke: rgba(196, 181, 253, 0.55); stroke-width: 0.9; }
#lattice .q-core { fill: #c4b5fd; }
#lattice .q-vec { stroke: #e9d5ff; stroke-width: 1.6; stroke-linecap: round; }
#lattice .q-tip { fill: #f5f3ff; filter: url(#glow); }
#lattice .probe { fill: none; stroke: #c084fc; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#lattice .shield { fill: none; stroke: #34d399; }

/* The live panel's header, legend and last transfer. */
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.live-title { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: live-pulse 2s ease-out infinite; }
.hero-visual.down .live-dot { background: #f59e0b; animation: none; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); } 100% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } }
.live-beat { color: var(--muted); font-size: 0.74rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.legend { list-style: none; margin: 2px 0 14px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; color: var(--muted); font-size: 0.72rem; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 9px; height: 9px; border-radius: 50%; }
.key-q { background: #a78bfa; }
.key-s { border: 2px solid #34d399; }
.key-b { background: #93c5fd; }
/* Under the status table: whether the devnet is up, and who is making its blocks. */
.live-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: var(--muted); }
.live-note #st-note-state:empty { display: none; }
.live-note a { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.live-note.down .live-dot { background: #f59e0b; animation: none; }

/* The last transfer, in the status table: a link to it on the explorer, lit briefly when a new one arrives. */
.status .live-tx a { color: inherit; }
.status .live-tx a[href]:hover { color: var(--accent-soft); }
.status .live-tx.flash { animation: live-flash 1.6s ease-out; }
@keyframes live-flash { 0% { background: rgba(59, 130, 246, 0.3); } 100% { background: rgba(11, 20, 38, 0.92); } }
@media (prefers-reduced-motion: reduce) { .live-dot, .live-tx.flash { animation: none; } }

.chain-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 8px;
  color: var(--faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
#chain-state { text-transform: none; letter-spacing: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
/* The tape of latest blocks: it runs right to left and never ends. */
.chain {
  height: 58px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.tape { display: flex; width: max-content; animation: tape-run var(--tape-seconds, 48s) linear infinite; }
.tape-row { display: flex; gap: 10px; padding-right: 10px; }
/* Held still while a block is pointed at or focused, so it can be read and clicked. */
.chain:hover .tape, .chain:focus-within .tape { animation-play-state: paused; }
@keyframes tape-run { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .tape { animation: none; }
  .tape-row[aria-hidden="true"] { display: none; }
}
.blk {
  position: relative;
  flex: 0 0 104px;
  padding: 8px 10px;
  border: 1px solid #1e3a5f;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(19, 102, 214, 0.18), rgba(11, 20, 38, 0.9));
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.blk::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 50%;
  width: 10px;
  height: 2px;
  background: #1e3a5f;
}
a.blk { display: block; color: inherit; transition: border-color 0.15s; }
a.blk:hover { border-color: var(--accent); }
.blk .h { display: block; color: var(--fg); font-size: 0.86rem; font-weight: 600; }
.blk .x { display: block; color: var(--accent-soft); font-size: 0.7rem; letter-spacing: 0.02em; white-space: nowrap; }
.blk.new { border-color: var(--accent); box-shadow: 0 0 18px rgba(59, 130, 246, 0.35); }

/* Start hidden only when scripts run and motion is allowed; app.js reveals them.
   The CSS animation is a fallback: if the script never runs, everything appears after 2.5 s. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  [data-intro], #hero-title, .hero-visual, .road li {
    opacity: 0;
    animation: reveal-fallback 0.01s 2.5s forwards;
  }
  .road li { animation-delay: 4s; }
}
@keyframes reveal-fallback { to { opacity: 1; } }

@media (max-width: 900px) {
  /* minmax(0, ...): the row of block cards must not widen the column past the screen. */
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero-visual { max-width: 560px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .nav a:not(.btn):not(.gh) { display: none; }
  /* The header already has the inbox button. */
  .ctas .hero-inbox { display: none; }
  /* In the menu, the icon alone: its label would not fit. */
  .nav .btn-ghost.btn-icon span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .nav .btn-ghost.btn-icon { padding-left: 10px; padding-right: 10px; }
  .nav { gap: 12px; }
  .hero { padding: 56px 0 48px; }
  section { padding: 56px 0; }
  .grid { grid-template-columns: 1fr; }
  .status { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat .big { font-size: 1.5rem; }
  .road li { grid-template-columns: 1fr; gap: 8px; }
  .road-wrap { padding-left: 30px; }
  .road-track { left: 8px; }
  .marker { left: -28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* On the narrowest phones the Wallet button, too, shows its icon alone. */
@media (max-width: 400px) {
  .nav .btn-icon span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .nav .btn-icon { padding-left: 10px; padding-right: 10px; }
}
