@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-mono.woff2") format("woff2");
}

:root {
  --bg: #000;
  --card: rgba(9, 9, 11, 0.6);
  --ink: #fafafa;
  --muted: #a1a1aa;
  --faint: #71717a;
  --line: #27272a;
  --line-strong: #3f3f46;
  --code: rgba(9, 9, 11, 0.72);
  --prompt: #6ee7b7;
  --danger: #ffa3a3;
  --run-bg: #f4f4f5;
  --run-ink: #09090b;
  --human-bg: rgba(237, 178, 0, 0.08);
  --human-line: #edb200;
  --check-bg: rgba(110, 231, 183, 0.08);
  --check-line: #6ee7b7;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 25px 80px rgba(0, 0, 0, 0.75);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wide: 72rem;
  color-scheme: dark;
  background: var(--bg);
  color: var(--ink);
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --card: #fff;
  --ink: #18181b;
  --muted: #52525b;
  --faint: #71717a;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --code: #fafafa;
  --prompt: #047857;
  --danger: #b91c1c;
  --run-bg: #18181b;
  --run-ink: #fafafa;
  --human-bg: #fffbeb;
  --human-line: #d97706;
  --check-bg: #ecfdf5;
  --check-line: #047857;
  --shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 25px 50px rgba(0, 0, 0, 0.08);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fafafa;
    --card: #fff;
    --ink: #18181b;
    --muted: #52525b;
    --faint: #71717a;
    --line: #e4e4e7;
    --line-strong: #d4d4d8;
    --code: #fafafa;
    --prompt: #047857;
    --danger: #b91c1c;
    --run-bg: #18181b;
    --run-ink: #fafafa;
    --human-bg: #fffbeb;
    --human-line: #d97706;
    --check-bg: #ecfdf5;
    --check-line: #047857;
    --shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 25px 50px rgba(0, 0, 0, 0.08);
    color-scheme: light;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

::selection { background: rgba(110, 231, 183, 0.28); color: var(--ink); }

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--bg);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  z-index: 5;
}
.skip:focus { top: 0.6rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dots {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}
.dots i {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  display: block;
}
.dots i:nth-child(1) { background: rgba(251, 44, 54, 0.9); }
.dots i:nth-child(2) { background: rgba(237, 178, 0, 0.9); }
.dots i:nth-child(3) { background: rgba(0, 199, 88, 0.9); }

.frame {
  max-width: var(--wide);
  margin: 1.25rem auto 0;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--card);
  box-shadow: var(--shadow);
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.win-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.mark {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  line-height: 1;
}
.mark:hover { color: var(--ink); }

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}
.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.topnav a:hover { color: var(--ink); }

.theme,
.chip,
.copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2rem;
  padding: 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}
.theme:hover,
.chip:hover,
.copy:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }

.code {
  position: relative;
  margin: 1rem 0;
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  max-width: 100%;
}
.code .lang {
  position: absolute;
  top: 0.7rem;
  left: 0.85rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--faint);
}
.code .copy {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  min-height: 1.75rem;
  box-shadow: none;
}
.code pre {
  margin: 0;
  padding: 2.15rem 0.9rem 0.9rem;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.code code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  background: none;
  padding: 0;
  border: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--code);
  border: 1px solid var(--line);
  padding: 0.05em 0.32em;
  border-radius: 0.25rem;
}

.missing {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.missing h1 {
  margin: 0 0 0.6rem;
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.missing a {
  color: var(--muted);
  text-underline-offset: 0.25em;
}
.missing a:hover { color: var(--ink); }

.site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
  color: var(--faint);
  font-size: 0.75rem;
  text-align: center;
}
.site-footer p { margin: 0; }
.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  margin-top: 0.35rem;
}
.site-footer a {
  color: var(--muted);
  text-underline-offset: 4px;
}
.site-footer a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .frame { margin: 0.75rem 0.75rem 0; }
}

.shell {
  display: grid;
  grid-template-columns: 14.5rem minmax(0, 1fr);
  gap: 2rem;
  padding: 1.25rem 1.25rem 2.5rem;
}

.side {
  position: sticky;
  top: 1rem;
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding-bottom: 0.5rem;
  font-family: var(--mono);
}
.side p {
  margin: 1.1rem 0 0.35rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.side ul { list-style: none; margin: 0; padding: 0; }
.side a {
  display: block;
  padding: 0.22rem 0 0.22rem 0.65rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  border-left: 1px solid transparent;
}
.side a:hover { color: var(--ink); }
.side a[aria-current="page"] {
  border-left-color: var(--prompt);
  color: var(--ink);
}
.side .ext { color: var(--faint); }

.nav-mobile { display: none; margin: 0 0 1rem; }
.nav-mobile summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.nav-mobile p {
  margin: 0.85rem 0 0.15rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-mobile a {
  display: block;
  padding: 0.35rem 0;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.prose h1 {
  margin: 0 0 0.65rem;
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.prose h2 {
  margin: 1.9rem 0 0.45rem;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.prose h3 {
  margin: 1.25rem 0 0.3rem;
  font-weight: 600;
  font-size: 1rem;
}
.prose p { margin: 0.65rem 0; }
.prose ul, .prose ol { margin: 0.55rem 0; padding-left: 1.15rem; }
.prose li { margin: 0.22rem 0; }
.prose li::marker { color: var(--prompt); }
.prose a {
  color: var(--ink);
  text-decoration-color: var(--muted);
  text-underline-offset: 4px;
}
.prose a:hover { text-decoration-color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.6rem 0; }

.prose blockquote {
  margin: 1rem 0;
  padding: 0.15rem 0 0.15rem 0.9rem;
  border-left: 1px solid var(--line);
  color: var(--ink);
}
.prose blockquote.human {
  background: var(--human-bg);
  border-left: 2px solid var(--human-line);
  padding: 0.7rem 0.9rem;
}
.prose blockquote.check {
  background: var(--check-bg);
  border-left: 2px solid var(--check-line);
  padding: 0.7rem 0.9rem;
}
.prose blockquote p { margin: 0.35rem 0; }
.prose blockquote p:first-child { margin-top: 0; }
.prose blockquote p:last-child { margin-bottom: 0; }

.tools {
  margin: 0 0 1rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.75rem;
}
.tools a {
  color: var(--muted);
  text-underline-offset: 4px;
}
.tools a:hover { color: var(--ink); }

.table-wrap { overflow-x: auto; margin: 1rem 0; max-width: 100%; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid var(--line);
}
th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
}

.toc { margin: 0.2rem 0 1.2rem; padding: 0; list-style: none; font-family: var(--mono); }
.toc li { margin: 0.12rem 0; }
.toc a { color: var(--muted); text-decoration: none; font-size: 0.75rem; }
.toc a:hover { color: var(--ink); }

@media (max-width: 800px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 1rem 1rem 2rem;
  }
  .side { display: none; }
  .nav-mobile {
    display: block;
    border: 1px solid var(--line);
    border-radius: 0.375rem;
    padding: 0.15rem 0.85rem 0.3rem;
    background: transparent;
  }
  .nav-mobile[open] { padding-bottom: 0.7rem; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { border-top: 1px solid var(--line); padding: 0.4rem 0 0.6rem; }
  td { border: 0; padding: 0.2rem 0; }
  td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--faint);
  }
}

.credit{font-size:12px;opacity:.6}.credit a{color:inherit;text-decoration:none}.credit a:hover{text-decoration:underline}
.credit{display:block;width:100%;flex-basis:100%;margin:0;text-align:center}
