@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&family=Fira+Code:wght@300..700&family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
:root {
  --bg: #0e0f12;
  --bg-glass: rgba(14, 15, 18, 0.92);
  --panel: #16181d;
  --line: #262a31;
  --tx: #e6e4df;
  --mute: #8d9099;
  --ac: #a0e3ff;
  --on-ac: #111;
  --str: #9fd18b;
  --num: #7fb7e6;
  --com: #6b7078;
  --err: #ff8a80;
  --ok: #88dd88;
  --preview-bg: #fff;
  --mono: "Fira Code", monospace;

}
* {
  box-sizing: border-box;
  font-family: "Fira Sans", sans-serif;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a {
  color: var(--ac);
}
nav {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 14px 5vw;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(6px);
  z-index: 5;
  flex-wrap: wrap;
}
nav b {
  font: 700 18px var(--mono);
  color: var(--ac);
  margin-right: auto;
  letter-spacing: 0.5px;
}
nav a {
  color: var(--mute);
  text-decoration: none;
  font-size: 14px;
}
nav a:hover {
  color: var(--tx);
}
main {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 5vw 80px;
}
h1 {
  font-family: "Crimson Pro", serif;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.1;
  margin: 64px 0 16px;
  letter-spacing: -1px;
}
h2 {
  font-family: "Crimson Pro", serif;
  margin: 56px 0 12px;
  font-size: 26px;
  letter-spacing: -0.3px;
}
h3 {
  font-family: "Crimson Pro", serif;
  margin: 28px 0 6px;
  font: 600 16px var(--mono);
  color: var(--ac);
}
p.lead {
  font-size: 19px;
  color: var(--mute);
  max-width: 640px;
}
pre,
code {
  font-family: var(--mono);
}
code {
  background: var(--panel);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0;
}
pre code {
  background: none;
  padding: 0;
}
.k {
  color: var(--ac);
}
.s {
  color: var(--str);
}
.n {
  color: var(--num);
}
.c {
  color: var(--com);
}
.btn {
  display: inline-block;
  background: var(--ac);
  color: var(--on-ac);
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  margin: 6px 10px 6px 0;
}
.btn.g {
  background: none;
  color: var(--tx);
  border: 1px solid var(--line);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 16px;
  text-decoration: none;
  color: var(--tx);
}
.card:hover {
  border-color: var(--ac);
}
.card small {
  color: var(--mute);
  display: block;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
td,
th {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
td:first-child {
  font-family: var(--mono);
  color: var(--ac);
  white-space: nowrap;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 700px) {
  .two {
    grid-template-columns: 1fr;
  }
}
.pg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 10px;
  padding: 12px 3vw;
  height: calc(100vh - 56px);
}
.pg > div {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.pg h4 {
  margin: 0 0 4px;
  font: 12px var(--mono);
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pg textarea,
.edit pre {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--tx);
  border-radius: 8px;
  padding: 12px;
  font: 13px/1.55 var(--mono);
  flex: 1;
  resize: none;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
  margin: 0;
  min-height: 120px;
}
.edit {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 120px;
}
.edit pre,
.edit textarea {
  position: absolute;
  inset: 0;
}
.edit textarea {
  background: transparent;
  color: transparent;
  caret-color: var(--ac);
  z-index: 1;
}
.edit pre {
  pointer-events: none;
}
iframe {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--preview-bg);
  min-height: 120px;
}
#con {
  font: 12px var(--mono);
  height: 120px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--panel);
  margin-top: 8px;
  white-space: pre-wrap;
}
.err {
  color: var(--err);
}
.bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.bar select,
.bar button {
  background: var(--panel);
  color: var(--tx);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
  font: 14px system-ui;
  cursor: pointer;
}
.bar .run {
  background: var(--ac);
  color: var(--on-ac);
  border-color: var(--ac);
  font-weight: 600;
}
@media (max-width: 800px) {
  .pg {
    grid-template-columns: 1fr;
    height: auto;
  }
  .pg textarea,
  .edit {
    min-height: 200px;
  }
  iframe {
    min-height: 260px;
  }
}
.bar.full {
  grid-column: 1/-1;
}
.pg h4.gap {
  margin-top: 8px;
}
.docs {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 36px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 5vw 80px;
}
.docs aside {
  position: sticky;
  top: 76px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.docs aside a {
  color: var(--mute);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 10px;
  border-left: 2px solid var(--line);
}
.docs aside a:hover {
  color: var(--tx);
}
.docs aside a.on {
  color: var(--ac);
  border-left-color: var(--ac);
}
.docs article {
  min-width: 0;
}
.docs h1 {
  margin-top: 8px;
}
.docs article ul,
.docs article ol {
  padding-left: 22px;
}
.docs article div.scroll {
  overflow-x: auto;
}
@media (max-width: 800px) {
  .docs {
    grid-template-columns: 1fr;
  }
  .docs aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .docs aside a {
    border: 1px solid var(--line);
    border-radius: 6px;
  }
}
body.tests {
  font: 15px var(--mono);
  padding: 20px;
}
.tests .p {
  color: var(--ok);
}
.tests .f {
  color: var(--err);
}
.tests .fx {
  position: absolute;
  left: -9999px;
}
