/* =====================================================================
   MESA QUANTUM — revamp2 · DIRECTION B "PATTERN" · site stylesheet
   Loaded LAST, after: tokens/palette · tokens/core · themes/direction-b-pattern
   · motifs/motifs · graphics/graphics · components/components.

   REWRITTEN 2026-08-27. The theme was inverted at TQ's direction — "the purple
   sites are too dark, we need lighter color scheme. v2 can be primarily white
   with more purple sections." Everything below used to be composed for a
   #110C1D ground (CIE L*4.3). It is now a WHITE site that drops into full-bleed
   purple bands (--ds-surface-deep, #2A0850, L*10.9). Every rule that assumed
   the old ground has been re-derived rather than nudged.

   CONTRACT
   - Semantic roles only. No raw hex anywhere in this file, and no --mqn-*
     palette variable. Where a role was missing it is ADDED here (--ds-…),
     derived from roles the theme already assigns.
   - Exactly TWO animations ship, both declared in motion-manifest.json:
     @keyframes ds-lattice-drift (the system's, used once on
     /capabilities/mag-isr/) and @keyframes mq-hero-cycle (the homepage hero
     image sequence). Both stop under prefers-reduced-motion.

   THE IDEA, IN ONE LINE
   The dot lattice is a sampling grid, not a texture. It appears at three
   scales and each one is load-bearing:
     1. LAYOUT   — content sits in a hairline cell lattice (.mq-lattice).
     2. GROUND   — a dot field over a contour field appears where a field
                   being measured is literally the subject of the copy.
     3. HERO     — the lattice is laid over real terrain, and the terrain
                   changes underneath it while the grid stays registered.
                   That is the whole argument for Direction B, made once,
                   at the top of the landing page, where it is legible.

   WHAT THE INVERSION CHANGED, specifically
   - .ds-section--deep is now USED, not avoided. On the old dark theme it
     resolved to near-black text on near-black ground; the system has since
     grown --ds-deep-* roles and restyles a whole band from one class. Every
     purple band on this site is that class. Nothing is hand-inverted.
   - .mq-figure / .mq-readout no longer sit on --ds-surface-deep. On white
     that would be a purple plate under every photograph.
   - .mq-cell hover no longer swaps --ds-bg for --ds-surface: on this theme
     both resolve to white, so the hover state would have been invisible.
     It now moves to the purple tint.
   - .motif-contour no longer needs the local mask workaround this build
     reported upstream: motifs.css is mask-driven now and inherits
     currentColor. Only the framing (size/position/colour) is set here.

   DELIBERATE DEVIATIONS, recorded here because the guidelines ask for them:
   - --ds-section-y is retuned. The dark build ran it TIGHT because density
     read as maturity on a near-black ground. On white, with photographs in
     play, the same density reads as crowding — TQ: "create good spacing so
     text doesn't look crowded" — so it is retuned UP instead. §5 explicitly
     allows retuning this one token.
   - .ds-nav is shown at every width. The system hides it below 900px and
     assumes a JS drawer; this build has no JavaScript at all.
   ===================================================================== */

/* ---------------------------------------------------------------
   Added roles + one retuned rhythm token.
   --------------------------------------------------------------- */
:root {
  --ds-section-y:     clamp(4rem, 2.6rem + 4.4vw, 7.5rem);
  --ds-cell:          var(--ds-surface);
  --ds-cell-hover:    var(--ds-bg-alt);
  --ds-cell-alt:      var(--ds-bg-alt);
  --ds-tick:          var(--ds-line-strong);
  --ds-panel:         var(--ds-surface);
  --ds-readout-grid:  color-mix(in srgb, var(--ds-ink) 22%, transparent);
  --ds-readout-mark:  var(--ds-accent);
  --ds-photo-frame:   var(--ds-line);

  /* Hero scrim roles. Derived from --ds-surface-deep so the hero is the same
     purple as every other band; the alphas are the contrast mechanism and are
     argued for in the comment above .mq-hero. */
  --ds-hero-veil:      color-mix(in srgb, var(--ds-surface-deep) 40%, transparent);
  --ds-hero-scrim:     color-mix(in srgb, var(--ds-surface-deep) 93%, transparent);
  --ds-hero-scrim-mid: color-mix(in srgb, var(--ds-surface-deep) 64%, transparent);
  /* A quiet lift for a surface sitting ON a deep band. */
  --ds-deep-surface-lift: color-mix(in srgb, var(--ds-deep-ink) 8%, var(--ds-surface-deep));
}

/* ---------------------------------------------------------------
   Shell
   --------------------------------------------------------------- */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }

/* ---------------------------------------------------------------
   Header + nav
   --------------------------------------------------------------- */
.ds-nav { display: flex; flex-wrap: wrap; row-gap: var(--ds-space-2); }
.ds-header__inner { flex-wrap: wrap; row-gap: var(--ds-space-3); padding-block: var(--ds-space-3); }
.ds-header__logo img { height: 26px; }
.ds-nav a:not(.ds-btn) { letter-spacing: 0.005em; }
.ds-nav a[aria-current="page"] {
  color: var(--ds-ink);
  text-decoration: underline;
  text-decoration-color: var(--ds-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5em;
}
@media (max-width: 899px) {
  .ds-nav { margin-inline-start: 0; gap: var(--ds-space-4); width: 100%; }
  .ds-nav .ds-btn { padding: 0.6em 1.1em; }
}

/* ---------------------------------------------------------------
   Bands. --alt is the light purple tint; the full-bleed purple band is
   .ds-section--deep, which the system restyles end to end.
   --------------------------------------------------------------- */
.mq-band--alt  { background: var(--ds-bg-alt); }
.mq-band--tight { padding-block: calc(var(--ds-section-y) * 0.66); }
.mq-rule { height: 1px; background: var(--ds-line); border: 0; margin: 0; }

/* ---------------------------------------------------------------
   THE HERO
   Three stills, four seconds each, cross-faded. No JavaScript, no video,
   no <canvas>. Composed from the Lockheed teardown in
   docs/website-revamp/design/hero-media-plan.md, which measured the
   reference at 12.1 s / six shots / ~2.0 s each and found two defects
   worth not repeating. Both are answered here:

   1. THE REFERENCE HAS NO SCRIM. White type sits directly on footage and
      drops to ~2.3:1 for a sixth of the loop. Here the type never touches
      an unscrimmed frame:
        · Below 1000px the layout SPLITS. The media is a band in flow and
          the copy sits under it on solid --ds-surface-deep — 16.81:1,
          exact, with no photograph involved at all.
        · At and above 1000px the copy sits over the left of the frame
          behind two stacked scrim layers: a flat veil at 40% of the band
          colour over the whole image, and a horizontal ramp at 93% over
          the type column.
          MEASURED, not asserted. All three frames were rendered at 1440
          with the copy hidden, and EVERY PIXEL of the type column
          (x 80–645, y 110–870) was sampled — the single brightest one, not
          a region mean, because a region mean is what let the reference
          site's own failure hide. Worst pixel across the three frames:

              frame 1  white 14.72:1 · sub 9.67:1 · note 6.88:1
              frame 2  white 15.27:1 · sub 10.04:1 · note 7.14:1
              frame 3  white 15.14:1 · sub 9.95:1 · note 7.08:1

          and against a synthetic PURE WHITE frame — brighter than any
          photograph can be — 14.48:1 / 9.52:1 / 6.77:1. The floor for all
          three inks is 4.5:1, so the scrim holds against any frame that
          could ever be put in this hero, not merely against these.
   2. THE REFERENCE'S REDUCED-MOTION RULES NEVER REACH THE HERO, and CSS
      cannot pause a <video> anyway. This hero is three <img> elements and
      one opacity keyframe, so reduce genuinely stops it — see the guard
      at the bottom of this block. It rests on frame 1, which carries the
      whole hero on its own: it is the frame the markup paints first and
      the only one with a non-zero base opacity.

   FIRST FRAME DOES NOT WAIT ON THE REST. Frame 1 is first in source order,
   loading="eager" fetchpriority="high"; frames 2 and 3 are
   fetchpriority="low" decoding="async". Frame 1 is also the only frame with
   opacity 1 in the base rules, so it paints as soon as its own bytes land,
   whatever the other two are doing.
   --------------------------------------------------------------- */
.mq-hero {
  position: relative;
  display: grid;
  overflow: hidden;
  background: var(--ds-surface-deep);
  color: var(--ds-deep-ink);
  border-bottom: 1px solid var(--ds-line);
  /* the lattice over the frame is a band-interior motif, not a page motif */
  --ds-motif-opacity: var(--ds-deep-motif-opacity);
}
.mq-hero__media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--ds-surface-deep);
}
.mq-hero__frame {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
}
.mq-hero__frame--1 { opacity: 1; }
.mq-hero__scrim { position: absolute; inset: 0; z-index: 1; }
.mq-hero__scrim::before,
.mq-hero__scrim::after { content: ""; position: absolute; inset: 0; }
.mq-hero__scrim::before { background: var(--ds-hero-veil); }
.mq-hero__scrim::after {
  background: linear-gradient(to top,
    var(--ds-hero-scrim) 0%,
    var(--ds-hero-scrim) 30%,
    var(--ds-hero-scrim-mid) 62%,
    transparent 100%);
}
.mq-hero .motif { z-index: 2; }
.mq-hero .motif-dots { color: var(--ds-deep-ink); --dot-gap: 26px; --dot-size: 1.5px; }
.mq-hero__body { position: relative; z-index: 3; padding-block: var(--ds-space-7); }
.mq-hero :focus-visible { outline-color: var(--ds-focus-on-deep); }
/* The hero is a purple band but it is not .ds-section--deep — it has its own
   layout and its own scrim — so the deep ink roles are assigned here by hand
   for the two chrome elements the system would otherwise leave dark-on-dark. */
.mq-hero .ds-eyebrow { color: var(--ds-deep-ink-faint); }
.mq-hero .mq-eyebrow-rule::after { background: var(--ds-deep-line); }

@media (min-width: 1000px) {
  .mq-hero > * { grid-area: 1 / 1; }
  .mq-hero__media { aspect-ratio: auto; height: 100%; }
  .mq-hero__body {
    display: flex; align-items: center;
    min-height: min(80vh, 40rem);
    padding-block: var(--ds-space-8);
  }
  .mq-hero__inner { max-width: 35rem; }
  .mq-hero__scrim::after {
    background: linear-gradient(to right,
      var(--ds-hero-scrim) 0%,
      var(--ds-hero-scrim) 42%,
      var(--ds-hero-scrim-mid) 66%,
      transparent 94%);
  }
  /* MEASURED, then fixed. The lattice paints ABOVE the scrim — it has to, or
     the scrim dims the grid into nothing — so a white dot in the type column
     was the brightest pixel behind the headline: 5.3:1 for white type where
     the scrim alone gives 15.4:1, and 2.5:1 for the muted note ink. The dots
     are 1.5px on a 26px pitch so a per-glyph average would have hidden it;
     a per-pixel sample did not.
     The fix is not a lower opacity, it is a better place: the lattice belongs
     over the terrain, where a sampling grid means something, and not behind
     type, where it means nothing. It is masked out of the whole type column
     at this breakpoint. Below 1000px the layout splits and no text sits over
     the media at all, so the lattice runs edge to edge there. */
  .mq-hero .motif-dots {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 46%, #000 68%, #000 100%);
            mask-image: linear-gradient(to right, transparent 0%, transparent 46%, #000 68%, #000 100%);
  }
}

.mq-hero__title {
  font-size: var(--ds-text-3xl);
  font-weight: var(--ds-display-weight, 600);
  line-height: var(--ds-leading-tight);
  letter-spacing: var(--ds-tracking-display);
  margin: 0 0 var(--ds-space-5);
  max-width: 18ch;
  text-wrap: balance;
}
.mq-hero__sub {
  font-size: var(--ds-text-lg);
  line-height: var(--ds-leading-normal);
  color: var(--ds-deep-ink-muted);
  max-width: 46ch;
  margin: 0 0 var(--ds-space-6);
  text-wrap: pretty;
}
/* The provenance line. It is real body text, not a comment and not a
   tooltip, because the thing it discloses — that these are generated
   images of application domains rather than photographs of Mesa Quantum —
   is exactly the thing a reader would otherwise get wrong. */
.mq-hero__note {
  margin: var(--ds-space-6) 0 0;
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--ds-deep-line);
  font-size: var(--ds-text-sm);
  line-height: var(--ds-leading-normal);
  color: var(--ds-deep-ink-faint);
  max-width: 58ch;
  text-wrap: pretty;
}

@media (prefers-reduced-motion: no-preference) {
  .mq-hero__frame { animation: mq-hero-cycle 12s linear infinite; }
  .mq-hero__frame--1 { animation-delay: 0s; }
  .mq-hero__frame--2 { animation-delay: -8s; }
  .mq-hero__frame--3 { animation-delay: -4s; }
}
/* 12 s, three frames. Each frame holds for 27% of the cycle (3.24 s), then
   cross-fades out over 6.3% (0.76 s) while the next one fades in over the
   same window. 0.76 s is long enough that no frame arrives as a cut and
   short enough that no two frames are legible at once. */
@keyframes mq-hero-cycle {
  0%       { opacity: 1; }
  27%      { opacity: 1; }
  33.334%  { opacity: 0; }
  93.667%  { opacity: 0; }
  100%     { opacity: 1; }
}
/* C08. Belt and braces: tokens/core.css already collapses every animation
   under reduce, but this hero must not depend on a token file to stop —
   the name is removed outright, so frames 2 and 3 keep their base opacity
   of 0 and the hero rests on frame 1 forever. */
@media (prefers-reduced-motion: reduce) {
  .mq-hero__frame { animation-name: none !important; }
  .mq-hero__frame--2,
  .mq-hero__frame--3 { opacity: 0 !important; }
}

/* ---------------------------------------------------------------
   The field panel — contour under, lattice over.
   The motif is CONTAINED, never bled behind body copy: it sits on its own
   surface inside a hairline frame, so it reads as an instrument viewport
   onto a measured field rather than as wallpaper.

   The local currentColor workaround this file used to carry is GONE.
   motifs.css draws the contour as an alpha mask over a currentColor fill
   now — the upstream fix for the defect this build reported — so all that
   is needed here is the colour and the framing of the mask.
   --------------------------------------------------------------- */
.mq-fieldpanel {
  position: relative;
  overflow: hidden;
  background: var(--ds-panel);
  border: 1px solid var(--ds-line);
  min-height: 320px;
  /* The theme sets --ds-motif-opacity: 0.16, tuned for a motif bleeding
     BEHIND content on white, where anything higher competes with text.
     Nothing here sits behind text: the field is contained in its own frame
     and is the only thing in it. Raised so the lattice and the contour read
     as a measurement rather than as a smudge. A scoped override of a role,
     not a fork of the theme. */
  --ds-motif-opacity: 0.44;
}
.mq-fieldpanel .motif-contour {
  color: var(--ds-accent);
  -webkit-mask-size: 860px auto;      mask-size: 860px auto;
  -webkit-mask-position: 54% 46%;     mask-position: 54% 46%;
}
.mq-fieldpanel .motif-dots {
  color: var(--ds-ink);
  --dot-gap: 18px;
  --dot-size: 1.6px;
  --field-x: 58%;
  --field-y: 46%;
}
/* Corner ticks: an instrument frame, two marks, nothing more. */
.mq-fieldpanel::before,
.mq-fieldpanel::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 1px solid var(--ds-tick); z-index: var(--ds-z-content);
}
.mq-fieldpanel::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.mq-fieldpanel::after  { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

.mq-fieldfig { margin: 0; }
.mq-fieldfig .mq-fieldpanel { min-height: clamp(220px, 24vw, 330px); }
.mq-fieldfig figcaption {
  margin-top: var(--ds-space-4);
  font-size: var(--ds-text-sm);
  color: var(--ds-ink-muted);
  max-width: 78ch;
  text-wrap: pretty;
}

/* ---------------------------------------------------------------
   Section heads. The split head is the density device: heading left,
   standfirst right, hairline across the top of the pair.
   --------------------------------------------------------------- */
.mq-head { margin-bottom: var(--ds-space-7); }
.mq-head .ds-h2 { margin: 0 0 var(--ds-space-4); max-width: 24ch; }
.mq-head p { color: var(--ds-ink-muted); margin: 0; max-width: 62ch; text-wrap: pretty; }

.mq-head--split { display: grid; gap: var(--ds-space-5); }
@media (min-width: 900px) {
  .mq-head--split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--ds-space-8);
    align-items: end;
  }
  .mq-head--split .ds-h2 { margin-bottom: 0; }
  .mq-head--split p { padding-bottom: 0.35em; }
}

.mq-eyebrow-rule { display: flex; align-items: center; gap: var(--ds-space-4); margin: 0 0 var(--ds-space-4); }
.mq-eyebrow-rule::after { content: ""; flex: 1; height: 1px; background: var(--ds-line); }

.mq-statement {
  font-size: var(--ds-text-2xl);
  font-weight: var(--ds-weight-medium);
  line-height: var(--ds-leading-snug);
  letter-spacing: var(--ds-tracking-tight);
  max-width: 34ch;
  margin: 0;
  text-wrap: balance;
}
.mq-statement + .ds-btn { margin-top: var(--ds-space-6); }
.mq-statement-row { display: grid; gap: var(--ds-space-5); align-items: end; }
@media (min-width: 900px) {
  .mq-statement-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); column-gap: var(--ds-space-8); }
  .mq-statement-row .mq-statement + .ds-btn { margin-top: 0; }
}

/* ---------------------------------------------------------------
   THE LATTICE — the layout is the sampling grid.
   --------------------------------------------------------------- */
.mq-lattice {
  display: grid;
  gap: 1px;
  background: var(--ds-line);
  border: 1px solid var(--ds-line);
}
.mq-lattice > * {
  background: var(--ds-cell);
  padding: var(--ds-space-6);
  margin: 0;
}
@media (min-width: 1000px) { .mq-lattice > * { padding: var(--ds-space-6) var(--ds-space-6) var(--ds-space-7); } }
.mq-lattice--alt > * { background: var(--ds-cell-alt); }
@media (min-width: 700px)  { .mq-lattice--2 { grid-template-columns: repeat(2, 1fr); }
                             .mq-lattice--3 { grid-template-columns: repeat(2, 1fr); }
                             .mq-lattice--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .mq-lattice--3 { grid-template-columns: repeat(3, 1fr); }
                             .mq-lattice--4 { grid-template-columns: repeat(4, 1fr); } }

/* A cell that is a link. Hard state change — fill swaps to the purple tint,
   graphic and title take the accent. No lift, no shadow, no soft fade. */
.mq-cell {
  display: flex; flex-direction: column; gap: var(--ds-space-3);
  text-decoration: none; color: inherit;
  transition: background-color var(--ds-dur) var(--ds-ease), color var(--ds-dur) var(--ds-ease);
}
.mq-cell:hover, .mq-cell:focus-visible { background: var(--ds-cell-hover); }
.mq-cell:hover .mq-cell__title, .mq-cell:focus-visible .mq-cell__title { color: var(--ds-accent); }
.mq-cell:hover .g, .mq-cell:focus-visible .g { color: var(--ds-accent); }
.mq-cell__title {
  margin: 0; font-size: var(--ds-text-xl); font-weight: var(--ds-weight-semibold);
  letter-spacing: var(--ds-tracking-tight); line-height: var(--ds-leading-snug);
}
.mq-cell__body { margin: 0; color: var(--ds-ink-muted); text-wrap: pretty; }
.mq-cell__go {
  margin-top: auto; padding-top: var(--ds-space-4);
  font-size: var(--ds-text-xs); letter-spacing: var(--ds-tracking-eyebrow);
  text-transform: uppercase; color: var(--ds-ink-muted);
}
.mq-cell:hover .mq-cell__go, .mq-cell:focus-visible .mq-cell__go { color: var(--ds-ink); }
.mq-kicker {
  font-size: var(--ds-text-xs); letter-spacing: var(--ds-tracking-eyebrow);
  text-transform: uppercase; color: var(--ds-ink-muted);
}

/* ---------------------------------------------------------------
   Capability graphics (ds/graphics). Inline SVG, currentColor, one per
   named subject. They are CONTENT — each carries role="img" and a real
   label — so they are never wrapped in a .motif.
   --------------------------------------------------------------- */
.mq-cell .g { margin-bottom: var(--ds-space-2); color: var(--ds-ink-muted); }
.mq-graphic { color: var(--ds-accent); }
.mq-graphic--lead { width: 100%; max-width: 30rem; margin-inline: auto; }

/* ---------------------------------------------------------------
   Tags (applications)
   --------------------------------------------------------------- */
.mq-tags { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); list-style: none; margin: 0; padding: 0; }
.mq-tags li {
  font-size: var(--ds-text-xs);
  padding: 0.35em 0.8em;
  border: 1px solid var(--ds-line);
  color: var(--ds-ink-muted);
}

/* ---------------------------------------------------------------
   Stats
   --------------------------------------------------------------- */
.mq-stat__value { display: block; font-size: var(--ds-text-2xl); font-weight: var(--ds-weight-semibold); letter-spacing: var(--ds-tracking-display); line-height: 1; }
.mq-stat__label { display: block; margin-top: var(--ds-space-3); color: var(--ds-ink-muted); font-size: var(--ds-text-sm); }

/* ---------------------------------------------------------------
   Partner names. No logo set exists and the final set is unsettled
   (Q9), so they are set in type rather than faked as a logo wall.
   --------------------------------------------------------------- */
.mq-partners {
  display: grid; gap: 1px; background: var(--ds-line); border: 1px solid var(--ds-line);
  list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px) { .mq-partners { grid-template-columns: repeat(4, 1fr); } }
.mq-partners li {
  background: var(--ds-surface);
  padding: var(--ds-space-5) var(--ds-space-4);
  font-size: var(--ds-text-sm); font-weight: var(--ds-weight-medium);
  letter-spacing: 0.02em; color: var(--ds-ink-muted); text-align: center;
}

/* ---------------------------------------------------------------
   Prose. NOTE the ordering: `.mq-prose > *` zeroes margins and
   `.mq-prose > * + *` restores the top one. Both are the same
   specificity, so the later rule wins — a `.mq-prose p { margin: 0 }`
   would outrank the sibling rule and collapse every paragraph gap.
   --------------------------------------------------------------- */
.mq-prose { max-width: var(--ds-measure); }
.mq-prose > * { margin: 0; }
.mq-prose > * + * { margin-top: var(--ds-space-4); }
.mq-prose p { text-wrap: pretty; }
.mq-prose h2 {
  font-size: var(--ds-text-xl); font-weight: var(--ds-weight-semibold);
  letter-spacing: var(--ds-tracking-tight); line-height: var(--ds-leading-snug);
}
.mq-prose > h2 + * { margin-top: var(--ds-space-3); }
.mq-prose > * + h2 { margin-top: var(--ds-space-7); }
.mq-lead { font-size: var(--ds-text-lg); color: var(--ds-ink-muted); max-width: 56ch; margin: 0 0 var(--ds-space-6); text-wrap: pretty; }

.mq-defs { margin: 0; }
.mq-defs dt { font-weight: var(--ds-weight-semibold); margin-top: var(--ds-space-5); }
.mq-defs dt:first-child { margin-top: 0; }
.mq-defs dd { margin: var(--ds-space-2) 0 0; color: var(--ds-ink-muted); max-width: 62ch; text-wrap: pretty; }

/* Applications panel on a capability page */
.mq-panel {
  border: 1px solid var(--ds-line);
  background: var(--ds-bg-alt);
  padding: var(--ds-space-6);
  align-self: start;
}
.mq-panel h2 {
  margin: 0 0 var(--ds-space-5);
  font-size: var(--ds-text-xs); letter-spacing: var(--ds-tracking-eyebrow);
  text-transform: uppercase; font-weight: var(--ds-weight-semibold); color: var(--ds-ink-muted);
}

/* ---------------------------------------------------------------
   Figures — photographs and readouts.
   PHOTOGRAPH TREATMENT for this build: full colour, no filter, hairline
   frame, caption always present. The caption is not decoration: on this
   site it is where a photograph says whether it is a record of Mesa
   Quantum or an illustration of somebody else's world.
   --------------------------------------------------------------- */
.mq-figure { margin: 0; border: 1px solid var(--ds-photo-frame); background: var(--ds-surface); align-self: start; }
.mq-figure img { width: 100%; height: auto; display: block; }
.mq-figure--crop img { aspect-ratio: 3 / 2; object-fit: cover; }
.mq-figure--wide img { aspect-ratio: 21 / 9; object-fit: cover; }
.mq-figure figcaption {
  padding: var(--ds-space-4) var(--ds-space-5);
  border-top: 1px solid var(--ds-line);
  font-size: var(--ds-text-sm); color: var(--ds-ink-muted); text-wrap: pretty;
}
/* The disclosure sentence inside a caption. Same size, same colour family,
   but marked so it is scannable as a class of statement. */
.mq-figure figcaption b { font-weight: var(--ds-weight-semibold); color: var(--ds-ink); }

.mq-mediarow { display: grid; gap: var(--ds-space-6); }
@media (min-width: 760px) { .mq-mediarow { grid-template-columns: repeat(3, 1fr); gap: var(--ds-space-5); } }

.mq-readout { margin: 0; border: 1px solid var(--ds-line); background: var(--ds-bg-alt); padding: var(--ds-space-5); }
.mq-readout__scroll { overflow-x: auto; }
.mq-readout svg { display: block; min-width: 660px; width: 100%; height: auto; }
.mq-readout figcaption { margin-top: var(--ds-space-4); padding-top: var(--ds-space-4); border-top: 1px solid var(--ds-line); font-size: var(--ds-text-sm); color: var(--ds-ink-muted); text-wrap: pretty; }
.mq-readout .r-axis   { stroke: var(--ds-readout-grid); }
.mq-readout .r-rule   { stroke: var(--ds-readout-grid); }
.mq-readout .r-mark   { fill: var(--ds-readout-mark); }
.mq-readout .r-stem   { stroke: var(--ds-readout-mark); }
.mq-readout .r-label  { fill: var(--ds-ink); font-family: var(--ds-font); font-size: 15px; font-weight: 600; }
.mq-readout .r-tick   { fill: var(--ds-ink-muted); font-family: var(--ds-font); font-size: 14px; }
.mq-readout .r-bandlabel { fill: var(--ds-ink-muted); font-family: var(--ds-font); font-size: 12px; letter-spacing: 0.16em; }

/* ---------------------------------------------------------------
   Page head (interior pages)
   --------------------------------------------------------------- */
.mq-pagehead { padding-block: clamp(2.75rem, 2rem + 3.4vw, 5rem); border-bottom: 1px solid var(--ds-line); }
.mq-pagehead h1 {
  font-size: var(--ds-text-3xl); font-weight: var(--ds-display-weight, 600);
  line-height: var(--ds-leading-tight); letter-spacing: var(--ds-tracking-display);
  margin: 0 0 var(--ds-space-4); max-width: 18ch;
}
.mq-pagehead__split { display: grid; gap: var(--ds-space-6); }
@media (min-width: 900px) {
  .mq-pagehead__split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--ds-space-8); align-items: end; }
  .mq-pagehead__split h1 { margin-bottom: 0; }
  .mq-pagehead__split .mq-lead { margin-bottom: 0.35em; }
}

.mq-caphead { display: grid; gap: var(--ds-space-6); }
@media (min-width: 860px) {
  .mq-caphead { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; column-gap: var(--ds-space-8); }
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.ds-footer h2 { font-size: var(--ds-text-xs); letter-spacing: var(--ds-tracking-eyebrow); text-transform: uppercase; font-weight: var(--ds-weight-semibold); margin: 0 0 var(--ds-space-4); }
.ds-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ds-space-2); font-size: var(--ds-text-sm); }
.ds-footer p { margin: 0 0 var(--ds-space-3); font-size: var(--ds-text-sm); }
.ds-footer__bottom p { margin: 0; }
.mq-foot__mark img { height: 24px; }

/* ---------------------------------------------------------------
   Two-column body layouts
   --------------------------------------------------------------- */
.mq-split { display: grid; gap: var(--ds-space-7); }
@media (min-width: 960px) {
  .mq-split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); column-gap: var(--ds-space-8); }
  .mq-split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.mq-split--media { align-items: center; }

/* Closing row: statement + supporting line on the left, one action right. */
.mq-statement-row > div > .mq-lead { margin: var(--ds-space-4) 0 0; max-width: 60ch; }
@media (min-width: 900px) { .mq-statement-row > .ds-btn { justify-self: start; } }

.mq-statement--wide { max-width: 42ch; }

/* ---------------------------------------------------------------
   INSIDE A PURPLE BAND
   .ds-section--deep already restyles everything the design system owns.
   These are the same inversions for the components this build adds, kept
   in one block so a purple band is never hand-inverted at the call site.
   Every colour below is a --ds-deep-* role the theme declares and the
   contrast checker resolves.
   --------------------------------------------------------------- */
.ds-section--deep .mq-head p,
.ds-section--deep .mq-lead,
.ds-section--deep .mq-cell__body,
.ds-section--deep .mq-defs dd,
.ds-section--deep .mq-stat__label,
.ds-section--deep .mq-fieldfig figcaption,
.ds-section--deep .mq-figure figcaption { color: var(--ds-deep-ink-muted); }
.ds-section--deep .mq-cell__go,
.ds-section--deep .mq-kicker,
.ds-section--deep .mq-panel h2,
.ds-section--deep .mq-tags li { color: var(--ds-deep-ink-faint); }
.ds-section--deep .mq-figure figcaption b { color: var(--ds-deep-ink); }
.ds-section--deep .mq-eyebrow-rule::after,
.ds-section--deep .mq-rule { background: var(--ds-deep-line); }
.ds-section--deep .mq-lattice,
.ds-section--deep .mq-partners { background: var(--ds-deep-line); border-color: var(--ds-deep-line); }
.ds-section--deep .mq-lattice > *,
.ds-section--deep .mq-partners li { background: var(--ds-surface-deep); }
.ds-section--deep .mq-lattice--alt > * { background: var(--ds-deep-surface-lift); }
.ds-section--deep .mq-cell:hover,
.ds-section--deep .mq-cell:focus-visible { background: var(--ds-deep-surface-lift); }
.ds-section--deep .mq-cell:hover .mq-cell__title,
.ds-section--deep .mq-cell:focus-visible .mq-cell__title { color: var(--ds-deep-ink); text-decoration: underline; text-underline-offset: 0.2em; }
.ds-section--deep .mq-cell:hover .mq-cell__go,
.ds-section--deep .mq-cell:focus-visible .mq-cell__go { color: var(--ds-deep-ink); }
.ds-section--deep .mq-cell .g { color: var(--ds-deep-ink-muted); }
.ds-section--deep .mq-cell:hover .g,
.ds-section--deep .mq-cell:focus-visible .g { color: var(--ds-deep-ink); }
.ds-section--deep .mq-graphic { color: var(--ds-deep-ink); }
.ds-section--deep .mq-figure,
.ds-section--deep .mq-panel { border-color: var(--ds-deep-line); background: var(--ds-surface-deep); }
.ds-section--deep .mq-figure figcaption { border-top-color: var(--ds-deep-line); }
.ds-section--deep .mq-tags li { border-color: var(--ds-deep-line); }
.ds-section--deep .mq-fieldpanel { background: var(--ds-deep-surface-lift); border-color: var(--ds-deep-line); }
.ds-section--deep .mq-fieldpanel .motif-dots { color: var(--ds-deep-ink); }
.ds-section--deep .mq-fieldpanel::before,
.ds-section--deep .mq-fieldpanel::after { border-color: var(--ds-deep-line); }

/* Buttons on a purple band. --ds-accent is #4A0FC4; on a #2A0850 ground a
   filled accent button is purple on purple and its edge disappears, so the
   primary inverts to a white fill instead — 16.81:1 for both the label and
   the button's own boundary. The ghost takes the deep ink and deep line. */
.mq-hero .ds-btn--primary,
.ds-section--deep .ds-btn--primary { background: var(--ds-deep-ink); color: var(--ds-surface-deep); }
.mq-hero .ds-btn--primary:hover,
.ds-section--deep .ds-btn--primary:hover { background: var(--ds-deep-ink-muted); color: var(--ds-surface-deep); }
.mq-hero .ds-btn--ghost,
.ds-section--deep .ds-btn--ghost { color: var(--ds-deep-ink); border-color: var(--ds-deep-line); background: transparent; }
.mq-hero .ds-btn--ghost:hover,
.ds-section--deep .ds-btn--ghost:hover { color: var(--ds-surface-deep); background: var(--ds-deep-ink-muted); border-color: var(--ds-deep-ink-muted); }
.ds-section--deep a:not(.ds-btn) { color: var(--ds-deep-ink); }

/* ---------------------------------------------------------------
   Header dropdowns — Capabilities and Products, the RDDS structural
   split. Pure CSS (:hover / :focus-within), no JavaScript anywhere.
   Below 900px the panel is suppressed: /capabilities/ lists all six and
   so does the footer, so nothing becomes unreachable.
   --------------------------------------------------------------- */
.mq-nav__item { display: inline-flex; align-items: center; }
.mq-nav__parent::after {
  content: ""; display: inline-block; margin-inline-start: 0.45em;
  width: 0; height: 0;
  border-inline: 3.5px solid transparent;
  border-block-start: 4px solid currentColor;
  vertical-align: 0.15em;
}
.mq-nav__panel { z-index: 1; min-width: 232px; }
.mq-nav__panel a { display: block; font-size: var(--ds-text-sm); padding-block: 0.2rem; }
.ds-nav .mq-nav__panel a:not(.ds-btn) { color: var(--ds-ink-muted); }
.ds-nav .mq-nav__panel a:not(.ds-btn):hover { color: var(--ds-accent); }
@media (max-width: 899px) { .mq-nav__panel { display: none; } }
