/*
 * Vuto developer docs.
 *
 * Shared Vuto violet system: Host Grotesk, violet-tinted neutrals, one violet
 * accent, 1px lines and no offset shadows. The token names below are the same
 * ones src/theme.ts defines for the pages the Worker renders as strings; this
 * file has to repeat them because a static stylesheet cannot import a
 * TypeScript module. route-theme.test.ts fails if the two drift apart.
 */

@font-face {
  font-family: "Host Grotesk";
  src: url("/fonts/host-grotesk-var.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  font-family: var(--font-ui);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --paper: light-dark(#eceaf4, #121019);
  --paper-deep: var(--paper);
  --paper-sunk: var(--card);
  --card: light-dark(#fcfbfe, #1c1a24);
  --ink: light-dark(#161325, #f3f3f9);
  --ink-soft: light-dark(#4d4a5f, #bab8ca);
  --muted: var(--ink-soft);
  --subtle: var(--ink-soft);
  --line: light-dark(#d1cfdb, #33313b);
  --line-strong: light-dark(#7d7a8e, #747282);
  --rule: var(--line);
  --accent: light-dark(#6c3ccd, #ab93ff);
  --accent-strong: var(--ink);
  --accent-ink: light-dark(#fcfbfe, #0a0910);
  --accent-wash: light-dark(#e3dffc, #27223d);
  --lilac: var(--accent);
  --pink: var(--accent);
  --mint: var(--accent);
  --sun: var(--accent);
  --signal: var(--accent);
  --shadow: none;
  --shadow-color: transparent;
  --night: #0a0910;
  --warn: var(--ink-soft);
  --warn-wash: var(--card);
  --danger: light-dark(#97182f, #f7a3a5);
  --danger-bg: var(--card);
  --panel-radius: 8px;
  --control-radius: 4px;
  --frame: min(1280px, calc(100% - 64px));
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Host Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Host Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    monospace;
  --topbar-height: 60px;
  --sidebar-width: 256px;
  background: var(--paper);
  color: var(--ink);
}

.vuto-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
}

/* The robot shares the wordmark's pixel unit; the bottom margin lines its feet
   up with the wordmark baseline inside the 44px brand link. */
.vuto-robot {
  flex: none;
  width: 28px;
  height: 36px;
  margin-bottom: 8px;
  color: var(--accent);
}

.sound-toggle {
  display: grid;
  grid-auto-flow: column;
  place-items: center;
  width: auto;
  min-width: 44px;
  height: 44px;
  gap: 8px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.sound-label {
  font-size: 1.125rem;
  font-weight: 600;
  white-space: nowrap;
}

.sound-toggle:hover {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

.sound-toggle[aria-pressed="false"] {
  color: var(--muted);
}

.sound-toggle:focus-visible {
  outline: 3px solid var(--lilac);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .sound-toggle {
    transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out), color 150ms var(--ease-out);
  }
}
* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 14px);
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a,
[tabindex],
button,
input {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

a,
button {
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out), color 150ms var(--ease-out);
}

a:focus-visible,
[tabindex]:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--lilac);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ul,
table {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  margin-bottom: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

.frame {
  width: var(--frame);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 60;
  min-height: 44px;
  padding: 10px 15px;
  border-radius: var(--control-radius);
  background: var(--accent-strong);
  color: var(--accent-ink);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------------------------------------------------------------- topbar - */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-height);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  box-shadow: none;
}

.topbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 7px;
  font-size: 1.3rem;
  font-weight: 760;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  min-width: 0;
  margin-left: 8px;
}

.topbar-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-nav a:hover {
  color: var(--accent);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  margin-left: auto;
  gap: 12px;
}

.topbar-key-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: var(--accent);
  box-shadow: none;
  color: var(--accent-ink);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-key-action:hover {
  border-color: var(--line-strong);
  background: var(--accent);
  color: var(--accent-ink);
}

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

.docs-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  align-items: start;
  width: var(--frame);
  margin-inline: auto;
}

.docs-sidebar {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100dvh - var(--topbar-height));
  overflow-y: auto;
  padding: 26px 20px 40px 0;
  border-right: 1px solid var(--line);
}

.sidebar-scrim {
  display: none;
}

.nav-search {
  position: relative;
  margin-bottom: 22px;
}

.nav-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 40px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: var(--card);
  color: var(--ink);
  font-size: 1.125rem;
}

.nav-search input::placeholder {
  color: var(--subtle);
}

.nav-search kbd {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  min-width: 18px;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: var(--paper-deep);
  color: var(--subtle);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
}

.nav-group {
  margin-bottom: 22px;
}

.nav-group-label {
  margin: 0 0 8px;
  color: var(--subtle);
  font-size: 0.875rem;
  font-weight: 600;
}

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

.nav-group li {
  margin: 0;
}

.nav-group a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--control-radius);
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.3;
  text-decoration: none;
}

.nav-group a:hover {
  color: var(--ink);
  background: var(--paper-sunk);
}

.nav-group a[aria-current="true"] {
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-weight: 620;
}

.nav-empty {
  margin: 6px 10px;
  color: var(--subtle);
  font-size: 0.875rem;
}

.docs-main {
  min-width: 0;
  padding-left: clamp(28px, 4vw, 56px);
}

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

.hero {
  padding-block: clamp(44px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: clamp(40px, 6vw, 76px);
}

.hero-copy {
  max-width: 640px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-bottom: 20px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: var(--signal);
  box-shadow: none;
  color: var(--accent-ink);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
}

h1 {
  max-width: 620px;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
}

.hero h1 span,
.hero h1 strong {
  display: block;
}

.hero h1 strong {
  color: var(--accent);
  font-weight: inherit;
}

.hero-lede {
  max-width: 54ch;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding-inline: 20px;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-primary {
  border-color: var(--accent);
  background: var(--sun);
  color: var(--accent-ink);
}

.button-primary:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 86%, var(--ink));
  color: var(--accent-ink);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--card);
  color: var(--ink);
}

.button-secondary:hover {
  background: color-mix(in srgb, var(--ink) 7%, var(--card));
}

.trial-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

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

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

.key-reveal {
  max-width: 640px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--panel-radius);
  background: var(--accent-wash);
}

.key-reveal[hidden] {
  display: none;
}

.key-reveal strong,
.key-reveal span {
  display: block;
}

.key-reveal strong {
  font-size: 1rem;
}

.key-reveal span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.875rem;
}

.secret-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 13px;
}

.secret-row output {
  display: flex;
  min-width: 0;
  min-height: 48px;
  flex: 1 1 auto;
  align-items: center;
  overflow: auto;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: var(--paper-sunk);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1.125rem;
  white-space: nowrap;
}

.copy-button {
  min-width: 88px;
  min-height: 44px;
  padding-inline: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 600;
}

.copy-button:hover {
  background: color-mix(in srgb, var(--ink) 7%, var(--card));
}

/* --------------------------------------------------------- code shells - */

.code-shell {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--paper-sunk);
  box-shadow: none;
}

.code-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 8px 0 16px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.code-heading > span:first-child {
  color: var(--ink);
}

.tab-list {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
}

.tab-list [role="tab"] {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
  white-space: nowrap;
}

.tab-list [role="tab"]:hover {
  color: var(--ink);
}

.tab-list [role="tab"][aria-selected="true"] {
  border-color: var(--line-strong);
  background: var(--card);
  color: var(--accent-strong);
}

.tab-panel[hidden] {
  display: none;
}

pre {
  max-width: 100%;
  margin: 0;
  overflow: auto;
  padding: clamp(16px, 3vw, 26px);
  color: var(--ink-soft);
  font-size: 1.125rem;
  line-height: 1.55;
  tab-size: 2;
}

pre code {
  display: inline-block;
  min-width: 100%;
}

/* ---------------------------------------------------------------- guides - */

.section {
  padding-block: clamp(44px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 640px;
}

.section-heading h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}

.section-heading p {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.68;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: clamp(30px, 5vw, 48px);
}

.guide-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--accent-wash);
  color: inherit;
  box-shadow: none;
  text-decoration: none;
}

.guide-card:nth-child(even) {
  background: var(--paper-sunk);
}

.guide-card:hover {
  border-color: var(--accent);
}

.guide-icon {
  display: block;
  width: 22px;
  height: 22px;
  margin-bottom: 14px;
  color: var(--accent-strong);
}

.guide-card h3 {
  font-size: 1.02rem;
  letter-spacing: -0.015em;
}

.guide-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

/* --------------------------------------------------------- quickstart -- */

.quickstart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 36px);
  margin-top: clamp(30px, 5vw, 48px);
}

/* -------------------------------------------------------------- callout - */

.callout {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--card);
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.6;
}

.callout-label {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-strong);
  font-size: 0.875rem;
  font-weight: 600;
}

.callout code {
  color: var(--accent-strong);
  font-size: 1em;
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 8px;
}

/* -------------------------------------------------------------- reference - */

.ref-block {
  margin-top: clamp(40px, 6vw, 64px);
}

.ref-block:first-of-type {
  margin-top: clamp(30px, 5vw, 48px);
}

.ref-block h3 {
  font-size: 1.35rem;
}

.ref-endpoint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 1rem;
}

.ref-method {
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
}

.ref-endpoint code {
  color: var(--accent-strong);
}

.ref-block p.ref-lede {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

caption {
  padding: 12px 14px 0;
  color: var(--subtle);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
}

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

thead th {
  color: var(--subtle);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--paper-sunk);
}

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

td code,
th code {
  color: var(--accent-strong);
  font-size: 1em;
}

td p {
  margin: 0;
}

td p + p {
  margin-top: 6px;
}

.field-required {
  color: var(--accent-strong);
  font-size: 0.875rem;
  font-weight: 600;
}

.field-optional {
  color: var(--subtle);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------------ limits - */

.limits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 40px);
  row-gap: 0;
  margin-top: clamp(30px, 5vw, 48px);
}

.limit-card {
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.limit-card h3 {
  font-size: 0.98rem;
}

.limit-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.limit-figure {
  display: block;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 620;
}

/* ------------------------------------------------------------------ access - */

.access {
  margin-block: 0;
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.access-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: start;
  gap: clamp(48px, 8vw, 96px);
}

.access-copy {
  max-width: 600px;
}

.access-copy h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}

.access-copy p {
  max-width: 60ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.68;
}

.access-facts {
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.access-facts > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 20px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}

.access-facts dt,
.access-facts dd {
  margin: 0;
  font-size: 0.875rem;
}

.access-facts dt {
  color: var(--muted);
}

.access-facts dd {
  color: var(--ink);
  text-align: right;
}

.access-facts code {
  color: var(--accent-strong);
}

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

.site-footer {
  padding-top: 30px;
  padding-bottom: 30px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 16px;
}

.footer-inner p {
  margin: 0;
  color: var(--subtle);
  font-size: 0.875rem;
}

.footer-inner a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--accent-strong);
  font-size: 1.125rem;
  font-weight: 600;
}

/* ------------------------------------------------------------- responsive - */

@media (max-width: 1080px) {
  :root {
    --sidebar-width: 224px;
  }

  .docs-main {
    padding-left: clamp(24px, 3vw, 40px);
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 272px;
  }

  .docs-shell {
    display: block;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .topbar-nav {
    display: none;
  }

  .docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 51;
    width: var(--sidebar-width);
    height: 100dvh;
    padding: 18px 18px 32px;
    border-right: 1px solid var(--line-strong);
    background: var(--paper);
    transform: translateX(-100%);
    transition: transform 220ms var(--ease-out);
  }

  .docs-sidebar[data-open="true"] {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: block;
    background: color-mix(in oklch, var(--ink) 32%, transparent);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms var(--ease-out);
  }

  .sidebar-scrim[data-open="true"] {
    opacity: 1;
    pointer-events: auto;
  }

  .docs-main {
    padding-left: 0;
  }

  .hero-grid,
  .access-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid {
    gap: 48px;
  }

  .access-inner {
    gap: 40px;
  }
}

@media (max-width: 720px) {
  :root {
    --frame: calc(100% - 32px);
  }

  .sound-label {
    display: none;
  }

  .hero {
    padding-block: 56px;
  }

  h1 {
    font-size: clamp(2.2rem, 11vw, 3.4rem);
  }


  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 430px) {
  .topbar-inner {
    gap: 8px;
  }

  .topbar-inner > .vuto-robot {
    width: 21px;
    height: 27px;
    margin-bottom: 6px;
  }

  .topbar .brand .mark__svg {
    width: 87px;
    height: 21px;
  }

  .topbar-actions {
    gap: 8px;
    margin-left: auto;
  }

  .topbar-key-action {
    padding-inline: 10px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .access-facts > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .access-facts dd {
    text-align: left;
  }

  .code-heading {
    flex-wrap: wrap;
    height: auto;
    min-height: 50px;
    padding-block: 8px;
  }

  .secret-row {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-button {
    width: 100%;
  }

}

@media (max-width: 359px) {
  .topbar-inner > .vuto-robot {
    display: none;
  }

  .topbar-inner,
  .topbar-actions {
    gap: 6px;
  }

  .topbar-key-action {
    padding-inline: 8px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: var(--ink);
    --line-strong: var(--ink);
  }

  .sound-toggle,
  .nav-toggle,
  .nav-search input,
  .copy-button,
  .table-scroll,
  .callout {
    border-width: 2px;
  }
}

/* API copy stays scannable; the control-terminal illustration marks setup. */
.brand .mark__svg { display: block; width: 116px; height: 28px; }
.hero h1 { font-size: clamp(2.8rem, 4.8vw, 4.5rem); line-height: 1.06; }
.hero-visual { min-width: 0; }
.docs-illustration { width: min(64%, 240px); margin: 0 auto 1.5rem; }
/* The illustration keeps its drawing; grayscale keeps violet the only accent hue. */
.docs-illustration svg { display: block; width: 100%; height: auto; filter: grayscale(1); }
.kicker { padding: 0; min-height: auto; border: 0; border-radius: 0; background: none; color: var(--ink-soft); box-shadow: none; letter-spacing: 0; text-transform: none; font-size: 0.9rem; }
.kicker::before { content: none; }
.topbar-key-action { background: var(--card); color: var(--ink); box-shadow: none; }
.topbar-key-action:hover { background: color-mix(in srgb, var(--ink) 7%, var(--card)); color: var(--ink); }
.button-primary, .button-primary:hover { color: var(--accent-ink); border-color: var(--accent); box-shadow: none; }
.guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
.guide-card, .guide-card:nth-child(even) { padding: 1.25rem 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.guide-card h3 { font-size: 1.25rem; }
.guide-card p { font-size: 1rem; }
.section-heading h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
.limit-card { box-shadow: none; }
.docs-main :is(.ref-lede, .callout, td) a { display: inline-flex; align-items: center; min-height: 44px; vertical-align: middle; }
.site-footer { padding-bottom: 30px; }
@media (max-width: 720px) {
  .hero { padding-block: 36px; }
  .hero-grid { gap: 32px; }
  .docs-illustration { width: 140px; }
  .guide-grid { grid-template-columns: 1fr; }
  .limits-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.hero-actions .button-secondary { border: 0; background: none; text-decoration: underline; text-underline-offset: 0.2em; }
