@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/docs/assets/fonts/instrument-sans-latin.6219bc4bfd.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/docs/assets/fonts/jetbrains-mono-latin.2c32b9b3ee.woff2) format('woff2'); }
/* docs.vyre.run. Tokens from docs/design/TOKENS.md, the same values as site/styles.css; no colour
   outside them. Dark (graphite) is the default, light is paper. Written to assets/ with a content
   hash in its name by scripts/build-docs. */
:root {
  --graphite: #0E0D0C;
  --carbon: #161513;
  --raised: #1E1C1A;
  --rule: #2B2926;
  --rule-strong: #3A3733;
  --ash: #8C877D;
  --stone: #B3AEA4;
  --bone: #F1EEE6;
  --signal: #F1EEE6;
  --signal-hover: #FFFFFF;
  --signal-ink: #0E0D0C;
  --signal-wash: rgba(241,238,230, 0.12);
  --recall: #EBC76B;
  --beacon: #B8A4FF;
  --paper: #F4F1EA;
  --paper-raised: #FBFAF6;
  --paper-rule: #DCD7CC;
  --paper-rule-strong: #C9C3B7;
  --ink: #141311;
  --ink-2: #4A463F;
  --ink-3: #6B665D;
  --signal-deep: #141311;

  --sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --r-1: 4px; --r-2: 6px; --r-3: 10px; --r-4: 14px;
  --pop: inset 0 1px 0 rgba(241, 238, 230, 0.05), 0 12px 24px -12px rgba(0, 0, 0, 0.55);
  --top: 60px;

  /* What the page uses. Dark. */
  --bg: var(--graphite);
  --panel: var(--carbon);
  --hover: var(--raised);
  --line: var(--rule);
  --line-2: var(--rule-strong);
  --text: var(--bone);
  --text-2: var(--stone);
  --text-3: var(--ash);
  --accent: var(--signal);
  --accent-ink: var(--signal-ink);
  --wash: var(--signal-wash);
  --link: var(--bone);
  --mark-w: var(--bone);
  --mark-d: var(--signal);
  --scrim: rgba(14, 13, 12, 0.72);
  color-scheme: dark;
}

/* Paper. Set by the head script from the saved choice or the system; the media query covers a
   browser with scripts off. */
:root[data-theme="light"] {
  --bg: var(--paper);
  --panel: var(--paper-raised);
  --hover: var(--paper-raised);
  --line: var(--paper-rule);
  --line-2: var(--paper-rule-strong);
  --text: var(--ink);
  --text-2: var(--ink-2);
  --text-3: var(--ink-3);
  --accent: var(--signal-deep);
  --accent-ink: var(--paper);
  --wash: rgba(20,19,17, 0.10);
  --link: var(--signal-deep);
  --mark-w: var(--ink);
  --mark-d: var(--ink);
  --scrim: rgba(20, 19, 17, 0.35);
  --pop: 0 12px 24px -12px rgba(20, 19, 17, 0.25);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: var(--paper); --panel: var(--paper-raised); --hover: var(--paper-raised);
    --line: var(--paper-rule); --line-2: var(--paper-rule-strong);
    --text: var(--ink); --text-2: var(--ink-2); --text-3: var(--ink-3);
    --accent: var(--signal-deep); --accent-ink: var(--paper); --wash: rgba(20,19,17, 0.10);
    --link: var(--signal-deep); --mark-w: var(--ink); --mark-d: var(--ink);
    --scrim: rgba(20, 19, 17, 0.35); --pop: 0 12px 24px -12px rgba(20, 19, 17, 0.25);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 20px); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 22px; overflow-x: hidden; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
svg { display: block; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--signal); color: var(--signal-ink); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: var(--r-2); font-family: var(--mono); font-size: 12px; text-decoration: none; }
.skip:focus { top: 12px; }
.lbl { font-family: var(--mono); font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin: 0; }
.kbd { font-family: var(--mono); font-size: 11px; line-height: 14px; font-weight: 500; padding: 2px 6px; border-radius: var(--r-1); border: 1px solid var(--line-2); color: var(--text-2); }

.mk-w { stroke: var(--mark-w); }
.mk-d { fill: var(--mark-d); }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { height: var(--top); max-width: 1440px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; flex-shrink: 0; }
.brand-rule { width: 1px; height: 18px; background: var(--line-2); margin-left: 2px; }
.brand-docs { font-family: var(--mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2); }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line-2); border-radius: var(--r-2); color: var(--text-2); cursor: pointer; flex-shrink: 0; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.menu { display: none; }
:root[data-theme="light"] .i-sun, :root:not([data-theme="light"]) .i-moon { display: none; }
.top-nav { display: flex; gap: 2px; margin-left: 10px; }
.top-nav a { font-size: 13px; line-height: 18px; color: var(--text-2); text-decoration: none; padding: 8px 8px; border-radius: var(--r-2); }
.top-nav a:hover { color: var(--text); background: var(--hover); }
.side-site { display: none; }
.top-link { font-size: 13px; line-height: 18px; color: var(--text-2); text-decoration: none; margin-left: auto; padding: 8px 4px; }
.top-link:hover { color: var(--text); }

.search { position: relative; flex: 1 1 auto; min-width: 0; max-width: 440px; margin-left: 40px; }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search input { width: 100%; height: 38px; padding: 0 38px 0 34px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-2); font-size: 14px; line-height: 20px; color: var(--text); -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input:focus-visible { outline-offset: 0; border-color: var(--accent); outline: none; box-shadow: 0 0 0 1px var(--accent); }
.search-key { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search input:focus ~ .search-key { visibility: hidden; }
.results { position: absolute; top: 46px; left: 0; width: max(100%, 520px); max-width: calc(100vw - 32px); max-height: min(70vh, 560px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-3); box-shadow: var(--pop); z-index: 45; }
.results a { display: flex; flex-direction: column; gap: 3px; padding: 11px 14px; border-bottom: 1px solid var(--line); text-decoration: none; }
.results a:last-child { border-bottom: 0; }
.results a[aria-selected="true"] { background: var(--wash); }
.results a:hover { background: var(--hover); }
.results a[aria-selected="true"]:hover { background: var(--wash); }
.r-t { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text); }
.r-h { font-size: 13px; line-height: 18px; color: var(--text-2); }
.r-x { font-size: 13px; line-height: 18px; color: var(--text-3); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.results mark { background: none; color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.r-empty { margin: 0; padding: 14px; font-size: 13px; color: var(--text-3); }

/* ---- layout ---- */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr) 232px; max-width: 1440px; margin: 0 auto; }
.side { position: sticky; top: calc(var(--top) + 1px); height: calc(100vh - var(--top) - 1px); overflow-y: auto; overscroll-behavior: contain; padding: 28px 16px 48px 24px; border-right: 1px solid var(--line); }
.side-sec { margin-bottom: 22px; }
.side-sec .lbl { padding: 0 10px 6px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a { display: block; padding: 5px 10px; border-radius: var(--r-2); font-size: 14px; line-height: 20px; color: var(--text-2); text-decoration: none; }
.side a:hover { background: var(--hover); color: var(--text); }
.side a[aria-current="page"] { background: var(--wash); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.scrim { display: none; }
.main { min-width: 0; padding: 44px 56px 80px; }
.toc { position: sticky; top: calc(var(--top) + 1px); height: calc(100vh - var(--top) - 1px); overflow-y: auto; padding: 48px 24px 48px 0; }
.toc .lbl { margin-bottom: 12px; }
.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 12px; border-left: 1px solid transparent; font-size: 13px; line-height: 18px; color: var(--text-3); text-decoration: none; }
.toc .toc-3 a { padding-left: 24px; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); border-left-color: var(--accent); }

/* ---- the page ---- */
.doc { max-width: 760px; font-size: 15px; line-height: 24px; color: var(--text-2); overflow-wrap: break-word; }
.doc-sec { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.badge { font-family: var(--mono); font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; padding: 2px 7px; border: 1px solid var(--line-2); border-radius: var(--r-1); color: var(--text); }
.badge-planned { border-style: dashed; color: var(--text-2); }
.doc h1, .doc h2, .doc h3, .doc h4, .doc h5, .doc h6 { color: var(--text); font-weight: 600; text-wrap: balance; scroll-margin-top: calc(var(--top) + 20px); }
.doc h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 24px; }
.doc h2 { font-size: 28px; line-height: 34px; letter-spacing: -0.02em; margin: 52px 0 14px; }
.doc h3 { font-size: 20px; line-height: 26px; letter-spacing: -0.01em; margin: 36px 0 10px; }
.doc h4, .doc h5, .doc h6 { font-size: 16px; line-height: 22px; margin: 28px 0 8px; }
.doc h1 + h2, .doc hr + h2 { margin-top: 32px; }
.doc .anchor { margin-left: 10px; color: var(--text-3); text-decoration: none; font-weight: 400; opacity: 0; }
.doc h2:hover .anchor, .doc h3:hover .anchor, .doc h4:hover .anchor, .doc .anchor:focus { opacity: 1; }
.doc .anchor:hover { color: var(--accent); }
.doc p, .doc ul, .doc ol, .doc blockquote, .doc pre, .doc .table-wrap, .doc .code-block { margin: 0 0 16px; }
.doc p { text-wrap: pretty; }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--link); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc a:hover { text-decoration-color: var(--accent); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc li::marker { color: var(--text-3); }
.doc li > p { margin: 0 0 8px; }
.doc li > ul, .doc li > ol { margin: 4px 0 0; }
.doc .tasks { list-style: none; padding-left: 2px; }
.doc .task input { margin: 0 8px 0 0; vertical-align: -2px; accent-color: var(--accent); }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.doc img { max-width: 100%; height: auto; border-radius: var(--r-3); }
.doc blockquote { border-left: 2px solid var(--line-2); padding: 2px 0 2px 16px; color: var(--text-2); }
.doc blockquote > :last-child { margin-bottom: 0; }
.doc .callout { border: 1px solid var(--line-2); border-radius: var(--r-3); background: var(--panel); padding: 12px 16px; }
.doc .callout-title { font-family: var(--mono); font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.doc .callout-warning, .doc .callout-caution, .doc .callout-gap { border-left: 2px solid var(--beacon); }
.doc code { font-family: var(--mono); font-size: 0.87em; line-height: 1; padding: 2px 5px; border-radius: var(--r-1); background: var(--panel); border: 1px solid var(--line); color: var(--text); overflow-wrap: anywhere; }
.doc pre { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-3); padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 20px; color: var(--text); tab-size: 4; }
.doc pre code { font-size: inherit; line-height: inherit; padding: 0; border: 0; background: none; overflow-wrap: normal; white-space: pre; }
.doc .code-block { position: relative; }
.doc .code-block pre { margin: 0; }
.copy { position: absolute; top: 7px; right: 7px; font-family: var(--mono); font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 8px; min-height: 26px; background: var(--panel); color: var(--text-2); border: 1px solid var(--line-2); border-radius: var(--r-2); cursor: pointer; opacity: 0; transition: opacity 0.12s; }
.code-block:hover .copy, .copy:focus-visible, .copy.done { opacity: 1; }
.copy:hover { color: var(--text); background: var(--hover); }
@media (hover: none) { .copy { opacity: 1; } }
.doc .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-3); }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 20px; }
.doc th { text-align: left; font-family: var(--mono); font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); background: var(--panel); white-space: nowrap; }
.doc th, .doc td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc tbody tr:last-child td { border-bottom: 0; }
.doc td code { white-space: nowrap; overflow-wrap: normal; }
.doc kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: var(--r-1); color: var(--text); }

/* ---- code: prompts, output ---- */
.doc .gp { color: var(--text-3); -webkit-user-select: none; user-select: none; }
.doc .go { color: var(--text-2); }
.doc .output { margin: 0 0 16px; }
.doc .output-label { font-family: var(--mono); font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; }
.doc .output pre { margin: 0; background: transparent; border-style: dashed; border-color: var(--line-2); color: var(--text-2); }

/* ---- callouts: titles, snags, whys ---- */
.doc .callout-heading { color: var(--text); font-weight: 600; margin: 0 0 6px; }
.doc .callout-heading .anchor { margin-left: 8px; }
.doc .callout-heading:hover .anchor { opacity: 1; }
.doc .callout-snag { scroll-margin-top: calc(var(--top) + 20px); }
.doc .callout-snag:target { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.doc details.callout-why { padding: 0; margin: 0 0 16px; }
.doc .callout-why summary { display: flex; align-items: baseline; gap: 10px; padding: 11px 16px; cursor: pointer; list-style: none; color: var(--text); font-weight: 500; border-radius: var(--r-3); }
.doc .callout-why summary::-webkit-details-marker { display: none; }
.doc .callout-why summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; flex-shrink: 0; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: translateY(-2px) rotate(45deg); transition: transform 0.12s; }
.doc .callout-why[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.doc .callout-why summary:hover { background: var(--hover); }
.doc .callout-why summary .callout-title { margin: 0; flex-shrink: 0; }
.doc .why-body { padding: 2px 16px 12px; }
.doc .why-body > :last-child { margin-bottom: 0; }

/* ---- tabs: stacked sections without JS, a tab bar with it ---- */
.doc .tabs { margin: 0 0 20px; }
.doc .tab-panel { border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 16px; }
.doc .tab-panel > :last-child { margin-bottom: 0; }
.doc .tab-label { font-family: var(--mono); font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin: 0 0 10px; }
.doc .tabs-on .tab-label { display: none; }
.doc .tabs-on .tab-panel { border-top: 0; padding-top: 0; margin-bottom: 0; }
.doc .tab-panel[hidden] { display: none; }
.doc .tablist { display: flex; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.doc .tab { flex-shrink: 0; margin-bottom: -1px; padding: 9px 12px; background: none; border: 0; border-bottom: 2px solid transparent; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-3); cursor: pointer; white-space: nowrap; }
.doc .tab:hover { color: var(--text); }
.doc .tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.doc .tab:focus-visible { outline-offset: -2px; border-radius: var(--r-1); }

/* ---- screenshots: a figure, and the file that matches the theme ---- */
.doc figure.shot { margin: 0 0 20px; }
.doc figure.shot img { display: block; border: 1px solid var(--line); }
.doc figcaption { margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--text-3); }
:root[data-theme="dark"] .doc .shot-light, :root[data-theme="light"] .doc .shot-dark { display: none; }
@media not all and (prefers-color-scheme: light) { :root:not([data-theme]) .doc .shot-light { display: none; } }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .doc .shot-dark { display: none; } }

/* ---- demos (the widgets are in demos.css) and colour swatches ---- */
.doc .demo { margin: 0 0 20px; }
.doc .swatch { display: inline-block; width: 32px; height: 20px; border-radius: var(--r-1); box-shadow: inset 0 0 0 1px var(--line-2); vertical-align: middle; }
.doc .swatches td:first-child, .doc .swatches th:first-child { width: 1%; padding-right: 0; }
.doc .swatches td:nth-child(3) code { white-space: nowrap; }
.doc .swatches td:last-child { min-width: 220px; }
.toc .toc-tab { color: var(--text-3); font-size: 11px; font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; margin-left: 6px; }

/* ---- footer ---- */
.doc-foot { max-width: 760px; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.doc-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; line-height: 18px; }
.doc-links a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.doc-links a:hover { color: var(--text); text-decoration-color: var(--accent); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--text-3); }
.doc-meta b { font-weight: 500; color: var(--text-2); }
.doc-meta:empty { display: none; }
.pn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.pn { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-3); text-decoration: none; min-width: 0; }
.pn:hover { border-color: var(--line-2); background: var(--hover); }
.pn-next { text-align: right; align-items: flex-end; }
.pn-t { color: var(--text); font-weight: 500; font-size: 15px; line-height: 20px; }
.pn-none { border: 0; padding: 0; }
.pn-none:hover { background: none; }

/* ---- narrower ---- */
@media (max-width: 1199px) {
  .layout { grid-template-columns: 248px minmax(0, 1fr); }
  .toc { display: none; }
  .main { padding: 40px 40px 72px; }
}
@media (max-width: 899px) {
  .layout { display: block; }
  .top-in { padding: 0 16px; gap: 10px; }
  .menu { display: inline-flex; }
  .search { margin-left: 6px; }
  .search-key, .top-link { display: none; }
  .top-nav { display: none; }
  .side-site { display: block; }
  .side { position: fixed; z-index: 35; top: calc(var(--top) + 1px); left: 0; bottom: 0; height: auto; width: min(304px, 86vw); background: var(--bg); padding: 20px 12px 48px 16px; transform: translateX(-100%); visibility: hidden; transition: transform 0.18s ease, visibility 0s linear 0.18s; }
  body.nav-open .side { transform: none; visibility: visible; transition: transform 0.18s ease; }
  body.nav-open { overflow: hidden; }
  .scrim { display: block; position: fixed; inset: calc(var(--top) + 1px) 0 0 0; z-index: 30; background: var(--scrim); }
  .scrim[hidden] { display: none; }
  .main { padding: 28px 16px 56px; }
  .doc h2 { font-size: 24px; line-height: 30px; margin-top: 44px; }
  .results { position: fixed; top: calc(var(--top) + 6px); left: 16px; right: 16px; width: auto; max-width: none; }
}
@media (max-width: 420px) {
  .wordmark { display: none; }
  .brand { gap: 8px; }
  .pn-row { grid-template-columns: 1fr; }
  .pn-none { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .side, body.nav-open .side, .copy, .doc .callout-why summary::after { transition: none; }
}
