/* Knotbind design system. Dashboard palette is centralized below.
   Change these tokens to restyle the whole dashboard and docs site. */

@font-face {
  font-family: "Mona Sans";
  src: url("/fonts/MonaSans-Variable.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* ---------- Dashboard theme: soft evergreen ---------- */
  --pine: #10241f; /* page background */
  --pine-deep: #0b1b17; /* deepest surfaces / code */
  --forest: #18332b; /* cards and panels */
  --forest-2: #214438; /* raised controls */
  --moss: #355b4d; /* borders and separators */
  --paper: #e8eef9;
  --paper-ink: #0b1b17;
  --sage: #bbd2c7;
  --sage-dim: #8da99a;
  --brass: #67dfb1; /* primary accent */
  --brass-hi: #9aefce;
  --violet: #8b7cff;
  --glow:
    0 0 0 1px rgba(103, 223, 177, 0.3), 0 0 24px rgba(103, 223, 177, 0.12);
  /* Request flow diagram scale. 1 = native SVG size; adjust in one place. */
  --flow-scale: 1.4;
  --mint: #79dfa8;
  --amber: #f0c96d;
  --coral: #ff917e;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 22px;
  --max: 1200px;
  /* Sticky site header height, used to pin table headers below it. */
  --header-h: 71px;
  --sans: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--pine);
  color: var(--paper);
  font: 400 17px/1.6 var(--sans);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration-color: var(--moss);
  text-underline-offset: 4px;
}
a:hover {
  text-decoration-color: var(--brass);
}
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 3px;
}
::selection {
  background: var(--brass);
  color: var(--pine-deep);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 50;
  background: var(--brass);
  color: var(--pine-deep);
  padding: 0.5rem 0.9rem;
  font-weight: 650;
  border-radius: var(--r-sm);
}
.skip:focus {
  top: 1rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Type scale (perfect fourth from 17px). Display uses the expanded width. */
h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.display {
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  font-stretch: 118%;
  font-weight: 720;
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
  font-stretch: 112%;
}
h3 {
  font-size: 1.27rem;
  font-stretch: 106%;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
  text-wrap: pretty;
}
.lede {
  font-size: clamp(1.08rem, 1.5vw, 1.27rem);
  color: var(--sage);
  max-width: 58ch;
}
.muted {
  color: var(--sage);
}
.dim {
  color: var(--sage-dim);
}
.mono,
code,
kbd,
pre {
  font-family: var(--mono);
}
.label {
  font-size: 0.86rem;
  color: var(--sage);
  font-weight: 500;
}
.kicker {
  font-size: 1rem;
  color: var(--brass);
  font-weight: 600;
  font-stretch: 106%;
}

/* Headlines: emphasis comes from width, never from a coloured word */
.display span,
.display .accent {
  display: block;
  color: inherit;
}
.display .accent {
  font-stretch: 125%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--moss);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font: 600 0.97rem/1 var(--sans);
  font-stretch: 104%;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.btn:hover {
  border-color: var(--sage);
}
.btn-primary {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--pine-deep);
}
.btn-primary:hover {
  background: var(--brass-hi);
  border-color: var(--brass-hi);
}
.btn-small {
  min-height: 38px;
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
}
.btn[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
}
.to-top {
  display: none;
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 30;
  width: 46px;
  height: 46px;
  border: 1px solid var(--moss);
  border-radius: 50%;
  background: var(--forest-2);
  color: var(--paper);
  box-shadow: var(--glow);
  cursor: pointer;
  font: 700 1.25rem/1 var(--sans);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}
.to-top.is-visible {
  display: grid;
  place-items: center;
  opacity: 1;
  transform: translateY(0);
}
.to-top:hover {
  background: var(--brass);
  color: var(--pine-deep);
  border-color: var(--brass);
}
@media (max-width: 1040px) {
  .to-top {
    display: none !important;
  }
}
.on-paper .btn {
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid color-mix(in srgb, var(--moss) 60%, transparent);
  background: color-mix(in srgb, var(--pine) 88%, transparent);
  backdrop-filter: blur(12px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 1.25rem;
}
.site-header .brand-logo {
  height: 2.35rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 750;
  font-stretch: 115%;
  font-size: 1.12rem;
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: auto;
  height: 2rem;
  filter: grayscale(1) brightness(0) invert(1);
}
.brand svg {
  width: 30px;
  height: 30px;
}
.nav {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}
.nav-group-menu {
  position: relative;
}
.nav-group-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--sage);
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 600;
  list-style: none;
}
.nav-group-menu summary::-webkit-details-marker {
  display: none;
}
.nav-group-menu summary span {
  color: var(--brass);
  font-size: 0.85rem;
  transition: transform 160ms ease;
}
.nav-group-menu[open] summary,
.nav-group-menu summary:hover {
  border-color: var(--moss);
  background: color-mix(in srgb, var(--forest) 75%, transparent);
  color: var(--paper);
}
.nav-group-menu[open] summary span {
  transform: rotate(180deg);
}
.nav-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.55rem);
  left: 0;
  display: grid;
  min-width: 220px;
  gap: 0.15rem;
  padding: 0.5rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--pine-deep) 96%, black);
  box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 28%);
}
.nav-panel a {
  padding: 0.65rem 0.75rem;
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.nav-panel a:hover,
.nav-panel a[aria-current="page"] {
  background: var(--forest);
  color: var(--paper);
}
.nav a {
  text-decoration: none;
  color: var(--sage);
  font-size: 0.94rem;
  font-weight: 500;
}
/* Direct section links in the menubar match the dropdown summary look. */
.nav > a.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-weight: 600;
  white-space: nowrap;
}
.nav > a.nav-link:hover,
.nav > a.nav-link[aria-current="page"] {
  border-color: var(--moss);
  background: color-mix(in srgb, var(--forest) 75%, transparent);
  color: var(--paper);
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--paper);
}
.nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--brass);
  padding-bottom: 4px;
}
.nav-cta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
@media (max-width: 1040px) {
  .nav {
    display: none;
  }
}
@media (max-width: 480px) {
  /* Hide only the direct Sign in button; the menu toggle lives in details.menu. */
  .nav-cta > .btn:not(.btn-primary) {
    display: none;
  }
}

/* Sections */
.section {
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
}
.section + .section {
  border-top: 1px solid color-mix(in srgb, var(--moss) 55%, transparent);
}
.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.8rem);
  max-width: 50rem;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}
/* Keep the architecture section on the same mesh-backed surface as the rest
   of the homepage. The old dark overlay made this block visibly dimmer and
   hid the page-wide particle mesh behind the ring. */
.on-paper {
  position: relative;
  isolation: isolate;
  background: transparent;
  color: var(--paper);
}
.on-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 14% 24%,
      rgba(103, 223, 177, 0.055),
      transparent 24rem
    ),
    radial-gradient(
      circle at 86% 72%,
      rgba(77, 225, 255, 0.045),
      transparent 26rem
    );
}
.on-paper .lede,
.on-paper .muted,
.on-paper .label {
  color: var(--sage);
}
.on-paper .kicker {
  color: var(--brass);
}

/* Hero */
.hero {
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3.5rem, 7vw, 5.5rem);
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  position: relative;
  display: grid;
  gap: 1.6rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-copy {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hero-note {
  font-size: 0.92rem;
  color: var(--sage-dim);
}
.agent-quickstart {
  display: grid;
  gap: 0.6rem;
  max-width: 38rem;
  margin-top: 1.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--forest) 70%, transparent);
}
.agent-quickstart-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.88rem;
}
.agent-quickstart code {
  display: block;
  overflow-x: auto;
  padding: 0.6rem 0.7rem;
  border-radius: var(--r-sm);
  background: var(--pine);
  color: var(--sage);
  font: 0.78rem var(--mono);
}
.agent-quickstart a {
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 700;
}
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Lists of plain items (not sequences) */
.items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.items > div {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding-top: 1.2rem;
  border-top: 2px solid var(--moss);
}
.on-paper .items > div {
  border-top-color: var(--moss);
}
@media (max-width: 900px) {
  .items {
    grid-template-columns: 1fr;
  }
}

/* Sequences: numbered rows and the loop */
.rows {
  border-top: 1px solid var(--moss);
}
.row {
  display: grid;
  grid-template-columns: 4rem 1fr 1.4fr;
  gap: 1.5rem;
  padding-block: 1.7rem;
  border-bottom: 1px solid var(--moss);
  align-items: baseline;
}
.row .num {
  font: 600 0.95rem var(--sans);
  color: var(--brass);
  font-variant-numeric: tabular-nums;
}
.row p {
  color: var(--sage);
}
@media (max-width: 760px) {
  .row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}
.loop-container {
  position: relative;
}
.loop-arrows {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.loop {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 2.5vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  position: relative;
  z-index: 1;
}
.loop li {
  position: relative;
  padding: clamp(1.5rem, 2.2vw, 2rem);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--forest) 0%, var(--pine-deep) 100%);
  border: 1px solid var(--moss);
  display: grid;
  gap: 0.6rem;
  align-content: start;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  z-index: 1;
}
.loop li:hover {
  transform: translateY(-4px);
  border-color: var(--brass);
  box-shadow:
    0 0 0 1px rgba(103, 223, 177, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 32px rgba(103, 223, 177, 0.08);
}
.loop li::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  background: radial-gradient(
    circle at 50% 0%,
    rgba(103, 223, 177, 0.05),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.loop li:hover::before {
  opacity: 1;
}
.loop .num {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--brass);
  background: rgba(103, 223, 177, 0.12);
  border: 1px solid rgba(103, 223, 177, 0.25);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  position: relative;
  transition:
    background 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
}
.loop .num::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(103, 223, 177, 0.4),
    transparent 70%
  );
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.loop li:hover .num {
  background: rgba(103, 223, 177, 0.2);
  transform: scale(1.12);
  box-shadow:
    0 0 0 2px rgba(103, 223, 177, 0.2),
    0 0 16px rgba(103, 223, 177, 0.4);
  animation: pulse-badge 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.loop li:hover .num::before {
  opacity: 1;
  transform: scale(1.2);
}
@keyframes pulse-badge {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(103, 223, 177, 0.2),
      0 0 16px rgba(103, 223, 177, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(103, 223, 177, 0.3),
      0 0 24px rgba(103, 223, 177, 0.6);
  }
}
.loop .type-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  background: rgba(5, 7, 12, 0.7);
  border: 1px solid rgba(103, 223, 177, 0.15);
  border-radius: 999px;
  opacity: 0.6;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.loop li:hover .type-badge {
  opacity: 1;
  transform: scale(1.1);
}
.loop li[data-type="system"] .type-badge {
  color: var(--sage-dim);
}
.loop li[data-type="ai"] .type-badge {
  color: var(--brass);
}
.loop li[data-type="human"] .type-badge {
  color: #38bdf8;
}
.loop h3 {
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--paper);
  letter-spacing: -0.01em;
}
.loop p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--sage-dim);
}
@media (max-width: 900px) {
  .loop {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .loop {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 2.5rem;
  }
  .loop::before {
    content: "";
    position: absolute;
    left: 1.3rem;
    top: 2rem;
    bottom: 2rem;
    width: 2px;
    background: linear-gradient(
      to bottom,
      rgba(103, 223, 177, 0.2),
      rgba(103, 223, 177, 0.4) 50%,
      rgba(103, 223, 177, 0.2)
    );
  }
  .loop li {
    position: relative;
    padding: 1.5rem 0 1.5rem 1.5rem;
    background: transparent;
    border: none;
  }
  .loop li::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: 50%;
    width: 10px;
    height: 10px;
    background: rgba(103, 223, 177, 0.3);
    border: 2px solid var(--brass);
    border-radius: 999px;
    transform: translateY(-50%);
    transition: all 0.3s ease;
  }
  .loop li:hover::before {
    background: rgba(103, 223, 177, 0.6);
    box-shadow: 0 0 12px rgba(103, 223, 177, 0.6);
    transform: translateY(-50%) scale(1.3);
  }
  .loop .num {
    position: absolute;
    left: -2.2rem;
    top: 1.7rem;
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
  }
  .loop .type-badge {
    top: 1.5rem;
    right: 0;
  }
  .loop li:hover {
    transform: translateX(4px);
    background: rgba(103, 223, 177, 0.04);
    border-left: 2px solid rgba(103, 223, 177, 0.3);
  }
}

/* Services: each has a different weight, so a deliberate asymmetric grid */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.2rem, 2vw, 1.8rem);
}
.service {
  border-radius: var(--r-lg);
  padding: clamp(1.8rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: linear-gradient(135deg, var(--forest) 0%, var(--pine-deep) 100%);
  border: 1px solid var(--moss);
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  background: radial-gradient(
    circle at 50% 0%,
    rgba(103, 223, 177, 0.04),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.service:hover {
  border-color: var(--brass);
  box-shadow:
    0 0 0 1px rgba(103, 223, 177, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}
.service:hover::before {
  opacity: 1;
}
.service.lead {
  grid-row: span 3;
  background: linear-gradient(160deg, #0f1d36, var(--forest));
  border-color: rgba(103, 223, 177, 0.2);
  box-shadow:
    0 0 0 1px rgba(103, 223, 177, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.25);
}
.service.lead:hover {
  box-shadow:
    0 0 0 1px rgba(103, 223, 177, 0.25),
    0 8px 28px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(103, 223, 177, 0.06);
}
.service-badge {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: rgba(103, 223, 177, 0.14);
  border: 1px solid rgba(103, 223, 177, 0.35);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}
.service h3 {
  font-size: clamp(1.15rem, 1.5vw, 1.3rem);
  font-weight: 650;
  color: var(--paper);
  letter-spacing: -0.01em;
  margin: 0;
}
.service .muted {
  line-height: 1.6;
  margin: 0;
}
.service.lead .muted,
.service.lead li {
  color: var(--sage);
}
.service ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.service li {
  padding-left: 1.3rem;
  position: relative;
  color: var(--sage);
  font-size: 0.95rem;
  line-height: 1.5;
}
.service li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 2px;
  background: var(--brass);
  border-radius: 1px;
}
.service .from {
  font-weight: 650;
  font-stretch: 108%;
  color: var(--brass);
  font-size: 0.92rem;
  margin-top: auto;
  padding-top: 0.5rem;
}
.service a.more {
  display: none;
}
.service-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  background: rgba(103, 223, 177, 0.12);
  border: 1px solid rgba(103, 223, 177, 0.35);
  border-radius: 999px;
  color: var(--brass);
  font-weight: 650;
  font-size: 0.94rem;
  text-decoration: none;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease;
  width: 100%;
  margin-top: auto;
}
.service-cta:hover {
  background: rgba(103, 223, 177, 0.2);
  border-color: var(--brass);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(103, 223, 177, 0.15);
}
.service-cta svg {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.service-cta:hover svg {
  transform: translateX(4px);
}
.modules-head {
  margin-top: clamp(3rem, 6vw, 5rem);
}
.services.modules {
  grid-template-columns: repeat(6, 1fr);
}
.services.modules > .service {
  grid-column: span 2;
}
/* Five cards: the last pair sits in the middle of the row, not on the left. */
.services.modules > .service:nth-child(3n + 1):nth-last-child(2) {
  grid-column: 2 / span 2;
}
.offers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.2rem, 2vw, 1.8rem);
}
.offer {
  border: 1px solid var(--moss);
  border-radius: var(--r-lg);
  background: var(--forest);
  padding: clamp(1.4rem, 2.4vw, 2rem);
  display: grid;
  gap: 0.8rem;
  align-content: start;
}
.offer h3 {
  margin: 0;
}
.offer p {
  margin: 0;
}
.offer-pain {
  color: var(--paper);
  border-left: 2px solid var(--brass);
  padding-left: 0.8rem;
}
@media (max-width: 900px) {
  .services,
  .services.modules,
  .offers {
    grid-template-columns: 1fr;
  }
  .services.modules > .service,
  .services.modules > .service:nth-child(3n + 1):nth-last-child(2) {
    grid-column: auto;
  }
  .service.lead {
    grid-row: auto;
  }
}

/* Agent section: symmetric 2×2 grid, no lead card */
#agents .services {
  grid-template-columns: repeat(2, 1fr);
}
#agents .service {
  grid-row: auto;
}
@media (max-width: 900px) {
  #agents .services {
    grid-template-columns: 1fr;
  }
}

/* Panels */
.panel {
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--pine-deep);
  padding: 1.5rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.grid-3 > * {
  background: var(--forest);
  border-radius: var(--r-md);
  padding: 1.6rem;
  display: grid;
  gap: 0.7rem;
  align-content: start;
}
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Pricing */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.price {
  background: var(--forest);
  border-radius: var(--r-lg);
  padding: 1.9rem 1.6rem;
  display: grid;
  gap: 1rem;
  align-content: start;
}
.price.featured {
  background: linear-gradient(160deg, #0f1d36, var(--forest));
  box-shadow: var(--glow);
}
.price.featured li {
  color: var(--sage);
}
.price .amount {
  font: 750 2.3rem/1 var(--sans);
  font-stretch: 112%;
  letter-spacing: -0.02em;
}
.price .amount small {
  font: 500 0.88rem var(--sans);
  color: var(--sage);
  letter-spacing: 0;
}
.price.featured .amount small {
  color: var(--sage);
}
.price ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: 0.94rem;
  color: var(--sage);
}
.price li {
  padding-left: 1.1rem;
  position: relative;
}
.price li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 2px;
  background: var(--brass);
}
.price.featured .btn {
  background: var(--brass);
  color: var(--pine-deep);
  border-color: var(--brass);
}

/* FAQ */
.faq {
  border-top: 1px solid var(--moss);
}
.faq details {
  border-bottom: 1px solid var(--moss);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.35rem;
  font: 600 1.12rem/1.4 var(--sans);
  font-stretch: 104%;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--brass);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1;
}
.faq details[open] summary::after {
  content: "\2212";
}
.faq .answer {
  padding: 0 0 1.5rem;
  color: var(--sage);
  max-width: 68ch;
}

/* CTA + footer */
.cta {
  background:
    radial-gradient(
      ellipse at 20% 0%,
      rgba(77, 225, 255, 0.14),
      transparent 60%
    ),
    color-mix(in srgb, var(--pine-deep) 72%, transparent);
  border-top: 1px solid var(--moss);
}
.cta .wrap {
  padding-block: clamp(4rem, 8vw, 6.5rem);
  display: grid;
  gap: 1.4rem;
  justify-items: start;
}
.cta .lede {
  color: var(--sage);
}
.site-footer {
  padding-block: 3.5rem 2.5rem;
  color: var(--sage-dim);
  font-size: 0.92rem;
  background: color-mix(in srgb, var(--pine-deep) 72%, transparent);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem;
}
.foot-grid h2 {
  font-size: 0.95rem;
  font-stretch: 104%;
  color: var(--paper);
  margin-bottom: 0.8rem;
  letter-spacing: 0;
}
.foot-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.foot-grid a {
  text-decoration: none;
}
.foot-grid a:hover {
  color: var(--paper);
}
.foot-badge {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--moss);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.foot-badge img {
  display: block;
  width: 240px;
  height: auto;
}
.foot-badge h2 {
  font-size: 0.95rem;
  color: var(--paper);
  margin-bottom: 0.4rem;
  letter-spacing: 0;
}
.foot-badge p {
  margin: 0 0 0.7rem;
  max-width: 60ch;
}
.foot-badge pre {
  margin: 0 0 0.7rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--moss);
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-all;
}
@media (max-width: 800px) {
  .foot-badge {
    grid-template-columns: 1fr;
  }
}
.foot-base {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--moss);
}
@media (max-width: 800px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Forms */
[hidden] {
  display: none;
}
.form {
  display: grid;
  gap: 1.1rem;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--paper);
}
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--pine);
  color: var(--paper);
  font: 1rem var(--sans);
}
.field textarea {
  min-height: 130px;
  resize: vertical;
}
.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--brass);
  outline-offset: 0;
  border-color: transparent;
}
.notice {
  padding: 0.9rem 1rem;
  border: 1px solid var(--moss);
  border-left: 3px solid var(--mint);
  border-radius: var(--r-sm);
  background: var(--pine-deep);
}
.notice.error {
  border-left-color: var(--coral);
}
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.auth .panel {
  width: min(100%, 420px);
  display: grid;
  gap: 1.5rem;
}

/* Dashboard shell */
.app {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--moss);
  background: var(--pine-deep);
  padding: 1.3rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.side nav {
  display: grid;
  gap: 0.2rem;
}
.side nav a {
  padding: 0.6rem 0.75rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--sage);
  font-size: 0.94rem;
  font-weight: 500;
}
.side nav a:hover {
  background: var(--forest);
  color: var(--paper);
}
.side nav a[aria-current="page"] {
  background: var(--forest-2);
  color: var(--paper);
  box-shadow: inset 2px 0 0 var(--brass);
}
.side .foot {
  margin-top: auto;
  display: grid;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--sage-dim);
}
.main {
  min-width: 0;
  overflow-x: clip;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 2rem;
  border-bottom: 1px solid var(--moss);
  flex-wrap: wrap;
}
.topbar h1 {
  font-size: 1.45rem;
  font-stretch: 110%;
}
.content {
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
}
.purpose {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--moss);
  border-left: 3px solid var(--brass);
  background: var(--forest);
}
.purpose h2 {
  font-size: 1.4rem;
  margin: 0.25rem 0 0.45rem;
}
.purpose p {
  max-width: 72ch;
  font-size: 0.92rem;
}
.purpose-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: end;
  font: 0.72rem var(--mono);
  color: var(--brass);
  white-space: nowrap;
}
.purpose-steps span + span::before {
  content: ">";
  margin-right: 0.35rem;
  color: var(--sage-dim);
}
@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
  }
  .side {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--moss);
  }
  .side .foot {
    margin-top: 0;
  }
  .content,
  .topbar {
    padding-inline: 1.1rem;
  }
  .purpose {
    align-items: start;
    flex-direction: column;
  }
  .purpose-steps {
    justify-content: start;
    white-space: normal;
  }
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: 600 0.82rem var(--sans);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--forest);
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status.healthy,
.status.passed,
.status.resolved {
  color: var(--mint);
}
.status.suspect,
.status.pending,
.status.diagnosed,
.status.drafted,
.status.verified {
  color: var(--amber);
}
.status.failing,
.status.failed,
.status.open,
.status.stale {
  color: var(--coral);
}
.status.none,
.status.dismissed,
.status.applied,
.status.approved {
  color: var(--sage);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.stat {
  background: var(--forest);
  border-radius: var(--r-md);
  padding: 1.1rem 1.2rem;
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}
.stat > strong,
.stat > .muted,
.stat > .mono,
.stat > .stat-small {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat strong {
  font: 700 1.45rem/1 var(--sans);
  font-stretch: 110%;
}
.gateway-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.gateway-card {
  padding: 1rem;
  border: 1px solid var(--moss);
  border-top: 3px solid var(--cyan);
  border-radius: var(--r-sm);
  background: var(--forest);
}
.gateway-card > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}
.gateway-card p {
  margin-top: 0.7rem;
  font-size: 0.84rem;
}
.gateway-models {
  overflow-wrap: anywhere;
  color: var(--brass);
}
.gateway-access-panel {
  overflow: hidden;
}
.gateway-key-form {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.8rem;
  margin: 1.2rem 0 1.5rem;
  padding: 1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--forest);
}
.gateway-field {
  display: grid;
  gap: 0.35rem;
}
.gateway-field label {
  color: var(--sage);
  font-size: 0.78rem;
  font-weight: 650;
}
.gateway-field label span {
  color: var(--sage-dim);
  font-weight: 400;
}
.gateway-create {
  white-space: nowrap;
  min-height: 42px;
}
.gateway-key-list {
  border-top: 1px solid var(--moss);
  padding-top: 1rem;
}
.gateway-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.gateway-empty {
  display: grid;
  gap: 0.25rem;
  padding: 1.3rem;
  border: 1px dashed var(--moss);
  border-radius: var(--r-sm);
  color: var(--sage);
}
.gateway-empty strong {
  color: var(--paper);
}
@media (max-width: 820px) {
  .gateway-key-form {
    grid-template-columns: 1fr 1fr;
  }
  .gateway-create {
    grid-column: 1 / -1;
  }
}
@media (max-width: 520px) {
  .gateway-key-form {
    grid-template-columns: 1fr;
  }
  .gateway-create {
    grid-column: auto;
  }
}
.gateway-lede {
  max-width: 75ch;
  font-size: 0.95rem;
}
.gateway-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1.2rem;
}
.gateway-benefits article {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--forest);
}
.gateway-benefits strong {
  color: var(--paper);
}
.gateway-benefits span {
  color: var(--sage);
  font-size: 0.8rem;
  line-height: 1.35;
}
.gateway-status-details {
  margin-top: 1rem;
  border-top: 1px solid var(--moss);
  padding-top: 0.8rem;
}
.gateway-status-details summary {
  cursor: pointer;
  color: var(--brass);
  font-weight: 650;
}
@media (max-width: 900px) {
  .gateway-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .gateway-benefits {
    grid-template-columns: 1fr;
  }
}
.stat-chart {
  min-width: 12rem;
}
.mini-bars {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 26px;
  margin-top: 0.7rem;
}
.mini-bars i {
  display: block;
  width: 7px;
  min-height: 5px;
  border-radius: 2px 2px 0 0;
}
.bar-pass {
  height: 22px;
  background: #39c98a;
}
.bar-fail {
  height: 10px;
  background: var(--coral);
}
@media (max-width: 900px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
}
.pipeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pipeline li {
  padding: 0.8rem 1rem;
  border-radius: var(--r-sm);
  background: var(--pine-deep);
  border: 1px solid var(--moss);
  display: grid;
  gap: 0.2rem;
  font-size: 0.88rem;
  color: var(--sage-dim);
}
.pipeline li.done {
  color: var(--sage);
  border-color: var(--forest-2);
}
.pipeline li.done .num {
  color: var(--mint);
}
.pipeline li.current {
  background: var(--forest-2);
  color: var(--paper);
  border-color: var(--brass);
}
.pipeline .num {
  font-weight: 650;
  color: var(--brass);
}
@media (max-width: 900px) {
  .pipeline {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
.cols > .panel {
  height: 100%;
}
.overview-checks {
  grid-template-columns: 1fr;
}
.finding-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}
.finding-heading h2 {
  justify-content: start;
  margin: 0.25rem 0 1rem;
}
.finding-updated {
  font: 0.78rem var(--mono);
  text-align: right;
}
.finding-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem 1.5rem;
  align-items: start;
}
.finding-primary {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.finding-primary > strong {
  font-size: 1.08rem;
  line-height: 1.45;
}
.finding-facts {
  display: grid;
  gap: 0.6rem;
  margin: 0;
}
.finding-facts > div {
  display: grid;
  grid-template-columns: minmax(105px, 0.35fr) minmax(0, 1fr);
  gap: 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--moss) 65%, transparent);
}
.finding-facts dt {
  color: var(--sage-dim);
  font-size: 0.8rem;
}
.finding-facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}
.finding-evidence,
.finding-grid > .diff,
.finding-grid > .notice {
  grid-column: 1 / -1;
}
.finding-evidence summary {
  color: var(--cyan);
  cursor: pointer;
}
.finding-evidence pre {
  max-height: 9rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 0.8rem;
  border-radius: var(--r-sm);
  background: var(--pine);
  color: var(--sage);
}
.finding-summary {
  display: flex;
  align-items: start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--forest) 65%, transparent);
}
.finding-mark {
  display: grid;
  place-items: center;
  flex: 0 0 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--mint);
  color: var(--pine-deep);
  font-weight: 800;
}
.finding-healthy p {
  margin: 0.35rem 0 0;
  color: var(--sage-dim);
  font-size: 0.9rem;
}
@media (max-width: 1100px) {
  .cols {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .finding-grid {
    grid-template-columns: 1fr;
  }
  .finding-grid > * {
    grid-column: 1;
  }
  .finding-heading {
    flex-direction: column;
  }
  .finding-updated {
    text-align: left;
  }
}
.panel h2 {
  font-size: 1.05rem;
  font-stretch: 106%;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.actions form {
  margin: 0;
}
.diff {
  display: grid;
  gap: 0.4rem;
  font: 0.84rem/1.6 var(--mono);
}
.diff .del {
  color: var(--coral);
}
.diff .add {
  color: var(--mint);
}
.diff code {
  display: block;
  padding: 0.5rem 0.7rem;
  background: var(--pine);
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th {
  text-align: left;
  font: 600 0.82rem var(--sans);
  color: var(--sage-dim);
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--moss);
}
.table td {
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--moss);
  vertical-align: top;
}
.table td.mono {
  font-size: 0.8rem;
  color: var(--sage);
}
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}
.timeline li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--moss);
  font-size: 0.9rem;
}
.timeline time {
  font: 0.78rem var(--mono);
  color: var(--sage-dim);
}
.timeline .who {
  font-weight: 650;
  color: var(--brass);
  margin-right: 0.45rem;
}
.empty {
  color: var(--sage-dim);
  font-size: 0.94rem;
  padding: 1rem 0;
}
.finding-purpose {
  font-size: 0.86rem;
  margin: -0.45rem 0 1rem;
  max-width: 70ch;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Mobile menu (shown when the main nav collapses) */
.menu {
  position: relative;
  display: none;
}
.menu-icon {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  position: relative;
}
.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease;
}
.menu-icon::before {
  top: 4px;
}
.menu-icon::after {
  bottom: 4px;
}
details[open] .menu-icon::before {
  transform: rotate(45deg) translate(5px, 5px);
}
details[open] .menu-icon::after {
  transform: rotate(-45deg) translate(5px, -5px);
}
.menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 220px;
  display: grid;
  gap: 0.1rem;
  padding: 0.5rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--pine-deep);
}
.menu .nav-group-menu {
  position: static;
}
.menu .nav-group-menu summary {
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.7rem;
}
.menu .nav-panel {
  position: static;
  min-width: 0;
  padding: 0 0 0.25rem 0.7rem;
  border: 0;
  box-shadow: none;
}
.menu nav a {
  padding: 0.6rem 0.7rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--sage);
}
.menu nav a:hover,
.menu nav a[aria-current="page"] {
  background: var(--forest);
  color: var(--paper);
}
@media (max-width: 1040px) {
  .menu {
    display: block;
  }
}

/* ---------- Tech hero: interactive grid ---------- */
.hero {
  isolation: isolate;
  border-bottom: 1px solid var(--moss);
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(var(--moss) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--moss) 1px, transparent 1px) 0 0 / 44px 44px;
  opacity: 0.35;
  mask-image: radial-gradient(
    ellipse 80% 70% at 50% 40%,
    #000 30%,
    transparent 100%
  );
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  z-index: 2;
}
.phone-wrap {
  position: relative;
  z-index: 3;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -20% -10% auto auto;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(
    circle,
    rgba(77, 225, 255, 0.12),
    rgba(139, 124, 255, 0.08) 40%,
    transparent 70%
  );
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  padding: 0.4rem 0.8rem 0.4rem 0.5rem;
  border: 1px solid var(--moss);
  border-radius: 999px;
  background: rgba(12, 19, 34, 0.7);
  font: 500 0.84rem var(--sans);
  color: var(--sage);
}
.badge .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(143, 214, 175, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(143, 214, 175, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(143, 214, 175, 0);
  }
}
.display .accent {
  background: linear-gradient(90deg, var(--brass), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kicker {
  color: var(--brass);
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 500;
  font-stretch: 100%;
}
.btn-primary {
  /* The glow matches the button's own colour. A cyan halo on a brass button
     reads as a rendering fault. */
  box-shadow: 0 0 24px rgba(103, 223, 177, 0.28);
}
.protocols {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.protocols li {
  font: 500 0.78rem var(--mono);
  color: var(--sage);
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  padding: 0.3rem 0.55rem;
  background: rgba(4, 7, 13, 0.6);
}

/* ---------- Phone simulation ---------- */
.phone-wrap {
  display: grid;
  justify-items: center;
  gap: 1rem;
  min-width: 0;
}
.phone {
  position: relative;
  width: min(100%, 390px);
  aspect-ratio: 390 / 812;
  padding: 13px;
  border-radius: 62px;
  background: linear-gradient(145deg, #2a3142, #0d1018 45%, #22293a);
  box-shadow:
    inset 0 0 0 1.5px #4a5470,
    inset 0 0 0 4px #0b0e15,
    0 40px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(77, 225, 255, 0.12);
}
.phone::before,
.phone::after {
  content: "";
  position: absolute;
  width: 4px;
  border-radius: 2px;
  background: #2c3346;
}
.phone::before {
  left: -3px;
  top: 150px;
  height: 64px;
  box-shadow:
    0 -60px 0 -0px #2c3346,
    0 80px 0 0 #2c3346;
}
.phone::after {
  right: -3px;
  top: 200px;
  height: 96px;
}
.screen {
  position: relative;
  height: 100%;
  border-radius: 50px;
  overflow: hidden;
  background: #0b0f17;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}
.island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 34px;
  border-radius: 20px;
  background: #000;
  z-index: 3;
}
.statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 30px 0;
  height: 54px;
  font: 600 15px var(--sans);
  color: #fff;
}
.statusbar .icons {
  display: flex;
  gap: 6px;
  align-items: center;
}
.statusbar svg {
  width: 18px;
  height: 12px;
}
.app-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.1rem 0.8rem;
  border-bottom: 1px solid #1a2233;
}
.app-head .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brass), var(--violet));
  color: #04070d;
  font-weight: 800;
  font-size: 0.8rem;
}
.app-head b {
  display: block;
  font-size: 0.95rem;
}
.app-head small {
  color: var(--mint);
  font-size: 0.75rem;
}
.chat {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 0.9rem;
  overflow: hidden;
  justify-content: flex-end;
}
.msg {
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.4;
  animation: msg-in 0.35s ease-out both;
}
.msg.user {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 6px;
}
.msg.bot {
  align-self: flex-start;
  background: #1a2233;
  color: #e8eef9;
  border-bottom-left-radius: 6px;
}
.msg.tool {
  align-self: stretch;
  max-width: none;
  font: 0.74rem/1.5 var(--mono);
  color: var(--brass);
  background: rgba(77, 225, 255, 0.07);
  border: 1px dashed rgba(77, 225, 255, 0.35);
  border-radius: 12px;
}
.msg.tool .ok {
  color: var(--mint);
}
.msg.tool .bad {
  color: var(--coral);
}
.msg.typing {
  display: inline-flex;
  gap: 4px;
  padding: 0.8rem 0.9rem;
}
.msg.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  animation: blink 1s infinite;
}
.msg.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.msg.typing i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.composer {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0.8rem 1.6rem;
  padding: 0.55rem 0.6rem 0.55rem 1rem;
  border: 1px solid #1f2a3f;
  border-radius: 999px;
  color: var(--sage-dim);
  font-size: 0.9rem;
}
.composer span {
  flex: 1;
}
.composer i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #2563eb;
}
.home-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: #e8eef9;
  opacity: 0.8;
}
.phone-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: 390px;
}
.phone-tab {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--moss);
  border-radius: 999px;
  background: rgba(4, 7, 13, 0.7);
  color: var(--sage);
  font: 500 0.8rem var(--sans);
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}
.phone-tab[aria-selected="true"] {
  color: var(--paper);
  border-color: var(--brass);
  box-shadow: var(--glow);
}
.phone-tab .thread {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--brass);
}
.phone-tab[aria-selected="true"] .thread {
  animation: thread var(--dur, 9s) linear forwards;
}
.phone-wrap.paused .thread {
  animation-play-state: paused;
}
@keyframes thread {
  to {
    width: 100%;
  }
}
.phone-foot {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  color: var(--sage-dim);
  font-size: 0.82rem;
}
.pause {
  background: none;
  border: 1px solid var(--moss);
  color: var(--sage);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font: 500 0.8rem var(--sans);
  cursor: pointer;
}
@media (max-width: 480px) {
  .phone {
    border-radius: 52px;
    padding: 11px;
  }
  .screen {
    border-radius: 42px;
  }
}
.chat[hidden],
.msg[hidden],
.app-head[hidden] {
  display: none;
}
.hero-grid {
  grid-template-columns: 1fr minmax(320px, 420px);
}
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Under the hood: tech spec section ---------- */
.spec-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .spec-grid {
    grid-template-columns: 1fr;
  }
}
.term {
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--pine-deep);
  overflow: hidden;
  box-shadow: var(--glow);
}
.term-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--moss);
  font: 0.78rem var(--mono);
  color: var(--sage-dim);
}
.term-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--moss);
}
.term pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  font: 0.84rem/1.7 var(--mono);
  color: var(--sage);
  overflow-x: auto;
}
.term .k {
  color: var(--violet);
}
.term .s {
  color: var(--mint);
}
.term .c {
  color: var(--sage-dim);
}
.term .a {
  color: var(--brass);
}
/* Two stacked terminal windows on the left of the spec grid. */
.term-stack {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}
/* Terminal typing animation: each line is revealed like real output. */
.term-anim .tl {
  display: block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  animation: term-line 1s steps(24, end) forwards;
}
@keyframes term-line {
  from {
    max-width: 0;
  }
  to {
    max-width: 90ch;
  }
}
@media (prefers-reduced-motion: reduce) {
  .term-anim .tl {
    animation: none;
    max-width: none;
  }
}
.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0;
}
.specs div {
  padding: 1rem 1.1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--forest);
}
.specs dt {
  font: 500 0.78rem var(--mono);
  color: var(--brass);
  margin-bottom: 0.35rem;
}
.specs dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--sage);
}

/* Round architecture: four nodes around a circle, packet flows around it. */
.ring {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 620px;
  padding: 0.25rem 0 0.75rem;
  isolation: isolate;
}
.ring-track {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(100%, 620px);
  height: auto;
}
.ring-path {
  fill: none;
  stroke: var(--moss);
  stroke-width: 1.4;
  stroke-dasharray: 8 8;
  opacity: 0.55;
}
.ring-flow {
  fill: none;
  stroke: var(--brass);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 320 1500;
  transform: rotate(-90deg);
  transform-origin: 240px 240px;
  transform-box: fill-box;
  filter: drop-shadow(0 0 8px rgba(77, 225, 255, 0.55));
  animation: flow 1.8s linear infinite;
}
@keyframes flow {
  to {
    stroke-dashoffset: -1820;
  }
}
.ring-nodes {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  width: min(100%, 620px);
  aspect-ratio: 1;
}
.ring-node {
  position: absolute;
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  text-align: center;
  width: 28%;
}
.ring-node h3 {
  font-size: 1.15rem;
  margin: 0;
}
.ring-node p {
  font-size: 0.94rem;
}
.ring-node.n1 {
  top: 0%;
  left: 50%;
  transform: translateX(-50%);
}
.ring-node.n2 {
  top: 50%;
  right: 0%;
  transform: translateY(-50%);
}
.ring-node.n3 {
  bottom: 0%;
  left: 50%;
  transform: translateX(-50%);
}
.ring-node.n4 {
  top: 50%;
  left: 0%;
  transform: translateY(-50%);
}
.ring-dot {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--pine-deep);
  border: 1px solid var(--moss);
  color: var(--paper);
  font: 750 1.2rem/1 var(--sans);
  font-stretch: 118%;
  box-shadow: 0 0 0 8px var(--pine-deep);
  transition:
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}
.ring-node.ours .ring-dot {
  background: #062330;
  color: var(--brass);
  border-color: var(--brass);
  box-shadow:
    0 0 0 8px var(--pine-deep),
    var(--glow);
}
.ring-step {
  font: 500 0.76rem var(--mono);
  color: var(--sage-dim);
  margin: 0.3rem 0 0;
}
.ring-node.ours .ring-step {
  color: var(--brass);
}

/* Travelling packet around the ring. 3.5s per lap, same as the flow. */
.ring-packet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 18px;
  margin: -9px 0 0 -9px;
  background: var(--brass);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 18px rgba(77, 225, 255, 0.8);
  animation: orbit 1.8s linear infinite;
}
@keyframes orbit {
  from {
    transform: rotate(0deg) translateX(230px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(230px) rotate(-360deg);
  }
}
.ring-packet::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(77, 225, 255, 0.4);
}
@media (prefers-reduced-motion: reduce) {
  .ring-flow,
  .ring-packet {
    animation: none;
  }
  .ring-packet {
    opacity: 0;
  }
}
/* Page-wide background mesh: a fixed canvas drawn by site.js behind all content. */
/* z-index -1 paints above the body background (propagated to the canvas) but under all content. */
.bg-mesh {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Mobile: a circle cannot fit four labelled nodes, so it becomes a vertical
   chain with a connecting line and the same flowing packet. */
@media (max-width: 760px) {
  .ring {
    display: block;
    min-height: 0;
    padding: 0.5rem 0;
  }
  .ring-track,
  .ring-packet {
    display: none;
  }
  .ring-nodes {
    width: 100%;
    aspect-ratio: auto;
    display: grid;
    gap: 1.6rem;
  }
  .ring-nodes::before {
    content: "";
    position: absolute;
    left: 31px;
    top: 32px;
    bottom: 32px;
    width: 2px;
    background: repeating-linear-gradient(
      to bottom,
      var(--moss) 0 6px,
      transparent 6px 12px
    );
  }
  .ring-nodes::after {
    content: "";
    position: absolute;
    left: 27px;
    top: 32px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brass);
    box-shadow: 0 0 14px rgba(77, 225, 255, 0.8);
    animation: drop 3.2s linear infinite;
  }
  .ring-node,
  .ring-node.n1,
  .ring-node.n2,
  .ring-node.n3,
  .ring-node.n4 {
    position: relative;
    inset: auto;
    transform: none;
    width: auto;
    display: grid;
    grid-template-columns: 64px 1fr;
    column-gap: 1rem;
    row-gap: 0.1rem;
    justify-items: start;
    text-align: left;
    align-items: start;
  }
  .ring-dot {
    width: 64px;
    height: 64px;
    font-size: 0.9rem;
    grid-row: 1 / span 3;
  }
  .ring-step {
    margin: 0.2rem 0 0;
  }
  .ring-node h3 {
    font-size: 1.05rem;
  }
  .ring-node p {
    font-size: 0.9rem;
    margin: 0;
  }
}
@keyframes drop {
  from {
    transform: translateY(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  to {
    transform: translateY(calc(var(--chain-h, 420px) - 64px));
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ring-nodes::after {
    animation: none;
    display: none;
  }
}

/* Phone header avatar: Knotbind mark on navy. */
.app-head .avatar {
  background: #062330;
  border: 1px solid var(--brass);
}
.brand-glyph {
  width: 22px;
  height: 22px;
}
.composer i {
  background: var(--brass);
}
.phone-tabs {
  position: relative;
  z-index: 4;
}

/* Client onboarding */
.onboard {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  display: grid;
  gap: 1.5rem;
}
.onboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
}
.stepper li,
.stepper li a {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--sage-dim);
  text-decoration: none;
}
.stepper li {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--pine-deep);
}
.stepper li a:hover {
  color: var(--paper);
}
.stepper .num {
  font-weight: 700;
  color: var(--brass);
}
.stepper li.done {
  color: var(--sage);
}
.stepper li.done .num {
  color: var(--mint);
}
.stepper li.current {
  border-color: var(--brass);
  background: var(--forest-2);
  color: var(--paper);
}
@media (max-width: 760px) {
  .stepper {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 420px) {
  .stepper {
    grid-template-columns: repeat(2, 1fr);
  }
}
.onboard-card {
  display: grid;
  gap: 0.8rem;
}
.onboard-card h1 {
  font-size: 1.6rem;
}
.hint {
  font-size: 0.85rem;
}
.choices {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}
.choices legend {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 0.4rem;
}

/* Selectable option cards: the native input stays in the label (keyboard and
   screen readers work as usual) but is invisible; the card and .tick carry
   the state via :has(input:checked). */
.options {
  display: grid;
  gap: 0.6rem;
}
.options.grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--forest);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}
.option:hover {
  border-color: var(--sage-dim);
}
.option:has(input:checked) {
  border-color: var(--brass);
  background: var(--forest-2);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brass) 40%, transparent);
}
.option:has(input:focus-visible) {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
.option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.option .tick {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 0.1rem;
  border: 1.5px solid var(--sage-dim);
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.option .tick::after {
  content: "";
  width: 10px;
  height: 6px;
  opacity: 0;
  border-left: 2px solid var(--pine-deep);
  border-bottom: 2px solid var(--pine-deep);
  transform: rotate(-45deg) translate(0.5px, -1px);
}
.option:has(input:checked) .tick {
  background: var(--brass);
  border-color: var(--brass);
}
.option:has(input:checked) .tick::after {
  opacity: 1;
}
.option:has(input[type="radio"]) .tick {
  border-radius: 50%;
}
.option:has(input[type="radio"]) .tick::after {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--pine-deep);
  transform: none;
}
.option-text {
  display: grid;
  gap: 0.12rem;
}
.option-title {
  font-weight: 650;
  font-size: 0.97rem;
  color: var(--paper);
}
.option-desc {
  font-size: 0.86rem;
  font-weight: 450;
  color: var(--sage);
  line-height: 1.45;
}
.field textarea.mono {
  font-family: var(--mono);
  font-size: 0.85rem;
}

/* Client dashboard flow */
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr 40px 1fr;
  align-items: center;
}
.flow .hop {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--forest);
  min-width: 0;
}
.flow-panel {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--forest) 88%, var(--cyan)),
    var(--forest)
  );
}
.flow-panel .hop {
  min-height: 112px;
  border-top: 3px solid var(--cyan);
  background: color-mix(in srgb, var(--pine-deep) 75%, transparent);
}
.flow-panel .hop.healthy {
  border-top-color: #39c98a;
}
.flow-panel .hop.failing {
  border-top-color: var(--coral);
}
.flow-panel .pipe {
  height: 3px;
  background: linear-gradient(90deg, #39c98a, var(--cyan));
  border-radius: 3px;
}
.flow .hop.failing {
  border-color: var(--coral);
}
.flow .hop .muted {
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.flow .pipe {
  height: 2px;
  background: linear-gradient(90deg, var(--brass) 0 50%, transparent 50%) 0 0 /
    12px 2px repeat-x;
  animation: pipe 1s linear infinite;
}
.flow .pipe.broken {
  background: var(--coral);
  animation: none;
  opacity: 0.8;
}
@keyframes pipe {
  to {
    background-position: 12px 0;
  }
}
@media (max-width: 900px) {
  .flow {
    grid-template-columns: 1fr;
  }
  .flow .pipe {
    width: 2px;
    height: 22px;
    margin-left: 1.5rem;
    background: linear-gradient(180deg, var(--brass) 0 50%, transparent 50%) 0
      0 / 2px 12px repeat-y;
  }
}
@media (prefers-reduced-motion: reduce) {
  .flow .pipe {
    animation: none;
  }
}
.scroll {
  overflow-x: auto;
}
.run-detail {
  min-width: 18rem;
}
.run-trigger {
  display: block;
  margin-top: 0.35rem;
  color: var(--brass);
  font: 0.72rem var(--mono);
}
.run-detail summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}
.evidence {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 0.25rem;
  padding: 0.8rem;
  background: var(--forest);
  border-left: 2px solid var(--coral);
  font-size: 0.82rem;
}
.evidence div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.6rem;
}
.evidence dt {
  color: var(--sage-dim);
}
.evidence dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.log-flow {
  display: inline-block;
  color: var(--brass);
  letter-spacing: 0.01em;
}
.run-next {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-left: 2px solid var(--brass);
  background: var(--forest);
  color: var(--sage);
  font-size: 0.88rem;
}
.copy {
  word-break: break-all;
  user-select: all;
}
.invite-form {
  margin-top: 1rem;
  grid-template-columns: 1fr auto;
  align-items: end;
}
@media (max-width: 560px) {
  .invite-form {
    grid-template-columns: 1fr;
  }
}

/* Customer dashboard: one clear action, with supporting context beneath it. */
.next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--brass);
  border-radius: var(--r-md);
  background: linear-gradient(
    110deg,
    color-mix(in srgb, var(--forest-2) 82%, var(--pine-deep)),
    var(--pine-deep)
  );
  box-shadow: var(--glow);
}
.next-step-copy {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}
.next-step h2 {
  font-size: 1.35rem;
}
.next-step-action {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: none;
}
.next-step-link {
  font-size: 0.85rem;
  white-space: nowrap;
}
.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.section-heading h2 {
  margin-top: 0.25rem;
}
.assistant-lede {
  max-width: 70ch;
  margin-bottom: 1.25rem;
}
.assistant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.assistant-card {
  display: grid;
  gap: 0.9rem;
  padding: 1.15rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--forest);
  min-height: 245px;
}
.assistant-card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
}
.assistant-card-head .status {
  grid-column: 2;
  justify-self: start;
}
.assistant-card-head > div:nth-child(2) {
  display: grid;
  min-width: 0;
}
.assistant-card strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.assistant-card .muted {
  font-size: 0.78rem;
}
.assistant-card-body {
  color: var(--sage);
  font-size: 0.84rem;
  line-height: 1.45;
}
.assistant-card-body p {
  margin: 0 0 0.5rem;
}
.assistant-card-body ol {
  margin: 0;
  padding-left: 1.2rem;
}
.assistant-card-body li {
  margin: 0.2rem 0;
}
.assistant-card-actions {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.55rem;
  align-items: end;
  margin-top: auto;
}
.assistant-card-actions > form:first-child .btn {
  background: #39c98a;
  border-color: #39c98a;
  color: #062018;
  font-weight: 750;
}
.assistant-card-actions > form:first-child {
  display: contents;
}
.assistant-card-actions > form:first-child .btn {
  display: flex;
  width: auto;
  justify-content: center;
  min-height: 38px;
  font-size: 0.86rem;
}
.assistant-card-actions > form:first-child .btn:hover {
  background: #64e3ac;
  border-color: #64e3ac;
  color: #062018;
}
.assistant-card .status {
  font-size: 0.68rem;
  padding: 0.2rem 0.4rem;
}
.accept-form {
  display: contents;
}
.accept-form label {
  color: var(--sage-dim);
  font-size: 0.72rem;
}
.accept-form label,
.accept-form textarea {
  grid-column: 1 / -1;
}
.accept-form textarea {
  min-width: 0;
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 0.7rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--pine-deep);
  color: var(--paper);
  font: 0.86rem/1.4 var(--sans);
}
.accept-form textarea:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--sage);
  font-size: 0.82rem;
}
.accept-form .btn {
  min-height: 38px;
}
.btn-accept {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--pine-deep);
  font-weight: 700;
}
.btn-accept:hover {
  background: var(--brass-hi);
  border-color: var(--brass-hi);
}
.assistant-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brass);
  border-radius: 50%;
  color: var(--brass);
  font-weight: 750;
  background: var(--pine-deep);
}
.sandbox-explain {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem;
  margin-bottom: 1rem;
  border-left: 2px solid var(--brass);
  background: var(--forest);
}
.sandbox-explain.connected {
  border-left-color: var(--mint);
}
.sandbox-explain strong {
  font-size: 0.95rem;
}
.sandbox-explain .label {
  font-size: 0.78rem;
}
.sandbox-guide {
  margin: 0.5rem 0 1rem 1.2rem;
  padding: 0;
  color: var(--sage);
  font-size: 0.88rem;
}
.sandbox-guide li {
  margin: 0.45rem 0;
  padding-left: 0.25rem;
}
.sandbox-guide strong {
  color: var(--paper);
  font-size: 0.88rem;
}
.sandbox-note {
  display: block;
  margin-top: 0.8rem;
}
.audit-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1.05rem;
  font-weight: 650;
}
.audit-details summary::-webkit-details-marker {
  display: none;
}
.audit-details summary::after {
  content: "+";
  color: var(--brass);
  font-size: 1.4rem;
  font-weight: 400;
}
.audit-details[open] summary::after {
  content: "\2212";
}
.audit-details .timeline {
  margin-top: 1rem;
}
.json-result {
  margin-top: 1rem;
  border-top: 1px solid var(--moss);
  padding-top: 0.8rem;
}
.json-result summary {
  cursor: pointer;
  color: var(--brass);
  font-weight: 650;
}
.json-view {
  display: none;
}
.gomacher-test-job {
  margin-top: 1rem;
  padding: 1rem;
  border-left: 3px solid var(--brass);
  background: var(--forest);
}
.gomacher-test-job > strong,
.gomacher-test-job > .status {
  margin-right: 0.6rem;
}
.gomacher-test-job p {
  overflow-wrap: anywhere;
}
.integration-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}
.integration-details > summary::-webkit-details-marker {
  display: none;
}
.integration-details > summary strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.1rem;
}
.integration-summary-right {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.expand-label {
  min-width: 4.5rem;
  color: var(--brass);
  font: 700 0.72rem var(--mono);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.expand-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  color: var(--brass);
  font-weight: 800;
}
.integration-copy {
  max-width: 70ch;
  margin-top: 1rem;
}
.integration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}
.integration-actions form,
.lifecycle-form {
  margin: 0;
}
.btn-check {
  background: #39c98a;
  border-color: #39c98a;
  color: #062018;
  font-weight: 750;
}
.lifecycle-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--moss);
}
.check-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  color: var(--sage);
  font-size: 0.84rem;
}
.check-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--brass);
}
.integration-foot {
  margin-top: 1rem;
}
.handoff > p {
  max-width: 75ch;
  margin-bottom: 1.25rem;
}
.handoff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.handoff-item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.7rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--moss);
}
.handoff-item .num {
  color: var(--brass);
  font: 600 0.78rem var(--mono);
}
.handoff-item strong {
  font-size: 0.95rem;
}
.handoff-item p {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  line-height: 1.45;
}
.build-panel .build-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.45rem 0;
  color: var(--sage);
  font-size: 0.9rem;
}
.check-row input {
  accent-color: var(--brass);
}
@media (max-width: 900px) {
  .assistant-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .handoff-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .next-step {
    align-items: start;
    flex-direction: column;
  }
  .next-step-action {
    width: 100%;
    justify-content: space-between;
  }
  .assistant-grid,
  .handoff-grid {
    grid-template-columns: 1fr;
  }
  .build-panel .build-links {
    grid-template-columns: 1fr;
  }
  .audit-details summary {
    align-items: start;
  }
}

/* ---------- Dashboard v2: navigation, request flow, assistants, tools ---------- */
.side-nav .nav-group {
  margin: 1rem 0.75rem 0.25rem;
  font: 650 0.7rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-dim);
}
.side-nav .nav-group:first-child {
  margin-top: 0;
}
.stats {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.stat .muted {
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.stat-small {
  font-size: 1rem !important;
  overflow-wrap: anywhere;
}
.build-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.section-heading h2 {
  margin-bottom: 0;
}
.section-heading {
  margin-bottom: 1rem;
}

/* Request flow */
.flow-panel {
  background:
    radial-gradient(
      120% 140% at 0% 0%,
      rgba(77, 225, 255, 0.07),
      transparent 55%
    ),
    radial-gradient(
      120% 140% at 100% 100%,
      rgba(139, 124, 255, 0.08),
      transparent 55%
    ),
    var(--pine-deep);
}
.flow-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}
.flow-tabs a {
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  color: var(--sage);
  text-decoration: none;
  background: linear-gradient(145deg, var(--forest-2), var(--forest));
  transition:
    border-color 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
}
.flow-tabs a:hover {
  color: var(--paper);
  border-color: var(--sage-dim);
  transform: translateY(-1px);
}
.flow-tabs a[aria-current="true"] {
  color: var(--paper);
  border-color: var(--brass);
  box-shadow: var(--glow);
}
.flow-tab-logo {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--pine-deep);
  color: var(--brass);
  border: 1px solid var(--moss);
  font: 700 1rem var(--sans);
}
.flow-logo-claude {
  color: #e7a87b;
}
.flow-logo-chatgpt {
  color: #79d6aa;
}
.flow-logo-grok {
  color: #f0f0f0;
}
.flow-logo-gemini {
  color: #8bb7ff;
}
.flow-logo-copilot {
  color: #74d7df;
}
.flow-logo-perplexity {
  color: #7ae1d0;
}
.flow-logo-cursor {
  color: #c4b5fd;
}
.flow-tab-copy {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}
.flow-tab-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--paper);
  font-size: 0.92rem;
}
.flow-tab-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--sage-dim);
  font-size: 0.72rem;
}
.flow-tabs .dot {
  width: 9px;
  height: 9px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage-dim);
  display: inline-block;
}
.dot-pass {
  background: var(--mint);
}
.dot-fail {
  background: var(--coral);
}
.flow-diagram {
  margin: 0;
  padding: 0.5rem 0;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--moss) var(--pine-deep);
}
.flow-diagram svg {
  max-width: calc(1012px * var(--flow-scale));
  width: max(100%, calc(1012px * var(--flow-scale)));
  min-width: calc(1012px * var(--flow-scale));
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
}
.fd-node rect {
  fill: var(--forest);
  stroke: var(--moss);
  stroke-width: 1.5;
}
.fd-node rect.fd-inferred {
  stroke-dasharray: 5 4;
}
.fd-node.fd-ok rect {
  stroke: var(--mint);
}
.fd-node.fd-bad rect {
  stroke: var(--coral);
}
.fd-dot {
  fill: var(--brass);
}
.fd-ok .fd-dot {
  fill: var(--mint);
}
.fd-bad .fd-dot {
  fill: var(--coral);
}
.fd-title {
  fill: var(--paper);
  font: 650 16px var(--sans);
}
.fd-sub {
  fill: var(--brass);
  font: 11px var(--mono);
}
.fd-role {
  fill: var(--sage);
  font: 11.5px var(--sans);
}
.fd-lane {
  fill: none;
  stroke-width: 2.5;
}
.fd-lane-req {
  stroke: var(--brass);
}
.fd-lane-res {
  stroke: var(--sage-dim);
  stroke-dasharray: 6 5;
}
.fd-passed .fd-lane-res {
  stroke: var(--mint);
  stroke-dasharray: none;
}
.fd-failed .fd-lane-res,
.fd-error .fd-lane-res {
  stroke: var(--coral);
}
.fd-broken {
  stroke: var(--coral);
  stroke-width: 2;
  stroke-dasharray: 3 6;
  fill: none;
}
.fd-arrowhead {
  fill: var(--sage);
}
.fd-edge {
  fill: var(--brass);
  font: 11px var(--mono);
}
.fd-edge-res {
  fill: var(--sage);
}
.fd-passed .fd-edge-res {
  fill: var(--mint);
}
.fd-failed .fd-edge-res,
.fd-error .fd-edge-res {
  fill: var(--coral);
}
.fd-packet-req {
  fill: var(--brass);
  filter: drop-shadow(0 0 6px rgba(77, 225, 255, 0.8));
}
.fd-packet-res {
  fill: var(--mint);
  filter: drop-shadow(0 0 6px rgba(143, 214, 175, 0.8));
}
.fd-failed .fd-packet-res,
.fd-error .fd-packet-res {
  fill: var(--coral);
  filter: drop-shadow(0 0 6px rgba(239, 139, 111, 0.8));
}
@media (prefers-reduced-motion: reduce) {
  .fd-packet {
    display: none;
  }
}
.flow-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.4rem 0 1rem;
}
.chip {
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--moss);
  border-radius: 999px;
  font: 0.8rem var(--mono);
  color: var(--sage);
  text-decoration: none;
}
.chip[aria-current="true"] {
  color: var(--pine-deep);
  background: var(--brass);
  border-color: var(--brass);
}
.chip-pass {
  border-color: color-mix(in srgb, var(--mint) 55%, var(--moss));
  box-shadow: 0 0 9px color-mix(in srgb, var(--mint) 18%, transparent);
}
.chip-fail {
  border-color: color-mix(in srgb, var(--coral) 62%, var(--moss));
  box-shadow: 0 0 9px color-mix(in srgb, var(--coral) 20%, transparent);
}
.chip-unknown {
  border-color: var(--moss);
}
.chip-pass:hover,
.chip-pass:focus-visible {
  box-shadow: 0 0 12px color-mix(in srgb, var(--mint) 30%, transparent);
}
.chip-fail:hover,
.chip-fail:focus-visible {
  box-shadow: 0 0 12px color-mix(in srgb, var(--coral) 34%, transparent);
}
.flow-steps {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.flow-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: rgba(12, 19, 34, 0.7);
}
.flow-steps .num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--forest-2);
  color: var(--brass);
  font: 700 0.72rem var(--mono);
}
.flow-steps strong {
  display: block;
  font-size: 0.84rem;
  color: var(--paper);
}
.flow-steps p {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--sage);
  overflow-wrap: anywhere;
}
.fd-steps-passed li:last-child .num {
  background: var(--mint);
  color: var(--pine-deep);
}
.fd-steps-failed li:nth-child(n + 4) .num,
.fd-steps-error li:nth-child(n + 4) .num {
  background: var(--coral);
  color: var(--pine-deep);
}
.flow-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}
.flow-caption {
  font-size: 0.8rem;
}
.btn-check {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--pine-deep);
  font-weight: 700;
}
.btn-check:hover {
  background: #b2e6c9;
  border-color: #b2e6c9;
}
.finding-actions {
  margin-top: 1.2rem;
}
.sandbox-box {
  margin-top: 1.2rem;
  padding: 1rem;
  border: 1px dashed var(--moss);
  border-radius: var(--r-sm);
}
.sandbox-box .section-heading {
  margin-bottom: 0.7rem;
}

/* Run history chart */
.run-chart-section {
  margin: 0 0 1.5rem;
}
.run-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.run-chart-header h3 {
  font-size: 1rem;
  color: var(--sage);
  margin: 0;
}
.run-chart-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.run-chart-stats .stat {
  font-size: 0.8rem;
  color: var(--sage-dim);
}
.run-chart-stats .stat strong {
  color: var(--sage);
  font-weight: 600;
}
.run-chart-stats .pass-rate strong {
  color: var(--mint);
}
.run-chart {
  width: 100%;
  height: clamp(12rem, 25vw, 15rem);
  min-height: 12rem;
  display: block;
  margin: 0.75rem 0 0.5rem;
  overflow: visible;
}
.run-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  height: 100%;
}
.rc-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.rc-bar-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.rc-bar-date {
  fill: var(--sage-dim);
  font: 600 10px var(--mono);
}
.rc-bar-percent {
  fill: var(--brass);
  font: 700 11px var(--mono);
}
.runs-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  margin: 0.5rem 0 1.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--forest) 85%, transparent),
    color-mix(in srgb, var(--pine) 92%, transparent)
  );
}
.runs-hero {
  display: grid;
  gap: 1rem;
}
.runs-total {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--cyan);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--pine) 65%, transparent);
  text-align: center;
}
.runs-total .label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sage-dim);
}
.runs-count {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--cyan);
  text-shadow: 0 0 1.2rem color-mix(in srgb, var(--cyan) 40%, transparent);
}
.runs-total small {
  color: var(--sage);
  font-size: 0.85rem;
}
.runs-date {
  display: block;
  margin-top: 0.35rem;
  color: var(--sage-dim);
  font-size: 0.74rem;
  font-style: normal;
}
.runs-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.5rem 0 1.25rem;
}
.runs-metric {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--forest) 72%, transparent);
}
.runs-metric strong {
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}
.runs-metric small,
.runs-chart-note {
  color: var(--sage-dim);
  font-size: 0.78rem;
}
.runs-chart-note {
  margin: 0.75rem 0 0.25rem;
}
.run-pies {
  display: grid;
  grid-template-columns: repeat(2, minmax(13rem, 1fr));
  gap: 0.85rem;
  min-width: 0;
  padding: 0;
}
.run-pie {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  min-height: 7rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--pine);
}
.pie-ring {
  display: grid;
  place-items: center;
  width: 5.25rem;
  aspect-ratio: 1;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--mint) var(--pie-pass), var(--coral) 0);
  position: relative;
  color: var(--sage);
  font: 700 1rem var(--mono);
}
.pie-ring::before {
  content: "";
  position: absolute;
  inset: 0.42rem;
  border-radius: 50%;
  background: var(--pine);
}
.pie-ring span {
  position: relative;
}
.run-pie figcaption {
  display: grid;
  gap: 0.35rem;
}
.run-pie figcaption strong {
  font-size: 0.9rem;
}
.pie-legend {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--sage-dim);
  font-size: 0.75rem;
}
.pie-legend i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}
.pie-pass-dot {
  background: var(--mint);
}
.pie-fail-dot {
  background: var(--coral);
}
.audit-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 1rem 0 0.5rem;
}
.audit-controls label {
  display: grid;
  gap: 0.25rem;
  color: var(--sage-dim);
  font-size: 0.78rem;
}
.audit-controls input,
.audit-controls select {
  min-height: 2.2rem;
  max-width: 12rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--pine);
  color: var(--sage);
}
.audit-retention {
  margin: 0.5rem 0;
  font-size: 0.8rem;
}
.audit-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 1rem;
  color: var(--sage-dim);
  font-size: 0.85rem;
}
.action-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.8rem;
}
.action-provider,
.action-workflows article {
  padding: 1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--forest) 70%, transparent);
}
.action-provider > div,
.action-workflows article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.action-provider p:last-child {
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}
.action-workflows {
  display: grid;
  gap: 0.75rem;
}
.action-workflows ol {
  display: grid;
  gap: 0.45rem;
  margin: 0.8rem 0 0;
  padding-left: 1.4rem;
}
@media (max-width: 850px) {
  .runs-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .runs-summary {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .run-pies {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .runs-hero {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}
@media (max-width: 560px) {
  .runs-overview {
    grid-template-columns: 1fr 1fr;
  }
  .audit-controls {
    align-items: stretch;
  }
  .audit-controls label,
  .audit-controls input,
  .audit-controls select {
    width: 100%;
    max-width: none;
  }
  .runs-summary {
    padding: 1rem;
  }
  .runs-hero {
    grid-template-columns: 1fr;
  }
  .runs-count {
    font-size: 2.25rem;
  }
  .run-pies {
    grid-template-columns: 1fr;
  }
}
.rc-axis {
  stroke: var(--moss);
}
.rc-pass {
  fill: var(--mint);
  opacity: 0.85;
}
.rc-fail {
  fill: var(--coral);
}
.rc-pass:hover,
.rc-fail:hover {
  opacity: 1;
}
.rc-label {
  fill: var(--sage-dim);
  font: 10px var(--mono);
}
.rc-bar-percent {
  fill: var(--brass);
  font: 600 10px var(--mono);
}
.rc-bar-date {
  fill: var(--sage-dim);
  font: 9px var(--mono);
}
.run-trigger {
  color: var(--brass);
  font: 0.82rem var(--mono);
}

/* Assistants */
.coverage-bar {
  display: grid;
  grid-template-columns: repeat(var(--profile-count, 12), minmax(0, 1fr));
  gap: 4px;
  height: 12px;
  margin: 0.3rem 0 1.2rem;
}
.coverage-bar i {
  border-radius: 3px;
}
.cov-pass {
  background: var(--mint);
}
.cov-fail {
  background: var(--coral);
}
.cov-none {
  background: var(--moss);
}
.levels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 0;
}
.levels div {
  padding: 0.8rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
}
.levels dd {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--sage);
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.profile-card {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem;
  border: 1px solid var(--moss);
  border-top: 3px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--pine-deep);
}
.profile-pass {
  border-top-color: var(--mint);
}
.profile-fail {
  border-top-color: var(--coral);
}
.profile-card header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
}
.profile-card header div {
  display: grid;
}
.profile-card header .muted {
  font-size: 0.8rem;
}
.mini-flow {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mini-flow li {
  flex: 1;
  position: relative;
  padding-top: 18px;
  text-align: center;
  font-size: 0.7rem;
  color: var(--sage-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-flow li::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--moss);
  z-index: 1;
}
.mini-flow li + li::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--moss);
}
.profile-pass .mini-flow li::before,
.profile-pass .mini-flow li + li::after {
  background: var(--mint);
}
.profile-fail .mini-flow li::before,
.profile-fail .mini-flow li + li::after {
  background: var(--coral);
}
.profile-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0;
}
.profile-facts dt {
  font-size: 0.72rem;
  color: var(--sage-dim);
}
.profile-facts dd {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
}
.profile-actions {
  display: flex;
  gap: 0.5rem;
}
.accept summary {
  cursor: pointer;
  color: var(--sage);
  font-size: 0.84rem;
}
.accept[open] summary {
  margin-bottom: 0.6rem;
}
.accept-form {
  display: grid;
  gap: 0.45rem;
}

/* MCP tools, Gateway, Team */
.inline-form {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}
.inline-form input {
  flex: 1;
  min-width: 0;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.tool-card {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  padding: 1.1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--pine-deep);
}
.tool-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}
.tool-card header code {
  font-size: 0.95rem;
  color: var(--paper);
}
.tool-card p {
  margin: 0;
  font-size: 0.85rem;
}
.tool-card form {
  display: grid;
  gap: 0.45rem;
}
.tool-card textarea {
  width: 100%;
  min-height: 90px;
  padding: 0.6rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--forest);
  color: var(--paper);
  font: 0.8rem/1.45 var(--mono);
  resize: vertical;
}
.tool-actions {
  display: flex;
  gap: 0.5rem;
}

/* MCP server registry */
.server-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.server-card {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  padding: 1.1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--pine-deep);
  transition:
    border-color 0.25s ease,
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease;
}
.server-card:hover {
  border-color: rgba(103, 223, 177, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.server-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.server-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--paper);
}
.server-card header p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  word-break: break-all;
}
.server-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(103, 223, 177, 0.12);
  border-bottom: 1px solid rgba(103, 223, 177, 0.12);
}
.server-facts div {
  display: grid;
  gap: 0.15rem;
}
.server-facts dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sage-dim);
}
.server-facts dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.server-tools {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
  max-height: 190px;
  overflow-y: auto;
}
.server-tools li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--r-sm);
  background: rgba(103, 223, 177, 0.04);
  font-size: 0.82rem;
}
.server-tools code {
  color: var(--paper);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tool-history {
  font-size: 0.75rem;
  color: var(--sage-dim);
}
.tool-history summary {
  cursor: pointer;
  white-space: nowrap;
}
.tool-history ul {
  margin: 0.35rem 0 0;
  padding: 0 0 0 0.75rem;
  list-style: none;
  display: grid;
  gap: 0.2rem;
}
.tool-history li {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0;
  background: none;
}
.tool-history .label.breaking {
  color: #e8b27a;
}
.server-card .inline-form {
  gap: 0.5rem;
}
.breaking-list {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(220, 140, 80, 0.35);
  border-radius: var(--r-md);
  background: rgba(220, 140, 80, 0.06);
}
.breaking-list h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: #e8b27a;
}
.breaking-list ul {
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}
.breaking-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.82rem;
}
.breaking-list code {
  color: var(--paper);
  font-family: var(--mono);
}
.suggestion-list {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(103, 223, 177, 0.25);
  border-radius: var(--r-md);
  background: rgba(103, 223, 177, 0.04);
}
.suggestion-list h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: var(--paper);
}
.suggestion-card {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--pine-deep);
}
.suggestion-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}
.suggestion-card header > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.suggestion-card code {
  color: var(--paper);
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion-card p {
  margin: 0;
  font-size: 0.85rem;
}
.suggestion-card details summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--sage-dim);
}
.suggestion-card pre {
  margin: 0.4rem 0 0;
  padding: 0.5rem;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.75rem;
  overflow-x: auto;
}
.suggestion-card .inline-form {
  gap: 0.5rem;
}
.workflow-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.workflow-card {
  display: grid;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--pine-deep);
}
.workflow-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}
.workflow-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--paper);
}
.workflow-card header p {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
}
.workflow-steps {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
}
.workflow-steps li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.workflow-card .inline-form {
  gap: 0.5rem;
}
.workflow-run {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--pine-deep);
}
.workflow-run h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  color: var(--paper);
}
.workflow-run ol {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
}
.workflow-run li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.workflow-form {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.workflow-form textarea {
  width: 100%;
  min-height: 140px;
  padding: 0.6rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--forest);
  color: var(--paper);
  font: 0.8rem/1.45 var(--mono);
  resize: vertical;
}
.btn-danger {
  border-color: rgba(220, 80, 80, 0.4);
  color: #f08c8c;
}
.btn-danger:hover {
  border-color: rgba(220, 80, 80, 0.7);
  background: rgba(220, 80, 80, 0.12);
}
@media (max-width: 900px) {
  .server-list {
    grid-template-columns: 1fr;
  }
  .server-facts {
    grid-template-columns: repeat(2, 1fr);
  }
}
.key-reveal {
  display: grid;
  gap: 0.5rem;
  border-left-color: var(--brass);
}
.key-reveal code {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  color: var(--brass);
}
@media (max-width: 1100px) {
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .flow-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .profile-grid,
  .tool-grid,
  .levels,
  .flow-steps,
  .flow-tabs,
  .build-links {
    grid-template-columns: 1fr;
  }
  .inline-form {
    flex-direction: column;
  }
}

.coverage-note {
  margin: 0 0 1rem;
  max-width: 80ch;
  font-size: 0.86rem;
}
.relay-rotation-note {
  max-width: 80ch;
  margin: 0.75rem 0 1rem;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid var(--amber);
  background: var(--forest);
  color: var(--sage);
  font-size: 0.84rem;
}
.relay-rotation-note strong {
  color: var(--amber);
}
.proof-note {
  margin: 0;
  font-size: 0.8rem;
  font-style: italic;
  overflow-wrap: anywhere;
}

.connected-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--forest);
  font-weight: 600;
}
.connected-yes {
  border-color: var(--mint);
}
.connected-no {
  border-color: var(--coral);
}
.connected-row .status {
  font-size: 0.9rem;
}
.yes-no {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.yes-no legend {
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  color: var(--sage);
}
/* Cards keep their natural height; open forms do not stretch neighbours. */
.profile-grid {
  align-items: start;
}
.profile-card {
  align-content: start;
}
.profile-actions {
  align-items: center;
}
.accept-form .btn {
  justify-self: start;
}
.yes-no .check-control {
  min-height: 34px;
  padding: 0.3rem 0.8rem;
  font-size: 0.88rem;
  color: var(--paper);
}

.fd-actual rect {
  fill: var(--forest);
  stroke: var(--moss);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}
.fd-actual-yes rect {
  stroke: var(--mint);
  stroke-dasharray: none;
}
.fd-actual-no rect {
  stroke: var(--coral);
  stroke-dasharray: none;
}
.fd-actual-label {
  fill: var(--sage);
  font: 10px var(--sans);
}
.fd-actual-value {
  fill: var(--sage-dim);
  font: 650 12px var(--sans);
}
.fd-actual-yes .fd-actual-value {
  fill: var(--mint);
}
.fd-actual-no .fd-actual-value {
  fill: var(--coral);
}
.fd-actual:hover rect {
  stroke: var(--brass);
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.agent-grid .tool-card p {
  margin: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  .agent-grid {
    grid-template-columns: 1fr;
  }
}

.consent {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--forest);
}
.consent div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.6rem;
  font-size: 0.9rem;
}
.consent dt {
  color: var(--sage-dim);
}
.consent dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.consent-scopes {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
}

/* Plans: shared by homepage, /pricing and dashboard Billing */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.plan-grid-public {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(110%, calc(100vw - 2rem));
  margin-left: 50%;
  transform: translateX(-50%);
}
.plan-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.4rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--pine-deep);
}
.plan-featured {
  border-color: var(--brass);
  box-shadow: var(--glow);
}
.plan-current {
  border-color: var(--mint);
}
.plan-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.plan-card h3 {
  margin: 0;
  font-size: 1.25rem;
}
.plan-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--forest-2);
  color: var(--brass);
  font: 600 0.72rem var(--mono);
}
.plan-current .plan-badge {
  color: var(--mint);
}
.plan-price {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.plan-price strong {
  font: 700 2.2rem/1 var(--sans);
  color: var(--paper);
}
.plan-price span {
  color: var(--sage-dim);
  font-size: 0.88rem;
}
.plan-tagline {
  margin: 0;
  color: var(--sage);
  font-size: 0.98rem;
}
.plan-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  flex: 1;
  align-content: start;
}
.plan-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.96rem;
  color: var(--sage);
}
.plan-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--mint);
  font-weight: 700;
}
.plan-action {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.4rem;
}
.plan-action .btn,
.plan-action form,
.plan-action form .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}
.plan-link {
  font-size: 0.82rem;
  color: var(--sage);
  text-align: center;
}
.plan-yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mint) 16%, transparent);
  color: var(--mint);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}
.plan-no {
  color: var(--sage-dim);
  font-size: 1.15rem;
  line-height: 1.6rem;
}

/* Plan comparison table: grouped rows, sticky header, Pro picked out */
.plan-compare-block {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.plan-compare {
  --plan-col-featured: color-mix(in srgb, var(--brass) 7%, var(--pine-deep));
  --plan-col-featured-line: color-mix(in srgb, var(--brass) 32%, transparent);
}
.plan-compare-scroll {
  position: relative;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--pine-deep);
  overflow: visible;
}
/* Horizontal ribbon along the table's top edge. */
.plan-compare-scroll::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 8px;
  border-radius: var(--r-md) var(--r-md) 0 0;
  background: linear-gradient(90deg, var(--brass), var(--mint));
  box-shadow: 0 3px 16px color-mix(in srgb, var(--mint) 45%, transparent);
  pointer-events: none;
  z-index: 5;
}
.plan-compare-table {
  width: 100%;
  min-width: 60rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1.04rem;
}
.plan-compare-table th,
.plan-compare-table td {
  padding: 0.8rem 1.1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid color-mix(in srgb, var(--moss) 65%, transparent);
}
.plan-compare-table tbody tr:hover td,
.plan-compare-table tbody tr:hover th[scope="row"] {
  background: color-mix(in srgb, var(--paper) 3%, transparent);
}
.plan-compare-table tbody tr:hover td.plan-col-featured {
  background: var(--plan-col-featured);
}
.plan-compare-table th[scope="row"] {
  font-weight: 550;
  font-size: 1.02rem;
  color: var(--paper);
}
.plan-compare-table td {
  color: var(--sage);
}
.plan-compare-table th:first-child,
.plan-compare-table td:first-child {
  width: 32%;
}
.plan-compare-table .plan-col {
  width: 22.6%;
  white-space: nowrap;
}
.plan-compare-table .plan-col-featured {
  background: var(--plan-col-featured);
  box-shadow:
    inset 1px 0 0 var(--plan-col-featured-line),
    inset -1px 0 0 var(--plan-col-featured-line);
}
/* Sticky plan names: left column on small screens, header on wide ones. */
.plan-compare-table th[scope="row"],
.plan-compare-table .plan-corner {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--pine-deep);
  box-shadow: 1px 0 0 color-mix(in srgb, var(--moss) 65%, transparent);
}
.plan-compare-table thead th {
  position: sticky;
  top: var(--header-h);
  z-index: 3;
  padding: 1.1rem 1.1rem 1rem;
  vertical-align: bottom;
  background: var(--pine-deep);
  border-bottom: 1px solid var(--moss);
}
.plan-compare-table thead th.plan-col-featured {
  background: var(--plan-col-featured);
}
.plan-compare-table .plan-corner {
  z-index: 4;
}
.plan-corner-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding-block: 0.4rem;
  text-align: center;
}
.plan-compare-table .plan-corner {
  vertical-align: middle;
}
.plan-corner-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding-block: 0.4rem;
  text-align: center;
}
.plan-corner-logo {
  height: 3.4rem;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.plan-corner-label {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--paper);
}
.plan-compare-table .plan-group th {
  padding: 1.5rem 1.1rem 0.55rem;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  color: var(--brass);
  background: var(--pine-deep);
}
.plan-compare-table tbody:last-child tr:last-child th,
.plan-compare-table tbody:last-child tr:last-child td {
  border-bottom: 0;
}
.plan-col-name {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--paper);
}
.plan-compare-table .plan-badge {
  display: inline-block;
  margin-top: 0.45rem;
  font-family: var(--sans);
  font-size: 0.78rem;
}
.plan-col-price {
  display: block;
  margin-top: 0.55rem;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--paper);
}
.plan-col-per {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--sage-dim);
}
.plan-col-cta {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 0.9rem;
  white-space: nowrap;
}
@media (max-width: 1000px) {
  .plan-compare-scroll {
    overflow-x: auto;
  }
  .plan-compare-table th[scope="row"],
  .plan-compare-table .plan-corner {
    background: var(--pine-deep);
  }
}
@media (max-width: 900px) {
  .plan-compare-table {
    min-width: 48rem;
  }
  .plan-compare-table th,
  .plan-compare-table td {
    padding: 0.7rem 0.8rem;
  }
  .plan-compare-table th:first-child,
  .plan-compare-table td:first-child {
    width: 30%;
  }
  .plan-compare-table .plan-col {
    width: 23.3%;
  }
  .plan-col-price {
    font-size: 1.4rem;
  }
  .plan-col-name {
    font-size: 1.15rem;
  }
  .plan-col-cta {
    font-size: 0.86rem;
    padding: 0.5rem 0.6rem;
    white-space: normal;
  }
}

/* Pricing hero: the short promises as a list */
.hero-points {
  display: grid;
  gap: 0.75rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 54ch;
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  color: var(--sage);
}
.hero-points li {
  position: relative;
  padding-left: 1.75rem;
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--brass);
  transform: rotate(45deg);
}
.meters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.meter {
  padding: 0.8rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--forest);
}
.meter-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--sage);
}
.meter-bar {
  height: 6px;
  margin-top: 0.6rem;
  border-radius: 999px;
  background: var(--moss);
  overflow: hidden;
}
.meter-bar i {
  display: block;
  height: 100%;
  background: var(--mint);
}
.meter-bar i.meter-full {
  background: var(--brass);
}
.meter-bar i.meter-over {
  background: var(--coral);
}
.confirm-email {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .plan-grid,
  .plan-grid-public,
  .meters {
    grid-template-columns: 1fr;
  }
  .plan-grid-public {
    width: auto;
    margin-left: 0;
    transform: none;
  }
}

.included-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem;
  border: 1px solid var(--brass);
  border-radius: var(--r-md);
  background: var(--forest);
}
.included-in p {
  margin: 0;
  font-size: 1.05rem;
}

/* Documentation site */
.docs-body {
  margin: 0;
  background: var(--pine);
  color: var(--paper);
}
.docs-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}
.docs-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.5rem 1.1rem;
  border-right: 1px solid var(--moss);
  background: var(--pine-deep);
  overflow: hidden;
}
.docs-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--paper);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
}
.docs-brand svg {
  width: 30px;
  height: 30px;
}
.docs-brand .brand-logo {
  height: 2rem;
}
.docs-brand em {
  color: var(--brass);
  font-style: normal;
  font-weight: 500;
}
.docs-version {
  margin: 0;
  color: var(--sage-dim);
  font: 0.7rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.docs-menu {
  display: none;
}
.docs-nav-desktop {
  display: grid;
  flex: 1;
  gap: 0.2rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--mint) transparent;
}
.docs-nav-desktop::-webkit-scrollbar {
  width: 4px;
}
.docs-nav-desktop::-webkit-scrollbar-track {
  background: transparent;
}
.docs-nav-desktop::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--mint);
}
.docs-sidebar nav {
  display: grid;
  gap: 0.2rem;
}
.docs-nav-group {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 1.2rem;
}
.docs-nav-heading {
  padding: 0.5rem 0.8rem 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--moss);
  margin: 0;
}
.docs-sidebar nav a {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  border-left: 2px solid transparent;
  color: var(--sage);
  text-decoration: none;
  font-size: 0.97rem;
  line-height: 1.4;
}
.docs-sidebar nav a:hover {
  color: var(--paper);
  background: var(--forest);
}
.docs-sidebar nav a[aria-current="page"] {
  color: var(--paper);
  border-left-color: var(--brass);
  background: var(--forest);
}
.docs-side-foot {
  display: grid;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--moss);
}
.docs-side-foot a {
  color: var(--sage);
  font-size: 0.8rem;
  text-decoration: none;
}
.docs-side-foot a:hover {
  color: var(--brass);
}
.docs-main {
  min-width: 0;
}
.docs-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 3rem;
}
.docs-article {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4rem 3rem 5rem;
}
.docs-article h1 {
  max-width: 22ch;
  margin: 0.5rem 0 1.2rem;
  font: 650 clamp(2.4rem, 5vw, 4.6rem)/1.04 var(--sans);
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.docs-article h2 {
  margin: 3.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(103, 223, 177, 0.16);
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
  scroll-margin-top: 2rem;
}
.docs-article h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
  scroll-margin-top: 2rem;
}
.docs-article p {
  max-width: 68ch;
  margin: 0 0 1.1rem;
  color: var(--sage);
  font-size: 1.05rem;
  line-height: 1.72;
  text-wrap: pretty;
}
.docs-article strong {
  color: var(--paper);
  font-weight: 650;
}
.docs-article a {
  color: var(--cyan);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.docs-article a:hover {
  text-decoration-thickness: 2px;
}
/* A button carries its own colour. Without this, the link colour above wins
   on specificity and the button text turns cyan on a light background. */
.docs-article .btn {
  color: var(--paper);
  text-decoration: none;
}
.docs-article .btn:hover {
  text-decoration: none;
}
.docs-article .btn-primary {
  color: var(--pine-deep);
}
.docs-article code {
  font-size: 0.92em;
  background: rgba(103, 223, 177, 0.1);
  border: 1px solid rgba(103, 223, 177, 0.18);
  border-radius: 4px;
  padding: 0.1em 0.36em;
  color: var(--brass-hi);
  overflow-wrap: anywhere;
}
.docs-intro {
  max-width: 62ch;
  margin: 0 0 1rem;
  color: var(--paper);
  font-size: 1.22rem;
  line-height: 1.6;
  text-wrap: pretty;
}
.docs-kicker {
  color: var(--brass);
  font: 700 0.78rem var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.docs-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background:
    radial-gradient(
      100% 150% at 0 0,
      rgba(77, 225, 255, 0.08),
      transparent 60%
    ),
    var(--forest);
}
.docs-hero-grid h2 {
  margin: 0.5rem 0 0.6rem;
}
.docs-hero-grid p {
  margin-bottom: 0;
  max-width: 60ch;
}
.docs-flow,
.docs-flow-large {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 1.2rem;
  color: var(--paper);
  font: 700 0.82rem var(--mono);
}
.docs-flow span,
.docs-flow-large span {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--cyan);
  border-radius: 999px;
  color: var(--cyan);
  background: var(--pine-deep);
}
.docs-flow b,
.docs-flow-large b {
  color: var(--brass);
}
.docs-flow-large {
  justify-content: space-between;
  padding: 1.5rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--forest);
  font-size: 1rem;
}
.docs-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.docs-card {
  display: grid;
  gap: 0.5rem;
  min-height: 170px;
  padding: 1.2rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-md);
  background: var(--forest);
  color: var(--paper);
  text-decoration: none;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.docs-card:hover {
  border-color: var(--brass);
  transform: translateY(-2px);
}
.docs-number {
  color: var(--brass);
  font: 0.75rem var(--mono);
}
.docs-card p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--sage);
}
.docs-table-wrap {
  overflow-x: auto;
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
.docs-table th,
.docs-table td {
  padding: 0.9rem 0.8rem;
  border-bottom: 1px solid var(--moss);
  text-align: left;
  vertical-align: top;
  font-size: 0.97rem;
  line-height: 1.6;
}
.docs-table th {
  color: var(--paper);
  font-weight: 650;
}
.docs-table td {
  color: var(--sage);
}
.docs-code {
  margin: 1.25rem 0;
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--pine-deep);
  color: var(--paper);
  font: 0.9rem/1.65 var(--mono);
}
.docs-callout {
  margin: 1.75rem 0;
  padding: 1.15rem 1.3rem;
  border-left: 3px solid var(--brass);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--forest);
}
.docs-callout strong {
  display: block;
  color: var(--brass);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.docs-callout p {
  margin: 0.4rem 0 0;
  max-width: 64ch;
  font-size: 1rem;
  line-height: 1.68;
}
.docs-steps {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
  counter-reset: docs-step;
}
.docs-steps li {
  counter-increment: docs-step;
  position: relative;
  padding: 1.15rem 1.2rem 1.15rem 3.6rem;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--forest);
}
.docs-steps li::before {
  content: counter(docs-step, decimal-leading-zero);
  position: absolute;
  left: 1rem;
  top: 1.05rem;
  color: var(--brass);
  font: 700 0.85rem var(--mono);
}
.docs-steps p {
  margin: 0.3rem 0 0;
  max-width: 62ch;
  font-size: 1rem;
  line-height: 1.65;
}
.docs-steps .docs-code {
  margin-bottom: 0;
}
.docs-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.75rem 3rem 3rem;
  border-top: 1px solid var(--moss);
  color: var(--sage);
  font-size: 0.9rem;
}
@media (max-width: 850px) {
  .docs-app {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--moss);
    overflow: visible;
  }
  .docs-nav-desktop {
    display: none;
  }
  .docs-menu {
    display: block;
  }
  .docs-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    list-style: none;
    font-size: 0.9rem;
    color: var(--sage);
  }
  .docs-menu-btn::-webkit-details-marker {
    display: none;
  }
  .docs-menu nav {
    display: none;
  }
  .docs-menu[open] nav {
    display: grid;
  }
  .docs-sidebar nav {
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .docs-side-foot {
    display: flex;
    flex-wrap: wrap;
  }
  .docs-top,
  .docs-article,
  .docs-footer {
    padding-inline: 1.1rem;
  }
  .docs-article {
    padding-block: 2.5rem 3.5rem;
  }
  .docs-article h1 {
    font-size: clamp(2rem, 8vw, 2.9rem);
  }
  .docs-article h2 {
    margin-top: 2.75rem;
    padding-top: 1.25rem;
  }
  .docs-intro {
    font-size: 1.1rem;
  }
  .docs-hero-grid,
  .docs-card-grid {
    grid-template-columns: 1fr;
  }
  .docs-flow-large {
    justify-content: flex-start;
  }
  .docs-table {
    min-width: 560px;
  }
  .docs-table th,
  .docs-table td {
    padding: 0.8rem 0.7rem;
    font-size: 0.92rem;
  }
}
@media (max-width: 480px) {
  .docs-sidebar nav {
    grid-template-columns: 1fr;
  }
  .docs-sidebar nav a {
    font-size: 0.98rem;
    padding: 0.7rem 0.75rem;
  }
  .docs-article p {
    font-size: 1rem;
  }
  .docs-steps li {
    padding: 1rem 1rem 1rem 3.2rem;
  }
  .docs-callout {
    padding: 1rem;
  }
}

/* ---------- Code blocks (shared by /dashboard, /docs, and the public site) ---------- */
.code-block {
  position: relative;
  margin: 1rem 0;
  border: 1px solid var(--moss);
  border-radius: var(--r-sm);
  background: var(--pine-deep);
  color: var(--paper);
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: var(--forest);
  border-bottom: 1px solid var(--moss);
  font: 0.78rem/1 var(--mono);
  color: var(--sage);
}
.code-lang {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--moss);
  border-radius: 999px;
  background: var(--pine-deep);
  color: var(--brass);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.code-lang[data-lang="json"],
.code-lang[data-lang="js"] {
  color: #79b8ff;
}
.code-lang[data-lang="sh"] {
  color: var(--brass);
}
.code-lang[data-lang="http"] {
  color: var(--mint);
}
.code-lang[data-lang="yaml"] {
  color: #d8a0df;
}
.code-copy {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #1d2942;
  background: transparent;
  color: var(--sage);
  font: 600 0.78rem/1 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}
.code-copy:hover {
  color: var(--paper);
  border-color: var(--brass);
}
.code-copy.is-copied {
  color: var(--pine-deep);
  background: var(--mint);
  border-color: var(--mint);
}
.code-pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  background: transparent;
  color: var(--paper);
  font: 0.9rem/1.65 var(--mono);
  /* Wrap long lines instead of forcing the whole page wider; a vertical
     scroll bar appears only for truly unbreakable tokens. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
}
.code-block {
  max-width: 100%;
}
.code-text {
  overflow-wrap: anywhere;
  white-space: inherit;
}
.code-text {
  color: var(--paper);
  white-space: inherit;
}
.hl-c {
  color: #9aa7bd;
  font-style: italic;
}
.hl-k {
  color: #79b8ff;
}
.hl-s {
  color: #b8d68a;
}
.hl-n {
  color: #f5a25d;
}
.hl-b {
  color: #c0c5d1;
  font-weight: 600;
}
.hl-v {
  color: #d8a0df;
}
.code-text .hl-s .hl-s,
.code-text .hl-c .hl-s,
.code-text .hl-s .hl-c,
.code-text .hl-c .hl-c {
  font-style: normal;
}
@media (max-width: 560px) {
  .code-pre {
    /* Small screens get a slightly tighter block, but the text stays
       readable. Shrinking it further makes the examples unusable. */
    font-size: 0.82rem;
    line-height: 1.6;
    padding: 0.9rem;
  }
}

/* Agent Readiness report. The results table, score and fix list were
   sitting at the site's 17px body size and reading as too small after a run. */
.readiness-report {
  font-size: 1.2rem;
  line-height: 1.55;
}
.readiness-report .stats {
  margin-bottom: 1.6rem;
}
.readiness-report .stat strong {
  font-size: 2.15rem;
}
.readiness-report .stat strong small {
  font-size: 0.55em;
}
.readiness-report .table {
  font-size: 1.12rem;
}
.readiness-report .table th {
  font-size: 0.95rem;
}
.readiness-report .status {
  font-size: 0.95rem;
}
.readiness-report .mono {
  font-size: 0.95em;
}
.readiness-report ol {
  display: grid;
  gap: 0.85rem;
  padding-left: 1.4rem;
}
.readiness-report h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
}

/* Layout guards: nothing inside the dashboard column may push the page
   wider than the window. */
.content {
  min-width: 0;
}
.panel {
  min-width: 0;
}

/* Attack scenario on the build page: attempt, boundary, outcome. */
.attack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.term-attack .term-bar {
  color: var(--violet);
}
.term-result .term-bar {
  color: var(--mint);
}
@media (max-width: 900px) {
  .attack-grid {
    grid-template-columns: 1fr;
  }
}

/* Knot preview. An infinity loop with Knotbind on the crossing. */
.knot-page {
  padding-bottom: 5rem;
}
.knot-wrap {
  width: min(100% - 2rem, 1160px);
}
.knot-stage {
  margin: 0;
}
.knot-terms {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr) minmax(0, 1fr);
  grid-template-areas:
    "customer loop system"
    "assistant loop answer";
  gap: 0.85rem;
  align-items: stretch;
}
.knot-term {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.knot-term pre {
  flex: 1;
  margin: 0;
  padding: 0.9rem 1rem;
  font: 0.8rem/1.6 var(--mono);
  min-height: 5.2em;
}
.knot-term-bind {
  width: min(300px, 72%);
  z-index: 2;
}
.knot-loop {
  grid-area: loop;
  display: grid;
  grid-template-areas: "stack";
  place-items: center;
}
.knot-loop > * {
  grid-area: stack;
}
.knot-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.knot-term-customer {
  grid-area: customer;
}
.knot-term-assistant {
  grid-area: assistant;
}
.knot-term-system {
  grid-area: system;
}
.knot-term-answer {
  grid-area: answer;
}
@media (max-width: 940px) {
  .knot-terms {
    grid-template-columns: 1fr;
    grid-template-areas:
      "customer"
      "assistant"
      "loop"
      "system"
      "answer";
  }
  .knot-loop {
    min-height: 0;
    padding: 1rem 0;
  }
  .knot-svg {
    max-width: 420px;
    margin-inline: auto;
  }
}
.knot-cord {
  fill: none;
  stroke: color-mix(in srgb, var(--moss) 70%, transparent);
  stroke-width: 18;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.knot-thread {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14 18;
}
.knot-thread-ask {
  stroke: var(--brass);
  filter: url("#knot-glow");
  animation: knot-dash 1.6s linear infinite;
}
.knot-thread-reply {
  stroke: var(--sage);
  stroke-dasharray: 4 10;
  animation: knot-dash 2.2s linear infinite reverse;
}
.knot-packet-ask {
  fill: var(--brass);
  filter: drop-shadow(0 0 8px rgba(103, 223, 177, 0.85));
}
.knot-packet-reply {
  fill: var(--paper);
  filter: drop-shadow(0 0 8px rgba(232, 238, 249, 0.55));
}
.knot-pin circle {
  fill: var(--pine-deep);
  stroke: var(--brass);
  stroke-width: 2.5;
}
.knot-pin-reply circle {
  stroke: var(--sage);
}
.knot-card rect,
.knot-step,
.knot-name,
.knot-note,
.knot-seal rect,
.knot-seal-name,
.knot-seal-note {
  /* Card and seal moved to live terminals; SVG classes kept unused. */
}
.knot-lane {
  fill: var(--brass);
  font: 600 13px var(--mono);
}
.knot-lane-reply {
  fill: var(--sage);
}
.knot-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.knot-legend li {
  display: grid;
  gap: 0.3rem;
  padding-top: 0.8rem;
  border-top: 2px solid var(--moss);
}
.knot-legend span {
  color: var(--sage);
  font-size: 0.92rem;
}
.knot-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.4rem;
}
.knot-stage.is-paused .knot-thread,
.knot-stage.is-paused .knot-packet {
  animation-play-state: paused;
}
@keyframes knot-dash {
  to {
    stroke-dashoffset: -64;
  }
}
@media (max-width: 860px) {
  .knot-legend {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .knot-thread,
  .knot-packet {
    animation: none;
  }
  .knot-packet {
    display: none;
  }
}
