/* ============================================================
   SPECTRA QEST — Homepage explorations
   Design tokens + base + shared component styles
   Type: Helvetica  ·  Base: grey/ink  ·  Accent: brand red
   ============================================================ */

/* Register switchable brand tokens so custom-property changes repaint
   through `transition: all` (otherwise solid buttons stay pinned to first paint). */
@property --sq-brand {
  syntax: "<color>";
  inherits: true;
  initial-value: #15467A;
}
@property --sq-brand-deep {
  syntax: "<color>";
  inherits: true;
  initial-value: #0E3460;
}

:root {
  /* ---- Product palettes (fixed) ---- */
  --sq-red: #DA2028;          /* QEST Platform */
  --sq-red-deep: #B5161D;
  --et-orange: #F18E3D;       /* ElmTree */
  --et-orange-deep: #D9762A;
  --et-green: #84C044;        /* ElmTree */
  --et-green-deep: #6BA233;

  /* ---- Corporate brand accent (switchable; red removed) ---- */
  --sq-brand: #15467A;
  --sq-brand-deep: #0E3460;

  --sq-grey-dark: #808284;   /* Cool Grey 9 */
  --sq-grey-light: #BBBDC0;  /* Cool Grey 4 */

  /* Ink + paper (cool neutral, low chroma) */
  --ink-900: #16181b;
  --ink-800: #20242a;
  --ink-700: #343a42;
  --ink-600: #4b525b;
  --ink-500: #6b727b;
  --ink-400: #8b929a;
  --ink-300: #b7bcc2;
  --ink-200: #d9dce0;
  --ink-150: #e6e8eb;
  --ink-100: #eef0f2;
  --paper:   #ffffff;
  --paper-2: #f5f6f8;   /* soft cool section bg */
  --paper-3: #eceef1;

  --hair: rgba(22,24,27,0.12);
  --hair-soft: rgba(22,24,27,0.07);

  /* Type */
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --maxw: 1320px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* offset in-page anchor jumps so section tops clear sticky headers */
section[id], footer[id] { scroll-margin-top: 96px; }

html, body { margin: 0; padding: 0; }
/* Belt-and-suspenders against phone-width horizontal scroll (parked drawer,
   decorative hero bleeds). overflow-x:clip does NOT create a scroll container,
   so it leaves the sticky header/context bar intact (unlike overflow-x:hidden). */
html, body { overflow-x: clip; }

body {
  font-family: var(--sans);
  color: var(--ink-900);
  background: var(--paper-3);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---- shared layout helpers ---- */
.sq-wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

/* ---- image placeholder (striped) ---- */
.ph {
  position: relative;
  background-color: var(--paper-2);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 11px,
    rgba(22,24,27,0.045) 11px 12px
  );
  border: 1px solid var(--hair);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.ph[data-dark] {
  background-color: #2a2f36;
  background-image: repeating-linear-gradient(
    -45deg, transparent 0 11px, rgba(255,255,255,0.05) 11px 12px);
  border-color: rgba(255,255,255,0.14);
}
.ph__tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-500);
  background: var(--paper);
  border: 1px solid var(--hair);
  padding: 5px 9px;
  border-radius: 2px;
  max-width: 80%;
  text-align: center;
  line-height: 1.35;
}
.ph[data-dark] .ph__tag { color: #c8cdd3; background: rgba(0,0,0,0.35); border-color: rgba(255,255,255,0.18); }

/* real screenshot variant — clean inset frame, no stripes */
.ph--img { background-image: none; background-color: var(--paper-2); border-color: var(--ink-150); }

/* testimonial card logos — full colour, uniform sizing across all pages */
.testi-logo { opacity: 1; }

.device-row { display: flex; align-items: flex-end; justify-content: center; gap: 34px; flex-wrap: wrap; }
.device { background: var(--ink-900); box-shadow: 0 24px 60px rgba(16,18,21,0.14); }
.device .ph { width: 100%; border-radius: 5px; }
.device__bar { display: flex; gap: 6px; padding: 8px 10px 12px; }
.device__bar span { width: 9px; height: 9px; border-radius: 999px; background: rgba(255,255,255,0.28); }
.device__notch { width: 40%; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.22); margin: 1px auto 9px; }
.device--desktop { flex: 0 1 600px; border-radius: 14px; padding: 8px; }
.device--tablet  { flex: 0 1 250px; border-radius: 22px; padding: 13px; }
.device--phone   { flex: 0 1 148px; border-radius: 30px; padding: 9px; }
.device--tablet .ph, .device--phone .ph { border-radius: 14px; }
@media (max-width: 620px) {
  /* On phones the desktop mock-up is hidden, so the tablet and phone screens are big enough to read */
  .device-row { gap: 18px; flex-wrap: nowrap; }
  .device--desktop { display: none; }
  .device--tablet { flex: 0 1 170px; }
  .device--phone { flex: 0 1 130px; }
}

/* mono label */
.mono-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* corporate brand options */
body[data-brand="red"]    { --sq-brand:#db2129; --sq-brand-deep:#A8131A; } /* Brand Red (logo) */
body[data-brand="grey"]   { --sq-brand:#a7a9ac; --sq-brand-deep:#7E8083; } /* Logo Grey (darker logo grey) */
body[data-brand="teal"]   { --sq-brand:#0F7F88; --sq-brand-deep:#0A5F66; } /* Teal */
body[data-brand="slate"]  { --sq-brand:#3C4B5A; --sq-brand-deep:#2A3742; } /* Slate */

/* selection */
::selection { background: var(--sq-brand); color: #fff; }

/* ---------- Connected capability — hub-and-spoke diagram ---------- */
.cap-hub { display: grid; grid-template-columns: 1fr 178px 1fr; align-items: center; }
@media (max-width: 860px) {
  .cap-hub { grid-template-columns: 1fr; gap: 18px; }
  .cap-hub__center { order: -1; min-height: 190px; }
  .cap-hub__rail { display: none; }
  .cap-hub__link { display: none; }
}
@media (max-width: 560px) {
  .cap-chain__typed { display: none; }
}

/* ---------- Product context bar (dark strip under the header) ---------- */
.pcb { display: flex; align-items: center; gap: 22px; height: 60px; }
.pcb__mark { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.pcb__mark img { flex: none; min-width: 0; }
a[aria-label="Spectra QEST home"] { flex: none; }
a[aria-label="Spectra QEST home"] img { flex: none; min-width: 0; max-width: none; }
.pcb__links { display: flex; align-items: center; gap: 26px; flex: 0 1 auto; min-width: 0; }
.pcb__link { position: relative; font-size: 13.5px; font-weight: 500; white-space: nowrap; color: rgba(255,255,255,0.62); padding: 19px 0; transition: color .15s ease; }
.pcb__link:hover { color: rgba(255,255,255,0.9); }
.pcb__link.is-active { color: #fff; font-weight: 600; }
.pcb__link.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--pcb-accent, var(--sq-red)); border-radius: 2px; }
.pcb__link.is-soon { color: rgba(255,255,255,0.32); cursor: default; }
.pcb__link.is-soon:hover { color: rgba(255,255,255,0.32); }
.pcb__right { display: flex; align-items: center; gap: 16px; flex: none; margin-left: auto; }
.pcb__res { position: relative; }
.pcb__res-btn { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; padding: 6px 0; font-family: inherit; font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,0.72); white-space: nowrap; cursor: pointer; transition: color .15s ease; }
.pcb__res-btn:hover { color: #fff; }
.pcb__reslink { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,0.72); white-space: nowrap; transition: color .15s ease; }
.pcb__reslink:hover { color: #fff; }
.pcb__res-menu { position: absolute; top: 100%; right: 0; margin-top: 8px; background: var(--paper); border: 1px solid var(--ink-150); border-radius: 12px; box-shadow: 0 2px 4px rgba(16,18,21,0.05), 0 24px 60px rgba(16,18,21,0.12); padding: 6px; min-width: 220px; z-index: 60; }
.pcb__res-menu::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.pcb__res-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-800); transition: background .12s ease; }
.pcb__res-item:hover { background: var(--paper-2); }
.pcb__cta { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #fff; padding: 8px 15px; border-radius: 999px; white-space: nowrap; transition: filter .15s ease; }
.pcb__cta:hover { filter: brightness(1.08); }
.pcb__caps { position: relative; }
.pcb__caps-btn { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; font-family: inherit; cursor: pointer; }
.pcb__caps-menu { right: auto; left: 0; min-width: 400px; max-width: 460px; padding: 8px; margin-top: -11px; }
@media (min-width: 901px) { .pcb__caps-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; min-width: 0; width: min(720px, calc(100vw - 48px)); max-width: none; left: var(--caps-shift, 0px); } }
.pcb__caps-item { display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; border-radius: 10px; transition: background .12s ease; }
a.pcb__caps-item:hover { background: var(--paper-2); }
.pcb__caps-item.is-current { background: color-mix(in srgb, var(--pcb-accent, var(--sq-red)) 8%, var(--paper)); }
.pcb__caps-title { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-900); }
.pcb__caps-area { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; color: var(--pcb-accent, var(--sq-red)); margin-bottom: 2px; }
.pcb__caps-desc { font-size: 12.5px; line-height: 1.4; color: var(--ink-500); }
.pcb__caps-item.is-soon { cursor: default; }
.pcb__caps-item.is-soon .pcb__caps-title { color: var(--ink-400); font-weight: 600; }
.pcb__caps-tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-400); border: 1px solid var(--ink-200); border-radius: 999px; padding: 1px 6px; margin-left: 6px; }
@media (max-width: 900px) {
  .pcb { gap: 14px; }
}
@media (max-width: 760px) {
  /* Stack the bar: product mark + CTA on the first row, the section links
     (incl. the Capabilities menu) on a full-width second row — this removes
     the menu/right-set overlap at phone widths. */
  .pcb { flex-wrap: wrap; height: auto; gap: 8px 16px; padding: 9px 0; align-items: center; }
  .pcb__mark { order: 1; }
  .pcb__right { order: 2; margin-left: auto; gap: 12px; }
  .pcb__support-menu { display: none; }
  .pcb__links { order: 3; flex: 0 0 100%; position: relative; gap: 20px; }
  .pcb__link { padding: 6px 0; }
  /* Anchor the Capabilities dropdown to the full-width links row so it can
     never spill past the viewport edge. */
  .pcb__caps { position: static; }
  .pcb__caps-menu { left: 0; right: auto; min-width: 0; width: 100%; max-width: none; margin-top: 6px; }
}
@media (max-width: 620px) {
  .pcb__mark img { height: 20px !important; }
  .pcb__link { font-size: 13px; }
}

/* ---------- Capability detail pages ---------- */
.cap-split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: center; }
.cap-split--even { grid-template-columns: 1fr 1fr; align-items: stretch; }
.cap-split--share { grid-template-columns: 1fr 1.2fr; }
.cap-compare { display: grid; grid-template-columns: 1fr 1.1fr; gap: 44px; align-items: center; }
.cap-compare__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cap-cards { display: grid; gap: 16px; grid-template-columns: repeat(var(--cap-cols, 3), minmax(0, 1fr)); }
@media (max-width: 1080px) { .cap-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cap-cards { grid-template-columns: minmax(0, 1fr); } }
.cap-rail { display: grid; grid-template-columns: minmax(300px, 0.85fr) 1.35fr; gap: 44px; align-items: stretch; }
@media (max-width: 860px) {
  .cap-split, .cap-split--even, .cap-split--share, .cap-compare, .cap-rail { grid-template-columns: 1fr; gap: 28px; }
  .cap-rail__img { flex: none !important; min-height: 0 !important; aspect-ratio: var(--ar); }
  .cap-compare__cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .cap-compare__cards { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE LAYOUT SYSTEM
   Reusable grid + spacing classes so inline-styled React sections
   reflow cleanly down to phone widths.
   ============================================================ */

/* generic responsive grids */
.sq-grid      { display: grid; gap: 20px; }
.sq-grid-3    { grid-template-columns: repeat(3, 1fr); }
.sq-grid-2    { grid-template-columns: 1fr 1fr; }

/* two-column hero (image + copy) */
.sq-hero-2col { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }

/* Test Methods "By thorough, we mean" — image top aligns with the first bullet,
   not the heading. Heading sits in row 1 (left), bullet list + image share row 2. */
.tm-thorough { display: grid; grid-template-columns: 1.05fr 0.95fr; column-gap: 56px; row-gap: 0;
  align-items: start; grid-template-areas: "head ." "list img"; --tm-accent: #DA2028; --tm-shade: var(--ink-600); }
.tm-thorough .tm-head { grid-area: head; }
.tm-thorough .tm-list { grid-area: list; }
.tm-thorough .tm-img  { grid-area: img; }

/* cross-sell band */
.sq-cross     { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; }

/* footer */
.sq-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 40px; }
.sq-footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 26px; color: rgba(255,255,255,0.45); font-size: 12.5px; }

/* products (homepage, when 2 products show) */
.sq-products-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
/* grid items default to min-width:auto, so a card with wider min-content (QP6 —
   more pillar chips) refuses to shrink and steals width from the other track.
   Force both 1fr tracks to shrink equally. */
.sq-products-2 > * { min-width: 0; }

/* boxes whose padding needs to shrink on phones */
.sq-pad-box   { padding: 64px 56px; }
.sq-pad-box-sm{ padding: 56px 52px; }

/* ---- tablet ---- */
@media (max-width: 900px) {
  .chrome { flex-direction: column; align-items: stretch; gap: 10px; }
  .chrome__group { justify-content: space-between; }
  .sq-wrap { padding: 0 24px; }
  .sq-grid-3 { grid-template-columns: 1fr 1fr; }
  .about-story-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .sq-footer-grid { grid-template-columns: repeat(4, 1fr); gap: 36px 28px; }
  .sq-footer-brand { grid-column: 1 / -1; max-width: 460px; }
  section[id], footer[id] { scroll-margin-top: 80px; }
}

/* ---- phone ---- */
@media (max-width: 620px) {
  .sq-wrap { padding: 0 18px; }
  .sq-grid-3, .sq-grid-2 { grid-template-columns: 1fr; }
  .sq-hero-2col { grid-template-columns: 1fr; gap: 36px; }
  .tm-thorough { grid-template-columns: 1fr; gap: 36px; grid-template-areas: "head" "list" "img"; }
  .sq-cross { grid-template-columns: 1fr; gap: 18px; text-align: center; justify-items: center; }
  .sq-footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 22px; }
  .sq-footer-brand { grid-column: 1 / -1; }
  #site-footer { padding-top: 48px !important; }
  #site-footer .sq-footer-grid { padding-bottom: 36px !important; }
  .sq-footer-legal { flex-direction: column; align-items: flex-start; gap: 14px; }
  .sq-products-2 { grid-template-columns: 1fr; }
  .sq-pad-box   { padding: 44px 24px; }
  .sq-pad-box-sm{ padding: 40px 24px; }
  /* tame oversized vertical section rhythm on phones */
  .sq-sec { padding-top: 56px !important; padding-bottom: 56px !important; }
}

/* ============================================================
   MOBILE NAVIGATION (hamburger + drawer)
   ============================================================ */
.nav-desktop { display: flex; align-items: center; gap: 14px; }
.nav-mobile  { display: none; }

/* Stage 1: primary menu links collapse into the hamburger (region + CTA stay,
   pushed right so they sit next to the hamburger). */
@media (max-width: 900px) {
  .nav-primary { display: none; }
  .nav-mobile  { display: flex; }
  .nav-actions { margin-left: auto; margin-right: 14px; }
}
/* Stage 2: region selector + CTA also collapse into the hamburger. */
@media (max-width: 560px) {
  .nav-actions { display: none; }
}

.sq-hamburger {
  width: 44px; height: 44px; border: 0; background: transparent;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; border-radius: 10px;
}
.sq-hamburger span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: var(--ink-900); transition: transform .22s ease, opacity .18s ease;
}
.sq-hamburger[data-open] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sq-hamburger[data-open] span:nth-child(2) { opacity: 0; }
.sq-hamburger[data-open] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sq-drawer {
  position: fixed; inset: 0; z-index: 120; overflow: hidden;
  background: rgba(16,18,21,0.32); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.sq-drawer[data-open] { opacity: 1; pointer-events: auto; }
.sq-drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(86vw, 360px); background: var(--paper);
  box-shadow: -8px 0 40px rgba(16,18,21,0.18);
  transform: translateX(100%); transition: transform .26s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; padding: 22px 24px 28px; overflow-y: auto;
}
.sq-drawer[data-open] .sq-drawer__panel { transform: translateX(0); }
.sq-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sq-drawer__close {
  width: 40px; height: 40px; border: 1px solid var(--ink-150); background: var(--paper);
  border-radius: 10px; font-size: 20px; color: var(--ink-700); line-height: 1;
}
.sq-drawer__links { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.sq-drawer__links a {
  display: block; padding: 14px 6px; font-size: 17px; font-weight: 600;
  color: var(--ink-900); border-bottom: 1px solid var(--hair-soft);
}
.sq-drawer__sub a {
  padding: 11px 6px 11px 18px; font-size: 14.5px; font-weight: 500; color: var(--ink-600);
  border-bottom: 1px solid var(--hair-soft);
}
.sq-drawer__foot { margin-top: auto; padding-top: 22px; display: flex; flex-direction: column; gap: 16px; }

/* ============================================================
   SOLUTIONS — connected workflow strip
   ============================================================ */
.sol-flow {
  display: flex; align-items: flex-start; justify-content: center;
  flex-wrap: wrap; gap: 6px 4px;
}
.sol-flow__step {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  width: 132px; flex: 0 0 auto;
}
.sol-flow__node {
  width: 46px; height: 46px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff;
  background: var(--sq-brand); box-shadow: 0 0 0 6px rgba(255,255,255,0.06);
}
.sol-flow__k { margin-top: 14px; font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.sol-flow__d { margin-top: 3px; font-size: 12.5px; color: rgba(255,255,255,0.55); line-height: 1.35; }
.sol-flow__arrow {
  align-self: flex-start; margin-top: 12px; font-size: 20px; color: rgba(255,255,255,0.35);
  flex: 0 0 auto; line-height: 1;
}

/* Light variant — workflow strip on a white/light background */
.sol-flow--light .sol-flow__node { box-shadow: 0 0 0 6px color-mix(in srgb, var(--sq-brand) 9%, white); }
.sol-flow--light .sol-flow__k { color: var(--ink-900); }
.sol-flow--light .sol-flow__d { color: var(--ink-500); }
.sol-flow--light .sol-flow__arrow { color: var(--ink-300); }

/* Product pillars — explicit columns so all sit in one row at desktop width */
.pp-pillars { display: grid; gap: 20px; }
.pp-pillars--4 { grid-template-columns: repeat(4, 1fr); }
.pp-pillars--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1040px) { .pp-pillars--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .pp-pillars--3 { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .pp-pillars--4 { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .sol-flow { flex-direction: column; align-items: center; gap: 2px; }
  .sol-flow__step { width: auto; }
  .sol-flow__arrow { transform: rotate(90deg); margin: 2px 0; align-self: center; }
}

/* ============================================================
   BOOKING MODAL
   ============================================================ */
.sq-bk-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(16,18,21,0.55); backdrop-filter: blur(3px);
  animation: sqBkFade .18s ease;
}
.sq-bk {
  position: relative; background: var(--paper); border-radius: 22px; width: 100%; max-width: 760px;
  max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 90px rgba(16,18,21,0.32); animation: sqBkPop .22s cubic-bezier(.2,.8,.2,1);
}
.sq-bk__head { padding: 24px 28px 18px; border-bottom: 1px solid var(--hair-soft); }
.sq-bk__body { padding: 26px 28px; overflow-y: auto; }
.sq-bk__foot {
  padding: 18px 28px; border-top: 1px solid var(--hair-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--paper-2);
}
.sq-bk__close {
  position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; z-index: 2;
  border: 1px solid var(--ink-150); background: var(--paper); border-radius: 10px;
  font-size: 19px; color: var(--ink-600); line-height: 1; cursor: pointer; transition: background .12s ease;
}
.sq-bk__close:hover { background: var(--paper-2); }
.sq-bk__card {
  text-align: left; background: var(--paper); border: 1.5px solid var(--ink-150); border-radius: 16px;
  padding: 22px; cursor: pointer; transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease; width: 100%;
}
.sq-bk__card:hover { border-color: var(--ink-300); box-shadow: var(--shadow, 0 8px 24px rgba(16,18,21,0.07)); transform: translateY(-1px); }
.sq-bk__card[data-sel] { border-color: var(--sq-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sq-brand) 16%, transparent); }
@keyframes sqBkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sqBkPop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 620px) {
  .sq-bk-overlay { padding: 0; align-items: flex-end; }
  .sq-bk { max-width: 100%; max-height: 94vh; border-radius: 20px 20px 0 0; }
}

/* FAQ markdown answers */
.faq-md p{margin:0 0 12px}.faq-md p:last-child{margin-bottom:0}
.faq-md ul{margin:0 0 12px;padding-left:20px}.faq-md li{margin:4px 0}
.faq-md code{background:var(--paper-2);border-radius:4px;padding:1px 5px;font-size:.92em}

/* Homepage hero photos (directionB.jsx B_HERO_PHOTOS): one row of three, field / lab / office */
.b-hero-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.b-hero-grid__tile { position: relative; overflow: hidden; border-radius: 9px; background: var(--paper-2); min-height: 0; aspect-ratio: 3 / 2; }
.b-hero-grid__tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 620px) {
  .b-hero-grid { gap: 6px; }
  .b-hero-grid__tile { aspect-ratio: 3 / 4; }
}

/* Company page leadership tiles (pages.jsx TeamSection): photo, name and title, one row on desktop */
.team-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.team-card { background: var(--paper); border: 1px solid var(--ink-150); border-radius: 16px; padding: 22px 8px 20px;
  display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.team-card h3 { overflow-wrap: anywhere; }
/* Headshots are cut-outs (scripts/headshots/headshot.swift), all framed alike; the circle crops the
   shoulders, with a faint outline and no fill. */
.team-photo { display: block; flex-shrink: 0; width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  object-position: center top; border: 1px solid var(--ink-150); box-sizing: border-box; }
/* Seven across only while every title fits on one line ("Chief Executive Officer" needs ~142 px). */
@media (max-width: 1279px) { .team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* Product page (QEST Platform): compact capability cards and one-row screenshot gallery */
.pp-caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.pp-cap { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 14px; background: var(--paper);
  border: 1px solid var(--ink-150); color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.pp-cap--link:hover, .pp-cap--link:focus-visible { border-color: var(--pp-accent); box-shadow: 0 6px 18px rgba(16,18,21,0.08); }
/* Capability tiles with a picture (products.mjs `pic`): a thumbnail beside the text, so all
   nine fit on one laptop screen; three across, two on tablets, one on phones. */
.pp-caps--pics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pp-cap--pic { align-items: center; gap: 14px; padding: 12px; }
.pp-pic { position: relative; flex: none; width: 44%; max-width: 220px; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--ink-150); border-radius: 8px; container-type: inline-size; }
.pp-pic > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pp-pic--phone { display: flex; align-items: flex-end; justify-content: center; }
.pp-phone { width: 80%; height: 90%; overflow: hidden; background: #fff; border: 4px solid var(--ink-900); border-bottom: 0;
  border-radius: 12px 12px 0 0; box-shadow: 0 8px 20px rgba(16,18,21,0.16); }
.pp-phone img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pp-pic--hub { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 14px;
  padding: 0 12px; background: var(--ink-900); border-color: var(--ink-900); box-sizing: border-box; }
.pp-hub__side { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.pp-hub__side li { position: relative; padding: 4px 7px; border: 1px solid rgba(255,255,255,0.18); border-radius: 6px;
  font-size: 10.5px; line-height: 1.2; font-weight: 600; color: #fff; background: rgba(255,255,255,0.04); }
.pp-hub__side li::after { content: ""; position: absolute; top: 50%; width: 14px; height: 1px;
  background: color-mix(in srgb, var(--pp-accent) 65%, transparent); }
.pp-hub__side--l li::after { right: -15px; }
.pp-hub__side--r li::after { left: -15px; }
.pp-hub__core { width: 64px; height: 64px; border-radius: 50%; background: var(--pp-accent); color: #fff; font-weight: 700;
  font-size: 19px; letter-spacing: -0.02em; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--pp-accent) 22%, transparent); }
/* A small picture keeps the shape of the hub and drops the labels. */
@container (max-width: 300px) {
  .pp-hub__side { gap: 9px; }
  .pp-hub__side li { font-size: 0; height: 7px; padding: 0; border-radius: 4px; }
  .pp-hub__core { width: 44px; height: 44px; font-size: 13px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--pp-accent) 22%, transparent); }
}
@media (max-width: 900px) {
  .pp-caps--pics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-caps--pics > :last-child:nth-child(odd) { grid-column: 1 / -1; }   /* no tile alone on the last row */
}
@media (max-width: 560px) {
  .pp-caps--pics { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pp-pic { width: 40%; }
}
.pp-shot { display: block; width: 100%; padding: 8px; border: 0; border-radius: 14px; background: var(--paper); cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(16,18,21,0.06), 0 8px 24px rgba(16,18,21,0.08); }
.pp-shot:hover { box-shadow: 0 1px 2px rgba(16,18,21,0.06), 0 12px 32px rgba(16,18,21,0.14); }
.pp-zoom { position: fixed; inset: 0; z-index: 100; background: rgba(16,18,21,0.82); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.pp-zoom img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,0.45); }
.pp-zoom__x { position: absolute; top: 14px; right: 18px; width: 40px; height: 40px; border: 0; border-radius: 999px; background: rgba(255,255,255,0.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
/* Product page: two deployment options shown as an either/or */
.pp-choice { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; }
.pp-choice > div:not(.pp-choice__or) { align-self: stretch; }
.pp-choice__or { width: 48px; height: 48px; border-radius: 999px; background: var(--ink-900); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 760px) {
  .pp-choice { grid-template-columns: 1fr; gap: 12px; }
  .pp-choice__or { justify-self: center; width: 42px; height: 42px; }
}
/* Legal pages (privacy, terms): moved from legal.jsx */
.legal-body { font-size:15.5px; line-height:1.7; color:var(--ink-700); max-width:74ch; }
.legal-body section { scroll-margin-top:90px; }
.legal-body section + section { margin-top:14px; padding-top:34px; border-top:1px solid var(--hair); }
.legal-body h2 { font-size:26px; line-height:1.15; letter-spacing:-0.02em; color:var(--ink-900); font-weight:700; margin:30px 0 18px; }
.legal-body section:first-child h2 { margin-top:0; }
.legal-body h3 { font-size:17px; line-height:1.3; letter-spacing:-0.01em; color:var(--ink-900); font-weight:700; margin:28px 0 8px; }
.legal-body p { margin:0 0 13px; }
.legal-body p.lc { padding-left:20px; }
.legal-body p.lc2 { padding-left:40px; }
.legal-body ul { margin:0 0 16px; padding-left:0; list-style:none; display:grid; gap:9px; }
.legal-body li { position:relative; padding-left:24px; }
.legal-body li::before { content:""; position:absolute; left:4px; top:10px; width:6px; height:6px; border-radius:2px; background:var(--sq-brand); }
.legal-body a { color:var(--sq-brand); font-weight:600; text-decoration:none; border-bottom:1px solid color-mix(in srgb,var(--sq-brand) 35%, transparent); }
.legal-body a:hover { border-bottom-color:var(--sq-brand); }
.legal-body strong { color:var(--ink-900); font-weight:700; }
.legal-body em { font-style:italic; color:var(--ink-800); }
.legal-note { font-size:13px; color:var(--ink-400); font-style:italic; }
.legal-table-wrap { overflow-x:auto; margin:8px 0 18px; border:1px solid var(--ink-150); border-radius:12px; }
.legal-table { width:100%; border-collapse:collapse; font-size:13px; min-width:680px; }
.legal-table th { text-align:left; background:var(--paper-2); color:var(--ink-700); font-weight:700; padding:11px 14px; border-bottom:1px solid var(--ink-150); white-space:nowrap; }
.legal-table td { padding:11px 14px; border-bottom:1px solid var(--hair-soft); vertical-align:top; color:var(--ink-600); }
.legal-table tr:last-child td { border-bottom:0; }
.legal-table td:first-child { font-family:var(--mono); font-size:12px; color:var(--ink-800); white-space:nowrap; }
.legal-toc { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:34px; }
.legal-toc a { display:inline-flex; align-items:center; gap:7px; padding:8px 14px; border-radius:999px; border:1px solid var(--ink-150); background:var(--paper); color:var(--ink-700); font-size:13px; font-weight:600; text-decoration:none; transition:border-color .14s ease, color .14s ease; }
.legal-toc a:hover { border-color:var(--sq-brand); color:var(--sq-brand); }
.legal-toc a span { width:6px; height:6px; border-radius:999px; background:var(--sq-brand); }

/* ============================================================
   ASTRO CHROME (src/components, src/layouts/Base.astro)
   Hover and focus states of the Astro chrome as classes, prefixed sqa- so no old page can
   match them. A property that changes on hover lives here, not in an inline style.
   ============================================================ */
/* Keyboard focus ring on the Astro pages (body.sqa); :where() keeps it below any control's
   own focus style. On the dark footer and product context bar it is white (slate on ink-900
   is under 2:1), except in their white dropdowns. */
:where(.sqa :focus-visible) { outline: 2px solid var(--sqa-focus, var(--sq-brand)); outline-offset: 2px; }
.sqa-dark { --sqa-focus: #fff; }
.sqa-dark .pcb__res-menu { --sqa-focus: var(--sq-brand); }
.sqa-main:focus { outline: none; }
/* Skip link: off screen until focused. */
.sqa-skip { position: absolute; left: 12px; top: -80px; z-index: 300; padding: 10px 16px; border-radius: 8px;
  background: var(--paper); color: var(--ink-900); font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(16,18,21,0.16); }
.sqa-skip:focus { top: 12px; }
/* Header navigation */
.sqa-navlink { color: var(--ink-700); }
.sqa-navlink--light { color: rgba(255,255,255,0.80); }
.sqa-navlink:hover, .sqa-navlink:focus-visible, .sqa-navlink--active { color: var(--ink-900); }
.sqa-navlink--light:hover, .sqa-navlink--light:focus-visible, .sqa-navlink--light.sqa-navlink--active { color: #fff; }
.sqa-navgroup { color: var(--ink-400); }
.sqa-navgroup:hover, .sqa-navgroup:focus-visible { color: var(--ink-700); }
.sqa-navitem:hover, .sqa-navitem:focus-visible { background: var(--paper-2); }
.sqa-navcard:hover, .sqa-navcard:has(> a:focus-visible) { background: var(--paper-2); }
.sqa-region-opt { background: transparent; }
.sqa-region-opt:hover, .sqa-region-opt:focus-visible, .sqa-region-opt--on { background: var(--paper-2); }
/* Support link: plain (in a bar) and pill */
.sqa-support-plain { color: var(--ink-700); }
.sqa-support-plain--light { color: rgba(255,255,255,0.80); }
.sqa-support-plain:hover, .sqa-support-plain:focus-visible { color: var(--ink-900); }
.sqa-support-plain--light:hover, .sqa-support-plain--light:focus-visible { color: #fff; }
.sqa-support { border: 1px solid var(--hair); background: transparent; }
.sqa-support:hover, .sqa-support:focus-visible { border-color: var(--ink-300); background: var(--paper-2); }
.sqa-support--light { border-color: rgba(255,255,255,0.32); }
.sqa-support--light:hover, .sqa-support--light:focus-visible { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.08); }
/* Footer */
.sqa-social { color: rgba(255,255,255,0.72); }
.sqa-social:hover, .sqa-social:focus-visible { color: #fff; }
/* Page sections (src/components/pages) */
.sqa-capline:hover, .sqa-capline:focus-visible { background: var(--paper-2); }
.sqa-capline--dark:hover, .sqa-capline--dark:focus-visible { background: rgba(255,255,255,0.07); }

/* Card and list anchors in place of "01, 02, 03" labels (the cards are in no particular order):
   a short accent bar at the top of a card, a small square at the start of a list row.
   Set the colour with --mark (default: brand red). */
.card-mark { display: block; flex: none; width: 22px; height: 3px; border-radius: 2px; background: var(--mark, var(--sq-brand)); }
.row-mark { display: block; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--mark, var(--sq-brand)); }
