/*
 * Palette and spacing scale are shared with decide-tech/index.html, which is
 * where they were first written down. Keep them in sync when that page changes.
 * Brand marks and outbound links belong to decide.co -- this documents the
 * media business, not the platform.
 */
:root {
  --teal: #4fc6d5;
  --teal-bright: #3dd8d8;
  --ice: #c8dce2;
  --coral: #ff6a59;
  --purple: #64607e;
  --purple-light: #c4b5f4;
  --bg: #0d0d0d;
  --bg-soft: #161616;
  --panel: #1e1e1e;
  --panel-2: #1a1a1a;
  --text: #ffffff;
  --text-muted: #a3adb7;
  --line: #2a2a2a;
  --line-soft: #1f1f1f;
  --focus: #78d3df;
  --ok: #8ee3b1;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
  --s-1: 0.5rem;
  --s-2: 0.75rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2rem;
  --s-6: 3rem;
  --nav-height: 64px;
  --sidebar-width: 268px;
  --toc-width: 210px;
  --content-max: 780px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* Anchored headings must clear the sticky header. */
  scroll-padding-top: calc(var(--nav-height) + var(--s-3));
}

body {
  font-family: "Hind", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .btn, .nav-wordmark { font-family: "Montserrat", sans-serif; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(120, 211, 223, 0.52);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--teal);
  color: var(--bg);
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ===== TOP NAV ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  height: var(--nav-height);
  padding: 0 var(--s-3);
  max-width: 1440px;
  margin: 0 auto;
}
.nav-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  color: var(--text);
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-wordmark:hover { text-decoration: none; }
/* "Knowledge" is a section label, not part of a domain -- the site lives at
 * knowledge.decide.co, so joining the two words with a dot would misread. */
.nav-wordmark-sub { color: var(--teal); }
.nav-mark {
  width: 19px;
  height: 22px;
  flex-shrink: 0;
  display: block;
  fill: var(--teal);
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.search-open {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 190px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel-2);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}
.search-open:hover { border-color: var(--focus); color: var(--ice); }
.search-open-text { flex: 1; text-align: left; }
.search-open kbd {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
  color: var(--text-muted);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel-2);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ice);
}

/* ===== SHELL ===== */
.docs-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--s-3);
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: var(--nav-height);
  max-height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  padding: var(--s-5) var(--s-3) var(--s-5) 0;
  border-right: 1px solid var(--line-soft);
}
.nav-group + .nav-group { margin-top: var(--s-4); }
.nav-group-title {
  margin: 0 0 0.55rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}
.nav-list a {
  display: block;
  padding: 0.34rem 0.7rem;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.94rem;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}
.nav-list a:hover {
  color: var(--text);
  background: var(--panel-2);
  text-decoration: none;
}
.nav-list a.is-current {
  color: var(--teal);
  border-left-color: var(--teal);
  background: rgba(79, 198, 213, 0.07);
  font-weight: 600;
}

.sidebar-scrim {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.6);
}

.docs-main {
  min-width: 0;
  padding: var(--s-5) 0 var(--s-6);
}
.docs-article { max-width: var(--content-max); }

.docs-toc {
  display: none;
  position: sticky;
  top: var(--nav-height);
  max-height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  padding: var(--s-5) 0 var(--s-5) var(--s-4);
}
.toc-title {
  margin: 0 0 0.6rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 0.15rem;
}
.toc-list a {
  display: block;
  padding: 0.16rem 0 0.16rem 0.75rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.toc-list a:hover { color: var(--ice); text-decoration: none; }
.toc-list a.is-active {
  color: var(--teal);
  border-left-color: var(--teal);
}
.toc-l3 a { padding-left: 1.5rem; font-size: 0.82rem; }

/* ===== ARTICLE TYPOGRAPHY ===== */
.breadcrumbs {
  margin: 0 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.breadcrumb-sep { color: var(--line); }
.breadcrumb-current { color: var(--teal); }

.docs-article h1 {
  margin: 0 0 var(--s-4);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}
.docs-article h2 {
  margin: var(--s-6) 0 var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line-soft);
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.docs-article h3 {
  margin: var(--s-5) 0 var(--s-2);
  font-size: 1.14rem;
  line-height: 1.3;
  font-weight: 700;
  color: #f4f7fa;
}
/* "Request body" / "Responses" labels. Deliberately not an <h4>: they repeat
 * under every endpoint, so as headings they would skip a level under an h2 and
 * bury the table of contents. */
.docs-article .field-label {
  margin: var(--s-4) 0 var(--s-2);
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.docs-article > h2:first-of-type { border-top: 0; padding-top: 0; margin-top: var(--s-5); }

.docs-article p { margin: 0 0 var(--s-3); color: var(--ice); }
.docs-article .lede {
  font-size: 1.1rem;
  color: var(--ice);
  max-width: 62ch;
}
.docs-article ul, .docs-article ol { margin: 0 0 var(--s-3); padding-left: 1.3rem; color: var(--ice); }
.docs-article li { margin-bottom: 0.35rem; }
.docs-article strong { color: var(--text); font-weight: 650; }
.docs-article hr { border: 0; border-top: 1px solid var(--line-soft); margin: var(--s-5) 0; }

.heading-anchor {
  margin-left: 0.5rem;
  color: var(--line);
  font-weight: 400;
  opacity: 0;
  transition: opacity 140ms ease, color 140ms ease;
}
h2:hover .heading-anchor,
h3:hover .heading-anchor,
.heading-anchor:focus-visible { opacity: 1; color: var(--teal); }
.heading-anchor:hover { text-decoration: none; }

/* ===== INLINE CODE ===== */
code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
}
.docs-article :not(pre) > code {
  padding: 0.12em 0.36em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--teal-bright);
  white-space: nowrap;
}

/* ===== CODE BLOCKS ===== */
.code-block {
  position: relative;
  margin: 0 0 var(--s-4);
}
.docs-article pre {
  margin: 0;
  padding: var(--s-3);
  overflow-x: auto;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #e6edf3;
  font-size: 0.84rem;
  line-height: 1.6;
  tab-size: 2;
}
.docs-article pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  white-space: pre;
}
.copy-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  color: var(--text-muted);
  font-family: "Montserrat", sans-serif;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transition: opacity 140ms ease, color 140ms ease, border-color 140ms ease;
}
.code-block:hover .copy-button,
.copy-button:focus-visible { opacity: 1; }
.copy-button:hover { color: var(--teal); border-color: var(--teal); }
.copy-button.is-copied { color: var(--ok); border-color: var(--ok); opacity: 1; }

.code-tabs {
  margin: 0 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.code-tab-bar {
  display: flex;
  gap: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.code-tab {
  padding: 0.5rem 0.95rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-muted);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease;
}
.code-tab:hover { color: var(--ice); }
.code-tab[aria-selected="true"] { color: var(--teal); border-bottom-color: var(--teal); }
.code-tabs .code-block { margin: 0; }
.code-tabs pre { border: 0; border-radius: 0; }

/* ===== ENDPOINT BLOCKS ===== */
.endpoint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  margin: 0 0 var(--s-3);
  padding: 0.7rem 0.85rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius-sm);
}
.method {
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.method-post { background: var(--teal); color: var(--bg); }
/* Needs `code.endpoint-url` to outrank the inline-code pill rule above, which
 * would otherwise force nowrap and overflow long breakdown paths. */
.docs-article code.endpoint-url {
  padding: 0;
  border: 0;
  background: none;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  color: var(--text);
  white-space: normal;
  word-break: break-all;
}
.endpoint-url .path-highlight { color: var(--teal-bright); }

.endpoint-card {
  margin: 0 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  overflow: hidden;
}
.endpoint-card > summary {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  padding: 0.7rem 2rem 0.7rem 0.85rem;
  cursor: pointer;
  list-style: none;
  border-left: 3px solid var(--teal);
}
.endpoint-card > summary::-webkit-details-marker { display: none; }
/* Absolutely positioned: the full-width .endpoint-summary below would otherwise
 * push a `margin-left: auto` marker onto its own flex line. */
.endpoint-card > summary::after {
  content: "+";
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  color: var(--text-muted);
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}
.endpoint-card[open] > summary::after { content: "\2212"; }
.endpoint-card[open] > summary { border-bottom: 1px solid var(--line); }
.endpoint-card > summary:hover { background: var(--panel); }
.endpoint-body { padding: var(--s-3) 0.85rem var(--s-2); }
.endpoint-body > *:last-child { margin-bottom: 0; }
.endpoint-summary {
  flex-basis: 100%;
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== TABLES ===== */
.table-scroll { overflow-x: auto; margin: 0 0 var(--s-4); }
.docs-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.docs-article th {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.docs-article td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ice);
  vertical-align: top;
}
.docs-article tbody tr:hover td { background: var(--panel-2); }
.docs-article td.col-name { white-space: nowrap; }
.docs-article td.col-type { white-space: nowrap; color: var(--purple-light); font-size: 0.84rem; }
.req-star { color: var(--coral); margin-left: 2px; font-weight: 700; }
.req-note { font-size: 0.85rem; color: var(--text-muted); }

/* ===== RESPONSE LISTS ===== */
.responses {
  list-style: none;
  margin: 0 0 var(--s-3);
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.responses li {
  display: flex;
  gap: var(--s-2);
  align-items: baseline;
  margin: 0;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.9rem;
}
.responses .status {
  flex-shrink: 0;
  min-width: 2.6rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
}
.response-ok { border-left: 3px solid var(--ok); }
.response-ok .status { color: var(--ok); }
.response-warn { border-left: 3px solid var(--purple-light); }
.response-warn .status { color: var(--purple-light); }
.response-err { border-left: 3px solid var(--coral); }
.response-err .status { color: var(--coral); }

/* ===== CALLOUTS ===== */
.callout {
  margin: 0 0 var(--s-4);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius-sm);
  background: rgba(79, 198, 213, 0.06);
}
.callout > *:last-child { margin-bottom: 0; }
.callout-title {
  margin: 0 0 0.3rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}
.callout-warn {
  border-left-color: var(--coral);
  background: rgba(255, 106, 89, 0.06);
}
.callout-warn .callout-title { color: var(--coral); }

/* ===== CARD GRID ===== */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  margin: 0 0 var(--s-4);
}
.doc-card {
  display: block;
  padding: 1.1rem 1.15rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: var(--radius-sm);
  color: inherit;
  transition: transform 160ms ease, border-color 160ms ease;
}
.doc-card:hover {
  transform: translateY(-2px);
  border-color: var(--focus);
  text-decoration: none;
}
.doc-card--coral { border-top-color: var(--coral); }
.doc-card--purple { border-top-color: var(--purple-light); }
/* Card titles are spans, not headings -- they are navigation, not sections, so
 * they stay out of the table of contents and the search index. */
.doc-card-title {
  display: block;
  margin: 0 0 0.35rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--text);
}
.doc-card:hover .doc-card-title { color: var(--teal); }
.doc-card p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ===== PAGER ===== */
.pager {
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-soft);
  max-width: var(--content-max);
}
.pager-link {
  flex: 1;
  display: grid;
  gap: 0.1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  transition: border-color 160ms ease;
}
.pager-link:hover { border-color: var(--focus); text-decoration: none; }
.pager-next { text-align: right; }
.pager-spacer { flex: 1; }
.pager-label {
  font-family: "Montserrat", sans-serif;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pager-title { color: var(--teal); font-weight: 600; }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg);
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--s-4) var(--s-3);
  color: var(--text-muted);
  font-size: 0.88rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ===== SEARCH ===== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(2rem, 10vh, 7rem) var(--s-3) var(--s-3);
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(3px);
}
.search-overlay[hidden] { display: none; }
.search-dialog {
  width: min(100%, 620px);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.search-input {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.search-input:focus { outline: none; border-bottom-color: var(--focus); }
.search-input::placeholder { color: #8d97a5; }
.search-results {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  overflow-y: auto;
}
.search-results li { margin: 0; }
.search-results a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--ice);
}
.search-results a:hover,
.search-results a.is-active {
  background: var(--panel-2);
  text-decoration: none;
}
.search-result-title {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}
.search-result-context {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.search-result-context mark {
  background: rgba(79, 198, 213, 0.24);
  color: var(--teal-bright);
  border-radius: 2px;
}
.search-empty { margin: 0; padding: var(--s-3); color: var(--text-muted); }
.search-empty[hidden] { display: none; }

/* ===== 404 ===== */
.page-error { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.error-main { text-align: center; padding: var(--s-4); }
.error-code {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--teal);
}
.error-main h1 { margin: var(--s-2) 0; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; }
.error-lede { color: var(--text-muted); margin: 0 0 var(--s-4); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.82rem 1.2rem;
  border-radius: 2px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}
.btn-primary { color: var(--teal); border-color: var(--teal); background: transparent; }
.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--teal);
  color: var(--bg);
  text-decoration: none;
}
/* Matches the arrow affordance on decide-tech's primary button. */
.btn-primary::after {
  content: "";
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-left: 0.15rem;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='square' stroke-linejoin='miter'><line x1='6' y1='18' x2='18' y2='6'/><polyline points='9,6 18,6 18,15'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='square' stroke-linejoin='miter'><line x1='6' y1='18' x2='18' y2='6'/><polyline points='9,6 18,6 18,15'/></svg>") no-repeat center / contain;
  transition: transform 160ms ease;
  flex-shrink: 0;
}
.btn-primary:hover::after { transform: translate(1px, -1px); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1023.98px) {
  .nav-toggle { display: flex; }
  .search-open { min-width: 0; }
  .search-open-text { display: none; }
  .search-open kbd { display: none; }
  .search-open::before {
    content: "Search";
    font-family: "Montserrat", sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .docs-sidebar {
    position: fixed;
    inset: var(--nav-height) auto 0 0;
    z-index: 70;
    width: min(84vw, var(--sidebar-width));
    max-height: none;
    padding: var(--s-4) var(--s-3);
    background: var(--bg-soft);
    border-right: 1px solid var(--line);
    transform: translateX(-102%);
    /* visibility, not just transform: an off-canvas drawer must also leave the
     * tab order. Delayed on close so the slide-out stays visible. */
    visibility: hidden;
    transition: transform 200ms ease, visibility 0s linear 200ms;
  }
  .docs-sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 200ms ease, visibility 0s;
  }
  .sidebar-scrim { display: block; }
  .sidebar-scrim[hidden] { display: none; }
}

@media (max-width: 639.98px) {
  .pager { flex-direction: column; }
  .pager-next { text-align: left; }
  .pager-spacer { display: none; }
}

@media (min-width: 1024px) {
  .docs-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    gap: var(--s-5);
  }
  .docs-main { padding: var(--s-5) 0 var(--s-6); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .docs-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--toc-width);
  }
  .docs-toc { display: block; }
}

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