/* ============================================================================
   Planetary Health Check 2026 — interactive page
   Faithful reproduction of the PHC site chrome + the signature gradient band.
   ========================================================================== */

/* ── GLOBAÏA brand fonts (self-hosted; this standalone page loads its own) ── */
@font-face { font-family: 'Alcyone'; src: url('/fonts/alcyone/Alcyone-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alcyone'; src: url('/fonts/alcyone/Alcyone-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alcyone'; src: url('/fonts/alcyone/Alcyone-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alcyone'; src: url('/fonts/alcyone/Alcyone-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Comma Serif'; src: url('/fonts/comma-serif/4-CommaSerif-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Comma Serif'; src: url('/fonts/comma-serif/4-CommaSerif-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Comma Serif'; src: url('/fonts/comma-serif/5-CommaSerif-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --phc-font: 'Alcyone', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --phc-display: 'Alcyone', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --phc-serif: 'Comma Serif', Georgia, "Times New Roman", serif;
  --phc-pb: 25%;          /* Planetary Boundary position (rescaled 1.0 / 4.0)   */
  --phc-hr: 39.62%;       /* High-Risk line (log2(3) / 4.0)                     */
  --phc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --phc-ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  /* gradient reference stops (also injected by JS for live surfaces) */
  --phc-grad: linear-gradient(
    to right,
    #006837 0%, #8cc63f 25%, #ffe657 25.01%, #fcce17 30%,
    #df711c 40%, #c31920 60%, #871e5e 80%, #3d1e5e 100%
  );
  /* same signature gradient at 20% opacity — used as a full-width wash behind
     the view-toggle bar in the expanded panel */
  --phc-grad-20: linear-gradient(
    to right,
    rgba(0, 104, 55, 0.2) 0%, rgba(140, 198, 63, 0.2) 25%,
    rgba(255, 230, 87, 0.2) 25.01%, rgba(252, 206, 23, 0.2) 30%,
    rgba(223, 113, 28, 0.2) 40%, rgba(195, 25, 32, 0.2) 60%,
    rgba(135, 30, 94, 0.2) 80%, rgba(61, 30, 94, 0.2) 100%
  );
  /* vertical breathing room above + below the toggle bar; the gradient wash
     spans exactly this band, so keep it in one token */
  --phc-toggle-pad: clamp(18px, 2.6vw, 30px);
}

/* ── Theme ─────────────────────────────────────────────────────────────────*/
html[data-theme="dark"] {
  --phc-bg: #060810;
  --phc-bg-2: #0c0f17;
  --phc-text: #f4f7fb;
  --phc-text-dim: rgba(244, 247, 251, 0.66);
  --phc-text-faint: rgba(244, 247, 251, 0.54);
  --phc-panel: #0a0d15;
  --phc-border: rgba(255, 255, 255, 0.1);
  --phc-cta-bg: rgba(8, 10, 16, 0.62);
  --phc-cta-border: rgba(255, 255, 255, 0.16);
  --phc-cyan: #57b6ec;
  color-scheme: dark;
}
html[data-theme="light"] {
  --phc-bg: #eef2f7;
  --phc-bg-2: #ffffff;
  --phc-text: #0e1620;
  --phc-text-dim: rgba(14, 22, 32, 0.68);
  --phc-text-faint: rgba(14, 22, 32, 0.56);
  --phc-panel: #ffffff; /* figures now sit on a true white stage in light mode */
  --phc-border: rgba(10, 22, 38, 0.12);
  --phc-cta-bg: rgba(8, 10, 16, 0.62);
  --phc-cta-border: rgba(255, 255, 255, 0.16);
  --phc-cyan: #1f7fc0;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--phc-bg);
  color: var(--phc-text);
  font-family: var(--phc-font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* ── Password gate (client-side, like /orbaia/) ────────────────────────────*/
#phc-content { display: none; } /* revealed by the gate script once unlocked */
#phc-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--phc-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s var(--phc-ease-soft);
}
.phc-gate-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72% 52% at 50% 38%, rgba(11, 122, 60, 0.14), transparent 60%),
    radial-gradient(ellipse 60% 50% at 72% 74%, rgba(195, 25, 32, 0.08), transparent 55%);
}
.phc-gate-card { position: relative; z-index: 1; text-align: center; max-width: 380px; padding: 28px; }
.phc-gate-band {
  width: 190px; height: 12px; border-radius: 7px; margin: 0 auto 22px;
  background: var(--phc-grad);
  box-shadow: 0 3px 22px rgba(0, 0, 0, 0.55);
}
.phc-gate-title { margin: 0 0 8px; font-family: var(--phc-display); font-size: clamp(1.5rem, 4vw, 1.9rem); font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.phc-gate-sub { margin: 0 0 30px; color: var(--phc-text-dim); font-size: 0.95rem; }
.phc-gate-form { display: flex; flex-direction: column; gap: 14px; }
.phc-gate-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--phc-border);
  border-radius: 11px;
  padding: 14px 18px;
  color: var(--phc-text);
  font: inherit; font-size: 1rem;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}
.phc-gate-input:focus { border-color: var(--phc-cyan); }
.phc-gate-input::placeholder { color: var(--phc-text-faint); }
.phc-gate-submit {
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 14px 18px;
  cursor: pointer;
  font: inherit; font-size: 1rem; font-weight: 700; letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #2b8fe6, #176fc0);
  transition: transform 0.25s var(--phc-ease), box-shadow 0.25s;
}
.phc-gate-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(43, 143, 230, 0.35); }
.phc-gate-error { margin: 2px 0 0; min-height: 1em; color: #ff6b6b; font-size: 0.85rem; opacity: 0; transition: opacity 0.2s; }
.phc-gate-error.is-shown { opacity: 1; }

/* ── Header / chrome ───────────────────────────────────────────────────────*/
.phc-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  padding: 14px clamp(18px, 4vw, 44px);
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0));
  transition: background 0.4s var(--phc-ease-soft), backdrop-filter 0.4s;
}
.phc-header.is-scrolled {
  background: rgba(6, 8, 16, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--phc-border);
}

/* mini gradient-band logo with a draggable-looking handle */
.phc-logo {
  position: relative;
  width: 86px;
  height: 26px;
  border-radius: 6px;
  flex: 0 0 auto;
  text-decoration: none;
  display: block;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
.phc-logo-band {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: var(--phc-grad);
}
.phc-logo-handle {
  position: absolute;
  top: 50%;
  left: 14%;
  right: 38%;
  height: 3px;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}
.phc-logo-dot {
  position: absolute;
  top: 50%;
  left: 30%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #2b8fe6;
  box-shadow: 0 0 0 2px #fff, 0 0 6px rgba(43, 143, 230, 0.9);
  transition: left 0.5s var(--phc-ease);
}
.phc-logo:hover .phc-logo-dot { left: 44%; }

.phc-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 38px);
  flex: 1 1 auto;
  justify-content: center;
}
.phc-nav-link,
.phc-nav-dd-trigger {
  color: #fff; /* readable over the dark hero in both themes; recoloured when scrolled in light mode */
  text-decoration: none;
  font-size: clamp(15px, 1.1vw, 18px);
  font-weight: 400;
  letter-spacing: 0.01em;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 2px;
  position: relative;
  opacity: 0.92;
  transition: opacity 0.2s;
}
.phc-nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--phc-cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--phc-ease);
}
.phc-nav-link:hover { opacity: 1; }
.phc-nav-link:hover::after { transform: scaleX(1); }

.phc-nav-dd { position: relative; }
.phc-nav-dd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.phc-caret { width: 11px; height: 8px; transition: transform 0.3s var(--phc-ease); }
.phc-nav-dd.is-open .phc-caret { transform: rotate(180deg); }
.phc-nav-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 280px;
  background: rgba(10, 13, 21, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid var(--phc-border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s var(--phc-ease), transform 0.24s var(--phc-ease), visibility 0.24s;
  z-index: 60;
}
.phc-nav-dd.is-open .phc-nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.phc-nav-menu-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--phc-text);
  text-decoration: none;
  font-size: 15px;
  transition: background 0.16s;
}
.phc-nav-menu-item:hover { background: rgba(255, 255, 255, 0.07); }
.phc-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex: 0 0 auto;
}
.phc-dot.is-breached { background: #e23b2e; box-shadow: 0 0 8px rgba(226, 59, 46, 0.7); }
.phc-dot.is-safe { background: #54b948; box-shadow: 0 0 8px rgba(84, 185, 72, 0.6); }

.phc-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.phc-icon-btn {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0.9;
  transition: background 0.2s, opacity 0.2s;
}
.phc-icon-btn svg { width: 20px; height: 20px; }
.phc-icon-btn:hover { background: rgba(255, 255, 255, 0.1); opacity: 1; }
.phc-sun { display: none; }
html[data-theme="light"] .phc-moon { display: none; }
html[data-theme="light"] .phc-sun { display: block; }

/* ── Hero ──────────────────────────────────────────────────────────────────*/
.phc-hero {
  position: relative;
  min-height: clamp(540px, 80vh, 820px);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  /* Cinematic dark backdrop behind the half-opacity photo — keeps the hero
     dramatic and the white title legible in BOTH themes. */
  background: #04060d;
}
.phc-hero-media { position: absolute; inset: 0; z-index: -2; }
.phc-hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 38%;
  opacity: 0.5; /* per brief: hero image at 50% */
  transition: opacity 0.4s ease;
}
/* Azulejo mosaic reveal canvas — matches the still <img> at reveal=0, so the
   swap is invisible. The transient tile seams live only during a flip; the
   settled forest is clean (no overlay). */
.phc-hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0.5; /* same 50% dim as the photo, for title legibility */
  pointer-events: none;
}
.phc-hero-media.has-mosaic img { opacity: 0; }
.phc-hero-scrim {
  position: absolute; inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 50% 30%, rgba(2, 6, 18, 0.18), rgba(2, 6, 18, 0.62) 78%),
    linear-gradient(to bottom, rgba(2, 6, 18, 0.55) 0%, rgba(2, 6, 18, 0) 26%, rgba(2, 6, 18, 0) 60%, rgba(6, 8, 16, 0.4) 100%);
}
.phc-hero-inner {
  text-align: center;
  padding: 0 24px;
  max-width: 900px;
  transform: translateY(-2%);
}
.phc-hero-title {
  margin: 0 auto;
  max-width: 14ch;
  font-family: var(--phc-display);
  /* Adaptive across every screen: small on phones, never overwhelming on
     desktop. Was clamp(44px, 7.4vw, 104px) — far too large. */
  font-size: clamp(2.1rem, 6vw, 4.35rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.015;
  text-wrap: balance;
  color: #fff;
  /* 90° vertical cast — a soft shadow dropping straight down (Tenebr-style),
     layered over a tight legibility shadow. x stays 0 so the light reads as
     directly overhead and the penumbra lengthens + fades downward. */
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 6px 14px rgba(0, 0, 0, 0.45),
    0 14px 30px rgba(0, 0, 0, 0.38),
    0 26px 55px rgba(0, 0, 0, 0.30),
    0 42px 88px rgba(0, 0, 0, 0.20);
}
/* "Health Check" sits in regular weight beside the bold "Planetary" */
.phc-hero-title-reg { font-weight: 400; }
.phc-hero-alarm {
  margin: 0.55em 0 0.12em;
  font-size: clamp(21px, 2.7vw, 34px);
  font-weight: 700;
  color: #ff3b30;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.42),
    0 10px 26px rgba(0, 0, 0, 0.30),
    0 20px 46px rgba(0, 0, 0, 0.20);
}
.phc-hero-sub {
  margin: 0.12em 0 0;
  font-size: clamp(19px, 2.1vw, 28px);
  font-weight: 400;
  line-height: 1.45;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.62),
    0 4px 12px rgba(0, 0, 0, 0.46),
    0 9px 24px rgba(0, 0, 0, 0.32),
    0 18px 42px rgba(0, 0, 0, 0.22);
}
.phc-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(22px, 4vh, 40px);
  padding: 13px 22px;
  border-radius: 10px;
  background: var(--phc-cta-bg);
  border: 1px solid var(--phc-cta-border);
  backdrop-filter: blur(6px);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: transform 0.25s var(--phc-ease), background 0.25s, box-shadow 0.25s;
}
.phc-cta svg { width: 15px; height: 15px; }
.phc-cta:hover {
  transform: translateY(-2px);
  background: rgba(20, 24, 34, 0.8);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

/* ── The signature band ────────────────────────────────────────────────────*/
.phc-band {
  position: relative;
  background: var(--phc-bg);
  z-index: 2;
}
.phc-band-strip {
  display: block;
  /* Match the expanded wash + Overview chart, which are 100vw (incl. scrollbar).
     Using width:100% here (content width, no scrollbar) made the gradient stops
     drift by the scrollbar width, so the green→yellow seam didn't line up. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 13px;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  background: var(--phc-grad);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45);
  transition: height 0.5s var(--phc-ease), filter 0.4s;
}
.phc-band[data-state="collapsed"] .phc-band-strip:hover { height: 18px; filter: brightness(1.08); }
.phc-band[data-state="expanded"] .phc-band-strip { height: 8px; cursor: default; }
.phc-band-strip::after { /* soft moving glow on collapsed strip */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 60px at var(--mx, 50%) 50%, rgba(255, 255, 255, 0.35), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.phc-band[data-state="collapsed"] .phc-band-strip:hover::after { opacity: 1; }
/* ── Click cue on the collapsed gradient strip (no pill) ───────────────────────
   A soft light sweeps across the bar and a tap-ripple pulses at the centre, so
   the whole strip reads as one live, tappable surface. On hover the animation
   fades and a clean "Read the vital signs" label takes its place.              */
.phc-cue {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.3s;
}
/* cues vanish once expanded */
.phc-band[data-state="expanded"] .phc-cue,
.phc-band[data-state="expanded"] .phc-cue-label { display: none !important; }

/* light sweep */
.phc-cue--sweep { overflow: hidden; }
.phc-cue--sweep::before {
  content: "";
  position: absolute;
  top: -60%;
  height: 220%;
  width: 16%;
  left: -20%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: phc-cue-sweep 3.2s ease-in-out infinite;
}
@keyframes phc-cue-sweep {
  0% { left: -20%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: 104%; opacity: 0; }
}
.phc-cue--ripple { overflow: visible; }
.phc-cue--ripple::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0;
  animation: phc-cue-ripple 3.2s ease-out infinite;
}
@keyframes phc-cue-ripple {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
  10% { opacity: 0.9; }
  60% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
  100% { opacity: 0; }
}

/* hover: the live animation fades out and a clean, pill-less label takes over */
.phc-cue-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: "Alcyone", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85), 0 0 18px rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s;
}
.phc-band[data-state="collapsed"] .phc-band-strip:hover .phc-cue { opacity: 0; }
.phc-band[data-state="collapsed"] .phc-band-strip:hover .phc-cue-label { opacity: 1; }

/* Until the band has been opened once this visit (.is-seen, set by index.ts),
   the label rests visible so touch users — who never hover — can find the
   page's centrepiece. The centre ripple yields to the text; the sweep stays. */
.phc-band[data-state="collapsed"]:not(.is-seen) .phc-cue-label { opacity: 0.92; }
.phc-band[data-state="collapsed"]:not(.is-seen) .phc-cue--ripple { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .phc-cue--sweep::before { display: none; }
  .phc-cue--ripple::before { animation: none !important; opacity: 0.5; transform: translate(-50%, -50%) scale(1.4); }
}

.phc-band-panel {
  height: 0;
  overflow: hidden;
  background: var(--phc-panel);
  transition: height 0.62s var(--phc-ease), background 0.4s var(--phc-ease-soft);
}
/* Expanded-panel background follows the active view:
   Overview = full-bleed gradient (set on .phc-agg); Blood Test = dark grey; Spider = near-black. */
.phc-band[data-view="bloodtest"] .phc-band-panel { background: #1c2028; }
/* Spider sits on a deep radial — dark blue core fading to black before the rim
   labels. A vh-sized CIRCLE (not a %-ellipse) so it never stretches oval on wide
   screens. */
.phc-band[data-view="spider"] .phc-band-panel {
  background: radial-gradient(circle min(46vh, 480px) at 50% 49%, #0b1e4a 0%, #081640 30%, #03081a 58%, #01030a 80%);
}
/* Light mode: light-grey core fading to white before the labels. */
html[data-theme="light"] .phc-band[data-view="bloodtest"] .phc-band-panel { background: #ffffff; }
html[data-theme="light"] .phc-band[data-view="spider"] .phc-band-panel {
  background: radial-gradient(circle min(46vh, 480px) at 50% 49%, #d9e3f1 0%, #e7eef7 38%, #f6f9fc 62%, #ffffff 80%);
}
.phc-band-inner {
  /* top padding equals the toggle's margin-bottom so the tabs sit vertically
     centred in the gradient wash between the strip and the chart */
  padding: var(--phc-toggle-pad) clamp(16px, 4vw, 46px) clamp(26px, 4vw, 44px);
  max-width: 1180px;
  margin: 0 auto;
}

/* segmented control — the three tabs sit dead-centred, with the close button
   just to their right and a balancing spacer of equal width on the left so the
   tab group stays optically centred. Vertically centred in the band. */
.phc-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: var(--phc-toggle-pad);
  position: relative;
}
/* full-width gradient wash (20% opacity) behind the three view tabs. It breaks
   out of the 1180px inner to span the whole viewport, and extends up into the
   inner's top padding + down into the toggle's margin so the colour band reads
   as one continuous strip under the thin gradient bar above. */
.phc-toggle::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  top: calc(-1 * var(--phc-toggle-pad));
  bottom: calc(-1 * var(--phc-toggle-pad));
  background: var(--phc-grad-20);
  pointer-events: none;
}
/* keep the tabs + close button above the wash (close button is already
   absolutely positioned below — only its stacking needs lifting) */
.phc-toggle-group { position: relative; z-index: 1; }
.phc-band-close { z-index: 1; }
/* unified segmented-control pill holding the three view tabs */
.phc-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--phc-border);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.phc-toggle [data-view] {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--phc-text-dim);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.22s var(--phc-ease), background 0.22s var(--phc-ease), box-shadow 0.22s var(--phc-ease);
}
.phc-toggle [data-view]:hover { color: var(--phc-text); }
.phc-toggle [data-view].is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
/* invisible left counterweight, same width as the close button on the right */
.phc-toggle-spacer { display: block; width: 42px; flex: none; }
.phc-band-close {
  position: relative;   /* sits in flow, just to the right of the tab group */
  z-index: 1;
  flex: none;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--phc-text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
}
.phc-band-close svg { width: 16px; height: 16px; }
.phc-band-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--phc-text); }

/* download button: mirrors the close button on the left, counterweighting it so
   the three view tabs stay centred (it replaces the old invisible spacer). */
.phc-band-download {
  position: relative;
  z-index: 1;
  flex: none;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--phc-text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.phc-band-download svg { width: 18px; height: 18px; }
.phc-band-download:hover { background: rgba(255, 255, 255, 0.08); color: var(--phc-text); }
.phc-band-download:focus-visible { outline: 2px solid var(--phc-text); outline-offset: 2px; }
.phc-band-download.is-busy { opacity: 0.5; pointer-events: none; }
.phc-band-download.is-error { color: #ff7a7a; }
html[data-theme="light"] .phc-band-download:hover { background: rgba(10, 22, 38, 0.06); color: var(--phc-text); }

/* views: only the active one is in flow */
.phc-view { display: none; }
.phc-view.is-active { display: block; animation: phc-fade 0.5s var(--phc-ease); }
/* breathing room so the Blood Test / Spider headings clear the toggle band above
   (the Overview is full-bleed and needs none) */
.phc-view--bloodtest,
.phc-view--spider { padding-top: clamp(16px, 2.6vw, 32px); }
@keyframes phc-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.phc-view-head { margin: 0 0 18px; position: relative; padding-right: 150px; }
.phc-view-head h2 {
  margin: 0;
  font-family: var(--phc-display);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--phc-text);
}
.phc-view-head p { margin: 4px 0 0; color: var(--phc-text-dim); font-size: 16px; line-height: 1.55; max-width: 62ch; }
.phc-mount { width: 100%; }

/* ── Fullscreen toggle (Blood Test + Spider view headers) ───────────────────*/
.phc-fs-btn {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--phc-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--phc-text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.phc-fs-btn:hover {
  color: var(--phc-text);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
}
.phc-fs-btn svg { width: 16px; height: 16px; }
.phc-fs-ico-close { display: none; }
.phc-fs-btn.is-fs .phc-fs-ico-open { display: none; }
.phc-fs-btn.is-fs .phc-fs-ico-close { display: inline; }
html[data-theme="light"] .phc-fs-btn:hover { background: rgba(10, 22, 38, 0.06); border-color: rgba(10, 22, 38, 0.2); }

/* ── A view rendered fullscreen (browser top layer) ────────────────────────*/
.phc-view:fullscreen {
  padding: clamp(22px, 4vh, 56px) clamp(20px, 4vw, 64px);
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.phc-view--bloodtest:fullscreen { background: #1c2028; align-items: center; justify-content: safe center; }
.phc-view--spider:fullscreen { background: radial-gradient(circle min(54vh, 780px) at 50% 50%, #0b1e4a 0%, #081640 30%, #03081a 58%, #01030a 80%); align-items: center; justify-content: center; }
html[data-theme="light"] .phc-view--bloodtest:fullscreen { background: #ffffff; }
html[data-theme="light"] .phc-view--spider:fullscreen { background: radial-gradient(circle min(54vh, 780px) at 50% 50%, #d9e3f1 0%, #e7eef7 38%, #f6f9fc 62%, #ffffff 80%); }
.phc-view:fullscreen .phc-view-head { flex: none; max-width: 1400px; width: 100%; }
/* Blood Test centred vertically (not top-aligned), with a sensible reading cap */
.phc-view--bloodtest:fullscreen .phc-mount { flex: none; max-width: 1400px; width: 100%; }
/* Spider grows to fill the height available in fullscreen */
.phc-view--spider:fullscreen .phc-spider-svg { height: min(88vh, 1400px); }

/* ── Spider centrepiece: large, sits high, tight header ──────────────────────*/
/* The spider is the dominant element of the expanded panel: let it use most of
   the 1180px inner width, stay centred, and start near the top. */
.phc-view--spider .phc-view-head { margin: 0 0 6px; }
.phc-view--spider .phc-view-head p { margin-top: 2px; }
.phc-view--spider .phc-mount {
  /* full-bleed + adaptive: as large as the viewport allows (≈2x the previous cap),
     scaling fluidly down to mobile. */
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-top: 4px;
}
.phc-view--spider.is-active { animation-name: phc-fade; }
.phc-view-caption {
  margin: 16px auto 0;
  max-width: 70ch;
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
  color: var(--phc-text-dim);
}
.phc-inline-link {
  border: 0;
  background: none;
  color: var(--phc-cyan);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Aggregate "We are here" ───────────────────────────────────────────────*/
.phc-agg {
  position: relative;
  /* full-bleed: the gradient spans the whole viewport, extending the colours
     left and right of the Overview chart content. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  border-radius: 0;
  /* visible so the PB / High-Risk lines can extend a little above + below */
  overflow: visible;
  height: clamp(300px, 46vh, 440px);
  background: var(--phc-grad);
}
.phc-agg-zones {
  position: absolute;
  inset: 22px 0 auto 0;
  display: block;
}
.phc-agg-zone {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.08;
}
/* one consistent family: a bold zone name + a small uppercased eyebrow qualifier */
.phc-agg-zone strong { font-size: clamp(15px, 1.55vw, 21px); font-weight: 700; letter-spacing: -0.003em; }
.phc-agg-zone span {
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* permanent soft legibility shadow so the colored labels separate from the
   same-hue gradient behind them, instead of relying on the hover state */
.phc-agg-zone strong, .phc-agg-zone span {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: color 0.18s ease, text-shadow 0.18s ease;
}
/* each label is boxed to its own zone and aligned toward the boundary it guards:
   Safe → right (hugs the Planetary Boundary), Increasing → centred,
   Heightened → left (hugs the High-Risk line). Boxing keeps them from colliding. */
.phc-agg-zone--safe {
  left: 0; width: var(--phc-pb);
  padding-right: clamp(12px, 1.4vw, 20px);
  text-align: right;
  color: #0b4d1f;
}
.phc-agg-zone--inc {
  left: var(--phc-pb); width: calc(var(--phc-hr) - var(--phc-pb));
  text-align: center;
  color: #6b4a05;
}
.phc-agg-zone--high {
  left: var(--phc-hr); right: 0;
  padding-left: clamp(12px, 1.4vw, 20px);
  text-align: left;
  color: #6e1414;
}
/* obvious hover highlight: zone label goes white with a dark halo */
.phc-agg-zone.is-hl strong,
.phc-agg-zone.is-hl span { color: #fff; text-shadow: 0 1px 7px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.85); }

.phc-agg-line {
  position: absolute;
  /* protrude a little above + below the gradient band */
  top: -10px; bottom: -10px;
  width: 5px;
  transform: translateX(-50%);
  border-radius: 3px;
  transition: width 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.phc-agg-line--pb { left: var(--phc-pb); background: rgba(11, 77, 31, 0.95); }
.phc-agg-line--hr { left: var(--phc-hr); background: rgba(176, 24, 24, 0.95); }
.phc-agg-line.is-hl { width: 7px; box-shadow: 0 0 11px rgba(255, 255, 255, 0.8); filter: brightness(1.5); }

.phc-agg-track {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 56%;
  height: 0;
}
.phc-agg-whisker {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
.phc-agg-box {
  position: absolute;
  left: 24%;
  width: 30%;
  top: 50%;
  height: 16px;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.phc-agg-here {
  position: absolute;
  top: 56%; /* the median line */
  left: 33%;
  /* lift by half the globe so the globe is centred ON the line, label below */
  transform: translate(-50%, -27px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 12; /* sit ON TOP of the whisker/box lines */
  pointer-events: auto; /* the globe itself is a hover target (median explainer) */
  cursor: help;
  outline: none;
}
.phc-agg-globe {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0 26px 4px rgba(64, 156, 255, 0.85);
  animation: phc-earth-float 5.5s ease-in-out infinite;
}
.phc-agg-globe svg {
  width: 32px;
  height: 32px;
  color: #2b8fe6; /* blue globe on the white circle */
}
.phc-agg-arrow {
  width: 0; height: 0;
  margin-top: 7px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.phc-agg-label {
  margin-top: 5px;
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
@keyframes phc-earth-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.phc-agg-tick {
  position: absolute;
  bottom: 14px;
  /* sit just to the RIGHT of the reference line, left-aligned */
  transform: none;
  /* above the full-height zone/line hit-areas (z 5–6) so the label itself
     receives hover, not the zone overlay sitting on top of it */
  z-index: 9;
  padding-left: 9px;
  font-size: clamp(14px, 1.6vw, 19px);
  font-weight: 700;
  line-height: 1.1;
  text-align: left;
  cursor: help;
  outline: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: color 0.18s ease, text-shadow 0.18s ease;
}
.phc-agg-tick span { display: inline-block; }
.phc-agg-tick--pb { left: var(--phc-pb); color: #0c5a25; }
.phc-agg-tick--hr { left: var(--phc-hr); color: #b01818; }
/* highlighted label: white text, and drop the connector line beside it */
.phc-agg-tick.is-hl {
  color: #fff;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.8);
}

/* ── Hover hit-areas + explanation tooltips (3 zones + 2 lines) ────────────── */
.phc-agg-hit,
.phc-agg-hit-line {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  cursor: help;
  outline: none;
}
/* zone hover targets cover only the UPPER part of each zone (where the labels
   live) — the lower half stays free so the reference-line labels, box/whisker
   and globe beneath can be hovered without the zone overlay intercepting */
.phc-agg-hit { bottom: auto; height: 46%; }
.phc-agg-hit--safe { left: 0; width: var(--phc-pb); }
.phc-agg-hit--inc { left: var(--phc-pb); width: calc(var(--phc-hr) - var(--phc-pb)); }
.phc-agg-hit--high { left: var(--phc-hr); right: 0; }
/* narrow strips straddling the two reference lines (sit above the zones) */
.phc-agg-hit-line { width: 22px; transform: translateX(-50%); z-index: 6; }
.phc-agg-hitline--pb { left: var(--phc-pb); }
.phc-agg-hitline--hr { left: var(--phc-hr); }
/* faint highlight on the hovered zone/line so the hit target is felt */
.phc-agg-hit:hover, .phc-agg-hit:focus-visible { background: rgba(255, 255, 255, 0.07); }
.phc-agg-hit-line:hover, .phc-agg-hit-line:focus-visible { background: rgba(255, 255, 255, 0.16); }

/* whisker (0–100%) and box (25–75%) become hoverable explanation targets too */
.phc-agg-whisker,
.phc-agg-box { pointer-events: auto; cursor: help; }
.phc-agg-whisker { z-index: 7; }
.phc-agg-box { z-index: 8; }
/* expand both bars' hover hit area vertically without changing their look */
.phc-agg-whisker::before { content: ''; position: absolute; inset: -9px 0; }
.phc-agg-box::before { content: ''; position: absolute; inset: -7px 0; }
/* The box (middle 50%) was occluded by the "We are here" marker container (z 12):
   its globe + label + the empty column box covered the box's centre, so only the
   thin flanks responded. Make the marker container pointer-transparent and only
   re-enable its globe + label as hover targets, so the box bar shows through
   everywhere else while the globe keeps its own median tooltip. */
.phc-agg-here { pointer-events: none; }
.phc-agg-here .phc-agg-globe,
.phc-agg-here .phc-agg-label { pointer-events: auto; }

/* Single shared explanation tooltip (one element, JS-positioned on <body> so the
   panel's overflow:hidden can't clip it). It floats just above the cursor — and
   flips below near the top edge — so it never sits on top of what it defines.
   Translucent + blurred "glass" surface. See wireAggTooltips() in index.ts. */
.phc-agg-tip {
  position: fixed;
  left: 0;
  top: 0;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: 290px;
  padding: 12px 15px;
  border-radius: 12px;
  /* raised from 0.62 → 0.84 so the text stays AA-legible even where the tip
     floats over the brightest yellow band of the gradient */
  background: rgba(12, 16, 24, 0.84);
  color: #eef3f9;
  font-family: var(--phc-font);
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease;
}
.phc-agg-tip.is-shown { opacity: 1; visibility: visible; }
.phc-agg-tip-name {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 1.2;
  margin-bottom: 4px;
}
.phc-agg-tip-desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(238, 243, 249, 0.86);
}

/* entrance: globe drops in + whisker grows when overview replays */
.phc-view--aggregate:not(.is-played) .phc-agg-here { opacity: 0; transform: translate(-50%, -43px); }
.phc-view--aggregate.is-played .phc-agg-here {
  animation: phc-here-in 0.7s 0.15s var(--phc-ease) both;
}
@keyframes phc-here-in {
  from { opacity: 0; transform: translate(-50%, -43px); }
  to { opacity: 1; transform: translate(-50%, -27px); }
}

/* ── Intro copy ────────────────────────────────────────────────────────────*/
.phc-intro {
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 64px);
  background: var(--phc-bg);
}
.phc-intro-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.5fr);
  gap: clamp(24px, 5vw, 80px);
}
.phc-intro-head h2 {
  margin: 0;
  font-family: var(--phc-serif);
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.06;
  color: var(--phc-text);
}
.phc-intro-head h2 span { color: var(--phc-cyan); }
html[data-theme="light"] .phc-intro-head h2 span { color: #1f7fc0; }
.phc-intro-head p { margin: 12px 0 0; color: var(--phc-text-dim); font-size: clamp(16px, 1.4vw, 18px); line-height: 1.55; }
.phc-intro-body p { margin: 0 0 1.3em; max-width: 68ch; font-size: clamp(16px, 1.35vw, 18.5px); line-height: 1.6; color: var(--phc-text); }
.phc-intro-body p:first-child { color: var(--phc-text); }
.phc-intro-body strong { font-weight: 700; }

/* ── Variant hub (alternate readings) ──────────────────────────────────────*/
.phc-variants {
  background: var(--phc-bg);
  padding: clamp(28px, 4vw, 48px) clamp(20px, 5vw, 64px) clamp(48px, 7vw, 88px);
}
.phc-variants-inner { max-width: 1180px; margin: 0 auto; }
.phc-variants-head { max-width: 60ch; margin: 0 0 clamp(22px, 3vw, 36px); }
.phc-variants-head h2 {
  margin: 0;
  font-family: var(--phc-display);
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--phc-text);
}
.phc-variants-head p { margin: 8px 0 0; color: var(--phc-text-dim); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.5; }
.phc-variants-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.8vw, 22px);
}
/* "Explore the figures" — same three-up grid as the readings above, so the
   two hub sections read as one harmonised set of six cards. */
.phc-figures-extra { padding-top: 0; }
.phc-variant-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: clamp(20px, 2.4vw, 28px);
  border-radius: 0;
  text-decoration: none;
  overflow: hidden;
  background: var(--phc-bg-2);
  border: 1px solid var(--phc-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: transform 0.35s var(--phc-ease), box-shadow 0.35s var(--phc-ease), border-color 0.35s;
}
html[data-theme="light"] .phc-variant-card {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(10, 22, 38, 0.06);
}
.phc-variant-band {
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--phc-grad);
  transform: scaleX(0.999);
  transform-origin: left;
  opacity: 0.9;
}
.phc-variant-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--phc-cyan) 45%, var(--phc-border));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}
html[data-theme="light"] .phc-variant-card:hover { box-shadow: 0 22px 48px rgba(10, 22, 38, 0.14); }
.phc-variant-kicker {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--phc-text-dim);
}
.phc-variant-name {
  font-family: var(--phc-display);
  font-size: clamp(19px, 1.9vw, 23px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--phc-text);
}
.phc-variant-desc { font-size: 16px; line-height: 1.55; color: var(--phc-text-dim); flex: 1; }
.phc-variant-go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--phc-cyan);
}
.phc-variant-go svg { width: 15px; height: 15px; transition: transform 0.3s var(--phc-ease); }
.phc-variant-card:hover .phc-variant-go svg { transform: translateX(4px); }

@media (max-width: 980px) and (min-width: 761px) {
  .phc-variants-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .phc-variants-grid { grid-template-columns: 1fr; }
}

/* ── Suggested citation ────────────────────────────────────────────────────*/
.phc-cite {
  background: var(--phc-bg);
  padding: 0 clamp(20px, 5vw, 64px) clamp(40px, 6vw, 76px);
}
.phc-cite-inner { max-width: 1180px; margin: 0 auto; }
.phc-cite-block {
  background: var(--phc-bg-2);
  border: 1px solid var(--phc-border);
  padding: clamp(16px, 2vw, 22px) clamp(18px, 2.4vw, 26px);
  margin-bottom: clamp(12px, 1.5vw, 16px);
}
html[data-theme="light"] .phc-cite-block {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(10, 22, 38, 0.06);
}
.phc-cite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.phc-cite-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--phc-text-dim);
}
.phc-cite-copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: none;
  border: none;
  color: var(--phc-text-dim);
  cursor: pointer;
  position: relative;
  transition: color 0.18s ease, transform 0.18s ease;
}
.phc-cite-copy svg { width: 16px; height: 16px; display: block; }
.phc-cite-copy-check { display: none; }
.phc-cite-copy:hover { color: var(--phc-cyan); transform: translateY(-1px); }
.phc-cite-copy:focus-visible { outline: 2px solid var(--phc-cyan); outline-offset: 3px; border-radius: 4px; }
.phc-cite-copy.is-copied { color: #2bb673; transform: none; }
.phc-cite-copy.is-copied .phc-cite-copy-icon { display: none; }
.phc-cite-copy.is-copied .phc-cite-copy-check { display: block; }

/* small tooltip (the visible "Copy" label was removed) */
.phc-cite-copy[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  right: 0;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--phc-panel);
  border: 1px solid var(--phc-border);
  color: var(--phc-text-dim);
  font-family: var(--phc-font);
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.phc-cite-copy:hover[data-tooltip]::after,
.phc-cite-copy.is-copied[data-tooltip]::after {
  opacity: 1;
  transform: translateY(0);
}
.phc-cite-copy.is-copied[data-tooltip]::after { color: #2bb673; }
.phc-cite-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--phc-text);
}
.phc-cite-text em { font-style: italic; }
.phc-cite-note {
  display: block;
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--phc-text-dim);
}
.phc-cite-licence {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: clamp(14px, 2vw, 20px) 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--phc-text-dim);
}
.phc-cite-licence svg { flex: none; width: 18px; height: 18px; margin-top: 1px; opacity: 0.85; }
.phc-cite-licence a {
  color: var(--phc-cyan);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--phc-cyan) 35%, transparent);
}
.phc-cite-licence a:hover { border-bottom-color: var(--phc-cyan); }

@media (max-width: 560px) {
  .phc-cite-label { font-size: 11.5px; }
}

/* ── Footer ────────────────────────────────────────────────────────────────*/
.phc-footer { background: var(--phc-bg); padding-bottom: 40px; }
.phc-footer-band { display: block; height: 6px; background: var(--phc-grad); opacity: 0.85; }
.phc-footer p {
  text-align: center;
  margin: 22px 0 0;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--phc-text-dim);
}
.phc-footer .phc-footer-src {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--phc-text-faint);
}

/* ── Mock-up notes on placeholder chrome ───────────────────────────────────
   Dead links/buttons (nav items, search, the report CTA) carry a data-mock
   note shown as a small tip on hover/focus, or briefly on tap (.is-mock-shown
   via the page script, which also swallows the dead-href click). */
[data-mock] { position: relative; }
[data-mock]::before {
  content: attr(data-mock);
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(-3px);
  padding: 6px 11px;
  border-radius: 7px;
  background: rgba(8, 10, 16, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(244, 247, 251, 0.88);
  font-family: var(--phc-font);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  transition: opacity 0.25s, transform 0.25s;
}
[data-mock]:hover::before,
[data-mock]:focus-visible::before,
[data-mock].is-mock-shown::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* right-edge chrome (search button): right-align the tip so it stays on screen */
.phc-actions [data-mock]::before { left: auto; right: 0; transform: translateY(-3px); }
.phc-actions [data-mock]:hover::before,
.phc-actions [data-mock]:focus-visible::before,
.phc-actions [data-mock].is-mock-shown::before { transform: translateY(0); }

/* ── Light theme chrome overrides ──────────────────────────────────────────
   The header floats over the always-dark hero, so its text stays white until
   you scroll into the light content — at which point header, dropdown, segmented
   control and close button all flip to the light palette. */
html[data-theme="light"] .phc-header.is-scrolled {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(10, 22, 38, 0.10);
}
html[data-theme="light"] .phc-header.is-scrolled .phc-nav-link,
html[data-theme="light"] .phc-header.is-scrolled .phc-nav-dd-trigger,
html[data-theme="light"] .phc-header.is-scrolled .phc-icon-btn { color: var(--phc-text); }

html[data-theme="light"] .phc-nav-menu {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(10, 22, 38, 0.12);
  box-shadow: 0 24px 60px rgba(10, 22, 38, 0.18);
}
html[data-theme="light"] .phc-nav-menu-item { color: var(--phc-text); }
html[data-theme="light"] .phc-nav-menu-item:hover { background: rgba(10, 22, 38, 0.06); }

/* Segmented view-control + close button on the white figure stage. */
html[data-theme="light"] .phc-toggle-group {
  background: rgba(10, 22, 38, 0.05);
  box-shadow: inset 0 0 0 1px rgba(10, 22, 38, 0.08);
}
html[data-theme="light"] .phc-toggle [data-view]:hover { color: var(--phc-text); background: transparent; }
html[data-theme="light"] .phc-toggle [data-view].is-active {
  color: #0e1620;
  background: #fff;
  box-shadow: 0 1px 3px rgba(10, 22, 38, 0.18), 0 0 0 1px rgba(10, 22, 38, 0.04);
}
html[data-theme="light"] .phc-band-close { color: var(--phc-text-dim); }
html[data-theme="light"] .phc-band-close:hover { background: rgba(10, 22, 38, 0.07); color: var(--phc-text); }

/* ── Responsive ────────────────────────────────────────────────────────────*/
@media (max-width: 860px) {
  .phc-nav { display: none; }
  .phc-intro-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .phc-toggle [data-view] { padding: 8px 11px; font-size: 14px; }
  /* On phones the tab group nearly fills the row, so there's no room for an
     inline close — drop the counterweight and pin the X to the right edge. */
  .phc-toggle-spacer { display: none; }
  .phc-band-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  /* fullscreen button: icon-only to save header width */
  .phc-view-head { padding-right: 52px; }
  .phc-fs-btn { padding: 9px; gap: 0; }
  .phc-fs-label { display: none; }
}

/* ── Reduced motion ────────────────────────────────────────────────────────*/
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
