/* Bootstrap CSS variable overrides matching the claude.ai/design palette.
   Shared by homepage, per-view pages, preview pages, and text pages. */
:root, [data-bs-theme="light"] {
  --bs-body-bg: #f7f4ee;
  --bs-body-color: #1a1814;
  --bs-body-color-rgb: 26, 24, 20;
  --bs-body-font-family: "IBM Plex Sans", system-ui, sans-serif;
  --bs-body-font-size: 0.9375rem;
  --bs-body-line-height: 1.5;
  --bs-border-color: #e7e1d3;
  --bs-border-color-translucent: #e7e1d3;
  --bs-secondary-color: #4a4640;
  --bs-secondary-color-rgb: 74, 70, 64;
  --bs-tertiary-color: #7a746a;
  --bs-tertiary-color-rgb: 122, 116, 106;
  --bs-tertiary-bg: #efeadc;
  --bs-link-color: #1a1814;
  --bs-link-color-rgb: 26, 24, 20;
  --bs-link-hover-color: #c2570c;
  --bs-link-hover-color-rgb: 194, 87, 12;
  --bs-code-color: #1a1814;
  --bs-font-monospace: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --bs-emphasis-color-rgb: 26, 24, 20;
  --bs-primary: #c2570c;
  --bs-primary-rgb: 194, 87, 12;
  --bs-primary-text-emphasis: #c2570c;
  --bs-primary-bg-subtle: rgba(194, 87, 12, 0.10);
  --bs-primary-border-subtle: rgba(194, 87, 12, 0.35);
  --bs-warning: #c2570c;
  --bs-warning-rgb: 194, 87, 12;
  --bs-warning-bg-subtle: rgba(194, 87, 12, 0.10);
  --bs-warning-border-subtle: rgba(194, 87, 12, 0.35);
  --bs-warning-text-emphasis: #c2570c;
  --bs-card-bg: #fbf9f3;
  --bs-card-cap-bg: var(--bs-tertiary-bg);
  --bs-card-border-color: var(--bs-border-color);
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

a {
  text-decoration-color: rgba(194, 87, 12, 0.35);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--bs-link-hover-color); }

/* Brand mark */
.brand { font-family: var(--bs-font-monospace); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; color: var(--bs-body-color); display: inline-flex; align-items: baseline; gap: 6px; }
.brand-dot { color: var(--bs-primary); transform: translateY(2px); }
.site-header { background: var(--bs-body-bg); }

/* Big section heads (homepage view sections, 404 sections, preview page).
   Two-part: small mono §N numeral + a larger lowercase semibold axis name. */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bs-border-color);
  font-family: var(--bs-font-monospace);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-tertiary-color);
}
.section-head .num { color: var(--bs-primary); }
.section-head .axis {
  font-family: var(--bs-body-font-family);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--bs-body-color);
}
.section-head .count {
  margin-left: auto;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
}

/* Small subheads inside metadata cards (no §N, no large axis). */
.section-title {
  font-family: var(--bs-font-monospace);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-tertiary-color);
  margin: 1rem 0 0.5rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--bs-border-color);
}
.section-title:first-of-type { margin-top: 0; }

/* Catalog table */
table.fixtures {
  font-size: 0.875rem;
  width: 100%;
}
table.fixtures thead th {
  font-family: var(--bs-font-monospace);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bs-tertiary-color);
  border-bottom: 1px solid var(--bs-border-color);
  padding: 8px 10px;
  text-align: left;
}
table.fixtures tbody td {
  padding: 10px 10px;
  vertical-align: top;
  border-bottom: 1px solid var(--bs-border-color);
}
table.fixtures tbody tr[data-row-href],
table.fixtures tbody tr[data-row-href] td { cursor: pointer; }
table.fixtures tbody tr[data-row-href]:hover td { background-color: rgba(194, 87, 12, 0.10); }
table.fixtures tbody tr[data-row-href]:hover td:first-child { box-shadow: inset 4px 0 0 var(--bs-primary); }
table.fixtures tbody tr[data-row-href]:hover .id a { color: var(--bs-primary); }
table.fixtures .id { font-family: var(--bs-font-monospace); }
table.fixtures .url { font-family: var(--bs-font-monospace); font-size: 0.78rem; color: var(--bs-tertiary-color); }

/* Facet badges */
.badge.tag {
  font-weight: 500;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 999px;
}

/* Tabbed quick-start card (replaces the earlier three-card row) */
.quickstart-card {
  --bs-nav-tabs-border-color: var(--bs-border-color);
  --bs-nav-tabs-link-active-bg: var(--bs-card-bg);
  --bs-nav-tabs-link-active-color: var(--bs-body-color);
  --bs-nav-tabs-link-active-border-color: var(--bs-border-color) var(--bs-border-color) var(--bs-card-bg);
  --bs-nav-tabs-link-hover-border-color: transparent;
  --bs-nav-link-color: var(--bs-tertiary-color);
  --bs-nav-link-hover-color: var(--bs-link-hover-color);
  --bs-nav-link-padding-y: 0.5rem;
  --bs-nav-link-padding-x: 0.9rem;
  --bs-nav-link-font-size: 0.78rem;
}
.quickstart-card .nav-link {
  font-family: var(--bs-font-monospace);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 0;
  border-bottom-width: 1px;
  position: relative;
}
.quickstart-card .nav-link .lang {
  color: var(--bs-tertiary-color);
  font-weight: 400;
  margin-left: 0.4rem;
  font-size: 0.86em;
  text-transform: none;
  letter-spacing: 0;
}
.quickstart-card .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.6rem; right: 0.6rem;
  bottom: -1px;
  height: 2px;
  background: var(--bs-link-hover-color);
}
.quickstart-card pre {
  margin: 0;
  font-family: var(--bs-font-monospace);
  font-size: 0.81rem;
  line-height: 1.6;
  color: var(--bs-body-color);
  white-space: pre;
  overflow-x: auto;
}
/* Syntax tokens for the snippets */
.tok-c { color: var(--bs-tertiary-color); }
.tok-k { color: var(--bs-link-hover-color); }
.tok-s { color: #5a6a3a; }
.tok-u { color: var(--bs-body-color); text-decoration: underline; text-decoration-color: rgba(194, 87, 12, 0.35); text-underline-offset: 2px; }

/* Copy-to-clipboard buttons (every fixture row + the preview page) */
.btn-copy {
  font-family: var(--bs-font-monospace);
  font-size: 0.7rem;
  padding: 1px 8px;
  line-height: 1.4;
}
.btn-copy.btn-copied {
  background-color: rgba(194, 87, 12, 0.10);
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

/* Container width matches design */
.container.pb-wide { max-width: 1180px; }

/* Sticky in-page nav for the catalog sections.
   Explicit opaque background so it never shows table content underneath
   when scrolling - sets both shorthand and color, plus a hex fallback in
   case the CSS variable is scoped unexpectedly inside the stacking context.
   Lets Bootstrap's default .sticky-top z-index (1020) apply. */
.catalog-anchors {
  background-color: #f7f4ee;
  background-color: var(--bs-body-bg);
  box-shadow: 0 4px 8px -8px rgba(26, 24, 20, 0.18);
}

/* Text-page (about/license) typography */
.text-page { max-width: 70ch; font-size: 1rem; line-height: 1.6; }
.text-page h2 {
  font-family: var(--bs-font-monospace);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-tertiary-color);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.text-page code { background: var(--bs-tertiary-bg); padding: 1px 4px; border-radius: 3px; }
.text-page pre { background: var(--bs-tertiary-bg); padding: 1rem; border-radius: 4px; }

/* Preview-page metadata panel */
.preview-meta dl { margin-bottom: 0; }
.preview-meta dt { font-family: var(--bs-font-monospace); font-size: 0.78rem; color: var(--bs-tertiary-color); }
.preview-meta dd { font-size: 0.85rem; word-break: break-all; }
.preview-embed { aspect-ratio: 8.5 / 11; width: 100%; min-height: 600px; }

/* Download CTA - bigger than default btn-primary */
.btn.btn-download {
  --bs-btn-padding-y: 0.6rem;
  --bs-btn-padding-x: 1.1rem;
  --bs-btn-font-size: 0.95rem;
  --bs-btn-font-family: var(--bs-font-monospace);
  --bs-btn-font-weight: 500;
}

/* curl command shown in the download row + on the homepage tabs */
.curl-cmd {
  font-family: var(--bs-font-monospace);
  font-size: 0.78rem;
  white-space: pre;
  overflow-x: auto;
}
.curl-cmd .flag { color: var(--bs-tertiary-color); }

/* Per-facet sub-heads under Related PDFs */
.related-group-head {
  font-family: var(--bs-font-monospace);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-tertiary-color);
  margin: 1.5rem 0 0.75rem;
}
.related-group-head .meta {
  margin-left: 0.4rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bs-tertiary-color);
}
/* Section-head right-aligned meta hint (used in §A, §D etc. on preview) */
.section-head .count { color: var(--bs-tertiary-color); font-weight: 400; }

/* 404 page typography */
.code-404 {
  font-family: var(--bs-font-monospace);
  font-size: 5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--bs-primary);
}
.attempted-id {
  font-family: var(--bs-font-monospace);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
  word-break: break-all;
}
/* Section heads in non-table contexts (404 page, etc.) */
.section-head {
  font-family: var(--bs-font-monospace);
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 0.6em;
}
.section-head .axis { color: var(--bs-body-color); font-weight: 600; }
