/* Kolto Labs identity: Departure Mono headings, IBM Plex reading text,
   deep-blue instrument panels and cyan/gold controls. Fonts are served locally;
   licenses and provenance are in assets/fonts/. */
@font-face {
  font-family: 'Departure Mono'; src: url('fonts/departure-mono.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans'; src: url('fonts/ibm-plex-sans-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans'; src: url('fonts/ibm-plex-sans-semibold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono'; src: url('fonts/ibm-plex-mono.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* Dark by default, with an explicit light reading mode. */
:root {
  --font-ui: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Departure Mono', 'IBM Plex Mono', ui-monospace, monospace;
  --font-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --radius: 0px;
  --radius-panel: 0px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 0.2s;
  --open: 0.32s;
  --side-w: 288px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  color-scheme: dark;
  --canvas: #03131c;
  --surface: #072130;
  --rail: #072130;
  --sunken: #021018;
  --line: #215a73;
  --line-strong: #3d6f84;
  --ink: #eefbfd;
  --text: #cfe6ec;
  --muted: #a2bdc8;
  --faint: #86a8b5;
  --accent: #4fe3ee;
  --accent-ink: #8fd3ff;
  --accent-fg: #02262c;
  --selected: #0a3445;
  --hover: #0a2a3b;
  --glow: rgb(79 227 238 / 12%);
  --star: #86a8b5;
  --ok: #6ff5b0;
  --warn: #f5c95c;
  --action: #f5c95c;
  --action-ink: #29200a;
  --code-bg: #021018;
  --code-fg: #cfe6ec;
  --code-muted: #86a8b5;
  --code-line: #215a73;
}
:root[data-theme='light'] {
  color-scheme: light;
  --canvas: #edf5f8;
  --surface: #ffffff;
  --rail: #e0edf2;
  --sunken: #dcebf1;
  --line: #9ab7c6;
  --line-strong: #5a8195;
  --ink: #072130;
  --text: #173b4b;
  --muted: #3e6274;
  --faint: #496c7d;
  --accent: #076b7c;
  --accent-ink: #075d87;
  --accent-fg: #ffffff;
  --selected: #cce8ef;
  --hover: #d8eaf1;
  --glow: rgb(7 107 124 / 12%);
  --star: #496c7d;
  --ok: #1c704c;
  --warn: #7a4d00;
  --action: #f5c95c;
  --action-ink: #29200a;
}

/* ---------- base ---------- */
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 400 16px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection {
  background: var(--accent);
  color: var(--accent-fg);
}
a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}
img,
svg {
  max-width: 100%;
}
h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
  margin: 0;
}
code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.86em;
}
:not(pre) > code {
  padding: 0.1em 0.35em;
  border-radius: 3px;
  background: var(--sunken);
  color: var(--ink);
  overflow-wrap: anywhere;
}
kbd {
  padding: 0.05em 0.4em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--surface);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 40;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
.skip:focus {
  left: 8px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- shared bits ---------- */
.logo {
  width: 22px;
  height: 22px;
  flex: none;
  image-rendering: pixelated;
}
.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--fast) var(--ease),
    color var(--fast) var(--ease);
}
.icon-btn:hover {
  background: var(--hover);
  color: var(--ink);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
/* The theme button shows a moon in light mode and a sun in dark mode. */
.icon-btn .sun {
  display: none;
}
.icon-btn[aria-pressed='true'] .sun {
  display: block;
}
.icon-btn[aria-pressed='true'] .moon {
  display: none;
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--tone, var(--accent-ink)) 45%, transparent);
  border-radius: 3px;
  color: var(--tone, var(--accent-ink));
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  vertical-align: 2px;
  white-space: nowrap;
}
.tag[data-tone='warn'] {
  --tone: var(--warn);
}
.tag[data-tone='ok'] {
  --tone: var(--ok);
}

/* Callouts */
.note {
  margin: 20px 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  max-width: 74ch;
}
.note.warn {
  border-left-color: var(--warn);
}
.note p,
.docs-article .note p {
  margin: 0;
}
.note p + p {
  margin-top: 8px;
}
.note strong:first-child {
  color: var(--ink);
}

/* Code on a dark card in both modes (from the OOXML docs). */
pre.code {
  position: relative;
  margin: 16px 0 20px;
  padding: 16px 18px;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--code-line);
  border-radius: var(--radius-panel);
  background: var(--code-bg);
  color: var(--code-fg);
  font-size: 13.5px;
  line-height: 1.6;
  tab-size: 2;
}
pre.code code {
  font-size: inherit;
}
pre.code .c {
  color: var(--code-muted);
}
pre.code .k {
  color: #ffab5c;
}
pre.code .s {
  color: #6ff5b0;
}
pre.code[data-lang]::before {
  content: attr(data-lang);
  display: block;
  margin-bottom: 8px;
  color: var(--code-muted);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
}
pre.code .copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 9px;
  border: 1px solid var(--code-line);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-muted);
  font: 600 11px/1.5 var(--font-ui);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--fast) var(--ease), color var(--fast) var(--ease);
}
pre.code:hover .copy,
pre.code .copy:focus-visible {
  opacity: 1;
}
pre.code .copy:hover {
  color: var(--code-fg);
}
@media (hover: none) {
  pre.code .copy {
    opacity: 1;
  }
}

/* Framed tables */
.table {
  margin: 16px 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  overflow-x: auto;
}
.table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.table th,
.table td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.table th {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--rail);
  white-space: nowrap;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table td:first-child {
  color: var(--ink);
}
.table td code {
  white-space: nowrap;
}

/* ---------- ModSync project page ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.mp-top {
  position: sticky;
  top: 0;
  z-index: 20;
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.mp-top .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
}
.mark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 400 15px/1.5 var(--font-display);
  text-decoration: none;
}
.mp-top nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.mp-top nav a {
  padding: 8px 10px;
  color: var(--muted);
  font: 400 11px/1.5 var(--font-display);
  text-decoration: none;
}
.mp-top nav a:hover {
  background: var(--hover);
  color: var(--ink);
}

.mp {
  padding-top: 0;
  padding-bottom: 64px;
}

/* Title block */
.mp-head {
  position: relative;
  padding: 56px 0 44px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.mp-crumbs {
  margin: 0 0 24px;
  color: var(--accent);
  font: 400 11px/1.7 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mp-head h1 {
  margin: 0;
  color: var(--accent);
  font: 400 clamp(44px, 7vw, 77px)/1.15 var(--font-display);
  letter-spacing: -0.04em;
  text-shadow: 3px 3px 0 var(--selected);
}
.mp-tagline {
  max-width: 61ch;
  margin: 16px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.6;
}

/* Gallery and side column */
.mp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.mp-stage {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--sunken);
  aspect-ratio: 1360 / 880;
}
.mp-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mp-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.mp-thumbs a {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.mp-thumbs img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1360 / 880;
  object-fit: cover;
  object-position: top left;
  border: 1px solid var(--line);
  opacity: 0.75;
  transition: opacity var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.mp-thumbs span {
  display: block;
  margin-top: 4px;
}
.mp-thumbs a:hover img {
  opacity: 1;
}
.mp-thumbs a[aria-current='true'] {
  color: var(--ink);
}
.mp-thumbs a[aria-current='true'] img {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  opacity: 1;
}
.mp-caption {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 13px;
}

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--line-strong);
}
.mp-side {
  display: grid;
  gap: 16px;
}
.mp-get {
  padding: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--action);
  background: var(--action);
  color: var(--action-ink);
  box-shadow: inset 1px 1px 0 rgb(255 255 255 / 40%);
  font: 400 11px/1.7 var(--font-display);
  text-decoration: none;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn svg {
  width: 14px;
  height: 14px;
}
.btn.big {
  width: 100%;
  min-height: 46px;
  font-size: 11px;
}
.btn.big svg {
  width: 15px;
  height: 15px;
}
.mp-get-note {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 0;
  font-size: 14px;
}
.facts dt,
.facts dd {
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.facts dt {
  padding-right: 16px;
  color: var(--muted);
}
.facts dd {
  color: var(--ink);
  text-align: right;
}
.mp-links {
  display: grid;
  padding: 6px;
}
.mp-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}
.mp-links a::after {
  content: '\203A';
  color: var(--faint);
  font-size: 18px;
  line-height: 1;
}
.mp-links a:hover {
  background: var(--hover);
  color: var(--ink);
}

/* Section strip */
.mp-tabs {
  display: flex;
  gap: 4px;
  margin: 36px 0 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.mp-tabs a {
  flex: none;
  margin-bottom: -1px;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.mp-tabs a:first-child {
  border-bottom-color: var(--accent);
  color: var(--ink);
}
.mp-tabs a:hover {
  color: var(--ink);
}

/* Body */
.mp-body {
  max-width: 820px;
}
.mp-body section {
  padding-top: 28px;
}
.mp-body h2 {
  margin: 0 0 20px;
  color: var(--ink);
  font: 400 22px/1.5 var(--font-display);
  overflow-wrap: anywhere;
}
.mp-body h3 {
  margin: 28px 0 16px;
  color: var(--accent);
  font: 400 11px/1.8 var(--font-display);
}
.mp-body p {
  margin: 0 0 12px;
}
.mp-body ul,
.mp-body ol {
  margin: 0;
  padding-left: 20px;
}
.mp-body li {
  margin: 4px 0;
}
.mp-body li::marker {
  color: var(--accent);
}
.mp-body .small {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.mp-body .steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.mp-body .steps li {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  counter-increment: step;
}
.mp-body .steps li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font: 400 22px/1.5 var(--font-display);
}
.mp-body .steps b {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.mp-body .steps span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.mp-body .ticks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
  padding: 0;
  list-style: none;
}
.ticks li {
  position: relative;
  margin: 0;
  padding-left: 24px;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.mp-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.site-foot {
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  padding-bottom: 28px;
}
.site-foot a {
  margin-left: 16px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .mp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .mp-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mp-body .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .mp {
    padding-top: 24px;
  }
  .mp-top nav a[href='faq.html'] {
    display: none;
  }
  .mp-side,
  .mp-body .ticks,
  .mp-pair {
    grid-template-columns: minmax(0, 1fr);
  }
  .mp-pair {
    gap: 0;
  }
  .mp-thumbs {
    gap: 6px;
  }
  .site-foot a:first-child {
    margin-left: 0;
  }
}

/* ---------- documentation frame ---------- */
.docs {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
}
.docs-side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px 0;
  background: var(--rail);
  border-top: 2px solid var(--accent);
  border-right: 1px solid var(--line);
}
.docs-side-top {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-left: 6px;
}
.docs-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  color: var(--ink);
  font: 400 13px/1.5 var(--font-display);
  text-decoration: none;
  white-space: nowrap;
}
.docs-brand span {
  color: var(--muted);
  font-weight: 400;
}
.docs-menu {
  display: none;
}
.docs-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -12px;
  padding: 0 12px 20px;
  scrollbar-width: thin;
}
.docs-nav h2,
.docs-outline h2 {
  margin: 18px 0 4px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
}
.docs-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
  transition:
    background-color var(--fast) var(--ease),
    color var(--fast) var(--ease);
}
.docs-nav a:hover {
  background: var(--hover);
  color: var(--ink);
}
.docs-nav a[aria-current] {
  background: var(--selected);
  color: var(--accent-ink);
  font-weight: 600;
}
.docs-nav a[aria-current]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.docs-quick {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.docs-quick a {
  color: var(--text);
}
.docs-quick svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--muted);
}

.docs-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(200px, 14vw, 256px);
  column-gap: clamp(28px, 4vw, 72px);
  align-content: start;
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding: 44px clamp(16px, 4vw, 64px) 0;
}
.docs-article {
  min-width: 0;
  max-width: 820px;
}
.crumb {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.crumb a {
  color: var(--muted);
  text-decoration: none;
}
.crumb a:hover {
  color: var(--ink);
}
.crumb span {
  margin: 0 6px;
  color: var(--faint);
}
.docs-article h1 {
  font: 400 clamp(22px, 3vw, 33px)/1.45 var(--font-display);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.docs-article .lead {
  margin: 14px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}
.docs-article > .cta {
  margin-top: 22px;
}
.docs-article section {
  margin-top: clamp(40px, 6vw, 56px);
}
.docs-article h2 {
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: 400 22px/1.5 var(--font-display);
  overflow-wrap: anywhere;
}
.docs-article h3 {
  margin: 28px 0 8px;
  color: var(--ink);
  font: 600 18px/1.5 var(--font-ui);
}
.docs-article p,
.docs-article li {
  max-width: 72ch;
}
.docs-article p {
  margin: 0 0 14px;
}
.docs-article ul,
.docs-article ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}
.docs-article li {
  margin: 0 0 6px;
}
.docs-article li::marker {
  color: var(--accent-ink);
}
.docs-article dl {
  margin: 0 0 16px;
}
.docs-article dt {
  margin-top: 14px;
  color: var(--ink);
  font-weight: 600;
}
.docs-article dd {
  margin: 4px 0 0;
  max-width: 72ch;
}
details.faq {
  border-bottom: 1px solid var(--line);
  max-width: 76ch;
}
details.faq summary {
  padding: 16px 28px 16px 0;
  position: relative;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
details.faq summary::-webkit-details-marker {
  display: none;
}
details.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 13px;
  color: var(--accent-ink);
  font-size: 20px;
  font-weight: 400;
}
details.faq[open] summary::after {
  content: '\2212';
}
details.faq > div {
  padding: 0 0 12px;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 56px;
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--fast) var(--ease);
}
.pager a:hover {
  border-color: var(--accent);
}
.pager a small {
  color: var(--muted);
  font-weight: 400;
  font-size: 12.5px;
}
.pager .next {
  grid-column: 2;
  text-align: right;
}

.docs-outline {
  position: sticky;
  top: 44px;
  align-self: start;
  display: flex;
  flex-direction: column;
  padding-top: 34px;
}
.docs-outline h2 {
  margin: 0 0 8px;
  padding: 0 0 0 12px;
}
.docs-outline a {
  padding: 5px 0 5px 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  transition:
    color var(--fast) var(--ease),
    border-color var(--fast) var(--ease);
}
.docs-outline a:hover {
  color: var(--ink);
}
.docs-outline a[aria-current] {
  border-left-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.docs-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: clamp(48px, 7vw, 72px);
  padding: 22px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}
.docs-foot a {
  color: var(--muted);
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .docs-main {
    grid-template-columns: minmax(0, 1fr);
  }
  .docs-outline {
    display: none;
  }
}
@media (max-width: 820px) {
  /* The sidebar becomes a header; the page list opens from the menu button. */
  html:has(.docs) {
    scroll-padding-top: 76px;
  }
  .docs {
    display: block;
  }
  .docs-side {
    z-index: 10;
    height: auto;
    max-height: 100vh;
    padding: 10px 16px;
    gap: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .docs-menu {
    display: grid;
  }
  .docs-nav {
    margin: 0 -16px;
    padding: 0 16px 16px;
  }
  .docs-side:not([data-open]) .docs-nav {
    display: none;
  }
  .docs-side[data-open] .docs-nav {
    margin-top: 10px;
  }
  .docs-main {
    padding-top: 28px;
  }
}
@media (max-width: 600px) {
  .docs-article h2 {
    font-size: 21px;
  }
  .table th,
  .table td {
    padding: 10px 12px;
  }
  /* A wide three-column table reads as one card per row on a phone. */
  .table.stack thead {
    display: none;
  }
  .table.stack tr,
  .table.stack td {
    display: block;
  }
  .table.stack tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  .table.stack tr:last-child {
    border-bottom: 0;
  }
  .table.stack td {
    padding: 2px 0;
    border: 0;
  }
  .table.stack td:first-child {
    font-weight: 600;
    padding-bottom: 6px;
  }
  .table.stack td[data-label]::before {
    content: attr(data-label) ': ';
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
  }
  .pager {
    grid-template-columns: minmax(0, 1fr);
  }
  .pager .next {
    grid-column: 1;
  }
  pre.code {
    font-size: 12.5px;
    padding: 14px;
  }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  html.theme-anim :is(body, .docs-side, .panel, .table, .note, .mp-top) {
    transition:
      background-color var(--open) var(--ease),
      color var(--open) var(--ease),
      border-color var(--open) var(--ease);
  }
}

/* Screenshots inside docs pages */
.docs-article figure.shot { margin: 1.25rem 0 1.5rem; }
.docs-article figure.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-panel); }
.docs-article figure.shot figcaption { margin-top: .5rem; font-size: .875rem; color: var(--muted); }

/* Kolto Labs project identity. Decoration stays outside reading surfaces. */
.project-name {
  color: var(--muted);
  font: 400 11px/1.5 var(--font-display);
}
.mp-deck {
  margin: 20px 0 0;
  color: var(--ink);
  font: 400 clamp(22px, 3vw, 33px)/1.5 var(--font-display);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.btn.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}
.hero-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.section-label {
  margin: 0 0 20px;
  color: var(--ink);
  font: 400 22px/1.5 var(--font-display);
}
.lab-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--accent-ink);
  font: 400 11px/1.5 var(--font-display);
  text-decoration: none;
}
.foot-brand { max-width: 64ch; }
.foot-brand > a {
  margin: 0;
  color: var(--accent-ink);
  font: 400 15px/1.5 var(--font-display);
}
.foot-brand p { margin: 10px 0 0; }
.foot-legal { max-width: 64ch; }
@media (max-width: 820px) {
  .docs-side .lab-link { display: none; }
}
@media (max-width: 600px) {
  .mp-head { padding: 32px 0; }
  .mp-top .wrap { gap: 8px; }
  .mp-top nav a { padding-inline: 8px; }
  .mark { font-size: 11px; gap: 6px; }
  .project-name { display: none; }
  .section-label, .mp-body h2 { font-size: 17px; }
  .mp-top nav a[data-repo] { display: none; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* A separate palette control switches visual themes without changing light/dark. */
[data-site-style-toggle][aria-pressed='true'] {
  background: var(--selected);
  color: var(--accent-ink);
}
