/*
 * Moleant web design system — shared stylesheet for pages on *.moleant.com.
 *
 * Usage:  <link rel="stylesheet" href="/assets/css/moleant.css">
 *
 * Contents
 *   1. Fonts           Self-hosted Poppins (SIL OFL 1.1, see /assets/fonts/OFL.txt). No third-party requests.
 *   2. Design tokens   Brand palette, semantic colours, type, spacing, shape. Pages and components use the
 *                      semantic --color-* tokens only, so light/dark mode and dark sections work automatically.
 *   3. Themes          Light by default; dark follows prefers-color-scheme, or force it with
 *                      <html data-theme="dark|light">. Add class "on-dark" to any section with a dark
 *                      background (header, hero, footer) to re-map the tokens inside it.
 *   4. Base            Element defaults (typography, links, code, tables, focus).
 *   5. Accessibility   .visually-hidden, .skip-link.
 *   6. Layout          .container, .section, .grid, .split, .stack, .cluster.
 *   7. Components      Header, nav, buttons, hero, facts, cards, steps, checklist, callouts, code samples,
 *                      tables, method badges, endpoint URLs, FAQ, footer.
 *   8. Documentation   Classes used by the API reference pages: callouts (.note, .warning, .internal,
 *                      .deprecated), .endpoint-url, .method-*, and the page layout (.doc, .doc-header,
 *                      .doc-toc, .endpoint).
 *   9. Utilities, print, reduced motion.
 */

/* 1. Fonts ------------------------------------------------------------------------------------------ */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-latin-700.woff2") format("woff2");
}

/* 2. Design tokens ---------------------------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  /* Brand (from the Moleant and Moleant Discover logos) */
  --mo-purple: #9305b8;
  --mo-purple-600: #76049a;
  --mo-purple-300: #d59bea;
  --mo-purple-50: #f6ebfa;
  --mo-gold: #d4ac50;
  --mo-gold-300: #e6c77f;
  --mo-gold-50: #fbf5e6;
  --mo-slate: #7d8ead;
  --mo-ink: #0c111d;
  --mo-ink-800: #141b2d;
  --mo-ink-700: #1e2740;

  /* Neutrals */
  --mo-gray-50: #f7f8fb;
  --mo-gray-100: #eef1f6;
  --mo-gray-200: #e2e6ef;
  --mo-gray-300: #cbd2df;
  --mo-gray-400: #9aa3b5;
  --mo-gray-500: #6b7488;
  --mo-gray-600: #4f576a;
  --mo-gray-700: #373e4f;
  --mo-gray-900: #121725;

  /* Semantic colours: light */
  --color-bg: var(--mo-gray-50);
  --color-surface: #fff;
  --color-surface-alt: var(--mo-gray-100);
  --color-text: var(--mo-gray-900);
  --color-text-muted: var(--mo-gray-600);
  --color-heading: var(--mo-ink);
  --color-border: var(--mo-gray-200);
  --color-border-strong: var(--mo-gray-300);
  --color-link: var(--mo-purple);
  --color-link-hover: var(--mo-purple-600);
  --color-accent: var(--mo-purple);
  --color-accent-hover: var(--mo-purple-600);
  --color-accent-contrast: #fff;
  --color-accent-soft: var(--mo-purple-50);
  --color-accent-strong: var(--mo-purple);
  --color-eyebrow: var(--mo-purple);
  --color-focus: var(--mo-purple);
  --color-row-hover: var(--mo-gray-50);
  --color-inline-code-bg: var(--mo-gray-100);
  --color-code-bg: var(--mo-ink-800);
  --color-code-bar: #0f1524;
  --color-code-border: #222b41;
  --color-code-text: #e6e9f2;
  --color-code-muted: #aab3c7;
  --color-info: #1d5fa8;
  --color-info-bg: #eaf2fb;
  --color-note: #9a5b00;
  --color-note-bg: #fff6e5;
  --color-warning: #b42318;
  --color-warning-bg: #fdeceb;
  --color-success: #1f7a4d;
  --color-success-bg: #e8f5ee;
  --color-neutral: var(--mo-gray-600);
  --color-neutral-bg: var(--mo-gray-100);

  /* Typography */
  --font-sans: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: clamp(1.2rem, 1.1rem + 0.45vw, 1.4rem);
  --text-2xl: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
  --text-3xl: clamp(2.1rem, 1.55rem + 2.4vw, 3.4rem);
  --leading-tight: 1.2;
  --leading-normal: 1.65;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --section-space: clamp(3.5rem, 2rem + 5vw, 6rem);

  /* Shape and depth */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(12 17 29 / 0.06);
  --shadow: 0 1px 3px rgb(12 17 29 / 0.08), 0 8px 24px rgb(12 17 29 / 0.06);

  /* Layout */
  --container: 72rem;
  --container-narrow: 46rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --header-height: 4rem;
}

/* 3. Themes ----------------------------------------------------------------------------------------- */

/* Dark tokens, applied by the OS preference, by data-theme="dark", and inside .on-dark sections. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: var(--mo-ink);
    --color-surface: var(--mo-ink-800);
    --color-surface-alt: #111829;
    --color-text: #e6e9f2;
    --color-text-muted: #a9b1c3;
    --color-heading: #fff;
    --color-border: #26304a;
    --color-border-strong: #34405f;
    --color-link: var(--mo-purple-300);
    --color-link-hover: #ecd2f5;
    --color-accent-soft: rgb(213 155 234 / 0.12);
    --color-accent-strong: var(--mo-purple-300);
    --color-eyebrow: var(--mo-gold);
    --color-focus: var(--mo-gold);
    --color-row-hover: #182036;
    --color-inline-code-bg: #1b2336;
    --color-info: #7fb0ea;
    --color-info-bg: rgb(127 176 234 / 0.1);
    --color-note: #e6c77f;
    --color-note-bg: rgb(230 199 127 / 0.1);
    --color-warning: #f19a92;
    --color-warning-bg: rgb(241 154 146 / 0.1);
    --color-success: #7fd1a8;
    --color-success-bg: rgb(127 209 168 / 0.1);
    --color-neutral: #a9b1c3;
    --color-neutral-bg: rgb(169 177 195 / 0.1);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: var(--mo-ink);
  --color-surface: var(--mo-ink-800);
  --color-surface-alt: #111829;
  --color-text: #e6e9f2;
  --color-text-muted: #a9b1c3;
  --color-heading: #fff;
  --color-border: #26304a;
  --color-border-strong: #34405f;
  --color-link: var(--mo-purple-300);
  --color-link-hover: #ecd2f5;
  --color-accent-soft: rgb(213 155 234 / 0.12);
  --color-accent-strong: var(--mo-purple-300);
  --color-eyebrow: var(--mo-gold);
  --color-focus: var(--mo-gold);
  --color-row-hover: #182036;
  --color-inline-code-bg: #1b2336;
  --color-info: #7fb0ea;
  --color-info-bg: rgb(127 176 234 / 0.1);
  --color-note: #e6c77f;
  --color-note-bg: rgb(230 199 127 / 0.1);
  --color-warning: #f19a92;
  --color-warning-bg: rgb(241 154 146 / 0.1);
  --color-success: #7fd1a8;
  --color-success-bg: rgb(127 209 168 / 0.1);
  --color-neutral: #a9b1c3;
  --color-neutral-bg: rgb(169 177 195 / 0.1);
}

:root[data-theme="light"] {
  color-scheme: light;
}

/* A section with a dark (ink) background, in either theme. */
.on-dark {
  --color-surface: var(--mo-ink-800);
  --color-surface-alt: #111829;
  --color-text: #c3cadb;
  --color-text-muted: #9aa3b5;
  --color-heading: #fff;
  --color-border: rgb(255 255 255 / 0.12);
  --color-border-strong: rgb(255 255 255 / 0.22);
  --color-link: var(--mo-gold-300);
  --color-link-hover: #fff;
  --color-accent-soft: rgb(213 155 234 / 0.14);
  --color-accent-strong: var(--mo-purple-300);
  --color-eyebrow: var(--mo-gold);
  --color-focus: var(--mo-gold);
  --color-inline-code-bg: rgb(255 255 255 / 0.08);
  color: var(--color-text);
  background-color: var(--mo-ink);
}

/* 4. Base ------------------------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--space-4);
  color: var(--color-heading);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); font-weight: 500; }
h4 { font-size: var(--text-lg); font-weight: 500; }

p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0 0 var(--space-4);
}

p {
  text-wrap: pretty;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: var(--space-1);
}

strong,
b {
  font-weight: 700;
}

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration-thickness: 2px;
}

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

img,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  max-width: 100%;
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

:not(pre) > code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-inline-code-bg);
  overflow-wrap: anywhere;
}

pre {
  margin: 0 0 var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  background: var(--color-code-bg);
  color: var(--color-code-text);
  font-size: var(--text-sm);
  line-height: 1.6;
  tab-size: 2;
  overflow-x: auto;
}

pre code {
  font-size: inherit;
}

a > code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

hr {
  margin: var(--space-6) 0;
  border: 0;
  border-top: 1px solid var(--color-border);
}

table {
  width: 100%;
  margin: 0 0 var(--space-5);
  border-collapse: collapse;
  font-size: var(--text-sm);
}

caption {
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-muted);
  font-weight: 500;
  text-align: left;
  caption-side: top;
}

th,
td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr:hover {
  background: var(--color-row-hover);
}

::selection {
  background: var(--mo-gold-300);
  color: var(--mo-ink);
}

/* 5. Accessibility ---------------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -10rem;
  left: var(--space-4);
  z-index: 1000;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--mo-gold);
  color: var(--mo-ink);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-3);
  outline-color: #fff;
}

/* 6. Layout ----------------------------------------------------------------------------------------- */

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2 * var(--gutter), var(--container-narrow));
}

.section {
  padding-block: var(--section-space);
}

.section--surface {
  border-block: 1px solid var(--color-border);
  background: var(--color-surface);
}

.section__header {
  max-width: 46rem;
  margin-bottom: var(--space-7);
}

.section__header--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  margin-bottom: var(--space-3);
  color: var(--color-eyebrow);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

/* Responsive card grid: set --grid-min on the element to change the minimum column width. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 16rem)), 1fr));
  gap: var(--space-5);
}

/* minmax(0, 1fr) tracks keep wide content (code, tables) from stretching the grid past the screen. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7);
  align-items: start;
}

@media (min-width: 60rem) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stack > * {
  margin-block: 0;
}

.stack > * + * {
  margin-top: var(--stack-space, var(--space-4));
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

/* 7. Components ------------------------------------------------------------------------------------- */

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  background-color: rgb(12 17 29 / 0.94);
}

@supports (backdrop-filter: blur(1px)) {
  .site-header {
    background-color: rgb(12 17 29 / 0.82);
    backdrop-filter: saturate(160%) blur(12px);
  }
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  min-height: var(--header-height);
  padding-block: var(--space-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.brand img {
  width: auto;
  height: 28px;
}

.brand__product {
  padding-left: 0.75rem;
  border-left: 1px solid rgb(255 255 255 / 0.25);
  color: var(--mo-gold);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a:not(.btn) {
  display: inline-block;
  padding: 0.4rem 0;
  color: #d7dcea;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--mo-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5em;
}

@media (max-width: 47.99rem) {
  .site-header {
    position: relative;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    gap: var(--space-1) var(--space-4);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn svg {
  flex: none;
  width: 1.1em;
  height: 1.1em;
}

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

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-accent-contrast);
}

.btn--secondary {
  border-color: currentColor;
  background: transparent;
  color: var(--color-link);
}

.btn--secondary:hover {
  background: var(--color-accent-soft);
  color: var(--color-link-hover);
}

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

.btn--gold:hover {
  background: var(--mo-gold-300);
  color: var(--mo-ink);
}

.btn--outline-light {
  border-color: rgb(255 255 255 / 0.45);
  background: transparent;
  color: #fff;
}

.btn--outline-light:hover {
  border-color: #fff;
  background: rgb(255 255 255 / 0.08);
  color: #fff;
}

.btn--sm {
  min-height: 2.25rem;
  padding: 0.4rem 1rem;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 2rem + 5vw, 6rem);
}

.hero::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60rem 30rem at 90% -20%, rgb(147 5 184 / 0.38), transparent 60%),
    radial-gradient(44rem 26rem at -10% 120%, rgb(212 172 80 / 0.16), transparent 60%);
  content: "";
  pointer-events: none;
}

.hero > * {
  position: relative;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7);
  align-items: center;
}

@media (min-width: 64rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}

.hero h1 {
  margin-bottom: var(--space-5);
}

.hero .lead {
  max-width: 38rem;
  color: var(--color-text);
}

.hero__actions {
  margin-top: var(--space-6);
}

.hero__media img {
  width: 100%;
  filter: drop-shadow(0 30px 50px rgb(0 0 0 / 0.45));
}

/* Key facts: a <dl> of short label/value pairs */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1px;
  margin: var(--space-7) 0 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-border);
}

.facts > div {
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
}

.facts dt {
  margin-bottom: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  color: var(--color-heading);
  font-size: var(--text-sm);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.facts dd code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

/* Cards */
.card {
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

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

.card__icon {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--space-4);
  border-radius: 12px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.card__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.card__kicker {
  margin-bottom: var(--space-1);
  color: var(--color-eyebrow);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card h3 {
  margin-bottom: var(--space-3);
}

.card p,
.card li {
  color: var(--color-text-muted);
}

/* Numbered steps: use <ol class="steps" role="list"> */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps > li {
  margin: 0;
  padding: var(--space-6) var(--space-5) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  counter-increment: step;
}

.steps > li::before {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: var(--space-4);
  border-radius: 50%;
  background: var(--mo-gold);
  color: var(--mo-ink);
  content: counter(step);
  font-weight: 700;
}

.steps h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.steps p {
  margin: 0;
  color: var(--color-text-muted);
}

/* Checklist: use <ul class="checklist" role="list"> */
.checklist {
  display: grid;
  gap: var(--space-3);
  padding: 0;
  list-style: none;
}

.checklist > li {
  position: relative;
  margin: 0;
  padding-left: 2rem;
}

.checklist > li::before {
  position: absolute;
  top: 0.2em;
  left: 0;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--color-accent-soft);
  content: "";
}

.checklist > li::after {
  position: absolute;
  top: 0.2em;
  left: 0;
  width: 1.3rem;
  height: 1.3rem;
  background: var(--color-accent-strong);
  content: "";
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

/* Callouts: .callout plus a tone (--info default, --note, --warning, --success, --neutral) */
.callout {
  --callout-color: var(--color-info);
  --callout-bg: var(--color-info-bg);
  margin: var(--space-4) 0 var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: 1px solid color-mix(in srgb, var(--callout-color) 35%, transparent);
  border-left: 4px solid var(--callout-color);
  border-radius: var(--radius-sm);
  background: var(--callout-bg);
  color: var(--color-text);
}

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

.callout__title {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--color-heading);
  font-weight: 700;
}

.callout--note { --callout-color: var(--color-note); --callout-bg: var(--color-note-bg); }
.callout--warning { --callout-color: var(--color-warning); --callout-bg: var(--color-warning-bg); }
.callout--success { --callout-color: var(--color-success); --callout-bg: var(--color-success-bg); }
.callout--neutral { --callout-color: var(--color-neutral); --callout-bg: var(--color-neutral-bg); }

/* Code sample: <figure class="code-sample"><figcaption>…</figcaption><pre><code>…</code></pre></figure> */
.code-sample {
  margin: 0 0 var(--space-5);
  overflow: hidden;
  border: 1px solid var(--color-code-border);
  border-radius: var(--radius);
  background: var(--color-code-bg);
}

.code-sample figcaption {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--color-code-border);
  background: var(--color-code-bar);
  color: var(--color-code-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.code-sample pre {
  margin: 0;
  border-radius: 0;
}

/* Minimal static syntax colouring for hand-marked examples */
.tok-key { color: #e6c77f; }
.tok-str { color: #9fd9b4; }
.tok-num { color: #f2a97c; }
.tok-com { color: #8791a8; }
.tok-cmd { color: #d59bea; }

/* Tables: wrap in <div class="table-wrap" role="region" aria-label="…" tabindex="0"> for narrow screens */
.table-wrap {
  margin: 0 0 var(--space-5);
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

/* On narrow screens the table scrolls inside the wrapper instead of squeezing its columns. */
.table-wrap table {
  min-width: 36rem;
  margin: 0;
}

td code,
td .method {
  white-space: nowrap;
  overflow-wrap: normal;
}

.table-wrap tbody tr:last-child > * {
  border-bottom: 0;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-size: var(--text-xs);
  font-weight: 500;
}

/* FAQ: <div class="faq"><article class="faq__item"><h3>…</h3><p>…</p></article>…</div> */
.faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: var(--space-4);
}

.faq__item {
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.faq__item h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.faq__item p {
  margin: 0;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  padding-block: var(--space-8) var(--space-6);
  font-size: var(--text-sm);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: var(--space-6);
}

.site-footer__about {
  grid-column: 1 / -1;
  max-width: 30rem;
}

@media (min-width: 60rem) {
  .site-footer__grid {
    grid-template-columns: 1.6fr repeat(3, 1fr);
  }

  .site-footer__about {
    grid-column: auto;
  }
}

.site-footer__about img {
  width: auto;
  height: 26px;
  margin-bottom: var(--space-4);
}

.site-footer h2 {
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer a {
  color: var(--color-text);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.site-footer__bottom p {
  margin: 0;
}

/* 8. Documentation --------------------------------------------------------------------------------- */

.note,
.warning,
.internal {
  margin: var(--space-3) 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--color-note);
  border-radius: var(--radius-sm);
  background: var(--color-note-bg);
  font-size: 0.95em;
}

.warning {
  border-left-color: var(--color-warning);
  background: var(--color-warning-bg);
}

.internal {
  border-left-color: var(--color-neutral);
  background: var(--color-neutral-bg);
}

.deprecated {
  color: var(--color-text-muted);
  font-style: italic;
}

.endpoint-url {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  margin: var(--space-2) 0 var(--space-4);
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.method {
  display: inline-block;
  min-width: 4rem;
  padding: 0.3rem 0.5rem;
  border-radius: 5px;
  background: var(--mo-gray-600);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
  vertical-align: middle;
}

.method-get { background: #1f7a4d; }
.method-post { background: #1d5fa8; }
.method-put { background: #9a5b00; }
.method-patch { background: #7a4c9a; }
.method-delete { background: #b42318; }

/* Reference page layout: <main class="container doc"> holding a .doc-header, a .doc-toc and one <section> per
   topic. Pages with many endpoints nest <section class="endpoint"> blocks (h3) inside topic sections (h2). */
.doc {
  padding-block: var(--space-7) var(--space-8);
}

.doc-header {
  max-width: 50rem;
  margin-bottom: var(--space-6);
}

.doc-header h1 {
  margin-bottom: var(--space-3);
  font-size: var(--text-2xl);
}

.doc-header .lead {
  margin-bottom: var(--space-3);
}

.doc-toc {
  margin: 0 0 var(--space-7);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.doc-toc__title {
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-toc ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-1) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}

.doc-toc li + li {
  margin-top: 0;
}

.doc h2 {
  margin-top: var(--space-8);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-border);
  font-size: var(--text-xl);
}

.doc h3 {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
  font-weight: 700;
}

.doc h4 {
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--text-base);
  font-weight: 700;
}

.doc .endpoint {
  margin-top: var(--space-7);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}

.doc .endpoint > h3 {
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

/* 9. Utilities -------------------------------------------------------------------------------------- */

.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-6 { margin-top: var(--space-6); }

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .skip-link,
  .site-header,
  .hero__media,
  .hero::before {
    display: none !important;
  }

  body,
  .on-dark {
    --color-text: #000;
    --color-text-muted: #333;
    --color-heading: #000;
    --color-link: #000;
    --color-border: #bbb;
    background: #fff !important;
    color: #000;
  }

  .section {
    padding-block: 1.5rem;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }

  pre,
  .code-sample {
    border: 1px solid #999;
    background: #fff;
    color: #000;
    white-space: pre-wrap;
  }

  .card,
  .steps > li,
  .faq__item {
    break-inside: avoid;
    box-shadow: none;
  }
}
