/* Public developer docs (DOC-01). Self-contained: system fonts, no external resources, light and dark themes. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f8f7;
  --bg-sunken: #eef3f0;
  --ink: #0f1d17;
  --ink-2: #33443c;
  --muted: #5d6e66;
  --line: #e2e9e5;
  --line-strong: #cfdad4;
  --accent: #0e7a4e;
  --accent-ink: #0a6340;
  --accent-soft: #e5f4ec;
  --accent-glow: rgba(14, 122, 78, 0.16);
  --note: #2f6fdb;
  --note-soft: #eaf1fd;
  --tip: #0e7a4e;
  --tip-soft: #e7f5ee;
  --warn: #b25d00;
  --warn-soft: #fff3e3;
  --code-bg: #0d1713;
  --code-head: #15231d;
  --code-ink: #dce9e2;
  --code-line: #22352c;
  --tok-key: #8fd3b0;
  --tok-str: #f2c97d;
  --tok-num: #f59f8b;
  --tok-kw: #9fb8ff;
  --tok-com: #6f8a7d;
  --tok-var: #e9a7f0;
  --shadow: 0 1px 2px rgba(15, 29, 23, 0.04), 0 8px 24px rgba(15, 29, 23, 0.06);
  --radius: 14px;
  --header: 64px;
  --sans: "Inter", "InterVariable", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1210;
    --bg-soft: #111a17;
    --bg-sunken: #16211d;
    --ink: #e8f1ec;
    --ink-2: #c3d2ca;
    --muted: #8fa39a;
    --line: #1f2c27;
    --line-strong: #2b3b34;
    --accent: #3ccf8e;
    --accent-ink: #66dfa8;
    --accent-soft: rgba(60, 207, 142, 0.12);
    --accent-glow: rgba(60, 207, 142, 0.18);
    --note: #7aa7ff;
    --note-soft: rgba(122, 167, 255, 0.1);
    --tip: #3ccf8e;
    --tip-soft: rgba(60, 207, 142, 0.1);
    --warn: #f0a650;
    --warn-soft: rgba(240, 166, 80, 0.1);
    --code-bg: #08100d;
    --code-head: #0f1915;
    --code-line: #1a2a23;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: calc(var(--header) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font: 16px / 1.7 var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: var(--accent-ink);
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  background: var(--bg);
  padding: 8px 12px;
  z-index: 50;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header);
  padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.logo {
  width: 30px;
  height: 30px;
  color: var(--accent);
}
.brand-name {
  font-weight: 750;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 9px;
}
.search {
  position: relative;
  flex: 1;
  max-width: 440px;
  margin-left: 12px;
}
.search input {
  width: 100%;
  height: 38px;
  padding: 0 40px 0 38px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235d6e66' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E")
    no-repeat 13px 50%;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background-color: var(--bg);
}
.search input::-webkit-search-cancel-button {
  display: none;
}
.search kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font: 12px var(--mono);
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 1px 6px;
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.search-results a {
  display: grid;
  gap: 1px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}
.search-results a:hover,
.search-results a[aria-selected="true"] {
  background: var(--accent-soft);
}
.search-group {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.search-results strong {
  font-size: 14px;
}
.search-detail {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-empty {
  margin: 0;
  padding: 12px;
  font-size: 14px;
  color: var(--muted);
}
.toplinks {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.toplinks a {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-2);
  text-decoration: none;
}
.toplinks a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}
.toplinks a[aria-current="page"] {
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.menu-toggle {
  display: none;
}

/* Three columns: sidebar, page, "En esta página" */
.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 220px;
  max-width: 1400px;
  margin: 0 auto;
}
.sidebar {
  position: sticky;
  top: var(--header);
  align-self: start;
  height: calc(100vh - var(--header));
  overflow-y: auto;
  padding: 28px 16px 40px 24px;
  border-right: 1px solid var(--line);
}
.nav-group {
  margin: 22px 0 6px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-group:first-child {
  margin-top: 0;
}
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.12s;
}
.sidebar a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}
.sidebar a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 650;
}
main {
  min-width: 0;
  padding: 40px 56px 72px;
}
.eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
}
.toc {
  position: sticky;
  top: var(--header);
  align-self: start;
  max-height: calc(100vh - var(--header));
  overflow-y: auto;
  padding: 40px 24px 40px 0;
  font-size: 13.5px;
}
.toc p {
  margin: 0 0 10px;
  font-weight: 650;
  color: var(--ink);
}
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.toc a {
  display: block;
  margin-left: -1px;
  padding: 4px 0 4px 14px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.45;
}
.toc a:hover {
  color: var(--ink);
}
.toc a.active {
  color: var(--accent-ink);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* Prose */
.prose {
  max-width: 780px;
}
/* Screenshots of the guides: real captures of Ruta with fictitious data. */
.prose .shot {
  margin: 22px 0 26px;
}
.prose .shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}
.prose .shot-phone img {
  max-width: 340px;
}
.prose .shot figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.prose > :first-child {
  margin-top: 0;
}
.prose h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.15;
  font-weight: 780;
  letter-spacing: -0.03em;
}
.prose h1 + p {
  font-size: 18.5px;
  line-height: 1.65;
  color: var(--ink-2);
}
.prose h2 {
  margin: 56px 0 14px;
  font-size: 25px;
  line-height: 1.3;
  font-weight: 720;
  letter-spacing: -0.02em;
}
.prose h3 {
  margin: 36px 0 10px;
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.01em;
}
.prose h2,
.prose h3 {
  position: relative;
}
.anchor {
  position: absolute;
  left: -0.9em;
  padding-right: 0.25em;
  color: var(--line-strong);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.12s;
}
.prose h2:hover .anchor,
.prose h3:hover .anchor,
.anchor:focus {
  opacity: 1;
}
.prose p,
.prose li {
  color: var(--ink-2);
}
.prose strong {
  color: var(--ink);
  font-weight: 650;
}
.prose ul,
.prose ol {
  padding-left: 1.4em;
}
.prose li + li {
  margin-top: 6px;
}
.prose li::marker {
  color: var(--muted);
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}
.prose :not(pre) > code {
  font: 0.86em var(--mono);
  color: var(--ink);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

/* Code blocks */
.code {
  margin: 20px 0 24px;
  border-radius: var(--radius);
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 8px 0 16px;
  background: var(--code-head);
  border-bottom: 1px solid var(--code-line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #9db3a8;
}
.copy {
  font: inherit;
  font-weight: 600;
  color: #c6d7ce;
  background: transparent;
  border: 1px solid #2b4338;
  border-radius: 7px;
  padding: 3px 10px;
  cursor: pointer;
}
.copy:hover {
  background: #1d3129;
  color: #fff;
}
.code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font: 13.5px / 1.65 var(--mono);
  color: var(--code-ink);
  tab-size: 2;
}
.tok-key {
  color: var(--tok-key);
}
.tok-str {
  color: var(--tok-str);
}
.tok-num {
  color: var(--tok-num);
}
.tok-kw {
  color: var(--tok-kw);
}
.tok-com {
  color: var(--tok-com);
  font-style: italic;
}
.tok-var,
.tok-flag {
  color: var(--tok-var);
}

/* Tables */
.table-wrap {
  margin: 20px 0 28px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.55;
}
.prose th,
.prose td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.prose th {
  background: var(--bg-soft);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.prose tr:last-child td {
  border-bottom: 0;
}
.prose tbody tr:hover {
  background: color-mix(in srgb, var(--bg-soft) 60%, transparent);
}

/* Callouts */
.callout {
  margin: 22px 0;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--c) 25%, transparent);
  border-left: 4px solid var(--c);
  border-radius: 12px;
  background: var(--c-soft);
  --c: var(--note);
  --c-soft: var(--note-soft);
}
.callout-tip {
  --c: var(--tip);
  --c-soft: var(--tip-soft);
}
.callout-warning {
  --c: var(--warn);
  --c-soft: var(--warn-soft);
}
.callout p {
  margin: 0;
}
.callout p + p {
  margin-top: 6px;
}
.callout-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c);
}

/* Numbered steps */
.steps ol {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 20px 0 28px;
}
.steps ol > li {
  position: relative;
  counter-increment: step;
  padding: 0 0 22px 52px;
  margin: 0;
}
.steps ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.steps ol > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15.5px;
  top: 36px;
  bottom: 4px;
  width: 1px;
  background: var(--line-strong);
}
.steps ol > li:last-child {
  padding-bottom: 0;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 28px 0;
}
.cards p {
  position: relative;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
.cards p:has(a):hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.cards p > strong:first-child {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  color: var(--ink);
}
.cards p > strong:first-child a {
  color: inherit;
  text-decoration: none;
}
.cards p > strong:first-child a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* Home */
.home .prose {
  max-width: 1000px;
}
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin: -8px 0 48px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-soft) 0%, transparent 55%),
    radial-gradient(90% 120% at 100% 100%, color-mix(in srgb, var(--note-soft) 80%, transparent) 0%, transparent 60%),
    var(--bg-soft);
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(32px, 4.6vw, 48px);
  margin-bottom: 14px;
}
.hero .lead {
  margin: 0 0 24px;
  font-size: 18px;
  color: var(--ink-2);
}
.hero .code {
  margin: 0;
}
.hero-kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent-ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 650;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.button.primary {
  color: #fff;
  background: linear-gradient(180deg, #14915e, #0e7a4e);
  border-color: #0b6a43;
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

/* Pager and footer */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 780px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.home .pager {
  max-width: 1000px;
}
.pager a {
  display: grid;
  gap: 2px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  transition: border-color 0.15s;
}
.pager a:hover {
  border-color: var(--accent);
}
.pager a span {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.pager-next {
  text-align: right;
}
.bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 22px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}
.bottom a {
  color: inherit;
}

/* Reference (Redoc) */
.reference .loading {
  padding: 24px;
}
.reference .top {
  position: sticky;
}
/* Redoc's "API docs by Redocly" footer points at an external logo: hidden, the CSP blocks it anyway. */
.reference .menu-content > div:last-child > a[href*="redocly"] {
  display: none;
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
  main {
    padding: 36px 40px 64px;
  }
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px 22px;
  }
}
@media (max-width: 820px) {
  :root {
    --header: 58px;
  }
  .top {
    gap: 10px;
    padding: 0 12px;
  }
  .brand-tag,
  .toplinks,
  .search kbd {
    display: none;
  }
  .search {
    margin-left: auto;
    max-width: none;
  }
  .menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    cursor: pointer;
  }
  .menu-toggle[hidden] {
    display: none;
  }
  .menu-toggle span:first-child,
  .menu-toggle span:first-child::before,
  .menu-toggle span:first-child::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    position: relative;
  }
  .menu-toggle span:first-child::before,
  .menu-toggle span:first-child::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .menu-toggle span:first-child::before {
    top: -6px;
  }
  .menu-toggle span:first-child::after {
    top: 6px;
  }
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Without the script the sidebar stays as a plain list above the page; with it, a slide-in panel. */
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }
  .has-menu .sidebar {
    position: fixed;
    top: var(--header);
    left: 0;
    bottom: 0;
    z-index: 25;
    width: min(320px, 86vw);
    height: auto;
    background: var(--bg);
    border-right: 1px solid var(--line);
    border-bottom: 0;
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    visibility: hidden;
  }
  .menu-open .sidebar {
    transform: none;
    visibility: visible;
    box-shadow: var(--shadow);
  }
  main {
    padding: 24px 16px 56px;
  }
  .prose h2 {
    margin-top: 44px;
    font-size: 22px;
  }
  .anchor {
    display: none;
  }
  .pager {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    margin-top: 0;
  }
}
.cards p > a {
  position: relative;
  z-index: 1;
  font-weight: 600;
}
.hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}
.hero h1 {
  font-size: clamp(30px, 3.4vw, 42px);
}
.hero .code pre {
  font-size: 12.5px;
}

/* Language tabs (site.js); without the script every block shows, one under the other. */
.tabs {
  margin: 20px 0 24px;
}
.tabs > .code {
  margin: 0 0 12px;
}
.tabs-ready > .code {
  margin: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.tabs-ready > .code[hidden] {
  display: none;
}
.tab-list {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 6px 6px 0;
  background: var(--code-head);
  border: 1px solid var(--code-line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tab-list button {
  flex: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #9db3a8;
  background: transparent;
  border: 0;
  border-radius: 8px 8px 0 0;
  padding: 7px 14px;
  cursor: pointer;
}
.tab-list button:hover {
  color: #fff;
}
.tab-list button[aria-selected="true"] {
  color: #fff;
  background: var(--code-bg);
  box-shadow: inset 0 2px 0 var(--accent);
}

/* Page footer line, reference bar, small buttons */
.page-meta {
  max-width: 780px;
  margin: 48px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
.page-meta a {
  color: inherit;
}
.button.small {
  height: 34px;
  padding: 0 12px;
  font-size: 13.5px;
}
.reference-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 14px;
  color: var(--muted);
}
.reference-bar span {
  margin-right: auto;
}

/* Lifecycle diagram */
.diagram {
  margin: 24px 0 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(100% 120% at 0% 0%, var(--accent-soft) 0%, transparent 60%), var(--bg-soft);
}
.diagram-scroll {
  overflow-x: auto;
}
.diagram svg {
  display: block;
  width: 100%;
  min-width: 620px;
  height: auto;
}
.diagram .node rect {
  fill: var(--bg);
  stroke: var(--line-strong);
  stroke-width: 1.5;
}
.diagram .node text {
  font: 700 13px var(--mono);
  fill: var(--ink);
}
.diagram .node.done rect {
  fill: var(--tip-soft);
  stroke: var(--tip);
}
.diagram .node.fail rect {
  fill: var(--warn-soft);
  stroke: var(--warn);
}
.diagram .node.end rect {
  stroke-dasharray: 5 4;
}
.diagram .edge {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}
.diagram .edge.muted {
  stroke: var(--muted);
  stroke-dasharray: 5 4;
}
.diagram .edge.retry {
  stroke: var(--warn);
  stroke-dasharray: 6 5;
}
.diagram .arrowhead {
  fill: var(--muted);
}
.diagram .event {
  font: 600 11.5px var(--mono);
  fill: var(--muted);
}
.diagram figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}
.tabs-ready .code-head span {
  visibility: hidden;
}
.prose td:first-child code {
  white-space: nowrap;
  overflow-wrap: normal;
}
