@font-face {
  font-family: Space Grotesk;
  src: url("/space-grotesk.06408904.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: JetBrains Mono;
  src: url("/jetbrains-mono.18be4527.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #fbfbfa;
  --panel: #fff;
  --fg: #141517;
  --muted: #5d6168;
  --line: #e6e6e3;
  --accent: #d93036;
  --warn: #b5760c;
  --code: #f4f4f2;
  --code-fg: #2a2d31;
  --gutter: #a3a6ab;
  --tag: #b3261e;
  --attr: #7a4fbf;
  --str: #1d6b3c;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --lightningcss-light: initial;
  --lightningcss-dark: ;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b0c0e;
  --panel: #121417;
  --fg: #ececea;
  --muted: #8b8f96;
  --line: #1f2226;
  --accent: #ff5c61;
  --warn: #f5a524;
  --code: #0f1113;
  --code-fg: #d6d8db;
  --gutter: #4a4f56;
  --tag: #ff8b85;
  --attr: #c4a3ff;
  --str: #8fd6a4;
  --lightningcss-light: ;
  --lightningcss-dark: initial;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

code, pre {
  font-family: var(--mono);
  font-variant-ligatures: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.sq {
  -webkit-text-decoration: underline wavy var(--accent);
  text-decoration: underline wavy var(--accent);
  text-underline-offset: 5px;
  -webkit-text-decoration-skip-ink: none;
  text-decoration-skip-ink: none;
  text-decoration-thickness: 1.5px;
}

.nav > .wrap {
  justify-content: space-between;
  align-items: center;
  height: 68px;
  display: flex;
}

.brand {
  letter-spacing: -.02em;
  font-size: 21px;
  font-weight: 700;
}

.nav nav {
  color: var(--muted);
  align-items: center;
  gap: 22px;
  font-size: 15px;
  display: flex;
}

.nav nav a:hover, .theme:hover {
  color: var(--fg);
}

.theme {
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 4px;
  display: inline-flex;
}

.nav .gh {
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 14px;
}

.menu-open, .menu-close {
  border: 1px solid var(--line);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  background: none;
  border-radius: 99px;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 15px;
  display: none;
}

.menu-close {
  padding: 8px;
  display: inline-flex;
}

.menu {
  background: var(--bg);
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  color: var(--fg);
  border: 0;
  margin: 0;
  padding: 0 24px 40px;
  overflow-y: auto;
}

.menu-head {
  justify-content: space-between;
  align-items: center;
  height: 68px;
  display: flex;
}

.menu-main {
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  padding: 12px 0 20px;
  display: flex;
}

.menu-main a {
  letter-spacing: -.02em;
  padding: 6px 0;
  font-size: 26px;
  font-weight: 600;
}

.menu-main a:not([aria-current]) {
  color: var(--muted);
}

.menu-docs {
  flex-direction: column;
  padding-top: 24px;
  font-size: 17px;
  display: flex;
}

.menu-docs a {
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding: 7px 0 7px 14px;
}

.menu-docs a[aria-current] {
  color: var(--fg);
  border-left: 2px solid var(--accent);
  padding-left: 13px;
}

:root:has(.menu[open]) {
  overflow: hidden;
}

.hero {
  text-align: center;
  padding-top: 64px;
}

h1 {
  letter-spacing: -.04em;
  text-wrap: balance;
  margin: 0 auto;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.02;
}

.lines > span {
  display: block;
}

p {
  text-wrap: pretty;
}

.lede {
  color: var(--muted);
  margin: 22px auto 0;
  font-size: 19px;
}

.lede a, .sub a, .panel p a {
  color: var(--fg);
  text-decoration: underline;
  -webkit-text-decoration-color: var(--accent);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.cta {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  display: flex;
}

.cmd {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  font-size: 14px;
  display: inline-flex;
}

.cmd span {
  color: var(--accent);
}

.btn {
  background: var(--fg);
  color: var(--bg);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
}

.editor {
  background: var(--code);
  border: 1px solid var(--line);
  text-align: left;
  border-radius: 16px;
  max-width: 980px;
  margin: 48px auto 0;
  overflow: hidden;
  box-shadow: 0 40px 80px -48px #0006;
}

.tabs {
  border-bottom: 1px solid var(--line);
  font: 13px var(--mono);
  color: var(--muted);
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  display: flex;
}

.tabs b {
  color: var(--fg);
  font-weight: 500;
}

.tabs .count {
  gap: 12px;
  margin-left: auto;
  display: flex;
}

.tabs i {
  font-style: normal;
}

.tabs .err {
  color: var(--accent);
}

.tabs .warn {
  color: var(--warn);
}

.lines-code {
  font: 13.5px/2 var(--mono);
  color: var(--code-fg);
  padding: 14px 0;
  overflow-x: auto;
}

.ln {
  white-space: pre;
  grid-template-columns: 28px 44px auto;
  padding-right: 20px;
  display: grid;
}

.ln .g {
  justify-content: center;
  align-items: center;
  display: flex;
}

.ln .g i {
  border-radius: 50%;
  width: 8px;
  height: 8px;
}

.ln .n {
  color: var(--gutter);
  text-align: right;
  padding-right: 18px;
}

.ln.bad {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.ln.warn {
  background: color-mix(in srgb, var(--warn) 8%, transparent);
}

.e {
  background: var(--accent);
}

.w {
  background: var(--warn);
}

.t {
  color: var(--tag);
}

.a {
  color: var(--attr);
}

.s {
  color: var(--str);
}

.u, .uw {
  -webkit-text-decoration: underline wavy var(--accent);
  text-decoration: underline wavy var(--accent);
  -webkit-text-decoration-skip-ink: none;
  text-decoration-skip-ink: none;
  text-underline-offset: 4px;
}

.uw {
  -webkit-text-decoration-color: var(--warn);
  text-decoration-color: var(--warn);
}

.msg {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 6px;
  margin-left: 22px;
  padding: 0 9px;
  font-size: 12px;
  display: inline-block;
}

.msg.wm {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 14%, transparent);
}

.block {
  padding-top: 88px;
}

.head {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 32px;
  display: flex;
}

h2 {
  letter-spacing: -.035em;
  text-wrap: balance;
  font-size: 40px;
  line-height: 1.05;
}

.sub {
  color: var(--muted);
}

.note {
  color: var(--muted);
  margin-top: 16px;
  font-size: 14px;
}

.note a {
  color: var(--fg);
  text-decoration: underline;
  -webkit-text-decoration-color: var(--accent);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.demo {
  border-radius: 14px;
}

.term.narrow {
  display: none;
}

.term {
  width: 100%;
  height: auto;
  font: 13px var(--mono);
  white-space: pre;
  display: block;
}

.term .frame {
  fill: var(--code);
  stroke: var(--line);
}

.term .dot, .term .rule {
  fill: var(--line);
  stroke: var(--line);
}

.term text {
  fill: var(--code-fg);
}

.term .prompt, .term tspan.error {
  fill: var(--accent);
}

.term tspan.warn {
  fill: var(--warn);
}

.term .dim {
  fill: var(--gutter);
}

.term .strong {
  fill: var(--fg);
  font-weight: 600;
}

.term .label {
  fill: #fff;
  font-weight: 600;
}

.term .badge.fail {
  fill: var(--accent);
}

.term .badge.warn {
  fill: var(--warn);
}

.checks, .presets {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
  display: grid;
}

.presets {
  grid-template-columns: repeat(3, 1fr);
}

.checks h3, .presets h3 {
  letter-spacing: -.01em;
  margin-bottom: 8px;
  font-size: 19px;
}

.checks p, .presets p {
  color: var(--muted);
  font-size: 15.5px;
}

a.panel:hover {
  border-color: var(--accent);
}

.steps {
  counter-reset: step;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0;
  list-style: none;
  display: grid;
}

.steps li {
  counter-increment: step;
  min-width: 0;
}

.steps b:before {
  content: counter(step) ". ";
  color: var(--accent);
}

.steps b {
  margin-bottom: 10px;
  display: block;
}

.steps .code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.rules {
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  display: grid;
}

.rule {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 14px;
}

.rule:hover {
  border-color: var(--accent);
}

.rule b {
  font: 500 14px var(--mono);
  display: block;
}

.rule span {
  color: var(--muted);
  font-size: 13px;
}

.two {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  display: grid;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-width: 0;
  padding: 26px;
}

.panel h2 {
  letter-spacing: -.02em;
  max-width: none;
  margin-bottom: 8px;
  font-size: 22px;
}

.panel p {
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 15.5px;
}

.code {
  background: var(--code);
  border: 1px solid var(--line);
  color: var(--code-fg);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
}

.pr {
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  overflow: hidden;
}

.pr .file {
  background: var(--code);
  font: 12px var(--mono);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
}

.pr .code-line {
  font: 12.5px/1.9 var(--mono);
  white-space: pre;
  padding: 6px 12px;
  overflow-x: auto;
}

.pr .n {
  color: var(--gutter);
}

.pr .note {
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  margin: 4px 10px 10px;
  padding: 10px 12px;
}

.pr .note b {
  color: var(--accent);
  font-weight: 600;
}

.pr .note span {
  color: var(--muted);
  font-size: 13px;
  display: block;
}

.big {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  display: grid;
}

.big b {
  letter-spacing: -.04em;
  font-size: 56px;
  line-height: 1;
  display: block;
}

.big span {
  color: var(--muted);
  font-size: 15px;
}

.notfound {
  text-align: center;
  padding: 120px 24px;
}

.docs-page .wrap {
  max-width: 1240px;
}

.docs {
  grid-template-columns: 220px minmax(0, 1fr) 190px;
  gap: 48px;
  padding-top: 32px;
  display: grid;
}

.sidebar, .toc {
  flex-direction: column;
  align-self: start;
  max-height: calc(100vh - 48px);
  font-size: 14.5px;
  display: flex;
  position: sticky;
  top: 24px;
  overflow-y: auto;
}

.group {
  font: 600 12px var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fg);
  margin: 22px 0 8px;
}

.group:first-of-type {
  margin-top: 0;
}

.sidebar a, .toc a {
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding: 3px 0 3px 12px;
  display: block;
}

.sidebar a:hover, .toc a:hover {
  color: var(--fg);
}

.sidebar a[aria-current], .toc a[aria-current="true"] {
  color: var(--fg);
  border-left: 2px solid var(--accent);
  padding-left: 11px;
}

.sidebar a.sub {
  font-family: var(--mono);
  padding-left: 23px;
  font-size: 13px;
}

.toc {
  font-size: 13.5px;
}

.toc .toc-3 {
  padding-left: 24px;
}

.toc .toc-3[aria-current="true"] {
  padding-left: 23px;
}

.toc code {
  font-size: 12px;
}

.prose {
  padding-bottom: 32px;
}

.prose h1 {
  text-align: left;
  max-width: none;
  margin: 0 0 16px;
  font-size: 44px;
}

.prose h1 code {
  letter-spacing: -.02em;
  font-size: .72em;
}

.prose h2 {
  border-top: 1px solid var(--line);
  max-width: none;
  margin: 56px 0 14px;
  padding-top: 16px;
  font-size: 28px;
}

.prose h3 {
  letter-spacing: -.01em;
  margin: 36px 0 10px;
  font-size: 20px;
}

.prose :is(h2, h3)[id] {
  scroll-margin-top: 24px;
}

.prose p, .prose ul, .prose ol, .prose table, .prose pre, .prose dl {
  margin-bottom: 16px;
}

.prose ul, .prose ol {
  padding-left: 22px;
}

.prose li {
  margin: 4px 0;
}

.prose a {
  text-decoration: underline;
  -webkit-text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent);
  text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent);
  text-underline-offset: 3px;
}

.prose a:hover {
  -webkit-text-decoration-color: var(--accent);
  text-decoration-color: var(--accent);
}

.prose :not(pre) > code {
  overflow-wrap: anywhere;
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: .86em;
}

.prose h1 code {
  background: none;
  border: 0;
  padding: 0;
}

.prose pre {
  background: var(--code);
  border: 1px solid var(--line);
  color: var(--code-fg);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.65;
  overflow-x: auto;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}

.prose th, .prose td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  padding: 8px 14px 8px 0;
}

.prose th {
  font-weight: 600;
}

.prose .ruletable td:first-child {
  white-space: nowrap;
}

.crumb {
  font: 13px var(--mono);
  color: var(--muted);
}

.prose .crumb a {
  text-decoration: none;
}

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

.facts {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 14px 0;
  font-size: 14px;
  display: flex;
}

.facts dt {
  font: 500 12px var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.facts dd {
  margin: 2px 0 0;
}

.sev {
  font: 500 12px var(--mono);
  border-radius: 99px;
  padding: 1px 8px;
  display: inline-block;
}

.sev.error {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.sev.warn {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 14%, transparent);
}

.sev.off {
  color: var(--muted);
  background: var(--code);
}

.presetrules {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
  display: grid;
}

.prose .presetrules li {
  margin: 0;
}

.prose td code {
  white-space: nowrap;
  overflow-wrap: normal;
}

.pager {
  border-top: 1px solid var(--line);
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 20px;
  display: flex;
}

.prose .pager a {
  border: 1px solid var(--line);
  border-radius: 10px;
  flex-direction: column;
  flex: 0 280px;
  min-width: 0;
  padding: 10px 14px;
  text-decoration: none;
  display: flex;
}

.prose .pager a:hover {
  border-color: var(--accent);
}

.prose .pager code {
  overflow-wrap: normal;
}

.pager .next {
  text-align: right;
}

.pager span {
  color: var(--muted);
  font-size: 13px;
}

.shiki span {
  color: var(--shiki-light);
}

:root[data-theme="dark"] .shiki span {
  color: var(--shiki-dark);
}

.footer {
  margin-top: 96px;
}

.footer div {
  border-top: 1px solid var(--line);
  color: var(--muted);
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 0 44px;
  font-size: 14px;
  display: flex;
}

.footer a:hover {
  color: var(--fg);
}

@media (width <= 1180px) {
  .docs {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (width <= 980px) {
  .rules {
    grid-template-columns: repeat(4, 1fr);
  }

  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .sidebar {
    display: none;
  }

  .nav {
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
  }

  .nav nav > a {
    display: none;
  }

  .menu-open {
    display: inline-flex;
  }

  .prose :is(h2, h3)[id] {
    scroll-margin-top: 84px;
  }

  .presets, .steps {
    grid-template-columns: 1fr;
  }
}

@media (width <= 760px) {
  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 30px;
  }

  .prose table:has(thead th:nth-child(2):last-child) {
    display: block;
  }

  .prose table:has(thead th:nth-child(2):last-child) thead {
    display: none;
  }

  .prose table:has(thead th:nth-child(2):last-child) :is(tbody, tr, td) {
    display: block;
  }

  .prose table:has(thead th:nth-child(2):last-child) tr {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
  }

  .prose table:has(thead th:nth-child(2):last-child) td {
    border: 0;
    padding: 0;
  }

  .prose table:has(thead th:nth-child(2):last-child) td + td {
    color: var(--muted);
    margin-top: 4px;
  }

  .prose h1 {
    font-size: 36px;
  }

  .prose h2 {
    font-size: 24px;
  }

  .two, .big, .checks {
    grid-template-columns: 1fr;
  }

  .term.wide {
    display: none;
  }

  .term.narrow {
    display: block;
  }

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

  .pager {
    flex-direction: column;
  }

  .prose .pager a {
    flex-basis: auto;
  }

  .rules {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    text-align: left;
    padding-top: 40px;
  }

  .lede {
    margin-left: 0;
    font-size: 17px;
  }

  .cta {
    justify-content: flex-start;
  }

  .lines-code {
    font-size: 12px;
    line-height: 1.7;
    overflow-x: visible;
  }

  .ln {
    white-space: normal;
    grid-template-columns: 18px 30px minmax(0, 1fr);
    padding: 3px 12px 3px 0;
  }

  .ln:not(.bad, .warn) {
    display: none;
  }

  .ln > span:last-child {
    min-width: 0;
  }

  .ln .src {
    white-space: pre;
    text-overflow: ellipsis;
    padding-bottom: 6px;
    display: block;
    overflow: hidden;
  }

  .ln .g {
    align-items: flex-start;
    padding-top: 7px;
  }

  .msg {
    white-space: normal;
    width: fit-content;
    margin: 4px 0 2px;
    padding: 2px 8px;
    line-height: 1.5;
    display: block;
  }

  .big b {
    font-size: 44px;
  }
}
