/* =============================================================================
   experience-viz.css — in-page framing for the three DS web graphics
   (Constellation · Topic-Timeline Voronoi · Resonance Map). The component CSS
   below is adapted from the design system's preview files and SCOPED under each
   scene wrapper so their shared class names (.topbar/.title/.node/.stage) don't
   collide. Tokens + shared scene classes come from cc-web.css.
   ========================================================================== */

/* ---- destination chrome: crumb + scene switcher --------------------------- */
.xp-scene-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  justify-content: space-between; margin-top: 28px; }
.xp-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 9999px;
  background: var(--cc-glass-chrome); border: 1px solid var(--cc-glass-border-soft); }
.xp-switch a { font-family: var(--font-ui); font-weight: 600; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--cc-web-text-muted);
  padding: 8px 16px; border-radius: 9999px; cursor: pointer; white-space: nowrap;
  transition: color var(--cc-dur-fast) var(--cc-ease-out), background var(--cc-dur-fast) var(--cc-ease-out); }
.xp-switch a:hover { color: var(--cc-web-text-strong); }
.xp-switch a.is-on { color: var(--cc-web-text-strong); background: rgba(91,191,192,.14);
  box-shadow: inset 0 0 0 1px var(--cc-glass-border-hi); }
/* LIGHT MODE — the dark-glass switch is lost on the white pattern bg; give it a
   solid white pill with readable ink, matching the page's light cards. */
[data-theme="light"] .xp-switch { background: var(--aytm-card-bg);
  border-color: var(--aytm-border); box-shadow: var(--shadow-1); }
[data-theme="light"] .xp-switch a { color: var(--aytm-text-muted); }
[data-theme="light"] .xp-switch a:hover { color: var(--aytm-text-strong); }
[data-theme="light"] .xp-switch a.is-on { color: var(--aytm-text-strong);
  background: color-mix(in srgb, var(--cc-aquamarine) 22%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc-aquamarine) 45%, transparent); }

/* ---- the framed scene ----------------------------------------------------- */
.xp-scene { position: relative; isolation: isolate; overflow: hidden;
  height: clamp(540px, 72vh, 720px); margin-top: 20px;
  border-radius: var(--radius-xl, 20px); border: 1px solid var(--cc-glass-border-soft);
  background: var(--cc-scene-bg); box-shadow: var(--cc-glass-shadow);
  font-family: var(--font-sans); color: var(--cc-web-text); }
/* contain the otherwise-fixed scene backdrop inside the frame */
.xp-scene .cc-scene-bg { position: absolute; z-index: 0; }
.xp-scene .cc-starfield { position: absolute; inset: 0; z-index: 0; }
.xp-cap { margin-top: 16px; font-size: 13px; color: var(--aytm-text-muted); text-align: center; }

/* =================== SHARED top bar (constellation + voro) ================= */
.xp-scene .topbar { position: absolute; top: 22px; left: 26px; right: 26px; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; }
.xp-scene .title { font-family: var(--cc-font-h1); font-weight: 700; font-size: 19px; color: #fff; letter-spacing: .01em; }
.xp-scene .title small { display: block; font-family: var(--font-ui); font-weight: 600; font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--cc-aquamarine); margin-top: 4px; }

/* ============================ CONSTELLATION (who) ========================== */
.xp-scene--con .stage { position: absolute; inset: 0; }
.xp-scene--con .axes { position: absolute; inset: 0; width: 100%; height: 100%; }
.xp-scene--con .origin { position: absolute; left: 50%; top: 52%; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; transform: translate(-50%,-50%); z-index: 5;
  box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 0 16px 2px rgba(91,191,192,.7); }
.xp-scene--con .node { position: absolute; transform: translate(-50%,-50%); z-index: 4; }
.xp-scene--con .node:hover { transform: translate(-50%,-50%) scale(1.05); }
.xp-scene--con .cc-axis-label { position: absolute; transform: translate(-50%,-50%); z-index: 6; }
.xp-scene--con .dims { display: flex; gap: 8px; align-items: center; }
.xp-scene--con .cc-legend { position: absolute; left: 24px; bottom: 24px; z-index: 10;
  display: flex; flex-direction: column; gap: 8px; }
.xp-scene--con .cc-legend__title { font-family: var(--font-ui); font-weight: 700; font-size: 9px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--cc-web-text-muted); margin-bottom: 2px; }
.xp-scene--con .cc-reset-pill { position: absolute; right: 24px; bottom: 24px; z-index: 10; }
.xp-scene--con .cc-hover-card { position: absolute; z-index: 15; width: 188px; }

/* ============================ VORONOI (what) =============================== */
/* Top scrim removed per review (Lev/Paul): the dark top gradient "ate the frost"
   nebula — the scene now runs cleanly to the top edge. Element kept for DOM
   stability but with no visual effect. */
.xp-scene--voro .topscrim { position: absolute; top: 0; left: 0; right: 0; height: 92px; z-index: 5; pointer-events: none;
  background: none; }

/* Resonance / counterbalance scene background: navy field instead of charcoal,
   per Paul ("it's a charcoal field, I'd like a navy blue"). Scoped to the
   resonance scene only (the shared --cc-scene-bg token keeps the constellation
   and Voronoi scenes on the original deep charcoal). #223D64 = existing brand
   Aegean token (no new palette color introduced). */
.xp-scene--rm { --cc-scene-bg: #223D64; }
.xp-scene--voro .topbar { justify-content: flex-start; }
.xp-scene--voro #xpVoro { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.xp-scene--voro .cell { stroke: rgba(255,255,255,.22); stroke-width: 1; cursor: pointer;
  transition: filter .18s ease, stroke .18s ease; }
.xp-scene--voro .cell:hover { filter: brightness(1.12) saturate(1.18); stroke: rgba(255,255,255,.7); stroke-width: 1.5; }
.xp-scene--voro .clabel { font-family: var(--font-ui); font-weight: 600; font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; fill: rgba(255,255,255,.97); text-anchor: middle; pointer-events: none;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.5)) drop-shadow(0 0 4px rgba(0,0,0,.3)); }
.xp-scene--voro .clabel.lg { font-size: 11px; letter-spacing: .12em; }
.xp-scene--voro .clabel.sm { font-size: 7.5px; letter-spacing: .06em; }
.xp-scene--voro .cc-legend { position: absolute; left: 24px; top: 80px; z-index: 10;
  display: flex; flex-direction: column; gap: 7px; }
.xp-scene--voro .cc-legend__title { font-family: var(--font-ui); font-weight: 700; font-size: 9px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--cc-web-text-muted); margin-bottom: 2px; }
.xp-scene--voro .scrubber { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 10;
  display: flex; align-items: center; gap: 6px; width: min(64%, 640px);
  background: var(--cc-glass-nav); -webkit-backdrop-filter: var(--cc-blur-md); backdrop-filter: var(--cc-blur-md);
  border: 1px solid var(--cc-glass-border-soft); border-radius: 9999px; padding: 7px 10px; box-shadow: var(--cc-glass-shadow); }
.xp-scene--voro .scrub-play { width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex;
  align-items: center; justify-content: center; background: var(--cc-coral); color: #fff; font-size: 11px; border: 0; cursor: pointer; }
.xp-scene--voro .scrub-q { flex: 1; text-align: center; font-family: var(--font-ui); font-weight: 600; font-size: 11px;
  letter-spacing: .04em; color: var(--cc-web-text-muted); padding: 5px 0; border-radius: 9999px; cursor: pointer; white-space: nowrap; }
.xp-scene--voro .scrub-q.is-on { color: #fff; background: rgba(91,191,192,.14); }
.xp-scene--voro .scrub-q:hover { color: var(--cc-web-text-strong); }

/* ============================ RESONANCE (tension) ========================== */
.xp-scene--rm .rm-header { position: absolute; top: 22px; left: 26px; z-index: 12; max-width: 440px; }
.xp-scene--rm .rm-header h1 { font-family: var(--font-display); font-weight: 500; font-size: 22px;
  color: var(--cc-web-text-strong); margin: 0 0 5px; }
.xp-scene--rm .rm-header .sub { font-size: 12px; color: var(--cc-web-text-muted); }
.xp-scene--rm .rm-tags { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.xp-scene--rm .rm-tag { font-family: var(--font-ui); font-weight: 600; font-size: 10px; letter-spacing: .04em;
  border-radius: 9999px; padding: 4px 11px; border: 1px solid currentColor; cursor: pointer; }
.xp-scene--rm .rm-stage { position: absolute; inset: 0; right: 300px; z-index: 2; }
.xp-scene--rm .rm-edges { position: absolute; inset: 0; width: 100%; height: 100%; }
.xp-scene--rm .center-avatar { position: absolute; width: 130px; height: 130px; border-radius: 50%;
  transform: translate(-50%,-50%); display: flex; align-items: center; justify-content: center;
  font-family: var(--cc-font-h1); font-weight: 700; font-size: 30px; color: #fff;
  background: radial-gradient(circle at 36% 28%, rgba(255,255,255,.28), rgba(255,255,255,0) 52%), linear-gradient(135deg,#21406A,#0C1626);
  border: 3px solid rgba(255,255,255,.2); z-index: 4;
  box-shadow: 0 0 0 8px rgba(255,255,255,.04), 0 14px 36px rgba(4,10,18,.55), 0 0 64px rgba(91,191,192,.22), inset 0 2px 4px rgba(255,255,255,.18); }
.xp-scene--rm .node { position: absolute; transform: translate(-50%,-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.xp-scene--rm .node-avatar { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-family: var(--font-ui); font-weight: 700; font-size: 14px; color: #fff;
  background: radial-gradient(circle at 36% 28%, rgba(255,255,255,.3), rgba(255,255,255,0) 55%), linear-gradient(135deg,#21406A,#0C1626);
  border: 2px solid; transition: transform .15s; }
.xp-scene--rm .node-avatar.ring-green { border-color: var(--cc-res-agree);   box-shadow: 0 6px 16px rgba(4,10,18,.5), 0 0 0 3px rgba(79,194,160,.28),  0 0 22px var(--cc-res-agree-glow),   inset 0 2px 3px rgba(255,255,255,.2); }
.xp-scene--rm .node-avatar.ring-amber { border-color: var(--cc-res-sharpen); box-shadow: 0 6px 16px rgba(4,10,18,.5), 0 0 0 3px rgba(240,163,91,.28),  0 0 22px var(--cc-res-sharpen-glow), inset 0 2px 3px rgba(255,255,255,.2); }
.xp-scene--rm .node-avatar.ring-red   { border-color: var(--cc-res-tension); box-shadow: 0 6px 16px rgba(4,10,18,.5), 0 0 0 3px rgba(240,97,122,.28),  0 0 22px var(--cc-res-tension-glow), inset 0 2px 3px rgba(255,255,255,.2); }
.xp-scene--rm .node-label { font-size: 10.5px; color: var(--cc-web-text); opacity: 0; transition: opacity .15s;
  white-space: nowrap; background: rgba(11,19,31,.7); padding: 2px 7px; border-radius: 5px; }
.xp-scene--rm .node:hover .node-label { opacity: 1; }
.xp-scene--rm .node:hover .node-avatar { transform: scale(1.06); }
.xp-scene--rm .rm-legend { position: absolute; bottom: 20px; left: 26px; z-index: 12; display: flex; gap: 18px;
  align-items: center; background: var(--cc-glass-nav); -webkit-backdrop-filter: var(--cc-blur-md); backdrop-filter: var(--cc-blur-md);
  border: 1px solid var(--cc-glass-border-soft); border-radius: 9999px; padding: 9px 18px; box-shadow: var(--cc-glass-shadow); }
.xp-scene--rm .rm-legend .li { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--cc-web-text); }
.xp-scene--rm .rm-legend .ln { width: 22px; height: 0; border-top: 2px solid; }
.xp-scene--rm .rm-panel { position: absolute; top: 0; right: 0; width: 300px; height: 100%; z-index: 11;
  background: var(--cc-glass-panel); -webkit-backdrop-filter: var(--cc-blur-lg); backdrop-filter: var(--cc-blur-lg);
  border-left: 1px solid var(--cc-glass-border-soft); box-shadow: -8px 0 40px rgba(4,10,18,.5); padding: 24px 22px; overflow: hidden; }
.xp-scene--rm .rm-panel h2 { font-family: var(--font-ui); font-weight: 700; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cc-web-text-muted); margin: 0 0 14px; }
.xp-scene--rm .rm-grouplabel { display: flex; align-items: center; gap: 7px; font-family: var(--font-ui);
  font-weight: 700; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin: 16px 0 8px; }
.xp-scene--rm .rm-grouplabel .d { width: 8px; height: 8px; border-radius: 50%; }
.xp-scene--rm .rm-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.xp-scene--rm .rm-row .av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: flex;
  align-items: center; justify-content: center; font-family: var(--font-ui); font-weight: 700; font-size: 11px;
  color: #fff; background: linear-gradient(135deg,#1B3350,#0E1A2E); border: 1.5px solid; }
.xp-scene--rm .rm-row .nm { font-size: 12.5px; color: var(--cc-web-text-strong); }
.xp-scene--rm .rm-row .rl { font-size: 10.5px; color: var(--cc-web-text-muted); }

/* ---- mini live preview inside the landing tiles --------------------------- */
.xp-mini { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* fade the mini graphic into the card body instead of a hard cut
   (bottom edge for stacked tiles; right edge for the feature tile) */
.xp-mini::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(to bottom, transparent 48%, var(--aytm-card-bg) 100%); }
.xp-tile--feature .xp-mini::after { background: linear-gradient(to right, transparent 42%, var(--aytm-card-bg) 100%); }
.xp-scene--mini { position: absolute; margin: 0; border: none;
  border-radius: 0; box-shadow: none; }
.xp-scene--mini .topbar, .xp-scene--mini .cc-legend, .xp-scene--mini .cc-reset-pill,
.xp-scene--mini .cc-axis-label, .xp-scene--mini .cc-dim-badge, .xp-scene--mini .cc-hover-card,
.xp-scene--mini .rm-header, .xp-scene--mini .rm-panel, .xp-scene--mini .rm-legend,
.xp-scene--mini .scrubber, .xp-scene--mini .topscrim { display: none !important; }
.xp-scene--mini.xp-scene--rm .rm-stage { right: 0; }

/* Narrow frames: drop the resonance side panel + give scenes a touch less height */
@media (max-width: 720px) {
  .xp-scene { height: clamp(460px, 64vh, 560px); }
  .xp-scene--rm .rm-stage { right: 0; }
  .xp-scene--rm .rm-panel { display: none; }
}

/* =============================================================================
   Full-bleed embed — the three reskinned experience apps as edge-to-edge iframes.
   pageExperienceScene() returns a bare .xp-embed (no .page gutters, no card, no
   footer). The iframe breaks out of the centered max-width <main id="view"> and
   fills the viewport under the sticky .site-header (--header-h: 76px, z-index 60).
   ========================================================================== */
.xp-embed {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  /* Pull up under the floating (transparent) header and fill the full viewport so
     the blue scene background reaches the very top — no seigaiha strip shows above
     it. The iframe stays positioned below the header so the scene's own top UI
     (search pill, tabs) doesn't slide under the nav. */
  margin-top: calc(-1 * var(--header-h, 76px));
  height: 100vh;
  /* Match the scene's own ground (scene-backdrop.css --cc-scene-bg #0A1322 under
     its darkening veil) so the strip above the iframe is seamless with the scene
     — not the lighter #0E1A2E, which showed as a hard line at the iframe's top. */
  background: #0A1322;
}
.xp-embed__frame {
  display: block;
  position: absolute;
  top: var(--header-h, 76px);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-h, 76px));
  border: 0;
  background: #0A1322;
}
/* On the full-bleed experience scenes the nav floats over a dark scene and has
   its own pill background, so the header's charcoal scrim isn't needed — and its
   gradient ends at the header bottom, which otherwise reads as a seam above the
   scene. Drop it (body.route-experience set by the router) so the top strip is
   one flat block of the scene navy. */
body.route-experience .site-header::before { content: none; }
.xp-embed__switch {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: calc(var(--header-h, 76px) + 14px);   /* top-center on every scene (consistent) */
  z-index: 5;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 9999px;
  background: rgba(10,19,34,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(120,160,210,.18);
}
.xp-embed__switch a {
  font-family: var(--font-ui, 'Roundserrat');
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .04em;
  color: rgba(255,255,255,.6);
  padding: 7px 14px;
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  transition: color .15s ease, background .15s ease;
}
.xp-embed__switch a:hover { color: rgba(255,255,255,.92); }
.xp-embed__switch a.is-on { color: #fff; background: rgba(91,191,192,.16); }

/* Switcher is top-center on all three scenes. The constellation's search pill
   was moved to the bottom (constellation.html .search-mount) to free the top. */
