/* ========================================================================
   Fleet Compliance — Meadow Green palette
   Light, professional, lime → deep teal.
   ======================================================================== */

:root {
  /* Meadow Green palette */
  --lime-50:   #f3fbed;
  --lime-100:  #e1f5cd;
  --lime-200:  #c4e89a;
  --lime-300:  #9fd55f;
  --lime-400:  #7cbf36;
  --lime-500:  #5fa523;
  --lime-600:  #468417;
  --green-500: #2f8f4a;
  --green-600: #1f7a3a;
  --green-700: #155c2d;
  --teal-400:  #2bb39a;
  --teal-500:  #128a78;
  --teal-600:  #0d6a5c;
  --teal-700:  #094d44;
  --teal-800:  #073a34;

  /* Neutrals */
  --ink-900: #0b1f1a;
  --ink-800: #14342d;
  --ink-700: #25453d;
  --ink-600: #3a5b53;
  --ink-500: #5c7a72;
  --ink-400: #8aa49d;
  --ink-300: #b9cfc9;
  --ink-200: #dbe8e3;
  --ink-100: #ecf3f0;
  --ink-50:  #f5faf7;
  --white:   #ffffff;

  /* Semantic */
  --bg:           var(--ink-50);
  --bg-elev:      var(--white);
  --bg-soft:      var(--ink-100);
  --fg:           var(--ink-800);
  --fg-muted:     var(--ink-500);
  --fg-strong:    var(--ink-900);
  --border:       var(--ink-200);
  --border-strong:var(--ink-300);
  --link:         var(--teal-600);
  --link-hover:   var(--lime-600);
  --accent:       var(--lime-500);
  --accent-soft:  var(--lime-100);

  /* Inline-code chip */
  --code-bg:      #ecf6e8;
  --code-fg:      #2c5b1a;

  /* Code block (light theme) */
  --cb-bg:        #f6fbf2;
  --cb-fg:        #1f3a26;
  --cb-border:    #d8e8cf;
  --cb-toolbar:   #e8f3df;
  --cb-comment:   #6b8c63;
  --cb-string:    #2f7c3a;
  --cb-number:    #1a6f74;
  --cb-keyword:   #1f5d8c;   /* navy-leaning blue for keywords */
  --cb-builtin:   #8a4a1f;
  --cb-function:  #155c2d;
  --cb-punct:     #4a665e;

  /* Gradients */
  --grad-hero:    linear-gradient(135deg, var(--lime-200) 0%, var(--teal-500) 100%);
  --grad-title:   linear-gradient(90deg, var(--lime-500) 0%, var(--teal-600) 100%);
  --grad-button:  linear-gradient(135deg, var(--lime-400) 0%, var(--teal-500) 100%);
  --grad-button-hover: linear-gradient(135deg, var(--lime-500) 0%, var(--teal-600) 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(7, 58, 52, 0.06), 0 1px 3px rgba(7, 58, 52, 0.04);
  --shadow-md: 0 4px 12px rgba(7, 58, 52, 0.08), 0 2px 4px rgba(7, 58, 52, 0.04);
  --shadow-lg: 0 12px 32px rgba(7, 58, 52, 0.12), 0 4px 8px rgba(7, 58, 52, 0.06);

  /* Layout */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --header-h:  72px;

  /* Type scale */
  --ff-sans:   "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ff-mono:   "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Wide-desktop layout: generous max-width, fluid gutters */
  --content-max: 1400px;
  --reading-max: 1100px;
  --gutter: clamp(1rem, 3vw, 2.5rem);
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--ff-sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
/* SVGs default to inline-block so they flow with text; size them with the
   inline width/height attrs or a utility class. The wildcard rule keeps
   max-width:100% so explicitly-sized art (logo, hero) still scales down. */
svg { max-width: 100%; display: inline-block; vertical-align: middle; }
svg.icon { width: 1em; height: 1em; flex-shrink: 0; }

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
a:hover, a:focus-visible {
  color: var(--link-hover);
  border-bottom-color: currentColor;
}
a:focus-visible {
  outline: 2px solid var(--lime-400);
  outline-offset: 2px;
  border-radius: 2px;
}

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-sans);
  color: var(--fg-strong);
  line-height: 1.25;
  margin: 1.6em 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 3.6vw, 3rem); margin-top: 0.2em; }
h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); }
h3 { font-size: clamp(1.2rem, 1.6vw, 1.45rem); }
h4 { font-size: 1.1rem; }

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

/* ─── Layout shell ─────────────────────────────────────────────────────── */

.site {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  width: 100%;
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Content pages still get the full --content-max width so they match the
   header bar; the inner .prose is what limits line length for readability. */
.reading {
  max-width: var(--content-max);
}

main { flex: 1 0 auto; padding-block: 2rem 4rem; }

/* ─── Header ───────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: none;
  color: var(--fg-strong);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}
.brand:hover, .brand:focus-visible { color: var(--teal-600); }
.brand__logo { width: 38px; height: 38px; flex: 0 0 38px; }
.brand__name {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand__name strong { font-weight: 800; }
.brand__name small { font-size: .72rem; color: var(--fg-muted); font-weight: 500; letter-spacing: .04em; text-transform: uppercase;}

.nav {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.nav a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink-700);
  border-bottom: none;
}
.nav a:hover, .nav a:focus-visible {
  background: var(--accent-soft);
  color: var(--teal-700);
}
.nav a[aria-current="page"] {
  background: var(--grad-button);
  color: var(--white);
}
.nav a[aria-current="page"] .nav-icon { color: var(--white); }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .45rem .6rem;
  cursor: pointer;
  color: var(--fg-strong);
}
.nav-toggle:hover { background: var(--accent-soft); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: .4rem; }
  .nav {
    position: absolute;
    top: var(--header-h);
    right: var(--gutter);
    left: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: .5rem;
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { justify-content: flex-start; }
}

/* ─── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 5rem);
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 191, 54, 0.18), transparent 60%),
    radial-gradient(1000px 500px at 0% 110%, rgba(18, 138, 120, 0.16), transparent 60%),
    var(--bg);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: left; }
}

.hero__title {
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  margin: 0 0 1rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.hero__title .gradient {
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__tagline {
  font-size: 1.05rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero__lede { font-size: 1.1rem; color: var(--ink-700); max-width: 60ch; }

.hero__art {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__art svg {
  width: min(380px, 100%);
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(7, 58, 52, 0.18));
}

/* CTA buttons */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-block: 2rem 0;
}
.cta {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--fg-strong);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
.cta:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--lime-300);
  color: var(--fg-strong);
}
.cta__icon {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: inline-grid; place-items: center;
  border-radius: 12px;
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.cta__icon svg { width: 24px; height: 24px; }
.cta__text { display: flex; flex-direction: column; gap: 2px; }
.cta__text strong { font-size: 1rem; }
.cta__text span { font-size: .82rem; color: var(--fg-muted); font-weight: 500; }
.cta--core .cta__icon  { background: linear-gradient(135deg, #7cbf36, #468417); }
.cta--ingest .cta__icon{ background: linear-gradient(135deg, #2bb39a, #0d6a5c); }
.cta--routing .cta__icon{ background: linear-gradient(135deg, #5fa523, #128a78); }
.cta--learn .cta__icon { background: linear-gradient(135deg, #9fd55f, #2f8f4a); }

/* ─── Section overview cards ───────────────────────────────────────────── */

.sections {
  margin-top: 4rem;
}
.sections h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
}
.section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.section-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  border-bottom: 1px solid var(--border);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.section-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--lime-300);
}
.section-card__icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: inline-grid; place-items: center;
  color: var(--white);
  background: var(--grad-button);
  box-shadow: var(--shadow-sm);
}
.section-card__icon svg { width: 26px; height: 26px; }
.section-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--fg-strong);
}
.section-card p { margin: 0; color: var(--ink-700); font-size: .98rem; }
.section-card ul {
  margin: .25rem 0 0;
  padding-left: 1.1rem;
  font-size: .92rem;
  color: var(--fg-muted);
}
.section-card ul li { margin-bottom: .25rem; }
.section-card__cta {
  margin-top: auto;
  padding-top: .75rem;
  font-weight: 600;
  color: var(--teal-600);
  border-bottom: none;
}
.section-card__cta:hover { color: var(--lime-600); }

/* ─── Breadcrumbs ──────────────────────────────────────────────────────── */

.breadcrumbs {
  font-size: .88rem;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
}
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: .4rem;
  color: var(--ink-300);
}
.breadcrumbs a { color: var(--fg-muted); border-bottom: none; }
.breadcrumbs a:hover { color: var(--teal-600); }
.breadcrumbs li:last-child { color: var(--fg-strong); font-weight: 600; }

/* ─── Content typography ──────────────────────────────────────────────── */

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}
@media (min-width: 1100px) {
  .page--with-toc {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

.page__title {
  font-size: clamp(2rem, 3.4vw, 3rem);
  margin-bottom: .4rem;
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page__subtitle {
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
  font-size: .82rem;
  margin-bottom: 1.25rem;
}

.prose {
  font-size: 1.02rem;
  color: var(--ink-700);
  /* Wide on desktop, but still bounded so line length stays readable. */
  max-width: 90ch;
}
@media (min-width: 1100px) {
  .prose { max-width: 95ch; }
}
@media (min-width: 1400px) {
  .prose { max-width: 110ch; font-size: 1.05rem; }
}
/* Full-width elements inside .prose (code blocks, tables, mermaid) should
   span all the way to the container edge, not just to the reading column. */
.prose > .code-block,
.prose > .table-wrap,
.prose > .mermaid {
  max-width: none;
  width: 100%;
}

.prose h2 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  color: var(--teal-700);
  border-bottom: 1px solid var(--border);
  padding-bottom: .35rem;
  margin-top: 2.5rem;
}
.prose h3 {
  color: var(--green-700);
}
/* markdown-it-anchor wraps each h2/h3 in a .heading-wrapper div with the
   heading and a sibling <a class="header-anchor"># anchor>. Lay them out
   inline so the # marker sits next to the heading instead of dropping to
   its own line, and fade it in on hover. */
.heading-wrapper {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .4rem;
  /* Preserve the heading's own top/bottom margins */
  margin: 1.6em 0 0.6em;
}
.heading-wrapper > h1,
.heading-wrapper > h2,
.heading-wrapper > h3,
.heading-wrapper > h4,
.heading-wrapper > h5,
.heading-wrapper > h6 {
  margin: 0;
}
.prose .header-anchor {
  color: var(--lime-500);
  opacity: 0;
  text-decoration: none;
  border-bottom: none;
  font-weight: 400;
  font-size: 0.85em;
  transition: opacity .15s ease;
  line-height: 1;
}
.heading-wrapper:hover .header-anchor,
.prose .header-anchor:focus-visible {
  opacity: 1;
}
.prose .header-anchor:hover { color: var(--teal-600); }

.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .35rem; }
.prose strong { color: var(--fg-strong); }

.prose a {
  color: var(--teal-600);
  border-bottom: 1px solid rgba(18, 138, 120, 0.25);
}
.prose a:hover {
  color: var(--lime-600);
  border-bottom-color: var(--lime-500);
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--lime-400);
  background: var(--lime-50);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-700);
}

/* Inline code — light, no border, blends */
.prose :not(pre) > code {
  font-family: var(--ff-mono);
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 0.08em 0.4em;
  border-radius: 5px;
  font-size: 0.92em;
  border: none;
  font-weight: 500;
}

/* Code blocks */
.code-block {
  margin: 1.5rem 0;
  border: 1px solid var(--cb-border);
  border-radius: var(--radius);
  background: var(--cb-bg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .35rem .65rem .35rem .9rem;
  background: var(--cb-toolbar);
  border-bottom: 1px solid var(--cb-border);
  font-size: .78rem;
}
.code-lang {
  color: var(--teal-700);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--white);
  border: 1px solid var(--cb-border);
  border-radius: 999px;
  padding: .2rem .65rem;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--teal-700);
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.copy-btn:hover {
  background: var(--lime-100);
  border-color: var(--lime-300);
  color: var(--teal-700);
}
.copy-btn:active { transform: scale(0.96); }
.copy-btn.is-copied { background: var(--lime-300); border-color: var(--lime-400); color: var(--ink-900); }
.copy-btn .copy-btn-icon { line-height: 1; }

.code-pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-family: var(--ff-mono);
  font-size: .92rem;
  line-height: 1.55;
  color: var(--cb-fg);
  background: var(--cb-bg);
  tab-size: 4;
}
.code-pre code { background: transparent; padding: 0; border-radius: 0; font-size: inherit; color: inherit; }

/* Syntax token colors (light theme) */
.tok-comment  { color: var(--cb-comment); font-style: italic; }
.tok-string   { color: var(--cb-string); }
.tok-number   { color: var(--cb-number); }
.tok-keyword  { color: var(--cb-keyword); font-weight: 600; }
.tok-builtin  { color: var(--cb-builtin); }
.tok-function { color: var(--cb-function); font-weight: 600; }
.tok-punct    { color: var(--cb-punct); }

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
}
.prose thead {
  background: linear-gradient(180deg, var(--lime-100), var(--lime-50));
}
.prose th {
  text-align: left;
  padding: .7rem .9rem;
  font-weight: 700;
  color: var(--teal-700);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.prose td {
  padding: .65rem .9rem;
  border-bottom: 1px solid var(--ink-100);
  vertical-align: top;
}
.prose tr:last-child td { border-bottom: none; }
.prose tbody tr:hover { background: var(--lime-50); }

/* Task-list checkboxes */
.prose .task-list-item {
  list-style: none;
  margin-left: -1rem;
  padding-left: 0;
  display: flex;
  align-items: flex-start;
  gap: .55rem;
}
.prose .task-list-item-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  flex: 0 0 18px;
  margin-top: .25em;
  border: 2px solid var(--lime-400);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background .15s, border-color .15s;
}
.prose .task-list-item-checkbox:checked {
  background: var(--lime-500);
  border-color: var(--lime-500);
}
.prose .task-list-item-checkbox:checked::after {
  content: "";
  width: 10px; height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.prose .task-list-item:has(input:checked) {
  text-decoration: line-through;
  color: var(--fg-muted);
}
.prose ul:has(> .task-list-item) {
  padding-left: 0;
}

/* FAQ accordion */
.faq {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: .75rem 0;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.faq[open] { box-shadow: var(--shadow-md); border-color: var(--lime-300); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  color: var(--teal-700);
  background: linear-gradient(180deg, var(--lime-50), transparent);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--lime-100); }
.faq-icon { transition: transform .2s; color: var(--lime-500); font-size: 1.2rem; }
.faq[open] .faq-icon { transform: rotate(180deg); }
.faq-body { padding: 0 1.1rem 1rem; color: var(--ink-700); }

/* KaTeX math */
.prose .katex { font-size: 1.05em; color: var(--fg-strong); }
.prose .katex-display {
  margin: 1.4rem 0;
  padding: 1rem 1.25rem;
  background: var(--lime-50);
  border-left: 4px solid var(--lime-400);
  border-radius: 0 var(--radius) var(--radius) 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.prose .katex-display > .katex { font-size: 1.1em; }
.math-error {
  color: #a02828;
  background: #fbecec;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-family: var(--ff-mono);
  font-size: 0.92em;
}

/* Mermaid container */
.mermaid {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

/* Related links / sub-section cards on content pages */
.related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.related h2 { margin-top: 0; color: var(--teal-700); border-bottom: none; padding-bottom: 0; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.related-card {
  display: block;
  padding: 1rem 1.1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-bottom: 1px solid var(--border);
  color: var(--fg-strong);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.related-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--lime-300);
  color: var(--fg-strong);
}
.related-card strong { color: var(--teal-700); display: block; margin-bottom: .25rem; }
.related-card span { color: var(--fg-muted); font-size: .9rem; }

/* Sibling / parent nav */
.page-nav {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}
.page-nav a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1rem;
  background: var(--lime-50);
  border: 1px solid var(--lime-200);
  border-radius: 999px;
  color: var(--teal-700);
  font-weight: 600;
  border-bottom: 1px solid var(--lime-200);
}
.page-nav a:hover { background: var(--lime-100); color: var(--teal-700); border-color: var(--lime-300); }

/* ─── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: linear-gradient(180deg, var(--ink-50), var(--ink-100));
  border-top: 1px solid var(--border);
  padding-block: 2.5rem 1.25rem;
  color: var(--ink-700);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 860px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}
.site-footer h4 {
  margin: 0 0 .5rem;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--teal-700);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer a {
  color: var(--ink-700);
  border-bottom: none;
  font-size: .95rem;
}
.site-footer a:hover { color: var(--lime-600); }
.site-footer__brand p { font-size: .95rem; color: var(--ink-600); margin: .5rem 0 0; }
.site-footer__brand .brand { color: var(--fg-strong); }
.site-footer__legal {
  grid-column: 1/-1;
  padding-top: 1.25rem;
  margin-top: .5rem;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--fg-muted);
  text-align: center;
}

/* utility */
.lead { font-size: 1.15rem; color: var(--ink-700); }
.muted { color: var(--fg-muted); }
.eyebrow { text-transform: uppercase; font-size: .8rem; letter-spacing: .14em; font-weight: 700; color: var(--teal-600); }

/* Print */
@media print {
  .site-header, .site-footer, .copy-btn, .nav-toggle { display: none !important; }
  a { color: inherit; text-decoration: underline; }
}
