/* Mehen docs stylesheet. Light and dark themes with a scheme toggle.
   Faces: Inter for text, JetBrains Mono for code and eyebrows, Fraunces for
   the page title only, all self-hosted under /fonts with their licences.
   Classes only, no inline style, no url() but the fonts.

   The colour and size roles sit between the two role-token markers below. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/Inter-normal-100-900.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/fonts/JetBrainsMono-normal-100-800.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/Fraunces-normal-100-900.woff2") format("woff2");
}

/* role tokens: start */
:root {
  /* The docs follow the system's scheme; the toggle sets data-theme. */
  color-scheme: light dark;

  --cream: #f3ead8;
  --cream-deep: #e9dcc2;
  --bone: #fbf7ee;
  --apricot: #f2a65a;
  --ember: #d4502b;
  --teal: #1f6f73;
  --teal-deep: #164f54;
  --gold: #d9a741;
  --midnight: #0f1626;
  --midnight-2: #18223a;
  --lapis: #2a4b8f;
  --faience: #6ccfc6;

  --canvas: light-dark(var(--cream), var(--midnight));
  --sidebar: light-dark(var(--cream-deep), #0b111e);
  --surface: light-dark(var(--bone), var(--midnight-2));
  --raised: light-dark(#fffdf7, #1e2a45);
  --overlay: light-dark(var(--bone), #1e2a45);
  --code-bg: light-dark(var(--cream), #0c1322);
  --hover: light-dark(rgb(28 25 21 / 0.05), rgb(251 247 238 / 0.05));
  --active: light-dark(rgb(28 25 21 / 0.08), rgb(251 247 238 / 0.09));
  --line: light-dark(rgb(28 25 21 / 0.12), rgb(251 247 238 / 0.1));
  --line-strong: light-dark(rgb(28 25 21 / 0.2), rgb(251 247 238 / 0.18));
  --scrim: light-dark(rgb(28 25 21 / 0.35), rgb(4 7 14 / 0.6));
  --selection: light-dark(rgb(31 111 115 / 0.18), rgb(42 75 143 / 0.6));

  --ink: light-dark(#1c1915, var(--bone));
  --ink-muted: light-dark(#4b443b, #c9cedb);
  --ink-faint: light-dark(#665d4f, #9aa3b8);

  /* Teal (faience in the dark): links, focus, the current page, small icons. */
  --accent: light-dark(var(--teal), var(--faience));
  --accent-strong: light-dark(var(--teal-deep), #8fdcd5);
  --accent-soft: light-dark(rgb(31 111 115 / 0.12), rgb(108 207 198 / 0.14));
  --accent-faint: light-dark(rgb(31 111 115 / 0.06), rgb(108 207 198 / 0.07));
  --accent-ink: light-dark(var(--bone), var(--midnight));

  /* Ember (apricot in the dark): the primary button, the needs-you rule,
     the decision card, the count of things waiting. The fill is the design's
     pressed ember, one step under #d4502b, so bone text on it reads 4.5:1. */
  --primary: light-dark(#c4461f, var(--apricot));
  --primary-strong: light-dark(#b03d1a, #f6b878);
  --primary-soft: light-dark(rgb(212 80 43 / 0.12), rgb(242 166 90 / 0.14));
  --primary-ink: light-dark(var(--bone), var(--midnight));
  --primary-shadow: 0 6px 18px light-dark(rgb(212 80 43 / 0.22), rgb(242 166 90 / 0.18));

  --ok: light-dark(#266f44, #7fd29a);
  --ok-soft: light-dark(rgb(38 111 68 / 0.12), rgb(127 210 154 / 0.14));
  --warn: light-dark(#8a5a12, #ecc45a);
  --warn-soft: light-dark(rgb(138 90 18 / 0.12), rgb(236 196 90 / 0.12));
  --danger: light-dark(#ab2a22, #f08a6a);
  --danger-soft: light-dark(rgb(171 42 34 / 0.1), rgb(240 138 106 / 0.14));
  --danger-ink: light-dark(var(--bone), var(--midnight));

  --shadow-1: 0 1px 0 light-dark(transparent, rgb(255 255 255 / 0.04)) inset, 0 1px 2px light-dark(rgb(28 25 21 / 0.04), rgb(0 0 0 / 0.35)), 0 10px 28px -16px light-dark(rgb(90 60 20 / 0.14), transparent);
  --shadow-2: 0 1px 0 light-dark(transparent, rgb(255 255 255 / 0.04)) inset, 0 1px 2px light-dark(rgb(28 25 21 / 0.04), transparent), 0 14px 36px -14px light-dark(rgb(90 60 20 / 0.2), rgb(0 0 0 / 0.65));
  --shadow-3: 0 1px 0 light-dark(transparent, rgb(255 255 255 / 0.05)) inset, 0 2px 4px light-dark(rgb(28 25 21 / 0.04), transparent), 0 24px 64px -16px light-dark(rgb(90 60 20 / 0.28), rgb(0 0 0 / 0.75));
  --glow: 0 0 0 1px light-dark(rgb(31 111 115 / 0.3), rgb(108 207 198 / 0.35)), 0 0 26px -7px light-dark(rgb(31 111 115 / 0.45), rgb(108 207 198 / 0.5));

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --display: "Fraunces", ui-serif, Georgia, serif;
  /* Fraunces as the identity board sets it: soft, wonky, at the optical
     size of a page title. The welcome title raises the optical size. */
  --display-settings: "opsz" 48, "SOFT" 100, "WONK" 1;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;
  --header: 56px;
  --hit: 44px;

  /* The longest line of running text. */
  --measure: 64ch;
  /* A row's right-hand column never takes more of the row than this. */
  --side-max: 45%;
  /* A button's flex basis in a wrapping row of buttons. */
  --btn-min: 12rem;
  /* The phone tab bar's most tabs. */
  --tabs-max: 5;
  /* A card's inside padding; 20 px from 900 px. */
  --card-pad: 16px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-calm: cubic-bezier(0.65, 0, 0.35, 1);
  --instant: 80ms;
  --quick: 160ms;
  --base: 240ms;
  --slow: 320ms;}
/* role tokens: end */

/* The toggle's choice, set by theme.js before the first paint. */
html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--canvas);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

b,
strong {
  font-weight: 600;
}

button,
input {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: var(--selection);
}

code,
pre,
kbd {
  font-family: var(--mono);
  font-feature-settings: "zero";
  font-variant-ligatures: none;
}

code {
  background: var(--active);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

p {
  margin: 0 0 10px;
}

.muted {
  color: var(--ink-muted);
}

.small {
  font-size: 13px;
}

.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;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
}

.skip:focus {
  left: 8px;
  z-index: 30;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.i {
  width: 16px;
  height: 16px;
  flex: none;
}

.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 16px 10px 6px;
}

/* ---------------------------------------------------------------- buttons, the app's */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--instant) var(--ease-out), border-color var(--instant) var(--ease-out), color var(--instant) var(--ease-out);
}

.btn:hover {
  text-decoration: none;
}

.btn.primary {
  background: var(--primary);
  color: var(--primary-ink);
}

.btn.primary:hover {
  background: var(--primary-strong);
}

.btn.quiet {
  background: transparent;
  border-color: var(--line);
}

.btn.quiet:hover {
  background: var(--hover);
}

.btn.secondary {
  background: var(--surface);
  border-color: var(--line-strong);
}

.btn.secondary:hover {
  background: var(--raised);
}

.btn.sm {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
  gap: 6px;
}

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

.wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}

.top-in {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header);
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  color: var(--ink);
  --sun: var(--primary);
  --bg: var(--surface);
}

.lockup:hover {
  text-decoration: none;
}

.lockup .mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.wordmark {
  font-family: var(--display);
  font-variation-settings: var(--display-settings);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.wordmark-docs {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 3px;
}

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

.search input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font: 14px/1 var(--sans);
}

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

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 44px;
  z-index: 20;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--overlay);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
}

.search-results a {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 14px;
}

.search-results a:hover,
.search-results a:focus-visible {
  background: var(--hover);
  text-decoration: none;
}

.search-results strong {
  font-weight: 500;
}

.search-results span {
  color: var(--ink-muted);
  font-size: 13px;
}

.top-links,
.top-cta {
  display: none;
}

.top-links a {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 14px;
}

.top-links a:hover {
  background: var(--hover);
  color: var(--ink);
  text-decoration: none;
}

.top-links a[aria-current] {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.theme {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  cursor: pointer;
}

.theme:hover {
  background: var(--hover);
  color: var(--ink);
}

.menu {
  flex: none;
  margin-left: auto;
}

.menu summary {
  list-style: none;
  min-height: var(--hit);
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu[open] summary {
  background: var(--active);
}

/* The open menu is a sheet under the header, as wide as the window. */
.menu-panel {
  position: absolute;
  left: calc((100% - 100vw) / 2);
  right: calc((100% - 100vw) / 2);
  top: 100%;
  display: grid;
  gap: 8px;
  max-height: calc(100vh - var(--header));
  overflow-y: auto;
  padding: 12px 16px 20px;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}

.menu-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.menu-sections a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 14px;
}

.menu-sections a:hover {
  text-decoration: none;
  background: var(--hover);
}

.menu-sections a[aria-current] {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: transparent;
}

.menu-pages {
  display: grid;
  gap: 1px;
}

.menu-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}

@media (min-width: 900px) {
  .top-links,
  .top-cta {
    display: flex;
    gap: 2px;
    align-items: center;
  }

  .top-cta {
    margin-left: auto;
    gap: 8px;
  }

  .menu {
    display: none;
  }
}

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

.docs {
  display: block;
  padding: 24px 0 64px;
}

.side,
.toc {
  display: none;
}

.side a,
.toc a,
.menu-pages a,
.toc-inline nav a {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.35;
}

.side a:hover,
.toc a:hover,
.menu-pages a:hover,
.toc-inline nav a:hover {
  background: var(--hover);
  color: var(--ink);
  text-decoration: none;
}

.side a[aria-current="page"],
.menu-pages a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 500;
}

.side .eyebrow:first-child,
.toc .eyebrow:first-child {
  margin-top: 0;
}

.toc a {
  font-size: 13px;
}

@media (min-width: 900px) {
  .docs {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }

  .side {
    display: grid;
    gap: 1px;
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }
}

@media (min-width: 1360px) {
  .docs {
    grid-template-columns: 200px minmax(0, 1fr) 200px;
  }

  .toc {
    display: grid;
    gap: 1px;
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }

  .toc-inline {
    display: none;
  }
}

/* ---------------------------------------------------------------- the page */

.doc {
  min-width: 0;
  max-width: 78ch;
  font-size: 15.5px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--ink-faint);
}

.crumbs span:last-child {
  color: var(--ink-muted);
}

.doc h1 {
  font-family: var(--display);
  font-variation-settings: var(--display-settings);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 8px 0 8px;
}

.question {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 0 0 24px;
}

.doc h2 {
  font-size: 21px;
  font-weight: 600;
  margin: 40px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.doc h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 28px 0 8px;
}

.doc h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 22px 0 6px;
}

.doc h1,
.doc h2,
.doc h3,
.doc h4 {
  scroll-margin-top: 72px;
}

.doc h2 code,
.doc h3 code {
  font-size: 0.92em;
}

.doc-anchor {
  margin-left: 8px;
  color: var(--ink-faint);
  font-weight: 400;
  opacity: 0;
}

.doc h1:hover .doc-anchor,
.doc h2:hover .doc-anchor,
.doc h3:hover .doc-anchor,
.doc h4:hover .doc-anchor,
.doc-anchor:focus-visible {
  opacity: 1;
}

.doc-anchor:hover {
  text-decoration: none;
  color: var(--accent);
}

.doc p,
.doc ul,
.doc ol,
.doc blockquote,
.doc .doc-code,
.doc .doc-table {
  margin: 0 0 14px;
}

.doc ul,
.doc ol {
  padding-left: 1.4em;
}

.doc li {
  margin: 4px 0;
}

.doc li > p,
.doc li > .doc-code,
.doc li > .doc-table,
.doc li > ul,
.doc li > ol {
  margin: 6px 0;
}

.doc li::marker {
  color: var(--ink-faint);
}

.doc a:not(.doc-anchor):not(.btn) {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 0.15em;
}

.doc a:not(.doc-anchor):not(.btn):hover {
  text-decoration-color: currentColor;
}

.doc blockquote {
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--accent-faint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

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

.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

.toc-inline {
  margin: -8px 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.toc-inline summary {
  min-height: var(--hit);
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.toc-inline nav {
  display: grid;
  gap: 1px;
  padding: 0 6px 8px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Code: scrolls sideways, never wraps; the copy button sits top right and
   copies the <code> text. */
.doc-code {
  position: relative;
}

.doc-code pre {
  margin: 0;
  padding: 14px 16px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
  tab-size: 2;
  white-space: pre;
}

.doc-code pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  overflow-wrap: normal;
  white-space: pre;
}

.doc-code button[data-copy] {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--ink-muted);
  border-color: var(--line);
}

.doc-code button[data-copy]:hover {
  background: var(--hover);
  color: var(--ink);
}

@media (hover: hover) {
  .doc-code pre {
    padding-right: 96px;
  }
}

@media (max-width: 599px), (hover: none) {
  .doc-code pre {
    padding-top: 44px;
  }
}

/* Tables scroll inside their frame; a code in a cell stays whole. */
.doc-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

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

.doc-table th,
.doc-table td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
}

.doc-table th {
  border-top: 0;
  background: var(--surface);
  font-weight: 600;
  white-space: nowrap;
}

.doc-table td code {
  white-space: nowrap;
  overflow-wrap: normal;
}

.doc-table .al-c {
  text-align: center;
}

.doc-table .al-r {
  text-align: right;
}

/* /search */
.results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.results li {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.results li:hover {
  background: var(--hover);
}

.results a {
  font-size: 15.5px;
}

.results p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink-muted);
}

/* ---------------------------------------------------------------- footers */

.doc-foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 20px;
}

.prev-next a {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  font-size: 14.5px;
  min-width: 0;
}

.prev-next a:hover {
  border-color: var(--line-strong);
  text-decoration: none;
}

.prev-next a[rel="next"] {
  grid-column: 2;
  text-align: right;
}

.prev-next small {
  color: var(--ink-faint);
  font-weight: 400;
  font-size: 12.5px;
}

.doc-foot .small a {
  color: var(--ink-muted);
}

.foot {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 14px;
}

.foot nav a {
  color: var(--ink-muted);
}

/* ---------------------------------------------------------------- narrow */

@media (max-width: 420px) {
  .wrap {
    width: calc(100% - 24px);
  }

  .doc h1 {
    font-size: 28px;
  }

  .wordmark-docs {
    display: none;
  }

  .crumbs {
    font-size: 12.5px;
  }

  .prev-next {
    grid-template-columns: 1fr;
  }

  .prev-next a[rel="next"] {
    grid-column: 1;
  }
}

/* ---------------------------------------------------------------- the home page */

.home .doc {
  max-width: 100%;
}

.home-head {
  max-width: 72ch;
}

.home-head h1 {
  font-size: clamp(36px, 5vw, 48px);
  margin-bottom: 4px;
}

.home .sub {
  font-family: var(--display);
  font-variation-settings: var(--display-settings);
  font-size: 22px;
  line-height: 1.3;
  color: var(--ink-muted);
  margin: 0 0 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-1);
  min-width: 0;
}

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

.card h2,
.card h3 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.paths,
.steps {
  display: grid;
  gap: 16px;
  margin: 24px 0 8px;
}

.paths .card h2 {
  font-size: 19px;
}

@media (min-width: 700px) {
  .paths {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.steps .card h3 {
  font-size: 17px;
}

.doc ul.tiles {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

@media (min-width: 700px) {
  .doc ul.tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .doc ul.tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.doc ul.tiles li {
  margin: 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-muted);
  font-size: 14.5px;
}

.doc ul.tiles li a {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
  text-decoration: none;
}

.doc ul.tiles li a:hover {
  color: var(--accent);
}

/* A prompt to paste into an agent wraps, so the whole sentence is readable. */
.doc-code pre:has(> code[data-lang="prompt"]),
.doc-code code[data-lang="prompt"] {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
