/*
 * Graphite / azure: the same design system the extension uses.
 *
 * The token names and values are lifted from the extension's theme.css so the
 * site and the product are not two different things. The one addition here is a
 * light palette, because a public page has to work in both and a popup does
 * not. Light is derived from the same hues rather than invented: the same
 * azure, the same green/amber/red, on paper instead of graphite.
 *
 * The rule the palette is built around: azure only ever means "this is the
 * action". It is never decorative. Green, amber and red only ever mean state.
 * Anything else is graphite.
 *
 * @license MIT
 */

/* Self-hosted for the same reason the extension bundles them: no third-party
   request on page load, and the site renders identically offline. Latin
   subsets only, 55 kB for the three files. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/manrope-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/plex-mono-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/plex-mono-600-latin.woff2') format('woff2');
}

:root {
  /* --- surface ---------------------------------------------------------- */
  --bg: #101114;
  --bg-alt: #16181c;
  --card: #16181c;
  --card-hi: #1d1f24;

  --border: #22242a;
  --border-hi: #2b2e36;
  --code-bg: #16181c;

  /* --- ink -------------------------------------------------------------- */
  --text: #e7e8ea;
  --muted: #b9bec6;
  --dim: #8f949c;
  --dimmer: #6f757d;

  /* --- azure: the action ------------------------------------------------ */
  --accent: #4f9dfa;
  --accent-hover: #6fb0fb;
  --accent-ink: #04182e;
  --accent-soft: #9cc9fd;
  --accent-10: rgba(79, 157, 250, 0.1);
  --accent-16: rgba(79, 157, 250, 0.16);
  /* A border that reads as azure without a solid rule. Used where a box needs
     to be marked out as the important one, on all four sides. */
  --accent-line: rgba(79, 157, 250, 0.38);

  /* --- state ------------------------------------------------------------ */
  --ok: #5cc98a;
  --ok-label: #8ddcaa;
  --ok-10: rgba(92, 201, 138, 0.1);
  --ok-30: rgba(92, 201, 138, 0.3);

  /* --- metrics ---------------------------------------------------------- */
  --max: 1120px;
  --radius: 12px;
  --r-sm: 5px;
  --r-md: 9px;
  --r-pill: 999px;

  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/*
 * Scrollbars, everywhere, in the site's own colours.
 *
 * The horizontal ones are the reason: a code block or a wide table draws a
 * platform scrollbar whose thumb is dark grey on a dark page, which reads as no
 * thumb at all and makes the overflow look like a rendering fault rather than
 * something you can scroll.
 *
 * Chromium ignores ::-webkit-scrollbar once scrollbar-width is set, so the
 * standard properties are confined to browsers without the pseudo-elements
 * (Firefox), which get the closest approximation the standard allows.
 */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  /* Painted into the content box so the transparent border reads as inset
     padding, which is what keeps the thumb clear of the track's edges. */
  background: var(--border-hi);
  background-clip: content-box;
  border: 2px solid transparent;
  border-radius: var(--r-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--dimmer); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--border-hi) transparent; }
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 38%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }

code, pre, kbd { font-family: var(--mono); font-size: .87em; }

code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  /* Tight horizontally: an inline chip sits inside a sentence, and generous
     side padding pushes it away from the words it belongs to. */
  padding: .12em .22em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.55;
}
pre code { background: none; border: 0; padding: 0; font-size: 13px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.wrap.narrow { max-width: 760px; }

.scroll-x { overflow-x: auto; }

/* Icons are one inlined sprite referenced with <use>: no icon font, no second
   request, and the stroke follows currentColor like any other text. The sprite
   itself is taken out of flow here rather than with a style attribute, which
   the site's Content-Security-Policy blocks. */
.sprite { position: absolute; }

.ico {
  width: 1em; height: 1em; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: var(--r-md); z-index: 100; font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

/* --- top bar ------------------------------------------------------------ */

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; color: var(--text); text-decoration: none;
  letter-spacing: -.01em;
}
.brand-mark { width: 22px; height: 22px; display: block; }

.topbar nav { display: flex; align-items: center; gap: 4px; }
.topbar nav a {
  color: var(--dim); text-decoration: none; font-size: 14px;
  padding: 7px 11px; border-radius: var(--r-md);
}
.topbar nav a:hover { color: var(--text); background: var(--card-hi); }
.topbar nav a.on { color: var(--text); }
/* Install is a bordered button, not a filled one, so it keeps the text colour
   on hover. It used to take --accent-ink, which is the colour meant for text
   sitting *on* azure, and against the raised grey it disappeared. */
.topbar nav a.btn:hover { color: var(--text); background: var(--card-hi); border-color: var(--accent); }

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r-md);
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-hi); color: var(--text);
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn .ico { transition: transform .15s ease; }
.btn:hover .ico { transform: translateX(3px); }

/* The Chrome mark on "Add to Chrome" buttons twirls once per hover, on a
   slight overshoot so it settles rather than stops. */
.ico-fill { fill: currentColor; stroke: none; }
/* Its own compositor layer, and allowed to paint past its box: mid-turn the
   square's corners sweep outside the 16px it was laid out in, and without a
   layer Chrome only repaints that original square, so the Free card's ghost
   button (which repaints its background on hover) showed the mark cut off. */
.btn .chrome-mark { font-size: 1.15em; overflow: visible; will-change: transform; }
.btn:hover .chrome-mark { transform: none; animation: chrome-twirl .75s cubic-bezier(.35, 1.35, .5, 1); }
@keyframes chrome-twirl { from { transform: rotate(0); } to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .btn .ico { transition: none; }
  .btn:hover .ico { transform: none; }
  .btn:hover .chrome-mark { animation: none; }
}

.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }

.btn-ghost { background: var(--card-hi); }
.btn-ghost:hover { border-color: var(--dimmer); background: var(--card-hi); }

/* --- hero --------------------------------------------------------------- */

.hero {
  padding: 84px 0 64px;
  text-align: center;
  /* One wash, in the accent, behind the headline. The old page had two
     overlapping purple radials, which read as decoration rather than focus. */
  background: radial-gradient(58% 52% at 50% -12%, var(--accent-10), transparent 72%);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  display: inline-block;
  font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; font-weight: 600;
  color: var(--dim);
  border: 1px solid var(--border-hi); border-radius: var(--r-pill);
  padding: 5px 14px; margin-bottom: 26px;
  background: var(--card);
}

.hero h1 {
  font-size: clamp(34px, 6.2vw, 60px);
  line-height: 1.06;
  letter-spacing: -.03em;
  font-weight: 800;
  margin-bottom: 20px;
}
/* Flat azure, not a gradient. The accent means one thing everywhere and a
   three-stop ramp through pink was not it. */
.grad { color: var(--accent); }

.lede { font-size: clamp(16px, 2.1vw, 19px); color: var(--muted); max-width: 640px; margin: 0 auto; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }

.trust {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: center;
  margin-top: 26px; color: var(--dim); font-size: 13.5px;
}
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust .ico { color: var(--ok); }

.shot { margin-top: 52px; }
.shot img, .shot video {
  width: 100%; height: auto; display: block;
  /* The video is dark graphite edge to edge, so on the dark page it needs the
     border to read as a frame; aspect-ratio holds the space before it loads. */
  aspect-ratio: 16 / 9; background: #101114;
  border: 1px solid var(--border-hi); border-radius: var(--radius);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9);
}

/* --- Product Hunt, launch day ------------------------------------------- */

/* Product Hunt's own orange, used nowhere else on the site, so on the one day
   it shows it reads as an event rather than as another azure control. */
.ph-live {
  --ph: #ff6154;
  /* The arrow in the orange: lifted on the dark page, deepened on the light
     one, where Product Hunt's own value is too pale against white. */
  --ph-ink: #ff7b70;
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  width: fit-content; max-width: 100%;
  margin: 0 auto 22px;
  padding: 7px 18px 7px 7px;
  border: 1px solid color-mix(in srgb, var(--ph) 45%, transparent);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--ph) 9%, var(--card));
  color: var(--text); text-decoration: none;
  /* Arrives, then breathes: the fill warms and a faint ring leaves the edge,
     slower and softer than a status light, so it says "now" without nagging. */
  animation:
    ph-in .7s cubic-bezier(.2, .8, .2, 1) backwards,
    ph-breathe 3.2s ease-in-out .8s infinite;
  transition: border-color .2s ease, transform .25s cubic-bezier(.3, 1.4, .5, 1), filter .25s ease;
}
.ph-live[hidden] { display: none; }
@media (prefers-color-scheme: light) { .ph-live { --ph-ink: #c4362a; } }
.ph-live:hover {
  color: var(--text);
  border-color: var(--ph);
  transform: translateY(-2px) scale(1.02);
  filter: drop-shadow(0 10px 22px color-mix(in srgb, var(--ph) 45%, transparent));
}
.ph-live:focus-visible { outline-color: var(--ph); border-radius: var(--r-pill); }

/* A light sweep across the badge every few seconds, and at once on hover
   (a different animation name, so hovering restarts it from the left). */
.ph-live::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .24) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: ph-shine-loop 5s ease-in-out 1.2s infinite;
  pointer-events: none;
}
.ph-live:hover::after { animation: ph-shine .8s ease-out; }

/* The logo pops on hover: it swells on a spring while two rings go out from
   it, like a drop landing. */
.ph-mark { position: relative; flex: 0 0 auto; display: grid; }
.ph-mark::before, .ph-mark::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--ph); opacity: 0; pointer-events: none;
}
.ph-live:hover .ph-mark::before { animation: ph-ripple .7s cubic-bezier(0, 0, .2, 1); }
.ph-live:hover .ph-mark::after { animation: ph-ripple .7s cubic-bezier(0, 0, .2, 1) .14s; }

.ph-logo {
  width: 36px; height: 36px; display: block;
  transition: transform .5s cubic-bezier(.3, 1.8, .5, 1);
}
.ph-logo circle { fill: var(--ph); }
.ph-logo path { fill: #fff; transition: transform .5s cubic-bezier(.3, 1.8, .5, 1); transform-origin: 50% 50%; }
.ph-live:hover .ph-logo { transform: scale(1.14); }
.ph-live:hover .ph-logo path { transform: scale(1.12); }

.ph-title { flex: 1; text-align: center; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }

.ph-arrow { color: var(--ph-ink); font-size: 17px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.ph-live:hover .ph-arrow { transform: translateX(5px); }

@keyframes ph-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes ph-breathe {
  0%, 100% {
    background-color: color-mix(in srgb, var(--ph) 8%, var(--card));
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--ph) 26%, transparent);
  }
  50% { background-color: color-mix(in srgb, var(--ph) 14%, var(--card)); }
  70% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--ph) 0%, transparent); }
}
@keyframes ph-shine { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@keyframes ph-shine-loop {
  0% { transform: translateX(-120%); }
  24%, 100% { transform: translateX(120%); }
}
@keyframes ph-ripple {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.7); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ph-live, .ph-live::after, .ph-live:hover::after,
  .ph-live:hover .ph-mark::before, .ph-live:hover .ph-mark::after { animation: none; }
  .ph-live::after { display: none; }
  .ph-live, .ph-logo, .ph-logo path, .ph-arrow { transition: none; }
  .ph-live:hover, .ph-live:hover .ph-logo, .ph-live:hover .ph-logo path, .ph-live:hover .ph-arrow { transform: none; }
}

/* --- sections ----------------------------------------------------------- */

.band { padding: 74px 0; border-bottom: 1px solid var(--border); }
.band.alt { background: var(--bg-alt); }

.section-title { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -.025em; font-weight: 700; margin-bottom: 12px; }
.section-lede { color: var(--muted); max-width: 711px; margin-bottom: 36px; }
.section-lede + .btn-lg { margin-top: -12px; }
/* The install lede runs the width of the clone command under it. */
#install .section-lede { max-width: none; }

/* A second, smaller heading inside a section: the install section's "or from
   source", which is the fallback and should read as one. */
.sub-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 48px 0 4px; }
.sub-lede { color: var(--dim); font-size: 14.5px; margin-bottom: 24px; }

.grid { display: grid; gap: 14px; }
.features { grid-template-columns: repeat(auto-fit, minmax(276px, 1fr)); }

/* Every section spans the same width. Only the running text inside is capped,
   so a full-width card does not produce 140-character lines. */
.callout p, .callout li, details p, .steps li > p, .note { max-width: 78ch; }

.features article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
/* Lifted rather than tinted: six cards that each glow azure on hover would
   spend the accent six times over, and azure means "this is the action". */
.features article:hover {
  transform: translateY(-3px);
  border-color: var(--border-hi);
  background: var(--card-hi);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .8);
}
.features h3 {
  font-size: 15.5px; font-weight: 700; margin-bottom: 7px; letter-spacing: -.01em;
  transition: color .16s ease;
}
.features article:hover h3 { color: var(--accent); }
.features p { color: var(--dim); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .features article, .features h3 { transition: none; }
  .features article:hover { transform: none; }
}

/* --- tables ------------------------------------------------------------- */

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { color: var(--dimmer); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
tbody th { font-weight: 600; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }

.formats { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.formats td, .formats th { padding: 12px 16px; }
.formats td { color: var(--muted); }

.tag {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--r-sm); border: 1px solid;
}
.tag.free { color: var(--ok-label); border-color: var(--ok-30); background: var(--ok-10); }
.tag.pro { color: var(--accent-soft); border-color: rgba(79, 157, 250, .35); background: var(--accent-10); }

/* --- steps -------------------------------------------------------------- */

.steps { list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative; padding-left: 46px; padding-bottom: 20px;
  border-left: 1px solid var(--border); margin-left: 14px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: -14px; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card-hi); border: 1px solid var(--border-hi);
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--dim);
}
.steps pre { margin-top: 10px; }
.note { color: var(--dimmer); font-size: 14px; margin-top: 24px; }

/* --- pricing ------------------------------------------------------------ */

/* The two cards always share a height, whatever either one says (the Pro card
   loses its offer note after launch week), and each card's button sits on its
   bottom edge, so the two buttons line up too. */
.tiers { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: stretch; }

.tier {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px;
}
.tier.featured { border-color: var(--accent-line); background: var(--card-hi); }
.tier-flag {
  position: absolute; top: -11px; left: 24px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink);
  padding: 3px 10px; border-radius: var(--r-pill);
}
.tier h3 { font-size: 11.5px; color: var(--dim); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.price { font-size: 40px; font-weight: 800; letter-spacing: -.035em; margin: 6px 0 18px; }
/* No struck-through "was" price: the product has never sold at €9, so the
   offer says when the price changes instead of implying a reduction. */
.price-note { margin: -12px 0 18px; font-size: 13.5px; color: var(--dim); }
.tier ul { list-style: none; margin-bottom: 22px; }
.tier li {
  display: flex; align-items: flex-start; gap: 9px;
  padding-block: 5px; font-size: 14px; color: var(--muted);
}
.tier li .ico { color: var(--ok); margin-top: .38em; }
.tier li strong { color: var(--text); font-weight: 700; }
.tier .btn { width: 100%; margin-top: auto; }

.callout {
  margin-top: 34px;
  background: var(--accent-10);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius); padding: 24px;
}
.callout h3 { font-size: 16.5px; margin-bottom: 10px; letter-spacing: -.01em; }
.callout p, .callout li { color: var(--muted); font-size: 14.5px; }
.callout p + p, .callout ul + p { margin-top: 12px; }
.callout ul { margin: 10px 0 0 20px; }
.callout li { padding-block: 4px; }
.callout strong { color: var(--text); }

/* --- FAQ ---------------------------------------------------------------- */

details {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 18px; margin-bottom: 10px;
}
details[open] { border-color: var(--border-hi); }
summary {
  cursor: pointer; font-weight: 650; font-size: 15px;
  list-style: none; display: flex; align-items: center; gap: 10px;
}
summary::-webkit-details-marker { display: none; }
summary .ico { color: var(--accent); width: .8em; height: .8em; transition: transform .15s ease; }
details[open] summary .ico { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { summary .ico { transition: none; } }
details p { color: var(--muted); font-size: 14.5px; margin-top: 10px; padding-left: 22px; }

/* --- closer ------------------------------------------------------------- */

.closer { padding: 78px 0; text-align: center; }
.closer h2 { font-size: clamp(24px, 4vw, 34px); letter-spacing: -.025em; font-weight: 700; margin-bottom: 8px; }

/* --- docs --------------------------------------------------------------- */

/* Wider than the marketing pages. Three columns inside 1120px left the prose
   under 580px, which is a fine measure for an essay and a poor one for a
   reference table with four columns and code in three of them. */
.wrap.docs-layout { max-width: 1360px; }

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 210px;
  gap: 48px;
  padding-top: 42px; padding-bottom: 76px;
  align-items: start;
}

.docs-nav, .toc { position: sticky; top: 84px; font-size: 14px; }
.docs-nav-title, .toc-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--dimmer); font-weight: 600; margin-bottom: 10px;
}
.docs-nav ul, .toc ul { list-style: none; }
.docs-nav a, .toc a {
  display: block; padding: 5px 10px; margin-left: -10px; border-radius: var(--r-sm);
  color: var(--dim); text-decoration: none;
}
.docs-nav a:hover, .toc a:hover { color: var(--text); background: var(--card-hi); }
/* An inset ring rather than a border, so marking the current page does not
   shift the other entries by a pixel. */
.docs-nav a.on {
  color: var(--text); font-weight: 600;
  background: var(--accent-10); box-shadow: inset 0 0 0 1px var(--accent-line);
}
.toc { font-size: 13px; }
.toc .d3 a { padding-left: 22px; color: var(--dimmer); }

.page-head { padding: 54px 0 8px; }
.page-head h1 { font-size: clamp(30px, 5vw, 42px); letter-spacing: -.03em; font-weight: 800; }
.page-head .lede { margin: 12px 0 0; }

.prose { min-width: 0; padding-bottom: 40px; }
.prose > *:first-child { margin-top: 0; }
.prose h1 { font-size: clamp(28px, 4.4vw, 38px); letter-spacing: -.03em; font-weight: 800; margin-bottom: 16px; }
.prose h2 {
  /* Published as a variable because the anchor has to start below it: an
     absolutely positioned child measures from the padding box, so top:0 would
     hang the hash up on the rule instead of beside the words. */
  --head-pad: 22px;
  font-size: 22px; letter-spacing: -.02em; font-weight: 700; margin: 42px 0 14px;
  padding-top: var(--head-pad); border-top: 1px solid var(--border);
}
.prose h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 28px 0 10px; }
.prose h4 { font-size: 15px; margin: 22px 0 8px; color: var(--dim); }
.prose p, .prose li { color: var(--muted); }
.prose p { margin-bottom: 15px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; }
.prose li { padding-block: 3px; }
.prose li > ul, .prose li > ol { margin-top: 4px; margin-bottom: 4px; }
.prose strong { color: var(--text); font-weight: 700; }
.prose pre { margin-bottom: 18px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 34px 0; }
/* The docs separate sections with `---` and h2 already draws its own rule.
   The variable goes with the padding, or the anchor keeps compensating for a
   gap that is no longer there. */
.prose hr + h2 { --head-pad: 0px; border-top: 0; margin-top: 0; }

.prose blockquote {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px; margin: 0 0 16px; color: var(--dim);
}
.prose blockquote > *:last-child { margin-bottom: 0; }

.prose .scroll-x {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); margin-bottom: 20px;
}
.prose table { font-size: 14px; }
.prose td code, .prose th code { white-space: nowrap; }
/* A type is one phrase: "number or null" broken across two lines reads as two
   entries. The notes column has all the room it needs to give this one up. */
.prose table.col-type-2 td:nth-child(2) { white-space: nowrap; width: 1%; }

/*
 * Heading anchors sit outside the text, not in front of it.
 *
 * They used to float, which put the `#` in the flow: it took a character's
 * width whether or not it was visible, so every heading started indented, and
 * selecting or copying a heading picked up a stray hash and a space. Absolute
 * positioning takes it out of the flow entirely, and user-select keeps it out
 * of the clipboard.
 */
.prose h1, .prose h2, .prose h3, .prose h4 { position: relative; }

.anchor {
  /* --head-pad is inherited from the heading, so this lands on the first line
     of text whether or not that heading has a rule above it. */
  position: absolute; right: 100%; top: var(--head-pad, 0px); padding-right: .3em;
  color: var(--border-hi); text-decoration: none;
  opacity: 0; transition: opacity .12s ease;
  user-select: none; -webkit-user-select: none;
}
.prose h1:hover .anchor,
.prose h2:hover .anchor,
.prose h3:hover .anchor,
.prose h4:hover .anchor,
.anchor:focus-visible { opacity: 1; }
.anchor:hover { color: var(--accent); }

/*
 * Confirmation for the copy, set after the heading text rather than over it.
 *
 * It hangs off the heading, not the link: the link sits in the margin with
 * roughly a character of room either side, so a label placed there covers the
 * first word. Reached with :has(), because the class lands on the child. A
 * browser without :has() simply never shows it, and the copy still happened.
 */
.prose h1:has(.anchor.copied)::after,
.prose h2:has(.anchor.copied)::after,
.prose h3:has(.anchor.copied)::after,
.prose h4:has(.anchor.copied)::after {
  content: 'Link copied';
  display: inline-block; vertical-align: middle;
  margin-left: 12px; transform: translateY(-1px);
  background: var(--card-hi); color: var(--dim);
  border: 1px solid var(--border-hi); border-radius: var(--r-sm);
  padding: 1px 8px;
  font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0; white-space: nowrap;
}

@media (max-width: 720px) {
  /* No hover to reveal it, and no room to the left of the text to put it in. */
  .anchor { display: none; }
}

/* --- footer ------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border); padding: 30px 0; background: var(--bg-alt); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; justify-content: space-between; }
.footer-inner p { color: var(--dimmer); font-size: 13.5px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-inner a { color: var(--dim); font-size: 13.5px; text-decoration: none; }
.footer-inner a:hover { color: var(--text); text-decoration: underline; }

/* --- responsive --------------------------------------------------------- */

@media (max-width: 1040px) {
  .docs-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 720px) {
  .hero { padding: 56px 0 46px; }
  .band { padding: 54px 0; }
  .docs-layout { grid-template-columns: 1fr; gap: 26px; }
  .docs-nav { position: static; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
  .docs-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .docs-nav a { margin-left: 0; }
  .topbar nav a:not(.btn) { padding: 7px 8px; }
  .footer-inner { justify-content: center; text-align: center; }
}

/* --- light -------------------------------------------------------------- */

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-alt: #f6f7f9;
    --card: #ffffff;
    --card-hi: #f1f3f6;

    --border: #e3e5ea;
    --border-hi: #d1d5dd;
    --code-bg: #f5f6f9;

    --text: #14161a;
    --muted: #454a54;
    --dim: #666c77;
    --dimmer: #858b96;

    /* Azure darkened until it clears 4.5:1 on white; the same hue, not a
       different accent. */
    --accent: #1668d6;
    --accent-hover: #1257b4;
    --accent-ink: #ffffff;
    --accent-soft: #1257b4;
    --accent-10: rgba(22, 104, 214, 0.07);
    --accent-16: rgba(22, 104, 214, 0.12);
    --accent-line: rgba(22, 104, 214, 0.32);

    --ok: #1f8a4d;
    --ok-label: #1a7442;
    --ok-10: rgba(31, 138, 77, 0.08);
    --ok-30: rgba(31, 138, 77, 0.3);
  }
  .shot img, .shot video { box-shadow: 0 24px 60px -34px rgba(20, 22, 30, .5); }
  .topbar { background: color-mix(in srgb, var(--bg) 86%, transparent); }
}
