/* docs — kimo (https://getkimo.tech/docs/) */

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

@font-face {
  font-family: "Manrope";
  src: url("/assets/Manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ink: #0a0a0b;
  --ink-2: #080809;
  --ink-3: #131315;
  --paper: #eeeae1;
  --paper-2: #f5f1e7;
  --orange: #ff5a24;
  --smoke: #85827b;
  --line-d: rgba(245, 241, 231, 0.12);
  --line-l: rgba(10, 10, 11, 0.14);
  --g: clamp(20px, 3.4vw, 56px);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --word: "Manrope", "Inter", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", "Inter", monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-hover: 180ms;
  --dur-state: 400ms;
  --nav-h: 65px;
}

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

html {
  background: var(--ink);
  color: var(--paper-2);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font: 400 16px/1.6 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--ink);
  color: var(--paper-2);
  overflow-x: clip;
}

body.sheet-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
p,
ol,
ul,
dl,
dd,
pre {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

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

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

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.wrap {
  width: 100%;
  max-width: 1480px;
  margin-inline: auto;
  padding-inline: var(--g);
}

.skip {
  position: fixed;
  left: 16px;
  top: -64px;
  z-index: 200;
  background: var(--orange);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  transition: top var(--dur-hover) var(--ease);
}

.skip:focus {
  top: 12px;
  outline: 2px solid var(--paper-2);
}

/* ---------- Sticky Top Nav (identical across kimo subpages) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px var(--g);
  background: rgba(10, 10, 11, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-d);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 700 22px/1 var(--word);
  letter-spacing: -0.03em;
  color: var(--paper-2);
  white-space: nowrap;
}

.brand img {
  width: 22px;
  height: 24px;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 99px;
  color: rgba(245, 241, 231, 0.7);
  white-space: nowrap;
  transition:
    color var(--dur-hover) var(--ease),
    background var(--dur-hover) var(--ease);
}

.nav-sep { width: 1px; height: 16px; margin: 0 8px; background: rgba(245, 241, 231, 0.22); }

.nav-links a:hover,
.nav-links a.on,
.nav-links a[aria-current="page"] {
  color: var(--paper-2);
  background: rgba(245, 241, 231, 0.09);
}

.nav-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 99px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background var(--dur-hover) var(--ease),
    transform var(--dur-state) var(--ease);
}

.nav-cta:hover {
  background: var(--orange);
  transform: translateY(-1px);
}

/* ---------- Mobile Contents Bar (<760px) ---------- */
.mobile-bar {
  display: none;
  position: sticky;
  top: var(--nav-h);
  z-index: 45;
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-d);
  padding: 8px var(--g);
}

.contents-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--ink-3);
  border: 1px solid var(--line-d);
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  transition: border-color var(--dur-hover) var(--ease);
}

.contents-trigger:hover {
  border-color: rgba(245, 241, 231, 0.28);
}

.contents-trigger-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.contents-trigger-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}

.contents-trigger-bars i {
  display: block;
  height: 1.5px;
  background: var(--orange);
}

.contents-trigger-bars i:last-child {
  width: 9px;
}

.contents-trigger-current {
  color: var(--smoke);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

/* ---------- Three-Column Docs Layout ---------- */
.docs-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 72ch) 220px;
  justify-content: space-between;
  align-items: start;
  gap: clamp(28px, 4vw, 64px);
  max-width: 1440px;
  margin-inline: auto;
  padding: 48px var(--g) 112px;
}

/* ---------- Left Sidebar Nav (sticky, 240px) ---------- */
.docs-sidebar {
  position: sticky;
  top: 92px;
  width: 240px;
  max-height: calc(100vh - 112px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sheet-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-d);
}

.sheet-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--smoke);
}

.sheet-close {
  min-width: 36px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-d);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--paper-2);
  transition:
    border-color var(--dur-hover) var(--ease),
    color var(--dur-hover) var(--ease);
}

.sheet-close:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ---------- Sidebar Search ---------- */
.search-box {
  position: relative;
}

.search-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 36px 0 12px;
  border-radius: 10px;
  background: var(--ink-3);
  border: 1px solid var(--line-d);
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  transition: border-color var(--dur-hover) var(--ease);
}

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

.search-input:focus {
  outline: none;
  border-color: var(--orange);
}

.search-kbd {
  position: absolute;
  right: 8px;
  pointer-events: none;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line-d);
  background: var(--ink);
  color: var(--smoke);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.2;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: 320px;
  overflow-y: auto;
  border-radius: 12px;
  background: var(--ink-3);
  border: 1px solid rgba(245, 241, 231, 0.2);
  padding: 6px;
}

.search-dropdown[hidden] {
  display: none;
}

.search-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background var(--dur-hover) var(--ease);
}

.search-item:hover,
.search-item.is-active {
  background: rgba(245, 241, 231, 0.08);
}

.search-item-kind {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--orange);
}

.search-item-label {
  font-size: 13px;
  color: var(--paper-2);
  line-height: 1.35;
}

.search-empty {
  padding: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--smoke);
  text-transform: lowercase;
}

/* ---------- Sidebar Navigation List ---------- */
.sidebar-nav-group {
  overflow-y: auto;
  padding-right: 4px;
}

.sidebar-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--smoke);
  margin-bottom: 10px;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--line-d);
}

.sidebar-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 10px 7px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 14px;
  line-height: 1.35;
  color: var(--smoke);
  text-transform: lowercase;
  transition:
    color var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease);
}

.sidebar-link:hover {
  color: var(--paper-2);
}

.sidebar-link.is-active,
.sidebar-link[aria-current="location"] {
  color: var(--paper-2);
  border-left-color: var(--orange);
  font-weight: 500;
}

.sidebar-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--smoke);
  flex: none;
}

.sidebar-link.is-active .sidebar-num {
  color: var(--orange);
}

/* ---------- Center Content Column (max 72ch) ---------- */
.docs-content {
  width: 100%;
  max-width: 72ch;
  min-width: 0;
}

.docs-header {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line-d);
  margin-bottom: 48px;
}

.docs-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--smoke);
  margin-bottom: 14px;
}

.docs-kicker span {
  color: var(--orange);
}

.docs-title {
  font: 700 clamp(32px, 4.2vw, 48px)/1.06 var(--word);
  letter-spacing: -0.03em;
  color: var(--paper-2);
  text-transform: lowercase;
  margin-bottom: 12px;
}

.docs-subtitle {
  color: var(--smoke);
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- Doc Sections ---------- */
.doc-section {
  padding-bottom: 56px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--line-d);
}

.doc-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-h2 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 clamp(22px, 2.6vw, 28px)/1.2 var(--word);
  letter-spacing: -0.03em;
  color: var(--paper-2);
  text-transform: lowercase;
  margin-bottom: 18px;
}

.section-num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--orange);
}

.anchor-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--line-d);
  background: var(--ink-3);
  color: var(--smoke);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0;
  transition:
    opacity var(--dur-hover) var(--ease),
    color var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease);
}

.section-h2:hover .anchor-btn,
.section-h3:hover .anchor-btn,
.anchor-btn:focus-visible,
.anchor-btn.is-copied {
  opacity: 1;
}

.anchor-btn:hover,
.anchor-btn.is-copied {
  color: var(--orange);
  border-color: var(--orange);
}

.section-h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 18px/1.3 var(--word);
  letter-spacing: -0.03em;
  color: var(--paper-2);
  text-transform: lowercase;
  margin-top: 32px;
  margin-bottom: 12px;
}

.doc-section p {
  color: rgba(245, 241, 231, 0.86);
  margin-bottom: 16px;
}

.doc-section p:last-child {
  margin-bottom: 0;
}

.inline-code {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--paper-2);
  background: var(--ink-3);
  border: 1px solid var(--line-d);
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.inline-link {
  color: var(--paper-2);
  border-bottom: 1px solid var(--orange);
  transition: color var(--dur-hover) var(--ease);
}

.inline-link:hover {
  color: var(--orange);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--orange);
  padding: 6px 0;
  transition: color var(--dur-hover) var(--ease);
}

.arrow-link:hover {
  color: var(--paper-2);
}

/* ---------- 3-Cell Fact Strip (Overview) ---------- */
.fact-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-d);
  border-radius: 14px;
  background: var(--ink-3);
  overflow: hidden;
  margin: 24px 0;
}

.fact-cell {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fact-cell + .fact-cell {
  border-left: 1px solid var(--line-d);
}

.fact-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--smoke);
}

.fact-val {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--paper-2);
}

/* ---------- ARIA Tablists ---------- */
.tabs-wrap {
  margin: 22px 0;
}

.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: var(--ink-3);
  border: 1px solid var(--line-d);
  margin-bottom: 18px;
}

.tab-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--smoke);
  white-space: nowrap;
  transition:
    color var(--dur-hover) var(--ease),
    background var(--dur-state) var(--ease);
}

.tab-btn:hover {
  color: var(--paper-2);
}

.tab-btn[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper-2);
  border: 1px solid var(--line-d);
}

.tabpanel[hidden] {
  display: none;
}

.tabpanel-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.status-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--smoke);
}

.status-note strong {
  color: var(--orange);
  font-weight: 500;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  transition:
    background var(--dur-hover) var(--ease),
    transform var(--dur-state) var(--ease);
}

.download-btn:hover {
  background: var(--orange);
  transform: translateY(-1px);
}

/* ---------- Code Blocks ---------- */
.code-block {
  border-radius: 14px;
  background: var(--ink-3);
  border: 1px solid var(--line-d);
  overflow: hidden;
  margin: 16px 0;
}

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 16px;
  border-bottom: 1px solid var(--line-d);
  background: rgba(10, 10, 11, 0.35);
}

.code-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--smoke);
}

.copy-pill {
  padding: 4px 11px;
  border-radius: 99px;
  border: 1px solid rgba(245, 241, 231, 0.2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--paper-2);
  transition:
    background var(--dur-hover) var(--ease),
    color var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease);
}

.copy-pill:hover,
.copy-pill.is-copied {
  background: var(--orange);
  color: var(--ink);
  border-color: var(--orange);
}

.code-pre {
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--paper-2);
  overflow-x: auto;
  white-space: pre;
}

/* Light syntax tinting: keys in paper-2, strings in #ffb08f, comments in smoke */
.tok-key {
  color: var(--paper-2);
}

.tok-str {
  color: #ffb08f;
}

.tok-com {
  color: var(--smoke);
}

/* ---------- Callout / Editorial Note ---------- */
.doc-note {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--ink-3);
  border: 1px solid var(--line-d);
  margin: 18px 0;
  font-size: 14.5px;
  color: rgba(245, 241, 231, 0.84);
}

.doc-note-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--orange);
  margin-bottom: 4px;
}

/* ---------- Reference Tables ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--line-d);
  background: var(--ink-3);
  margin: 20px 0;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.doc-table th {
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--smoke);
  border-bottom: 1px solid var(--line-d);
  white-space: nowrap;
}

.doc-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-d);
  vertical-align: top;
  color: rgba(245, 241, 231, 0.86);
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table td.mono-cell {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--paper-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Contributing & Troubleshooting Lists ---------- */
.contrib-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.contrib-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 16px;
  border-radius: 14px;
  background: var(--ink-3);
  border: 1px solid var(--line-d);
  transition: border-color var(--dur-hover) var(--ease);
}

.contrib-card:hover {
  border-color: var(--orange);
}

.contrib-name {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.contrib-name i {
  font-style: normal;
  color: var(--orange);
}

.contrib-desc {
  font-size: 13.5px;
  color: var(--smoke);
}

/* ---------- Right Rail: 'on this page' (sticky, >=1080px) ---------- */
.docs-rail {
  position: sticky;
  top: 92px;
  width: 220px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
}

.rail-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--smoke);
  margin-bottom: 12px;
}

.rail-list {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line-d);
}

.rail-link {
  display: block;
  padding: 6px 10px 6px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 13px;
  line-height: 1.35;
  color: var(--smoke);
  text-transform: lowercase;
  transition:
    color var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease);
}

.rail-link--h3 {
  padding-left: 24px;
  font-size: 12.5px;
}

.rail-link:hover {
  color: var(--paper-2);
}

.rail-link.is-active {
  color: var(--paper-2);
  border-left: 2px solid var(--orange);
  font-weight: 500;
}

/* ---------- Mobile Sheet Backdrop ---------- */
.sheet-backdrop {
  display: none;
}

/* ---------- Footer (identical on every kimo subpage) ---------- */
.foot {
  background: var(--ink);
  padding: clamp(36px, 6vh, 64px) 0 0;
  border-top: 1px solid var(--line-d);
  overflow: hidden;
}

.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: clamp(32px, 5vh, 56px);
  border-bottom: 1px solid var(--line-d);
  color: var(--smoke);
  text-transform: uppercase;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
}

.foot-row a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: color var(--dur-hover) var(--ease);
}

.foot-row a:hover {
  color: var(--orange);
}

.foot-lock {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2.4vw;
  padding-inline: var(--g);
  margin-top: clamp(24px, 4vh, 44px);
  transform: translateY(14%);
}

.foot-lock img {
  width: 13.5vw;
  max-width: 190px;
  height: auto;
  transform: translateY(-1.4vw);
}

.foot-lock span {
  font: 700 clamp(84px, 25vw, 360px)/0.74 var(--word);
  letter-spacing: -0.07em;
  color: var(--paper-2);
}

/* ---------- Breakpoints ---------- */
/* Below 1080px: drop the right rail */
@media (max-width: 1079px) {
  .docs-shell {
    grid-template-columns: 240px minmax(0, 72ch);
    justify-content: start;
  }

  .docs-rail {
    display: none;
  }
}

/* Below 760px: hide centre nav links, sidebar becomes top 'contents' button + full-height sheet */
@media (max-width: 759px) {
  :root {
    --nav-h: 53px;
  }

  .nav {
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    padding-block: 8px;
  }

  .nav-links a {
    padding: 6px 9px;
    font-size: 12px;
  }

  .nav-cta {
    min-height: 36px;
    padding: 7px 14px;
  }

  .mobile-bar {
    display: block;
    padding: 6px var(--g);
  }

  .contents-trigger {
    min-height: 36px;
    padding: 6px 12px;
  }

  .docs-shell {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 28px;
    padding-bottom: 72px;
  }

  .sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(8, 8, 9, 0.82);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-state) var(--ease);
  }

  body.sheet-open .sheet-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    width: 100%;
    max-height: 100vh;
    height: 100dvh;
    padding: 20px var(--g);
    background: var(--ink-2);
    transform: translateY(-104%);
    transition: transform var(--dur-state) var(--ease);
  }

  body.sheet-open .docs-sidebar {
    transform: translateY(0);
  }

  .sheet-header {
    display: flex;
  }

  /* Long lines wrap on mobile */
  .code-pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .fact-strip {
    grid-template-columns: 1fr;
  }

  .fact-cell + .fact-cell {
    border-left: 0;
    border-top: 1px solid var(--line-d);
  }

  .contrib-list {
    grid-template-columns: 1fr;
  }

  .foot-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

/* nav: page links stay visible on phones and scroll sideways */
@media (max-width: 760px) {
  .nav { grid-template-columns: auto minmax(0, 1fr) auto !important; gap: 8px; }
  .nav-links { display: flex !important; justify-self: end; justify-content: flex-start; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: none; padding: 6px 9px; font-size: 12px; min-height: 0; }
}
@media (max-width: 480px) { .nav-cta { display: none !important; } }
