/*
 * The Vocal developer docs, part 1 of 3: design tokens for the light and dark themes, the reset,
 * and the typography of the reading column. The build joins the parts into assets/site.css.
 */

:root {
  /* light-dark() picks by color-scheme: the system's, or the reader's choice in data-theme. */
  color-scheme: light dark;
  --bg: light-dark(#ffffff, #0a0a0b);
  --bg-elevated: light-dark(#ffffff, #131315);
  --bg-subtle: light-dark(#fafafa, #0f0f11);
  --bg-sunk: light-dark(#f4f4f5, #18181b);
  --bg-blur: light-dark(rgb(255 255 255 / 0.82), rgb(10 10 11 / 0.8));
  --text: light-dark(#18181b, #ededef);
  --text-muted: light-dark(#52525b, #a8a8b2);
  --text-faint: light-dark(#6b6b74, #8e8e98);
  --border: light-dark(#e4e4e7, #26262b);
  --border-strong: light-dark(#d4d4d8, #34343a);
  --accent: light-dark(#15803d, #4ade80);
  --accent-strong: light-dark(#166534, #86efac);
  --accent-soft: light-dark(#ecfdf3, rgb(74 222 128 / 0.1));
  --on-accent: light-dark(#ffffff, #052e16);
  --code-bg: light-dark(#0f1012, #111113);
  --code-bar: light-dark(#17181b, #18181b);
  --code-text: #e6e6e9;
  --code-muted: #a1a1aa;
  --inline-code-bg: light-dark(#f1f1f3, #1c1c20);
  --warn: light-dark(#92400e, #fcd34d);
  --warn-soft: light-dark(#fff8eb, rgb(245 158 11 / 0.1));
  --warn-border: light-dark(#f5c46b, rgb(245 158 11 / 0.45));
  --shade: light-dark(rgb(0 0 0 / 0.06), rgb(0 0 0 / 0.4));
  --shade-deep: light-dark(rgb(0 0 0 / 0.14), rgb(0 0 0 / 0.55));
  --shadow: 0 1px 2px var(--shade), 0 8px 24px var(--shade);
  --shadow-pop: 0 2px 6px var(--shade), 0 18px 48px var(--shade-deep);
  --get: light-dark(#0369a1, #7dd3fc);
  --get-bg: light-dark(#e0f2fe, rgb(56 189 248 / 0.14));
  --post: light-dark(#15803d, #86efac);
  --post-bg: light-dark(#dcfce7, rgb(74 222 128 / 0.14));
  --put: light-dark(#7e22ce, #d8b4fe);
  --put-bg: light-dark(#f3e8ff, rgb(192 132 252 / 0.15));
  --patch: light-dark(#854d0e, #fde047);
  --patch-bg: light-dark(#fef9c3, rgb(250 204 21 / 0.13));
  --delete: light-dark(#b91c1c, #fca5a5);
  --delete-bg: light-dark(#fee2e2, rgb(248 113 113 / 0.15));
  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 14px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --topbar: 60px;
  --sidebar: 272px;
  --toc: 224px;
  --column: 46rem;
  --font-sans:
    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', Arial, sans-serif;
  --font-mono:
    ui-monospace, 'SFMono-Regular', 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas,
    'Liberation Mono', monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme='light'] {
  color-scheme: light;
}

:root[data-theme='dark'] {
  color-scheme: dark;
}

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

html {
  scroll-padding-top: calc(var(--topbar) + var(--space-4));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition:
    background-color 200ms var(--ease),
    color 200ms var(--ease);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition:
    color 150ms var(--ease),
    background-color 150ms var(--ease),
    text-decoration-color 150ms var(--ease);
}

a:hover {
  text-decoration-color: currentColor;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.prose {
  max-width: var(--column);
  margin-inline: auto;
  animation: rise 260ms var(--ease) both;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.prose h1 {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.prose h1 + p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.prose h2 {
  margin: var(--space-7) 0 var(--space-3);
  font-size: 1.375rem;
  font-weight: 650;
}

.prose h3 {
  margin: var(--space-6) 0 var(--space-2);
  font-size: 1.125rem;
  font-weight: 600;
}

.prose h4 {
  margin: var(--space-5) 0 var(--space-2);
  font-size: 1rem;
  font-weight: 600;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 var(--space-4);
}

.prose ul,
.prose ol {
  padding-inline-start: 1.25rem;
}

.prose li {
  margin: var(--space-1) 0;
}

.prose li::marker {
  color: var(--text-faint);
}

.prose strong {
  font-weight: 600;
}

.prose code {
  padding: 0.12em 0.38em;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--inline-code-bg);
  color: var(--text);
  font: 0.86em/1.5 var(--font-mono);
  overflow-wrap: anywhere;
}

.prose a code {
  color: inherit;
}

.prose pre {
  position: relative;
  margin: 0 0 var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-text);
  font: 13px/1.7 var(--font-mono);
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: normal;
  white-space: pre;
}

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

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

/*
 * The Vocal developer docs, part 2 of 3: the frame of every page. A slim top bar, the left
 * navigation, the reading column, the "On this page" column, the previous and next links and the
 * footer; mobile first, with the navigation as a drawer on narrow screens when JavaScript runs.
 */

.skip {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-s);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 150ms var(--ease);
}

.skip:focus {
  transform: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: var(--topbar);
  padding-inline: var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-blur);
  backdrop-filter: saturate(1.6) blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.logo-mark {
  width: 26px;
  height: 26px;
  transition: transform 300ms var(--ease);
}

.logo-tile {
  fill: var(--accent);
}

.logo-bars {
  fill: var(--on-accent);
}

.brand:hover .logo-mark {
  transform: rotate(-6deg) scale(1.06);
}

.brand-docs {
  color: var(--text-faint);
  font-weight: 500;
}

.brand-badge {
  display: none;
  padding: 2px var(--space-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font: 12px/1.5 var(--font-mono);
  white-space: nowrap;
}

.toplinks {
  display: none;
  gap: var(--space-1);
  margin-inline-start: auto;
}

.theme-toggle {
  margin-inline-start: auto;
}

.toplinks + .theme-toggle {
  margin-inline-start: 0;
}

.toplinks a {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-s);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.toplinks a:hover,
.toplinks a.is-active {
  color: var(--text);
  background: var(--bg-sunk);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color 150ms var(--ease),
    background-color 150ms var(--ease),
    border-color 150ms var(--ease);
}

.icon-button:hover {
  border-color: var(--border);
  background: var(--bg-sunk);
  color: var(--text);
}

.icon-button[hidden] {
  display: none;
}

.icon {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon {
  grid-area: 1 / 1;
  transition:
    transform 400ms var(--ease),
    opacity 200ms var(--ease);
}

.theme-toggle .icon:last-of-type,
.theme-toggle[aria-pressed='true'] .icon:first-of-type {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

.theme-toggle[aria-pressed='true'] .icon:last-of-type {
  opacity: 1;
  transform: none;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1480px;
  margin-inline: auto;
}

.content {
  min-width: 0;
  padding: var(--space-6) var(--space-4) var(--space-7);
}

.content:focus {
  outline: none;
}

.sidebar {
  padding: var(--space-4) var(--space-4) var(--space-7);
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.sidebar h2 {
  margin: var(--space-5) 0 var(--space-2);
  padding-inline: var(--space-3);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

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

.sidebar h3 {
  margin: var(--space-4) 0 var(--space-1);
  padding-inline: var(--space-3);
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 500;
}

.sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar a {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: 5px var(--space-3);
  border-radius: var(--radius-s);
  color: var(--text-muted);
  line-height: 1.45;
  text-decoration: none;
}

.sidebar a:hover {
  background: var(--bg-sunk);
  color: var(--text);
}

.sidebar a[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.sidebar .method {
  flex: none;
  min-width: 3.4em;
  text-align: center;
}

.nav-operations {
  margin: 2px 0 var(--space-2) var(--space-3) !important;
  padding-inline-start: var(--space-2) !important;
  border-inline-start: 1px solid var(--border);
  font-size: 13px;
}

.toc {
  display: none;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  max-width: var(--column);
  margin: var(--space-7) auto 0;
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 150ms var(--ease),
    transform 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

.pager a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.pager-next {
  grid-column: 2;
  text-align: end;
}

.pager-label {
  color: var(--text-faint);
  font-size: 13px;
}

.pager-title {
  font-weight: 600;
}

.footer {
  max-width: var(--column);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-7);
  color: var(--text-faint);
  font-size: 13px;
}

.footer p {
  margin: 0 0 var(--space-1);
}

/* Narrow screens without JavaScript: the navigation follows the page. */
html:not(.js) .sidebar {
  order: 1;
}

html:not(.js) .footer {
  order: 2;
}

/* Narrow screens with JavaScript: the navigation is a drawer under the top bar. */
.js .sidebar {
  position: fixed;
  inset: var(--topbar) 0 0;
  z-index: 30;
  overflow-y: auto;
  border-top: 0;
  background: var(--bg);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 200ms var(--ease),
    transform 200ms var(--ease),
    visibility 0s linear 200ms;
}

.js.nav-open .sidebar {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.js.nav-open body {
  overflow: hidden;
}

@media (min-width: 640px) {
  .brand-badge,
  .toplinks {
    display: flex;
  }
  .content {
    padding-inline: var(--space-6);
  }
}

@media (min-width: 960px) {
  .menu-button {
    display: none !important;
  }
  .shell {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
  }
  .sidebar,
  .js .sidebar {
    position: sticky;
    top: var(--topbar);
    grid-row: 1 / span 2;
    grid-column: 1;
    align-self: start;
    height: calc(100vh - var(--topbar));
    overflow-y: auto;
    border-top: 0;
    border-inline-end: 1px solid var(--border);
    background: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
    scrollbar-width: thin;
  }
  .content,
  .footer {
    grid-column: 2;
  }
  .content {
    padding: var(--space-7) var(--space-7) 0;
  }
}

@media (min-width: 1240px) {
  .shell {
    grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--toc);
  }
  .shell.no-toc {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
  }
  .toc {
    display: block;
    position: sticky;
    top: var(--topbar);
    grid-row: 1 / span 2;
    grid-column: 3;
    align-self: start;
    max-height: calc(100vh - var(--topbar));
    overflow-y: auto;
    padding: var(--space-7) var(--space-5) var(--space-5) 0;
    font-size: 13px;
  }
  .toc h2 {
    margin: 0 0 var(--space-3);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
  }
  .toc ul {
    margin: 0;
    padding: 0;
    border-inline-start: 1px solid var(--border);
    list-style: none;
  }
  .toc a {
    display: block;
    margin-inline-start: -1px;
    padding: 4px 0 4px var(--space-3);
    border-inline-start: 1px solid transparent;
    color: var(--text-muted);
    line-height: 1.45;
    text-decoration: none;
  }
  .toc .toc-3 a {
    padding-inline-start: var(--space-5);
  }
  .toc a:hover {
    color: var(--text);
  }
  .toc a.is-current {
    border-color: var(--accent);
    color: var(--accent);
  }
}

/*
 * The Vocal developer docs, part 3 of 3: the components of a page. Method badges and endpoint
 * lines, tables, callouts, cards, code samples in tabs with their copy button, and the search box.
 */

.method {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  font: 700 10.5px/1.6 var(--font-mono);
  letter-spacing: 0.02em;
  vertical-align: 0.1em;
}

.method-get {
  background: var(--get-bg);
  color: var(--get);
}

.method-post {
  background: var(--post-bg);
  color: var(--post);
}

.method-put {
  background: var(--put-bg);
  color: var(--put);
}

.method-patch {
  background: var(--patch-bg);
  color: var(--patch);
}

.method-delete {
  background: var(--delete-bg);
  color: var(--delete);
}

.endpoint {
  white-space: nowrap;
}

.prose a:has(> .endpoint) {
  text-decoration: none;
}

.prose a:has(> .endpoint) code {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
}

.prose a:has(> .endpoint):hover code {
  text-decoration-color: currentColor;
}

.prose .endpoint code {
  border: 0;
  background: none;
  padding-inline: 2px 0;
}

.prose .endpoint-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  overflow-x: auto;
}

.endpoint-line .endpoint {
  font-size: 15px;
}

.endpoint-line .method {
  font-size: 12px;
}

.table {
  margin: 0 0 var(--space-5);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}

.prose th,
.prose td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}

.prose th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.prose table code {
  overflow-wrap: normal;
}

.prose td:first-child code {
  white-space: nowrap;
}

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

.prose tbody tr {
  transition: background-color 150ms var(--ease);
}

.prose tbody tr:hover {
  background: var(--bg-subtle);
}

.callout {
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-size: 15px;
}

.callout-warn {
  border-color: var(--warn-border);
  border-inline-start-color: var(--warn-border);
  background: var(--warn-soft);
}

.callout-warn strong:first-child {
  color: var(--warn);
}

.callout > :last-child {
  margin-bottom: 0;
}

.prose .cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
}

.prose .cards li {
  position: relative;
  margin: 0;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
  transition:
    border-color 200ms var(--ease),
    transform 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

.prose .cards strong {
  display: block;
  margin-bottom: var(--space-1);
}

.prose .cards strong a {
  color: var(--text);
  text-decoration: none;
}

.prose .cards strong a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.prose .cards li:hover,
.prose .cards li:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.prose .cards li:focus-within strong a {
  outline: none;
}

.prose .cards li:has(a:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .prose .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.code-tabs {
  margin: 0 0 var(--space-5);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--code-bg);
}

.code-tabs-bar {
  display: flex;
  gap: var(--space-1);
  padding: 0 var(--space-2);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  background: var(--code-bar);
}

.code-tabs-bar [role='tab'] {
  position: relative;
  padding: var(--space-2) var(--space-3);
  border: 0;
  background: none;
  color: var(--code-muted);
  font: 500 13px/1.6 var(--font-sans);
  cursor: pointer;
  transition: color 150ms var(--ease);
}

.code-tabs-bar [role='tab']::after {
  content: '';
  position: absolute;
  inset: auto var(--space-3) -1px;
  height: 2px;
  border-radius: 2px;
  background: #4ade80;
  transform: scaleX(0);
  transition: transform 200ms var(--ease);
}

.code-tabs-bar [role='tab']:hover,
.code-tabs-bar [role='tab'][aria-selected='true'] {
  color: #ffffff;
}

.code-tabs-bar [role='tab'][aria-selected='true']::after {
  transform: scaleX(1);
}

.code-tabs-bar [role='tab']:focus-visible {
  outline-color: #4ade80;
  outline-offset: -2px;
}

.code-block,
.code-panel {
  position: relative;
}

.code-panel:focus-visible {
  outline-color: #4ade80;
  outline-offset: -2px;
}

.code-tabs .code-panel pre {
  margin: 0;
  border: 0;
  border-radius: 0;
}

html:not(.js) .code-tabs-bar {
  display: none;
}

html:not(.js) .code-panel[hidden] {
  display: block;
}

html:not(.js) .code-panel::before {
  content: attr(data-label);
  display: block;
  padding: var(--space-2) var(--space-4) 0;
  color: var(--code-muted);
  font-size: 12px;
}

.copy-button {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  padding: 3px var(--space-2);
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: var(--radius-s);
  background: rgb(24 24 27 / 0.9);
  color: var(--code-muted);
  font: 500 12px/1.5 var(--font-sans);
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 150ms var(--ease),
    color 150ms var(--ease),
    border-color 150ms var(--ease);
}

.code-block:hover .copy-button,
.code-panel:hover .copy-button,
.copy-button:focus-visible,
.copy-button.is-done {
  opacity: 1;
}

.copy-button:hover {
  color: #ffffff;
  border-color: rgb(255 255 255 / 0.3);
}

.copy-button.is-done {
  color: #4ade80;
}

@media (hover: none) {
  .copy-button {
    opacity: 1;
  }
}

.search {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  max-width: 340px;
}

.search[hidden] {
  display: none;
}

.search-box {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 36px;
  padding-inline: var(--space-3) var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--bg-subtle);
  color: var(--text-faint);
  cursor: text;
  transition:
    border-color 150ms var(--ease),
    box-shadow 150ms var(--ease);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  color: var(--text);
  font: 14px var(--font-sans);
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-faint);
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

@media (max-width: 639px) {
  .search-box kbd,
  .brand-docs {
    display: none;
  }
}

.search-box kbd {
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: 11px/1.6 var(--font-mono);
}

.search-results {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  width: min(460px, calc(100vw - 2 * var(--space-4)));
  max-height: min(70vh, 520px);
  margin: 0;
  padding: var(--space-2);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-pop);
  list-style: none;
  animation: pop 160ms var(--ease) both;
}

.search-results li {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-s);
  cursor: pointer;
}

.search-results li[aria-selected='true'] {
  background: var(--accent-soft);
}

.search-results .result-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.search-results .result-meta {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results .result-empty {
  color: var(--text-muted);
  cursor: default;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
