:root {
  --ink: #16181d;
  --ink-soft: #3a3d46;
  --muted: #6b6f7a;
  --rule: #e3e3e0;
  --rule-strong: #c9c9c5;
  --paper: #ffffff;
  --faint: #f6f6f4;
  --link: #1d4ed8;
  --bot: #c2611a;
  --l0: #edeef0;
  --l1: #cfe0ff;
  --l2: #9dbffc;
  --l3: #5b8ef0;
  --l4: #1d4ed8;
  --on-link: #ffffff;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ecece8;
    --ink-soft: #c4c5ca;
    --muted: #8b8e97;
    --rule: #2a2c33;
    --rule-strong: #3a3d45;
    --paper: #121317;
    --faint: #1a1b20;
    --link: #6b9eff;
    --bot: #e39a55;
    --l0: #23252b;
    --l1: #1e3a6e;
    --l2: #2b5cb0;
    --l3: #4d82e0;
    --l4: #6b9eff;
    --on-link: #0b1020;
  }
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0 12px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 14px;
}

nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

nav .brand:hover { text-decoration: none; }

nav .links {
  display: flex;
  gap: 20px;
  font-size: 13px;
}

nav .links a { color: var(--ink-soft); }

/* hero */
h1 {
  margin: 88px 0 14px;
  font-size: 40px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.lede {
  margin: 0 0 28px;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.cmd {
  display: flex;
  max-width: 560px;
  border: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: 15px;
}

.cmd code {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  white-space: nowrap;
  overflow-x: auto;
  color: var(--ink);
}

.cmd button {
  appearance: none;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  margin: -1px -1px -1px 0;
  padding: 0 18px;
  background: var(--link);
  color: var(--on-link);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.cmd button:hover { opacity: 0.9; }
.cmd button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.note {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* hero with the dithered coin */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 32px;
  align-items: center;
}

h1 { white-space: nowrap; }

.coin {
  width: 150px;
  margin: -24px 0 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .coin { display: none; }
}

/* supported tools: endless logo strip */
.tools {
  display: flex;
  overflow: hidden;
  margin: 32px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.tools-track {
  display: flex;
  flex: 0 0 auto;
  gap: 40px;
  margin: 0;
  padding: 0 40px 0 0;
  list-style: none;
  animation: tools-scroll 32s linear infinite;
}

.tools:hover .tools-track { animation-play-state: paused; }

.tools li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tools i {
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}

@keyframes tools-scroll {
  to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .tools { -webkit-mask: none; mask: none; }
  .tools-track { animation: none; flex-wrap: wrap; gap: 10px 24px; }
  .tools-track[aria-hidden] { display: none; }
}

/* demo: terminal then profile */
.demo {
  display: grid;
  margin-top: 56px;
}

/* Ordered-dither wipe canvas sits over the shared cell during the hand-off */
.demo > .dither {
  grid-area: 1 / 1;
  align-self: start;
  z-index: 2;
  pointer-events: none;
  image-rendering: pixelated;
}

/* Terminal and profile share one grid cell, so the section is always as tall
   as the larger of the two and nothing below it moves during the demo. */
.demo > .term,
.demo > .profile {
  grid-area: 1 / 1;
  align-self: start;
}

.term {
  --t-bg: #0f1115;
  --t-ink: #e6e6e1;
  border: 1px solid #23262d;
  background: var(--t-bg);
  color: var(--t-ink);
  overflow: hidden;
  transition: none;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-bottom: 1px solid #23262d;
}

.term-bar > span {
  width: 9px;
  height: 9px;
  background: #2c3038;
}

.replay {
  appearance: none;
  margin-left: auto;
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  background: none;
  color: #7c818c;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}

.replay:hover { color: #e6e6e1; }

.term-body {
  margin: 0;
  height: 420px;
  padding: 14px 16px;
  border: 0;
  background: none;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}

.t-gray { color: #7c818c; }
.t-blue { color: #8ab4ff; }
.t-green { color: #6fd39b; }
.t-bold { font-weight: 600; }
.t-under { text-decoration: underline; text-underline-offset: 3px; }

.caret {
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: #e6e6e1;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.demo:not(.revealed) .profile { visibility: hidden; }



.demo.revealed .term {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}



.profile-actions {
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
}

.replay-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}

.replay-link:hover { color: var(--ink); }

.demo.revealed:not(.instant) .hm span:not(.out) {
  animation: cell-in 0.3s steps(3) backwards;
  animation-delay: calc(var(--w, 0) * 12ms + 150ms);
}

@keyframes cell-in {
  from { opacity: 0; }
}

.demo.instant .term { transition: none; }

/* example profile */
.profile {
  border-top: 1px solid var(--rule-strong);
}

.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
}

.profile-head .handle {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.profile-head a.view { font-size: 13px; }

.total {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 22px 0 18px;
}

.total .big {
  font-family: var(--mono);
  font-size: 34px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.total .label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* heatmap */
.hm-months {
  position: relative;
  height: 18px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.hm-months span { position: absolute; top: 0; }

.hm {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 1fr);
  gap: 3px;
  width: 100%;
}

.hm span {
  aspect-ratio: 1;
  background: var(--l0);
}

.hm span.out { background: transparent; }
.hm span.l1 { background: var(--l1); }
.hm span.l2 { background: var(--l2); }
.hm span.l3 { background: var(--l3); }
.hm span.l4 { background: var(--l4); }
.hm span.live:hover { outline: 1px solid var(--ink); outline-offset: 0; }

.hm-legend {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.hm-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
}

.hm-legend .lbl { margin: 0 4px; }

.tip {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 8px;
  transform: translate(-50%, calc(-100% - 8px));
  white-space: nowrap;
}

.privacy-line {
  margin: 20px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
}

/* background: dithered sea of tokens */
/* Anchored to the bottom of the page: the stacks stand on the footer and
   scroll into view with the content. */
body { position: relative; }

.sea {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%; /* the whole page, so coins can fall from the top of the screen */
  z-index: -1;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* docs link under the demo */
.docs-cta {
  margin: 56px 0 0;
  font-family: var(--mono);
  font-size: 13px;
}

.docs-cta .muted { margin-left: 10px; }

/* docs page */
.wrap.wide { max-width: 1040px; }

.docs {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 56px;
  margin-top: 40px;
}

.docs-nav {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  font-size: 13px;
}

.docs-nav p {
  margin: 18px 0 6px;
  font-size: 11px;
  color: var(--muted);
}

.docs-nav p:first-child { margin-top: 0; }

.docs-nav a {
  padding: 3px 0 3px 10px;
  border-left: 1px solid var(--rule);
  color: var(--ink-soft);
}

.docs-nav a:hover { color: var(--ink); text-decoration: none; }

.docs-nav a.active {
  border-left-color: var(--link);
  color: var(--link);
}

.docs-body { min-width: 0; max-width: 720px; }

.docs-body section {
  padding-bottom: 36px;
  scroll-margin-top: 24px;
}

.docs-body h1 {
  margin: 0 0 16px;
  font-size: 34px;
}

.docs-body h2 {
  margin: 8px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

.docs-body h3 {
  margin: 22px 0 6px;
  font-size: 16px;
}

.docs-body p,
.docs-body li {
  color: var(--ink-soft);
  line-height: 1.65;
}

.docs-body ol,
.docs-body ul { padding-left: 20px; }

.docs-body li { margin: 4px 0; }

.docs-body pre { margin: 12px 0; }

.docs-body table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 14px;
}

.docs-body th,
.docs-body td {
  padding: 8px 10px;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.docs-body th {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.docs-body td code { white-space: nowrap; }

nav .links a[aria-current] { color: var(--ink); }

@media (max-width: 820px) {
  .docs { grid-template-columns: 1fr; gap: 24px; }
  .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
  .docs-nav p { display: none; }
  .docs-nav a { border: 0; padding: 0; }
  .docs-body td code { white-space: normal; }
}

/* sections */
section.block {
  margin-top: 88px;
}

h2 {
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

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

.rows li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.rows li > :first-child {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  padding-top: 2px;
}

.rows li p {
  margin: 0;
  color: var(--ink-soft);
}

code.inline,
.rows code,
p code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--faint);
  padding: 1px 5px;
}

pre {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  background: var(--faint);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
}

.block p { color: var(--ink-soft); }

/* sources split (profile page) */
.split {
  display: flex;
  height: 4px;
  margin-top: 18px;
  gap: 2px;
}

.split span { min-width: 2px; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
}

footer {
  margin: 96px 0 0;
  padding: 14px 0 40px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* Landing page: the footer sits in the hoard's deep water */
.has-sea footer {
  /* Open stage above the footer, so the hoard never sits under text */
  margin-top: 42vh;
  padding: 26px 0 48px;
  border-top: 0;
  color: #b9c6e4;
}

.has-sea footer a { color: #f0c463; }

@media (prefers-color-scheme: light) {
  .has-sea footer { color: #3a4a6b; }
  .has-sea footer a { color: #1d4ed8; }
}

@media (max-width: 640px) {
  .term-body { font-size: 11px; height: 360px; padding: 12px; }
  h1 { margin-top: 56px; font-size: 32px; }
  .hm { gap: 2px; }
  .rows li { grid-template-columns: 1fr; gap: 4px; }
  .total .big { font-size: 28px; }
  .cmd { font-size: 13px; }
  .cmd button { padding: 0 12px; font-size: 13px; }
}



/* skip button fills as you try to scroll during the demo */
#skip {
  position: relative;
  padding: 2px 8px;
  background: linear-gradient(90deg, rgba(240, 196, 99, 0.35) var(--fill, 0%), transparent var(--fill, 0%));
  transition: background 0.12s linear;
}

/* landing chapters after the demo */
.chapter {
  margin-top: 112px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.chapter.in { opacity: 1; transform: none; }

.kicker {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: #f0c463;
}

.chapter h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.chapter-lede {
  max-width: 560px;
  margin: 0 0 28px;
  font-size: 16px;
  color: var(--ink-soft);
}

.chapter figure { margin: 0; }

.chapter figcaption {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.chapter img { display: block; max-width: 100%; height: auto; }



/* api */
.api-split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.api-body { height: 250px; font-size: 12px; white-space: pre-wrap; word-break: break-all; }

.api-chart { display: flex; flex-direction: column; justify-content: flex-end; }

.lib-bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; height: 200px; }
.lib-bars div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.lib-bars span {
  width: 100%;
  min-height: 2px;
  height: var(--h, 0%);
  background: var(--link);
  transition: height 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--delay, 0ms), background-color 0.3s ease, opacity 0.2s ease;
}

/* loading skeleton: muted bars with a slow shimmer, morphed into real data */
.lib-bars.skeleton span {
  background: linear-gradient(90deg, var(--rule) 0%, var(--rule-strong) 50%, var(--rule) 100%) 0 0 / 300% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
}

@keyframes skeleton { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.lib-bars:not(.skeleton) div { cursor: default; }
.lib-bars:not(.skeleton) div:hover span { background: #f0c463; }
.lib-bars:not(.skeleton):hover div:not(:hover) span { opacity: 0.45; }

.api-chart { position: relative; }
.lib-bars small { font-family: var(--mono); font-size: 10px; color: var(--muted); }

.chapter .docs-cta { margin-top: 32px; }
.chapter .docs-cta a + a { margin-left: 20px; }

@media (prefers-reduced-motion: reduce) {
  .chapter { opacity: 1; transform: none; transition: none; }
}


/* Chapters share one rhythm: 112px between sections, heading, one line, content.
   Galleries keep the same left edge as the heatmap above them. */
.chapter + .chapter { margin-top: 104px; }
.chapter h2 + .chapter-lede { margin-top: 0; }
.badge-row figure,
.graph-row figure { display: flex; flex-direction: column; }
.graph-row { gap: 32px 24px; }
.badge-row { gap: 24px 40px; }
.api-split { gap: 28px; }
.chapter .docs-cta { margin-top: 36px; }


/* reveal intro above the profile */
.reveal-intro { margin: 0 0 22px; }

.reveal-intro h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.reveal-intro p { margin: 0; max-width: 600px; color: var(--ink-soft); }

/* hover: cards lift, inline SVG parts respond */
.card-hover,
.badge-hover {
  transition: transform 0.2s ease;
}

.card-hover:hover,
.badge-hover:hover { transform: translateY(-2px); }

.card-hover .card-svg,
.card-hover img { outline: 1px solid transparent; transition: outline-color 0.2s ease; }

.card-hover:hover .card-svg,
.card-hover:hover img { outline-color: var(--link); }

.badge-hover img { transition: filter 0.2s ease; }
.badge-hover:hover img { filter: brightness(1.15); }

.card-svg svg { display: block; width: 100%; height: auto; max-width: 100%; }

.card-svg .tt-row,
.card-svg .tt-seg { transition: opacity 0.2s ease; cursor: default; }
.card-svg .tt-dim { opacity: 0.3; }

.card-svg .tt-guide { stroke: var(--muted); stroke-dasharray: 3 3; }
.card-svg .tt-dot { fill: var(--link); stroke: var(--paper); stroke-width: 2; }
.card-svg .tt-readout { fill: var(--ink); font-family: var(--mono); }
.card-svg .tt-point { cursor: crosshair; }

/* profile heatmap and playground cells already outline on hover; keep links lively */
.chapter a,
.docs-cta a { transition: color 0.2s ease; }

/* auth + settings */
.auth-card { max-width: 520px; margin: 88px 0 0; }
.auth-card h1, .settings h1 { margin-top: 0; white-space: normal; font-size: 32px; }
.settings { margin-top: 64px; }

.auth-button {
  appearance: none;
  border: 0;
  border-radius: 0;
  padding: 11px 18px;
  background: var(--link);
  color: var(--on-link);
  font-family: var(--mono);
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.auth-button:hover { opacity: 0.88; }
.auth-button:disabled { opacity: 0.6; cursor: default; }

.auth-form { display: flex; gap: 0; max-width: 460px; }
.auth-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-right: 0;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-family: var(--mono);
  font-size: 14px;
}

.nav-button, .link-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--link);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
}
.link-button:hover, .nav-button:hover { text-decoration: underline; }

.settings-block { margin-top: 48px; }
.settings-block h2 { margin: 0 0 8px; }
.settings-block .muted { margin: 0 0 14px; font-size: 14px; }

.devices { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.devices li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 13px;
}
.devices li .muted { margin: 0; font-size: 12px; }
.devices li.revoked .device-name { text-decoration: line-through; color: var(--muted); }

.danger-button { background: #c2412d; color: #fff; }

/* API query sections */
.query-line {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  word-break: break-all;
}
.query-line .method {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 6px;
  background: var(--link);
  color: var(--on-link);
  font-size: 11px;
}
#profile .query-line { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); }

/* skeleton shimmer shared by every section */
.skeleton .stack,
.skeleton .bar i,
.skeleton dd,
.skeleton .share-bar {
  background: linear-gradient(90deg, var(--rule) 0%, var(--rule-strong) 50%, var(--rule) 100%) 0 0 / 300% 100% !important;
  animation: skeleton 1.4s ease-in-out infinite;
}
.skeleton .stack > *, .skeleton .share-bar > * { display: none; }

/* usage: stacked bars */
.stack-chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; height: 220px; }
.stack-chart .col { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 4px; }
.stack-chart .stack {
  display: flex;
  flex-direction: column-reverse;
  height: var(--h, 0%);
  min-height: 2px;
  transition: height 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--delay, 0ms), opacity 0.2s ease;
}
.stack-chart .stack span { flex-basis: 0; }
.stack-chart small { text-align: center; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.stack-chart:not(.skeleton):hover .col:not(:hover) .stack { opacity: 0.45; }
.q-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.q-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; }

/* models: ranked list */
.rank-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.rank-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1.3fr) minmax(0, 1fr) 120px;
  gap: 14px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 13px;
  transition: background-color 0.15s ease;
}
.rank-list:not(.skeleton) li:hover { background: var(--faint); }
.rank-list .rank { color: var(--muted); }
.rank-list .name small, .rank-list .num small { display: block; font-size: 11px; color: var(--muted); }
.rank-list .num { text-align: right; }
.rank-list .bar { height: 6px; background: var(--faint); }
.rank-list .bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--link); transition: width 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--delay, 0ms); }

/* tools: share */
.share-bar { display: flex; height: 14px; gap: 2px; }
.share-bar span { min-width: 3px; transition: opacity 0.2s ease; }
.share:not(.skeleton) .share-bar:hover span:not(:hover) { opacity: 0.4; }
.share-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 24px; font-family: var(--mono); font-size: 13px; }
.share-list li { display: flex; align-items: baseline; gap: 8px; }
.share-list i { width: 9px; height: 9px; flex: 0 0 auto; }
.share-list span { flex: 1; }
.share-list small { color: var(--muted); }

/* stats: grid */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border: 1px solid var(--rule); }
.stat-grid > div { padding: 14px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transition: background-color 0.15s ease; }
.stat-grid > div:nth-child(4n) { border-right: 0; }
.stat-grid > div:nth-last-child(-n + 4) { border-bottom: 0; }
.stat-grid:not(.skeleton) > div:hover { background: var(--faint); }
.stat-grid dt { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.stat-grid dd { margin: 0; min-height: 26px; font-family: var(--mono); font-size: 20px; font-weight: 600; color: var(--ink); }
.stat-grid dd small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }

.api-term { margin-top: 4px; }
.api-body { height: 300px; font-size: 12px; white-space: pre-wrap; word-break: break-all; }

/* docs: endpoint signatures and try-it console */
.docs-body .sig { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.docs-body .method,
.try-api .method {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 6px;
  background: var(--link);
  color: var(--on-link);
  font-family: var(--mono);
  font-size: 11px;
}
.try-api { margin: 14px 0 6px; border: 1px solid var(--rule-strong); }
.try-api form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.try-api input {
  padding: 3px 6px;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.try-api input[name=params] { flex: 1; min-width: 140px; }
.try-api button {
  appearance: none;
  border: 0;
  border-radius: 0;
  padding: 4px 12px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  cursor: pointer;
}
.docs-body .try-api pre.try-out { margin: 0; border: 0; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-all; }


/* background: stippled dot screen behind everything, anchored to the page so it scrolls with it */
.stipple {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: -2;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
