@font-face {
  font-family: "Switzer";
  src: url("/documentation/assets/switzer-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("/documentation/assets/switzer-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("/documentation/assets/switzer-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
:root {
  --brand-code: #12152e;
  font-family:
    "Switzer",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--brand-ink);
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--brand-main);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--brand-main);
  outline-offset: 4px;
}
.skip {
  position: fixed;
  left: 1rem;
  top: -5rem;
  background: var(--brand-paper);
  z-index: 9;
  padding: 0.7rem;
}
.skip:focus {
  top: 1rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.layout {
  display: grid;
  margin: auto;
}
.sidebar {
  border-right: 0;
  position: sticky;
  height: calc(100vh - 80px);
  overflow: auto;
  font-size: 0.85rem;
}
.sidebar summary {
  cursor: pointer;
  padding: 0.25rem 0;
}
.sidebar a {
  display: block;
  color: var(--brand-muted);
  text-decoration: none;
}
.sidebar a[aria-current="page"] {
  color: var(--brand-main);
  background: var(--brand-soft);
  font-weight: 500;
}
.sidebar a:hover {
  background: var(--brand-bg);
}
main {
  min-width: 0;
  border-inline: 1px solid var(--brand-line);
}
.eyebrow {
  color: var(--brand-main);
  text-transform: uppercase;
  font-weight: 600;
}
h1 {
  text-wrap: balance;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0.6rem 0 1rem;
}
h2 {
  font-weight: 500;
  margin: 2.6rem 0 0.7rem;
  line-height: 1.3;
}
h3 {
  font-weight: 600;
  font-size: 1.12rem;
  margin: 1.7rem 0 0.5rem;
}
h1,
h2,
h3,
h4 {
  scroll-margin-top: 110px;
}
.lead {
  color: var(--brand-muted);
  line-height: 1.6;
}
.meta {
  font-size: 0.78rem;
  color: var(--brand-muted);
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--brand-line);
}
p,
li {
  overflow-wrap: anywhere;
}
li {
  margin: 0.45rem 0;
}
.anchor {
  font-size: 0.8em;
  text-decoration: none;
  margin-left: 0.6rem;
  opacity: 0;
}
h2:hover .anchor,
h3:hover .anchor,
.anchor:focus {
  opacity: 1;
}
.toc {
  position: sticky;
  align-self: start;
  font-size: 0.78rem;
  max-height: 80vh;
  overflow: auto;
}
.toc a {
  display: block;
  margin: 0.6rem 0;
  color: var(--brand-muted);
  text-decoration: none;
}
.note {
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  padding: 1rem 1.2rem;
  border-radius: 0.7rem;
  margin: 1.4rem 0;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
  margin: 1.5rem 0;
}
table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 0.88rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem;
  border-bottom: 1px solid var(--brand-line);
}
th {
  background: var(--brand-bg);
}
code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.85em;
  background: var(--brand-bg);
  padding: 0.15rem 0.3rem;
  border-radius: 0.2rem;
  overflow-wrap: anywhere;
}
.code {
  position: relative;
  margin: 1.2rem 0;
}
pre {
  background: var(--brand-code);
  color: var(--brand-paper);
  padding: 3rem 1.2rem 1.2rem;
  overflow: auto;
  border-radius: 0.5rem;
  line-height: 1.65;
}
pre code {
  background: none;
  color: inherit;
  padding: 0;
  white-space: pre;
  overflow-wrap: normal;
}
.copy {
  position: absolute;
  right: 0.6rem;
  top: 0.5rem;
  background: var(--brand-paper);
  color: var(--brand-ink);
  border: 0;
  border-radius: 0.2rem;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
}
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 2rem 0;
}
.card {
  position: relative;
  color: var(--brand-ink);
  display: block;
  border: 1px solid var(--brand-line);
  text-decoration: none;
}
.card:hover {
  border-color: var(--brand-main);
  background: var(--brand-bg);
}
.card strong {
  font-size: 1.1rem;
}
.card p {
  color: var(--brand-muted);
  margin: 0.4rem 0;
  font-size: 0.9rem;
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3rem;
  border-top: 1px solid var(--brand-line);
  padding-top: 1.3rem;
  font-size: 0.85rem;
}
footer {
  border-top: 1px solid var(--brand-line);
  color: var(--brand-muted);
  font-size: 0.8rem;
}
details.schema {
  border: 1px solid var(--brand-line);
  border-radius: 0.4rem;
  margin: 1rem 0;
  padding: 0.7rem;
}
details.schema summary {
  cursor: pointer;
}
details.schema pre {
  max-height: 36rem;
}
.section-links {
  columns: 2;
}
.section-links a {
  display: block;
  margin: 0.4rem 0;
}
@media (min-width: 1101px) {
  .sidebar > summary {
    display: none;
  }
}
@media (max-width: 1100px) {
  .toc {
    display: none;
  }
  main {
    padding: 2rem;
  }
  .sidebar > summary {
    display: none;
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: static;
    border-right: 0;
  }
  .sidebar > summary {
    display: list-item;
    font-size: 0.9rem;
  }
  .sidebar nav {
    max-height: 55vh;
    overflow: auto;
  }
  .sidebar:not([open]) nav {
    display: none;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 2.1rem;
  }
  .section-links {
    columns: 1;
  }
}
@media print {
  main {
    padding: 0;
  }
  pre {
    white-space: pre-wrap;
  }
  .anchor {
    display: none;
  }
  a {
    color: inherit;
  }
  .table-scroll {
    overflow: visible;
  }
}
.card-icon {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-main);
  font-size: 18px;
}
.card-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--brand-muted);
}
.card:hover .card-arrow {
  color: var(--brand-main);
}
.toc a:hover,
.toc a[aria-current="location"] {
  color: var(--brand-main);
}
.toc a[aria-current="location"] {
  border-left: 2px solid var(--brand-main);
  padding-left: 10px;
}
@media (max-width: 700px) {
  main {
    border: 0;
  }
}
/* Documentation is a section of the public site, using its shared tokens. */
:root {
  --docs-container: 1560px;
  --brand-mobile-mark: url("/documentation/assets/mark-a.svg");
  --brand-main: var(--brand-primary);
  --brand-ink: var(--text-primary);
  --brand-muted: var(--text-secondary);
  --brand-bg: var(--surface-primary);
  --brand-paper: var(--surface-card);
  --brand-line: var(--border-light);
  --brand-soft: var(--accent-soft);
  --font-sans:
    "Switzer", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  background: var(--surface-primary);
  line-height: 1.6;
}
body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
.docs-toolbar {
  display: flex;
  align-items: center;
  min-height: 88px;
  max-width: var(--docs-container);
  margin: auto;
  padding: 20px 24px;
  gap: 10px;
  font-size: 14px;
}
.docs-toolbar > a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
}
.toolbar-section {
  color: var(--text-muted);
}
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  border-radius: var(--radius-full);
  min-height: 44px;
  padding: 0 16px;
  color: var(--text-secondary);
  font-size: 14px;
}
.search-trigger[hidden] {
  display: none;
}
kbd {
  font: inherit;
  font-size: 12px;
  color: var(--text-muted);
}
.layout {
  max-width: var(--docs-container);
  padding: 0 24px;
  grid-template-columns: 220px minmax(0, 1fr) 190px;
  gap: 32px;
}
.sidebar {
  padding: 12px 0 32px;
  top: 88px;
  border: 0;
}
.sidebar details {
  margin-bottom: 24px;
}
.sidebar summary {
  color: var(--text-secondary);
  font-weight: 500;
}
.sidebar a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
main {
  border: 0;
  padding: 12px 0 80px;
}
h1 {
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 500;
}
h2 {
  font-size: 24px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.06em;
}
.lead {
  font-size: 18px;
}
.toc {
  padding: 16px 0;
  top: 88px;
}
.toc strong {
  font-weight: 500;
}
.cards {
  gap: 16px;
}
.card {
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  padding: 24px;
}
.card strong {
  font-weight: 500;
}
.note,
pre,
details.schema {
  border-radius: var(--radius-md);
}
footer {
  max-width: var(--docs-container);
  margin: auto;
  padding: 24px;
}
#search-dialog {
  box-sizing: border-box;
  width: min(620px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  color: var(--text-primary);
  box-shadow: 0 20px 60px color-mix(in srgb, var(--brand-dark) 20%, transparent);
}
#search-dialog::backdrop {
  background: color-mix(in srgb, var(--brand-dark) 32%, transparent);
  backdrop-filter: blur(4px);
}
html:has(#search-dialog[open]) {
  overflow: hidden;
}
.palette-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 12px;
}
.palette-top h2 {
  font-size: 14px;
  margin: 0;
  font-weight: 500;
}
.close-search {
  margin-left: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  min-height: 36px;
  padding: 0 12px;
  background: var(--surface-primary);
  color: var(--text-secondary);
  font-size: 12px;
}
.palette-input {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  margin: 0 20px 16px;
  padding: 0 16px;
  min-height: 48px;
}
.palette-input:focus-within {
  border-color: var(--text-muted);
}
.palette-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 16px;
  padding: 10px 0;
}
.palette-body {
  max-height: min(420px, 50dvh);
  overflow: auto;
  padding: 0 8px 12px;
}
#search-status {
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 12px;
  margin: 0;
}
#results {
  list-style: none;
  margin: 0;
  padding: 0;
}
#results li {
  margin: 0;
}
#results a {
  display: block;
  padding: 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 15px;
}
#results a:hover,
#results a:focus {
  background: var(--accent-soft);
}
#results small {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 3px;
}
.palette-foot {
  display: flex;
  gap: 20px;
  border-top: 1px solid var(--border-light);
  padding: 12px 20px;
  color: var(--text-muted);
  font-size: 12px;
}
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}
@media (max-width: 1000px) {
  .sidebar {
    top: 126px;
    height: calc(100dvh - 126px);
  }
}
@media (max-width: 700px) {
  .layout {
    display: block;
    padding: 0 16px;
  }
  .docs-toolbar {
    padding: 16px;
    min-height: 76px;
  }
  .toolbar-section {
    display: none;
  }
  .search-trigger {
    padding-inline: 12px;
    gap: 8px;
  }
  .search-trigger kbd {
    display: none;
  }
  .sidebar {
    height: auto;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--border-light);
  }
  main {
    padding: 28px 0 56px;
  }
  .palette-top {
    padding: 16px;
  }
  .palette-input {
    margin-inline: 16px;
  }
  .palette-top h2 {
    font-size: 13px;
  }
  h1,
  h2,
  h3 {
    scroll-margin-top: 140px;
  }
}
@media print {
  .site-header,
  .docs-toolbar,
  #search-dialog {
    display: none;
  }
  .layout {
    display: block;
  }
}

.copy { min-height:32px; border-radius:var(--control-radius); padding:4px 12px; }
.skip { z-index:100; }

/* Reserve the footer height so sticky navigation stays below the header at page end. */
.docs-navigation { position:sticky; align-self:start; top:88px; max-height:calc(100dvh - 188px); overflow:auto; padding-top:12px; }
.docs-navigation .search-trigger { width:100%; margin:0 0 24px; justify-content:flex-start; }
.docs-navigation .search-trigger kbd { margin-left:auto; }
.docs-navigation .sidebar { position:static; height:auto; overflow:visible; padding-top:0; }
@media(max-width:1000px) { .docs-navigation { top:126px; max-height:calc(100dvh - 226px); } }
@media(max-width:700px) { .docs-navigation { position:static; max-height:none; padding-top:0; } .docs-navigation .search-trigger { margin-bottom:16px; } }
@media print { .docs-navigation { display:none; } }

/* Wider reading workspace; the public header keeps its shared alignment. */
@media (min-width: 1280px) {
  .layout { grid-template-columns: 240px minmax(0, 1fr) 200px; gap: 48px; padding-inline: 32px; }
  .docs-toolbar, footer { padding-inline: 32px; }
  .sidebar a { font-size: 14px; }
  .toc { font-size: 14px; }
  .cards { gap: 24px; }
  .card { padding: 28px; }
}
main > p, main > ul, main > ol { max-width: 80ch; }

/* A white reading surface separates the article from the tinted navigation.
   Extend into the gutters to preserve the usable width of text and tables. */
:root {
  background: color-mix(in srgb, var(--c-tint) 65%, var(--c-white));
}
main {
  position: relative;
  isolation: isolate;
  padding-top: 28px;
}
main::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -16px;
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  pointer-events: none;
}
main > .meta {
  max-width: none;
}
@media (min-width: 1280px) {
  main::before { inset-inline: -24px; }
}
@media (max-width: 700px) {
  main { margin-top: 24px; padding-top: 24px; }
  main::before { inset-inline: -16px; border-radius: 0; border-inline: 0; }
}
@media print {
  :root { background: white; }
  main::before { display: none; }
}

/* Compact entry and independently scrolling navigation, search always visible. */
.layout { margin-top: 20px; }
.docs-navigation { display: flex; flex-direction: column; overflow: visible; padding-top: 0; }
.docs-navigation .search-trigger { flex-shrink: 0; }
.docs-navigation .sidebar { min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; padding-right: 10px; overscroll-behavior: contain; }
.toc { padding-top: 0; scrollbar-gutter: stable; padding-right: 10px; }
/* CRM command palette: integrated input, glass panel and compact key hints. */
#search-dialog {
  margin: min(96px, 10dvh) auto auto;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.82));
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.7);
}
#search-dialog[open] { display: flex; }
.palette-input {
  margin: 0;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0;
  flex-shrink: 0;
}
.palette-input:focus-within { border-color: var(--border-strong); }
.palette-input input { padding: 0; flex: 1; }
.close-search { border: 0; background: transparent; padding: 0 4px; border-radius: 4px; min-height: 24px; }
.palette-body { padding: 6px 0; min-height: 0; scrollbar-gutter: stable; }
#search-status { padding: 12px 18px; }
#results a { padding: 12px 18px; border-radius: 0; }
.palette-foot { flex-shrink: 0; justify-content: flex-end; padding: 8px 18px; gap: 18px; font-size: 11px; }
.palette-foot kbd, .close-search kbd { font-family: ui-monospace, monospace; font-size: 11px; padding: 1px 5px; border-radius: 3px; background: rgba(255,255,255,.6); }
@media (prefers-reduced-transparency: reduce) {
  #search-dialog { background: var(--surface-card); backdrop-filter: none; -webkit-backdrop-filter: none; }
  #search-dialog::backdrop { backdrop-filter: none; }
}
@media (max-width: 700px) {
  .layout { margin-top: 16px; }
  .docs-navigation .sidebar { overflow: visible; padding-right: 0; scrollbar-gutter: auto; }
  .sidebar nav { scrollbar-gutter: stable; padding-right: 10px; }
  .palette-input { margin: 0; padding: 14px; gap: 8px; }
  .palette-input input { font-size: 16px; }
}

/* Enough trailing white space for the last section to reach the reading line. */
main { padding-bottom: calc(80px + var(--reading-tail, 0px)); }
@media (max-width: 700px) {
  main { padding-bottom: calc(56px + var(--reading-tail, 0px)); }
}
@media print { main { padding-bottom: 0; } }
