@font-face {
  font-family: "Perfectly Nineties";
  src: url("/fonts/PerfectlyNineties-Extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rig Mono";
  src: url("/fonts/RigMono-Extended.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rig Mono";
  src: url("/fonts/RigMono-ExtendedBold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rig Mono";
  src: url("/fonts/RigMono-ExtendedMedium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rig Mono";
  src: url("/fonts/RigMono-ExtendedMediumItalic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-surface: #151515;
  --bg-code: #0e0e0e;
  --text: #888888;
  --text-body: #999999;
  --text-dim: #555555;
  --text-heading: #e0e0e0;
  --accent: #cccccc;
  --accent-hover: #ffffff;
  --accent-muted: rgba(255, 255, 255, 0.06);
  --border: #1c1c1c;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Rig Mono", ui-monospace, monospace;
  --font-display: "Perfectly Nineties", sans-serif;
  --sidebar-width: 220px;
  --content-max: 720px;
  --header-h: 48px;
  --syn-keyword: #008bdc;
  --syn-type: #ff8500;
  --syn-string: #46bf02;
  --syn-number: #ffb500;
  --syn-comment: #444444;
  --syn-operator: #777777;
  --syn-bracket: #444444;
  --syn-meta: #555555;
  --syn-variable: #999999;
}

/* Reset */

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
}

.skip-link:focus {
  top: 0.5rem;
}

::selection {
  background: var(--accent-muted);
  color: var(--text-heading);
}

/* Typography */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--text-heading);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.65rem;
}

h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

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

:is(.docs-content, .blog-post-body)
  a:not(:where(.heading-anchor, .page-nav-prev, .page-nav-next, .code-btn)) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: var(--border);
}

:is(.docs-content, .blog-post-body)
  a:not(
    :where(.heading-anchor, .page-nav-prev, .page-nav-next, .code-btn)
  ):hover {
  text-decoration-color: var(--accent-hover);
}

strong {
  color: var(--text-heading);
  font-weight: 500;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text-heading);
  background: var(--bg-surface);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-feature-settings:
    "calt" 1,
    "dlig" 1;
}

pre {
  background: var(--bg-code);
  padding: 0.9rem 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  border: 1px solid var(--border);
  color: var(--text-body);
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

ul,
ol {
  margin-bottom: 1rem;
  padding-left: 1.35rem;
  font-size: 0.875rem;
}

li {
  margin-bottom: 0.3rem;
}

li > ul,
li > ol {
  margin-bottom: 0;
  margin-top: 0.3rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.15rem;
  font-size: 0.825rem;
}

th,
td {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  text-align: left;
}

th {
  background: var(--bg-elevated);
  font-weight: 500;
  color: var(--text-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

blockquote {
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.heading-anchor {
  position: absolute;
  left: -1.2em;
  color: var(--text-dim);
  text-decoration: none;
  opacity: 0;
  font-weight: 400;
}

h1:hover > .heading-anchor,
h2:hover > .heading-anchor,
h3:hover > .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  position: relative;
}

h1[id],
h2[id],
h3[id],
h4[id],
h5[id],
h6[id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

/* Header */

.site-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-header .logo:hover {
  opacity: 0.85;
}

.logo-img {
  height: 20px;
  width: auto;
  flex-shrink: 0;
}

.logo-light {
  display: none;
}

.site-header nav {
  margin-left: auto;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-header nav a {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}

.site-header nav a:hover {
  color: var(--text-body);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 1rem;
  width: 1rem;
  height: 0.75rem;
  flex-shrink: 0;
  position: relative;
  border-top: 1.5px solid var(--text-dim);
  border-bottom: 1.5px solid var(--text-dim);
}

.menu-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1.5px solid var(--text-dim);
  transform: translateY(-50%);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.theme-toggle:hover {
  color: var(--text-body);
}

/* Landing page */

.landing main {
  max-width: 760px;
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.8rem;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero .tagline {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.preview-note {
  margin-top: 0.75rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.landing-examples {
  margin-bottom: 3rem;
}

.example-tabs {
  display: flex;
  gap: 0;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}

.example-tab {
  background: none;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 1.15rem;
  cursor: pointer;
  transition: color 0.15s;
  border-radius: 4px 4px 0 0;
}

.example-tab:hover {
  color: var(--text-body);
}

.example-tab[aria-selected="true"] {
  color: var(--text-heading);
  background: var(--bg-code);
  border-color: var(--border);
}

.example-panels {
  position: relative;
}

.example-panel[hidden] {
  display: none;
}

.landing-about {
  margin-bottom: 3rem;
}

.landing-about h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.landing-about p {
  color: var(--text);
  line-height: 1.7;
}

.feature-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
}

.feature-list li {
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: var(--text);
}

.feature-list li strong {
  color: var(--text-heading);
  margin-right: 0.25rem;
}

.feature-list li::marker {
  color: var(--text-dim);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--accent);
  transition: color 0.15s;
}

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

/* Docs layout */

.docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--header-h));
}

.sidebar {
  padding: 1.25rem 0.6rem;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  height: calc(100vh - var(--header-h));
  position: sticky;
  top: var(--header-h);
  background: var(--bg);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar nav a {
  display: block;
  padding: 0.25rem 0.6rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 400;
  border-radius: 3px;
  line-height: 1.5;
  transition: color 0.1s;
}

.sidebar nav a:hover {
  color: var(--text-body);
  text-decoration: none;
}

.sidebar nav a[aria-current="page"] {
  color: var(--text-heading);
}

.section-title {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 1rem 0.6rem 0.25rem;
}

.section-title:first-child {
  padding-top: 0;
}

.docs-content {
  padding: 2.5rem 3rem;
  width: 100%;
  max-width: calc(var(--content-max) + 6rem);
  margin: 0 auto;
  overflow-x: hidden;
}

.docs-content > h1:first-child {
  margin-bottom: 0.35rem;
}

.docs-content > h1:first-child + p {
  color: var(--text);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

/* Previous / Next page nav */

.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

.page-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.page-nav a:hover {
  color: var(--text-body);
}

.page-nav-next {
  text-align: right;
  margin-left: auto;
}

.page-nav-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-nav-title {
  font-size: 0.85rem;
  color: var(--text-heading);
}

.page-nav a:hover .page-nav-title {
  color: var(--accent);
}

/* 404 */

.page-404 {
  max-width: 760px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  text-align: center;
}

.page-404 h1 {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.page-404 p {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.page-404 a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.15s;
}

.page-404 a:hover {
  color: var(--text-body);
}

/* Blog index */

.blog-index {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.blog-index h1 {
  margin-bottom: 2rem;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-empty {
  color: var(--text-dim);
  font-size: 0.875rem;
}

.blog-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

.blog-card:hover {
  border-color: var(--text-dim);
  color: inherit;
}

.blog-card-cover {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.blog-card-body {
  padding: 1.25rem 1.5rem;
}

.blog-card-title {
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}

.blog-card time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.blog-card p {
  margin: 0.5rem 0 0;
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Blog post */

.blog-post {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.blog-post-cover {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  display: block;
}

.blog-post-header {
  margin-bottom: 0.5rem;
}

.blog-post-header time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.blog-post-body {
  margin-bottom: 3rem;
}

.blog-post-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.blog-post-footer a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
}

.blog-post-footer a:hover {
  color: var(--text-body);
}

/* Playground */

.playground-page {
  height: 100dvh;
  overflow: hidden;
}

.playground {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--header-h) minmax(0, 1fr);
  height: 100%;
}

.playground-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.75rem;
  border-bottom: 1px solid var(--border);
}

.playground-bar .logo {
  display: flex;
  flex-shrink: 0;
}

.playground-bar .logo-img {
  height: 16px;
}

.playground select,
.playground button {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-body);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.3rem 0.6rem;
}

.playground select {
  width: 7rem;
  min-width: 0;
}

.playground-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.playground .theme-toggle {
  border-color: transparent;
  font-weight: 400;
}

.playground .playground-run {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.playground button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.playground-workspace {
  display: grid;
  grid-template-columns: minmax(0, var(--source-size, 1fr)) 1px minmax(
      0,
      var(--output-size, 1fr)
    );
  min-height: 0;
}

.playground-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--bg-code);
  overflow: hidden;
}

.playground-divider {
  position: relative;
  background: var(--border);
  cursor: col-resize;
  touch-action: none;
}

.playground-divider::before {
  content: "";
  position: absolute;
  inset: 0 -6px;
  z-index: 2;
}

.playground-divider:hover,
.playground-divider:focus-visible {
  background: var(--accent);
  outline: none;
}

.playground-pane-header {
  display: flex;
  align-items: center;
  height: 2.25rem;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.playground-pane-label {
  padding: 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text);
}

.playground-status {
  margin-left: auto;
  padding-right: 0.85rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.playground-tabs,
.code-files {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}

.playground-tabs {
  height: 100%;
}

.playground-file {
  display: flex;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}

.playground-file:has([aria-selected="true"]) {
  background: var(--bg-code);
  box-shadow: inset 0 1px var(--accent);
}

.playground-file button {
  border: none;
  border-radius: 0;
  padding: 0 0.85rem;
  flex-shrink: 0;
  cursor: pointer;
  background: transparent;
  color: var(--text);
}

.playground-file button[aria-selected="true"] {
  color: var(--text-heading);
}

.playground-file .delete-file {
  padding: 0 0.5rem;
  opacity: 0;
}

.playground-file:has(.delete-file) [role="tab"] {
  padding-right: 0.35rem;
}

.playground-file:hover .delete-file,
.playground-file:focus-within .delete-file,
.playground-file:has([aria-selected="true"]) .delete-file {
  opacity: 1;
}

.playground .playground-new-file,
.playground .playground-clear {
  height: 100%;
  flex-shrink: 0;
  padding: 0 0.7rem;
  border: none;
  border-radius: 0;
  color: var(--text);
  cursor: pointer;
}

.playground .playground-new-file {
  font-size: 1rem;
}

.playground-new-file:hover,
.playground-clear:hover {
  background: var(--bg-elevated);
}

.playground-dialog {
  width: min(22rem, calc(100vw - 2rem));
  margin: auto;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-body);
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.playground-dialog::backdrop {
  background: rgb(0 0 0 / 40%);
}

.playground-dialog form {
  display: grid;
  gap: 0.8rem;
}

.playground-dialog input {
  min-width: 0;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: inherit;
  background: var(--bg-code);
  font: inherit;
}

.playground-dialog input:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.playground-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.playground-editor {
  flex: 1;
  min-height: 0;
}

.playground-editor .cm-editor {
  height: 100%;
}

.playground-editor .cm-scroller {
  overflow: auto;
  overscroll-behavior: contain;
}

.playground-output {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 1rem;
  border: none;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  white-space: pre-wrap;
  overflow: auto;
  overscroll-behavior: contain;
}

button.diagnostic-link {
  background: none;
  padding: 0;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
  white-space: pre-wrap;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Code blocks (CodeMirror containers) */

.rig-code-wrapper {
  --code-toolbar-height: 2rem;
  position: relative;
  margin-bottom: 1.15rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-code);
}

.rig-code {
  background: var(--bg-code);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.65;
  font-feature-settings:
    "calt" 1,
    "dlig" 1;
}

.rig-code:not(:has(.cm-editor)) {
  white-space: break-spaces;
  overflow-wrap: anywhere;
  padding: 0.7rem 0.85rem;
}

.rig-code:not(:has(.cm-editor))::after {
  /* Preserve a final empty line without changing the source text. */
  content: "\200b";
}

.rig-code-wrapper:not(:has(.cm-editor)):has([data-file][hidden]) {
  padding-top: calc(var(--code-toolbar-height) + 1px);
}

.code-header {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border-bottom: 1px solid var(--border);
}

.code-files [role="tab"] {
  flex-shrink: 0;
  padding: 0.45rem 0.7rem;
  border: none;
  border-right: 1px solid var(--border);
  background: none;
  color: var(--text-dim);
  font: 0.65rem var(--font-mono);
  cursor: pointer;
}

.code-files [aria-selected="true"] {
  color: var(--text-heading);
  box-shadow: inset 0 1px var(--accent);
}

.code-toolbar {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  justify-content: flex-end;
  min-height: var(--code-toolbar-height);
  margin-left: auto;
  gap: 0.35rem;
  padding: 0.2rem 0.4rem;
}

.rig-code-wrapper > .code-toolbar {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
}

.code-btn:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 400;
  line-height: 1;
  padding: 0.15rem 0.4rem;
  min-height: 1.5rem;
  cursor: pointer;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s;
}

.code-btn:hover {
  color: var(--text-body);
}

.code-results {
  border-top: 1px solid var(--border);
}

.code-results:not([hidden]) {
  display: flex;
  align-items: flex-start;
}

.code-clear {
  flex-shrink: 0;
  margin: 0.25rem 0.4rem 0 0;
}

.code-results .code-output {
  flex: 1;
  min-width: 0;
  max-height: 16rem;
  overflow: auto;
  margin: 0;
  padding: 0.5rem 0.7rem 0.7rem;
  border: none;
  border-radius: 0;
  color: var(--text-body);
  font: 0.8rem/1.65 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Light theme */

[data-theme="light"] {
  color-scheme: light;
  --bg: #f2efeb;
  --bg-elevated: #eae7e2;
  --bg-surface: #f7f4ef;
  --bg-code: #f7f4ef;
  --text: #6b6b62;
  --text-body: #4a4a43;
  --text-dim: #9a9a90;
  --text-heading: #231f20;
  --accent: #4a4a43;
  --accent-hover: #231f20;
  --accent-muted: rgba(35, 31, 32, 0.06);
  --border: #d6d1c9;
  --syn-keyword: #0080cc;
  --syn-type: #e07000;
  --syn-string: #38a000;
  --syn-number: #b08c00;
  --syn-comment: #a09f90;
  --syn-operator: #6a6a60;
  --syn-bracket: #a0a090;
  --syn-meta: #8a8a80;
  --syn-variable: #3a3a33;
}

[data-theme="light"] .logo-dark {
  display: none;
}
[data-theme="light"] .logo-light {
  display: inline;
}

/* Responsive */

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

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

  .sidebar {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 260px;
    height: calc(100vh - var(--header-h));
    z-index: 100;
    background: var(--bg);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }

  [data-theme="light"] .sidebar {
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
  }

  .sidebar.open {
    display: block;
  }

  .docs-content {
    padding: 1.5rem;
  }

  .menu-toggle {
    display: block;
    margin-right: 0.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .landing main {
    padding: 3rem 1.25rem 2rem;
  }

  .feature-list li {
    font-size: 0.85rem;
  }

  .site-header {
    padding: 0 1rem;
  }

  .site-header nav {
    gap: 0.6rem;
  }

  .site-header nav a {
    font-size: 0.75rem;
  }

  .playground-bar {
    padding: 0 0.5rem;
    gap: 0.5rem;
  }

  .playground-bar .logo-img {
    height: 14px;
  }

  .playground-actions {
    gap: 0.4rem;
  }

  .playground-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, var(--source-size, 3fr)) 1px minmax(
        0,
        var(--output-size, 2fr)
      );
  }

  .playground-divider {
    cursor: row-resize;
  }

  .playground-divider::before {
    inset: -6px 0;
  }
}

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