:root {
  --ske-accent: #18a8ff;
  --ske-accent-soft: #e6f5ff;
  --ske-gold: #c88a16;
  --ske-border: #cbd5df;
  --ske-panel: #f7f9fb;
  --ske-text: #17212b;
  --aiq-bg: #06111f;
  --aiq-bg-2: #0a1f35;
  --aiq-panel: #0e2438;
  --aiq-panel-soft: #122b42;
  --aiq-text: #e8f4ff;
  --aiq-muted: #9bb2c8;
  --aiq-blue: #18a8ff;
  --aiq-blue-2: #4fc3ff;
  --aiq-line: rgba(79, 195, 255, 0.24);
  --pst-color-primary: #18a8ff;
  --pst-color-secondary: #4fc3ff;
  --pst-color-link: #61c9ff;
  --pst-color-link-hover: #9fe3ff;
  --pst-color-inline-code: #9fe3ff;
  --pst-color-target: rgba(24, 168, 255, 0.22);
  /* on-background is a PyData surface color (admonitions, header), not text. */
  --pst-color-on-background: var(--aiq-panel);
  --pst-color-surface: var(--aiq-panel);
  --pst-color-background: var(--aiq-bg);
}

html[data-theme="dark"],
html[data-theme="light"] {
  --pst-color-background: var(--aiq-bg);
  --pst-color-on-background: var(--aiq-panel);
  --pst-color-surface: var(--aiq-panel);
  --pst-color-border: rgba(130, 185, 229, 0.18);
  --pst-color-text-muted: var(--aiq-muted);
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(24, 168, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 86% 12%, rgba(64, 196, 255, 0.12), transparent 26rem),
    linear-gradient(180deg, #071320 0%, #050b13 100%);
  color: var(--aiq-text);
}

a,
.bd-content a {
  color: #78d4ff;
  text-decoration-color: rgba(120, 212, 255, 0.55);
  text-underline-offset: 0.14em;
}

a:hover,
.bd-content a:hover {
  color: #b7ebff;
}

.bd-header {
  background:
    radial-gradient(circle at 18% 82%, rgba(24, 168, 255, 0.36) 0 0.12rem, transparent 0.14rem),
    radial-gradient(circle at 24% 70%, rgba(24, 168, 255, 0.58) 0 0.11rem, transparent 0.13rem),
    radial-gradient(circle at 31% 62%, rgba(79, 195, 255, 0.72) 0 0.1rem, transparent 0.12rem),
    radial-gradient(circle at 39% 58%, rgba(79, 195, 255, 0.68) 0 0.09rem, transparent 0.11rem),
    radial-gradient(circle at 48% 60%, rgba(24, 168, 255, 0.56) 0 0.1rem, transparent 0.12rem),
    radial-gradient(circle at 58% 70%, rgba(24, 168, 255, 0.34) 0 0.11rem, transparent 0.13rem),
    linear-gradient(90deg, #06111f 0%, #07182a 48%, #07111e 100%);
  border-bottom: 1px solid var(--aiq-line);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.22);
}

.navbar-brand {
  color: #f4fbff !important;
  font-weight: 760;
  letter-spacing: 0;
}

.navbar-brand img {
  width: 5.4rem;
  height: auto;
  max-height: 2rem;
  margin-right: 0.7rem;
  filter: drop-shadow(0 0 0.9rem rgba(24, 168, 255, 0.34));
}

.navbar-home-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid rgba(120, 212, 255, .34);
  border-radius: .45rem;
  color: var(--aiq-text) !important;
  background: rgba(13, 43, 66, .72);
  text-decoration: none !important;
}

.navbar-home-link:hover,
.navbar-home-link:focus-visible {
  border-color: var(--aiq-blue-2);
  color: #fff !important;
  background: rgba(18, 59, 89, .9);
}

.bd-sidebar-primary,
.bd-sidebar-secondary,
.bd-main .bd-content .bd-article-container,
.bd-main .bd-content .bd-article,
.bd-page-width {
  background: transparent;
}

.bd-sidebar-primary {
  border-right: 1px solid var(--aiq-line);
}

.bd-sidebar-secondary {
  border-left: 1px solid var(--aiq-line);
}

.sidebar-primary-items__start,
.sidebar-primary-items__end,
.bd-toc nav,
.bd-sidebar-primary .sidebar-primary-items__start,
.bd-sidebar-primary .sidebar-primary-items__end {
  background: transparent;
}

.bd-sidebar-primary h2,
.bd-sidebar-primary .caption,
.bd-toc .tocsection {
  color: #eaf7ff;
}

.bd-sidebar-primary a,
.bd-toc a,
.toc-entry a.nav-link {
  color: var(--aiq-muted);
}

.bd-sidebar-primary a:hover,
.bd-sidebar-primary .current > a,
.bd-toc a:hover,
.toc-entry a.nav-link.active {
  color: #8bdcff;
}

.bd-sidebar-primary .current > a,
.toc-entry a.nav-link.active {
  border-left-color: var(--aiq-blue);
}

.bd-article-container {
  width: 100%;
  max-width: none;
}

.bd-article {
  color: var(--aiq-text);
}

.bd-article h1,
.bd-article h2,
.bd-article h3,
.bd-article h4 {
  color: #f4fbff;
}

.bd-article h1 {
  letter-spacing: 0;
}

.bd-article p,
.bd-article li,
.bd-article dd {
  color: #d8e8f5;
}

.bd-article strong {
  color: #f4fbff;
}

.highlight,
div.highlight,
pre,
code {
  background: #071725 !important;
  color: #d7eefc;
  border-color: rgba(120, 212, 255, 0.22) !important;
}

.highlight pre {
  border: 1px solid rgba(120, 212, 255, 0.22);
  border-radius: 0.55rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.bd-article table {
  border-color: rgba(120, 212, 255, 0.28);
  color: #e9f6ff;
}

.bd-article table thead tr {
  background: #103452;
}

.bd-article table th {
  color: #f3fbff;
  border-color: rgba(120, 212, 255, 0.32);
}

.bd-article table td {
  color: #e9f6ff;
  border-color: rgba(120, 212, 255, 0.22);
}

.bd-article table tbody tr,
.bd-article table tbody tr:nth-child(odd),
.bd-article table tbody tr:nth-child(even) {
  background: #0b2439;
}

.bd-article table tbody tr:nth-child(even) {
  background: #12324d;
}

.bd-article table code {
  color: #d7f3ff;
  background: #061827 !important;
}

.prev-next-area a,
.sd-card,
.admonition,
div.admonition,
.bd-content .note {
  background: rgba(13, 35, 56, 0.76);
  border-color: rgba(120, 212, 255, 0.22);
  color: var(--aiq-text);
}

button.btn,
.btn {
  border-color: rgba(120, 212, 255, 0.32);
}

.search-button {
  color: #d8e8f5;
}

.theme-switch-button {
  display: none !important;
}

.pst-back-to-top {
  color: #06111f !important;
  background: #62d2ff !important;
  border: 1px solid rgba(185, 239, 255, 0.7) !important;
  box-shadow: 0 0.6rem 1.8rem rgba(24, 168, 255, 0.28) !important;
}

.pst-back-to-top:hover {
  background: #9fe3ff !important;
}

.ske-shell {
  color: var(--ske-text);
  display: grid;
  gap: 1rem;
  max-width: 100%;
}

.ske-toolbar,
.ske-facets,
.ske-cloud,
.ske-results,
.ske-detail,
.ske-graph-panel {
  border: 1px solid var(--ske-border);
  background: var(--ske-panel);
  padding: 1rem;
}

.ske-toolbar {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) auto auto;
  gap: 0.75rem;
  align-items: end;
}

.ske-toolbar label,
.ske-facets label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
}

.ske-toolbar input,
.ske-toolbar select,
.ske-facets select {
  min-height: 2.5rem;
  border: 1px solid #8191a1;
  background: #fff;
  color: #111;
  padding: 0.45rem 0.6rem;
}

.ske-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem;
}

.ske-filter-column,
.ske-workspace {
  display: grid;
  gap: 1rem;
  align-content: start;
  min-width: 0;
}

.ske-facets {
  display: grid;
  grid-template-columns: repeat(2, minmax(8rem, 1fr));
  gap: 0.75rem;
}

.ske-cloud-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
}

.ske-tag {
  border: 1px solid #748494;
  background: #fff;
  color: #174d75;
  cursor: pointer;
  padding: 0.25rem 0.45rem;
}

.ske-tag[aria-pressed="true"] {
  color: #fff;
  border-color: var(--ske-accent);
  background: var(--ske-accent);
}

.ske-tag[data-weight="1"] { font-size: 0.85rem; }
.ske-tag[data-weight="2"] { font-size: 1rem; }
.ske-tag[data-weight="3"] { font-size: 1.15rem; }
.ske-tag[data-weight="4"] { font-size: 1.3rem; }
.ske-tag[data-weight="5"] { font-size: 1.45rem; }

.ske-result-grid {
  display: grid;
  gap: 0.55rem;
}

.ske-card {
  border: 1px solid var(--ske-border);
  border-left: 4px solid var(--ske-accent);
  background: #fff;
  color: inherit;
  cursor: pointer;
  padding: 0.7rem;
  text-align: left;
}

.ske-card[aria-current="true"] {
  border-left-color: var(--ske-gold);
  box-shadow: 0 0 0 2px rgba(200, 138, 22, 0.24);
}

.ske-card strong,
.ske-card span {
  display: block;
}

.ske-card span {
  margin-top: 0.3rem;
  color: #4d5d6c;
}

.ske-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.ske-chip {
  border: 1px solid #9aa8b5;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.8rem;
}

.ske-graph {
  width: 100%;
  min-height: 26rem;
  border: 1px solid var(--ske-border);
  background:
    linear-gradient(#e6ebf0 1px, transparent 1px),
    linear-gradient(90deg, #e6ebf0 1px, transparent 1px);
  background-size: 2rem 2rem;
}

.ske-edge {
  stroke: #7d8d9a;
  stroke-width: 1.4;
}

.ske-node {
  cursor: pointer;
}

.ske-node circle {
  fill: #fff;
  stroke: var(--ske-accent);
  stroke-width: 2;
}

.ske-node text {
  fill: #17212b;
  font-size: 12px;
}

.ske-node.is-selected circle {
  fill: #ffe0a3;
  stroke: var(--ske-gold);
  stroke-width: 3;
}

.ske-node.is-dimmed {
  opacity: 0.22;
}

.ske-status {
  min-height: 1.5rem;
}

@media (max-width: 900px) {
  .ske-toolbar,
  .ske-layout {
    grid-template-columns: 1fr;
  }

  .ske-facets {
    grid-template-columns: 1fr;
  }
}

/* Document-record dropdown: keep governance metadata available but quiet. */
.arys-meta {
  margin: 0.4rem 0 1.6rem;
}

.arys-meta details.sd-dropdown {
  background: rgba(13, 35, 56, 0.5);
  border: 1px solid rgba(120, 212, 255, 0.16);
  box-shadow: none;
}

.arys-meta details.sd-dropdown > summary {
  background: transparent;
  color: var(--aiq-muted);
  font-size: 0.82rem;
  padding: 0.35rem 0.8rem;
}

.arys-meta details.sd-dropdown > summary:hover {
  color: #8bdcff;
}

.arys-meta details.sd-dropdown .sd-summary-content,
.arys-meta details.sd-dropdown > div {
  font-size: 0.85rem;
  color: var(--aiq-muted);
}

.arys-meta p {
  margin: 0.3rem 0;
  color: var(--aiq-muted) !important;
  font-size: 0.85rem;
}

.arys-meta strong {
  color: #cfeaff !important;
}

/* Diagram images: drawn for the dark palette. PyData dark mode paints a white
   plate under every img and dims it with a filter; override for SVG art.
   Use [src*=".svg"] because cache-busted export URLs end with ?v=… */
html[data-theme="dark"] .bd-content img[src*=".svg"],
html[data-theme="light"] .bd-content img[src*=".svg"],
.bd-article img[src*=".svg"] {
  width: 100%;
  max-width: 54rem;
  margin: 1.2rem 0;
  background: transparent !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  filter: none !important;
  padding: 0 !important;
}

/* Harness builder */
.hb-shell {
  display: grid;
  gap: 1.2rem;
  margin: 1.4rem 0;
}

.hb-form {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem;
  border: 1px solid rgba(120, 212, 255, 0.24);
  border-radius: 0.6rem;
  background: rgba(13, 35, 56, 0.6);
}

.hb-field {
  display: grid;
  gap: 0.3rem;
}

.hb-label {
  font-weight: 600;
  color: #f4fbff;
}

.hb-hint {
  color: var(--aiq-muted);
}

.hb-form input,
.hb-form textarea {
  background: #071725;
  border: 1px solid rgba(120, 212, 255, 0.3);
  border-radius: 0.4rem;
  color: #d7eefc;
  font: inherit;
  padding: 0.5rem 0.65rem;
}

.hb-form input:focus,
.hb-form textarea:focus {
  outline: 2px solid rgba(24, 168, 255, 0.55);
  outline-offset: 1px;
}

.hb-output {
  display: grid;
  gap: 1rem;
}

.hb-file {
  border: 1px solid rgba(120, 212, 255, 0.24);
  border-radius: 0.6rem;
  overflow: hidden;
}

.hb-file-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.45rem 0.8rem;
  background: #103452;
}

.hb-file-head code {
  background: transparent !important;
  color: #d7f3ff;
}

.hb-file-actions {
  display: flex;
  gap: 0.45rem;
}

.hb-button {
  background: rgba(24, 168, 255, 0.16);
  border: 1px solid rgba(120, 212, 255, 0.4);
  border-radius: 0.35rem;
  color: #b7ebff;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0.2rem 0.7rem;
}

.hb-button:hover {
  background: rgba(24, 168, 255, 0.34);
  color: #eaf9ff;
}

.hb-file-body {
  margin: 0;
  padding: 0.9rem 1rem;
  white-space: pre-wrap;
  font-size: 0.84rem;
}

/* Harness architecture diagrams */
.ha-diagram,
.ha-topology-compare {
  margin: 1.3rem 0 0.45rem;
}

.ha-diagram {
  padding: 1.1rem;
  border: 1px solid rgba(120, 212, 255, 0.24);
  border-radius: 0.75rem;
  background:
    radial-gradient(circle at 15% 0%, rgba(24, 168, 255, 0.12), transparent 38%),
    rgba(5, 22, 36, 0.72);
}

.ha-node,
.ha-branch,
.ha-module,
.ha-topology-card {
  border: 1px solid rgba(120, 212, 255, 0.3);
  border-radius: 0.55rem;
  background: rgba(13, 35, 56, 0.88);
  color: #eefaff;
}

.ha-node,
.ha-branch {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  text-align: center;
}

.ha-node span,
.ha-branch span,
.ha-branch small,
.ha-module span,
.ha-topology-card p {
  color: var(--aiq-muted);
}

.ha-linear,
.ha-routed-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.ha-linear .ha-node {
  flex: 1 1 15rem;
}

.ha-arrow,
.ha-route-arrow {
  flex: 0 0 auto;
  color: #67d5ff;
  font-size: 1.8rem;
  font-weight: 700;
}

.ha-person {
  border-color: rgba(255, 196, 92, 0.48);
  background: rgba(83, 54, 18, 0.45);
}

.ha-runtime {
  border-color: rgba(102, 214, 255, 0.52);
}

.ha-governance {
  border-color: rgba(173, 139, 255, 0.52);
  background: rgba(44, 30, 79, 0.55);
}

.ha-diagram-caption {
  margin: 0 0 1.5rem;
  color: var(--aiq-muted);
  font-size: 0.9rem;
}

.ha-monolith,
.ha-repo-frame {
  padding: 1rem;
  border: 2px solid rgba(255, 196, 92, 0.45);
  border-radius: 0.65rem;
  background: rgba(36, 32, 35, 0.72);
}

.ha-frame-title {
  margin-bottom: 0.75rem;
  color: #fff3d3;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ha-chip-grid,
.ha-module-grid,
.ha-branch-grid {
  display: grid;
  gap: 0.65rem;
}

.ha-chip-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ha-chip-grid span {
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  color: #d9e8f1;
  text-align: center;
}

.ha-mixed-context {
  margin-top: 0.75rem;
  color: #ffcf86;
  font-size: 0.85rem;
  text-align: center;
}

.ha-stack {
  display: grid;
  justify-items: center;
}

.ha-stack > .ha-node,
.ha-stack > .ha-repo-frame {
  width: min(100%, 44rem);
}

.ha-flow-label {
  padding: 0.65rem 0;
  color: #79dcff;
  font-size: 0.85rem;
  text-align: center;
}

.ha-repo-frame {
  border-color: rgba(120, 212, 255, 0.38);
  background: rgba(7, 28, 45, 0.84);
}

.ha-repo-frame .ha-frame-title {
  color: #ccefff;
}

.ha-module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ha-module {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  text-align: center;
}

.ha-routed-head .ha-node {
  flex: 1 1 18rem;
}

.ha-layered {
  display: grid;
  gap: 0;
}

.ha-layered > .ha-node {
  width: 100%;
}

.ha-layered-memory {
  border-color: rgba(255, 104, 180, 0.62);
  background: rgba(104, 25, 76, 0.48);
}

.ha-layered-control {
  border-color: rgba(173, 139, 255, 0.62);
  background: rgba(44, 30, 79, 0.66);
}

.ha-layered-memory small,
.ha-layered-control small {
  color: var(--aiq-muted);
}

.ha-layered .ha-branch-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ha-branch-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ha-branch {
  min-height: 6.5rem;
  align-content: center;
}

.ha-incubator {
  border-color: rgba(255, 196, 92, 0.46);
  background: rgba(83, 54, 18, 0.35);
}

.ha-domain {
  border-color: rgba(85, 220, 178, 0.46);
  background: rgba(15, 67, 58, 0.45);
}

.ha-project {
  border-color: rgba(102, 164, 255, 0.46);
  background: rgba(21, 47, 82, 0.62);
}

.ha-authority-strip,
.ha-federation {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.45rem;
  text-align: center;
}

.ha-authority-strip {
  border: 1px dashed rgba(85, 220, 178, 0.42);
  color: #c8ffea;
}

.ha-authority-strip span,
.ha-federation span {
  color: var(--aiq-muted);
  font-size: 0.84rem;
}

.ha-federation {
  border: 1px dashed rgba(173, 139, 255, 0.46);
  background: rgba(44, 30, 79, 0.32);
  color: #e3d8ff;
}

.ha-topology-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.ha-topology-card {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding: 1rem;
}

.ha-topology-card code {
  display: block;
  padding: 0.75rem;
  border-radius: 0.4rem;
  background: #061522;
  color: #bcecff;
  line-height: 1.45;
}

.ha-topology-card p {
  margin: 0;
}

.ha-kicker {
  color: #7bddff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .ha-linear,
  .ha-routed-head {
    flex-direction: column;
  }

  .ha-arrow {
    transform: rotate(90deg);
  }

  .ha-chip-grid,
  .ha-module-grid,
  .ha-branch-grid,
  .ha-topology-compare {
    grid-template-columns: 1fr;
  }

  .ha-linear .ha-node,
  .ha-routed-head .ha-node {
    width: 100%;
  }
}

/* Memento/context reconstruction diagram */
.mp-board {
  display: grid;
  justify-items: center;
  gap: 0;
  margin: 1.5rem 0 0.5rem;
  padding: 1.1rem;
  border: 1px solid rgba(120, 212, 255, 0.24);
  border-radius: 0.8rem;
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 196, 92, 0.1), transparent 35%),
    radial-gradient(circle at 12% 88%, rgba(24, 168, 255, 0.12), transparent 38%),
    rgba(5, 22, 36, 0.78);
}

.mp-shelf,
.mp-context,
.mp-inference,
.mp-output {
  width: min(100%, 50rem);
  border-radius: 0.6rem;
}

.mp-shelf {
  padding: 0.9rem;
  border: 1px dashed rgba(255, 196, 92, 0.48);
  background: rgba(69, 48, 20, 0.34);
}

.mp-kicker {
  display: block;
  margin-bottom: 0.55rem;
  color: #ffd28d;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.mp-note-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.mp-note {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem;
  border: 1px solid rgba(255, 224, 170, 0.22);
  border-radius: 0.4rem;
  background: rgba(255, 246, 222, 0.08);
  color: #fff3d6;
  text-align: center;
  transform: rotate(-0.35deg);
}

.mp-note:nth-child(even) {
  transform: rotate(0.45deg);
}

.mp-note span,
.mp-context span,
.mp-inference span,
.mp-output span {
  color: var(--aiq-muted);
  font-size: 0.84rem;
}

.mp-flow-label {
  padding: 0.55rem 0;
  color: #79dcff;
  font-size: 0.82rem;
  text-align: center;
}

.mp-context,
.mp-inference,
.mp-output {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem 0.9rem;
  text-align: center;
}

.mp-context {
  border: 1px solid rgba(120, 212, 255, 0.42);
  background: rgba(13, 54, 78, 0.58);
  color: #d8f5ff;
}

.mp-inference {
  width: min(100%, 27rem);
  border: 2px solid rgba(173, 139, 255, 0.54);
  background: rgba(44, 30, 79, 0.58);
  color: #f0eaff;
}

.mp-inference .mp-kicker {
  margin: 0;
  color: #cdbbff;
}

.mp-output {
  border: 1px solid rgba(85, 220, 178, 0.42);
  background: rgba(15, 67, 58, 0.42);
  color: #d8fff2;
}

.mp-caption {
  margin: 0 0 1.5rem;
  color: var(--aiq-muted);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .mp-note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .mp-note-grid {
    grid-template-columns: 1fr;
  }
}

/* Illustrated model / agent / harness expedition */
.exp-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  margin: 1.25rem 0 1.6rem;
}

.exp-panel {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(120, 212, 255, 0.25);
  border-radius: 0.7rem;
  background: rgba(5, 22, 36, 0.82);
  box-shadow: 0 0.8rem 2.2rem rgba(0, 0, 0, 0.24);
}

.exp-panel > img,
.exp-annotated > img {
  display: block;
  width: 100%;
  height: auto;
}

.exp-panel figcaption {
  display: grid;
  gap: 0.12rem;
  min-height: 4.2rem;
  padding: 0.7rem 0.85rem 0.8rem;
  border-top: 1px solid rgba(120, 212, 255, 0.16);
}

.exp-panel figcaption strong {
  color: #effaff;
}

.exp-panel figcaption span,
.exp-image-caption {
  color: var(--aiq-muted);
  font-size: 0.88rem;
}

.exp-annotated {
  position: relative;
  overflow: hidden;
}

.exp-annotated::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 42%, rgba(2, 12, 21, 0.08) 55%, rgba(2, 12, 21, 0.48) 100%);
  content: "";
  pointer-events: none;
}

.exp-lines {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.exp-lines line {
  stroke: #a7ef43;
  stroke-width: 0.32;
  vector-effect: non-scaling-stroke;
}

.exp-lines circle {
  fill: #a7ef43;
  stroke: rgba(4, 18, 28, 0.9);
  stroke-width: 0.18;
  vector-effect: non-scaling-stroke;
}

.exp-label {
  position: absolute;
  z-index: 3;
  display: block;
  max-width: 34%;
  padding: 0.22rem 0.34rem;
  border: 1px solid rgba(167, 239, 67, 0.68);
  border-radius: 0.35rem;
  background: rgba(3, 15, 25, 0.88);
  box-shadow: 0 0.25rem 0.8rem rgba(0, 0, 0, 0.32);
  color: #dce8ee;
  font-size: clamp(0.6rem, 0.85vw, 0.8rem);
  line-height: 1.2;
}

.exp-label strong {
  color: #c7ff78;
  font-size: 1.04em;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.exp-agent { left: 61%; top: 4%; }
.exp-model { left: 66%; top: 17%; }
.exp-control { left: 69%; top: 30%; }
.exp-harness { left: 67%; top: 43%; }
.exp-results { left: 64%; top: 58%; }
.exp-goal { left: 76%; top: 79%; }

.exp-image-caption {
  margin: -0.15rem 0 1.7rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid rgba(167, 239, 67, 0.72);
  background: rgba(5, 22, 36, 0.64);
}

.exp-image-caption strong {
  color: #effaff;
}

@media (max-width: 900px) {
  .exp-compare {
    grid-template-columns: 1fr;
  }

  .exp-label {
    font-size: clamp(0.6rem, 1.75vw, 0.78rem);
  }
}

/* Governed agent–harness feedback loop */
.ap-loop {
  margin: 1.35rem 0 0.4rem;
  padding: 1.05rem;
  border: 1px solid rgba(120, 212, 255, 0.26);
  border-radius: 0.75rem;
  background:
    radial-gradient(circle at 8% 10%, rgba(167, 139, 255, 0.12), transparent 34%),
    radial-gradient(circle at 92% 90%, rgba(255, 196, 92, 0.11), transparent 36%),
    rgba(5, 22, 36, 0.76);
}

.ap-loop-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) auto minmax(7rem, 1fr) auto minmax(7rem, 1fr) auto minmax(7rem, 1fr);
  align-items: stretch;
  gap: 0.55rem;
}

.ap-node {
  display: grid;
  align-content: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.78rem 0.7rem;
  border: 1px solid rgba(120, 212, 255, 0.32);
  border-radius: 0.55rem;
  background: rgba(13, 35, 56, 0.88);
  text-align: center;
}

.ap-node strong {
  color: #effaff;
  font-size: 1.02rem;
}

.ap-node small {
  color: var(--aiq-muted);
  line-height: 1.35;
}

.ap-kicker {
  color: #80ddff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.ap-harness {
  border-color: rgba(173, 139, 255, 0.5);
  background: rgba(44, 30, 79, 0.5);
}

.ap-agent {
  border-color: rgba(120, 212, 255, 0.54);
}

.ap-results {
  border-color: rgba(85, 220, 178, 0.46);
  background: rgba(15, 67, 58, 0.38);
}

.ap-review {
  border-color: rgba(255, 196, 92, 0.52);
  background: rgba(83, 54, 18, 0.4);
}

.ap-arrow {
  display: grid;
  place-content: center;
  min-width: 2.4rem;
  color: #69d5ff;
  text-align: center;
}

.ap-arrow strong {
  font-size: 1.45rem;
  line-height: 1;
}

.ap-arrow span {
  color: var(--aiq-muted);
  font-size: 0.64rem;
  writing-mode: vertical-rl;
}

.ap-return {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.85rem;
  padding: 0.55rem 0.85rem;
  border-top: 1px dashed rgba(167, 239, 67, 0.42);
  color: #c7ff78;
  font-size: 0.78rem;
  text-align: center;
}

.ap-return span {
  font-size: 1.35rem;
}

.ap-caption {
  margin: 0 0 1.55rem;
  color: var(--aiq-muted);
  font-size: 0.9rem;
}

.ap-caption strong {
  color: #effaff;
}

@media (max-width: 1500px) {
  .ap-loop-row {
    grid-template-columns: 1fr;
  }

  .ap-arrow {
    min-height: 2.2rem;
  }

  .ap-arrow strong {
    transform: rotate(90deg);
  }

  .ap-arrow span {
    writing-mode: horizontal-tb;
  }
}

.orbit-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 1.8rem;
}

.orbit-visual-card {
  margin: 0;
  padding: 0.7rem;
  border: 1px solid rgba(100, 207, 241, 0.22);
  border-radius: 0.7rem;
  background: rgba(9, 28, 44, 0.72);
}

.orbit-visual-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0.45rem;
}

.orbit-visual-card figcaption {
  margin: 0.65rem 0.15rem 0.15rem;
  color: var(--aiq-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.orbit-visual-card figcaption strong {
  color: #effaff;
}

@media (max-width: 900px) {
  .orbit-visual-grid {
    grid-template-columns: 1fr;
  }
}

/* Keep navigation controls reachable on narrow screens. */
@media (max-width: 575.98px) {
  .bd-header .navbar-header-items__start {
    flex: 1 1 auto;
    min-width: 0;
  }

  .bd-header .navbar-brand {
    display: flex;
    gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .bd-header .navbar-brand img {
    width: 2.6rem;
    margin-right: 0;
    flex-shrink: 0;
  }

  .bd-header .logo__title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
  }
}
