:root {
  color-scheme: light dark;
  --bg: light-dark(#fbfaf7, #15161a);
  --surface: light-dark(#ffffff, #1c1e24);
  --text: light-dark(#1d1c1a, #e9e7e2);
  --muted: light-dark(#6b675f, #9c988f);
  --line: light-dark(#e4e0d8, #2c2f38);
  --code-bg: light-dark(#f6f4ef, #121318);
  --accent: light-dark(#1f5fbf, #8fb8ff);
  --add-bg: light-dark(#c9eed1, #1f5230);
  --good: light-dark(#1f7a3a, #6fd08a);
  --weak: light-dark(#a55b00, #f0b35a);
  --left: light-dark(#5b5fb0, #a9adf5);
  --kw: light-dark(#8a2f8f, #d691da);
  --type: light-dark(#0b6e8a, #6fc7e0);
  --str: light-dark(#9a4a12, #e8a878);
  --num: light-dark(#1a6b52, #86d6b8);
  --com: light-dark(#7b776e, #8a8780);
  --bar-height: 49px;
  /* How much of the window the site bar holds while it stays at the top. */
  --bar: var(--bar-height);
  /* And the filters on Examples, which stay below it. */
  --filters: 59px;
}
:root[data-theme="light"] {
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.55 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
main,
.top,
nav.site,
footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}
a {
  color: var(--accent);
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
}
code,
pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.top {
  padding-top: 15px;
  padding-bottom: 8px;
}
.bar {
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
/* One line at every width, so the bar is as tall on a phone as it is wide. */
nav.site {
  display: flex;
  align-items: center;
  gap: 22px;
  height: calc(var(--bar-height) - 1px);
  font-size: 14px;
  white-space: nowrap;
}
nav.site a {
  text-decoration: none;
}
nav.site a:hover {
  text-decoration: underline;
}
nav.site > a {
  flex-shrink: 0;
  font-weight: 650;
  color: var(--text);
}
nav.site .pages,
nav.site .out {
  display: flex;
  gap: 16px;
}
/* Where the pages do not fit, they scroll sideways; room below for the underline. */
nav.site .pages {
  min-width: 0;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
}
nav.site .out {
  flex-shrink: 0;
  margin-left: auto;
  align-items: center;
}
nav.site .out a,
nav.site .theme {
  display: inline-flex;
  padding: 2px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
nav.site .out a:hover,
nav.site .theme:hover {
  color: var(--text);
}
nav.site .theme[hidden],
nav.site .theme svg[hidden] {
  display: none;
}
nav.site .out svg {
  width: 18px;
  height: 18px;
}
nav.site a[aria-current="page"] {
  color: var(--text);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
footer.site {
  background: linear-gradient(var(--line), var(--line)) 20px 0 /
    calc(100% - 40px) 1px no-repeat;
  margin-top: 40px;
  padding-top: 20px;
  padding-bottom: 48px;
}
footer.site p {
  margin: 0 0 4px;
}
h1 {
  font-size: clamp(28px, 4.5vw, 42px);
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lede {
  font-size: 18px;
  max-width: 68ch;
  margin: 0 0 12px;
}
.how {
  color: var(--muted);
  max-width: 68ch;
  margin: 0 0 8px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 18px 0 6px;
  position: sticky;
  top: var(--bar);
  background: var(--bg);
  z-index: 1;
  border-bottom: 1px solid var(--line);
}
.filters div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filters button {
  font: inherit;
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.filters button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.filters button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.example {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 28px 22px;
  margin: 0 0 24px;
  scroll-margin-top: calc(var(--bar) + 16px);
}
.filters + .example {
  margin-top: 24px;
}
main:has(> .filters) .example {
  scroll-margin-top: calc(var(--bar) + var(--filters) + 16px);
}
.example[hidden] {
  display: none;
}
.example :is(h2, h3) {
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 8px;
  text-wrap: balance;
}
.example :is(h2, h3) a {
  color: inherit;
  text-decoration: none;
}
.example :is(h2, h3) a:hover {
  text-decoration: underline;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}
.verdict {
  font-weight: 600;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.verdict-good {
  color: var(--good);
}
.verdict-weak {
  color: var(--weak);
}
.verdict-left {
  color: var(--left);
}
.file {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.panes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
figure {
  margin: 0;
  min-width: 0;
}
figcaption {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
figcaption code {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}
pre {
  margin: 0;
  padding: 14px 16px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}
ins {
  text-decoration: none;
  background: var(--add-bg);
  border-radius: 3px;
  padding: 1px 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.t-keyword {
  color: var(--kw);
}
.t-type {
  color: var(--type);
}
.t-string {
  color: var(--str);
}
.t-number {
  color: var(--num);
}
.t-comment {
  color: var(--com);
  font-style: italic;
}
.caption {
  max-width: 76ch;
  margin: 16px 0 0;
}
.note {
  max-width: 76ch;
  margin: 12px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--line);
  background: var(--surface);
  font-size: 15px;
}
.note code {
  font-size: 13.5px;
  overflow-wrap: anywhere;
}
.better {
  border-left-color: var(--weak);
}
.note-label,
.left-alone dt,
.rule dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.left-alone {
  border-left-color: var(--left);
}
.left-alone,
.rule {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 14px;
}
.left-alone dd,
.rule dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.empty {
  padding: 30px 0;
  color: var(--muted);
}
footer,
.sources {
  color: var(--muted);
  font-size: 14.5px;
}
.sources {
  padding-top: 30px;
}
.sources h2 {
  font-size: 16px;
  color: var(--text);
  margin: 0 0 8px;
}
.sources ul {
  padding-left: 18px;
  margin: 0 0 14px;
}
.sources li {
  margin-bottom: 6px;
  max-width: 86ch;
}
.sources code {
  font-size: 13px;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 18px 0 14px;
}
.controls label {
  font-size: 14px;
  color: var(--muted);
}
.controls select,
.controls input,
.controls button {
  font: inherit;
  font-size: 15px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.controls input {
  width: 9ch;
}
.json-fields {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.json-fields[hidden] {
  display: none;
}
.controls button {
  cursor: pointer;
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 600;
}
.controls button:disabled {
  opacity: 0.55;
  cursor: progress;
}
.controls select:focus-visible,
.controls input:focus-visible,
.controls button:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.options {
  margin: 0 0 14px;
  font-size: 14px;
}
.options summary {
  cursor: pointer;
  color: var(--muted);
}
.options .hint {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.options #changed {
  margin-left: 6px;
  color: var(--text);
}
.options ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.options fieldset {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
}
.options legend {
  display: inline;
  padding: 0 6px 0 0;
  float: left;
}
.options code {
  font-size: 12.5px;
  color: var(--muted);
}
.status {
  font-size: 14px;
  color: var(--muted);
}
.status.failed {
  color: var(--weak);
}
textarea {
  display: block;
  width: 100%;
  min-height: 340px;
  flex: 1;
  resize: vertical;
  margin: 0;
  padding: 14px 16px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  tab-size: 2;
}
.playground figure {
  display: flex;
  flex-direction: column;
}
.result pre {
  min-height: 340px;
  flex: 1;
}
.outcome {
  margin: 18px 0 0;
}
.outcome pre {
  background: var(--surface);
}
.outcome pre:empty {
  display: none;
}
.limits {
  color: var(--muted);
  max-width: 76ch;
  font-size: 15px;
  padding: 26px 0 0;
}
.limits li {
  margin-bottom: 6px;
}
.demo {
  margin: 8px 0 14px;
}
.demo img.shown {
  display: block;
  width: 100%;
  max-width: 960px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--code-bg);
}
.demo .steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: 960px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.demo .steps a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
}
.demo .steps img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid transparent;
  border-radius: 6px;
}
.demo .steps a:hover img {
  border-color: var(--line);
}
.demo .steps a[aria-current="step"] {
  color: var(--text);
}
.demo .steps a[aria-current="step"] img {
  border-color: var(--accent);
}
@media (max-width: 600px) {
  .demo .steps {
    gap: 6px;
  }
  .demo .steps span {
    display: none;
  }
}
.demo figcaption {
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  max-width: 76ch;
  margin: 8px 0 0;
}
main h2 {
  font-size: 21px;
  margin: 34px 0 12px;
}
.install {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 14px;
}
.install li {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px 14px;
}
.install h3 {
  font-size: 15px;
  margin: 0 0 10px;
}
.install pre {
  margin-bottom: 10px;
}
.package {
  white-space: nowrap;
}
.install a {
  font-size: 14px;
  margin-top: auto;
  align-self: flex-start;
}
main > .how {
  margin: 16px 0 0;
}
main > .note {
  border-left-color: var(--weak);
  margin-top: 26px;
}
@media (max-width: 760px) {
  .example {
    padding: 18px 16px;
  }
  .panes {
    grid-template-columns: minmax(0, 1fr);
  }
  .top {
    padding-top: 28px;
  }
  pre {
    font-size: 12.5px;
    padding: 12px;
  }
}
/* On a phone the bar and the filters wrap, and would hold the screen. */
@media (max-width: 900px) {
  :root {
    --bar: 0px;
    --filters: 0px;
  }
  .bar,
  .filters {
    position: static;
  }
}
