/* toip.tools — a field guide and workbench.
   Warm paper, evergreen ink, vermilion wayfinding, and serif display type.
   Recursive keeps prose and protocol details in the same typographic family. */

@font-face {
  font-family: "Recursive";
  font-style: normal;
  font-display: swap;
  font-weight: 300 1000;
  src: url("../fonts/recursive-latin-mono.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Recursive";
  font-style: normal;
  font-display: swap;
  font-weight: 300 1000;
  src: url("../fonts/recursive-latin-ext-mono.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f7f3eb;
  --paper-2: #eee8dc;
  --paper-3: #ded7c9;
  --surface: #fffdf8;
  --ink: #1e372f;
  --ink-2: #58635a;
  --rule: #d5cec0;
  --accent: #b4462b;
  --wire: #142c26;
  --wire-2: #233f35;
  --wire-ink: #e8eee4;
  --wire-dim: #aebeb1;
  --verified: #176346;
  --refused: #a1286a;
  --focus: #2350d8;

  --sans: "Recursive", ui-sans-serif, system-ui, sans-serif;
  --display: Georgia, "Times New Roman", serif;
  --mono-axis: "MONO" 1;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.625rem;
  --step-3: 2.0625rem;
  --step-4: 2.625rem;
  --step-5: 3.375rem;

  --measure: 42rem;
  --wide: 76rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.75;
  font-variation-settings: "MONO" 0;
}

code,
pre,
kbd,
samp,
.mono {
  font-family: var(--sans);
  font-variation-settings: "MONO" 1;
  font-size: 0.92em;
}

/* ── Type ─────────────────────────────────────────────── */

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 {
  font-family: var(--display);
  font-size: clamp(var(--step-3), 5.2vw, var(--step-5));
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}
h2 {
  font-family: var(--display);
  font-size: clamp(var(--step-2), 3.4vw, var(--step-3));
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-top: 2.4em;
}
h3 {
  font-size: var(--step-1);
  font-weight: 700;
  margin-top: 2em;
}
h4 {
  font-size: var(--step-0);
  font-weight: 700;
  margin-top: 1.6em;
}
h1 em {
  color: var(--accent);
  font-weight: inherit;
}
p,
ul,
ol,
dl {
  margin: 0 0 1em;
}
li + li {
  margin-top: 0.35em;
}
strong {
  font-weight: 700;
}
small,
.small {
  font-size: var(--step--1);
}
.lede {
  font-size: clamp(1.15rem, 2.2vw, var(--step-1));
  line-height: 1.65;
  color: var(--ink);
}
.quiet {
  color: var(--ink-2);
}
.eyebrow {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variation-settings: "MONO" 1;
}
.eyebrow__dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  background: currentColor;
  border-radius: 50%;
  margin-right: 0.45rem;
}
::selection {
  background: #f4c7aa;
  color: var(--ink);
}

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: color-mix(in oklab, var(--accent) 65%, transparent);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.14em;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

:not(pre) > code {
  background: var(--paper-2);
  padding: 0.08em 0.3em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
a > code {
  background: none;
  padding: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

/* ── Frame ────────────────────────────────────────────── */

.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.9rem;
  z-index: 10;
}
.skip:focus {
  top: 0.5rem;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 2rem;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-variation-settings: "MONO" 1;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.mark svg {
  display: block;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li + li {
  margin: 0;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 550;
  padding: 0.35rem 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--rule);
}
.site-nav a[aria-current="page"],
.site-nav a[aria-current="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

main {
  display: block;
  padding-bottom: 5rem;
}

.page-head {
  padding: 4.5rem 0 1.5rem;
}
.page-head h1 {
  max-width: 22ch;
  font-size: clamp(2.8rem, 5.5vw, 4.6rem);
}
.page-head .lede {
  max-width: var(--measure);
  color: var(--ink-2);
}

.prose {
  max-width: var(--measure);
}
.prose > :first-child {
  margin-top: 0;
}

.site-foot {
  border-top: 1px solid var(--rule);
  padding: 3.5rem 0;
  background: var(--ink);
  color: #d4ddcc;
  font-size: var(--step--1);
}
.site-foot a,
.site-foot .mark {
  color: var(--paper);
}
.site-foot p {
  max-width: 60ch;
  margin-top: 1rem;
}
.site-foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.4rem;
  list-style: none;
  padding: 0;
}
.site-foot li + li {
  margin: 0;
}

/* ── Two-column docs layout ───────────────────────────── */

.docs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}
@media (min-width: 62rem) {
  .docs {
    grid-template-columns: 13.5rem minmax(0, 1fr);
    gap: 3.5rem;
  }
  .docs__side {
    position: sticky;
    top: 2rem;
    align-self: start;
    max-height: calc(100vh - 3rem);
    overflow: auto;
  }
}
.docs__side {
  font-size: var(--step--1);
  padding-top: 4.7rem;
}
@media (max-width: 61.99rem) {
  .docs--side-last > .docs__side {
    order: 2;
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
  }
}
.docs__side .side-h {
  font-size: 0.7rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--ink-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.docs__side ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.docs__side li + li {
  margin-top: 0.15rem;
}
.docs__side a {
  text-decoration: none;
  display: block;
  padding: 0.4rem 0.7rem;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--ink-2);
}
.docs__side a:hover {
  color: var(--ink);
  border-left-color: var(--rule);
  background: var(--paper-2);
}
.docs__side a[aria-current="page"] {
  color: var(--ink);
  font-weight: 650;
  border-left-color: var(--verified);
  background: #e4e8db;
}
.docs__side code {
  font-size: 0.95em;
  background: none;
  padding: 0;
}

/* ── Code ─────────────────────────────────────────────── */

.code {
  margin: 1.75rem 0 2.25rem;
  border: 1px solid #304a3f;
  border-radius: 12px;
  background: var(--wire);
  color: var(--wire-ink);
  position: relative;
  max-width: 100%;
  min-width: 0;
  box-shadow: 0 12px 30px -22px #183c3566;
}
.code figcaption {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.85rem;
  min-height: 3.25rem;
  font-size: 0.72rem;
  color: var(--wire-dim);
  padding: 0.8rem 5rem 0.8rem 1.25rem;
  font-variation-settings: "MONO" 1;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #ffffff14;
  line-height: 1.5;
}
.code__language {
  flex: none;
  color: #dfd5b1;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  border: 1px solid #ffffff26;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
}
.code__title {
  min-width: 0;
}
.code pre {
  margin: 0;
  padding: 1.35rem 1.5rem 1.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.85;
  background: transparent !important;
  tab-size: 2;
}
.code pre:focus-visible {
  outline-offset: -3px;
  outline-color: #9db5ff;
}
@media (max-width: 40rem) {
  .code pre {
    font-size: 0.78rem;
    padding: 1rem;
  }
  .code figcaption {
    flex-wrap: wrap;
    padding-left: 1rem;
  }
}
.code pre code {
  font-size: inherit;
  background: none;
  padding: 0;
}
.code--output {
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--paper-3);
  box-shadow: none;
}
.code--output figcaption {
  color: var(--ink-2);
  border-bottom-color: var(--rule);
  padding-right: 1.25rem;
}
.code--output .code__language {
  color: var(--verified);
  border-color: var(--rule);
}
.code--output pre:focus-visible {
  outline-color: var(--focus);
}
.copy {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--wire-ink);
  background: var(--wire-2);
  border: 1px solid #486357;
  border-radius: 5px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}
.copy:hover {
  background: #345447;
}
.copy:focus-visible {
  outline-color: #9db5ff;
}
.code--output .copy {
  display: none;
}

.cmd {
  margin: 1rem 0 1.4rem;
}

/* ── Buttons ──────────────────────────────────────────── */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.4rem;
  align-items: center;
  margin-top: 1.8rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: var(--accent);
  color: var(--paper);
  text-decoration: none;
  font-weight: 650;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 7px;
  font-size: 0.9rem;
  box-shadow: 0 3px 0 #68261216;
}
.btn:hover {
  background: #91351f;
  color: #fff;
}

/* ── DIDs and fingerprints ────────────────────────────── */

.did {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  vertical-align: middle;
}
.did code {
  background: none;
  padding: 0;
  overflow-wrap: anywhere;
}
.did__name {
  font-weight: 700;
}
.fp {
  flex: none;
  display: block;
  border-radius: 1px;
}

/* ── The hero: the wire ───────────────────────────────── */

.hero {
  padding: 4rem 0 3rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 66rem) {
  .hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 4rem;
    padding-top: 5rem;
    padding-bottom: 4rem;
    align-items: center;
  }
}
.hero h1 {
  max-width: 13ch;
  font-size: clamp(3.8rem, 6.9vw, 6.1rem);
  line-height: 0.98;
  margin-bottom: 0.4em;
}
.hero .lede {
  max-width: 34rem;
}
.hero__facts {
  display: flex;
  gap: 2rem;
  padding-top: 1.5rem;
  margin: 2rem 0 0;
  border-top: 1px solid var(--rule);
}
.hero__facts div {
  display: flex;
  flex-direction: column-reverse;
}
.hero__facts dt {
  color: var(--ink-2);
  font-size: 0.7rem;
  font-variation-settings: "MONO" 1;
}
.hero__facts dd {
  margin: 0;
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1.2;
}

.wire {
  margin: 0;
  font-size: 0.8rem;
  position: relative;
  isolation: isolate;
  filter: drop-shadow(0 14px 20px #233f3512);
}
.wire::before {
  content: "";
  position: absolute;
  inset: -1rem -0.5rem 3.5rem;
  z-index: -1;
  border: 1px solid var(--rule);
  background-color: #eae4d7;
  background-image: linear-gradient(#d5cec04d 1px, transparent 1px), linear-gradient(90deg, #d5cec04d 1px, transparent 1px);
  background-size: 20px 20px;
  border-radius: 12px;
  transform: rotate(2.5deg);
}
.wire__panel {
  background: var(--wire);
  color: var(--wire-ink);
  border: 1px solid #304a3f;
  border-radius: 10px 10px 0 0;
  padding: 1.4rem 1.4rem 1.5rem;
}
.wire__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.3rem 1rem;
  color: var(--wire-dim);
  font-size: 0.72rem;
  margin-bottom: 1.1rem;
}
.wire__top strong {
  color: var(--wire-ink);
  font-weight: 650;
}
.wire__specimen {
  color: #e9c5a2;
}
.wire__journey {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0 1.5rem;
}
.wire__person {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: none;
  font-size: 0.8rem;
}
.wire__person b {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #b9ccba66;
  border-radius: 50%;
  color: #e9c5a2;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.25rem;
}
.wire__person small {
  display: block;
  font-size: 0.55rem;
  color: var(--wire-dim);
}
.wire__route {
  min-width: 0;
  flex: 1;
  border-top: 1px dashed #a4b89a80;
  text-align: center;
  line-height: 1;
}
.wire__route span {
  display: inline-block;
  background: var(--wire);
  color: var(--wire-dim);
  font-size: 0.55rem;
  padding: 0 0.5rem;
  transform: translateY(-0.65em);
}
.seg {
  display: grid;
  grid-template-columns: 5.9rem minmax(0, 1fr);
  gap: 0.2rem 0.8rem;
  padding: 0.55rem 0;
  border-top: 1px solid #365247;
}
.seg:first-of-type {
  border-top: 0;
}
@media (max-width: 30rem) {
  .seg {
    grid-template-columns: minmax(0, 1fr);
  }
}
.seg__label {
  color: var(--wire-dim);
  font-size: 0.78rem;
  line-height: 1.45;
  padding-top: 0.08rem;
}
.seg__bytes {
  font-variation-settings: "MONO" 1;
  font-size: 0.78rem;
  line-height: 1.5;
  word-break: break-all;
  margin: 0;
  color: var(--wire-dim);
}
.seg--clear .seg__bytes {
  color: oklch(0.86 0.09 var(--h));
  font-weight: 600;
  font-size: 0.755rem;
}
.seg--sealed .seg__bytes {
  color: #a8b9ab;
}
.seg--sig .seg__bytes {
  color: oklch(0.8 0.08 var(--h));
}
.seg .gap {
  display: block;
  color: var(--wire-dim);
  font-variation-settings: "MONO" 0;
  font-style: normal;
  padding: 0.15rem 0;
}

.wire__opened {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  padding: 1.1rem 1.4rem 1.4rem;
  color: var(--ink);
}
.wire__opened-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  align-items: center;
  font-size: var(--step--1);
  color: var(--ink-2);
  margin-bottom: 0.5rem;
}
.wire__opened-head .ok {
  color: var(--verified);
  font-weight: 650;
  flex-basis: 100%;
  font-size: 0.7rem;
}
.json {
  margin: 0;
  max-height: 10rem;
  overflow: auto;
  font-variation-settings: "MONO" 1;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
}
.json .k {
  color: var(--ink-2);
}
.json .s {
  color: #386c4f;
}
.json .p {
  color: #737b6c;
}
.wire figcaption {
  margin-top: 0.8rem;
  font-size: var(--step--1);
  color: var(--ink-2);
  max-width: 38rem;
}

/* One orchestrated moment: the wire fills in, then Bob opens it. JS adds .js and .play; without them all is shown. */
@media (prefers-reduced-motion: no-preference) {
  .js .wire .seg,
  .js .wire .wire__opened {
    opacity: 0;
    transform: translateY(4px);
  }
  .js .wire.play .seg,
  .js .wire.play .wire__opened {
    opacity: 1;
    transform: none;
    transition: opacity 0.35s ease-out, transform 0.35s ease-out;
  }
  .js .wire.play .seg:nth-of-type(2) { transition-delay: 0.12s; }
  .js .wire.play .seg:nth-of-type(3) { transition-delay: 0.24s; }
  .js .wire.play .seg:nth-of-type(4) { transition-delay: 0.36s; }
  .js .wire.play .seg:nth-of-type(5) { transition-delay: 0.48s; }
  .js .wire.play .wire__opened { transition-delay: 0.95s; transition-duration: 0.5s; }
}

/* ── Landing sections ─────────────────────────────────── */

.band {
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}
.band > h2:first-child {
  margin-top: 0.5rem;
}

.capabilities {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 4rem;
  padding: 4rem 0;
  border-top: 1px solid var(--rule);
}
.capabilities h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.3rem, 4vw, 3.6rem);
}
.capabilities > div > p:last-child {
  color: var(--ink-2);
  max-width: 22ch;
}
.capabilities__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 2.5rem;
}
.capabilities__grid article {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}
.capabilities__grid h3 {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.05rem;
}
.capabilities__grid p {
  color: var(--ink-2);
  font-size: 0.9rem;
  margin: 0;
}
.capability-mark {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #b4462b44;
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--display);
  font-size: 1.5rem;
}
.ecosystem-invitation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--ink);
  color: var(--paper);
  margin: 0 0 3rem;
  padding: 2.5rem 3rem;
  text-decoration: none;
}
.ecosystem-invitation .eyebrow,
.toolkit-position .eyebrow {
  color: #f2ba96;
}
.ecosystem-invitation h2 {
  margin: 0.5rem 0 0.75rem;
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
}
.ecosystem-invitation p {
  margin: 0;
  max-width: 65ch;
  color: #d3decb;
  font-size: 0.9rem;
}
.ecosystem-invitation__arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid #e8eee466;
  border-radius: 50%;
  font-family: var(--display);
  font-size: 2.75rem;
  transition: transform 0.2s ease;
}
.ecosystem-invitation:hover .ecosystem-invitation__arrow {
  transform: rotate(45deg);
  background: #ffffff0a;
}

/* ── Illustrated library collection ───────────────────── */

.toolkit-showcase {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}
.toolkit-showcase__heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.toolkit-showcase__heading h2 {
  margin: 0;
  font-size: clamp(2.8rem, 4.8vw, 4rem);
  line-height: 1.05;
}
.toolkit-showcase__heading h2 em {
  color: var(--accent);
}
.toolkit-showcase__reference {
  flex: none;
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}
.toolkit-showcase__reference span {
  margin-left: 0.65rem;
}
.toolkit-showcase__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.library-tile {
  position: relative;
  min-width: 0;
  min-height: 235px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.library-tile:hover {
  border-color: var(--ink);
  box-shadow: 0 6px 20px #1e372f0a;
}
.library-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.library-tile__top .eyebrow {
  margin: 0;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: var(--ink-2);
}
.library-tile__arrow {
  display: inline-block;
  color: var(--ink-2);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.library-tile:hover .library-tile__arrow {
  transform: translate(2px, -2px);
}
.library-tile__art {
  display: flex;
  align-items: center;
  height: 64px;
  margin-bottom: 1rem;
  color: var(--ink);
}
.library-tile__icon {
  display: block;
  width: 64px;
  height: 64px;
}
.library-tile__body h3 {
  font-family: var(--sans);
  font-variation-settings: "MONO" 1;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  margin: 0 0 0.6rem;
}
.library-tile__body p {
  color: var(--ink-2);
  font-size: 0.8rem;
  line-height: 1.65;
  margin: 0;
  max-width: 33ch;
}
.library-tile--trust-core {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--wire);
  border-color: var(--wire);
  color: var(--wire-ink);
  padding: 2rem;
}
.library-tile--trust-core:hover {
  border-color: #b5c9a6;
}
.library-tile--trust-core .eyebrow,
.library-tile--trust-core .library-tile__arrow {
  color: #e9c5a2;
}
.library-tile--trust-core .library-tile__art {
  height: auto;
  flex: 1;
  margin: 1.5rem -1rem 2rem;
}
.library-tile--trust-core h3 {
  font-size: 1.8rem;
  font-weight: 550;
  letter-spacing: -0.04em;
}
.library-tile--trust-core .library-tile__body p {
  color: var(--wire-dim);
  font-size: 1rem;
}
.library-tile__flow {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.library-tile__connection {
  fill: none;
  stroke: #b9ccaa;
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.library-tile__orbit {
  fill: none;
  stroke: #95b39833;
  stroke-width: 1;
}
.library-tile__node {
  fill: #233f35;
  stroke: #769a7c66;
}
.library-tile__avatar {
  fill: none;
  stroke: #e9c5a299;
}
.library-tile__initial {
  font: 20px var(--display);
  fill: #e9c5a2;
}
.library-tile__diagram-label {
  font: 11px var(--sans);
  fill: var(--wire-ink);
}
.library-tile__diagram-small {
  font: 8px var(--sans);
  fill: var(--wire-dim);
}
.library-tile__envelope {
  fill: #d5bd92;
  stroke: #d5bd92;
}
.library-tile__envelope-line {
  fill: none;
  stroke: var(--wire);
  stroke-width: 1.5;
}
.library-tile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}
.library-tile__tags span {
  padding: 0.2rem 0.55rem;
  border: 1px solid #b9ccaa33;
  border-radius: 4px;
  color: var(--wire-dim);
  font-size: 0.65rem;
  font-variation-settings: "MONO" 1;
}
.library-tile--relay { background: #efe3cf; }
.library-tile--mandates { background: #eae5ed; }
.library-tile--cose { background: #e5e9df; }
.library-tile--mesh-transport {
  grid-column: span 2;
  background: #efe1cd;
  justify-content: space-between;
}
.library-tile--mesh-transport .library-tile__art {
  position: absolute;
  width: 44%;
  height: auto;
  right: 1.5rem;
  bottom: 1.5rem;
  margin: 0;
}
.library-tile__terrain {
  width: 100%;
  height: auto;
  overflow: visible;
  fill: none;
  stroke: #9e7652;
  stroke-width: 1;
  stroke-linejoin: round;
}
.library-tile__terrain circle {
  fill: var(--accent);
  stroke: #efe1cd;
}
.library-tile__terrain .library-tile__radio-route {
  stroke: var(--accent);
  stroke-dasharray: 3 4;
}
.library-tile__terrain .library-tile__radio-ring {
  fill: none;
  stroke: #b4462b44;
}
.library-tile--mesh-transport .library-tile__body {
  max-width: 55%;
}
.toolkit-showcase__note {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  font-size: 0.75rem;
  color: var(--ink-2);
  padding-top: 1rem;
  margin: 0;
}
@media (max-width: 62rem) {
  .toolkit-showcase__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .library-tile--trust-core {
    grid-row: auto;
    min-height: 360px;
  }
  .library-tile--trust-core .library-tile__art {
    max-width: 36rem;
    margin: 0 auto 1.5rem;
  }
}
@media (max-width: 40rem) {
  .toolkit-showcase {
    padding: 2.5rem 0;
  }
  .toolkit-showcase__heading {
    display: block;
  }
  .toolkit-showcase__reference {
    display: inline-block;
    margin-top: 1.25rem;
  }
  .library-tile {
    padding: 1.25rem;
  }
  .library-tile--trust-core {
    padding: 1.5rem;
  }
}
@media (max-width: 28rem) {
  .toolkit-showcase__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .library-tile--trust-core,
  .library-tile--mesh-transport {
    grid-column: auto;
  }
  .library-tile:not(.library-tile--trust-core):not(.library-tile--mesh-transport) {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 0.5rem 1.25rem;
    min-height: 170px;
  }
  .library-tile__top {
    grid-column: 1 / -1;
    margin-bottom: 0.5rem;
  }
  .library-tile__icon {
    width: 48px;
    height: 48px;
  }
  .library-tile:not(.library-tile--trust-core):not(.library-tile--mesh-transport) .library-tile__body {
    align-self: center;
  }
  .library-tile--mesh-transport .library-tile__body {
    max-width: 62%;
  }
  .library-tile--mesh-transport .library-tile__art {
    width: 32%;
    right: 1rem;
  }
}

.rows {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0 1rem;
}
.rows th,
.rows td {
  text-align: left;
  vertical-align: top;
  padding: 1.15rem 1.5rem 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}
.rows thead th {
  font-size: 0.7rem;
  color: var(--ink-2);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variation-settings: "MONO" 1;
}
.rows tbody th {
  font-weight: 650;
  white-space: nowrap;
}
.rows tbody tr:hover {
  background: #eee8dc80;
}
.rows td {
  font-size: 0.9375rem;
}
.rows td:last-child,
.rows th:last-child {
  padding-right: 0;
}
@media (max-width: 44rem) {
  .rows,
  .rows tbody,
  .rows tr,
  .rows td,
  .rows tbody th {
    display: block;
  }
  .rows thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .rows tr {
    border-bottom: 1px solid var(--rule);
    padding: 0.7rem 0;
  }
  .rows td,
  .rows tbody th {
    border: 0;
    padding: 0.1rem 0;
    white-space: normal;
  }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-2);
  border-radius: 5px;
  padding: 0.2rem 0.5rem;
  background: var(--paper-2);
}
.status svg {
  flex: none;
}
.status--working,
.status--ready {
  color: var(--verified);
  background: #e3eada;
}

.first .prose {
  max-width: var(--measure);
}
.first .code {
  max-width: 62rem;
}

/* ── Steps (the quickstart is a real sequence) ────────── */

.step {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}
.step > h2 {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  margin-top: 0;
}
.step__n {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: #e3eada;
  color: var(--verified);
  font-size: var(--step-0);
  font-weight: 750;
  font-variation-settings: "MONO" 1;
  transform: translateY(-0.2rem);
}

/* ── Concepts ─────────────────────────────────────────── */

.concept {
  padding-top: 1rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
}
.concept > h2 {
  margin-top: 1.2rem;
}
.concept-implementation {
  max-width: 46rem;
  margin: 2rem 0 1.5rem;
  padding: 1.75rem;
  background: #edf0e5;
  border: 1px solid #d5dccb;
  border-left: 3px solid var(--verified);
  border-radius: 0 8px 8px 0;
}
.concept-implementation__heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.concept-implementation__heading > span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  background: #dfe7d6;
  border-radius: 5px;
  color: var(--verified);
  font-variation-settings: "MONO" 1;
  font-size: 0.75rem;
  font-weight: 650;
}
.concept-implementation__heading h3 {
  margin: 0;
  font-size: 1.05rem;
}
.concept-implementation__libraries {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.concept-implementation__libraries a {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border: 1px solid #c7d1bc;
  border-radius: 4px;
  background: #f7f9f0;
  text-decoration: none;
  font-size: 0.75rem;
  max-width: 100%;
}
.concept-implementation__libraries a:hover {
  border-color: var(--verified);
  background: var(--surface);
}
.concept-implementation__points {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.8;
}
.concept-implementation__points li + li {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid #d5dccb;
}
.concept-implementation__note {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #c7d1bc;
  color: var(--ink-2);
  font-size: 0.8rem;
  line-height: 1.75;
}
.concept-implementation__note > strong {
  display: block;
  color: var(--ink);
  font-size: 0.65rem;
  font-variation-settings: "MONO" 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.concept-implementation__note p {
  margin: 0;
}
@media (max-width: 40rem) {
  .concept-implementation {
    padding: 1.25rem;
  }
  .concept-implementation__points {
    font-size: 0.85rem;
  }
}
.diagram {
  margin: 1.6rem 0 1.8rem;
  max-width: 46rem;
}
.diagram__scroll {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1rem;
}
.diagram svg {
  display: block;
  width: 100%;
  min-width: 34rem;
  height: auto;
}
.diagram figcaption {
  font-size: var(--step--1);
  color: var(--ink-2);
  margin-top: 0.6rem;
  max-width: var(--measure);
}
.sources {
  font-size: var(--step--1);
  color: var(--ink-2);
  border-left: 3px solid var(--paper-3);
  padding: 0.2rem 0 0.2rem 1rem;
  margin: 1.5rem 0;
  max-width: var(--measure);
}
.sources ul {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
}
.caveat {
  border-left: 3px solid var(--refused);
  padding: 0.1rem 0 0.1rem 1rem;
  max-width: var(--measure);
}

/* ── Toolkit and specs ────────────────────────────────── */

.facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.1rem 1.6rem;
  margin: 1.4rem 0 2rem;
  max-width: 48rem;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.9375rem;
}
@media (min-width: 40rem) {
  .facts {
    grid-template-columns: 9rem minmax(0, 1fr);
  }
}
.facts dt {
  color: var(--ink-2);
  font-size: var(--step--1);
  padding-top: 0.15rem;
  font-weight: 600;
}
.facts dd {
  margin: 0 0 0.7rem;
}
.api {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 2rem;
  margin: 1rem 0;
}
@media (min-width: 48rem) {
  .api {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.api div {
  border-top: 1px solid var(--rule);
  padding: 1rem 0 1.2rem;
}
.api h4 {
  margin: 0 0 0.3rem;
  font-size: var(--step--1);
  color: var(--ink-2);
}
.api p {
  margin: 0;
  line-height: 1.8;
}
.api code {
  margin-right: 0.15rem;
}

.badge {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 650;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: var(--ink-2);
  vertical-align: middle;
}

.spec-uri {
  font-variation-settings: "MONO" 1;
  overflow-wrap: anywhere;
  font-size: var(--step-0);
  font-weight: 600;
}
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  font-weight: 600;
}
.flow svg {
  flex: none;
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
}
.spec-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.1rem 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}
@media (min-width: 52rem) {
  .spec-list li {
    grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  }
}
.spec-list p {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--step--1);
}

/* ── Examples gallery ─────────────────────────────────── */

.project {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.project h2 {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
}
.shots {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}
@media (min-width: 52rem) {
  .shots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}
.shots figure {
  margin: 0;
}
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper-2);
  box-shadow: 0 5px 20px #13224a0a;
}
.shots a {
  display: block;
  border-radius: 8px;
  cursor: zoom-in;
}
.shots a:hover img {
  border-color: var(--verified);
}
.shots figcaption {
  font-size: var(--step--1);
  color: var(--ink-2);
  margin-top: 0.5rem;
}

/* ── Ecosystem field guide ────────────────────────────── */

.ecosystem-head {
  padding-top: 4.5rem;
  padding-bottom: 2rem;
}
.ecosystem-head h1 {
  max-width: 24ch;
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  line-height: 1.03;
}
.ecosystem-head .lede {
  max-width: 50rem;
}
.guide-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 0.8rem;
  font-weight: 600;
}
.guide-nav a {
  text-decoration: none;
}
.guide-nav a:hover {
  color: var(--accent);
}
.guide-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 4rem;
  padding: 3.5rem 0 1rem;
  align-items: start;
}
.guide-intro h2 {
  margin-top: 0;
  font-size: 2.6rem;
}
.field-note {
  background: #eee3d0;
  border-left: 3px solid var(--accent);
  padding: 1.75rem;
}
.field-note__mark {
  display: block;
  color: var(--accent);
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 1rem;
}
.field-note h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.9rem;
  margin: 0 0 1rem;
}
.field-note p {
  font-size: 0.9rem;
}
.field-note a {
  font-size: 0.75rem;
  font-weight: 600;
}
.landscape caption {
  text-align: left;
  padding: 1rem 0;
  color: var(--accent);
  font-variation-settings: "MONO" 1;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.landscape tbody th {
  width: 23%;
}
.landscape td:last-child {
  min-width: 13rem;
}
.guide-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.section-heading h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 4.5vw, 3rem);
}
.approach-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.approach {
  --approach-color: var(--accent);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--approach-color);
  background: var(--surface);
  padding: 2rem;
  scroll-margin-top: 2rem;
  display: flex;
  flex-direction: column;
}
.approach--services { --approach-color: #396157; }
.approach--agents { --approach-color: #64517c; }
.approach--keys { --approach-color: #905c31; }
.approach--messaging { --approach-color: #315d78; }
.approach--tasks { --approach-color: #686d3c; }
.approach .eyebrow {
  color: var(--approach-color);
  font-size: 0.65rem;
}
.approach h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 2.2rem;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}
.approach p {
  font-size: 0.9rem;
}
.approach .approach__question {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.35;
  color: var(--approach-color);
}
.approach .approach__source {
  margin: auto 0 0;
  padding-top: 0.75rem;
  font-size: 0.75rem;
}
.choices th,
.choices td {
  width: 40%;
}
.choices th:first-child {
  width: 20%;
}
.toolkit-position {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 3rem;
  margin: 4rem 0 0;
}
.toolkit-position h2 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 3rem);
}
.toolkit-position a {
  color: inherit;
}
.toolkit-position p:not(.eyebrow):not(.actions) {
  color: #d3decb;
  font-size: 0.95rem;
}

/* ── Image preview ────────────────────────────────────── */

html:has(.lightbox[open]) {
  overflow: hidden;
}
.lightbox {
  width: fit-content;
  max-width: calc(100vw - 3rem);
  max-height: calc(100dvh - 3rem);
  padding: 0;
  border: 1px solid #ffffff26;
  border-radius: 14px;
  background: var(--wire);
  color: var(--wire-ink);
  box-shadow: 0 24px 100px #0006;
  overflow: auto;
}
.lightbox::backdrop {
  background: #081226d9;
  backdrop-filter: blur(8px);
}
.lightbox__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #ffffff1a;
  font-size: 0.8rem;
  color: var(--wire-dim);
}
.lightbox button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #ffffff33;
  border-radius: 6px;
  background: var(--wire-2);
  color: var(--wire-ink);
  font: inherit;
  cursor: pointer;
}
.lightbox button:hover {
  background: #345447;
}
.lightbox button:focus-visible {
  outline-color: #9db5ff;
}
.lightbox figure {
  margin: 0;
}
.lightbox__image {
  display: flex;
  justify-content: center;
  background: #0c1e19;
}
.lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 12rem);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox figcaption {
  max-width: 75ch;
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
}

@media (max-width: 61.99rem) {
  .capabilities {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
  .capabilities > div > p:last-child {
    max-width: none;
  }
  .docs__side {
    padding-top: 2rem;
  }
  .docs__side ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-bottom: 1rem;
  }
  .docs__side li + li {
    margin-top: 0;
  }
  .docs__side a {
    border: 1px solid var(--rule);
    border-radius: 5px;
    padding: 0.25rem 0.6rem;
  }
  .page-head {
    padding-top: 3rem;
  }
}
@media (max-width: 40rem) {
  .site-head .wrap {
    gap: 0.8rem;
  }
  .site-nav ul {
    gap: 0.15rem 1rem;
  }
  .site-nav a {
    font-size: 0.8rem;
  }
  .hero {
    padding-top: 2.75rem;
  }
  .hero h1 {
    font-size: clamp(3.7rem, 15vw, 5rem);
  }
  .hero .eyebrow {
    font-size: 0.6rem;
  }
  .wire::before {
    inset: -0.5rem 0 4rem;
    transform: rotate(1deg);
  }
  .band {
    padding: 1.75rem 0;
  }
  .wire__panel,
  .wire__opened {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .facts {
    padding: 1rem;
  }
  .lightbox {
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
    border-radius: 10px;
  }
  .hero__facts {
    gap: 1.5rem;
  }
  .capabilities {
    padding: 2.5rem 0;
  }
  .capabilities__grid {
    gap: 1.75rem 1.25rem;
  }
  .capabilities__grid h3 {
    font-size: 0.95rem;
  }
  .capabilities__grid p {
    font-size: 0.8rem;
  }
  .ecosystem-invitation {
    gap: 1rem;
    padding: 1.75rem 1.25rem;
  }
  .ecosystem-invitation__arrow {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.75rem;
  }
  .wire__journey {
    gap: 0.4rem;
  }
  .wire__person {
    gap: 0.35rem;
  }
  .wire__person b {
    width: 1.75rem;
    height: 1.75rem;
  }
  .wire__route span {
    max-width: 10ch;
    line-height: 1.4;
    padding: 0 0.2rem;
  }
  .guide-intro,
  .approach-grid,
  .toolkit-position {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .guide-intro {
    padding-top: 2.5rem;
  }
  .approach,
  .toolkit-position {
    padding: 1.5rem;
  }
  .guide-nav {
    gap: 0.5rem 1.1rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 52rem) {
  .guide-intro,
  .approach-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
}
@media (max-width: 44rem) {
  .landscape tbody th,
  .landscape td:last-child,
  .choices th,
  .choices td,
  .choices th:first-child {
    width: auto;
    min-width: 0;
  }
  .choices td::before {
    content: attr(data-label);
    display: block;
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0.5rem 0 0.25rem;
  }
}

/* ── Diagrams ─────────────────────────────────────────── */

.dg text {
  font-size: 13px;
  fill: var(--ink);
}
.dg .dg-h {
  font-size: 14px;
  font-weight: 700;
  font-variation-settings: "MONO" 1;
}
.dg .dg-t {
  font-weight: 650;
}
.dg .dg-s {
  fill: var(--ink-2);
  font-size: 12px;
}
.dg .dg-v {
  font-size: 12px;
}
.dg .dg-mono {
  font-variation-settings: "MONO" 1;
}
.dg .dg-tl {
  fill: var(--wire-ink);
  font-weight: 600;
}
.dg .dg-tld {
  fill: var(--wire-dim);
  font-size: 12px;
}
.dg-box {
  fill: #fbfcfd;
  stroke: var(--ink);
  stroke-width: 1.2;
}
.dg-soft {
  fill: var(--paper-2);
  stroke: var(--ink-2);
}
.dg-dark {
  fill: var(--wire);
}
.dg-sealed {
  fill: #33456b;
}
.dg-secret {
  stroke-dasharray: 4 3;
  fill: var(--paper);
}
.dg-bit {
  fill: var(--wire-2);
  stroke: #3a4f78;
}
.dg-bit-on {
  fill: #e3a4c6;
}
.dg-line {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.4;
}
.dg-thin {
  stroke-width: 0.9;
  opacity: 0.6;
}
.dg-dash {
  stroke-dasharray: 5 4;
}
.dg-ok {
  stroke: var(--verified);
  stroke-width: 2;
}
.dg-head {
  fill: var(--ink-2);
}

/* ── Documentation system ─────────────────────────────── */
h1,
h2 {
  font-family: var(--sans);
  font-weight: 650;
  letter-spacing: -0.035em;
}
h1,
.page-head h1,
.ecosystem-head h1 {
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  line-height: 1.16;
}
h2,
.section-heading h2,
.guide-intro h2,
.toolkit-position h2 {
  font-size: clamp(1.4rem, 2.7vw, 1.8rem);
  line-height: 1.3;
}
.page-head { padding: 3rem 0 1.5rem; }
.page-head .lede { font-size: 1.1rem; }
.docs { padding-top: 2rem; font-size: 1rem; }
.docs__content { min-width: 0; }
.docs .page-head { padding: 0 0 1.5rem; }
.docs__side { padding-top: 0; }
.docs-nav__mobile { display: none; }
.docs__side .docs-nav__group ul { display: block; margin: 0 0 1.25rem; }
.docs__side .docs-nav__group a { border: 0; border-left: 2px solid transparent; border-radius: 0 5px 5px 0; padding: 0.3rem 0.65rem; }
.docs__side a[aria-current="true"],
.docs__side a[aria-current="page"] { background: #e4e8db; border-left-color: var(--verified); color: var(--ink); font-weight: 650; }
.docs-nav__group .side-h { font-size: 0.65rem; }
.doc-breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.4rem 0.65rem; color: var(--ink-2); font-size: 0.75rem; margin-bottom: 1.25rem; }
.docs h2 { margin-top: 2.5rem; }
.docs h3 { font-size: 1.05rem; }
.sdk-source { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; padding: 0.85rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 0.75rem; color: var(--ink-2); }
.sdk-source > code { padding: 0; background: none; }
.sdk-task { margin: 1.75rem 0; }
.sdk-related { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.85rem; }
.sdk-related a { border: 1px solid var(--rule); border-radius: 4px; padding: 0.2rem 0.55rem; background: var(--surface); font-size: 0.75rem; text-decoration: none; }
.sdk-note { max-width: 46rem; padding: 1rem 1.25rem; border-left: 3px solid var(--verified); background: var(--paper-2); font-size: 0.875rem; margin: 1.5rem 0; }
.sdk-note > :last-child { margin-bottom: 0; }
.sdk-note h3 { margin-top: 0; }
.sdk-errors article { padding: 0.75rem 0 1.25rem; border-bottom: 1px solid var(--rule); }
.sdk-errors h3 { margin-top: 1.25rem; }
.sdk-modules { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0.75rem; }
.sdk-modules li { padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; margin: 0; }
.sdk-modules a { display: flex; justify-content: space-between; gap: 1rem; text-decoration: none; font-size: 0.9rem; }
.sdk-modules p { margin: 0.5rem 0 0; font-size: 0.75rem; color: var(--ink-2); }
.sdk-api-group { margin-top: 2rem; }
.sdk-export-list { padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 1.75rem; }
.sdk-export-list li { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); margin: 0; min-width: 0; }
.sdk-export-list a { font-size: 0.875rem; }
.sdk-export-list p { font-size: 0.75rem; color: var(--ink-2); margin: 0.4rem 0 0; }
.sdk-signature pre { max-height: 25rem; }
.api-fields { margin: 1rem 0 1.75rem; }
.api-fields > div { display: grid; grid-template-columns: minmax(0,9rem) minmax(0,1fr); gap: 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.api-fields dt { min-width: 0; font-size: 0.85rem; font-weight: 650; }
.api-fields dt span { display: block; margin-top: 0.4rem; font-size: 0.65rem; color: var(--ink-2); font-weight: 400; }
.api-fields dd { margin: 0; min-width: 0; font-size: 0.85rem; }
.api-type { display: inline-block; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.82rem; }
.api-description { margin-top: 0.5rem; }
.api-description p:last-child { margin-bottom: 0; }
.api-default { margin: 0.5rem 0 0; font-size: 0.75rem; }
.api-options { margin-top: 0.8rem; }
.api-options summary { cursor: pointer; font-size: 0.8rem; font-weight: 600; }
.api-options .api-fields > div { grid-template-columns: minmax(0,1fr); gap: 0.4rem; }
.api-return { background: var(--paper-2); border-left: 2px solid var(--verified); padding: 0.85rem 1rem; max-height: 20rem; overflow: auto; }
.api-return p { font-size: 0.85rem; margin: 0.5rem 0 0; }
.api-method { border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: 1.5rem; }
.api-method h3 { margin-top: 0; }
.api-method h4 { font-size: 0.875rem; }
.sdk-next { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: 0.8rem; }
.sdk-search { display: none; padding: 1.25rem; border: 1px solid var(--rule); background: var(--surface); border-radius: 7px; margin: 1.75rem 0; }
.js .sdk-search { display: block; }
.sdk-search label { display: block; font-weight: 650; font-size: 0.875rem; margin-bottom: 0.6rem; }
.sdk-search input { width: 100%; font: inherit; font-size: 0.875rem; padding: 0.8rem 0.9rem; border: 1px solid #aeb9ad; border-radius: 5px; background: var(--paper); color: var(--ink); }
.sdk-search p { margin: 0.75rem 0 0; }
.sdk-search__results { list-style: none; padding: 0; margin: 1rem 0 0; }
.sdk-search__results li { padding: 0.85rem 0; border-top: 1px solid var(--rule); margin: 0; }
.sdk-search__results a { font-weight: 650; font-size: 0.9rem; }
.sdk-search__results small { display: block; color: var(--ink-2); font-size: 0.7rem; overflow-wrap: anywhere; }
.sdk-search__results p { font-size: 0.8rem; margin: 0.3rem 0 0; }
.docs .toolkit-showcase { padding-top: 1rem; border-top: 0; }
.docs .toolkit-showcase__heading h2 { font-family: var(--sans); font-size: 1.75rem; margin: 0; }
.docs .toolkit-showcase__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.docs .library-tile--trust-core { grid-row: auto; min-height: 340px; }
.docs .library-tile--trust-core .library-tile__art { width: 100%; max-width: 35rem; margin: 1rem auto; }
.docs .library-tile__tags { margin-top: 1rem; }
.docs .library-tile { min-height: 210px; }
.field-note h3,
.approach h3 { font-family: var(--sans); font-weight: 600; font-size: 1.3rem; }
.approach .approach__question { font-family: var(--sans); font-size: 1rem; }

/* ── Developer landing page ───────────────────────────── */
.landing-hero { display: grid; grid-template-columns: minmax(0,0.95fr) minmax(0,1.05fr); align-items: center; gap: 3rem; padding: 4.5rem 0; }
.landing-hero h1 { font-size: clamp(2.75rem,4.5vw,4rem); max-width: 16ch; line-height: 1.12; }
.landing-hero .lede { max-width: 35ch; font-size: 1.2rem; }
.landing-hero > div > p:not(.eyebrow):not(.actions):not(.landing-meta) { max-width: 42ch; }
.landing-meta { color: var(--ink-2); font-size: 0.7rem; margin-top: 1.5rem; }
.landing-example { min-width: 0; }
.landing-example .code { margin: 0; }
.landing-example pre { font-size: 0.72rem; max-height: 25rem; }
.landing-example > p { font-size: 0.75rem; margin: 0.75rem 0 0; }
.landing-section { padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.landing-section h2 { margin: 0 0 1.5rem; }
.landing-section__heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.landing-section__heading > a { font-size: 0.8rem; }
.landing-paths { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.landing-paths li { margin: 0; min-width: 0; }
.landing-paths a,
.landing-apps > a { display: flex; flex-direction: column; height: 100%; padding: 1.5rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 7px; text-decoration: none; }
.landing-paths a:hover,
.landing-apps > a:hover { border-color: var(--verified); }
.landing-paths__step { color: var(--accent); font-size: 0.75rem; font-variation-settings: "MONO" 1; }
.landing-paths h3 { margin: 1rem 0 0.75rem; font-size: 1.05rem; }
.landing-paths p,
.landing-apps p { font-size: 0.875rem; color: var(--ink-2); }
.landing-paths__link,
.landing-apps > a > span { font-size: 0.75rem; font-weight: 600; margin-top: auto; padding-top: 0.75rem; }
.landing-apps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.landing-apps h3 { margin: 0 0 0.75rem; font-size: 1.1rem; }
.landing-resources { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2rem; padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.landing-resources h2 { font-size: 1.05rem; margin: 0 0 0.75rem; }
.landing-resources p { font-size: 0.875rem; color: var(--ink-2); }
.landing-resources a { font-size: 0.8rem; }
.landing-inspector { margin-top: 1rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.landing-inspector summary { cursor: pointer; font-size: 0.8rem; color: var(--ink-2); }
.landing-inspector .wire { max-width: 46rem; margin: 2rem auto 0; }
@media (max-width: 61.99rem) {
  .docs { padding-top: 1.5rem; gap: 1.5rem; }
  .docs-nav__desktop { display: none; }
  .docs-nav__mobile { display: block; border: 1px solid var(--rule); border-radius: 6px; padding: 0.85rem 1rem; background: var(--surface); }
  .docs-nav__mobile summary { font-size: 0.85rem; font-weight: 600; cursor: pointer; }
  .docs-nav__mobile[open] { max-height: 65vh; overflow: auto; }
  .docs-nav__mobile[open] summary { margin-bottom: 1.25rem; }
  .landing-hero { grid-template-columns: minmax(0,1fr); gap: 2rem; padding: 3rem 0; }
  .landing-hero h1 { font-size: clamp(2.5rem,6vw,3.5rem); }
}
@media (max-width: 40rem) {
  .api-fields > div { grid-template-columns: minmax(0,1fr); gap: 0.5rem; }
  .sdk-export-list,
  .landing-paths,
  .landing-apps,
  .landing-resources { grid-template-columns: minmax(0,1fr); }
  .docs .toolkit-showcase__grid { grid-template-columns: minmax(0,1fr); }
  .docs .library-tile--trust-core,
  .docs .library-tile--mesh-transport { grid-column: auto; }
  .page-head h1,
  .ecosystem-head h1 { font-size: 2.2rem; }
  .sdk-source { gap: 0.5rem 0.75rem; }
}

/* ── Page tools, guides, the assistant prompt, FAQ ─────── */
.page-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0.5rem 0.9rem; margin: 0 0 0.75rem; font-size: 0.75rem; }
.page-tools__md { color: var(--ink-2); }
.page-tools__copy { font: inherit; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 5px; padding: 0.3rem 0.65rem; cursor: pointer; }
.page-tools__copy:hover { border-color: var(--verified); }
.page-tools + .doc-breadcrumbs { margin-top: -1.9rem; }
.guide-head h1 { max-width: 28ch; }
.guide-head .eyebrow code { font-size: 0.95em; }
.guide-list { list-style: none; padding: 0; margin: 1.75rem 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.guide-list li { margin: 0; min-width: 0; }
.guide-list a { display: flex; flex-direction: column; height: 100%; padding: 1.25rem 1.35rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 7px; text-decoration: none; }
.guide-list a:hover { border-color: var(--verified); }
.guide-list h2 { font-size: 1.05rem; margin: 0 0 0.6rem; line-height: 1.35; letter-spacing: -0.01em; }
.guide-list p { font-size: 0.85rem; color: var(--ink-2); margin: 0 0 0.75rem; }
.guide-list__libs { margin-top: auto; font-size: 0.7rem; color: var(--accent); font-variation-settings: "MONO" 1; overflow-wrap: anywhere; }
.guide-related h3 { font-size: 0.95rem; margin: 1.5rem 0 0.6rem; }
.guide-related ul { padding-left: 1.2rem; font-size: 0.9rem; }
.landing-guides { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
.landing-guides li { margin: 0; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); font-size: 0.9rem; }
.landing-guides a { text-decoration: none; font-weight: 550; }
.landing-guides a:hover { text-decoration: underline; }
.assistant { margin: 2.5rem 0; padding: 1.5rem 1.5rem 0.5rem; background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 7px; max-width: 46rem; }
.assistant__head .eyebrow { margin-bottom: 0.35rem; }
.assistant h2 { margin: 0 0 0.6rem; }
.assistant > p { font-size: 0.9rem; }
.assistant .code { margin: 1rem 0 1.25rem; }
.assistant .code pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant__links { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.3rem 0.9rem; font-size: 0.8rem; }
.assistant__links a { font-variation-settings: "MONO" 1; }
.assistant__links span { color: var(--ink-2); }
.faq__item { border-bottom: 1px solid var(--rule); padding-bottom: 0.75rem; }
.faq__item h2 { font-size: 1.2rem; margin-top: 2rem; }
.release { border-top: 1px solid var(--rule); margin-top: 2rem; }
.release h2 { font-size: 1.15rem; margin-top: 1.5rem; }
.release h3 { font-size: 0.95rem; }
@media (max-width: 40rem) {
  .guide-list,
  .landing-guides { grid-template-columns: minmax(0, 1fr); }
  .page-tools { justify-content: flex-start; }
  .page-tools + .doc-breadcrumbs { margin-top: 0; }
  .assistant { padding: 1.1rem 1rem 0.25rem; }
  .assistant__links { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  .assistant__links span { margin-bottom: 0.5rem; }
}

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

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