/* tilder.dev: the console's tokens (web/src/index.css, dark), a display size
   for the landing, and hairlines in white at low alpha. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  src: url("/fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  src: url("/fonts/ibm-plex-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  --page: oklch(0.185 0.008 265);
  --chrome: oklch(0.195 0.008 265);
  --sidebar: oklch(0.21 0.008 265);
  --surface: oklch(0.225 0.008 265);
  --raised: oklch(0.265 0.008 265);
  --active: oklch(0.29 0.008 265);
  --border: oklch(0.31 0.008 265);
  --hair: oklch(1 0 0 / 0.07);
  --hair-strong: oklch(1 0 0 / 0.12);
  --fg: oklch(0.93 0.008 265);
  --fg-strong: oklch(0.97 0.006 265);
  --muted: oklch(0.72 0.008 265);
  --subtle: oklch(0.6 0.008 265);
  --brand: oklch(0.76 0.12 275);
  --primary: oklch(0.54 0.15 275);
  --on-primary: oklch(0.99 0.003 275);
  --success: oklch(0.78 0.14 150);
  --ansi-green: oklch(0.72 0.13 145);
  --ansi-blue: oklch(0.72 0.13 255);
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--fg);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  color: oklch(0.86 0.08 275);
}
code,
pre,
.mono {
  font-family: var(--mono);
}
.mono {
  font-size: 12px;
}
.dim {
  color: var(--subtle);
}
.grow {
  flex: 1;
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.eyebrow {
  font: 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  color: var(--subtle);
}

/* Header and footer */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: oklch(0.185 0.008 265 / 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}
.top-in,
.foot-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.top-in {
  height: 60px;
}
.logo {
  color: var(--fg-strong);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.logo .tilde {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--brand);
  margin-right: 2px;
}
.top-nav {
  display: flex;
  gap: 24px;
  flex: 1;
  font-size: 14px;
}
.top-nav a,
.top-link {
  color: var(--muted);
  font-size: 14px;
}
.top-nav a:hover,
.top-link:hover,
.top-nav a[aria-current="page"] {
  color: var(--fg);
}
.foot {
  border-top: 1px solid var(--hair);
  margin-top: 120px;
}
.foot-in {
  padding-top: 28px;
  padding-bottom: 28px;
  gap: 20px;
  font-size: 13px;
  color: var(--subtle);
  flex-wrap: wrap;
}
.foot-in a {
  color: var(--muted);
}

/* Buttons */
.btn {
  height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
}
.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 14px;
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.16);
}
.btn-primary:hover {
  background: oklch(0.58 0.15 275);
  color: var(--on-primary);
}
.btn-ghost {
  border: 1px solid var(--hair-strong);
  background: oklch(1 0 0 / 0.03);
  color: var(--fg);
  font-weight: 400;
}
.btn-ghost:hover {
  background: oklch(1 0 0 / 0.06);
  color: var(--fg);
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Landing */
.landing main {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.rules {
  position: fixed;
  inset: 0;
  pointer-events: none;
  max-width: 1200px;
  margin: 0 auto;
  border-left: 1px solid oklch(1 0 0 / 0.045);
  border-right: 1px solid oklch(1 0 0 / 0.045);
}
.hero {
  padding: 104px 20px 0;
  display: flex;
  align-items: flex-end;
  gap: 64px;
}
.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
h1,
h2 {
  color: var(--fg-strong);
  font-weight: 500;
  margin: 0;
}
.hero h1 {
  font-size: 68px;
  line-height: 1;
  letter-spacing: -0.028em;
}
.lede {
  margin: 0;
  max-width: 540px;
  font-size: 18px;
  line-height: 28px;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  padding-bottom: 6px;
}
.glow {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(closest-side, oklch(0.6 0.15 275 / 0.22), oklch(0.6 0.15 275 / 0));
  pointer-events: none;
}

/* The console, drawn */
.shot {
  position: relative;
  margin-top: 64px;
  height: 700px;
  border-radius: 10px;
  border: 1px solid oklch(1 0 0 / 0.1);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px oklch(0 0 0 / 0.35);
  font-size: 14px;
}
.shot-body {
  flex: 1;
  display: flex;
  min-height: 0;
}
.rail {
  width: 48px;
  background: var(--chrome);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
}
.ws {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--subtle);
}
.ws-on {
  background: var(--active);
  color: var(--fg);
  font-weight: 600;
}
.side {
  width: 264px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.side-head {
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
}
.side-head span,
.search span {
  font-size: 12px;
  color: var(--subtle);
}
.search {
  margin: 0 12px 10px;
  height: 28px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 6px;
  background: var(--raised);
  font-size: 13px;
  color: var(--subtle);
}
.tree,
.crop-tree {
  padding: 0 6px;
  display: flex;
  flex-direction: column;
}
.root,
.leaf {
  height: 24px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  white-space: nowrap;
}
.root {
  padding-left: 4px;
  font: 13px var(--mono);
}
.leaf {
  padding-left: 26px;
  color: oklch(0.8 0.008 265);
}
.leaf-on {
  background: var(--active);
  color: var(--fg);
}
.work {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.tabs {
  height: 36px;
  display: flex;
  background: var(--chrome);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.tab {
  padding: 0 14px;
  display: flex;
  align-items: center;
  color: var(--muted);
  border-right: 1px solid var(--border);
}
.tab-on {
  background: var(--surface);
  color: var(--fg);
}
.tab-preview {
  font-style: italic;
}
.panes {
  flex: 1;
  display: flex;
  min-height: 0;
}
.term {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding: 14px 18px;
  font: 14px/21px var(--mono);
  color: var(--fg);
  overflow: hidden;
}
.term + .term {
  border-left: 1px solid var(--border);
}
.term .ok {
  color: var(--ansi-green);
}
.term .info {
  color: var(--ansi-blue);
}
.term .cursor {
  background: var(--fg);
  color: var(--surface);
}
.copy-card,
.crop-copy {
  padding: 12px 14px;
  border-radius: 10px;
  background: oklch(0.28 0.008 265);
  border: 1px solid oklch(1 0 0 / 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.copy-card {
  position: absolute;
  right: 20px;
  bottom: 44px;
  width: 320px;
  box-shadow: 0 12px 32px oklch(0 0 0 / 0.35);
}
.copy-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.copy-sub {
  font-size: 12px;
  color: var(--subtle);
}
.bar {
  height: 4px;
  border-radius: 2px;
  background: oklch(0.35 0.008 265);
  overflow: hidden;
}
.bar-fill {
  height: 4px;
  width: 0;
  background: var(--brand);
  transition: width 0.2s linear;
}
.bar-62 {
  width: 62%;
}
.status {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 12px;
  background: var(--chrome);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: oklch(0.78 0.008 265);
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 4px;
}
.fade {
  position: absolute;
  inset: auto 0 0;
  height: 200px;
  background: linear-gradient(oklch(0.185 0.008 265 / 0), var(--page));
  pointer-events: none;
}

/* Sections */
.how,
.chapter,
.promises,
.closing {
  padding: 120px 20px 0;
}
.how h2,
.chapter h2,
.promises h2 {
  font-size: 44px;
  line-height: 48px;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
}
.fig {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}
.node {
  padding: 20px;
  border: 1px solid var(--hair-strong);
  border-radius: 10px;
  background: var(--chrome);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.node span {
  color: var(--muted);
  font-size: 14px;
}
.node-quiet {
  border-style: dashed;
  background: transparent;
}
.link {
  min-width: 180px;
  text-align: center;
  color: var(--brand);
  border-top: 1px solid var(--brand);
  padding-top: 8px;
}
.aside {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.chapter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.chapter p {
  color: var(--muted);
  font-size: 17px;
  line-height: 28px;
  max-width: 480px;
}
.crop {
  border: 1px solid oklch(1 0 0 / 0.1);
  border-radius: 10px;
  background: var(--surface);
  padding: 20px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.crop-term {
  margin: 0;
  font: 14px/22px var(--mono);
  white-space: pre-wrap;
}
.mono-list {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: n;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hair);
}
.mono-list li {
  counter-increment: n;
  padding: 18px 0 18px 56px;
  position: relative;
  border-bottom: 1px solid var(--hair);
  color: var(--muted);
  font-size: 17px;
}
.mono-list li::before {
  content: counter(n, decimal-leading-zero);
  position: absolute;
  left: 0;
  font: 13px/28px var(--mono);
  color: var(--brand);
}
.closing {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.closing h2 {
  font-size: 72px;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* Docs */
.docs-in {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
}
.docs-nav {
  width: 264px;
  flex-shrink: 0;
  padding: 28px 16px;
  position: sticky;
  top: 60px;
  align-self: flex-start;
  max-height: calc(100vh - 60px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 14px;
  border-right: 1px solid var(--hair);
}
.nav-group {
  display: flex;
  flex-direction: column;
}
.nav-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--subtle);
  padding: 0 8px 4px;
}
.docs-nav a {
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--muted);
}
.docs-nav a:hover {
  color: var(--fg);
}
.docs-nav a[aria-current="page"] {
  background: var(--active);
  color: var(--fg);
}
.docs-main {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 56px;
  padding: 40px 48px;
}
.prose {
  width: 100%;
  max-width: 720px;
  font-size: 16px;
  line-height: 26px;
  color: oklch(0.85 0.008 265);
}
.crumb {
  font-size: 12px;
  color: var(--subtle);
}
.prose h1 {
  font-size: 34px;
  line-height: 42px;
  letter-spacing: -0.015em;
  margin: 6px 0 16px;
}
.prose h2 {
  font-size: 22px;
  line-height: 30px;
  margin: 40px 0 8px;
  padding-top: 8px;
  scroll-margin-top: 80px;
}
.prose h3 {
  font-size: 17px;
  color: var(--fg);
  margin: 28px 0 4px;
  font-weight: 600;
}
.prose p,
.prose ul,
.prose ol {
  margin: 12px 0;
}
.prose li {
  margin: 4px 0;
}
.prose strong {
  color: var(--fg);
  font-weight: 600;
}
.prose :not(pre) > code {
  font-size: 0.875em;
  padding: 1px 5px;
  border-radius: 4px;
  background: oklch(0.6 0.15 275 / 0.15);
  color: var(--fg);
}
.prose blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--raised);
  color: var(--muted);
}
.prose blockquote p {
  margin: 0;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  margin: 16px 0;
}
.prose th,
.prose td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
}
.code {
  position: relative;
  margin: 16px 0;
  border: 1px solid var(--hair-strong);
  border-radius: 8px;
  background: var(--chrome);
}
.code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 20px;
  color: var(--fg);
}
.code-lang {
  position: absolute;
  top: 8px;
  right: 64px;
  font: 11px var(--mono);
  color: var(--subtle);
}
.copy {
  position: absolute;
  top: 6px;
  right: 8px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--hair-strong);
  background: var(--raised);
  color: var(--muted);
  font: 12px var(--sans);
  cursor: pointer;
}
.copy:hover {
  color: var(--fg);
}
.doc-foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}
.toc {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.toc a {
  color: var(--muted);
}

/* Narrow screens */
@media (max-width: 1100px) {
  .toc {
    display: none;
  }
}
@media (max-width: 860px) {
  .top-nav {
    gap: 16px;
  }
  .top-link {
    display: none;
  }
  .hero {
    padding-top: 64px;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
  }
  .hero h1 {
    font-size: 44px;
  }
  .hero-actions {
    align-items: flex-start;
  }
  .side,
  .rail,
  .term + .term,
  .copy-card {
    display: none;
  }
  .shot {
    height: 420px;
  }
  .how h2,
  .chapter h2,
  .promises h2 {
    font-size: 32px;
    line-height: 38px;
  }
  .fig,
  .aside,
  .chapter {
    grid-template-columns: 1fr;
  }
  .link {
    border-top: 0;
    border-left: 1px solid var(--brand);
    padding: 8px 0 8px 12px;
    text-align: left;
  }
  .closing h2 {
    font-size: 44px;
  }
  .docs-in {
    flex-direction: column;
  }
  .docs-nav {
    position: static;
    width: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--hair);
    flex-direction: row;
    flex-wrap: wrap;
    padding: 16px;
  }
  .docs-main {
    padding: 24px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bar-fill {
    transition: none;
  }
}
