/* =========================================================
   Vendor Rebate & Trade Promotion Reconciliation
   Light, elegant, professional palette.
   ========================================================= */

:root {
  /* Palette */
  --c-bg: #f7f6f1;
  --c-surface: #ffffff;
  --c-surface-2: #fbfaf5;
  --c-border: #e8e3d6;
  --c-border-strong: #d6cfb9;
  --c-ink: #1b2a2a;
  --c-ink-soft: #3b4a4a;
  --c-muted: #6b7575;
  --c-link: #1f6f5c;
  --c-link-hover: #155144;
  --c-accent-teal: #2c7a7b;
  --c-accent-gold: #b7791f;
  --c-accent-red: #9b2c2c;
  --c-accent-violet: #553c9a;
  --c-accent-blue: #2c5282;

  /* Code background — light, palette-aligned */
  --c-code-bg: #f1efe6;
  --c-code-inline-bg: #ede9dc;
  --c-code-border: #e1dcc8;
  --c-code-ink: #1b2a2a;

  /* Geometry */
  --header-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 2px rgba(20, 30, 30, 0.04), 0 2px 8px rgba(20, 30, 30, 0.04);
  --shadow-2: 0 4px 14px rgba(20, 30, 30, 0.08);

  /* Layout — wide on desktop, not constrained to a narrow column */
  --container-max: 1400px;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", "Apple Garamond",
    Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Account for the sticky header on in-page anchor jumps. */
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, li { overflow-wrap: anywhere; word-break: normal; }

img, svg { max-width: 100%; height: auto; }

a {
  color: var(--c-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
a:hover { color: var(--c-link-hover); border-bottom-color: currentColor; }
a:focus-visible {
  outline: 2px solid var(--c-accent-teal);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection { background: rgba(44, 122, 123, 0.22); }

/* ---------- Layout containers ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
}

.site-main {
  flex: 1 0 auto;
  padding-block: clamp(20px, 3vw, 40px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(247, 246, 241, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: clamp(12px, 2vw, 28px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--c-ink);
  border-bottom: none;
  letter-spacing: -0.01em;
}
.brand__mark { width: 32px; height: 32px; flex: 0 0 auto; }
.brand__text { font-size: 1rem; line-height: 1.1; }
.brand__text strong { display: block; color: var(--c-accent-teal); }
.brand__text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--c-muted);
}
.brand:hover { color: var(--c-link-hover); }

.site-nav { margin-left: auto; }
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--c-ink-soft);
  border-bottom: none;
}
.site-nav__link svg { width: 18px; height: 18px; }
.site-nav__link:hover {
  background: rgba(44, 122, 123, 0.08);
  color: var(--c-link-hover);
}
.site-nav__link[aria-current="page"],
.site-nav__link.is-active {
  background: rgba(44, 122, 123, 0.12);
  color: var(--c-accent-teal);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.9rem;
  color: var(--c-ink);
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    inset: var(--header-h) 0 auto 0;
    margin-left: 0;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-2);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 150ms ease, opacity 150ms ease;
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 12px 14px;
    gap: 2px;
  }
  .site-nav__link { padding: 12px 14px; font-size: 1rem; }
  .brand__text span { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(40px, 6vw, 80px);
  background: #1b2a2a;
  color: #d6e1de;
  padding-block: 36px 28px;
}
.site-footer a { color: #b8d8d1; border-bottom-color: transparent; }
.site-footer a:hover { color: #ffffff; border-bottom-color: currentColor; }
.site-footer__grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1.4fr repeat(3, 1fr);
}
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  margin: 0 0 10px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; font-size: 0.95rem; }
.site-footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.site-footer__brand svg { width: 38px; height: 38px; }
.site-footer__brand strong { font-size: 1.05rem; color: #ffffff; }
.site-footer__tag {
  font-size: 0.92rem;
  color: #b3bfbc;
  max-width: 40ch;
}
.site-footer__meta {
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 16px;
  font-size: 0.85rem;
  color: #8d9b99;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  color: var(--c-ink);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 700;
}
h1 { font-size: clamp(1.7rem, 2.4vw + 1.2rem, 2.85rem); margin: 0 0 0.5em; hyphens: auto; }
h2 {
  font-size: clamp(1.4rem, 0.9vw + 1.1rem, 1.75rem);
  margin: 2em 0 0.6em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--c-border);
}
h3 { font-size: clamp(1.15rem, 0.4vw + 1rem, 1.32rem); margin: 1.6em 0 0.4em; }
h4 { font-size: 1.05rem; margin: 1.4em 0 0.4em; color: var(--c-ink-soft); }

p { margin: 0 0 1.05em; }
strong { color: var(--c-ink); }
em { color: var(--c-ink-soft); }

ul, ol { padding-left: 1.4em; margin: 0 0 1.1em; }
li { margin: 0.25em 0; }
li::marker { color: var(--c-accent-teal); }

blockquote {
  margin: 1.2em 0;
  padding: 0.6em 1em;
  border-left: 4px solid var(--c-accent-teal);
  background: var(--c-surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--c-ink-soft);
}

hr {
  border: 0;
  height: 1px;
  background: var(--c-border);
  margin: 2em 0;
}

/* ---------- Page title block ---------- */
.page-title,
.doc__main > h1:first-of-type,
.doc__main > h1 {
  margin: 0 0 0.4em;
  background: linear-gradient(120deg, var(--c-accent-teal), var(--c-accent-violet) 60%, var(--c-accent-gold));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.page-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-accent-teal);
  margin: 0 0 0.6em;
}

/* ---------- Heading anchors ---------- */
.heading-anchor {
  color: inherit;
  border-bottom: none;
}
.heading-anchor:hover { color: var(--c-accent-teal); }
h2 .heading-anchor::after,
h3 .heading-anchor::after,
h4 .heading-anchor::after {
  content: " #";
  color: var(--c-border-strong);
  font-weight: 400;
  opacity: 0;
  transition: opacity 120ms ease;
}
h2:hover .heading-anchor::after,
h3:hover .heading-anchor::after,
h4:hover .heading-anchor::after { opacity: 1; }

/* ---------- Page layout ----------
   Content fills the full width of its container on every breakpoint.
   The container itself caps at --container-max so text isn't edge-to-edge
   on ultra-wide screens. */
.doc { display: block; }
.doc__main { min-width: 0; }
.doc__main > * { max-width: none; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  font-size: 0.88rem;
  color: var(--c-muted);
}
.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.breadcrumbs li + li::before {
  content: "›";
  color: var(--c-border-strong);
}
.breadcrumbs a {
  color: var(--c-ink-soft);
  border-bottom: none;
}
.breadcrumbs a:hover { color: var(--c-accent-teal); }
.breadcrumbs [aria-current="page"] {
  color: var(--c-ink);
  font-weight: 500;
}

/* ---------- Inline code ---------- */
:not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--c-code-inline-bg);
  color: var(--c-code-ink);
  padding: 0.08em 0.4em;
  border-radius: 4px;
  border: none;
  word-wrap: break-word;
}

/* ---------- Code blocks ---------- */
.code-block {
  position: relative;
  margin: 1.2em 0;
  background: var(--c-code-bg);
  border: 1px solid var(--c-code-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.code-block pre {
  margin: 0;
  padding: 14px 16px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--c-code-ink);
  background: transparent;
}
.code-block pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
  color: inherit;
}
.code-block .code-lang {
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  pointer-events: none;
  user-select: none;
}
.code-block[data-lang=""] .code-lang { display: none; }
/* When a language label is present, reserve room above the code so the
   label and the first line never collide. */
.code-block:not([data-lang=""]) pre { padding-top: 36px; }
.code-block .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  appearance: none;
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border-strong);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-family: var(--font-sans);
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease, background 120ms ease, color 120ms ease;
}
.code-block:hover .copy-btn,
.code-block:focus-within .copy-btn { opacity: 1; }
.code-block .copy-btn:hover {
  background: var(--c-accent-teal);
  color: #fff;
  border-color: var(--c-accent-teal);
}
.code-block .copy-btn.is-copied {
  background: var(--c-accent-teal);
  color: #fff;
  border-color: var(--c-accent-teal);
  opacity: 1;
}

/* ---------- Prism syntax highlighting (light, palette-aligned) ---------- */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata { color: #7a8a8a; font-style: italic; }
.token.punctuation { color: #4a5a5a; }
.token.namespace { opacity: 0.7; }
.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted { color: #9b2c2c; }
.token.boolean,
.token.number { color: #b7791f; }
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted { color: #2c7a7b; }
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable { color: #1f6f5c; }
.token.atrule,
.token.attr-value,
.token.function,
.token.class-name { color: #553c9a; }
.token.keyword { color: #2c5282; font-weight: 600; }
.token.regex,
.token.important { color: #b7791f; }
.token.important,
.token.bold { font-weight: 600; }
.token.italic { font-style: italic; }

/* ---------- Tables ---------- */
.table-wrap {
  margin: 1.4em 0;
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  box-shadow: var(--shadow-1);
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.table-wrap th,
.table-wrap td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
.table-wrap thead th {
  background: var(--c-surface-2);
  color: var(--c-ink);
  font-weight: 600;
  border-bottom: 1px solid var(--c-border-strong);
  white-space: nowrap;
}
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover td { background: rgba(44, 122, 123, 0.04); }

/* ---------- Task lists (markdown-it-task-lists) ---------- */
.task-list-item {
  list-style: none;
  margin-left: -1.4em;
  padding-left: 0;
}
.task-list-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--c-border-strong);
  border-radius: 4px;
  margin-right: 10px;
  vertical-align: -3px;
  background: var(--c-surface);
  cursor: pointer;
  position: relative;
  transition: border-color 120ms ease, background 120ms ease;
}
.task-list-item input[type="checkbox"]:hover { border-color: var(--c-accent-teal); }
.task-list-item input[type="checkbox"]:checked {
  background: var(--c-accent-teal);
  border-color: var(--c-accent-teal);
}
.task-list-item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.task-list-item.is-done { color: var(--c-muted); }
.task-list-item.is-done .task-list-item-label,
.task-list-item.is-done > label,
.task-list-item.is-done span,
.task-list-item.is-done a { text-decoration: line-through; }

/* ---------- Accordions ---------- */
.faq-accordion details,
details.accordion {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  margin: 10px 0;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.faq-accordion summary,
details.accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 44px 14px 16px;
  font-weight: 600;
  color: var(--c-ink);
  position: relative;
  background: var(--c-surface);
  transition: background 120ms ease;
}
.faq-accordion summary::-webkit-details-marker,
details.accordion summary::-webkit-details-marker { display: none; }
.faq-accordion summary::after,
details.accordion summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--c-accent-teal);
  border-bottom: 2px solid var(--c-accent-teal);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 150ms ease;
}
.faq-accordion details[open] summary::after,
details.accordion[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}
.faq-accordion summary:hover,
details.accordion summary:hover { background: var(--c-surface-2); }
.faq-accordion .faq-body,
details.accordion .acc-body {
  padding: 4px 16px 16px;
  color: var(--c-ink-soft);
  border-top: 1px solid var(--c-border);
}

/* ---------- Mermaid ---------- */
.mermaid-wrapper {
  margin: 1.4em 0;
  padding: 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow-x: auto;
  text-align: center;
}
.mermaid-wrapper svg { max-width: 100%; }

/* ---------- KaTeX touch-ups ---------- */
.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0;
}

/* =========================================================
   Homepage
   ========================================================= */
.hero {
  display: grid;
  gap: clamp(24px, 3vw, 48px);
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(28px, 4vw, 56px) 0 clamp(20px, 3vw, 36px);
}
@media (min-width: 920px) {
  .hero { grid-template-columns: 1.2fr 0.8fr; align-items: center; }
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-accent-teal);
  margin-bottom: 14px;
}
.hero__title {
  font-size: clamp(1.5rem, 5vw + 0.4rem, 3.4rem);
  margin: 0 0 0.4em;
  background: linear-gradient(120deg, var(--c-accent-teal), var(--c-accent-violet) 60%, var(--c-accent-gold));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  line-height: 1.1;
  hyphens: auto;
}
.hero__lede {
  font-size: clamp(1.05rem, 0.3vw + 1rem, 1.18rem);
  color: var(--c-ink-soft);
  max-width: 60ch;
  margin: 0 0 1em;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--c-surface);
  color: var(--c-ink);
  font-weight: 600;
  font-size: 0.96rem;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-1);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, color 120ms ease;
  border-bottom: 1px solid var(--c-border);
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--c-border-strong);
  color: var(--c-link-hover);
}
.cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(44,122,123,0.12);
  color: var(--c-accent-teal);
}
.cta__icon svg { width: 18px; height: 18px; }
.cta--architecture .cta__icon { background: rgba(44,122,123,0.14); color: var(--c-accent-teal); }
.cta--pipelines .cta__icon { background: rgba(183,121,31,0.14); color: var(--c-accent-gold); }
.cta--validation .cta__icon { background: rgba(155,44,44,0.14); color: var(--c-accent-red); }

.hero__art {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__art svg {
  width: clamp(220px, 30vw, 380px);
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(20,30,30,0.12));
}

.home-section {
  padding: clamp(28px, 4vw, 56px) 0;
}
.home-section + .home-section { border-top: 1px solid var(--c-border); }
.home-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.home-section h2 {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}
.section-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.section-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-1);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-ink);
}
.section-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: var(--c-border-strong);
  color: var(--c-ink);
}
.section-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.section-card__icon svg { width: 24px; height: 24px; }
.section-card h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--c-ink);
}
.section-card p { margin: 0; color: var(--c-ink-soft); font-size: 0.96rem; }
.section-card__cta {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-accent-teal);
}
.section-card:hover .section-card__cta { color: var(--c-link-hover); }

.subtopics {
  margin-top: 14px;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.subtopics a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--c-link);
  border-bottom: 1px solid transparent;
}
.subtopics a:hover { border-bottom-color: currentColor; }
.subtopics a::before { content: "›"; color: var(--c-border-strong); }

/* Section-colored variants */
.section-card[data-color="architecture"] .section-card__icon { background: rgba(44,122,123,0.12); color: var(--c-accent-teal); }
.section-card[data-color="pipelines"]     .section-card__icon { background: rgba(183,121,31,0.12); color: var(--c-accent-gold); }
.section-card[data-color="validation"]    .section-card__icon { background: rgba(155,44,44,0.12); color: var(--c-accent-red); }

/* ---------- Child grid (used on hub pages to surface child topics) ---------- */
.child-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 1.4em 0;
}
.child-card {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-1);
  color: var(--c-ink);
  border-bottom: 1px solid var(--c-border);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.child-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--c-border-strong);
}
.child-card h4 { margin: 0 0 4px; font-size: 1rem; color: var(--c-ink); }
.child-card span { font-size: 0.86rem; color: var(--c-muted); }

/* ---------- Related nav (siblings/parent at the bottom of articles) ---------- */
.related-nav {
  margin-top: 3em;
  padding-top: 1.4em;
  border-top: 1px solid var(--c-border);
  display: grid;
  gap: 14px;
}
.related-nav h3 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.related-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.related-nav li a {
  display: block;
  padding: 10px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  color: var(--c-ink);
  font-weight: 500;
  border-bottom: 1px solid var(--c-border);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.related-nav li a:hover {
  background: var(--c-surface-2);
  border-color: var(--c-border-strong);
  color: var(--c-link-hover);
}

/* ---------- Visually-hidden helper ---------- */
.visually-hidden {
  position: absolute !important;
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  overflow: hidden;
  white-space: nowrap;
}
