/*
 * MIT License
 *
 * Copyright (c) 2026 THALES
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
/* MIT License — Copyright (c) 2026 THALES
 *
 * PASSAGE documentation theme, "summit night": cyan and violet highlights
 * alongside the warm terrain artwork. The header and home hero stay dark in
 * both schemes; the reading area follows the selected scheme.
 */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&display=swap");

/* ---------------------------------------------------------------- tokens */
:root {
  --pg-font-display: "Outfit", "Inter", system-ui, sans-serif;
  --pg-night: #14243a;
  --pg-night-2: #1d3047;
  --pg-hero-ink: #f3f7fc;
  --pg-hero-muted: #cfdce9;
  --pg-cyan-neon: #8de5fb;
  --pg-gold-neon: #ffd08a;
  --pg-red-neon: #ff7a78;
  --pg-violet-neon: #c7b5fa;
  --pg-radius: 12px;
  --pe-oracle-bg: rgba(255, 185, 56, 0.08);
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: #1d3047;
  --md-primary-fg-color--light: #243b53;
  --md-primary-fg-color--dark: #14243a;
  --md-primary-bg-color: #f3f7fc;
  --md-primary-bg-color--light: rgba(243, 247, 252, 0.72);
  --md-accent-fg-color: #2d6587;
  --md-accent-fg-color--transparent: rgba(45, 101, 135, 0.1);
  --md-default-bg-color: #f4f7fb;
  --md-default-fg-color: #24364b;
  --md-default-fg-color--light: #52677e;
  --md-typeset-color: #24364b;
  --md-typeset-a-color: #2d6587;
  --md-code-bg-color: #eaf0f7;
  --pg-cyan: #2d6587;
  --pg-gold: #8a560f;
  --pg-red: #c2413f;
  --pg-violet: #6746a0;
  --pg-green: #246947;
  --pg-surface: #ffffff;
  --pg-surface-2: #eef3f9;
  --pg-line: #d6e1ec;
  --pg-glow: rgba(45, 101, 135, 0.12);
  --pg-callout-tint: 8%;
  --pg-shadow: 0 1px 2px rgba(20, 36, 58, 0.05), 0 10px 28px rgba(20, 36, 58, 0.07);
}

[data-md-color-scheme="slate"] {
  --md-hue: 212;
  --md-primary-fg-color: #1d3047;
  --md-primary-fg-color--light: #243b53;
  --md-primary-fg-color--dark: #14243a;
  --md-primary-bg-color: #f3f7fc;
  --md-primary-bg-color--light: rgba(243, 247, 252, 0.72);
  --md-accent-fg-color: var(--pg-cyan-neon);
  --md-accent-fg-color--transparent: rgba(141, 229, 251, 0.12);
  --md-default-bg-color: #14243a;
  --md-default-bg-color--light: rgba(20, 36, 58, 0.54);
  --md-default-fg-color: rgba(243, 247, 252, 0.94);
  --md-default-fg-color--light: #cfdce9;
  --md-default-fg-color--lighter: rgba(207, 220, 233, 0.45);
  --md-default-fg-color--lightest: rgba(207, 220, 233, 0.12);
  --md-typeset-color: #e6edf5;
  --md-typeset-a-color: var(--pg-cyan-neon);
  --md-code-bg-color: #192b40;
  --md-code-fg-color: #dbe6f2;
  --md-footer-bg-color: #1d3047;
  --md-footer-bg-color--dark: #14243a;
  --pg-cyan: var(--pg-cyan-neon);
  --pg-gold: var(--pg-gold-neon);
  --pg-red: var(--pg-red-neon);
  --pg-violet: var(--pg-violet-neon);
  --pg-green: #8cdab0;
  --pg-surface: rgba(29, 48, 71, 0.92);
  --pg-surface-2: #243b53;
  --pg-line: rgba(189, 216, 239, 0.2);
  --pg-glow: rgba(141, 229, 251, 0.15);
  --pg-callout-tint: 10%;
  --pg-shadow: 0 1px 2px rgba(8, 20, 33, 0.25), 0 12px 32px rgba(8, 20, 33, 0.28);
}

::selection { background: rgba(34, 211, 238, 0.28); }

/* ------------------------------------------------------------- type scale */
.md-typeset { font-size: 0.72rem; line-height: 1.68; }
.md-typeset h1, .md-typeset h2, .md-typeset h3, .md-typeset h4 { font-family: var(--pg-font-display); letter-spacing: -0.012em; }
.md-typeset h1 { font-size: 1.85em; font-weight: 700; margin-bottom: 0.9em; color: var(--md-default-fg-color); }
.md-typeset h2 { font-size: 1.32em; font-weight: 650; margin-top: 2.1em; padding-bottom: 0.35em; border-bottom: 1px solid var(--pg-line); }
.md-typeset h3 { font-size: 1.08em; font-weight: 650; }
.md-typeset h4 { font-size: 0.98em; font-weight: 650; }
.md-typeset code, .md-typeset kbd, .md-typeset pre { font-size: 0.82em; }
.md-typeset table:not([class]) { font-size: 0.66rem; }
.md-nav { font-size: 0.64rem; }
.md-tabs__link { font-size: 0.64rem; }
.md-header__topic { font-family: var(--pg-font-display); font-weight: 600; letter-spacing: 0.04em; }
.md-header__title { font-size: 0.82rem; }
.md-search__input { font-size: 0.7rem; }
.md-footer-meta { font-size: 0.6rem; }

/* ------------------------------------------------------------ links, misc */
.md-typeset a { transition: color 0.2s, text-shadow 0.2s; }
[data-md-color-scheme] .md-typeset :is(p, li, td, dd) a:not([class]) {
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.18em;
}
[data-md-color-scheme="slate"] .md-typeset a:hover { text-shadow: 0 0 12px var(--pg-glow); }
.md-header, .md-tabs, .md-banner, .md-nav__source, .pg-hero, .md-footer { --pg-focus: var(--pg-cyan-neon); }
[data-md-color-scheme] :is(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--pg-focus, var(--pg-cyan));
  outline-offset: 3px;
}
.md-typeset hr { border-bottom: 1px solid var(--pg-line); }
.md-typeset .katex-display { overflow-x: auto; overflow-y: hidden; padding: 0.4rem 0; }

/* ---------------------------------------------------- header, tabs, banner */
.md-header { background: var(--md-primary-fg-color); box-shadow: none; }
[data-md-color-scheme="slate"] .md-header { background: color-mix(in srgb, var(--md-primary-fg-color) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.md-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--pg-cyan-neon) 24%, var(--pg-violet-neon) 76%, transparent);
  opacity: 0.45;
}
.md-header__button.md-logo img, .md-header__button.md-logo svg { height: 1.45rem; filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.45)); }
.md-tabs { background: var(--md-primary-fg-color); }
.md-tabs__link { opacity: 0.72; }
.md-tabs__link--active, .md-tabs__link:is(:hover, :focus-visible) { opacity: 1; color: var(--pg-cyan-neon); }
.md-tabs__link--active { text-decoration: underline; text-underline-offset: 0.25em; }

.md-header__source { width: auto; margin-left: 0.6rem; }
.pg-sources { display: flex; align-items: center; gap: 0.45rem; }
.pg-source {
  display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  color: var(--md-primary-bg-color); border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(255, 255, 255, 0.03); transition: color 0.2s, border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}
.pg-source .md-icon svg { width: 0.85rem; height: 0.85rem; fill: currentColor; display: block; }
.pg-source:is(:hover, :focus-visible) { color: #fff; border-color: var(--pg-cyan-neon); box-shadow: 0 0 10px rgba(141, 229, 251, 0.2); }
.md-nav__source { background: var(--md-primary-fg-color); padding: 0.6rem 0.8rem; }
.md-nav__source .pg-sources { gap: 0.6rem; }

.md-banner { background: linear-gradient(90deg, #1d3047, #304d6b 55%, #453856); color: var(--pg-hero-ink); }
.md-banner__inner { font-size: 0.62rem; margin: 0.35rem auto; }
.pg-announce { text-align: center; font-weight: 600; letter-spacing: 0.02em; }
.md-banner .md-banner__button { color: #f3f6fb; }

/* ------------------------------------------------------------------ hero */
.pg-hero {
  --pg-cyan: var(--pg-cyan-neon); --pg-gold: var(--pg-gold-neon); --pg-red: var(--pg-red-neon);
  position: relative; overflow: hidden; isolation: isolate; color: var(--pg-hero-ink);
  background:
    radial-gradient(42% 42% at 84% 57%, rgba(255, 233, 184, 0.36) 0%, rgba(255, 208, 138, 0.2) 22%, rgba(242, 180, 155, 0.09) 52%, transparent 100%),
    linear-gradient(180deg, #14243a 0%, #304d6b 42%, #776a79 68%, #c3917d 84%, #24364b 100%);
}
.pg-hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero-terrain { width: 100%; height: 100%; display: block; }
.hero-contours { animation: pg-drift 46s ease-in-out infinite alternate; transform-origin: 50% 50%; }
.hero-contours path { fill: none; stroke: rgba(189, 216, 239, 0.16); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hero-contours path.major { stroke: rgba(237, 244, 252, 0.3); stroke-width: 1.3; }
.hero-r1 { --rc: #9ddcfa; } .hero-r2 { --rc: #ffd08a; } .hero-r3 { --rc: #ff9b8a; } .hero-r4 { --rc: #f2b49b; }
.hero-ridges path { stroke: rgba(239, 247, 255, 0.35); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hero-ridge { animation: pg-float 14s ease-in-out infinite alternate; }
.hero-ridge:nth-child(2) { animation-duration: 17s; animation-delay: -4s; }
.hero-ridge:nth-child(3) { animation-duration: 20s; animation-delay: -9s; }
@keyframes pg-float { from { transform: translateY(-6px); } to { transform: translateY(6px); } }
.hero-route-halo { fill: none; stroke: var(--rc); stroke-opacity: 0.12; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hero-route {
  fill: none; stroke: var(--rc); stroke-opacity: 0.85; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: pg-draw 3.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.hero-r2 .hero-route { animation-delay: 0.6s; } .hero-r3 .hero-route { animation-delay: 1.2s; } .hero-r4 .hero-route { animation-delay: 1.8s; }
.hero-pulse {
  fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 60 940; stroke-dashoffset: 1000; opacity: 0; animation: pg-pulse 7s linear 4s infinite;
}
.hero-r2 .hero-pulse { animation-duration: 8.5s; animation-delay: 5s; }
.hero-r3 .hero-pulse { animation-duration: 6.5s; animation-delay: 6s; }
.hero-r4 .hero-pulse { animation-duration: 9.5s; animation-delay: 7s; }
.hero-comet { fill: #fff; stroke: var(--rc); stroke-width: 2; }
.hero-start { fill: var(--rc); }
.hero-goal { fill: var(--rc); }
.hero-goal-ring { fill: none; stroke: var(--rc); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: pg-ping 2.6s ease-out infinite; }
.pg-hero__veil {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 36, 58, 0.25) 0%, rgba(20, 36, 58, 0.45) 40%, rgba(20, 36, 58, 0.72) 78%, rgba(20, 36, 58, 0.9) 92%, var(--md-default-bg-color) 100%);
}
.pg-hero__inner { display: grid; justify-items: center; text-align: center; gap: 0.85rem; padding: 3rem 0.8rem 3.6rem; }
.pg-eyebrow { margin: 0; font: 600 0.6rem/1.3 var(--pg-font-display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--pg-gold-neon); text-shadow: 0 0 14px rgba(255, 185, 56, 0.5); }
.pg-title {
  margin: 0; font: 800 clamp(2.3rem, 7vw, 4rem)/0.95 var(--pg-font-display); letter-spacing: 0.08em; color: #fff;
  text-shadow: 0 2px 12px rgba(8, 20, 33, 0.4), 0 0 28px rgba(255, 208, 138, 0.35), 0 0 64px rgba(242, 180, 155, 0.25);
}
.pg-tagline { margin: 0; max-width: 38rem; font-size: 0.8rem; line-height: 1.6; color: #cfdaea; text-wrap: balance; }
.pg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.pg-btn {
  display: inline-grid; place-items: center; min-height: 2.2rem;
  font: 600 0.68rem/1.25 "Inter", sans-serif; padding: 0.55rem 1.05rem; border-radius: 999px; color: var(--pg-hero-ink);
  border: 1px solid rgba(125, 211, 252, 0.35); background: rgba(12, 22, 40, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s, color 0.2s;
}
.pg-btn:is(:hover, :focus-visible) { color: #fff; border-color: var(--pg-cyan-neon); box-shadow: 0 0 12px rgba(141, 229, 251, 0.24); }
.pg-btn--primary { color: var(--pg-night); border: 0; background: linear-gradient(110deg, var(--pg-cyan-neon), var(--pg-violet-neon)); }
.pg-btn--primary:is(:hover, :focus-visible) { color: var(--pg-night); }

/* NeurIPS acceptance card */
.pg-neurips {
  display: flex; align-items: center; gap: 0.8rem; width: min(100%, 44rem);
  margin-top: 0.5rem; padding: 0.7rem 1rem; border-radius: 14px; text-align: left;
  border: 1px solid transparent;
  background: linear-gradient(var(--pg-night-2), var(--pg-night-2)) padding-box,
    linear-gradient(110deg, var(--pg-cyan-neon), var(--pg-violet-neon)) border-box;
  box-shadow: 0 0 16px rgba(141, 229, 251, 0.15);
}
.pg-neurips__icon svg { display: block; width: 1.45rem; height: 1.45rem; fill: var(--pg-gold-neon); filter: drop-shadow(0 0 8px rgba(255, 185, 56, 0.7)); }
.pg-neurips__text { display: grid; gap: 0.1rem; min-width: 0; }
.pg-neurips__text strong { font: 700 0.76rem/1.25 var(--pg-font-display); color: #fff; letter-spacing: 0.01em; }
.pg-neurips__text span { font-size: 0.6rem; line-height: 1.45; color: #b9c7da; }
.pg-neurips__cite { margin-left: auto; flex: none; font-size: 0.65rem; font-weight: 600; color: var(--pg-cyan-neon); white-space: nowrap; text-decoration: underline; text-underline-offset: 0.18em; }
.pg-neurips__cite:hover { color: #fff; text-shadow: 0 0 10px rgba(34, 211, 238, 0.8); }

/* Release pins */
.pg-pins { list-style: none; margin: 0.15rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.38rem; max-width: 52rem; }
.pg-pins li { margin: 0; }
.pg-pins a, .pg-pins li > span:first-child { color: inherit; }
.pg-pins li > a, .pg-pins li { display: inline-flex; }
.pg-pins li > a { border-radius: 6px; transition: box-shadow 0.25s, transform 0.2s; }
.pg-pins li > a:hover { box-shadow: 0 0 10px rgba(141, 229, 251, 0.2); }
.pg-pin__k, .pg-pin__v { display: inline-block; padding: 0.24rem 0.5rem; font-size: 0.56rem; line-height: 1.3; }
.pg-pin__k { border-radius: 6px 0 0 6px; background: rgba(34, 211, 238, 0.14); color: #a5eefc; font-weight: 600; border: 1px solid rgba(34, 211, 238, 0.3); border-right: 0; }
.pg-pin__v { border-radius: 0 6px 6px 0; background: rgba(6, 11, 22, 0.66); color: #eef3fa; font-family: "JetBrains Mono", monospace; border: 1px solid rgba(125, 211, 252, 0.22); }

/* Banner */
.pg-banner {
  position: relative; margin: 0.7rem 0 0; width: min(100%, 980px); border-radius: 18px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.25), 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 70px rgba(255, 140, 60, 0.2);
}
.pg-banner img { display: block; width: 100%; height: auto; }

/* Stats */
.pg-stats { margin: 0.6rem 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.55rem; width: min(100%, 980px); }
.pg-stats > div { display: flex; flex-direction: column-reverse; gap: 0.2rem; padding: 0.7rem 0.4rem; border-radius: var(--pg-radius); background: rgba(29, 48, 71, 0.8); border: 1px solid rgba(189, 216, 239, 0.22); }
.pg-stats dt { font-size: 0.54rem; letter-spacing: 0.14em; text-transform: uppercase; color: #9fb2c8; }
.pg-stats dd { margin: 0; font: 700 1.15rem/1 var(--pg-font-display); color: #f3f7fc; text-shadow: 0 0 14px rgba(255, 208, 138, 0.35); font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------- content area */
[data-md-color-scheme="slate"] .md-main {
  background:
    radial-gradient(60rem 30rem at 100% 0%, rgba(199, 181, 250, 0.065), transparent 70%),
    radial-gradient(50rem 30rem at 0% 40%, rgba(141, 229, 251, 0.045), transparent 70%);
}

/* Material supplies the type-specific icons. Use one accent for the rail, icon,
   disclosure chevron, and a faint title tint. */
.md-typeset .admonition { --pg-callout-accent: var(--pg-cyan); }
.md-typeset details { --pg-callout-accent: var(--pg-violet); }
[data-md-color-scheme] .md-typeset :is(.admonition, details) {
  border: 1px solid var(--pg-line);
  border-inline-start: 3px solid var(--pg-callout-accent);
  border-radius: var(--pg-radius);
  background: var(--pg-surface);
  box-shadow: none;
  color: inherit;
  font-size: inherit;
}
.md-typeset :is(.admonition, details):is(.abstract, .summary, .tldr, .example, .question, .help, .faq) {
  --pg-callout-accent: var(--pg-violet);
}
.md-typeset :is(.admonition, details):is(.note, .seealso, .info, .todo, .tip, .hint, .important) {
  --pg-callout-accent: var(--pg-cyan);
}
.md-typeset :is(.admonition, details):is(.success, .check, .done) { --pg-callout-accent: var(--pg-green); }
.md-typeset :is(.admonition, details):is(.warning, .caution, .attention) { --pg-callout-accent: var(--pg-gold); }
.md-typeset :is(.admonition, details):is(.failure, .fail, .missing, .danger, .error, .bug) { --pg-callout-accent: var(--pg-red); }
.md-typeset :is(.admonition, details):is(.quote, .cite) { --pg-callout-accent: var(--md-default-fg-color--light); }

[data-md-color-scheme] .md-typeset :is(.admonition, details):focus-within {
  box-shadow: 0 0 0 2px var(--pg-line);
}
.md-typeset :is(.admonition, details) > :is(.admonition-title, summary) {
  background: var(--pg-surface-2);
  background: color-mix(in srgb, var(--pg-callout-accent) var(--pg-callout-tint), var(--pg-surface-2));
  border-start-start-radius: calc(var(--pg-radius) - 3px);
  border-start-end-radius: calc(var(--pg-radius) - 1px);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.md-typeset :is(.admonition, details) > :is(.admonition-title, summary)::before {
  background-color: var(--pg-callout-accent);
}
[data-md-color-scheme] .md-typeset details > summary::after {
  color: var(--pg-callout-accent);
}
.md-typeset details:not([open]) > summary {
  border-end-start-radius: calc(var(--pg-radius) - 3px);
  border-end-end-radius: calc(var(--pg-radius) - 1px);
}
.md-typeset details > summary:hover {
  background: color-mix(in srgb, var(--pg-callout-accent) calc(var(--pg-callout-tint) + 5%), var(--pg-surface-2));
}
.md-typeset details > summary:is(:focus-visible, .focus-visible) {
  outline: 2px solid var(--pg-callout-accent);
  outline-offset: -3px;
}
.md-typeset pre > code { border-radius: 10px; }
.md-typeset .highlight { border-radius: 10px; box-shadow: 0 0 0 1px var(--pg-line); }
.md-typeset table:not([class]) { border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--pg-line); border: 0; }
.md-typeset table:not([class]) th { background: var(--pg-surface-2); font-weight: 650; }
.md-typeset table:not([class]) tbody tr:hover { background: var(--md-accent-fg-color--transparent); box-shadow: none; }

/* Section intro (home) */
.md-typeset .pg-lede { font-size: 0.82rem; line-height: 1.7; max-width: 46rem; color: var(--md-default-fg-color--light); }

/* Cards: feature cards and Material grid cards */
.md-typeset .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.8rem; margin: 1.2rem 0; }
.md-typeset .feature-grid.pg-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.md-typeset .feature-grid.pg-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.md-typeset .feature-card, .md-typeset .grid.cards > ul > li, .md-typeset .grid > .card {
  position: relative; padding: 1rem 1.05rem; border-radius: var(--pg-radius); background: var(--pg-surface);
  border: 1px solid var(--pg-line); box-shadow: var(--pg-shadow); transition: transform 0.25s, border-color 0.25s, box-shadow 0.3s;
}
.md-typeset .feature-card:hover, .md-typeset .grid.cards > ul > li:hover {
  transform: translateY(-3px); border-color: color-mix(in srgb, var(--pg-cyan) 55%, transparent);
  box-shadow: var(--pg-shadow), 0 0 22px var(--pg-glow);
}
.md-typeset .feature-card h3 { margin: 0.3rem 0 0.4rem; font-size: 0.86rem; }
.md-typeset .feature-card p { margin: 0; font-size: 0.66rem; color: var(--md-default-fg-color--light); }
.md-typeset .feature-icon { font-size: 1.15rem; line-height: 1; filter: drop-shadow(0 0 8px var(--pg-glow)); }
.md-typeset .grid.cards > ul > li > hr { border-color: var(--pg-line); }

/* Pipeline steps */
.md-typeset .pipeline-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.7rem; margin: 1.2rem 0; }
.md-typeset .pipeline-step { position: relative; padding: 0.9rem 0.85rem 0.85rem; border-radius: var(--pg-radius); background: var(--pg-surface); border: 1px solid var(--pg-line); box-shadow: var(--pg-shadow); }
.md-typeset .pipeline-step h4 { margin: 0.45rem 0 0.25rem; font-size: 0.8rem; }
.md-typeset .pipeline-step p { margin: 0; font-size: 0.64rem; color: var(--md-default-fg-color--light); }
.md-typeset .step-number {
  display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%;
  font: 700 0.62rem/1 var(--pg-font-display); color: #04101c; background: linear-gradient(135deg, var(--pg-cyan), var(--pg-violet));
  box-shadow: 0 0 12px var(--pg-glow);
}

[data-md-color-scheme="default"] .md-typeset .step-number { color: #fff; }

/* Glance table + figure */
.md-typeset .pg-figure { margin: 1.4rem auto; text-align: center; }
.md-typeset .pg-figure img { border-radius: 12px; box-shadow: 0 0 0 1px var(--pg-line), var(--pg-shadow); }
.md-typeset .pg-figure figcaption { max-width: 44rem; margin: 0.6rem auto 0; font-size: 0.62rem; color: var(--md-default-fg-color--light); }

/* Citation */
.md-typeset .pg-cite { border-radius: 14px; padding: 1rem 1.1rem 0.4rem; background: var(--pg-surface); box-shadow: 0 0 0 1px var(--pg-line), var(--pg-shadow); }

/* Leaderboard partials */
.md-typeset table.leaderboard-candidates { width: 100%; border-collapse: collapse; font-size: 0.66rem; margin: 1rem 0; background: var(--pg-surface); color: var(--md-default-fg-color); border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--pg-line); }
.md-typeset table.leaderboard-candidates th { background: var(--pg-surface-2); text-align: left; font-weight: 700; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--pg-line); }
.md-typeset table.leaderboard-candidates td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--pg-line); }
.md-typeset table.leaderboard-candidates code { background: var(--md-code-bg-color); color: var(--md-code-fg-color); }
.md-typeset table.leaderboard-candidates tr.oracle-row { background: var(--pe-oracle-bg); border-inline-start: 4px solid var(--pg-gold); }
.md-typeset table.leaderboard-candidates tr.oracle-row td { font-weight: 500; }
.md-typeset table.leaderboard-candidates tr.oracle-row td:first-child { color: var(--pg-gold); }
.md-typeset .leaderboard-fullsize { text-align: right; font-size: 0.64rem; margin-top: 0.25rem; color: var(--md-default-fg-color--light); }
.md-typeset .leaderboard-fullsize a { text-decoration: none; font-weight: 500; }
.md-typeset .leaderboard-legend, .md-typeset .leaderboard-footer { font-size: 0.64rem; color: var(--md-default-fg-color--light); margin-top: 1rem; }
.md-typeset .leaderboard-footer { text-align: center; }

/* Notebook embeds */
.md-typeset .notebook-embed { position: relative; width: 100%; margin: 1.5rem 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--pg-line); box-shadow: var(--pg-shadow); }
.md-typeset .notebook-embed iframe { width: 100%; height: 600px; border: none; background: #fff; }
.md-typeset .notebook-embed .notebook-header { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.9rem; background: var(--md-code-bg-color); border-bottom: 1px solid var(--pg-line); font-size: 0.64rem; font-weight: 600; color: var(--md-default-fg-color--light); }
.md-typeset iframe { border-radius: 10px; }

/* Mermaid diagrams: site colours and a zoom viewer */
:root {
  --md-mermaid-font-family: "Inter", system-ui, sans-serif;
}
[data-md-color-scheme="default"] {
  --md-mermaid-node-bg-color: #e7eff6;
  --md-mermaid-node-fg-color: #2d6587;
  --md-mermaid-edge-color: #52677e;
  --md-mermaid-label-bg-color: #f4f7fb;
  --md-mermaid-label-fg-color: #24364b;
  --md-mermaid-sequence-note-bg-color: #fff0d8;
  --md-mermaid-sequence-note-fg-color: #24364b;
  --md-mermaid-sequence-note-border-color: #8a560f;
}
[data-md-color-scheme="slate"] {
  --md-mermaid-node-bg-color: #243b53;
  --md-mermaid-node-fg-color: #9ddcfa;
  --md-mermaid-edge-color: #cfdce9;
  --md-mermaid-label-bg-color: #14243a;
  --md-mermaid-label-fg-color: #f3f7fc;
  --md-mermaid-sequence-note-bg-color: #443b30;
  --md-mermaid-sequence-note-fg-color: #f3f7fc;
  --md-mermaid-sequence-note-border-color: #ffd08a;
}
.md-typeset .pg-mermaid {
  position: relative; margin: 1.2em 0; padding: 1rem 0.8rem 0.6rem; border-radius: 12px;
  background: var(--pg-surface); box-shadow: 0 0 0 1px var(--pg-line), var(--pg-shadow); overflow-x: auto;
}
.md-typeset .pg-mermaid .mermaid { margin: 0; cursor: zoom-in; }
.pg-mermaid__zoom {
  position: absolute; top: 0.45rem; right: 0.5rem; font: 600 0.58rem/1 "Inter", sans-serif; padding: 0.35rem 0.6rem;
  border-radius: 999px; border: 1px solid var(--pg-line); background: var(--md-default-bg-color); color: var(--md-default-fg-color--light);
  cursor: pointer; min-height: 1.4rem; transition: box-shadow 0.25s, color 0.2s;
}
.pg-mermaid__zoom:is(:hover, :focus-visible) { color: var(--pg-cyan); box-shadow: 0 0 10px var(--pg-glow); }
.pg-zoom { position: fixed; inset: 0; z-index: 10; display: grid; grid-template-rows: auto 1fr auto; background: rgba(5, 10, 20, 0.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
[data-md-color-scheme="default"] .pg-zoom { background: rgba(240, 245, 251, 0.94); }
.pg-zoom__bar { display: flex; justify-content: flex-end; gap: 0.4rem; padding: calc(0.6rem + env(safe-area-inset-top, 0px)) max(0.8rem, env(safe-area-inset-right, 0px)) 0.4rem; }
.pg-zoom__bar button { min-width: 2.2rem; height: 2.2rem; border-radius: 999px; border: 1px solid var(--pg-line); background: var(--pg-surface); color: var(--md-default-fg-color); font: 600 0.8rem "Inter", sans-serif; cursor: pointer; }
.pg-zoom__bar button:hover, .pg-zoom__bar button:focus-visible { border-color: var(--pg-cyan); box-shadow: 0 0 14px var(--pg-glow); }
.pg-zoom__stage { position: relative; overflow: hidden; touch-action: none; cursor: grab; }
.pg-zoom__stage:active { cursor: grabbing; }
.pg-zoom__canvas { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.pg-zoom__canvas .mermaid { margin: 0; }
.pg-zoom__hint { margin: 0; padding: 0.4rem 0.8rem calc(0.6rem + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 0.6rem; color: var(--md-default-fg-color--light); }

/* Footer */
.md-footer { position: relative; }
.md-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--pg-cyan-neon), var(--pg-violet-neon), transparent); opacity: 0.45; }

/* ------------------------------------------------------------- keyframes */
@keyframes pg-drift { from { transform: translate3d(0, 0, 0) scale(1.03); } to { transform: translate3d(-28px, 10px, 0) scale(1.07); } }
@keyframes pg-draw { to { stroke-dashoffset: 0; } }
@keyframes pg-pulse { 0% { stroke-dashoffset: 1000; opacity: 0; } 4% { opacity: 0.95; } 92% { opacity: 0.95; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes pg-ping { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(2.3); opacity: 0; } }

/* ------------------------------------------------------------ responsive */
@media screen and (max-width: 76.25em) {
  .pg-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md-typeset .pipeline-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md-typeset .feature-grid.pg-cols-4, .md-typeset .feature-grid.pg-cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 44.9375em) {
  .pg-hero__inner { padding: 2.2rem 0.8rem 1.6rem; gap: 0.7rem; }
  .pg-neurips { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.45rem 0.7rem; }
  .pg-neurips__icon { align-self: start; }
  .pg-neurips__cite { grid-column: 2; margin-left: 0; justify-self: start; }
  .pg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-stats dd { font-size: 1rem; }
  .md-typeset .feature-grid, .md-typeset .feature-grid.pg-cols-4, .md-typeset .feature-grid.pg-cols-5 { grid-template-columns: minmax(0, 1fr); }
  .md-typeset .pipeline-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-contours, .hero-ridge, .hero-route, .hero-pulse, .hero-goal-ring { animation: none; }
  .hero-route { stroke-dashoffset: 0; }
  .hero-pulse, .hero-comet { display: none; }
  .md-typeset .feature-card:hover, .md-typeset .grid.cards > ul > li:hover { transform: none; }
}
