/* machinator.io — hand-written CSS, no framework.
   Theme is automatic: prefers-color-scheme switches the tokens below.
   No manual toggle — see SPECS.md for why. */

@import url("https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,500;0,600;0,700;1,500&family=Martian+Mono:wght@400;500;700;800&display=swap");

:root {
  /* paper / phosphor-amber theme (light) */
  --bg: #f5f2e8;
  --bg-panel: #fffdf7;
  --bg-inset: #ebe6d6;
  --line: #d9d2ba;
  --line-strong: #b7ac8c;
  --text: #191810;
  --text-dim: #5b5748;
  --amber: #a66308;
  --amber-soft: rgba(166, 99, 8, 0.1);
  --green: #0d7a5f;
  --green-soft: rgba(13, 122, 95, 0.1);
  --shadow: 0 1px 0 var(--line);
  --grain-a: rgba(25, 24, 16, 0.035);
  --grain-b: rgba(25, 24, 16, 0);

  --mono: "Martian Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1160px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d0a;
    --bg-panel: #14150f;
    --bg-inset: #1a1c13;
    --line: #2c2e21;
    --line-strong: #4a4c37;
    --text: #ece8d8;
    --text-dim: #9a9686;
    --amber: #f2a63d;
    --amber-soft: rgba(242, 166, 61, 0.12);
    --green: #5fd3ab;
    --green-soft: rgba(95, 211, 171, 0.12);
    --shadow: 0 1px 0 var(--line);
    --grain-a: rgba(255, 255, 255, 0.025);
    --grain-b: rgba(255, 255, 255, 0);
  }
}

/* ---------- reset ---------- */

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    repeating-linear-gradient(0deg, var(--grain-a) 0px, var(--grain-b) 1px, transparent 1px, transparent 3px);
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1, h2, h3, p, ul, ol, dl {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- layout ---------- */

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main section {
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
  border-bottom: 1px solid var(--line);
}

main section:last-of-type {
  border-bottom: none;
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.9rem;
}

.eyebrow::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  flex: none;
}

.section-head h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.section-head .dek {
  margin-top: 0.9rem;
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 38rem;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand .mark {
  width: 22px;
  height: 22px;
  color: var(--amber);
}

.brand .mark .dot {
  fill: var(--green);
}

nav.primary {
  display: flex;
  gap: clamp(1rem, 2vw, 1.75rem);
  font-family: var(--mono);
  font-size: 0.8rem;
}

nav.primary a {
  text-decoration: none;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

nav.primary a:hover {
  color: var(--text);
  border-color: var(--amber);
}

nav.primary a.cta {
  color: var(--amber);
}

@media (max-width: 720px) {
  nav.primary .nav-links {
    display: none;
  }
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(3rem, 10vw, 6rem);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}

@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hero-copy .eyebrow,
.hero-copy h1,
.hero-copy .lede,
.hero-copy .cta-row {
  opacity: 0;
  animation: reveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-copy .eyebrow { animation-delay: 0.02s; }
.hero-copy h1 { animation-delay: 0.12s; }
.hero-copy .lede { animation-delay: 0.24s; }
.hero-copy .cta-row { animation-delay: 0.36s; }
.hero-diagram { opacity: 0; animation: reveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: 0.3s; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(2.5rem, 6.4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--amber);
}

.hero .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-dim);
  max-width: 34rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: transform 0.15s, border-color 0.15s, background-color 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #171000;
}

.btn.primary:hover {
  background: color-mix(in srgb, var(--amber) 88%, white 12%);
}

.btn.ghost {
  color: var(--text);
}

.btn.ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ---------- schematic panel (hero diagram + how it works) ---------- */

.panel {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.panel::before,
.panel::after,
.panel .corner-tl,
.panel .corner-br {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--amber);
}

.panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.panel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.hero-diagram .panel-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.hero-diagram .panel-label .live {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--green);
}

.hero-diagram .panel-label .live .blip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: blip 2.2s ease-in-out infinite;
}

@keyframes blip {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--green-soft); }
  50% { opacity: 0.55; box-shadow: 0 0 0 4px var(--green-soft); }
}

.node-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.node {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding-block: 0.85rem;
}

.node .tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--line-strong);
  white-space: nowrap;
  align-self: start;
}

.node h3 {
  font-family: var(--mono);
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
}

.node p {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.node-connector {
  margin-left: calc(0.55rem);
  padding-left: calc(0.55rem);
  border-left: 1px dashed var(--line-strong);
  height: 1.1rem;
}

/* ---------- what-it-is: numbered sentences ---------- */

.sentences {
  display: flex;
  flex-direction: column;
}

.sentence {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
}

.sentence:first-child {
  border-top: none;
}

.sentence .num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--amber);
  padding-top: 0.2rem;
}

.sentence p {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 42rem;
}

/* ---------- how it works: three steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 880px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

.step {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  padding: 1.5rem;
  position: relative;
}

.step .step-no {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.step h3 {
  font-family: var(--mono);
  font-size: 1.2rem;
  margin: 0.6rem 0 0.7rem;
  color: var(--amber);
}

.step p {
  color: var(--text-dim);
  font-size: 0.94rem;
}

.step ul {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.step li {
  font-size: 0.85rem;
  font-family: var(--mono);
  color: var(--text);
  padding-left: 1rem;
  border-left: 2px solid var(--line-strong);
}

.step-arrow {
  display: none;
}

@media (min-width: 881px) {
  .steps {
    position: relative;
  }
  .step:not(:last-child)::after {
    content: "\2192";
    position: absolute;
    right: -1.6rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--mono);
    color: var(--line-strong);
    z-index: 1;
  }
}

/* ---------- tabs (htmx) ---------- */

.tabbar {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.tabbar button {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 0.7rem 1rem;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.tabbar button:hover {
  color: var(--text);
}

.tabbar button[aria-selected="true"] {
  color: var(--amber);
  border-color: var(--amber);
}

#tab-panel {
  min-height: 22rem;
}

.tool-groups {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tool-group h4 {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.tool-group .group-note {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-bottom: 0.9rem;
  max-width: 40rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.tool {
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
  background: var(--bg-panel);
}

.tool .tool-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.tool code {
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 700;
}

.scope {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius);
  white-space: nowrap;
}

.scope.read {
  color: var(--green);
  background: var(--green-soft);
}

.scope.act {
  color: var(--amber);
  background: var(--amber-soft);
}

.tool p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.fragment-foot {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.fragment-foot code {
  font-family: var(--mono);
  background: var(--bg-inset);
  padding: 0.1rem 0.35rem;
}

/* page list used in the "for people" fragment */

.page-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.page-row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.75rem;
  border-top: 1px solid var(--line);
}

.page-row:first-child {
  border-top: none;
}

.page-row code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--amber);
}

.page-row p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
}

/* endpoint table used in the "for scripts" fragment, and .doc-table for the
   same shape of table in docs/*.html — one rule set, two class names */

.endpoint-table,
.doc-table {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.endpoint-table th,
.doc-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line-strong);
}

.endpoint-table td,
.doc-table td {
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.endpoint-table code,
.doc-table code {
  font-family: var(--mono);
}

.code-block {
  min-width: 0;
  background: var(--bg-inset);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}

.code-block.stacked {
  margin-top: 1.25rem;
}

.code-block .cmt {
  color: var(--text-dim);
}

.table-scroll {
  overflow-x: auto;
  min-width: 0;
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline;
}

.htmx-request.tabbar {
  opacity: 0.85;
}

/* ---------- benefit cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 880px) {
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  padding: 1.6rem;
}

.card .card-icon {
  width: 28px;
  height: 28px;
  color: var(--amber);
  margin-bottom: 1rem;
}

.card h3 {
  font-family: var(--mono);
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------- self-hosting ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (max-width: 880px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.split .facts {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.fact {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 0.7rem;
}

.fact .bullet {
  font-family: var(--mono);
  color: var(--amber);
}

.fact strong {
  font-family: var(--sans);
  font-weight: 600;
}

.fact p {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-top: 0.15rem;
}

/* ---------- hosted service ---------- */

.hosted {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  padding: clamp(1.75rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 720px) {
  .hosted {
    grid-template-columns: minmax(0, 1fr);
  }
}

.stamp {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--amber);
  border: 2px solid var(--amber);
  padding: 0.6rem 1rem;
  transform: rotate(-4deg);
  white-space: nowrap;
  justify-self: end;
}

@media (max-width: 720px) {
  .stamp {
    justify-self: start;
  }
}

.hosted h3 {
  font-family: var(--mono);
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.hosted p {
  color: var(--text-dim);
  max-width: 34rem;
}

.hosted ul {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.hosted li::before {
  content: "\2192 ";
  color: var(--amber);
}

/* ---------- why ---------- */

.why-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
  margin-top: 1.75rem;
}

@media (max-width: 720px) {
  .why-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.why-item {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 0.8rem;
}

.why-item .why-no {
  font-family: var(--mono);
  color: var(--line-strong);
  font-size: 1.3rem;
  font-weight: 700;
}

.why-item h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.why-item p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------- footer ---------- */

footer.site-footer {
  padding-block: 2.5rem;
}

footer.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

footer.site-footer a {
  color: var(--amber);
  text-decoration: none;
}

footer.site-footer a:hover {
  text-decoration: underline;
}

footer.site-footer .foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}

/* ---------- docs ---------- */

.docs-shell {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

@media (max-width: 880px) {
  .docs-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

.docs-nav {
  position: sticky;
  top: 5.5rem;
}

@media (max-width: 880px) {
  .docs-nav {
    position: static;
  }
}

/* .docs-nav-toggle is a <details>: a plain list at desktop widths (the ul's
   own display always wins there), a summary-driven disclosure once the
   sidebar has nowhere to sit. */

.docs-nav-toggle > summary {
  display: none;
}

.docs-nav ul {
  display: flex !important;
  flex-direction: column;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.docs-nav a {
  display: block;
  padding: 0.45rem 0.6rem;
  color: var(--text-dim);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

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

.docs-nav a[aria-current="page"] {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-soft);
}

@media (max-width: 880px) {
  .docs-nav-toggle > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    background: var(--bg-panel);
  }

  .docs-nav-toggle:not([open]) > ul {
    display: none !important;
  }

  .docs-nav-toggle[open] > ul {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
  }
}

.docs-content {
  max-width: 44rem;
  min-width: 0;
}

.docs-content .eyebrow {
  margin-bottom: 0.75rem;
}

.docs-content h1 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

.docs-content .lede {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 40rem;
  margin-bottom: 1rem;
}

.docs-content section {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.docs-content section:first-of-type {
  margin-top: 1.75rem;
}

.docs-content h2 {
  font-family: var(--mono);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.docs-content h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  margin: 1.5rem 0 0.6rem;
}

.docs-content p {
  margin-bottom: 1rem;
}

.docs-content p:last-child {
  margin-bottom: 0;
}

.docs-content .doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.docs-content ul.doc-list {
  list-style: disc;
}

.docs-content ol.doc-list {
  list-style: decimal;
}

.docs-content .doc-list li {
  color: var(--text-dim);
}

.docs-content code {
  font-family: var(--mono);
  background: var(--bg-inset);
  padding: 0.1rem 0.35rem;
  font-size: 0.85em;
}

.docs-content .code-block code {
  background: none;
  padding: 0;
  font-size: 1em;
}

/* one link per doc page, used on docs/index.html to point at the other six */

.doc-links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.doc-link-row {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.75rem;
  border-top: 1px solid var(--line);
}

.doc-link-row:first-child {
  border-top: none;
}

.doc-link-row a {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--amber);
  text-decoration: none;
}

.doc-link-row a:hover {
  text-decoration: underline;
}

.doc-link-row p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
}

.doc-foot {
  margin-top: 3rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ---------- 404 ---------- */

.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-page .code {
  font-family: var(--mono);
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
}

.error-page p {
  color: var(--text-dim);
  margin-top: 1rem;
}

.error-page a {
  color: var(--amber);
  text-decoration: none;
  font-family: var(--mono);
}

/* ---------- coming soon ---------- */

/* Fixed dark look, not gated by prefers-color-scheme: a coming-soon screen
   is one deliberate design, not the site's automatic light/dark pair — the
   values below are the dark theme's own, copied so the accent still matches
   the preview and the docs once the product ships. */
body.soon {
  --bg: #0c0d0a;
  --bg-panel: #14150f;
  --bg-inset: #1a1c13;
  --line: #2c2e21;
  --line-strong: #4a4c37;
  --text: #ece8d8;
  --text-dim: #9a9686;
  --amber: #f2a63d;
  --amber-soft: rgba(242, 166, 61, 0.12);
  --green: #5fd3ab;
  --green-soft: rgba(95, 211, 171, 0.12);
  --grain-a: rgba(255, 255, 255, 0.025);
  --grain-b: rgba(255, 255, 255, 0);
  min-height: 100vh;
}

.soon-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  animation: grid-drift 60s linear infinite;
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 64px 64px, -64px 64px; }
}

.soon-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(60rem 34rem at 50% 8%, var(--amber-soft), transparent 65%);
}

.soon-main {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: clamp(3rem, 8vw, 5rem);
}

.soon-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.35rem, 3.5vw, 2rem);
  max-width: 34rem;
}

.soon-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.soon-status .blip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: blip-amber 2.2s ease-in-out infinite;
}

@keyframes blip-amber {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--amber-soft); }
  50% { opacity: 0.55; box-shadow: 0 0 0 4px var(--amber-soft); }
}

.soon-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.soon-brand .mark {
  width: clamp(2.25rem, 6vw, 3.25rem);
  height: clamp(2.25rem, 6vw, 3.25rem);
  color: var(--amber);
  flex: none;
}

.soon-brand .mark .dot {
  fill: var(--green);
}

.soon-brand h1 {
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(2.5rem, 9vw, 4.75rem);
  letter-spacing: -0.02em;
  line-height: 1;
}

.soon-tagline {
  color: var(--text-dim);
  font-size: clamp(1.02rem, 2.2vw, 1.25rem);
  max-width: 30rem;
}

.soon-spark {
  width: min(100%, 20rem);
  height: 3.5rem;
  color: var(--amber);
}

.soon-spark .spark-line {
  stroke: currentColor;
}

.soon-spark .spark-fill {
  fill: currentColor;
  opacity: 0.1;
}

.soon-spark .spark-dot {
  fill: currentColor;
}

.soon-caps {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
}

.soon-caps li {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.6em;
}

.soon-caps li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border: 1px solid var(--amber);
  transform: rotate(45deg);
  flex: none;
}

.soon-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 0.35rem;
}

.soon-foot {
  margin-top: clamp(2.5rem, 8vw, 4rem);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

@media (max-width: 480px) {
  .soon-caps {
    font-size: 0.8rem;
  }

  .soon-caps li {
    text-align: left;
    justify-content: flex-start;
  }
}
