/* lotor lab — panels, constellation sections, fixed SVG sky */

:root {
  /* Single accent ramp: #d6b277 (buttons, borders, links, emphasis) */
  --sky: #0b0d17;
  --void: #0a0812;
  --panel: #0e111a;
  --elevated: #161b28;
  --gold: #d6b277;
  --gold-rgb: 214, 178, 119;
  --gold-bright: #e8d4aa;
  --gold-bright-rgb: 232, 212, 170;
  --gold-deep: #9a7e4c;
  /* "lotor lab" wordmark — matches .nav-brand */
  --brand-wordmark: var(--gold);
  --buff: #e5d3b3;
  --text: #ddd6cc;
  --text-dim: rgba(221, 214, 204, 0.78);
  --frost: #f2f0ec;
  /* Links: same hue as --gold, readable on void (not cool blue) */
  --link: rgb(200, 175, 125);
  --link-hover: var(--gold-bright);
  --dot: rgba(var(--gold-rgb), 0.35);
  --edge: rgba(var(--gold-rgb), 0.2);
  --max: min(1280px, 94vw);
  --pad-x: clamp(1.25rem, 5vw, 2rem);
  --section-y: clamp(4rem, 11vw, 8rem);
  --font-body: "Times New Roman", Times, serif;
  /* MS David where installed (e.g. Windows); otherwise Times italic */
  --font-brand: David, "Times New Roman", Times, serif;
  --radius: 12px;
  --radius-pill: 999px;
  /* Flat, airy surfaces — no faux glass depth */
  --glass-bg: rgba(255, 255, 255, 0.035);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(var(--gold-bright-rgb), 0.35);
  --glass-shadow: none;
  --glass-shadow-hover: none;
  /* 1 = full scrim (intro); drops as we zoom in so the map reads through */
  --sky-veil: 1;
  /* Mirrors JS sky zoom on home; foreignObject HTML uses this for inverse UI scale */
  --sky-zoom: 1;
  /* main.js syncHomeMapViewportCss — safe padding + min inverse scale for map callouts */
  --sky-pad-cap-top: 6%;
  --sky-pad-cap-x: 7%;
  --sky-pad-cap-bottom: 10.5%;
  --sky-map-inv-zoom-floor: 0.57;
  --sky-map-label-max-px: 196px;
  --viewport-w: 100vw;
  --viewport-h: 100dvh;
  --viewport-short: min(100vw, 100dvh);
  --viewport-long: max(100vw, 100dvh);
  --home-stage-h: calc(var(--viewport-h) - var(--lotor-header-h, 0px));
  --home-scene-pad-x: clamp(1rem, 4vw, 2.5rem);
  --home-scene-pad-bottom: clamp(0.9rem, 3vw, 1.5rem);
  --home-shell-inline-max: min(92rem, calc(100vw - 2rem));
  --home-overlay-shell-max: min(36rem, calc(100vw - 1.5rem));
  --home-panel-inline-max: min(68rem, calc(100vw - 2rem));
  --home-panel-max-block: calc(var(--home-stage-h) - 1rem);
  --home-cap-label-max-block: 18rem;
  --home-qual-label-max-block: 14rem;
  --home-card-gap: clamp(0.75rem, 2vw, 1.25rem);
  --home-overlay-shell-pad: clamp(0.65rem, 3vw, 1rem);
  --home-rail-reserve: 0px;
  --home-map-overlay-scale-boost: 1;
  --home-map-overlay-scale-max: 1.18;
  --home-map-overlay-text-scale-boost: 1;
  --mobile-shell-inline: clamp(17rem, 92vw, 36rem);
  --mobile-shell-pad: clamp(0.75rem, 4vw, 1.1rem);
  --mobile-header-pad-x: clamp(0.9rem, 4.5vw, 1.4rem);
  --mobile-header-gap: clamp(0.7rem, 3vw, 1rem);
  --intro-procyon-shift: 0px;
  --intro-vista-w: clamp(9.5rem, 15vw, 14rem);
  --intro-col-gap: clamp(1.5rem, 3.5vw, 3.25rem);
  --home-ui-inv-scale: 1;
  --home-center-lift-y: 0px;
  --home-intro-shift-x: 0px;
  --home-intro-shift-y: 0px;
  --home-contact-shift-x: 0px;
  --home-contact-shift-y: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fixed-celestial > .celestial-mover {
    transition: none !important;
    will-change: auto;
  }
  .celestial-svg {
    animation: none !important;
    transform: none !important;
  }
  /* Inner pages: img or non-home svg; home map keeps filter on <image> only */
  .celestial-svg:not(.sky-unified) {
    filter: brightness(1.63) contrast(1.08) saturate(1.06);
  }
  html.lotor-home .sky-unified > image {
    filter: brightness(1.63) contrast(1.08) saturate(1.06);
  }
  .scroll-progress__fill {
    transition: none !important;
  }
  .ambient-layer {
    animation: none !important;
  }
  .const-panel__svg .const-lines {
    animation: none !important;
  }
  .scroll-rail__link:hover,
  .scroll-rail__link:focus-visible {
    transform: none;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html.lotor-home {
  --home-ui-inv-scale: max(var(--sky-map-inv-zoom-floor, 0.57), min(1, calc(1 / var(--sky-zoom, 1))));
}

.brand-mark {
  font-family: var(--font-brand);
  font-style: italic;
  color: var(--brand-wordmark);
}

/* Fixed SVG constellation — full viewport, stays bright (panels use light scrims only) */
.fixed-celestial {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--void);
  /* Scroll-driven zoom: cover scale + multiplicative zoom (GPU transform only) */
  --sky-cover: 1;
  --sky-nx: 0.5;
  --sky-ny: 0.5;
  --sky-zoom-mult: 1;
  --sky-pan-x: 0px;
  --sky-pan-y: 0px;
  --sky-parallax-x: 0px;
  --sky-parallax-y: 0px;
}

/* Inner pages: single img fills viewport (object-fit cover) */
.fixed-celestial > .celestial-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 1;
  border: 0;
  pointer-events: none;
  object-fit: cover;
  object-position: center;
  transform-origin: center center;
  filter: brightness(1.48) contrast(1.08) saturate(1.08);
}

@media (prefers-reduced-motion: no-preference) {
  .fixed-celestial:not(:has(.celestial-mover)) > .celestial-svg {
    animation: celestial-drift 120s linear infinite alternate;
  }
}

/* Scale only — translate() on the <img> exposed void at the viewport edge (e.g. left strip). */
@keyframes celestial-drift {
  0% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1.05);
  }
}

/* Soft aurora over the starfield — sits above .fixed-celestial, below content */
.ambient-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 130% 90% at 15% -5%, rgba(var(--gold-rgb), 0.11) 0%, transparent 52%),
    radial-gradient(ellipse 100% 80% at 100% 45%, rgba(130, 168, 220, 0.07) 0%, transparent 48%),
    radial-gradient(ellipse 80% 55% at 48% 105%, rgba(var(--gold-rgb), 0.06) 0%, transparent 42%);
  mix-blend-mode: screen;
  opacity: 0.58;
}

@media (prefers-reduced-motion: no-preference) {
  .ambient-layer {
    animation: ambient-breathe 32s ease-in-out infinite alternate;
  }
}

@keyframes ambient-breathe {
  0% {
    opacity: 0.72;
    transform: scale(1) translate3d(0, 0, 0);
  }
  100% {
    opacity: 0.92;
    transform: scale(1.04) translate3d(-1.5%, 1%, 0);
  }
}

.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}

h1,
h2 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--frost);
  text-wrap: balance;
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--link-hover);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--gold);
  color: var(--void);
  font-weight: 600;
}

.skip-link:focus {
  left: var(--pad-x);
  outline: 2px solid var(--frost);
}

/* Section rail — dots + labels on wide viewports */
.scroll-rail {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  pointer-events: none;
}

.scroll-rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.scroll-rail__link {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0;
  transition: color 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-rail__link:hover,
.scroll-rail__link:focus-visible {
  color: var(--gold-bright);
  outline: none;
  transform: translateX(-4px);
}

.scroll-rail__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease,
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.scroll-rail__link:hover .scroll-rail__dot,
.scroll-rail__link:focus-visible .scroll-rail__dot {
  background: rgba(var(--gold-rgb), 0.35);
  border-color: rgba(var(--gold-bright-rgb), 0.55);
}

.scroll-rail__link.is-active {
  color: var(--gold-bright);
}

.scroll-rail__link.is-active .scroll-rail__dot {
  background: var(--gold);
  border-color: var(--gold-bright);
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.22), 0 0 18px rgba(var(--gold-bright-rgb), 0.35);
}

.scroll-rail__label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

@media (min-width: 1200px) {
  .scroll-rail__link:hover .scroll-rail__label,
  .scroll-rail__link:focus-visible .scroll-rail__label,
  .scroll-rail__link.is-active .scroll-rail__label {
    max-width: 6rem;
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .scroll-rail {
    display: none;
  }
}

.section-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.85rem;
}

.section-kicker--muted {
  color: rgba(var(--gold-rgb), 0.75);
}

.panel--hero .panel__inner--hero {
  position: relative;
}

/* Per-section constellation panels — catalogue star colour vs #805E27 lines */
.const-section__lede {
  margin-top: 0;
  margin-bottom: clamp(1rem, 2vw, 1.35rem);
  text-wrap: balance;
}

.const-section.panel--hero .panel__inner--hero.panel__inner--deck {
  display: block;
  padding-block: clamp(1.5rem, 4vw, 2.75rem);
}

/* Hero typography — Start page: .intro-hero + #intro-heading inside foreignObject */
.hero-site-title {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 600;
  font-size: clamp(3.15rem, 9vw, 5.15rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--brand-wordmark);
  margin: 0 0 1rem;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.35);
}

.hero-site-title .brand-mark {
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 600;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.02rem, 1.9vw, 1.26rem);
  font-weight: 500;
  line-height: 1.42;
  color: rgba(242, 240, 236, 0.95);
  margin: 0;
  max-width: min(38rem, 100%);
  text-wrap: balance;
}

.hero-subtitle__break {
  display: none;
}

@media (min-width: 480px) {
  .hero-subtitle__break {
    display: inline;
  }
}

.hero-subtitle__rest {
  display: inline;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hero-cta--below-start {
  margin-top: clamp(1.35rem, 3.2vw, 2.25rem);
  gap: 0.7rem;
}

.qual-const-img {
  display: block;
  width: 100%;
  height: clamp(220px, 34vw, 380px);
  object-fit: cover;
  object-position: var(--qual-sky-pos, 48% 50%);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(6, 8, 14, 0.35);
}

@keyframes qual-star-glint {
  0%,
  100% {
    filter: brightness(1);
    opacity: 1;
  }
  50% {
    filter: brightness(1.35);
    opacity: 0.92;
  }
}

/* Qualification pages: “briefing sheet” shell (see html.page-qual) */
.qual-page__wrap {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}

.qual-cap-map {
  padding: clamp(1.1rem, 2.5vw, 1.45rem) clamp(1rem, 2.5vw, 1.35rem);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: linear-gradient(
    165deg,
    rgba(8, 10, 18, 0.55) 0%,
    rgba(12, 14, 24, 0.35) 50%,
    rgba(8, 10, 18, 0.48) 100%
  );
  background-color: rgba(6, 8, 14, 0.35);
  backdrop-filter: blur(10px) saturate(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.qual-cap-map__head {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.qual-cap-map__title {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--gold-rgb), 0.82);
  margin: 0 0 0.45rem;
}

.qual-cap-map__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem 0.65rem;
}

.qual-cap-map__list li {
  margin: 0;
}

.qual-cap-map__list a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 0.45rem;
  min-height: 4.75rem;
  padding: 0.65rem 0.4rem 0.55rem;
  font-size: clamp(0.72rem, 1.05vw, 0.82rem);
  line-height: 1.35;
  font-weight: 500;
  color: rgba(201, 194, 184, 0.72);
  text-decoration: none;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

/* Hipparcos-style diamond “star” above each label */
.qual-cap-map__list a::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 0.1rem;
  background: rgba(var(--gold-rgb), 0.45);
  transform: rotate(45deg);
  border-radius: 1px;
  opacity: 0.45;
  box-shadow: none;
  transition: opacity 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.qual-cap-map__list a:hover {
  color: var(--gold-bright);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.qual-cap-map__list a:hover::before {
  opacity: 0.95;
  transform: rotate(45deg) scale(1.08);
}

.qual-cap-map__link--related {
  color: var(--frost);
  font-weight: 600;
  border-color: rgba(var(--gold-bright-rgb), 0.42);
  background: rgba(var(--gold-rgb), 0.07);
  box-shadow: 0 0 0 1px rgba(var(--gold-rgb), 0.12);
}

.qual-cap-map__link--related::before {
  opacity: 1;
  width: 9px;
  height: 9px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  box-shadow: 0 0 16px rgba(var(--gold-bright-rgb), 0.45), 0 0 28px rgba(var(--gold-rgb), 0.2);
}

.qual-cap-map__link--related:hover {
  border-color: rgba(var(--gold-bright-rgb), 0.55);
  background: rgba(var(--gold-rgb), 0.11);
}

.qual-page__main {
  min-width: 0;
}

.qual-page__body {
  max-width: 44rem;
}

/* Standalone capability pages: spacing before the capability grid */
.cap-page__map {
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

/* Capability inner pages: McKinsey-style depth (hero follow + subsection titles) */
.cap-page__hero-follow {
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--text-dim);
  max-width: 36rem;
  margin: -0.75rem 0 0;
}

.panel--page-first .cap-page__hero-follow {
  margin-top: -0.5rem;
  margin-bottom: 1.35rem;
}

.qual-page__body .cap-page__h3 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--frost);
  margin: 1.5rem 0 0.45rem;
  line-height: 1.35;
}

/* Capability inner pages (html.page-cap): stronger scrim + long-form legibility over starfield */
html.page-cap .panel {
  background: linear-gradient(
    165deg,
    rgba(7, 9, 16, calc(0.15 + var(--sky-veil) * 0.24)) 0%,
    rgba(11, 13, 23, calc(0.1 + var(--sky-veil) * 0.14)) 48%,
    rgba(7, 9, 16, calc(0.13 + var(--sky-veil) * 0.21)) 100%
  );
}

html.page-cap .panel--alt {
  background: linear-gradient(
    180deg,
    rgba(7, 9, 16, calc(0.14 + var(--sky-veil) * 0.2)) 0%,
    rgba(14, 18, 30, calc(0.1 + var(--sky-veil) * 0.16)) 100%
  );
}

html.page-cap .panel--cta {
  background: linear-gradient(
    180deg,
    rgba(7, 9, 16, calc(0.16 + var(--sky-veil) * 0.24)) 0%,
    rgba(7, 9, 16, calc(0.1 + var(--sky-veil) * 0.18)) 100%
  );
}

html.page-cap .qual-page__body {
  font-size: 1.125rem;
  line-height: 1.78;
  max-width: min(48rem, 100%);
}

html.page-cap .qual-page__body p,
html.page-cap .qual-bullets {
  color: rgba(242, 240, 236, 0.95);
}

html.page-cap .qual-bullets {
  line-height: 1.74;
}

html.page-cap .qual-bullets li {
  margin-bottom: 0.55rem;
}

html.page-cap .cap-page__hero-follow {
  color: rgba(242, 240, 236, 0.88);
  font-size: 1.125rem;
  line-height: 1.78;
}

html.page-cap .panel--page-first .lede.lede--narrow {
  color: var(--frost);
  font-size: 1.1875rem;
  line-height: 1.74;
}

html.page-cap .qual-page__h2 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  margin-top: 2rem;
  margin-bottom: 0.65rem;
}

html.page-cap .qual-page__body .cap-page__h3 {
  font-size: 1.09rem;
  margin-top: 1.65rem;
  color: var(--frost);
}

html.page-cap .qual-cap-map__list a {
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  line-height: 1.42;
  color: rgba(220, 214, 206, 0.88);
}

html.page-cap .qual-cap-map__list a:hover {
  color: var(--gold-bright);
}

html.page-cap .panel--page-first h1 {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 2px 24px rgba(0, 0, 0, 0.35);
}

.qual-page__h2 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--gold-rgb), 0.82);
  margin: 1.65rem 0 0.55rem;
}

.qual-page__body p {
  margin: 0 0 1rem;
}

.qual-page__body .lede {
  margin-bottom: 0.5rem;
}

.qual-bullets {
  margin: 0 0 1.15rem;
  padding-left: 1.2rem;
  color: var(--text);
  line-height: 1.65;
}

.qual-bullets li {
  margin-bottom: 0.4rem;
}

.qual-page__const {
  margin-top: clamp(2rem, 5vw, 3rem);
}

.qual-page__const .const-panel {
  min-height: clamp(260px, 36vw, 400px);
}

.qual-page__const .const-panel__figcap {
  text-align: left;
}

@media (max-width: 1100px) {
  .qual-cap-map__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .qual-cap-map__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qual-cap-map__list a {
    min-height: 4.25rem;
    font-size: 0.72rem;
    padding: 0.55rem 0.35rem 0.45rem;
  }
}

/* Qualification pages: readable article layout (scroll, no starfield / constellation) */
html.page-qual {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
}

html.page-qual body {
  --qual-sheet-sit: 196, 160, 98;
  --qual-sheet-app: var(--gold-rgb);
  --qual-sheet-out: 168, 198, 220;
  min-height: 100dvh;
  min-height: 100vh;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
}

body.page-qual .site-main {
  display: block;
  overflow: visible;
}

body.page-qual .site-footer {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

body.page-qual .panel.panel--page-first.panel--alt {
  display: block;
  overflow: visible;
  min-height: auto;
  padding-top: calc(var(--section-y) + 2.5rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(180deg, rgba(7, 9, 16, 0.94) 0%, rgba(10, 12, 22, 0.97) 45%, rgba(6, 7, 14, 0.99) 100%);
}

body.page-qual .panel--page-first > .panel__inner--deck {
  display: block;
  overflow: visible;
  min-height: auto;
  padding-top: 0;
  padding-left: clamp(0.5rem, 2vw, 0.75rem);
  padding-right: clamp(0.5rem, 2vw, 0.75rem);
}

body.page-qual .qual-page__wrap.qual-sheet {
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  max-width: min(40rem, 100%);
  display: block;
  position: relative;
  isolation: isolate;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  --qual-sheet-sit: 196, 160, 98;
  --qual-sheet-app: var(--gold-rgb);
  --qual-sheet-out: 168, 198, 220;
}

.lotor-detail__body .qual-page__wrap.qual-sheet {
  --qual-sheet-sit: 196, 160, 98;
  --qual-sheet-app: var(--gold-rgb);
  --qual-sheet-out: 168, 198, 220;
}

body.page-qual .qual-sheet__scale-wrap {
  position: static;
  overflow: visible;
  flex: none;
  min-height: auto;
  padding: 0;
}

body.page-qual .qual-sheet__fit {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  width: 100% !important;
  max-width: none;
  box-sizing: border-box;
  padding: 0;
  transform: none !important;
  will-change: auto;
}

/* Deck header mirrors capability inner pages: .page-back-nav + .section-kicker outside the title strip */
body.page-qual .qual-sheet__fit > .page-back-nav {
  margin-bottom: 0.85rem;
}

body.page-qual .qual-sheet__fit > .section-kicker {
  margin-top: 0;
}

/* Title row: headline + 3×3 capability dots (same visual band as qual title) */
.qual-sheet .qual-sheet__title-strip {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  min-width: 0;
}

.qual-sheet .qual-sheet__title-strip .qual-sheet__hero {
  flex: 1;
  min-width: 0;
}

/* 3×3 = nine circular links; source order matches quals/*.html qual-sky__nodes */
.qual-sheet .qual-sheet__cap-grid {
  display: grid;
  grid-template-columns: repeat(3, var(--qual-cap-dot, 2.82rem));
  grid-template-rows: repeat(3, var(--qual-cap-dot, 2.82rem));
  gap: 0.2rem;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.12rem;
  width: auto;
  font-family: var(--font-body);
}

.qual-sheet .qual-sheet__cap-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: var(--qual-cap-dot, 2.82rem);
  height: var(--qual-cap-dot, 2.82rem);
  padding: 0.1rem 0.12rem;
  text-decoration: none;
  text-align: center;
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: hidden;
  font-size: clamp(0.3rem, 0.22vw + 0.26rem, 0.46rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: rgba(210, 204, 192, 0.38);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 8, 14, 0.55);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.qual-sheet .qual-sheet__cap-cell:hover {
  color: rgba(228, 222, 210, 0.72);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(14, 16, 26, 0.75);
  transform: scale(1.06);
}

.qual-sheet .qual-sheet__cap-cell:focus-visible {
  outline: 2px solid rgba(var(--gold-bright-rgb), 0.85);
  outline-offset: 2px;
}

.qual-sheet .qual-sheet__cap-cell--active {
  color: rgba(236, 232, 222, 0.94);
  font-weight: 600;
  background: rgba(18, 20, 32, 0.92);
  border-color: rgba(var(--gold-rgb), 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(var(--gold-rgb), 0.2);
}

.qual-sheet .qual-sheet__cap-cell--active:hover {
  color: var(--gold-bright);
  border-color: rgba(var(--gold-bright-rgb), 0.55);
}

.qual-sheet .qual-sheet__cap-cell--core {
  color: rgba(255, 252, 246, 0.98);
  font-weight: 600;
  background: rgba(var(--gold-rgb), 0.22);
  border-color: rgba(var(--gold-bright-rgb), 0.65);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(var(--gold-bright-rgb), 0.35);
}

body.page-qual .qual-sheet .qual-sheet__cap-cell {
  font-size: clamp(0.5rem, 0.65vmin + 0.38rem, 0.74rem);
  line-height: 1.1;
  padding: 0.14rem 0.2rem;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

body.page-qual .qual-sheet__grid {
  display: flex;
  flex-direction: column;
  gap: clamp(0.85rem, 2vw, 1.35rem);
  align-items: stretch;
  min-height: 0;
}

body.page-qual .qual-sheet__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

body.page-qual .qual-sheet__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: start;
  column-gap: clamp(0.65rem, 2.2vw, 1.35rem);
  row-gap: 0.35rem;
  min-width: 0;
}

/* Flatten title strip so headline + 3×3 are intro grid cells (3×3 top-right). */
body.page-qual .qual-sheet .qual-sheet__title-strip {
  display: contents;
}

body.page-qual .qual-sheet__hero {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: none;
  border: none;
  min-width: 0;
}

body.page-qual .qual-sheet .qual-sheet__cap-grid {
  --qual-cap-dot: clamp(3.2rem, 9.2vmin, 4.5rem);
  gap: 0.28rem;
  grid-column: 2;
  grid-row: 1;
  margin-top: 0;
  justify-self: end;
  align-self: start;
}

/* Match .panel--page-first h1 (capability / inner deck pages) */
body.page-qual .qual-sheet__hero h1 {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 600;
  color: var(--frost);
  margin: 0 0 1rem;
  max-width: none;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.22);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
  font-family: var(--font-body);
}

body.page-qual .qual-sheet__sky {
  margin: 0.15rem 0 0;
  padding: 0 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.page-qual .qual-sheet__triptych--detail {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.4vw, 1.5rem);
  align-items: stretch;
  padding-top: 0.75rem;
}

/* FAB stick figure (constellationship.fab) in map-scaled space; preserveAspectRatio xMidYMid meet — not stretched */
.qual-sheet .qual-sheet__triptych--const {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.28rem 0.55rem;
  padding-top: 0.08rem;
}

.qual-sheet .qual-sheet__const-arc {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
  width: auto;
  max-width: 100%;
  height: clamp(3.4rem, 10vw, 5.25rem);
  display: block;
  pointer-events: none;
  overflow: visible;
}

@media (prefers-reduced-motion: no-preference) {
  .qual-sheet .qual-sheet__const-line {
    animation: qual-const-arc-drift 26s linear infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qual-sheet .qual-sheet__const-line {
    animation: none;
  }
}

@keyframes qual-const-arc-drift {
  to {
    stroke-dashoffset: -45;
  }
}

.qual-sheet .qual-sheet__const-line {
  fill: none;
  stroke: #b19971;
  stroke-width: 1.32;
  stroke-dasharray: 1.75 8.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.88;
  vector-effect: non-scaling-stroke;
}

.qual-sheet .qual-sheet__const-leader {
  fill: none;
  stroke: rgba(177, 153, 113, 0.5);
  stroke-width: 0.9;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.qual-sheet .qual-sheet__const-label {
  font-family: var(--font-body);
  font-size: clamp(0.44rem, 0.18vw + 0.36rem, 0.64rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  fill: rgba(232, 224, 208, 0.82);
  paint-order: stroke fill;
  stroke: rgba(8, 10, 18, 0.5);
  stroke-width: 0.4px;
}

.qual-sheet .qual-sheet__triptych--const > .qual-sheet__lane--situation {
  grid-row: 2;
  grid-column: 1;
}

.qual-sheet .qual-sheet__triptych--const > .qual-sheet__lane--approach {
  grid-row: 2;
  grid-column: 2;
}

.qual-sheet .qual-sheet__triptych--const > .qual-sheet__lane--outcome {
  grid-row: 2;
  grid-column: 3;
}

body.page-qual .qual-sheet__lane {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0 1.2rem;
  margin: 0;
  border-radius: 0;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.2s ease;
}

body.page-qual .qual-sheet__lane:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

body.page-qual .qual-sheet__lane::before {
  display: none;
}

.qual-sheet .qual-sheet__lane-head {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  margin: 0;
  padding-bottom: 0.22rem;
  border-bottom: 1px solid rgba(var(--lane-rgb), 0.32);
}

.qual-sheet .qual-sheet__lane-star {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  border-radius: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.48) 45%,
    rgb(var(--lane-rgb)) 100%
  );
  box-shadow: 0 0 8px rgba(var(--lane-rgb), 0.42);
}

@media (prefers-reduced-motion: no-preference) {
  .qual-sheet .qual-sheet__lane-star {
    animation: qual-star-glint 5s ease-in-out infinite;
  }

  .qual-sheet .qual-sheet__lane--approach .qual-sheet__lane-star {
    animation-delay: 0.65s;
  }

  .qual-sheet .qual-sheet__lane--outcome .qual-sheet__lane-star {
    animation-delay: 1.3s;
  }
}

body.page-qual .qual-sheet__lane--situation {
  --lane-rgb: var(--qual-sheet-sit);
}

body.page-qual .qual-sheet__lane--approach {
  --lane-rgb: var(--qual-sheet-app);
}

body.page-qual .qual-sheet__lane--outcome {
  --lane-rgb: var(--qual-sheet-out);
}

.qual-sheet .qual-sheet__lane-head .qual-page__h2 {
  margin: 0;
  padding: 0;
  border: none;
  flex: 1;
  min-width: 0;
  font-size: clamp(0.52rem, 0.3vw + 0.46rem, 0.66rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(var(--lane-rgb), 0.98);
  font-family: var(--font-body);
}

body.page-qual .qual-sheet .qual-sheet__lane-head {
  padding-bottom: 0.45rem;
  margin-bottom: 0.1rem;
  border-bottom-width: 1px;
}

body.page-qual .qual-sheet .qual-sheet__lane-head .qual-page__h2 {
  font-size: clamp(0.95rem, 0.85vw + 0.78rem, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* Lanes without lane-head (legacy fragments) */
body.page-qual .qual-sheet__lane > .qual-page__h2:first-child {
  margin: 0;
  font-size: clamp(0.52rem, 0.3vw + 0.46rem, 0.66rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(var(--lane-rgb), 0.98);
  padding-bottom: 0.22rem;
  border-bottom: 1px solid rgba(var(--lane-rgb), 0.32);
  font-family: var(--font-body);
}

body.page-qual .qual-sheet__lane .qual-bullets {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 1.02rem;
  line-height: 1.68;
  color: rgba(240, 236, 228, 0.95);
}

body.page-qual .qual-sheet__lane .qual-bullets li {
  margin-bottom: 0.65rem;
}

body.page-qual .qual-sheet__lane .qual-bullets li:last-child {
  margin-bottom: 0;
}

body.page-qual .qual-sheet__lane .qual-bullets--outcome {
  list-style: none;
  padding-left: 0;
}

body.page-qual .qual-sheet__lane .qual-bullets--outcome li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.65rem;
}

body.page-qual .qual-sheet__lane .qual-bullets--outcome li:last-child {
  margin-bottom: 0;
}

body.page-qual .qual-sheet__lane .qual-bullets--outcome li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  transform: rotate(45deg);
  background: var(--gold);
}

/* Modal: same sheet, flex height from dialog body */
.lotor-detail__body:has(.qual-sheet) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0.5rem var(--pad-x) 0.65rem;
}

.lotor-detail__body:has(.qual-sheet) .qual-page__wrap.qual-sheet {
  flex: 1;
  min-height: 0;
  max-width: min(1200px, var(--max));
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 520px) {
  .qual-sheet .qual-sheet__triptych--const {
    grid-template-columns: 1fr;
    grid-template-rows: auto repeat(3, auto);
  }

  .qual-sheet .qual-sheet__const-arc {
    grid-column: 1;
    grid-row: 1;
  }

  .qual-sheet .qual-sheet__triptych--const > .qual-sheet__lane--situation {
    grid-row: 2;
    grid-column: 1;
  }

  .qual-sheet .qual-sheet__triptych--const > .qual-sheet__lane--approach {
    grid-row: 3;
    grid-column: 1;
  }

  .qual-sheet .qual-sheet__triptych--const > .qual-sheet__lane--outcome {
    grid-row: 4;
    grid-column: 1;
  }

  .qual-sheet .qual-sheet__title-strip {
    flex-wrap: wrap;
  }

  .qual-sheet .qual-sheet__cap-grid {
    margin-top: 0;
    margin-left: auto;
    --qual-cap-dot: 2.58rem;
  }

  body.page-qual .qual-sheet .qual-sheet__cap-grid {
    --qual-cap-dot: clamp(2.95rem, 26vw, 4.2rem);
  }

  body.page-qual .qual-sheet__intro {
    grid-template-columns: 1fr;
  }

  body.page-qual .qual-sheet__hero {
    grid-column: 1;
    grid-row: 1;
  }

  body.page-qual .qual-sheet .qual-sheet__cap-grid {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
  }

}

/* Section titles: title block + lede as a split band */
.deck-header-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, min(32vw, 22rem));
  gap: 1rem 2.5rem;
  align-items: end;
  margin-bottom: clamp(0.85rem, 2vw, 1.25rem);
}

.deck-header-aside__lede {
  margin: 0 !important;
  text-align: right;
  align-self: end;
  text-wrap: balance;
}

.deck-header-aside__aside {
  text-align: right;
  align-self: end;
}

@media (max-width: 720px) {
  .deck-header-aside {
    grid-template-columns: 1fr;
  }

  .deck-header-aside__lede {
    text-align: left;
  }

  .deck-header-aside__aside {
    text-align: left;
  }
}

.const-panel__figcap {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(var(--gold-bright-rgb), 0.5);
  margin: 0 0 0.45rem;
  line-height: 1.3;
  text-align: right;
}

@media (max-width: 899px) {
  .const-panel__figcap {
    text-align: center;
  }
}

.const-panel {
  position: relative;
  width: 100%;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: clamp(440px, 54vw, 660px);
  background: rgba(6, 8, 14, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: none;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* SVG + callouts share one box so label % aligns with scaled star map */
.const-panel__chart {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.const-panel[data-constellation="capabilities"] .const-panel__chart,
.const-panel[data-constellation="quals"] .const-panel__chart {
  inset: 3% 2.5% 6% 2.5%;
}

.const-panel[data-constellation="contact"] .const-panel__chart {
  inset: 4% 4% 8% 4%;
}

.const-panel__chart .const-panel__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.const-panel__chart .const-labels {
  inset: 0;
}

.const-panel[data-constellation="capabilities"] {
  min-height: clamp(520px, 58vw, 720px);
}

.const-panel[data-constellation="quals"] {
  min-height: clamp(580px, 64vw, 800px);
}

.const-panel[data-constellation="capabilities"] .const-label {
  width: min(300px, 38vw);
  max-width: min(300px, 38vw);
  min-width: 0;
  box-sizing: border-box;
}

@supports not (backdrop-filter: blur(6px)) {
  .const-panel {
    background: rgba(6, 8, 14, 0.24);
  }
}

.const-panel[data-constellation="contact"] {
  min-height: clamp(300px, 36vw, 440px);
}

.const-panel__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Constellation stick figures: dashed bronze (chart), readable on scrim */
.const-panel__svg .const-lines {
  stroke: #c4a574;
  stroke-width: 1.5;
  stroke-dasharray: 1 10;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.96;
  vector-effect: non-scaling-stroke;
}

@media (prefers-reduced-motion: no-preference) {
  .const-panel__svg .const-lines {
    animation: const-line-drift 28s linear infinite;
  }
}

@keyframes const-line-drift {
  to {
    stroke-dashoffset: -48;
  }
}

/* Callout leaders: solid, cool — clearly not stick-figure dashes */
.const-panel__svg .const-leaders {
  stroke: rgba(186, 204, 228, 0.88);
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 1;
  vector-effect: non-scaling-stroke;
}

.const-panel__svg .const-lines line {
  vector-effect: non-scaling-stroke;
}

.const-panel__svg .const-leaders path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.const-panel__svg .const-stars > g {
  filter: brightness(1.35) drop-shadow(0 0 3px rgba(255, 252, 245, 0.35));
}

/* Core + outline same hue; thin stroke avoids “double rim” */
.const-panel__svg .const-stars use {
  stroke-width: 0.2 !important;
  paint-order: stroke fill;
}

.const-labels {
  position: absolute;
  /* Room for larger callouts + chart-facing connector edge without clipping */
  inset: 5.5% 4% 9% 4%;
  z-index: 2;
  pointer-events: none;
}

/* Callout cards: readable surface + chart-facing edge matches SVG leader stroke */
.const-label {
  position: absolute;
  transform: translate(-50%, -50%);
  max-width: min(380px, 50vw);
  min-width: min(200px, 42vw);
  pointer-events: auto;
  padding: 1.05rem 1.2rem;
  border-radius: var(--radius);
  background: linear-gradient(
    145deg,
    rgba(14, 16, 26, 0.88) 0%,
    rgba(10, 12, 22, 0.82) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .const-label {
    background: rgba(14, 16, 26, 0.94);
  }
}

.const-label::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(var(--gold-bright-rgb), 0.55) 0%,
    rgba(var(--gold-rgb), 0.28) 100%
  );
  opacity: 1;
}

/* Leader-line color on the edge that faces the constellation (same hue as .const-leaders) */
.const-label--left {
  border-right: 2px solid rgba(186, 204, 228, 0.78);
  padding-right: 1.35rem;
}

.const-label--left::before {
  left: 0;
}

.const-label--right {
  border-left: 2px solid rgba(186, 204, 228, 0.78);
  padding-left: 1.35rem;
}

.const-label--right::before {
  right: 0;
  left: auto;
}

.const-label--below {
  border-top: 2px solid rgba(186, 204, 228, 0.78);
  padding-top: 1.15rem;
}

.const-label--below::before {
  display: none;
}

a.const-label--link {
  padding: 1.05rem 1.2rem;
}

.const-label--title-only .const-label__title {
  margin-bottom: 0;
  line-height: 1.38;
}

a.const-label--title-only {
  padding: 0.7rem 1.05rem;
}

.const-label--left {
  transform: translate(0, -50%);
  text-align: left;
}

.const-label--right {
  transform: translate(-100%, -50%);
  text-align: right;
}

.const-label--top {
  transform: translate(-50%, 0);
  text-align: center;
}

.const-label--below {
  transform: translate(-50%, 0);
  top: auto !important;
  bottom: 0;
  text-align: center;
  padding-bottom: 1rem;
  min-width: min(260px, 88%);
  max-width: min(420px, 92%);
}

.const-label__title {
  font-family: var(--font-body);
  font-size: clamp(0.94rem, 1.25vw, 1.08rem);
  font-weight: 600;
  color: var(--gold-bright);
  margin: 0 0 0.4rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-shadow: none;
}

.const-label__body {
  font-size: clamp(0.88rem, 1.12vw, 1.02rem);
  line-height: 1.58;
  margin: 0;
  color: rgba(236, 232, 224, 0.93);
  text-shadow: none;
}

.const-label__body--rich {
  font-size: clamp(0.9rem, 1.14vw, 1.04rem);
  line-height: 1.58;
  margin: 0;
  color: rgba(242, 240, 236, 0.94);
  text-shadow: none;
}

.const-label .btn {
  font-size: 0.84rem;
  padding: 0.42rem 0.95rem;
}

.const-label__body--rich .btn {
  margin-top: 0.2rem;
  margin-right: 0.35rem;
}

.const-label__body--rich span {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.92em;
  color: var(--text-dim);
}

.const-label__body--rich a:not(.btn) {
  color: var(--link);
}

.const-label__body--rich a:not(.btn):hover {
  color: var(--link-hover);
}

a.const-label--link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

a.const-label--link:hover {
  opacity: 1;
  background: linear-gradient(145deg, rgba(22, 24, 36, 0.92) 0%, rgba(14, 16, 28, 0.88) 100%);
  border-color: rgba(var(--gold-bright-rgb), 0.28);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(var(--gold-rgb), 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

a.const-label--link:hover .const-label__title {
  color: var(--gold);
}

a.const-label--link:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

.const-label__more {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--gold-bright-rgb), 0.78);
  text-shadow: none;
}

.page-back-nav {
  margin-bottom: 1.25rem;
}

.page-back {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
}

.page-back:hover {
  color: var(--link-hover);
}

#capabilities h2,
#quals h2,
#contact h2#contact-heading {
  font-size: clamp(1.85rem, 3.5vw, 2.65rem);
  font-weight: 600;
  color: var(--frost);
  margin: 0 0 0.65rem;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.25);
  max-width: 24ch;
}

#quals.panel.const-section {
  padding-top: clamp(5rem, 12vw, 9.5rem);
  padding-bottom: clamp(5.5rem, 13vw, 10.5rem);
}

html.lotor-home #quals.panel.const-section {
  padding-top: 0;
  padding-bottom: 0;
}

@media (max-width: 899px) {
  .const-panel {
    min-height: 0;
  }

  /* Stacked chart + labels on inner pages; home keeps overlay (viewport stage, no in-scene scroll) */
  html:not(.lotor-home) .const-panel__chart {
    position: relative;
    inset: auto !important;
    width: 100%;
  }

  html:not(.lotor-home) .const-panel__svg {
    position: relative;
    height: min(56vw, 340px);
    display: block;
  }

  html:not(.lotor-home) .const-labels {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1rem 0.85rem 1.15rem;
    pointer-events: auto;
  }

  html:not(.lotor-home) .const-label,
  html:not(.lotor-home) .const-label--left,
  html:not(.lotor-home) .const-label--right,
  html:not(.lotor-home) .const-label--top,
  html:not(.lotor-home) .const-label--below {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    max-width: none;
    min-width: 0;
    text-align: left;
    padding: 1rem 1.1rem 1rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 3px solid rgba(186, 204, 228, 0.75);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(16, 18, 28, 0.92) 0%, rgba(10, 12, 22, 0.88) 100%);
  }

  html:not(.lotor-home) .const-label--right {
    border-left: 3px solid rgba(186, 204, 228, 0.75);
    border-right: 1px solid rgba(255, 255, 255, 0.09);
  }

  html:not(.lotor-home) .const-label--below {
    border-top: 3px solid rgba(186, 204, 228, 0.75);
    border-left: 1px solid rgba(255, 255, 255, 0.09);
    padding-top: 1.1rem;
  }

  html:not(.lotor-home) .const-panel[data-constellation="capabilities"] .const-label {
    width: auto;
    max-width: none;
  }

  html:not(.lotor-home) a.const-label--link {
    padding: 1rem 1.1rem 1rem 1.15rem;
  }

  html:not(.lotor-home) .const-label::before {
    display: none;
  }
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(7, 9, 16, 0.52);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px) saturate(1.08);
  transition: background 0.35s ease, border-color 0.35s ease;
}

@supports not (backdrop-filter: blur(12px)) {
  .site-header {
    background: rgba(7, 9, 16, 0.88);
  }
}

.site-header.is-scrolled {
  background: rgba(7, 9, 16, 0.78);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: var(--brand-wordmark);
  text-decoration: none;
}

.nav-brand__mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(var(--gold-rgb), 0.35);
}

.nav-brand:hover {
  color: var(--gold-bright);
}

.nav-brand:hover .brand-mark {
  color: var(--gold-bright);
}

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--frost);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.nav-toggle:hover {
  border-color: rgba(var(--gold-bright-rgb), 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--gold-bright);
}

.nav-links a[aria-current="page"] {
  color: var(--gold-bright);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(var(--gold-rgb), 0.45);
  text-underline-offset: 4px;
}

@media (max-width: 768px) {
  .site-header {
    padding-top: env(safe-area-inset-top);
  }

  .header-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--mobile-header-gap);
    padding: 0.8rem var(--mobile-header-pad-x);
  }

  #site-nav {
    grid-column: 1 / -1;
    width: 100%;
  }

  .nav-brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .nav-brand__mark {
    width: clamp(2.2rem, 9vw, 2.5rem);
    height: clamp(2.2rem, 9vw, 2.5rem);
  }

  .nav-brand__text {
    font-size: clamp(0.95rem, 4vw, 1.05rem);
    letter-spacing: 0.04em;
  }

  .nav-brand__text {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .nav-toggle {
    display: block;
    flex-shrink: 0;
    min-height: 2.6rem;
    padding-inline: clamp(0.75rem, 3.5vw, 0.95rem);
  }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    width: min(100%, var(--mobile-shell-inline));
    margin-inline: auto;
    padding: 0.85rem var(--mobile-header-pad-x) max(1rem, env(safe-area-inset-bottom));
    background: rgba(7, 9, 16, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px dotted var(--dot);
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  }
  .site-header.is-open .nav-links {
    display: flex;
  }
  .nav-links a {
    display: block;
    padding: 0.7rem 0.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .nav-links li:last-child a {
    border-bottom: 0;
  }
}

/* Panels — light veils so inline SVG stars stay vivid (--sky-veil thins scrim while zoomed) */
.panel {
  position: relative;
  isolation: isolate;
  padding: var(--section-y) var(--pad-x);
  overflow: hidden;
  scroll-margin-top: 4.5rem;
  background: linear-gradient(
    165deg,
    rgba(7, 9, 16, calc(0.08 + var(--sky-veil) * 0.2)) 0%,
    rgba(11, 13, 23, calc(0.04 + var(--sky-veil) * 0.1)) 48%,
    rgba(7, 9, 16, calc(0.07 + var(--sky-veil) * 0.17)) 100%
  );
}

.panel--hero {
  min-height: 100dvh;
  min-height: 100vh;
  padding-top: calc(var(--section-y) + 3.25rem);
  display: flex;
  align-items: center;
  background: linear-gradient(
    105deg,
    rgba(7, 9, 16, calc(0.12 + var(--sky-veil) * 0.24)) 0%,
    rgba(11, 13, 23, calc(0.04 + var(--sky-veil) * 0.08)) 42%,
    rgba(7, 9, 16, calc(0.1 + var(--sky-veil) * 0.2)) 100%
  );
}

/* Inner pages: clear fixed header (match hero offset) */
.panel--page-first {
  padding-top: calc(var(--section-y) + 3.25rem);
}

.panel--page-first h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  color: var(--frost);
  margin: 0 0 1rem;
  max-width: 32ch;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.22);
}

.panel--alt {
  background: linear-gradient(
    180deg,
    rgba(7, 9, 16, calc(0.08 + var(--sky-veil) * 0.16)) 0%,
    rgba(14, 18, 30, calc(0.06 + var(--sky-veil) * 0.12)) 100%
  );
}

.panel--cta {
  min-height: 55vh;
  display: flex;
  align-items: center;
  background: linear-gradient(
    180deg,
    rgba(7, 9, 16, calc(0.12 + var(--sky-veil) * 0.2)) 0%,
    rgba(7, 9, 16, calc(0.06 + var(--sky-veil) * 0.14)) 100%
  );
}

.panel__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.panel__inner--hero {
  flex: 1;
  display: flex;
  align-items: center;
}

.panel__inner--narrow {
  max-width: min(560px, var(--max));
}

/* Contact: slightly wider so the two-star constellation + labels breathe */
#contact .panel__inner--deck.panel__inner--narrow {
  max-width: min(720px, var(--max));
}

.panel__inner--deck {
  max-width: min(1280px, var(--max));
}

html.sky-journey:not(.lotor-home) .panel[data-scroll-section] > .panel__inner {
  will-change: opacity;
  animation: none !important;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .hero-cta {
    justify-content: center;
  }
}

.lede {
  font-size: 1.14rem;
  line-height: 1.72;
  color: var(--text);
  max-width: 42rem;
  margin-bottom: 2.15rem;
  font-weight: 400;
  text-wrap: balance;
}

.lede--narrow {
  max-width: 36rem;
}

.hello-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn-email {
  font-size: 0.88rem;
  word-break: break-all;
}

@media (min-width: 520px) {
  .btn-email {
    font-size: 0.92rem;
    word-break: normal;
  }
}

/* Buttons — flat */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.45rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-style: solid;
  border-width: 1px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.btn-primary {
  color: var(--void);
  border-color: var(--gold-deep);
  background: var(--gold);
  box-shadow: none;
}

.btn-primary:hover {
  color: var(--void);
  border-color: var(--gold);
  background: var(--gold-bright);
  transform: none;
  box-shadow: none;
}

.btn-primary:active {
  transform: translateY(0);
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  box-shadow: none;
}

.btn-ghost {
  color: var(--frost);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px) saturate(1.02);
  box-shadow: none;
}

.btn-ghost:hover {
  border-color: var(--glass-border-hover);
  color: var(--gold-bright);
  background: rgba(255, 255, 255, 0.07);
  transform: none;
}

.btn-ghost:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.06);
}

@supports not (backdrop-filter: blur(6px)) {
  .btn-ghost {
    background: rgba(18, 22, 34, 0.65);
  }
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 1.75rem var(--pad-x);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(7, 9, 16, 0.42) 0%, rgba(10, 8, 18, 0.75) 100%);
  backdrop-filter: blur(10px) saturate(1.02);
}

@supports not (backdrop-filter: blur(10px)) {
  .site-footer {
    background: linear-gradient(180deg, rgba(7, 9, 16, 0.88) 0%, var(--void) 100%);
  }
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-brand {
  color: var(--brand-wordmark);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  text-decoration: none;
}

.footer-brand:hover {
  color: var(--gold-bright);
}

.footer-copy {
  margin: 0;
}

@media print {
  .fixed-celestial,
  .home-map-overlay,
  .site-header {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}

/* Shared detail-page hardening */
html:not(.lotor-home) .fixed-celestial {
  contain: strict;
}

html:not(.lotor-home) .fixed-celestial > .celestial-svg {
  animation: none !important;
  filter: none;
}

body.page-cap .site-header,
body.page-qual .site-header {
  background: rgba(7, 9, 16, 0.97);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: none;
}

.nav-brand:focus-visible,
.nav-links a:focus-visible,
.page-back:focus-visible,
.footer-brand:focus-visible,
.qual-cap-map a:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
  border-radius: 3px;
}

.detail-cta {
  min-height: auto;
  padding-top: clamp(2.75rem, 6vw, 4.5rem);
  padding-bottom: clamp(2.75rem, 6vw, 4.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at 75% 50%, rgba(var(--gold-rgb), 0.08), transparent 36%),
    rgba(7, 9, 16, 0.86);
}

.detail-cta__inner {
  display: block;
  max-width: min(52rem, 92vw);
}

.detail-cta__inner h2 {
  max-width: 15ch;
  margin: 0 0 1.25rem;
  color: var(--frost);
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1.02;
}

body.page-qual .qual-sheet .qual-sheet__cap-cell {
  font-size: clamp(0.66rem, 0.2vw + 0.58rem, 0.74rem);
  line-height: 1.08;
}

@media (max-width: 520px) {
  body.page-qual .qual-sheet .qual-sheet__cap-cell {
    font-size: clamp(0.64rem, 2.7vw, 0.72rem);
  }
}

body.page-cap .nav-brand,
body.page-qual .nav-brand,
body.page-cap .footer-brand,
body.page-qual .footer-brand {
  min-height: 2.75rem;
}

@media (max-width: 768px) {
  body.page-cap .nav-toggle,
  body.page-qual .nav-toggle {
    min-height: 2.75rem;
  }

  html:not(.js) body.page-cap .nav-toggle,
  html:not(.js) body.page-qual .nav-toggle {
    display: none;
  }

  html:not(.js) body.page-cap .nav-links,
  html:not(.js) body.page-qual .nav-links {
    position: static;
    display: flex;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Editorial detail-page refresh */
body.page-cap,
body.page-qual {
  --section-y: clamp(3rem, 7vw, 5.5rem);
  --font-ui: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-editorial: Georgia, "Times New Roman", Times, serif;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.62;
}

body.page-cap h1,
body.page-cap h2,
body.page-cap h3,
body.page-qual h1,
body.page-qual h2,
body.page-qual h3,
body.page-cap .brand-mark,
body.page-qual .brand-mark {
  font-family: var(--font-editorial);
}

body.page-cap .site-header,
body.page-qual .site-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(7, 9, 16, 0.91);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

body.page-cap .nav-links,
body.page-qual .nav-links {
  gap: 0.35rem;
}

body.page-cap .nav-links a,
body.page-qual .nav-links a {
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.86rem;
}

body.page-cap .nav-links a:hover,
body.page-qual .nav-links a:hover,
body.page-cap .nav-links a:focus-visible,
body.page-qual .nav-links a:focus-visible {
  border-color: rgba(232, 212, 170, 0.22);
  background: rgba(255, 255, 255, 0.045);
}

body.page-cap .panel--page-first h1,
body.page-qual .qual-sheet__hero h1 {
  letter-spacing: -0.035em;
  text-wrap: balance;
}

body.page-cap .panel--page-first h1 {
  max-width: 14ch;
  font-size: clamp(2.6rem, min(6.5vw, 9.5svh), 6.4rem);
  line-height: 0.98;
}

body.page-qual .qual-sheet__hero h1 {
  max-width: 22ch;
  font-size: clamp(1.7rem, min(3.2vw, 7svh), 2.35rem);
}

body.page-cap .lede,
body.page-cap .cap-page__hero-follow,
body.page-qual .qual-page__body {
  max-width: 72ch;
}

body.page-cap .qual-page__h2,
body.page-qual .qual-sheet__title {
  letter-spacing: -0.02em;
}

body.page-cap .qual-page__body,
body.page-qual .qual-page__body {
  color: rgba(221, 214, 204, 0.84);
}

body.page-cap .panel,
body.page-qual .panel {
  border-color: rgba(255, 255, 255, 0.08);
}

body.page-cap .detail-cta__inner h2,
body.page-qual .detail-cta__inner h2 {
  font-family: var(--font-editorial);
  letter-spacing: -0.035em;
}

@media (prefers-reduced-motion: no-preference) {
  body.page-cap .panel--page-first .panel__inner,
  body.page-qual .qual-sheet__hero {
    animation: detail-intro 0.48s ease-out both;
  }
}

@keyframes detail-intro {
  from {
    opacity: 0;
    transform: translateY(0.65rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  body.page-cap .panel--page-first h1 {
    font-size: clamp(2.25rem, min(13vw, 8.5svh), 4.4rem);
  }

  body.page-cap .nav-links a,
  body.page-qual .nav-links a {
    border-radius: 0;
  }
}

@media (max-height: 700px) {
  body.page-cap .panel.panel--page-first,
  body.page-qual .panel.panel--page-first.panel--alt {
    padding-top: clamp(5.5rem, 22svh, 7rem);
  }

  body.page-cap .panel--page-first h1 {
    font-size: clamp(2.15rem, min(4.8vw, 8.5svh), 3.6rem);
  }

  body.page-qual .qual-sheet__hero h1 {
    font-size: clamp(1.6rem, min(3vw, 7svh), 2.1rem);
  }
}

@media (max-width: 768px) and (max-height: 750px) {
  body.page-cap .panel.panel--page-first,
  body.page-qual .panel.panel--page-first.panel--alt {
    padding-top: 6rem;
  }
}
