/* axon: one stylesheet, no framework, no external fonts. */

:root {
  --bg: #0a0a0b;
  --panel: #121214;
  --panel-2: #0d0d0f;
  --line: #26262a;
  --line-soft: #1b1b1e;
  --ink: #ecebe6;
  --muted: #a6a49d;
  --dim: #7d7b75;
  --accent: #ffb454;
  --accent-press: #e69c3d;
  --on-accent: #17110a;
  --ok: #8fd694;
  --warn: #ffcf70;
  --err: #ff8a80;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1080px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.66;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

a {
  color: var(--ink);
  text-decoration-color: var(--dim);
  text-underline-offset: 0.18em;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.35rem);
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
}

h3 {
  font-size: 1.22rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1.1em;
  max-width: 68ch;
}

ul,
ol {
  padding-left: 1.2em;
  margin: 0 0 1.2em;
  max-width: 68ch;
}

li {
  margin-bottom: 0.45em;
}

code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.875em;
}

p code,
li code,
td code,
dd code {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 0.08em 0.34em;
  white-space: nowrap;
}

pre {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 20px;
  overflow-x: auto;
  line-height: 1.62;
  margin: 0 0 1.4em;
  tab-size: 2;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 13.5px;
  white-space: pre;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  z-index: 10;
  font-weight: 600;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.site-head {
  border-bottom: 1px solid var(--line-soft);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
}

.brand::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--accent);
  display: inline-block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
}

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

main {
  display: block;
  padding: 0 0 96px;
}

.hero {
  padding: clamp(56px, 10vw, 112px) 0 clamp(36px, 6vw, 64px);
  border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
}

.lede {
  font-size: clamp(1.06rem, 1.9vw, 1.28rem);
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 2em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 2.4em;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.btn:hover {
  background: var(--accent-press);
  border-color: var(--accent-press);
  color: var(--on-accent);
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--dim);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  margin: 0;
}

.facts li::before {
  content: "/";
  color: var(--accent);
  margin-right: 8px;
}

.section {
  padding: clamp(48px, 8vw, 84px) 0 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
}

.section-head .label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.cell {
  background: var(--bg);
  padding: 26px 24px 22px;
}

.cell h3 {
  margin-bottom: 0.4em;
}

.cell p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.cell .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

.playground {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.pane {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-2);
  min-width: 0;
}

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 2px;
  cursor: pointer;
}

.chip:hover {
  color: var(--ink);
  border-color: var(--dim);
}

.chip[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
}

textarea {
  flex: 1;
  width: 100%;
  min-height: 280px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  padding: 16px;
  tab-size: 2;
}

textarea:focus {
  outline: none;
}

textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.pane-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.status {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  min-height: 1.4em;
}

.status[data-state="ok"] {
  color: var(--ok);
}

.status[data-state="err"] {
  color: var(--err);
}

.status[data-state="busy"] {
  color: var(--warn);
}

.output {
  flex: 1;
  margin: 0;
  border: 0;
  background: transparent;
  min-height: 280px;
  max-height: 460px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 16px;
  font-size: 13px;
  color: var(--ink);
}

.output .k {
  color: var(--dim);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 520px;
}

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

thead th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 500;
  background: var(--panel);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td.num {
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}

.prose {
  max-width: 72ch;
}

.prose h2 {
  margin-top: 2.2em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.8em;
}

.note {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 18px;
  color: var(--muted);
  margin: 0 0 1.6em;
  max-width: 68ch;
}

.list-plain {
  list-style: none;
  padding: 0;
}

.list-plain li {
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 0;
  margin: 0;
}

.list-plain li:last-child {
  border-bottom: 0;
}

.list-plain strong {
  font-weight: 600;
}

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

.diagram {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-2);
  padding: 22px;
  margin: 0 0 1.6em;
  overflow-x: auto;
  /* Break out of the 72ch prose column so the diagram stays legible. */
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1000px, calc(100vw - 48px));
  max-width: none;
}

.diagram svg {
  display: block;
  width: 100%;
  min-width: 560px;
  height: auto;
}

.site-foot {
  border-top: 1px solid var(--line-soft);
  padding: 32px 0 44px;
  font-size: 13.5px;
  color: var(--dim);
}

.site-foot .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px 32px;
  flex-wrap: wrap;
}

.site-foot nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-foot a {
  color: var(--muted);
  text-decoration: none;
}

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

.dot {
  color: var(--line);
  margin: 0 6px;
}

.hp {
  position: absolute;
  left: -9999px;
}

@media (max-width: 820px) {
  .grid-3,
  .playground,
  .cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-3 {
    gap: 1px;
  }

  .nav {
    gap: 16px;
  }

  .site-head .wrap {
    min-height: 60px;
  }
}

@media (max-width: 460px) {
  .wrap {
    padding: 0 18px;
  }

  .nav {
    font-size: 13px;
    gap: 12px;
  }

  .facts {
    font-size: 11.5px;
  }

  pre {
    padding: 14px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 480ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .rise-2 {
    animation-delay: 90ms;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
