@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/fraunces-latin-full-normal.woff2") format("woff2");
  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: Inter;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  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;
}

:root {
  color-scheme: light;
  --bg: #F6F3EA;
  --surface: #FFFDF7;
  --sunken: #EEEADD;
  --ink: #14291F;
  --ink-2: #3E5247;
  --muted: #5C6B60;
  --border: #DCD6C6;
  --border-strong: #C5BDA8;
  --primary: #2F6B4F;
  --primary-hover: #24563F;
  --on-primary: #FFFDF7;
  --leaf: #3F6B4C;
  --sage: #A9C4A0;
  --sage-soft: #E3EBDA;
  --bloom: #D9734A;
  --pending: #9A6412;
  --danger: #B4432F;
  --ready: #3C754A;
  --focus: #2F6B4F;
  --shadow: 0 1px 2px rgba(20, 41, 31, .06), 0 12px 32px -12px rgba(20, 41, 31, .12);
  --radius: 12px;
  --radius-card: 20px;
  --radius-pill: 999px;
  --space: 4px;
  --header: 64px;
  --frame: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --sans: Inter, -apple-system, "Segoe UI", sans-serif;
  --display: Fraunces, "Iowan Old Style", Palatino, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --deep: var(--sunken);
  --canvas: var(--bg);
  --panel: var(--surface);
  --raised: var(--sunken);
  --medium: var(--ink-2);
  --glass: var(--surface);
  --glass-solid: var(--surface);
  --border-hover: var(--border-strong);
  --rim: var(--border);
  --accent: var(--primary);
  --accent-2: var(--primary-hover);
  --accent-ink: var(--on-primary);
  --hairline: var(--border);
  --hairline-strong: var(--border-strong);
  --moss: var(--bg);
  --line-soft: var(--border);
  --panel-radius: 20px;
  --gap: 4px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E1612;
  --surface: #15201A;
  --sunken: #101A15;
  --ink: #EEF2EA;
  --ink-2: #B8C4B9;
  --muted: #8E9D92;
  --border: #2A3A31;
  --border-strong: #3A4D42;
  --primary: #8FCB9B;
  --primary-hover: #A6D9B0;
  --on-primary: #0E1612;
  --leaf: #7FBF8C;
  --sage: #4F6B55;
  --sage-soft: #1C2A22;
  --bloom: #F2A07B;
  --pending: #E0B36A;
  --danger: #F19A8A;
  --ready: #9AD3A6;
  --focus: #8FCB9B;
  --shadow: none;
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: 76px;
  background: var(--canvas);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--bg);
  background-image: none;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 24px;
  font-weight: 450;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
  line-height: 1.15;
}

h1 { font-weight: 750; font-size: 40px; }

h2 { font-weight: 700; font-size: 22px; }

h3 { font-weight: 650; font-size: 16px; }

p { color: var(--medium); }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }

button, summary, input { font: inherit; color: inherit; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 40;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
  border-radius: var(--radius);
}

.skip:focus { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.banner, .noscript {
  margin: 0;
  padding: 12px 16px;
  background: var(--raised);
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--header);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: border-color 220ms var(--ease), backdrop-filter 220ms var(--ease);
}

.site-header.is-frosted {
  background: rgba(7, 20, 18, .88);
  border-bottom-color: var(--border);
  box-shadow: inset 0 1px 0 rgba(224, 249, 235, .13);
}

.header-inner, .footer-inner, .page {
  width: min(var(--frame), 100%);
  margin: 0 auto;
  padding-left: clamp(16px, 3vw, 36px);
  padding-right: clamp(16px, 3vw, 36px);
}

.header-inner {
  min-height: var(--header);
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo, .app-brand, .rail-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}

.logo-mark { width: 22px; height: 22px; display: block; }

.logo-accent { fill: var(--accent); }

.logo-line, .logo-word { fill: var(--ink); color: var(--ink); }

.logo-line-stroke { stroke: var(--ink); }

.logo-word {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  font-weight: 650;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.nav-desktop a {
  position: relative;
  padding: 0 12px;
  font-size: 15px;
  color: var(--muted);
  background: none;
  border-radius: 0;
  box-shadow: none;
  transition: color 120ms var(--ease);
}

.nav-desktop a:hover, .nav-desktop a:focus-visible {
  color: var(--ink);
}

.nav-desktop a:hover::after, .nav-desktop a:focus-visible::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 1px;
  background: var(--ink);
}

.nav-desktop a[aria-current="page"] {
  color: var(--ink);
  background: none;
  box-shadow: none;
}

.nav-desktop a[aria-current="page"]:hover::after,
.nav-desktop a[aria-current="page"]:focus-visible::after {
  content: none;
}

.nav-indicator {
  position: absolute;
  left: 0;
  bottom: 8px;
  height: 2px;
  width: 0;
  background: var(--primary);
  transform-origin: left center;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}

.nav-desktop a, .nav-mobile a, .market-rail a, .toc a, .chapter-index a, .app-bottom a {
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-mobile a, .market-rail a, .toc a, .chapter-index a, .app-bottom a {
  color: var(--medium);
}

.nav-desktop a { color: var(--muted); }

.nav-mobile a[aria-current="page"] {
  color: var(--ink);
  box-shadow: none;
  border-bottom: 1px solid var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-mobile { display: none; }

.button, .filter-set button, .menu-toggle, summary {
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 120ms var(--ease), background-color 120ms var(--ease), color 120ms var(--ease);
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 650;
  box-shadow: none;
}

.button-primary:hover {
  background: var(--accent-2);
  color: var(--accent-ink);
  border-color: var(--accent-2);
}

.button-secondary, .button-quiet, .menu-toggle {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.button-secondary:hover, .button-quiet:hover, .menu-toggle:hover {
  border-color: var(--border-hover);
  color: var(--ink);
  background: rgba(166, 231, 202, .06);
}

.button-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.button-block { width: 100%; }

.menu-toggle { display: none; }

.cta-short { display: none; }

.page { padding-top: 56px; padding-bottom: 64px; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  margin-top: 0;
  padding-top: 44px;
  position: relative;
  overflow: hidden;
}

.hero > * { position: relative; z-index: 1; min-width: 0; }

.hero-copy {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow, .count-label, .card-kicker, .wire-kicker, .index-label, .kicker {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.display {
  font-weight: 750;
  font-size: clamp(32px, 8vw, 48px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
  max-width: 100%;
}

.display.is-pixel {
  position: relative;
  width: min(720px, 100%);
  min-width: min(720px, 100%);
  max-width: 100%;
}

.display.is-pixel .display-line {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.display-line { display: block; }

.display-solid { color: var(--ink); }

.display-outline {
  color: transparent;
  -webkit-text-stroke: 1.2px var(--ink);
}

@supports not (-webkit-text-stroke: 1px #000) {
.display-outline { color: var(--ink); -webkit-text-stroke: 0; }
}

@media (forced-colors: active) {
.display-outline { color: CanvasText; -webkit-text-stroke: 0; }
}

.lede { font-size: 15px; line-height: 24px; max-width: 60ch; color: var(--medium); }

.hero-copy .lede, .hero-copy .cta-row, .hero-copy .fine { margin-left: auto; margin-right: auto; }

.hero-copy .cta-row { justify-content: center; }

.fine, .label, .trust, .stamp, .activity-note { color: var(--muted); font-size: 13px; line-height: 20px; }

.trust { color: var(--ink); }

.cta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }

.count-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--hairline);
  background: var(--panel);
  margin-top: 16px;
}

.count-pair > div { padding: 12px 16px; min-width: 0; }

.count-pair > div + div { border-left: 1px solid var(--hairline); }

.count-value, .metric, .wire-stat {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.wire {
  border: 1px solid var(--hairline);
  background: var(--panel);
  min-width: 0;
}

.cap-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cap-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  min-width: 0;
  padding: 12px 16px;
}

.cap-row + .cap-row { border-left: 1px solid var(--line-soft); }

.cap-row .wire-stat {
  grid-column: 2;
  max-width: none;
  text-align: left;
  font-size: 13px;
}

.wire-head, .wire-rows { margin: 0; padding: 0; list-style: none; }

.wire-head { padding: 16px; border-bottom: 1px solid var(--hairline); }

.wire-head h2 { font-size: 16px; margin-bottom: 4px; }

.wire-kicker { display: flex; align-items: center; gap: 8px; }

.dot {
  width: 7px;
  height: 7px;
  background: var(--muted);
  display: inline-block;
}

.wire-kicker.is-ready, .media-badge.is-ready { color: var(--ready); border-color: var(--ready); }

.wire-kicker.is-ready .dot { background: var(--ready); }

.wire-rows li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}

.wire-rows li:last-child { border-bottom: 0; }

.glyph {
  width: 32px;
  height: 32px;
  border: 1px solid var(--hairline-strong);
  display: grid;
  place-items: center;
  color: var(--ink);
}

.glyph svg { width: 32px; height: 32px; }

.wire-copy { display: flex; flex-direction: column; min-width: 0; }

.wire-copy strong { font-weight: 650; }

.wire-copy small, .media-note { color: var(--muted); font-size: 12px; line-height: 16px; }

.wire-stat { font-size: 13px; letter-spacing: 0; text-align: right; max-width: 42%; }

.band { margin-top: 64px; }

.section-rule {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
  margin-bottom: 24px;
}

.section-rule p, .section-rule a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin: 0;
}

.section-rule h2 { margin: 0; font-size: 28px; min-width: 0; }

.section-rule a { min-height: 44px; }

.card-grid, .tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.role-art { color: var(--ink); width: 68px; height: 68px; }

.role-detail { color: var(--sage); }

.card-body, .panel, .card, .ascii-tile, .auth-card { padding: 22px; }

.card-body h3, .card-body h2 { margin-bottom: 8px; }

.meta-row, .avail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.meta-row div, .avail-list div { min-width: 0; }

.meta-row dt, .avail-list dt { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

.meta-row dd, .avail-list dd { margin: 4px 0 0; color: var(--ink); font-family: var(--mono); }

.preview-tile, .ascii-tile, .panel, .card, .auth-card, .table-wrap {
  border: 1px solid var(--border);
  background: var(--glass-solid);
  color: inherit;
  text-decoration: none;
  min-width: 0;
  border-radius: var(--panel-radius);
  box-shadow: inset 0 1px 0 var(--rim);
}

.bento-wrap { position: relative; }

.tile-grid.bento {
  gap: 16px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.preview-tile, .ascii-tile {
  --mx: 50%;
  --my: 50%;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  min-height: 168px;
  background: var(--glass-solid);
  box-shadow: inset 0 1px 0 var(--rim);
}

.auth-card, .request-summary {
  border-radius: var(--panel-radius);
  border: 1px solid var(--border);
  background: var(--glass-solid);
  box-shadow: inset 0 1px 0 var(--rim);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
.auth-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

.preview-tile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  min-height: 168px;
}

.ascii-tile { display: flex; flex-direction: column; gap: 14px; }

.ascii-tile a { min-height: 44px; display: inline-flex; align-items: center; }

.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.tile-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--ink);
}

.tile-icon svg { width: 20px; height: 20px; display: block; }

.tile-index, .tile-go {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.tile-go { margin-top: auto; }

.sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: none;
  opacity: 0;
}

.preview-tile.is-lit .sheen, .ascii-tile:not(.is-quiet).is-lit .sheen, .preview-tile:focus-visible .sheen, .ascii-tile:not(.is-quiet):focus-within .sheen { opacity: 1; }

.preview-tile:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: -3px;
}

.ascii-tile a:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

.tick { display: none; }

.preview-tile:hover, .ascii-tile a:hover { border-color: var(--ink); }

.preview-tile pre, .ascii-face pre {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
  margin: 0 0 12px;
  white-space: pre;
}

.ascii-face { min-height: 100px; padding: 16px; margin: -16px -16px 16px; }

.planned {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--hairline-strong);
  padding: 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.is-quiet { color: var(--medium); }

.how-split, .docs-layout, .request-layout, .overview-grid {
  display: grid;
  gap: 24px;
}

.step-list { list-style: none; margin: 0; padding: 0; }

.step-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
}

.step-list li > span, .step-list small {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.step-list h3 { margin-bottom: 4px; }

.step-list p { margin: 0; }

.crumb { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.crumb a { color: var(--muted); }

.chapter-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}

.chapter-index a {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 0 12px;
  gap: 8px;
}

.chapter-index span, .nav-mobile span { font-family: var(--mono); color: var(--muted); margin-right: 8px; }

.toc a { display: flex; width: 100%; border-bottom: 1px solid var(--hairline); }

.toc a[aria-current="page"], .docs-main { max-width: 735px; }

.guide-block, .field-list > div { border-top: 1px solid var(--hairline); padding-top: 16px; margin-top: 24px; scroll-margin-top: 76px; }

.field-list { margin: 0; }

.guide-block h2 { font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }

.guide-block a, .text-link { color: var(--ink); }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--deep);
}

.footer-inner {
  min-height: 60px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}

.footer-inner p, .footer-inner a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.auth-card {
  max-width: 680px;
  margin: 56px auto;
  background: var(--glass-solid);
}

.ruled-glyph {
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(166, 231, 202, .12);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.ruled-glyph svg { width: 32px; height: 32px; }

.app {
  min-height: 100vh;
  background: var(--deep);
}

.app-main { min-width: 0; }

.app-topbar {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 5;
}

.app-topbar .crumb { margin: 0; flex: 1; }

.app-content { max-width: 980px; padding: 24px 16px 48px; font-size: 14px; }

.app-content p, .app-content li { font-size: 14px; }

#workspace h1 {
  font-family: var(--sans);
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.app-tabs, .app-bottom, .shell-session { display: none; }

.rail {
  display: none;
}

.rail nav { display: flex; flex-direction: column; }

.rail-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--medium);
  text-decoration: none;
  border-left: 2px solid transparent;
}

.rail-link[aria-current="page"] {
  color: var(--ink);
  background: var(--raised);
  border-left-color: var(--ink);
}

.rail-sep { height: 1px; background: var(--hairline); margin: 8px 16px; }

.rail-session, .shell-session {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 16px;
  white-space: nowrap;
}

.metric-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.metric { font-size: 36px; }

.card-head, .panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  flex-wrap: wrap;
}

.request-list, .activity-brief, .start-list { list-style: none; margin: 0; padding: 0; }

.request-list li, .activity-brief li, .start-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--hairline);
  color: var(--ink);
}

.activity-brief li { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) auto; }

.start-list .mark {
  width: 10px;
  height: 10px;
  border: 1px solid var(--hairline-strong);
  display: inline-block;
}

.start-list .is-complete .mark { background: var(--ready); border-color: var(--ready); }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--medium);
  background: transparent;
}

.activity-brief li:hover, .activity-table tbody tr:hover { background: rgba(166, 231, 202, .08); }

.badge-received { color: var(--pending); border-color: var(--pending); }

.badge-unavailable { color: var(--danger); border-color: var(--danger); }

.is-target { border-color: var(--ink); }

.confirm, .result, .empty { margin-top: 12px; }

.result[data-tone="error"] { color: var(--danger); }

.empty-title { color: var(--ink); font-weight: 650; }

.filter-set { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.filter-set button { border-color: var(--hairline-strong); background: transparent; }

.filter-set button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.activity-table { width: 100%; border-collapse: collapse; }

.activity-table th, .activity-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
}

.activity-table th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.activity-table time { font-family: var(--mono); font-size: 12px; color: var(--medium); }

.request-summary details { margin-top: 16px; border-top: 1px solid var(--hairline); padding-top: 8px; }

.request-summary summary { padding-left: 0; }

#markets h1, #capabilities h1, #how h1, #docs h1, #auth-gate h1 {
  font-family: var(--sans);
  font-weight: 650;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.page > .lede + .fine { margin-top: 8px; }

.page > .lede + .section-rule, .page > .lede + .how-split, .page > .lede + .chapter-index {
  margin-top: 30px;
}

.page > .lede + .section-rule { margin-bottom: 16px; }

#how .step-list, #how .panel {
  background: var(--glass-solid);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  box-shadow: inset 0 1px 0 var(--rim);
}

#how .step-list { padding: 4px 22px 8px; }

#how .step-list li { border-top-color: var(--border); }

#how .step-list li:first-child { border-top: 0; }

#docs .guide-block {
  background: var(--glass-solid);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  padding: 22px 24px;
  box-shadow: inset 0 1px 0 var(--rim);
}

.toc a[aria-current="page"], .chapter-index a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent);
}

.chapter-index a {
  border-color: var(--border);
  background: var(--glass-solid);
  border-radius: var(--radius);
}

#marketplace h1, #markets h1, #capabilities h1, #how h1, #docs h1, #dashboard h1, #how-it-works, #guide-start, #guide-paths, #guide-fields, #guide-faq, #guide-plan, #wallet-sign-in, #access-requests, #request-history {
  scroll-margin-top: 76px;
}

@media (min-width: 700px) {
.card-grid, .tile-grid, .metric-grid { grid-template-columns: 1fr 1fr; }
.metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 800px) {
.how-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.step-list li { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; }
.step-list small { grid-column: 3; justify-self: end; text-align: right; }
.docs-layout { grid-template-columns: 200px minmax(0, 735px); align-items: start; }
.toc { position: sticky; top: 76px; }
.overview-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}

@media (max-width: 799px) {
.toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
  }
.toc a {
    width: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 10px;
    border-bottom: 1px solid var(--border);
  }
.step-list li { row-gap: 6px; }
.step-list small { grid-column: 2 / -1; }
}

@media (min-width: 900px) {
.hero { padding-top: 68px; }
.display-line { white-space: nowrap; }
.request-layout { grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); align-items: start; }
.request-summary { position: sticky; top: 76px; }
.app { display: grid; grid-template-columns: 180px minmax(0, 1fr); }
.rail {
    display: flex;
    flex-direction: column;
    width: 180px;
    min-height: 100vh;
    border-right: 1px solid var(--border);
    background: var(--deep);
    position: sticky;
    top: 0;
  }
.rail nav { flex: 1; }
.rail-session { display: block; }
.app-tabs { display: none !important; }
}

@media (max-width: 899px) {
.app-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--hairline);
  }
.app-bottom, .shell-session { display: flex; gap: 16px; padding: 12px 16px 24px; }
.shell-session { display: block; }
.header-workspace { display: none; }
.nav-desktop { display: none; }
.menu-toggle { display: inline-flex; }
.nav-mobile {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--hairline);
    background: var(--canvas);
  }
.nav-mobile a {
    width: 100%;
    padding: 0 16px;
    border-bottom: 1px solid var(--hairline);
  }
}

@media (max-width: 900px) {
.section-rule { grid-template-columns: 1fr; gap: 8px; }
.app-topbar { flex-wrap: wrap; height: auto; }
.auth-card { margin: 36px 16px; }
.page { padding-top: 36px; }
#markets h1, #capabilities h1, #how h1, #docs h1, #auth-gate h1 { font-size: 36px; }
}

@media (max-width: 700px) {
.header-inner, .footer-inner, .page { padding-left: 16px; padding-right: 16px; }
.card-body, .panel, .card, .ascii-tile, .auth-card { padding: 16px; }
.activity-table thead { display: none; }
.activity-table tr, .activity-table td { display: block; }
.activity-table td { border-bottom: 0; padding-bottom: 0; }
.activity-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }
.activity-table tr { border-bottom: 1px solid var(--hairline); padding-bottom: 8px; }
.activity-brief li { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
.wire-rows li { min-height: 56px; padding: 8px 12px; }
.count-value, .metric { font-size: 32px; }
.display { font-size: 36px; }
.header-inner { gap: 8px; }
#open-dashboard, .menu-toggle, #public-sign-out { padding: 0 8px; }
.logo-word { letter-spacing: 0.08em; }
}

@media (max-width: 369px) {
.cta-long { display: none; }
.cta-short { display: inline; }
.logo-word { letter-spacing: 0.08em; }
}

@media (max-width: 520px) {
.cap-rows { grid-template-columns: 1fr; }
.cap-row + .cap-row { border-left: 0; border-top: 1px solid var(--line-soft); }
}

@media (min-width: 700px) {
.tile-grid.bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 699px) {
.tile-grid.bento { grid-template-columns: 1fr; }
}

@media (pointer: fine) {
.preview-tile:hover, .ascii-tile:not(.is-quiet):hover {
    transform: translateY(-2px);
  }
}

body {
  background-color: var(--bg);
  background-image: none;
  color: var(--ink);
}

.site-header {
  height: auto;
  min-height: 64px;
  background: transparent;
  border-bottom-color: transparent;
}

.site-header .header-inner {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: 64px;
  height: 64px;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-header .logo-mark { width: 32px; height: 32px; }

.site-header .logo-mark, .rail-brand .logo-mark, .app-brand .logo-mark { color: var(--ink); }

.site-header .logo-word {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-transform: none;
}

.site-header .nav-desktop {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 0;
  box-shadow: none;
  background: none;
}

.site-header .button-primary {
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid var(--primary);
  color: var(--on-primary);
  background: var(--primary);
  box-shadow: none;
  filter: none;
}

.site-header .button-primary:hover {
  color: var(--on-primary);
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  filter: none;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  background-image: none;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: none;
}

.menu-toggle { min-width: 44px; }

#markets, #capabilities, #how, #docs, #dashboard {
  position: relative;
  background: var(--bg);
  color: var(--ink);
  isolation: isolate;
}

#markets > .page, #capabilities > .page, #how > .page, #docs > .page, #dashboard > .auth-card, #dashboard > .app {
  position: relative;
  z-index: 1;
}

#marketplace {
  position: relative;
  isolation: isolate;
  background: var(--bg);
  color: var(--ink);
}

.chooser-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 11px;
  text-decoration: none;
  color: #EAF5EF;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(155, 207, 183, .22);
}

.chooser-chip:hover { box-shadow: inset 0 0 0 1px rgba(163, 222, 196, .46); }

.request-bars {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.request-rail {
  height: 6px;
  border-radius: 999px;
  background: #0A1624;
  overflow: hidden;
}

.request-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 350ms cubic-bezier(.22, 1, .36, 1);
}

.request-fill[data-request-fill="buyer"] { background: #A6E7CA; }

.request-fill[data-request-fill="contributor"] { background: #6E9E96; }

[data-request-chart][data-bars="unknown"] .request-fill {
  visibility: hidden;
  transition: none;
}

.request-disclosure {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #9AB7AA;
}

.request-note {
  width: min(708px, 100%);
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #B7CEC3;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .8);
}

.mkt-handoff { margin: 0; }

.mkt-handoff a { min-height: 44px; display: inline-flex; align-items: center; }

.chooser-chip:focus-visible {
  outline: 2px solid #A6E7CA;
  outline-offset: 2px;
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(155, 207, 183, .22);
  background: #06110F;
  padding-bottom: 28px;
}

.site-footer .footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  width: min(1140px, 100%);
  padding-top: 18px;
  border-top: 1px solid rgba(155, 207, 183, .16);
}

.site-footer p, .site-footer a { margin: 0; color: #9AB7AA; font-size: 13.5px; }



#inference-flow {
  scroll-margin-top: calc(var(--header) + 12px);
}


.chart-title { margin: 0 0 4px; font-size: 18px; }

.chart-subhead { margin: 0 0 6px; font-size: 12px; }

#status-updating .dot { border-radius: 50%; background: var(--accent-2); }

.history-chart { margin-top: 12px; }

.history-chart svg { display: block; width: 100%; height: 140px; overflow: visible; }

.chart-grid path { fill: none; stroke: rgba(155,207,183,.2); stroke-width: 1; }

.chart-buyer, .chart-contributor { fill: none; stroke: var(--primary); stroke-width: 2; vector-effect: non-scaling-stroke; }

.chart-contributor { stroke: var(--bloom); stroke-width: 3; stroke-dasharray: 5 4; }

.point-buyer { fill: var(--primary); }

.point-contributor { fill: var(--bloom); stroke: var(--surface); stroke-width: 1; }

.chart-legend, .chart-caption { margin: 0; font-size: 11px; line-height: 18px; }

.chart-legend span:first-child { color: #a6e7ca; }

.chart-legend span + span { color: #4cba9a; }

.request-fill[data-request-fill="contributor"] { background: #4cba9a; }

.display-settings summary { color: var(--muted); padding: 0 8px; }

.display-settings label { display: block; padding: 8px; }

.route-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform-origin: left center;
  pointer-events: none;
}

.live-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--medium);
}

.live-link .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.live-link[data-live-state="live"] .dot {
  background: var(--accent-2);
  animation: live-pulse 1.4s ease-in-out infinite;
}

.live-link-caption, .live-feed-empty, .live-lane-caption {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.network-activity .live-feed { margin-top: 10px; }
.live-feed-block { margin-top: 0; }

.live-feed {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.live-feed li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--ink);
}

.live-feed-when { color: var(--muted); font-family: var(--mono); font-size: 11px; }

.hero-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 3px 8px;
  border: 1px solid rgba(139, 201, 183, .5);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink);
}

.hero-live-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
}

.hero-live-chip[data-live-state="live"] .dot {
  animation: live-pulse 1.4s ease-in-out infinite;
}

.hero-live-chip.is-pulsing { animation: live-pulse 700ms ease-out 1; }

.live-lane {
  margin: 16px 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--glass-solid);
}

.live-lane-counts { margin: 6px 0 10px; font-variant-numeric: tabular-nums; color: var(--ink); }

.lane-track {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}

.lane-line {
  position: relative;
  flex: 1;
  height: 2px;
  background: rgba(76, 186, 154, .45);
  overflow: hidden;
}

.live-lane.is-ambient .lane-line {
  background-image: linear-gradient(90deg, transparent, rgba(166, 231, 202, .7), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: lane-shimmer 7s linear infinite;
}

.lane-packet {
  position: absolute;
  top: -3px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a6e7ca;
  opacity: 0;
  pointer-events: none;
}

.live-lane.is-traveling .lane-packet { animation: lane-travel 1.2s linear 1; }

.is-count-tick { animation: count-tick 400ms ease; }

.activity-brief li.is-activity-enter, .activity-table tr.is-activity-enter {
  animation: activity-enter 400ms ease;
}

.badge.is-status-tick { animation: status-crossfade 400ms ease; }

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@keyframes lane-shimmer {
  0% { background-position: -40% 0; }
  100% { background-position: 140% 0; }
}

@keyframes lane-travel {
  0% { opacity: 0; transform: translateX(0); }
  8% { opacity: 1; }
  92% { opacity: 1; transform: translateX(calc(100cqi - 8px)); }
  100% { opacity: 0; transform: translateX(calc(100cqi - 8px)); }
}

.lane-line { container-type: inline-size; }

@keyframes count-tick {
  0% { opacity: .35; transform: translateY(2px); }
  100% { opacity: 1; transform: none; }
}

@keyframes activity-enter {
  from { opacity: 0; transform: translateY(6px); background: rgba(166, 231, 202, .28); }
  to { opacity: 1; transform: none; background: transparent; }
}

@keyframes status-crossfade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

#main { flex: 1 0 auto; }

.site-header, .site-footer { flex-shrink: 0; }

h1, h2 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 50, "opsz" 48, "WONK" 0;
  font-weight: 560;
}

h3 { font-family: var(--sans); font-weight: 600; font-size: 18px; line-height: 1.3; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--leaf);
}

.lede { max-width: 60ch; color: var(--ink-2); font-size: 16px; line-height: 1.6; }

.nav-mobile a[aria-current="page"] { background: transparent; border-color: var(--primary); }

.logo-word {
  font-family: var(--display);
  font-variation-settings: "SOFT" 50, "opsz" 24, "WONK" 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  font-size: 22px;
}

.site-header .logo-word {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

.icon-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-button svg { width: 20px; height: 20px; }

html[data-theme="dark"] .theme-sun, html:not([data-theme="dark"]) .theme-moon { display: none; }

.button, .icon-button, .path-card, .tool-card, .market-card {
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease), transform 150ms var(--ease), box-shadow 150ms var(--ease);
}

.button-primary:hover { background: var(--primary-hover); }

.garden-card:hover, .path-card:hover, .tool-card:hover, .market-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .garden-card:hover, html[data-theme="dark"] .path-card:hover, html[data-theme="dark"] .tool-card:hover, html[data-theme="dark"] .market-card:hover {
  box-shadow: none;
  border-color: var(--border-strong);
}

.nav-mobile {
  background: var(--surface);
  border-top: 1px solid var(--border);
  width: 100%;
}

.garden-hero {
  display: grid;
  gap: 28px;
  align-items: center;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 28px var(--gutter) 48px;
}

.garden-hero > * { min-width: 0; }

.garden-hero-copy { min-width: 0; }

.garden-hero h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 560;
  text-shadow: none;
  filter: none;
  opacity: 1;
  margin: 0 0 16px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }

.garden-hero .chooser-chip .role-art { width: 22px; height: 22px; }

.garden-hero .chooser-chip, .garden-hero .button {
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--border-strong);
}

.garden-hero .button-primary, .close-band .button-primary {
  color: var(--on-primary);
  background: var(--primary);
  border-color: var(--primary);
}

.garden-hero .request-note { color: var(--muted); text-shadow: none; width: auto; }

.hero-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 16px 0 0;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
}

.hero-live-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }

.hero-live-chip[data-live-state="live"] .dot { background: var(--bloom); animation: live-pulse 1.6s ease-in-out infinite; }

.pool-diagram {
  margin: 0;
  background-color: var(--sunken);
  background-image: radial-gradient(circle, rgba(20, 41, 31, .12) 1px, transparent 1.2px);
  background-size: 24px 24px;
  border-radius: 20px;
  padding: 24px;
}

html[data-theme="dark"] .pool-diagram {
  background-image: radial-gradient(circle, rgba(238, 242, 234, .1) 1px, transparent 1.2px);
}

.pool-diagram-stage { min-height: 0; }

.pool-diagram svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  pointer-events: none;
}

.pool-root, .pool-hot, .pool-flow { fill: none; stroke-linecap: round; }

.pool-root { stroke: var(--border-strong); stroke-width: 1.5; }

.pool-flow { stroke: var(--sage); stroke-width: 1.5; opacity: .55; }

.pool-hot { stroke: var(--primary); stroke-width: 2; }

.pool-card, .pool-node-shape { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.5; }

.pool-node {
  filter: drop-shadow(0 0 6px transparent);
  transition: filter 150ms linear;
}

.pool-node-shape { transition: stroke 150ms linear; }

.pool-node.is-busy .pool-node-shape {
  stroke: color-mix(in srgb, var(--primary) 35%, transparent);
  stroke-width: 1;
}

.pool-node.is-busy { filter: drop-shadow(0 0 6px var(--sage-soft)); }

.pool-logo { color: var(--ink); transition: color 200ms; }

.pool-node.is-busy .pool-logo { color: var(--primary); }

.pool-trace {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 200ms linear;
}

.pool-node.is-busy .pool-trace {
  opacity: 1;
  transition: opacity 150ms linear;
}

.pool-queue { fill: none; stroke: var(--sage); stroke-width: 1.5; stroke-dasharray: 5 7; }

.pool-pond { fill: var(--sage-soft); }

.pool-icon { fill: none; stroke: var(--primary); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.pool-line { fill: var(--primary); opacity: 1; }

.pool-packet, .pool-bead { fill: var(--primary); }

.pool-token { fill: var(--bloom); }

.pool-label {
  font-family: Inter, var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  fill: var(--muted);
}

.pool-steps {
  counter-reset: pool-step;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 16px 0 0;
  padding: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.35;
}

.pool-steps li {
  counter-increment: pool-step;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 24px;
  text-wrap: balance;
}

.pool-step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  flex: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.pool-step-dot::before { content: counter(pool-step); }

.pool-steps li.is-current { color: var(--ink); }

.pool-steps li.is-current .pool-step-dot { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

@media (min-width: 720px) {
.pool-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.pool-event { fill: var(--bloom); stroke: none; transform-box: fill-box; transform-origin: center bottom; animation: pool-sprout 1.2s var(--ease) forwards; }

.pool-diagram.is-still .pool-flow { opacity: 0; }

@keyframes pool-sprout {
  from { opacity: 0; transform: translateY(4px) scale(.7); }
  30% { opacity: 1; }
  to { opacity: 0; transform: translateY(-16px) scale(1); }
}

.garden-page { width: min(1200px, 100%); margin: 0 auto; padding: 0 var(--gutter) 64px; }

.garden-band { padding: 28px 0 12px; }

.garden-band h2, .close-band h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  margin-bottom: 16px;
}

.stat-grid, .activity-panel { display: grid; gap: 16px; }

.stat-grid { grid-template-columns: 1fr; }

.stat-tile, .garden-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .stat-tile, html[data-theme="dark"] .garden-card, html[data-theme="dark"] .path-card, html[data-theme="dark"] .tool-card { box-shadow: none; }

#activity-panel-live, #activity-panel-live .live-link, #activity-panel-live .live-feed, #activity-panel-live .live-feed-when, #activity-panel-live .count-label, #activity-panel-live .status-cluster, #activity-panel-live .chart-legend, #activity-panel-live .chart-caption, #activity-panel-live .request-disclosure, #activity-panel-live button {
  font-family: Inter, var(--sans);
}

.monitor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 24px;
}

.monitor-titles h2 { margin-bottom: 4px; }

.monitor-lede {
  margin: 0;
  max-width: 60ch;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.4;
}

.status-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
}

#activity-panel-live .live-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--ink-2);
}

#activity-panel-live .status-sep-checked, #activity-panel-live .status-sep-retry { display: none; }

#activity-panel-live .status-cluster:has(#status-checked:not([hidden])) .status-sep-checked, #activity-panel-live .status-cluster:has(#retry-status:not([hidden])) .status-sep-retry { display: inline; }

#activity-panel-live #retry-status {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 13px;
}

#activity-panel-live .stat-tile { padding: 20px; }

#activity-panel-live .count-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#activity-panel-live .count-value {
  font-family: Fraunces, var(--display);
  font-size: 48px;
  line-height: 1;
  color: var(--ink);
  opacity: 1;
  border-radius: 8px;
}

#activity-panel-live .request-rail {
  height: 6px;
  margin-top: 12px;
  border-radius: 6px;
  background: var(--sunken);
}

#activity-panel-live .request-fill-total { background: var(--ink-2); }

#activity-panel-live .request-fill[data-request-fill="buyer"] { background: var(--primary); }

#activity-panel-live .request-fill[data-request-fill="contributor"] { background: var(--bloom); }

#activity-panel-live .request-disclosure {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.monitor-split { display: grid; gap: 16px; }

.chart-card:has(#history-chart[hidden]) { display: none; }

#history-chart .chart-legend {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: 13px;
}

#history-chart .legend-buyer, #history-chart .legend-contributor { color: var(--ink-2); }

#history-chart .legend-buyer::before, #history-chart .legend-contributor::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: -1px;
}

#history-chart .legend-buyer::before { background: var(--primary); }

#history-chart .legend-contributor::before { background: var(--bloom); }

#history-chart .chart-plot { position: relative; height: 220px; }

#history-chart .chart-plot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 220px;
}

#history-chart .chart-points { overflow: visible; }

#history-chart .chart-grid path { stroke: var(--border); stroke-width: 1; }

#history-chart .chart-caption {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

#activity-panel-live .live-feed li {
  border-top: 1px solid var(--border);
  padding: 10px 0;
}

#activity-panel-live .live-feed-when {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 719px) {
.monitor-head { flex-direction: column; }
}

@media (min-width: 960px) {
.monitor-split { grid-template-columns: 2fr 1fr; align-items: stretch; }
.monitor-split > .chart-card,
.monitor-split > .live-feed-block { height: auto; margin: 0; align-self: stretch; }
}

[data-preview] { min-width: 0; }

[data-preview] .monitor-head { margin-bottom: 24px; }

[data-preview] .eco-metrics,
[data-preview] .eco-split,
[data-preview] .eco-lower {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

[data-preview] .eco-split,
[data-preview] .eco-lower { margin-top: 16px; }

[data-preview] .eco-card { min-width: 0; padding: 20px; }

[data-preview] .eco-card h3 {
  margin: 0 0 12px;
  font-family: Inter, var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

[data-preview] .eco-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: Inter, var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

[data-preview] .eco-value {
  margin: 0;
  font-family: Fraunces, var(--display);
  font-size: 44px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

[data-preview] .eco-sub,
[data-preview] .eco-node-head,
[data-preview] .eco-axis {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: Inter, var(--sans);
  font-size: 13px;
  line-height: 1.4;
}

[data-preview] .eco-spark {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 8px;
}

[data-preview] .eco-spark-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

[data-preview] .eco-plot { min-width: 0; overflow: hidden; }

[data-preview] .eco-chart-svg {
  display: block;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

[data-preview] .eco-grid line {
  stroke: var(--border);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

[data-preview] .eco-series { transition: transform 2s linear; }

[data-preview] .eco-area { fill: var(--sage-soft); stroke: none; }

[data-preview] .eco-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

[data-preview] .eco-axis {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

[data-preview] .eco-nodes {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, calc(8 * 28px + 7 * 6px));
  margin: 12px auto 0;
  justify-content: center;
}

[data-preview] .eco-node {
  width: 100%;
  max-width: 28px;
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 4px;
  background: var(--sunken);
  transition: background-color 200ms, outline-color 200ms, box-shadow 200ms;
}

[data-preview] .eco-node.is-idle {
  background: var(--surface);
  outline: 1px solid var(--border-strong);
}

[data-preview] .eco-node.is-busy {
  background: var(--primary);
  outline: none;
}

[data-preview] .eco-node.is-pulse { animation: eco-node-pulse 300ms ease-out 1; }

[data-preview] .eco-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

[data-preview] .eco-feed li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

[data-preview] .eco-feed li.eco-enter { animation: eco-row-in 300ms ease; }

[data-preview] .eco-feed li.eco-leave { opacity: 0; transition: opacity 300ms; }

[data-preview] .eco-footnote {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: Inter, var(--sans);
  font-size: 13px;
  line-height: 1.4;
}

@keyframes eco-node-pulse {
  0% { box-shadow: 0 0 0 0 var(--primary); }
  100% { box-shadow: 0 0 0 6px transparent; }
}

@keyframes eco-row-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 768px) and (max-width: 1099px) {
  [data-preview] .eco-metrics,
  [data-preview] .eco-split,
  [data-preview] .eco-lower { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (min-width: 1100px) {
  [data-preview] .eco-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  [data-preview] .eco-split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  [data-preview] .eco-lower { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
}

@media (max-width: 599px) {
  [data-preview] .monitor-head { margin-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-preview] .eco-series { transition: none; }
  [data-preview] .mix-fill { transition: none; }
}

[data-preview] .eco-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

[data-preview] .eco-card-head h3 { margin: 0; }

[data-preview] .eco-legend {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 0;
  color: var(--ink-2);
  font-family: Inter, var(--sans);
  font-size: 13px;
  line-height: 1.2;
}

[data-preview] .eco-swatch::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: -1px;
}

[data-preview] .eco-swatch-demand::before { background: var(--primary); }

[data-preview] .eco-swatch-capacity::before { background: var(--bloom); }

[data-preview] .eco-line-capacity { stroke: var(--bloom); }

[data-preview] .eco-matches { margin-top: 16px; }

[data-preview] .mix-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

[data-preview] .mix-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-family: Inter, var(--sans);
  font-size: 13px;
}

[data-preview] .mix-track {
  height: 8px;
  border-radius: 8px;
  background: var(--sunken);
  overflow: hidden;
}

[data-preview] .mix-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 8px;
  background: var(--primary);
  transition: width 600ms ease;
}

[data-preview] .mix-fill[data-mix="agent"] { opacity: .78; }

[data-preview] .mix-fill[data-mix="code"] { opacity: .58; }

[data-preview] .mix-fill[data-mix="batch"] { opacity: .4; }

#market-directory .network-main { grid-template-columns: minmax(0, 1fr); }

#market-preview > .page-section:first-child { margin-top: 0; }

[data-preview-part="lane-track"] { position: relative; }

[data-preview-part="lane-track"] > span.is-glow::before {
  background: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 35%, transparent);
}

#market-directory [data-preview-part="lane-node"] { position: relative; }

.preview-packet {
  position: absolute;
  top: 1px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transform-origin: center;
}

.preview-ping {
  position: absolute;
  top: 3px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow:
    -7px 0 0 color-mix(in srgb, var(--primary) 55%, transparent),
    -14px 0 0 color-mix(in srgb, var(--primary) 32%, transparent),
    -21px 0 0 color-mix(in srgb, var(--primary) 14%, transparent);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.preview-node-glow {
  position: absolute;
  left: 50%;
  top: -3px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border: 1.5px solid var(--sage);
  border-radius: 50%;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
}

.preview-ripple {
  position: absolute;
  left: 50%;
  top: 0;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border: 1.5px solid var(--sage);
  border-radius: 50%;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transform-origin: center;
}

.is-stat-hot { animation: stat-hot 400ms var(--ease); }

.live-feed li { animation: feed-in 300ms var(--ease); }

.step-row {
  --step-gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--step-gap);
  position: relative;
}
.step-row li {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.step-row li > span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1.5px solid var(--primary);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 560;
  font-size: 18px;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.step-row h3, .step-row p { margin: 0; }
.step-row p { color: var(--ink-2); }
.step-row li:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  background: var(--border-strong);
  pointer-events: none;
}
@media (max-width: 899px) {
  .step-row li:not(:last-child)::after {
    left: 17.25px;
    top: 18px;
    width: 1.5px;
    height: calc(100% + var(--step-gap));
    transform-origin: top center;
  }
}
@media (min-width: 900px) {
  .step-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step-row::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 17.25px;
    left: 18px;
    width: calc(66.666% + var(--step-gap) * 2 / 3);
    height: 1.5px;
    background: var(--border-strong);
    transform-origin: left center;
    pointer-events: none;
  }
  .step-row li:not(:last-child)::after { display: none; }
}
.reveal-pending .step-row::before { transform: scaleX(0); }
.reveal-pending .step-row li:not(:last-child)::after { transform: scaleY(0); }
.reveal.is-revealed .step-row::before {
  animation: step-draw-x 700ms var(--ease) forwards;
}
.reveal.is-revealed .step-row li:not(:last-child)::after {
  animation: step-draw-y 700ms var(--ease) forwards;
}
@keyframes step-draw-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes step-draw-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
#how-it-works .mkt-handoff { text-align: left; margin-top: 20px; }

.path-grid, .tool-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

.path-card, .tool-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 44px;
  height: 100%;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.path-card p, .tool-card p { color: var(--ink-2); margin: 0; }

.path-icon { width: 36px; height: 36px; color: var(--primary); }

.path-icon svg { width: 28px; height: 28px; }

.path-link { margin-top: auto; color: var(--primary); font-weight: 600; }

.path-card-quiet { background: var(--sunken); }

.close-band {
  margin-top: 28px;
  padding: 36px 24px;
  border-radius: 20px;
  background: var(--sage-soft);
}

.close-band h2, .close-band p { color: var(--ink); }

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--ink-2);
  padding: 28px 0 40px;
}

.site-footer .footer-inner {
  width: min(1200px, 100%);
  display: grid;
  gap: 32px;
  align-items: start;
  justify-items: start;
  border: 0;
  padding: 0 var(--gutter);
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}
.site-footer .footer-brand,
.site-footer .footer-col,
.site-footer nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
}
.site-footer p, .site-footer a { color: var(--ink-2); font-size: 14px; letter-spacing: 0; text-transform: none; font-family: var(--sans); }
.footer-brand .logo-word { font-size: 20px; }
.site-footer .footer-col { gap: 4px; }
.site-footer .footer-col .eyebrow { margin: 0 0 8px; }
.site-footer .display-settings { color: var(--ink); }
.site-footer .display-settings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--leaf);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.site-footer .display-settings summary::-webkit-details-marker { display: none; }
.site-footer .display-settings summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 150ms var(--ease);
  flex: none;
}
.site-footer .display-settings[open] summary::after { transform: rotate(225deg); }
.site-footer .display-settings label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.site-footer .display-settings select {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  padding: 0 12px;
}
.footer-rule {
  width: min(1200px, 100%);
  height: 0;
  margin: 28px auto 0;
  border-top: 1px solid var(--border);
}

.footer-base {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 16px var(--gutter) 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 24px;
  border: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
}
.footer-base p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.footer-base p:last-child { margin-left: auto; text-align: right; }

.reveal-pending { opacity: 0; transform: translateY(12px); }

.reveal.is-revealed { animation: reveal-in 360ms var(--ease) both; animation-delay: var(--reveal-delay, 0ms); }

.role-detail { color: var(--leaf); }

#markets h1, #capabilities h1, #how h1, #docs h1, #auth-gate h1 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 50, "opsz" 48, "WONK" 0;
}

@keyframes live-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: .65; }
}

@keyframes stat-hot {
  0% { background-color: var(--sage-soft); }
  100% { background-color: transparent; }
}

@keyframes feed-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 600px) {
.tool-grid { grid-template-columns: 1fr 1fr; }
.stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 640px) and (max-width: 959px) {
.path-grid { grid-template-columns: 1fr 1fr; }
.path-grid > :last-child { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
.tool-grid { grid-template-columns: 1fr 1fr 1fr; }
.site-footer .footer-inner { grid-template-columns: 2fr 1fr 1fr 1.2fr; }
}

@media (min-width: 960px) {
.garden-hero {
    grid-template-columns: 1fr 1.15fr;
    gap: 56px;
    min-height: 620px;
    align-items: center;
    padding-top: 72px;
  }
.path-grid { grid-template-columns: 1.15fr 1.15fr .8fr; }
}

@media (max-width: 420px) {
.cta-long { display: none; }
.cta-short { display: inline; }
}

/* Public page chrome. */
#markets > .garden-page,
#capabilities > .garden-page,
#how > .garden-page,
#docs > .garden-page {
  width: min(1200px, 100%);
  padding: 0 var(--gutter) 64px;
}

.page-head { padding-top: 40px; padding-bottom: 24px; }

.page-head .crumb {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 0 0 16px;
}

.page-head .crumb a { color: var(--ink-2); text-decoration: none; }

.page-head .crumb a:hover { text-decoration: underline; }

#markets .page-head h1,
#capabilities .page-head h1,
#how .page-head h1,
#docs .page-head h1 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 50, "opsz" 48, "WONK" 0;
  font-weight: 560;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 12px;
}

.page-head .lede { margin: 0; }

.page-head .fine { margin: 12px 0 0; }

.page-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }

#markets .page-section,
#capabilities .page-section,
#how .page-section,
#docs .page-section { margin-top: 64px; }

#markets .page-head + .page-section,
#capabilities .page-head + .page-section,
#how .page-head + .page-section { margin-top: 0; }

.section-head { margin: 0 0 20px; }

.section-head .eyebrow { margin-bottom: 8px; }

.section-head h2,
#markets .close-band h2,
#capabilities .close-band h2,
#how .close-band h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--ink);
}

.section-head h2 { margin-bottom: 0; }

.role-split { display: grid; gap: 24px; }

.role-split > * { min-width: 0; }

.live-lane {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
}

.live-lane .live-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
}

.live-lane .live-link .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.live-lane .live-link[data-live-state="live"] .dot { background: var(--ready); }

.network-main {
  display: grid;
  gap: 20px;
  align-items: center;
}

.network-stats { min-width: 0; }

.lane-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 16px;
}

.lane-stats p,
.role-lane .count-label { margin: 0; }

.lane-stats .count-label,
.role-lane .count-label,
.activity-card .count-label {
  display: block;
  margin: 0 0 4px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lane-stat {
  display: block;
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.network-caption,
.live-lane .live-lane-caption,
.live-lane .live-link-caption {
  margin: 12px 0 0;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.lane-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
  margin-top: 4px;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.2;
}

.role-lane .lane-track { margin-top: 16px; }

.lane-track > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 1 92px;
  max-width: 92px;
  text-align: center;
  color: var(--ink-2);
}

.lane-track > span::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  background: var(--surface);
  box-sizing: border-box;
}

.live-lane .lane-line {
  position: relative;
  flex: 1 1 16px;
  height: 1.5px;
  min-width: 12px;
  margin-top: 5.25px;
  background: var(--border-strong);
  overflow: hidden;
  container-type: inline-size;
}

.live-lane.is-ambient .lane-line {
  background-color: var(--border-strong);
  background-image: linear-gradient(90deg, transparent, var(--sage), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: lane-shimmer 8s linear infinite;
}

.live-lane .lane-packet { background: var(--bloom); }

.market-layout { display: grid; gap: 20px; min-width: 0; }

.market-results { min-width: 0; }

.market-rail { min-width: 0; max-width: 100%; }

#markets .market-rail a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 12px 0 14px;
  border-radius: 10px;
  color: var(--ink-2);
  text-decoration: none;
  position: relative;
}

#markets .market-rail a[aria-current="true"] {
  background: var(--sage-soft);
  color: var(--primary);
}

#markets .market-rail a[aria-current="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--primary);
}

.market-tip {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

#markets .card-grid { align-items: stretch; }

.market-card,
.feature-card {
  transition: border-color 150ms var(--ease), transform 150ms var(--ease), box-shadow 150ms var(--ease);
}

.market-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.path-band {
  height: 120px;
  display: grid;
  place-items: center;
  background: var(--sunken);
  color: var(--primary);
}

.path-vignette { width: min(100%, 320px); height: 96px; display: block; }

.market-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 20px;
}

.market-card .card-kicker {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--leaf);
}

.market-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.15;
  color: var(--ink);
}

.market-card .card-copy { margin: 0; color: var(--ink-2); }

.path-meta {
  margin: 4px 0 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}

.path-meta span { color: var(--ink); font-variant-numeric: tabular-nums; }

.media-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  margin: 4px 0 0;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--sunken);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
}

.card-foot {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--primary);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.card-foot,
.feature-card a,
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-foot { display: flex; }

.card-foot .arrow,
.feature-card a .arrow,
.arrow-link .arrow {
  display: inline-block;
  transition: transform 150ms var(--ease);
}

.market-card:hover .arrow,
.market-card:focus-visible .arrow,
.feature-card a:hover .arrow,
.feature-card a:focus-visible .arrow { transform: translateX(4px); }

.market-card:hover,
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 2px 4px rgba(20, 41, 31, .08), 0 18px 40px -16px rgba(20, 41, 31, .2);
}

.activity-card {
  max-width: 420px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.activity-card .count-value {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 48px;
  line-height: 1;
  color: var(--ink);
}

.activity-card p:last-child { margin: 12px 0 0; color: var(--ink-2); }

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.feature-card h3 { margin: 0; }

.feature-card p { margin: 0; color: var(--ink-2); }

.feature-card a {
  margin-top: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--sage-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.feature-icon svg { width: 22px; height: 22px; display: block; }

html[data-theme="dark"] .live-lane,
html[data-theme="dark"] .market-card,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .activity-card { box-shadow: none; }

html[data-theme="dark"] .market-card:hover,
html[data-theme="dark"] .feature-card:hover {
  box-shadow: none;
  border-color: var(--border-strong);
}

@media (min-width: 800px) {
.network-main { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

@media (min-width: 900px) {
.page-head { padding-top: 72px; padding-bottom: 40px; }
#markets .page-section,
#capabilities .page-section,
#how .page-section,
#docs .page-section { margin-top: 96px; }
#markets .page-head + .page-section,
#capabilities .page-head + .page-section,
#how .page-head + .page-section { margin-top: 0; }
.market-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
.market-rail {
    position: sticky;
    top: 88px;
    width: 220px;
    display: block;
    overflow: visible;
  }
#markets .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
.market-rail {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    position: static;
    width: auto;
    padding-bottom: 4px;
  }
.market-rail .eyebrow { display: none; }
#markets .market-rail a {
    width: auto;
    flex: none;
    scroll-snap-align: start;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 0 14px;
  }
#markets .market-rail a[aria-current="true"] {
    background: var(--sage-soft);
    color: var(--primary);
    border-color: transparent;
  }
#markets .market-rail a[aria-current="true"]::before { display: none; }
}

@media (min-width: 960px) {
.role-split { grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
}

.role-lane {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lane-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.role-lane .live-link,
.role-lane .live-link-caption,
.role-lane .count-label,
.role-lane .lane-stat,
.role-lane .lane-track,
.role-lane .live-lane-caption,
.role-lane .media-badge { margin: 0; }

.role-lane .live-link-caption {
  font-size: 13px;
  color: var(--muted);
}

.lane-count { display: grid; gap: 8px; }

.lane-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.role-lane .lane-stat { font-size: 40px; }

.activity-row {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.activity-row .activity-card { max-width: none; height: 100%; }

.activity-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.activity-note p { margin: 0; color: var(--muted); }

.arrow-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

#how .section-head p { margin: 8px 0 0; color: var(--ink-2); }

#how .step-row .eyebrow { margin: 0; }

#how .step-row h3 { margin: 4px 0 0; }

[data-pool-diagram="how"] { min-height: 0; }

[data-pool-diagram="how"] .pool-diagram-stage {
  max-width: 760px;
  margin-inline: auto;
}

[data-pool-diagram="how"] .pool-steps {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

[data-pool-diagram="how"] .pool-steps li {
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink-2);
}

[data-pool-diagram="how"] .pool-step-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

[data-pool-diagram="how"] .pool-step-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

[data-pool-diagram="how"] .pool-step-note { line-height: 1.4; }

[data-pool-diagram="how"] .pool-steps li.is-current {
  border-color: var(--primary);
  background: var(--sage-soft);
  color: var(--ink);
}

.next-grid { display: grid; gap: 16px; }

.next-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.next-card p { margin: 0; color: var(--ink-2); }

#docs .chapter-index {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

#docs .chapter-index a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  min-height: 0;
  min-width: 0;
  width: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 150ms var(--ease), border-color 150ms var(--ease);
}

#docs .chapter-num {
  margin: 0;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  font-family: var(--display);
  font-size: 40px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0;
  color: var(--primary);
}

#docs .chapter-title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

#docs .chapter-desc {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

#docs .chapter-index a:hover { transform: translateY(-2px); border-color: var(--border-strong); }

#docs .chapter-index a:hover .chapter-num { border-bottom-color: var(--primary); }

#docs .chapter-index a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--primary);
}

#docs .docs-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
}

#docs .docs-layout > * { min-width: 0; }

#docs .toc {
  position: sticky;
  top: 64px;
  z-index: 3;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
}

#docs .toc-marker { display: none; }

#docs .toc a {
  width: auto;
  flex: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--ink-2);
  font-family: var(--sans);
  text-decoration: none;
  background: transparent;
}

#docs .toc-num {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-right: 0.35em;
}

#docs .toc a[aria-current="page"] .toc-num { color: inherit; }

#docs .toc a[aria-current="page"] {
  max-width: none;
  border: 0;
  color: var(--primary);
  background: var(--sage-soft);
}

#docs .docs-main {
  max-width: 720px;
  min-width: 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}

#docs .guide-block {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin-top: 0;
  scroll-margin-top: 96px;
}

#docs .chapter-kicker {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: none;
  color: var(--leaf);
}

#docs .garden-divider {
  display: flex;
  align-items: center;
  height: 56px;
  margin: 0;
  color: var(--sage);
}

#docs .garden-divider::before,
#docs .garden-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
}

#docs .garden-divider svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0 8px;
}

#docs .docs-main h2 {
  font-family: var(--display);
  font-weight: 560;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 16px;
  scroll-margin-top: 96px;
}

#docs .docs-main h3 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  scroll-margin-top: 96px;
}

#docs .docs-main a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#docs .docs-main ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

#docs .docs-main ol > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: start;
  min-width: 0;
}

#docs .step-num {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--primary);
}

#docs .step-copy {
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 360px) {
#docs .docs-main ol {
  gap: 0;
}
#docs .docs-main ol > li {
  grid-template-columns: 44px minmax(200px, 1fr);
  column-gap: 12px;
  align-items: baseline;
  position: relative;
  padding-bottom: 20px;
}
#docs .docs-main ol > li:last-child { padding-bottom: 0; }
#docs .step-num {
  line-height: 1.445;
}
#docs .docs-main ol > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 30px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
}

#docs .field-list { margin: 0; }

#docs .field-list > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
}

#docs .field-list dt {
  color: var(--ink);
  font-family: var(--sans);
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

#docs p,
#docs dd,
#docs li {
  font-family: var(--sans);
}

#docs .field-list dd { margin: 0; color: var(--ink-2); }

#docs .faq-q {
  font-family: var(--display);
  font-weight: 560;
  color: var(--primary);
  margin-right: 0.35em;
}

#docs #guide-faq > h3 {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

#docs #guide-faq > h3:first-of-type {
  padding-top: 0;
  border-top: 0;
}

#docs #guide-faq > p { margin: 8px 0 16px; }

#docs .callout {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 12px 0;
  padding: 16px 16px 16px 42px;
  border-left: 3px solid var(--primary);
  border-radius: 12px;
  background: var(--sage-soft);
  color: var(--ink-2);
}

#docs .callout::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 16px;
  width: 16px;
  height: 16px;
  background: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 14.5V8.2' stroke='%23000' stroke-width='1.4' stroke-linecap='round'/%3E%3Cpath d='M8 9.2C6.6 7.6 5.2 7 4 6.6' stroke='%23000' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M8 8.4C9.5 6.7 11 6.1 12.2 5.7' stroke='%23000' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M4 6.6c-.6-1 .1-1.8 1-1.5.6.2.8 1 .2 1.5' stroke='%23000' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12.2 5.7c.8-.7.3-1.7-.7-1.4-.7.2-.9.9-.4 1.4' stroke='%23000' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 14.5V8.2' stroke='%23000' stroke-width='1.4' stroke-linecap='round'/%3E%3Cpath d='M8 9.2C6.6 7.6 5.2 7 4 6.6' stroke='%23000' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M8 8.4C9.5 6.7 11 6.1 12.2 5.7' stroke='%23000' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M4 6.6c-.6-1 .1-1.8 1-1.5.6.2.8 1 .2 1.5' stroke='%23000' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12.2 5.7c.8-.7.3-1.7-.7-1.4-.7.2-.9.9-.4 1.4' stroke='%23000' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

#docs .docs-main ol > li .callout { margin: 12px 0 0; }

html[data-theme="dark"] .activity-note,
html[data-theme="dark"] .next-card,
html[data-theme="dark"] #docs .chapter-index a { box-shadow: none; }

@media (min-width: 700px) {
.next-grid { grid-template-columns: 1fr 1fr; }
#docs .field-list > div { grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
#docs .field-list > div > * { min-width: 0; }
#docs .field-list > div:hover { background: var(--sage-soft); }
}

@media (min-width: 768px) {
#docs .chapter-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 599px) {
#docs .docs-main { font-size: 16px; }
#docs .docs-main h2 { font-size: 28px; }
}

@media (min-width: 900px) {
.activity-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
[data-pool-diagram="how"] { min-height: 420px; }
[data-pool-diagram="how"] .pool-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
#docs .docs-layout { grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
#docs .toc {
    position: sticky;
    top: 88px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
    overflow: visible;
    width: 240px;
    padding: 0 0 0 14px;
    border: 0;
    border-left: 2px solid var(--border);
    background: transparent;
  }
#docs .toc-marker {
    display: block;
    position: absolute;
    left: -2px;
    top: 0;
    width: 2px;
    background: var(--primary);
    transform: translateY(0);
    transition: transform 200ms var(--ease);
    pointer-events: none;
  }
#docs .toc a {
    width: 100%;
    border-radius: 0;
    padding: 8px 0;
    background: transparent;
    color: var(--ink-2);
    font-family: var(--sans);
  }
#docs .toc a[aria-current="page"] {
    background: transparent;
    color: var(--ink);
  }
}

@media (min-width: 1100px) {
#docs .chapter-index { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Workspace gate and shell */
body:not(.is-shell) #main:has(#dashboard:not([hidden])) {
  display: flex;
  flex-direction: column;
}

#dashboard:has(#auth-gate:not([hidden])) {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px var(--gutter);
  background-color: var(--bg);
  background-image: radial-gradient(circle, rgba(20, 41, 31, .12) 1px, transparent 1.2px);
  background-size: 24px 24px;
}

html[data-theme="dark"] #dashboard:has(#auth-gate:not([hidden])) {
  background-image: radial-gradient(circle, rgba(238, 242, 234, .1) 1px, transparent 1.2px);
}

#auth-gate.auth-card {
  width: min(480px, 100%);
  max-width: 480px;
  margin: 0;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--shadow);
}

html[data-theme="dark"] #auth-gate.auth-card { box-shadow: none; }

#auth-gate .gate-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
}

#auth-gate .gate-mark .logo-mark { width: 40px; height: 40px; }

#auth-gate .gate-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 8px;
}

#auth-gate h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 32px;
  font-weight: 560;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  min-width: 0;
}

#auth-gate .gate-spinner {
  display: none;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(from -90deg, var(--primary) 0 90deg, transparent 90deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  animation: gate-spin 900ms linear infinite;
}

#auth-gate[data-state="loading"] .gate-spinner,
#auth-gate[data-state="verifying"] .gate-spinner { display: block; }

@keyframes gate-spin { to { transform: rotate(360deg); } }

#auth-gate #gate-message {
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.5;
}

#auth-gate[data-state="expired"] #gate-message,
#auth-gate[data-state="auth-error"] #gate-message,
#auth-gate[data-state="sdk-error"] #gate-message {
  padding: 10px 12px;
  border-left: 3px solid var(--danger);
  border-radius: 0 12px 12px 0;
}

#auth-gate[data-state="unconfigured"] #gate-message {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--sunken);
}

#auth-gate #gate-intent {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

#auth-gate #gate-intent[hidden] { display: none; }

#auth-gate #gate-intent::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--primary);
  flex: none;
}

#auth-gate .gate-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }

#auth-gate #continue-wallet {
  flex: 1 1 100%;
  width: 100%;
  min-height: 48px;
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

#auth-gate #continue-wallet:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

#auth-gate #retry-auth,
#auth-gate #reset-auth {
  flex: 1 1 calc(50% - 8px);
  width: auto;
  min-width: 0;
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

#auth-gate .trust {
  display: flex;
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

#auth-gate .trust-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

#auth-gate .trust-check { display: inline-flex; align-items: center; gap: 6px; }

#auth-gate .trust-check svg { width: 14px; height: 14px; color: var(--primary); flex: none; }

#auth-gate .fine { margin: 0; }

#workspace.app {
  min-height: 100vh;
  background: var(--bg);
}

#workspace .rail { display: none; }

#workspace .app-tabs { display: none !important; }

#workspace .app-main { min-width: 0; }

#workspace .app-topbar {
  height: 64px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 6;
}

#workspace .app-brand { display: none; color: var(--primary); }

#workspace .crumb {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
}

#workspace #panel-name { color: var(--ink); font-weight: 600; }

#workspace .topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

#workspace .button-small {
  min-height: 36px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
}

#workspace .app-content {
  width: min(1120px, 100%);
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px;
}

#workspace .app-bottom,
#workspace .shell-session { display: none; }

@media (min-width: 900px) {
#workspace.app {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
  }
#workspace .rail {
    display: block;
    width: 232px;
    height: auto;
    min-height: 100dvh;
    align-self: stretch;
    position: relative;
    padding: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    box-sizing: border-box;
  }
#workspace .rail-sticky {
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
  }
#workspace .rail-brand { margin-bottom: 18px; color: var(--ink); }
#workspace .rail-brand .logo-mark { width: 22px; height: 22px; color: var(--primary); }
#workspace .rail-nav { display: flex; flex-direction: column; gap: 2px; flex: none; }
#workspace .rail-label {
    margin: 8px 10px 6px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
  }
#workspace .rail-links { position: relative; display: flex; flex-direction: column; gap: 2px; }
#workspace .rail-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 40px;
    border-radius: 2px;
    background: var(--primary);
    opacity: 0;
    pointer-events: none;
  }
#workspace .rail-link {
    min-height: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px 0 14px;
    border-radius: 10px;
    border-left: 0;
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
  }
#workspace .rail-link svg { width: 18px; height: 18px; flex: none; }
#workspace .rail-link[aria-current="page"] {
    background: var(--sage-soft);
    color: var(--primary);
    border-left-color: transparent;
  }
#workspace .rail-sep {
    height: 1px;
    margin: 16px 0;
    background: var(--border);
  }
#workspace .rail-session {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 0;
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
  }
#workspace .rail-session p { margin: 0; }
#workspace .rail-session-mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sage-soft);
    color: var(--primary);
    display: grid;
    place-items: center;
    flex: none;
  }
#workspace .rail-session-mark .logo-mark { width: 18px; height: 18px; }
}

@media (max-width: 899px) {
#workspace .app-brand { display: inline-flex; }
#workspace .app-brand .logo-mark { width: 22px; height: 22px; color: var(--primary); }
#workspace .app-content { padding: 20px; }
#workspace .app-main { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
#workspace .shell-session {
    display: block;
    margin: 0;
    padding: 4px 20px 16px;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
  }
#workspace .app-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: calc(64px + env(safe-area-inset-bottom));
    min-height: 64px;
    padding: 0 0 env(safe-area-inset-bottom);
    border-top: 1px solid var(--border);
    background: var(--surface);
  }
#workspace .app-bottom a {
    position: relative;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
  }
#workspace .app-bottom a svg { width: 18px; height: 18px; }
#workspace .app-bottom a[aria-current="page"] { color: var(--primary); }
#workspace .app-bottom a[aria-current="page"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 24px;
    height: 3px;
    border-radius: 999px;
    background: var(--primary);
    transform: translateX(-50%);
  }
}

@media (max-width: 899px) {
#auth-gate.auth-card { padding: 24px; }
}

/* Workspace panel interiors */
#workspace, #workspace * { font-family: var(--sans); }

#workspace .panel-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 24px;
}

#workspace .panel-head > div { min-width: 0; }

#workspace .panel-head .eyebrow {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--leaf);
}

#workspace .panel-head h1 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 32px;
  font-weight: 560;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

#workspace .panel-lead {
  margin: 0;
  max-width: 60ch;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

#workspace .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
}

html[data-theme="dark"] #workspace .card { box-shadow: none; }

#workspace .card h2,
#workspace .card h3 {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--ink);
}

#workspace .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#workspace .card-head h2 { margin: 0; }

#workspace .card-head a,
#workspace .card-action {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

#workspace .card-action { display: inline-flex; margin-top: 16px; min-height: 44px; align-items: center; }

#workspace .overview-role .pool-heartbeat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: var(--sunken);
  border-top: 1px solid var(--border);
}

#workspace .pool-spark {
  width: 120px;
  height: 28px;
  flex: none;
  display: block;
}

#workspace .pool-spark-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

#workspace .pool-heartbeat-rate {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

#workspace .pool-heartbeat-caption {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

#workspace .overview-role > .button {
  margin-top: 12px;
  min-height: 44px;
}

#workspace .overview-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

#workspace .overview-active .eyebrow {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

#workspace #active-count,
#workspace .network-activity .count-value {
  font-family: var(--display);
  font-weight: 560;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

#workspace #active-count {
  margin: 0;
  font-size: 48px;
  line-height: 1;
}

#workspace #active-requests {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

#workspace #active-requests li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 14px;
}

#workspace .role-card-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

#workspace .role-card-head h2 { margin: 0; }

#workspace .icon-tile {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--sage-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
}

#workspace .icon-tile svg { width: 20px; height: 20px; display: block; }

#workspace .badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 6px;
  height: 24px;
  min-height: 24px;
  padding: 0 8px;
  white-space: nowrap;
  border: 0;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}

#workspace .badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

#workspace .badge[data-badge="not-requested"] {
  background: var(--sunken);
  color: var(--ink-2);
}

#workspace .badge[data-badge="received"] {
  background: color-mix(in srgb, var(--ready) 14%, transparent);
  color: var(--ready);
}

#workspace .badge[data-badge="pending"],
#workspace .badge.badge-unavailable {
  background: color-mix(in srgb, var(--pending) 14%, transparent);
  color: var(--pending);
}

#workspace .badge.is-status-tick { animation: status-crossfade 200ms var(--ease); }

#workspace .network-activity .live-pill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 16px;
}

#workspace .live-link,
#workspace .live-link-label,
#workspace .live-link-caption,
#workspace .live-feed,
#workspace .live-feed-when {
  font-family: var(--sans);
  letter-spacing: 0;
  text-transform: none;
}

#workspace .network-activity .live-link { margin: 0; font-size: 14px; color: var(--ink); }

#workspace .network-activity .live-link-caption { margin: 0; font-size: 14px; color: var(--muted); }

#workspace .network-activity .live-link-caption:not([hidden])::before {
  content: "\00b7";
  margin-right: 8px;
}

#workspace .network-activity .count-pair {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 0 16px;
  border: 0;
  background: transparent;
}

#workspace .network-activity .count-pair > div { padding: 0 20px 0 0; min-width: 0; }

#workspace .network-activity .count-pair > div + div {
  border-left: 1px solid var(--border);
  padding: 0 0 0 20px;
}

#workspace .network-activity .count-label {
  margin: 0 0 4px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

#workspace .network-activity { min-width: 0; }

#workspace .network-activity .activity-panel,
#workspace .network-activity .monitor-split,
#workspace .network-activity .chart-plot { min-width: 0; }

#workspace .network-activity .monitor-head { margin-bottom: 16px; }

#workspace .network-activity .count-value {
  margin: 0;
  font-size: 48px;
  line-height: 1;
  color: var(--ink);
}

#workspace .network-activity h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }

#workspace .network-activity .live-feed li {
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

#workspace .network-activity .live-feed-when { color: var(--muted); font-size: 13px; }

#workspace .activity-brief { margin: 0; padding: 0; list-style: none; }

#workspace .activity-brief li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  background: transparent;
}

#workspace .activity-brief li:hover,
#workspace .activity-table tbody tr:hover { background: transparent; }

#workspace .event-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#workspace .event-name { color: var(--ink); font-size: 14px; }

#workspace .activity-brief time,
#workspace .activity-table time {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
}

#workspace .activity-table time { color: var(--ink-2); }

#workspace .event-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}

#workspace .event-mark svg { width: 14px; height: 14px; display: block; }

#workspace .event-mark[data-action="submitted"] { background: var(--sage-soft); color: var(--primary); }

#workspace .event-mark[data-action="withdrawn"] { background: var(--sunken); color: var(--ink-2); }

#workspace .role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

#workspace .empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin: 8px 0 0;
}

#workspace .empty p { margin: 0; color: var(--muted); font-size: 14px; }

#workspace .empty-title { color: var(--ink); font-weight: 600; }

#workspace .empty-icon { width: 28px; height: 28px; color: var(--primary); display: grid; place-items: center; }

#workspace .empty-icon svg { width: 28px; height: 28px; display: block; }

#workspace .empty-icon-warn { color: var(--danger); }

#workspace .callout-danger {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
}

#workspace .callout-danger .empty-title { color: var(--danger); margin: 0 0 8px; }

#workspace .start-list { margin: 0; padding: 0; list-style: none; }

#workspace .start-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border: 0;
  color: var(--ink);
  text-align: left;
}

#workspace .start-list .step-label,
#workspace .start-list a { text-align: left; color: var(--ink); font-size: 15px; }

#workspace .start-list .mark {
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
}

#workspace .start-list .is-complete .mark {
  background: var(--primary);
  border-color: var(--primary);
}

#workspace .start-list .is-complete .mark::after {
  content: "";
  width: 6px;
  height: 10px;
  border: solid var(--on-primary);
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}

#workspace #step-signin-state,
#workspace #step-role-state {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

#workspace .request-layout,
#workspace .request-stack { display: grid; gap: 16px; }

#workspace .request-layout { grid-template-columns: 1fr; }

#workspace .request-summary { position: static; }

#workspace .role-copy {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}

#workspace .role-intent {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--sage-soft);
  color: var(--primary);
  font-size: 14px;
}

#workspace .role-meta,
#workspace .stamp {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0;
}

#workspace .role-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
}

#workspace .role-actions .button { min-height: 44px; }

#workspace #buyer-withdraw,
#workspace #contributor-withdraw {
  background: transparent;
  border-color: transparent;
  color: var(--danger);
  min-height: 44px;
  padding-left: 8px;
  padding-right: 8px;
}

#workspace .confirm {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  container: confirm / inline-size;
}

#workspace .confirm p { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; }

#workspace .confirm p:first-child {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

#workspace .confirm .cta-row { display: flex; gap: 8px; margin: 8px 0 0; }

#workspace .confirm .button { flex: 1 1 auto; min-width: max-content; min-height: 44px; white-space: nowrap; }

@container confirm (max-width: 359px) {
  #workspace .confirm .cta-row { flex-direction: column; }
  #workspace .confirm .button { width: 100%; }
}

#workspace .confirm .button-danger {
  background: #9a3828;
  border-color: #9a3828;
  color: #fffdf7;
}

#workspace .confirm .button-danger:hover {
  background: #832f22;
  border-color: #832f22;
  color: #fffdf7;
}

#workspace .card.is-target {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
  animation: intent-ring 1.2s var(--ease);
}

#workspace .result {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 14px;
}

#workspace .result[data-tone]::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: none;
  background: var(--ready);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.2 6.4 11.2 12.8 4.4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.2 6.4 11.2 12.8 4.4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

#workspace .result[data-tone="error"] { color: var(--danger); }

#workspace .result[data-tone="error"]::before {
  background: var(--danger);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2.8 14.2 13.2H1.8L8 2.8Z' fill='none' stroke='black' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M8 6.4v3.2' stroke='black' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2.8 14.2 13.2H1.8L8 2.8Z' fill='none' stroke='black' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M8 6.4v3.2' stroke='black' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

#workspace .result:not([hidden]) { animation: result-in 240ms var(--ease); }

#workspace .request-summary h2 { margin-bottom: 16px; }

#workspace .summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

#workspace .summary-row p { margin: 0; color: var(--ink); }
#workspace .summary-row p:not(.badge) { min-width: 0; font-size: 14px; }

#workspace .summary-kicker {
  margin: 16px 0 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

#workspace .summary-note { margin: 0; color: var(--muted); font-size: 13px; }

#workspace .filter-set {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 4px;
  border-radius: 12px;
  background: var(--sunken);
}

#workspace .filter-indicator {
  position: absolute;
  left: 0;
  top: 0;
  height: 36px;
  width: 0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  pointer-events: none;
  transition: transform 240ms var(--ease), width 240ms var(--ease), height 240ms var(--ease);
}

#workspace .filter-set button {
  position: relative;
  z-index: 1;
  min-height: 36px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

#workspace .filter-set button[aria-pressed="true"] {
  color: var(--ink);
  background: transparent;
  border-color: transparent;
}

#workspace .activity-table { width: 100%; border-collapse: collapse; }

#workspace .activity-table th {
  padding: 0 8px 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  text-align: left;
}

#workspace .activity-table td {
  height: 56px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--ink);
  vertical-align: middle;
}

#workspace .event-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

#workspace .activity-table .event-mark { width: 24px; height: 24px; }

#workspace .activity-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

#workspace .chatgpt-account,
#workspace .connector-card,
#workspace .sandbox-card {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  min-width: 0;
}

#workspace .chatgpt-account h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0;
}

#workspace .chatgpt-account-copy,
#workspace .chatgpt-account-status {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}

#workspace .chatgpt-account .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#workspace .chatgpt-account .button {
  min-height: 44px;
  text-align: center;
}

#workspace .chatgpt-note {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
}

#workspace .chatgpt-note.is-connected {
  color: var(--ink-2);
}

#workspace .connector-card h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0;
}

#workspace .connector-copy,
#workspace .connector-status,
#workspace .connector-url,
#workspace .connector-note {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}

#workspace .connector-url {
  overflow-wrap: anywhere;
  font-size: 13px;
}

#workspace .connector-steps {
  margin: 10px 0 0;
  padding-left: 1.2rem;
  color: var(--ink-2);
  font-size: 14px;
}

#workspace .connector-facts {
  margin: 10px 0 0;
}

#workspace .connector-facts div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  margin-top: 6px;
  font-size: 14px;
}

#workspace .connector-facts dt {
  margin: 0;
  color: var(--muted);
}

#workspace .connector-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

#workspace .connector-card .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#workspace .connector-card .button {
  min-height: 44px;
  text-align: center;
}

#workspace .sandbox-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

#workspace .sandbox-head h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0;
}

#workspace .sandbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

#workspace .sandbox-pill svg { width: 14px; height: 14px; display: block; }

#workspace .sandbox-help,
#workspace .sandbox-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

#workspace .inline-link {
  padding: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

#workspace .sandbox-unavailable {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 12px;
}

#workspace .sandbox-unavailable p { margin: 0; color: var(--ink); font-size: 14px; }

#workspace .link-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

#workspace .link-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

#workspace .provider-logo {
  width: 24px;
  height: 24px;
  flex: none;
  color: currentColor;
}

#workspace .link-name { font-weight: 600; min-width: 0; }

#workspace .link-state.is-linked { color: var(--ready); font-weight: 600; }

#workspace .link-since { color: var(--muted); font-size: 13px; }

#workspace .link-row .button { margin-left: auto; min-height: 36px; }

#workspace .link-row .button:disabled,
#workspace .link-row .button[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

#workspace .link-note {
  flex: 1 1 100%;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

#workspace .link-shimmer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  overflow: hidden;
  background: transparent;
  pointer-events: none;
}

#workspace .link-row.is-linking .link-shimmer { background: var(--sunken); }

#workspace .link-row.is-linking .link-shimmer::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  background: var(--ink-2);
  animation: link-shimmer 900ms ease-in-out infinite;
}

@keyframes link-shimmer {
  from { transform: translateX(-120%); }
  to { transform: translateX(280%); }
}

#workspace .pool-demand { margin: 12px 0 0; min-width: 0; }

.provider-handoff {
  width: min(440px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  margin: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-family: var(--sans);
}

.provider-handoff::backdrop {
  background: color-mix(in srgb, var(--ink) 46%, transparent);
}

.provider-handoff .eyebrow { margin: 0 0 8px; }

.provider-handoff h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 560;
  line-height: 1.15;
  color: var(--ink);
}

.provider-handoff-host {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--sunken);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
}

.provider-handoff p { margin: 0; color: var(--ink-2); font-size: 14px; }

.provider-handoff .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.provider-handoff .button {
  flex: 1 1 160px;
  min-height: 44px;
  text-align: center;
}

#workspace .pool-demand ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#workspace .pool-demand li { margin: 0; color: var(--ink); font-size: 14px; }

#workspace .sandbox-caption { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

#workspace .model-set {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 12px;
  max-width: 100%;
  overflow-x: auto;
}

#workspace .model-set button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

#workspace .model-set button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--sunken);
  color: var(--ink);
}

#workspace .model-set .provider-logo { width: 16px; height: 16px; flex: none; }

#workspace .playground-label {
  display: block;
  margin: 12px 0 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

#workspace #playground-prompt {
  display: block;
  width: 100%;
  min-height: 96px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  resize: vertical;
}

#workspace .playground-count {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

#workspace #playground-run { margin-top: 12px; }

#workspace .playground-sample-label {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

#workspace .playground-output {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#workspace .playground-route {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  overflow-wrap: anywhere;
}

#workspace #playground-clear { margin-top: 12px; }

#workspace .activity-table .provider-logo { width: 24px; height: 24px; }

#workspace .activity-table tr[hidden] {
  display: none !important;
}

#workspace .activity-table tr.is-row-enter {
  animation: row-enter 320ms var(--ease) both;
  animation-delay: calc(var(--row-i, 0) * 30ms);
}

#workspace .activity-table tr {
  opacity: 1;
}

@keyframes intent-ring {
  0% { box-shadow: 0 0 0 0 transparent; }
  25% { box-shadow: 0 0 0 4px var(--primary); }
  50% { box-shadow: 0 0 0 0 transparent; }
  75% { box-shadow: 0 0 0 4px var(--primary); }
  100% { box-shadow: 0 0 0 2px var(--primary); }
}

@keyframes result-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes row-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 600px) {
  #workspace .panel-head h1 { font-size: 40px; }
  #workspace .card { padding: 24px; }
}

@media (min-width: 768px) and (max-width: 1099px) {
  #workspace .overview-grid { grid-template-columns: 1fr 1fr; }
  #workspace .overview-active { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  #workspace .panel-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
  #workspace .panel-head .button-primary { flex: none; align-self: center; }
}

@media (min-width: 1100px) {
  #workspace .overview-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  #workspace .overview-active,
  #workspace .overview-role { grid-column: span 4; }
  #workspace .network-activity { grid-column: 1 / -1; }
  #workspace .recent-activity { grid-column: span 6; }
  #workspace .getting-started { grid-column: span 6; }
  #workspace .request-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 300px;
    align-items: start;
  }
  #workspace .request-stack { display: contents; }
  #workspace .request-summary {
    position: sticky;
    top: 88px;
  }
  #workspace .model-set {
    gap: 4px;
    overflow-x: hidden;
  }
  #workspace .model-set button {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 0 6px;
    font-size: 13px;
  }
  #workspace .model-set .provider-logo {
    width: 16px;
    height: 16px;
    flex: none;
  }
}

@media (min-width: 1100px) and (max-width: 1279px) {
  #workspace .model-set { gap: 2px; }
  #workspace .model-set button {
    padding: 0 2px;
    font-size: 12px;
  }
  #workspace .model-set .provider-logo { display: none; }
}

@media (min-width: 1280px) and (max-width: 1439px) {
  #workspace .model-set { gap: 2px; }
  #workspace .model-set button { padding: 0 4px; }
}

@media (max-width: 700px) {
  #workspace #activity-table.table-wrap {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  #workspace .activity-table thead { display: none; }
  #workspace .activity-table,
  #workspace .activity-table tbody { display: block; }
  #workspace .activity-table tr {
    display: block;
    margin: 0 0 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
  }
  #workspace .activity-table td {
    display: block;
    height: auto;
    padding: 6px 0;
    border-bottom: 0;
  }
  #workspace .activity-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
  }
}

@media (max-width: 420px) {
  #workspace .filter-set { display: flex; width: 100%; }
  #workspace .filter-set button {
    flex: 1 1 calc(50% - 4px);
    height: auto;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 13px;
    white-space: normal;
    text-align: center;
  }
  #workspace .link-row .button { margin-left: 0; }
}

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

html.user-reduced-motion *,
html.user-reduced-motion *::before,
html.user-reduced-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
