/* Canonical header for standalone public pages (Visibility Lab, Capabilities). */
.site-header.agx {
  --agx-accent: var(--gold, var(--brass, #ecc979));
  --agx-accent-hi: var(--gold-hi, var(--brass-hi, #ffe7ad));
  --agx-ink: #171006;
  --agx-text: var(--text, var(--ink, #f4f1e8));
  --agx-text2: var(--text-2, var(--ink-2, #c6cdd7));
  --agx-muted: var(--muted, #96a2b2);
  --agx-line: var(--line, rgba(236, 201, 121, 0.14));
  --agx-surface: var(--surface, var(--panel, #0b1016));
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(5, 7, 10, 0.82);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.site-header.agx.is-stuck { border-bottom-color: var(--agx-line); }
.site-header.agx .header-inner { display: flex; align-items: center; gap: 1.25rem; height: 78px; }
.site-header.agx .brand { display: inline-flex; align-items: center; gap: 0.6rem; flex: none; text-decoration: none; }
.site-header.agx .brand-mark { width: 34px; height: 34px; flex: none; }
.site-header.agx .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 9px;
  filter: drop-shadow(0 0 14px rgba(236, 201, 121, 0.28));
}
.site-header.agx .brand-text { display: flex; align-items: baseline; gap: 0.45rem; line-height: 1; }
.site-header.agx .brand-text strong { font-size: 1.03rem; font-weight: 600; letter-spacing: 0.01em; color: var(--agx-text); }
.site-header.agx .brand-ver {
  font-family: var(--mono, monospace);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--agx-accent);
  border: 1px solid rgba(236, 201, 121, 0.35);
  border-radius: 99px;
  padding: 0.15rem 0.4rem;
}
.site-header.agx .site-nav { display: flex; align-items: center; gap: 1.1rem; margin-inline: auto; font-size: 0.83rem; }
.site-header.agx .site-nav a {
  color: var(--agx-text2);
  padding: 0.35rem 0;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
}
.site-header.agx .site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--agx-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.site-header.agx .site-nav a:hover { color: #fff; }
.site-header.agx .site-nav a:hover::after,
.site-header.agx .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-header.agx .site-nav a[aria-current="page"] { color: #fff; }
.site-header.agx .header-actions { display: flex; align-items: center; gap: 0.55rem; flex: none; }
.site-header.agx .nav-auth { display: none; }
.site-header.agx .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.44rem 0.72rem;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.site-header.agx .btn:hover { transform: translateY(-1px); }
.site-header.agx .btn-ghost { border-color: var(--agx-line); background: rgba(255, 255, 255, 0.02); color: var(--agx-text2); }
.site-header.agx .btn-ghost:hover { border-color: rgba(236, 201, 121, 0.45); background: rgba(236, 201, 121, 0.06); color: #fff; }
.site-header.agx .btn-primary {
  background: linear-gradient(135deg, #f4d991 0%, #e7bf69 48%, #c9963c 100%);
  color: var(--agx-ink);
  border-color: rgba(255, 240, 200, 0.55);
  box-shadow: 0 14px 30px -16px rgba(226, 189, 109, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.site-header.agx .btn-primary:hover { box-shadow: 0 18px 38px -16px rgba(226, 189, 109, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.site-header.agx .btn svg,
.site-header.agx .nav-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }
.site-header.agx .nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--agx-line);
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.agx-section-nav {
  position: sticky;
  top: 78px;
  z-index: 35;
  background: rgba(5, 7, 10, 0.94);
  border-bottom: 1px solid var(--line, rgba(236, 201, 121, 0.14));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.agx-section-nav .shell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding-block: 0.55rem;
  scrollbar-width: none;
}
.agx-section-nav .shell::-webkit-scrollbar { display: none; }
.agx-section-nav a {
  font-size: 0.76rem;
  color: var(--muted, #96a2b2);
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
  text-decoration: none;
}
.agx-section-nav a:hover {
  color: var(--text, #f4f1e8);
  border-color: rgba(236, 201, 121, 0.25);
  background: rgba(236, 201, 121, 0.07);
}
.agx-section-nav ~ main [id] { scroll-margin-top: 132px; }

body.lab-page { padding-top: 0; }

/* Keep the capabilities hero and console from widening the mobile layout. */
.hero-grid { min-width: 0; }
.hero-grid > * { min-width: 0; max-width: 100%; }
.console { width: 100%; min-width: 0; }
.console-status { flex-wrap: wrap; }
.diff-row {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.7fr) minmax(0, 0.1fr) minmax(0, 0.75fr);
}
.diff-row code { min-width: 0; }
.fgrid { min-width: 0; }
.fgrid > * { min-width: 0; max-width: 100%; }
.fcard-top { flex-wrap: wrap; }
.fcard h3,
.fcard p,
.fcard .micro { overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .diff-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr) minmax(0, 0.08fr) minmax(0, 0.8fr);
  }
}

@media (max-width: 1120px) {
  .site-header.agx .header-inner { gap: 0.8rem; }
  .site-header.agx .header-actions { margin-left: auto; }
  .site-header.agx .site-nav {
    display: none;
    position: absolute;
    top: 78px;
    left: 1rem;
    right: 1rem;
    z-index: 90;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - 84px);
    overflow-y: auto;
    margin-inline: 0;
    padding: 0.4rem;
    background: var(--agx-surface);
    border: 1px solid rgba(236, 201, 121, 0.2);
    border-radius: 12px;
    box-shadow: 0 24px 60px -20px #000;
  }
  .site-header.agx .site-nav.is-open { display: flex; }
  .site-header.agx .site-nav a { padding: 0.65rem 0.7rem; border-radius: 8px; }
  .site-header.agx .site-nav a::after { display: none; }
  .site-header.agx .site-nav a:hover { background: rgba(255, 255, 255, 0.05); }
  .site-header.agx .nav-auth {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--agx-line);
  }
  .site-header.agx .nav-auth a { padding: 0.6rem 0.7rem; border-radius: 8px; }
  .site-header.agx .nav-auth .nav-cta {
    background: var(--agx-accent);
    color: var(--agx-ink);
    text-align: center;
    font-weight: 600;
  }
  .site-header.agx .login-link { display: none; }
  .site-header.agx .header-cta { display: inline-flex; }
  .site-header.agx .nav-toggle { display: inline-flex; }
}

@media (min-width: 1121px) {
  .site-header.agx .nav-auth { display: none; }
  .site-header.agx .nav-toggle { display: none; }
}

@media (max-width: 700px) {
  .site-header.agx .header-inner { height: 78px; }
  .site-header.agx .site-nav { top: 78px; }
  .site-header.agx .brand-text strong { font-size: 0.94rem; }
  .site-header.agx .brand-ver { font-size: 0.5rem; }
  .agx-section-nav { top: 78px; }
  .agx-section-nav .shell {
    flex-wrap: wrap;
    overflow-x: visible;
    padding-block: 0.45rem;
    row-gap: 0.15rem;
  }
  .agx-section-nav ~ main [id] { scroll-margin-top: 160px; }
}

@media (max-width: 600px) {
  .site-header.agx .header-inner { height: 66px; }
  .site-header.agx .site-nav { top: 66px; }
  .site-header.agx .brand-mark { width: 28px; height: 28px; }
  .site-header.agx .brand-text strong { font-size: 0.92rem; }
  .agx-section-nav { top: 66px; }
  .agx-section-nav ~ main [id] { scroll-margin-top: 160px; }
}
