@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
  src: url(/assets/martian-mono-latin.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 {
  --paper: #fff;
  --ink: #1b1f3b;
  --muted: #5d6180;
  --line: #dddde8;
  --check: #e9e9f0;
  --soft: #f5f5f9;
  /* One colour per GIF block. Every use of colour on the page points at one. */
  --k-header: #3d5afe;
  --k-lsd: #00a37a;
  --k-gct: #e3a008;
  --k-gce: #e0407b;
  --k-descriptor: #7b61ff;
  --k-data: #f06a1d;
  --k-trailer: #1b1f3b;
  --k-other: #9aa0b4;
  --mono: 'Martian Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', 'Noto Sans', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --checker: repeating-conic-gradient(var(--check) 0 25%, var(--paper) 0 50%) 0 0 / 16px 16px;
  color-scheme: light dark;
}

/* Dark: same hues, lifted so they read on a dark ground; text on block colours turns dark. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12142a;
    --ink: #e7e8f3;
    --muted: #a0a5c2;
    --line: #2b2f4d;
    --check: #1d2040;
    --soft: #1a1d38;
    --k-header: #6f86ff;
    --k-lsd: #22c997;
    --k-gct: #f0b92e;
    --k-gce: #ff6199;
    --k-descriptor: #a08cff;
    --k-data: #ff8646;
    --k-trailer: #e7e8f3;
    --k-other: #8a90aa;
  }
  .shiki, .shiki span { color: var(--shiki-dark) !important; }
  .res.fail, .err { color: #ff8a80; }
  .res.fail .dot { background: linear-gradient(45deg, transparent 43%, #ff8a80 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, #ff8a80 43% 57%, transparent 57%); }
}

.k-header { --c: var(--k-header); --on: #fff; }
.k-lsd { --c: var(--k-lsd); --on: #fff; }
.k-gct { --c: var(--k-gct); --on: var(--ink); }
.k-gce { --c: var(--k-gce); --on: #fff; }
.k-descriptor { --c: var(--k-descriptor); --on: #fff; }
.k-data { --c: var(--k-data); --on: #fff; }
.k-trailer { --c: var(--k-trailer); --on: #fff; }
.k-other { --c: var(--k-other); --on: #fff; }
@media (prefers-color-scheme: dark) {
  .k-header, .k-lsd, .k-gct, .k-gce, .k-descriptor, .k-data, .k-trailer, .k-other { --on: var(--paper); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code, .mono { font-family: var(--mono); font-size: 0.86em; font-stretch: 87.5%; }
:focus-visible { outline: 3px solid var(--k-header); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 1rem; top: -3rem; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { top: 0.5rem; }

h1, h2, h3 { font-family: var(--mono); font-stretch: 87.5%; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 4rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem); font-weight: 650; }
h3 { font-size: 1.06rem; font-weight: 600; }
/* Mono display type and tight tracking only suit Latin; other scripts use their system faces. */
.script :is(h1, h2, h3) { font-family: var(--sans); letter-spacing: 0; line-height: 1.3; }
.script h1 { font-weight: 800; }
p { margin: 0 0 1em; }
.sub { max-width: 68ch; color: var(--muted); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.7rem clamp(1rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.mark { display: inline-flex; align-items: center; gap: 0.55rem; font: 700 1rem/1 var(--mono); font-stretch: 87.5%; text-decoration: none; }
.mark .px { inline-size: 1.25rem; block-size: 1.25rem; background: var(--checker); background-size: 10px 10px; outline: 1.5px solid var(--ink); }
.top nav { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: 0.93rem; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }
.langs { margin-inline-start: auto; position: relative; font-size: 0.93rem; }
.langs summary { cursor: pointer; list-style: none; padding: 0.3rem 0.7rem; border: 1px solid var(--line); border-radius: 6px; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: ' ▾'; color: var(--muted); }
.langs ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 0.4rem);
  margin: 0; padding: 0.5rem; list-style: none;
  display: grid; grid-template-columns: repeat(2, minmax(9rem, 1fr)); gap: 0.1rem 0.5rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 12px 32px rgb(27 31 59 / 0.14);
  max-height: 70vh; overflow: auto;
}
.langs li a { display: block; padding: 0.3rem 0.5rem; border-radius: 4px; text-decoration: none; }
.langs li a:hover { background: var(--soft); }
.langs a[aria-current] { font-weight: 700; }
@media (max-width: 760px) { .top nav { display: none; } }

.suggest { display: flex; gap: 1rem; align-items: center; justify-content: center; flex-wrap: wrap; padding: 0.6rem 1rem; background: var(--soft); border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.suggest[hidden] { display: none; }

main { padding-inline: clamp(1rem, 3vw, 2rem); }
.sec { max-width: 1180px; margin: 6rem auto; }
.sec.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem 4rem; }
@media (max-width: 900px) { .sec.split { grid-template-columns: minmax(0, 1fr); } }
.scroll { overflow-x: auto; }

/* ---------- hero + explorer ---------- */
.hero {
  max-width: 1180px; margin: 3rem auto 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 2.5rem 3.5rem;
  grid-template-areas: 'intro pixel' 'explorer explorer';
}
.hero .intro { grid-area: intro; align-self: end; }
.hero .lede { font-size: 1.15rem; max-width: 56ch; color: var(--muted); margin: 0; }
.pixel { grid-area: pixel; margin: 0; justify-self: end; inline-size: 11rem; aspect-ratio: 1; background: var(--checker); outline: 2px solid var(--ink); outline-offset: 0; position: relative; }
.pixel img { inline-size: 100%; block-size: 100%; image-rendering: pixelated; display: block; }
.explorer { grid-area: explorer; display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 2rem 3.5rem; align-items: start; }
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: 'intro' 'explorer'; }
  .pixel { display: none; }
  .explorer { grid-template-columns: 1fr; }
}

.dump { font-family: var(--mono); font-stretch: 87.5%; display: grid; gap: 0.5rem; }
.row { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; }
.off { color: var(--muted); font-size: 0.8rem; }
.cells { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px; }
.byte {
  font: 600 clamp(0.72rem, 0.5rem + 0.6vw, 1.12rem)/1 var(--mono); font-stretch: 87.5%;
  aspect-ratio: 1 / 1.15;
  border: 0; border-radius: 3px; padding: 0;
  color: var(--ink);
  background: color-mix(in srgb, var(--c) 14%, var(--paper));
  box-shadow: inset 0 -3px 0 var(--c);
  cursor: pointer;
  transition: background-color 120ms, color 120ms, transform 120ms;
}
.byte.first:not(:first-child) { margin-inline-start: 4px; }
.byte:hover { background: color-mix(in srgb, var(--c) 30%, var(--paper)); }
.byte.on { background: var(--c); color: var(--on); box-shadow: none; }
.byte[aria-pressed='true'] { transform: translateY(-3px); box-shadow: 0 5px 0 -1px var(--ink); }
.ascii { font-size: 0.85rem; letter-spacing: 0.06em; color: var(--muted); white-space: pre; inline-size: 17.5ch; }
.ascii .on { color: var(--c); font-weight: 700; }
@media (max-width: 640px) {
  .row { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .cells { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .ascii { display: none; }
  .byte.first:not(:first-child) { margin-inline-start: 0; }
}

.legend { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.legend button { display: inline-flex; align-items: center; gap: 0.45rem; font: inherit; font-size: 0.86rem; padding: 0.3rem 0.65rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; }
.legend button:hover { border-color: var(--c); }
.legend button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--paper)); }
.legend .ct { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.sw { inline-size: 0.7rem; block-size: 0.7rem; border-radius: 2px; background: var(--c); display: inline-block; flex: none; }

.copyrow { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.b64 { margin: 0.8rem 0 0; font-size: 0.9rem; color: var(--muted); overflow-wrap: anywhere; }
.btn, .copy {
  font: 500 0.9rem/1.2 var(--sans);
  padding: 0.55rem 0.95rem;
  border: 1.5px solid var(--ink); border-radius: 6px;
  background: var(--paper); color: var(--ink);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem;
}
.btn:hover, .copy:hover { background: var(--soft); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--k-header)); }
.copy.done { border-color: var(--k-lsd); color: var(--k-lsd); }
.reset { margin-top: 1rem; }
.reset[hidden] { display: none; }

.detail {
  position: sticky; top: 5rem;
  padding: 1.2rem 1.3rem 1.3rem;
  border: 1px solid var(--line);
  border-inline-start: 5px solid var(--c, var(--ink));
  border-radius: 8px;
  min-block-size: 18rem;
}
.detail .blk { display: flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; color: var(--muted); margin: 0 0 0.3rem; }
.detail h3 { font-size: 1.3rem; margin-bottom: 0.8rem; }
.detail dl { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; margin: 0 0 1rem; font-size: 0.9rem; }
.detail dl div { display: contents; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; font-family: var(--mono); font-stretch: 87.5%; overflow-wrap: anywhere; }
.detail .about { font-size: 1rem; }
.detail .babout { font-size: 0.88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 0.8rem; margin: 0; }
.swatch { display: inline-block; inline-size: 0.9em; block-size: 0.9em; border: 1px solid var(--line); vertical-align: -0.1em; margin-inline-end: 0.4em; }

/* ---------- field table ---------- */
table { border-collapse: collapse; inline-size: 100%; font-size: 0.95rem; }
th, td { text-align: start; vertical-align: top; padding: 0.55rem 0.8rem; }
thead th { font-weight: 600; font-size: 0.82rem; color: var(--muted); border-bottom: 1.5px solid var(--ink); }
.fields tbody tr td:first-child { border-inline-start: 4px solid var(--c); white-space: nowrap; }
.fields tbody th { font-weight: 600; white-space: nowrap; }
.fields tr.bh th { padding-top: 1.4rem; font-family: var(--mono); font-stretch: 87.5%; font-size: 0.95rem; border-bottom: 1px solid var(--line); }
.fields tr.bh .sw { margin-inline-end: 0.5rem; }
.fields tr.bh .muted { font-family: var(--sans); font-weight: 400; font-size: 0.88rem; margin-inline-start: 0.5rem; }
.fields tr.hit td, .fields tr.hit th { background: color-mix(in srgb, var(--c) 10%, var(--paper)); }
@media (max-width: 640px) { .fields tbody th { white-space: normal; } }

/* ---------- packed bits ---------- */
.packed { margin: 0 0 1.6rem; }
.packed figcaption { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; margin-bottom: 0.5rem; }
.bfs { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; }
.bf { grid-column: span var(--n); display: flex; flex-direction: column; gap: 0.35rem; }
.bv { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; }
.bv span { font: 600 1rem/2.2 var(--mono); text-align: center; background: color-mix(in srgb, var(--c) 12%, var(--paper)); border-radius: 3px; }
.bv span.one { background: var(--c); color: var(--on); }
.bl { font-size: 0.78rem; line-height: 1.3; color: var(--muted); padding-inline: 2px; overflow-wrap: anywhere; hyphens: auto; }

/* ---------- lzw ---------- */
.lbytes { display: flex; gap: 1.2rem; flex-wrap: wrap; font-family: var(--mono); font-stretch: 87.5%; }
.lb { padding: 0.35rem 0.6rem; background: color-mix(in srgb, var(--k-data) 12%, var(--paper)); box-shadow: inset 0 -3px 0 var(--k-data); border-radius: 3px; }
.codes { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: 0.35rem; }
.code { display: grid; grid-template-columns: 5.5rem 6.5rem minmax(0, 1fr); gap: 0.8rem; align-items: baseline; }
.code .rd { font-family: var(--mono); letter-spacing: 0.25em; }
.code .val { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.code.c-clear .rd { color: var(--k-descriptor); }
.code.c-pixels .rd { color: var(--k-data); }
.code.c-end .rd { color: var(--k-gce); }
.code.c-pad { color: var(--muted); }
.code .what { font-family: var(--sans); }
html[dir='rtl'] .code .what { text-align: right; }

/* ---------- variants ---------- */
.variants td { vertical-align: middle; border-bottom: 1px solid var(--line); }
.variants .num { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; text-align: end; white-space: nowrap; }
.variants tr.canon td { background: var(--soft); }
.vv { min-inline-size: 18rem; }
.strip { display: flex; block-size: 0.8rem; margin-bottom: 0.35rem; }
.strip span { background: var(--c); block-size: 100%; }
.strip span + span { border-inline-start: 1px solid var(--paper); }
.vd { font-size: 0.9rem; }
.res { white-space: nowrap; font-size: 0.85rem; }
.res .dot { display: inline-block; inline-size: 1.05rem; block-size: 1.05rem; vertical-align: -0.2em; margin-inline-end: 0.4rem; border: 1px solid var(--ink); }
.res.tr .dot { background: var(--checker); background-size: 8px 8px; }
.res.wh .dot { background: #fff; }
.res.bk .dot { background: #000; }
.res.fail { color: #b3261e; }
.res.fail .dot { border: 0; background: linear-gradient(45deg, transparent 43%, #b3261e 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, #b3261e 43% 57%, transparent 57%); }
.verdict { margin-top: 1.4rem; max-width: 70ch; font-size: 1.05rem; }

/* ---------- generator ---------- */
.gen { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .gen { grid-template-columns: minmax(0, 1fr); } }
.dims { display: flex; align-items: end; gap: 0.6rem; }
.dims label { display: grid; gap: 0.3rem; font-size: 0.86rem; color: var(--muted); flex: 1; }
.dims input { font: 600 1.6rem/1 var(--mono); font-stretch: 87.5%; inline-size: 100%; padding: 0.5rem 0.6rem; border: 1.5px solid var(--ink); border-radius: 6px; color: var(--ink); background: var(--paper); }
.dims .x { font: 600 1.6rem/2.6rem var(--mono); color: var(--muted); }
.fill { border: 0; padding: 0; margin: 1.3rem 0; display: grid; gap: 0.5rem; }
.fill legend { font-size: 0.86rem; color: var(--muted); margin-bottom: 0.4rem; }
.fill label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.fill input[type='color'] { inline-size: 2.2rem; block-size: 1.6rem; border: 1px solid var(--line); padding: 0; background: none; border-radius: 4px; }
.presets { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.presets .muted { inline-size: 100%; }
.chip { font: 500 0.82rem/1 var(--mono); font-stretch: 87.5%; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.err { color: #b3261e; font-size: 0.9rem; margin-top: 0.8rem; }
.err[hidden] { display: none; }
.stage { block-size: 20rem; display: grid; place-items: center; background: var(--checker); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; padding: 1.5rem; }
.stage img { max-inline-size: 100%; max-block-size: 100%; object-fit: contain; outline: 1.5px dashed var(--ink); image-rendering: pixelated; }
.gsize { margin: 0.9rem 0; font-family: var(--mono); font-stretch: 87.5%; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- hotlink ---------- */
.links { list-style: none; padding: 0; margin: 0 0 2.5rem; display: grid; gap: 0.6rem; }
.links li { display: grid; grid-template-columns: 13rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 8px; }
.links code { font-size: 0.95rem; overflow-wrap: anywhere; }
.links .lk { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 700px) { .links li { grid-template-columns: minmax(0, 1fr) auto; } .links .lk { grid-column: 1 / -1; } }
.copy.icon { padding: 0.4rem 0.55rem; }
.copy.icon::before { content: ''; inline-size: 1rem; block-size: 1rem; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 1h9v11h-2V3H5z M2 4h9v11H2z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat; }
.copy.icon.done::before { mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8l4 4 8-8' stroke='black' stroke-width='2.2' fill='none'/%3E%3C/svg%3E") center / contain no-repeat; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 3rem; }
@media (max-width: 860px) { .two { grid-template-columns: minmax(0, 1fr); } }
pre.plain { margin: 0 0 1rem; padding: 1rem 1.1rem; background: var(--soft); border-radius: 8px; overflow-x: auto; font-size: 0.95rem; line-height: 1.55; }

/* ---------- code picker ---------- */
.picker { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 900px) { .picker { grid-template-columns: minmax(0, 1fr); } }
.pick { position: sticky; top: 5rem; }
@media (max-width: 900px) { .pick { position: static; } }
.q { inline-size: 100%; font: inherit; padding: 0.6rem 0.8rem; border: 1.5px solid var(--ink); border-radius: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.7rem 0; }
.chips .chip { font-family: var(--sans); }
.list { max-block-size: 34rem; overflow: auto; border-top: 1px solid var(--line); padding-top: 0.4rem; }
@media (max-width: 900px) { .list { max-block-size: 18rem; } }
.grp h3 { font-size: 0.8rem; color: var(--muted); font-weight: 600; margin: 0.9rem 0 0.2rem; }
.grp ul { list-style: none; margin: 0; padding: 0; }
.grp a { display: flex; align-items: center; gap: 0.4rem; padding: 0.22rem 0.5rem; border-radius: 4px; text-decoration: none; font-size: 0.93rem; }
.grp a:hover { background: var(--soft); }
.grp a[aria-current] { background: var(--ink); color: var(--paper); }
.grp .new { inline-size: 0.42rem; block-size: 0.42rem; border-radius: 50%; background: var(--k-data); }
.grp li[hidden], .grp[hidden] { display: none; }
.shead { display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; align-items: end; justify-content: space-between; margin-bottom: 0.8rem; }
.shead h3 { font-size: 1.3rem; margin: 0; }
.shead .muted { font-family: var(--sans); font-weight: 400; font-size: 0.95rem; }
.path { display: flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; color: var(--muted); }
.path input { font: 500 0.9rem var(--mono); padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 5px; inline-size: 11rem; color: var(--ink); }
.smeta { display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; margin: 0 0 0.8rem; font-size: 0.88rem; }
.smeta div { display: flex; gap: 0.5rem; }
.smeta dt { color: var(--muted); }
.smeta dd { margin: 0; }
.codebox { position: relative; }
.codebox pre { color: var(--ink); margin: 0; padding: 1.1rem 1.2rem; background: var(--soft); border-radius: 8px; overflow: auto; max-block-size: 36rem; font-size: 0.86rem; line-height: 1.6; }
.codebox pre code { font-size: inherit; font-stretch: 100%; }
.codebox [data-ph] { background: color-mix(in srgb, var(--k-data) 13%, transparent); border-radius: 2px; word-break: break-all; }
.code-copy { position: absolute; inset-block-start: 0.6rem; inset-inline-end: 0.6rem; font-size: 0.8rem; padding: 0.35rem 0.6rem; }
.view .snip { min-block-size: 20rem; }

/* ---------- uses / faq ---------- */
.uses { padding-inline-start: 1.2rem; }
.uses li { margin-bottom: 0.6rem; }
.faq { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1.5rem 3rem; }
.faq dt { font-weight: 650; margin-bottom: 0.35rem; }
.faq dd { margin: 0; color: var(--muted); }

.page h1 .muted { font-family: var(--sans); font-weight: 400; font-size: 0.5em; letter-spacing: 0; }
.crumb { font-size: 0.9rem; }
.page .shead h3 { visibility: hidden; }
.more { columns: 3 12rem; padding-inline-start: 1.2rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 6rem; padding: 2.5rem clamp(1rem, 3vw, 2rem) 3rem; font-size: 0.9rem; }
.foot > * { max-width: 1180px; margin-inline: auto; }
.foot p a { margin-inline-end: 1.2rem; }
.all-langs { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin-top: 1.5rem; color: var(--muted); }
.all-langs a { text-decoration: none; }
.all-langs a[aria-current] { color: var(--ink); font-weight: 700; }

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