/* ====================================================================
   Studio or Staff? — visual design system
   Dreamy pastel palette, glassmorphism, soft gradients.
   Tabbed information architecture, responsive figures and tables.
   ==================================================================== */

:root {
  --sky-lavender:  #ede9fe;
  --sky-pink:      #fce7f3;
  --sky-blue:      #dbeafe;
  --sky-cream:     #fef3c7;
  --sky-mist:      #f5f3ff;
  --sky-deep:      #c4b5fd;

  --ink:           #1e1b4b;
  --ink-soft:      #312e81;
  --ink-body:      #3b3563;
  --muted:         #6b6291;
  --muted-soft:    #9b94b8;

  --rose:          #ec4899;
  --rose-deep:     #be185d;
  --rose-soft:     #fbcfe8;
  --lavender:      #a78bfa;
  --lavender-deep: #7c3aed;
  --sky:           #60a5fa;
  --mint:          #6ee7b7;
  --amber:         #f59e0b;

  --pos:           #059669;
  --pos-tint:      rgba(110, 231, 183, 0.22);
  --neg:           #db2777;
  --neg-tint:      rgba(251, 207, 232, 0.55);
  --null:          var(--muted-soft);

  --glass:         rgba(255, 255, 255, 0.55);
  --glass-strong:  rgba(255, 255, 255, 0.78);
  --glass-deep:    rgba(255, 255, 255, 0.88);
  --glass-border:  rgba(255, 255, 255, 0.65);
  --glass-rule:    rgba(167, 139, 250, 0.22);

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;
  --s-4: 16px; --s-5: 22px; --s-6: 32px;
  --s-7: 48px; --s-8: 72px;

  --r-1: 10px; --r-2: 18px; --r-3: 28px; --r-4: 36px;

  --shadow-xs: 0 2px 6px rgba(124, 58, 237, 0.06);
  --shadow-sm: 0 8px 24px rgba(124, 58, 237, 0.08);
  --shadow-md: 0 18px 50px rgba(124, 58, 237, 0.14);
  --shadow-lg: 0 30px 80px rgba(124, 58, 237, 0.20);

  --display: "DM Serif Display", "Cormorant Garamond", Georgia, serif;
  --serif:   "Cormorant Garamond", Georgia, serif;
  --script:  "Caveat", "Cormorant Garamond", cursive;
  --sans:    "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  --mono:    "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --jp:      "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;

  --max-w: 1180px;
  --max-w-prose: 78ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink-body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  background-color: var(--sky-mist);
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 5%, rgba(252, 207, 232, 0.55), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 15%, rgba(199, 210, 254, 0.55), transparent 60%),
    radial-gradient(ellipse 90% 55% at 50% 55%, rgba(221, 214, 254, 0.40), transparent 65%),
    radial-gradient(ellipse 70% 50% at 10% 85%, rgba(251, 207, 232, 0.40), transparent 65%),
    radial-gradient(ellipse 60% 45% at 90% 95%, rgba(186, 230, 253, 0.45), transparent 70%),
    linear-gradient(180deg, #fdf4ff 0%, #f5f3ff 35%, #ede9fe 65%, #e0e7ff 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.42  0 0 0 0 0.30  0 0 0 0 0.62  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: multiply;
}

/* ====================================================================
   Ambient
   ==================================================================== */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: drift 24s ease-in-out infinite alternate;
}

.cloud-1 { top: -120px; left: -100px; width: 540px; height: 420px;
  background: radial-gradient(circle, rgba(252, 207, 232, 0.85), rgba(252, 207, 232, 0)); }
.cloud-2 { top: 35%; right: -180px; width: 620px; height: 480px;
  background: radial-gradient(circle, rgba(196, 181, 253, 0.70), rgba(196, 181, 253, 0));
  animation-delay: -6s; animation-duration: 32s; }
.cloud-3 { bottom: -180px; left: 30%; width: 720px; height: 480px;
  background: radial-gradient(circle, rgba(186, 230, 253, 0.65), rgba(186, 230, 253, 0));
  animation-delay: -12s; animation-duration: 40s; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.06); }
  100% { transform: translate(-30px, 25px) scale(0.98); }
}

.sparkle {
  position: absolute;
  fill: #fff;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9))
          drop-shadow(0 0 16px rgba(196, 181, 253, 0.6));
  animation: twinkle 4s ease-in-out infinite;
}

.sparkle-1 { top: 12%;  left: 8%;   width: 22px; height: 22px; animation-delay: 0s; }
.sparkle-2 { top: 24%;  right: 14%; width: 16px; height: 16px; animation-delay: -1s; }
.sparkle-3 { top: 58%;  left: 6%;   width: 18px; height: 18px; animation-delay: -2s; }
.sparkle-4 { top: 78%;  right: 9%;  width: 24px; height: 24px; animation-delay: -3s; }
.sparkle-5 { top: 92%;  left: 48%;  width: 14px; height: 14px; animation-delay: -1.5s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85) rotate(0deg); }
  50%      { opacity: 1;    transform: scale(1.1)  rotate(45deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cloud, .sparkle { animation: none; }
}

/* ====================================================================
   Top bar
   ==================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(253, 244, 255, 0.78);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--glass-rule);
}

.topbar-inner {
  width: min(var(--max-w), calc(100% - 32px));
  margin: 0 auto;
  padding: 9px 0;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 0.78rem;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--r-1);
  transition: background-color 180ms ease, padding 180ms ease;
  min-height: 38px;
}

.topbar-inner:hover {
  background: rgba(252, 207, 232, 0.18);
}

.topbar-inner:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 2px;
}

.mark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--rose-deep), var(--lavender-deep));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.topbar-jp {
  font-family: var(--jp);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--lavender-deep);
  border-left: 1px solid var(--glass-rule);
  padding-left: var(--s-3);
  flex-shrink: 0;
}

.topbar-title {
  color: var(--muted);
  font-weight: 500;
  font-style: italic;
  font-family: var(--serif);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.topbar-credit {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 600;
  flex-shrink: 0;
}


/* ====================================================================
   Hero
   ==================================================================== */

.hero {
  position: relative;
  z-index: 5;
  width: min(var(--max-w), calc(100% - 32px));
  margin: var(--s-7) auto var(--s-6);
}

.hero-inner {
  padding: var(--s-7) var(--s-6);
  border-radius: var(--r-3);
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-inner::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60%;
  height: 180%;
  background: radial-gradient(ellipse, rgba(252, 207, 232, 0.55), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}

.hero-inner::after {
  content: "✦";
  position: absolute;
  top: var(--s-5);
  right: var(--s-6);
  font-size: 1.4rem;
  color: var(--rose);
  opacity: 0.5;
  text-shadow: 0 0 12px rgba(236, 72, 153, 0.5);
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.005em;
}

h1 {
  font-size: clamp(2.8rem, 6.4vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: 0;
  max-width: 18ch;
  margin: var(--s-4) 0 var(--s-5);
}

.h1-line {
  display: block;
  font-family: var(--script);
  font-weight: 600;
  background: linear-gradient(135deg, var(--rose) 0%, var(--lavender-deep) 60%, var(--sky) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0;
  line-height: 1.04;
}

.h1-line-script {
  /* second line: a touch larger, slight nudge so the two lines flow */
  font-size: 1.04em;
  padding-left: 0.18em;
  margin-top: -0.05em;
}

h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  line-height: 1.18;
  font-weight: 400;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.3;
}

h4 {
  font-size: 1.05rem;
  font-family: var(--display);
  color: var(--ink);
  letter-spacing: -0.005em;
  font-weight: 400;
}

p { margin: 0; }

.eyebrow {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
}

.kicker {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lavender-deep);
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
}

.kicker [lang="ja"] {
  font-family: var(--jp);
  letter-spacing: 0.16em;
  font-size: 0.95em;
  text-transform: none;
  color: var(--rose-deep);
}

.hero-dek {
  max-width: 64ch;
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--ink-body);
  font-family: var(--serif);
  position: relative;
}

.hero-dek strong {
  background: linear-gradient(135deg, transparent 50%, rgba(252, 207, 232, 0.55) 50%);
  background-position: 0 0.85em;
  background-size: 100% 0.4em;
  background-repeat: no-repeat;
  padding: 0 2px;
  color: var(--ink);
  font-weight: 600;
}

.hero-dek em {
  font-family: var(--script);
  font-style: normal;
  font-weight: 600;
  font-size: 1.15em;
  color: var(--lavender-deep);
}

.hero-byline {
  margin: var(--s-5) 0 0;
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ink-soft);
}

.hero-byline strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-actions {
  margin: var(--s-5) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: linear-gradient(135deg, var(--rose), var(--lavender-deep));
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 8px 22px rgba(236, 72, 153, 0.30);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms;
}

.cta-pill::after {
  content: "↗";
  font-weight: 600;
  transition: transform 200ms ease;
}

.cta-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.40);
}

.cta-pill:hover::after { transform: translate(2px, -2px); }

.cta-pill-ghost {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  border-color: var(--glass-border);
  box-shadow: var(--shadow-xs);
}

.cta-pill-ghost::after { color: var(--rose); }

.cta-pill-ghost:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.report-actions {
  margin-top: var(--s-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.card-report {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(252, 207, 232, 0.45), transparent 60%),
    var(--glass-deep);
  border: 1px solid var(--glass-border);
}

.hero-facts {
  margin: var(--s-6) 0 0;
  padding: var(--s-5);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-4);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-2);
  position: relative;
}

.hero-facts > div {
  padding-right: var(--s-4);
  border-right: 1px dashed var(--glass-rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-facts > div:last-child { border-right: none; }

.hero-facts dt {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--sans);
}

.hero-facts dd {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  color: var(--lavender-deep);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ====================================================================
   Tab navigation
   ==================================================================== */

.tabs {
  position: sticky;
  top: 50px;
  z-index: 20;
  width: min(var(--max-w), calc(100% - 32px));
  margin: 0 auto var(--s-6);
}

.tabs-inner {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-inner::-webkit-scrollbar { display: none; }

.tab {
  flex: 1 1 auto;
  min-width: max-content;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 999px;
  transition: all 220ms cubic-bezier(.2,.8,.2,1);
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
  background: rgba(196, 181, 253, 0.18);
}

.tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--lavender-deep));
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.35);
}

.tab-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.6;
  letter-spacing: 0.05em;
}

.tab.is-active .tab-num { opacity: 0.85; }

.tab-label { letter-spacing: 0.01em; }

/* ====================================================================
   Page container & tab panels
   ==================================================================== */

.page {
  position: relative;
  z-index: 5;
  width: min(var(--max-w), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 var(--s-8);
  display: block;
}

.tab-panel {
  display: none;
  animation: fadeIn 320ms cubic-bezier(.2,.8,.2,1);
}

.tab-panel.is-active {
  display: grid;
  gap: var(--s-6);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .tab-panel { animation: none; }
}

/* ====================================================================
   Cards (shared building block)
   ==================================================================== */

.card {
  padding: var(--s-6);
  border-radius: var(--r-3);
  background: var(--glass-strong);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: var(--s-3);
}

.card h2 {
  margin-top: var(--s-1);
}

.card .eyebrow + h2,
.card .eyebrow + h3 {
  margin-top: 4px;
}

.lead {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--ink-body);
  max-width: var(--max-w-prose);
}

.lead em {
  font-family: var(--script);
  font-style: normal;
  font-weight: 600;
  font-size: 1.12em;
  color: var(--lavender-deep);
}

.card-feature {
  background:
    radial-gradient(ellipse at 90% 0%, rgba(252, 207, 232, 0.55), transparent 60%),
    var(--glass-deep);
}

.card-answer {
  background:
    radial-gradient(ellipse at 0% 100%, rgba(196, 181, 253, 0.30), transparent 60%),
    var(--glass-strong);
}

.answer-list {
  margin: var(--s-2) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s-4);
}

.answer-list li {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-2);
  background: rgba(255, 255, 255, 0.55);
  border-left: 4px solid var(--lavender);
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink-body);
  display: grid;
  gap: 6px;
}

.answer-list li strong { color: var(--ink); font-weight: 600; }

.answer-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  width: max-content;
}

.answer-tag-studio {
  color: var(--rose-deep);
  background: rgba(252, 207, 232, 0.55);
  border: 1px solid rgba(236, 72, 153, 0.25);
}

.answer-tag-staff {
  color: var(--lavender-deep);
  background: rgba(196, 181, 253, 0.40);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.answer-tag-twist {
  color: #b45309;
  background: rgba(254, 215, 170, 0.55);
  border: 1px solid rgba(245, 158, 11, 0.30);
}

.answer-list li:has(.answer-tag-studio) { border-left-color: var(--rose); }
.answer-list li:has(.answer-tag-staff)  { border-left-color: var(--lavender-deep); }
.answer-list li:has(.answer-tag-twist)  { border-left-color: var(--amber); }

.card-tldr {
  background: linear-gradient(135deg, rgba(252, 207, 232, 0.45), rgba(196, 181, 253, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.7);
  text-align: center;
  align-items: center;
  padding: var(--s-7) var(--s-6);
}

.tldr {
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  color: var(--ink);
  line-height: 1.35;
  max-width: 50ch;
  margin: 0 auto;
}

.next-hint {
  text-align: center;
  font-family: var(--script);
  font-size: 1.2rem;
  color: var(--lavender-deep);
  margin: 0;
}

/* ====================================================================
   Panel headers (for findings, method, visuals, takeaways tabs)
   ==================================================================== */

.panel-head {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-1) var(--s-3);
}

.panel-head h2 { color: var(--ink); }

.panel-lead {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink-body);
  max-width: var(--max-w-prose);
}

/* ====================================================================
   Findings grid
   ==================================================================== */

.findings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--s-5);
  align-items: start;
}

.finding {
  position: relative;
  padding: var(--s-6) var(--s-5) var(--s-5);
  border-radius: var(--r-2);
  background: var(--glass-deep);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xs);
  display: grid;
  gap: var(--s-3);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms;
}

.finding:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.finding-num {
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--rose), var(--lavender-deep));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.finding h3 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.005em;
  padding-right: 32px;
}

.finding h3 em {
  font-family: var(--script);
  font-style: normal;
  font-weight: 600;
  color: var(--rose-deep);
}

.finding p {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-body);
}

.finding strong { color: var(--ink); font-weight: 600; }

.finding-twist {
  background: linear-gradient(135deg, rgba(254, 215, 170, 0.30), var(--glass-deep));
  border-color: rgba(245, 158, 11, 0.30);
}

.finding-twist .finding-num {
  background: linear-gradient(135deg, var(--amber), var(--rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

details {
  margin-top: var(--s-2);
  border-top: 1px dashed var(--glass-rule);
  padding-top: var(--s-3);
  min-width: 0;
}

details summary {
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--lavender-deep);
  list-style: none;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 6px;
  user-select: none;
}

details summary::-webkit-details-marker { display: none; }

details summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--lavender-deep));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}

details[open] summary::before {
  transform: rotate(45deg);
}

details summary:hover { color: var(--rose-deep); }

details > *:not(summary) {
  margin-top: var(--s-3);
}

details p,
details ul {
  font-family: var(--serif);
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

details p + p,
details p + ul {
  margin-top: var(--s-2);
}

.kv {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.kv li {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--ink-soft);
  padding: 6px 10px;
  border-radius: var(--r-1);
  background: rgba(196, 181, 253, 0.12);
  border: 1px solid var(--glass-rule);
  font-variant-numeric: tabular-nums;
}

/* ====================================================================
   Method grid
   ==================================================================== */

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--s-5);
  align-items: start;
}

.method-card {
  padding: var(--s-6) var(--s-5);
  border-radius: var(--r-2);
  background: var(--glass-deep);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xs);
  display: grid;
  gap: var(--s-3);
  min-width: 0;
}

.method-card h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.method-card p {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-body);
}

.method-card strong { color: var(--ink); font-weight: 600; }

.method-card code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--ink-soft);
}

.formula-box {
  margin-top: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-1);
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.88), rgba(252, 231, 243, 0.72));
  border: 1px solid var(--glass-rule);
  display: grid;
  gap: var(--s-2);
  max-width: 100%;
  min-width: 0;
}

.formula-box code {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.7;
  white-space: normal;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.frac {
  display: inline-grid;
  grid-template-rows: 1fr 1fr;
  min-width: 1.35em;
  transform: translateY(0.38em);
  text-align: center;
  line-height: 1;
  margin: 0 0.12em;
}

.frac span:first-child {
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.08em;
}

.frac span:last-child {
  padding-top: 0.08em;
}

.formula-note {
  max-width: 58ch;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.76rem;
  line-height: 1.45;
}

/* ====================================================================
   Stats strip (visuals tab)
   ==================================================================== */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-3);
  background: linear-gradient(135deg, rgba(252, 207, 232, 0.40), rgba(196, 181, 253, 0.30));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.stats-strip > div {
  padding-right: var(--s-4);
  border-right: 1px dashed var(--glass-rule);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-strip > div:last-child { border-right: none; }

.stats-strip dt {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.stats-strip dd {
  margin: 0;
  font-family: var(--display);
  color: var(--ink);
  line-height: 1;
}

.stats-strip .stat-pct {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--rose-deep), var(--lavender-deep));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats-strip .stat-suffix {
  font-family: var(--script);
  font-size: 1.1rem;
  color: var(--rose-deep);
  margin-left: 4px;
}

.stats-strip .stat-sub {
  font-family: var(--serif);
  font-size: 0.86rem;
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 900px) {
  .stats-strip {
    grid-template-columns: 1fr 1fr;
  }
  .stats-strip > div:nth-child(2n) { border-right: none; }
  .stats-strip > div:nth-child(n+3) {
    border-top: 1px dashed var(--glass-rule);
    padding-top: var(--s-3);
  }
}

@media (max-width: 520px) {
  .stats-strip { grid-template-columns: 1fr; }
  .stats-strip > div { border-right: none; }
  .stats-strip > div:not(:first-child) {
    border-top: 1px dashed var(--glass-rule);
    padding-top: var(--s-3);
  }
}

/* ====================================================================
   Visual groups
   ==================================================================== */

.visual-group {
  display: grid;
  gap: var(--s-5);
  padding: var(--s-6);
  border-radius: var(--r-3);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xs);
}

.visual-group-title {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
  border-bottom: 1px dashed var(--glass-rule);
  padding-bottom: var(--s-3);
}

.visual-group-lead {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-body);
  max-width: var(--max-w-prose);
  margin: calc(-1 * var(--s-2)) 0 0;
}

/* ====================================================================
   Figure blocks
   ==================================================================== */

.figure-block {
  display: grid;
  gap: var(--s-3);
}

.figure-meta { display: grid; gap: 6px; max-width: 80ch; }

.figure-meta h4 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.figure-cap {
  color: var(--ink-body);
  font-size: 0.98rem;
  line-height: 1.55;
  font-family: var(--serif);
}

.figure-cap strong { color: var(--ink); font-weight: 600; }
.figure-cap em { font-style: italic; color: var(--ink-soft); }

.figure-frame {
  display: block;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-2);
  padding: var(--s-4);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: all 220ms cubic-bezier(.2,.8,.2,1);
  position: relative;
  box-shadow: var(--shadow-xs);
}

a.figure-frame { cursor: zoom-in; }

a.figure-frame::after {
  content: "click to expand ↗";
  position: absolute;
  bottom: var(--s-3);
  right: var(--s-3);
  background: rgba(30, 27, 75, 0.85);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(4px);
  transition: all 180ms ease;
  pointer-events: none;
  z-index: 2;
}

a.figure-frame:hover {
  border-color: var(--rose);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

a.figure-frame:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.figure-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--r-1);
  background: #fff;
}

/* ====================================================================
   Data table (shared similarity table)
   ==================================================================== */

.data-table {
  overflow-x: auto;
  font-variant-numeric: tabular-nums;
  border-radius: var(--r-2);
  background: var(--glass-deep);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xs);
  padding: var(--s-2);
  -webkit-overflow-scrolling: touch;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  min-width: 540px;
}

.data-table thead th {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lavender-deep);
  text-align: right;
  padding: 12px 14px;
  border-bottom: 1.5px solid rgba(167, 139, 250, 0.4);
  background: transparent;
  white-space: nowrap;
}

.data-table thead th:first-child { text-align: left; }

.data-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px dashed var(--glass-rule);
  color: var(--ink-body);
  vertical-align: top;
}

.data-table td:first-child { text-align: left; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(252, 207, 232, 0.18); }

.data-table tbody tr.primary-row {
  background: linear-gradient(90deg, rgba(252, 207, 232, 0.55), rgba(196, 181, 253, 0.35));
}

.data-table tbody tr.primary-row td:first-child {
  box-shadow: inset 4px 0 0 var(--rose);
}

.data-table td:first-child strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.04rem;
  color: var(--ink);
}

.data-table td.sig {
  color: var(--pos);
  font-weight: 600;
  background: var(--pos-tint);
  border-radius: 4px;
}

.outcome-note {
  display: block;
  margin-top: 3px;
  font-size: 0.74rem;
  color: var(--muted);
  font-family: var(--sans);
  letter-spacing: 0.01em;
  font-weight: 400;
}

/* ====================================================================
   Takeaways
   ==================================================================== */

.takeaway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-5);
  align-items: start;
}

.takeaway-section {
  display: grid;
  gap: var(--s-4);
}

.group-label {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.group-pip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.group-label-positive { color: var(--pos); }
.group-label-positive .group-pip {
  background: var(--pos);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.18);
}

.group-label-neutral { color: var(--lavender-deep); }
.group-label-neutral .group-pip {
  background: var(--lavender-deep);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18);
}

.group-label-caution { color: #b45309; }
.group-label-caution .group-pip {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.20);
}

.group-label-next { color: var(--rose-deep); }
.group-label-next .group-pip {
  background: var(--rose);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.20);
}

.takeaway-grid .card {
  padding: var(--s-5) var(--s-5);
  gap: var(--s-2);
  background: var(--glass-deep);
}

.card-positive {
  border-left: 4px solid var(--pos);
}

.card-positive .eyebrow { color: var(--pos); }

.card-neutral {
  border-left: 4px solid var(--lavender);
}

.card-neutral .eyebrow { color: var(--lavender-deep); }

.card-caution {
  border-left: 4px solid var(--amber);
}

.card-caution .eyebrow { color: #b45309; }

.card-next {
  border-left: 4px solid var(--rose);
}

.card-next .eyebrow { color: var(--rose-deep); }

.takeaway-grid h3,
.takeaway-grid h4 {
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.3;
  margin: 0;
}

.takeaway-grid p {
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-body);
}

.card-summary {
  background: linear-gradient(135deg, rgba(252, 207, 232, 0.45), rgba(196, 181, 253, 0.35));
  text-align: center;
  align-items: center;
  padding: var(--s-7) var(--s-6);
}

.big-takeaway {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  color: var(--ink);
  max-width: 64ch;
  margin: 0 auto;
}

.big-takeaway strong {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.7) 50%);
  background-position: 0 0.85em;
  background-size: 100% 0.4em;
  background-repeat: no-repeat;
  padding: 0 4px;
}

/* ====================================================================
   Team
   ==================================================================== */

.card-team {
  background: var(--glass-deep);
}

.team-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-4);
}

.team-list li {
  padding: var(--s-4);
  border-radius: var(--r-2);
  background: linear-gradient(135deg, rgba(252, 207, 232, 0.30), rgba(196, 181, 253, 0.20));
  border: 1px solid var(--glass-border);
  display: grid;
  gap: 4px;
}

.team-list strong {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.team-list span {
  display: block;
  font-family: var(--serif);
  line-height: 1.4;
}

.team-list .team-affil {
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.team-list .team-major {
  font-size: 0.86rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 2px;
}

.card-context p {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-body);
}

.card-context strong { color: var(--ink); font-weight: 600; }

.source-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s-3);
}

.source-list li {
  padding: var(--s-4);
  border-radius: var(--r-1);
  background: rgba(255, 255, 255, 0.55);
  border-left: 3px solid var(--lavender);
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--ink-body);
}

.source-list strong { color: var(--ink); font-weight: 600; }

/* ====================================================================
   Live (interactive) figures — controls, canvas, tooltips
   ==================================================================== */

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--lavender-deep));
  vertical-align: middle;
  position: relative;
  top: -2px;
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.30);
}

.live-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.85);
  animation: live-blip 1.6s ease-in-out infinite;
}

@keyframes live-blip {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: var(--s-2);
}

.control-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.control-select {
  font: inherit;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all 180ms ease;
}

.control-select:hover {
  border-color: var(--rose);
}

.control-select:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 2px;
}

.control-btn {
  font: inherit;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--lavender-deep));
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.25);
  transition: transform 180ms cubic-bezier(.2,.8,.2,1), box-shadow 180ms;
}

.control-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(236, 72, 153, 0.32);
}

.control-btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xs);
}

.control-btn-ghost:hover {
  background: rgba(255, 255, 255, 1);
}

.static-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--lavender-deep);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(196, 181, 253, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.30);
  transition: all 180ms ease;
}

.static-link::after {
  content: "↗";
  font-weight: 700;
  transition: transform 200ms ease;
}

.static-link:hover {
  background: rgba(196, 181, 253, 0.32);
  border-color: var(--lavender);
}

.static-link:hover::after {
  transform: translate(2px, -2px);
}

.live-canvas {
  position: relative;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-2);
  padding: var(--s-4);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.live-canvas svg {
  width: 100%;
  height: auto;
  display: block;
}

.live-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  min-width: 180px;
  max-width: 280px;
  padding: 10px 14px;
  border-radius: var(--r-1);
  background: rgba(30, 27, 75, 0.92);
  color: #f5f3ff;
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(30, 27, 75, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.live-tooltip[hidden] {
  display: none !important;
}

.live-tooltip .tt-title {
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.live-tooltip .tt-row {
  font-variant-numeric: tabular-nums;
  color: rgba(245, 243, 255, 0.85);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.live-tooltip .tt-row strong {
  color: #fff;
  font-weight: 600;
  margin-left: auto;
}

.figure-help {
  margin-top: var(--s-2);
  font-family: var(--serif);
  font-size: 0.86rem;
  color: var(--muted);
  font-style: italic;
}

.figure-help em {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--lavender-deep);
  font-style: normal;
}

/* ---------- Forest plot ---------- */

.forest-plot {
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.forest-plot svg {
  width: 100%;
  height: auto;
  display: block;
}

.forest-grid { stroke: rgba(167, 139, 250, 0.20); stroke-width: 1; stroke-dasharray: 2 4; }
.forest-zero { stroke: var(--rose); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: 0.75; }
.forest-axis { stroke: rgba(67, 56, 202, 0.40); stroke-width: 1; }

.forest-label {
  fill: var(--ink-soft);
  font-size: 12px;
  font-family: var(--mono);
}

.forest-tick {
  fill: var(--muted);
  font-size: 11px;
  font-family: var(--sans);
}

.forest-ci   { stroke: var(--null); stroke-width: 3.5; stroke-linecap: round; opacity: 0.85; }
.forest-cap  { stroke: var(--null); stroke-width: 2;   stroke-linecap: round; }
.forest-ci.sig  { stroke: var(--lavender); }
.forest-cap.sig { stroke: var(--lavender); }

.forest-point { stroke: rgba(255, 255, 255, 0.95); stroke-width: 2.5; }
.forest-point.sig-pos { fill: var(--pos); }
.forest-point.sig-neg { fill: var(--neg); }
.forest-point.nonsig  { fill: var(--null); }

.forest-annot {
  fill: var(--ink-soft);
  font-size: 11px;
  font-family: var(--mono);
}

.forest-hitbox {
  cursor: default;
}

.forest-hitbox:hover ~ .forest-ci { opacity: 1; }

#forest-plot svg g:hover .forest-point {
  filter: drop-shadow(0 0 6px rgba(236, 72, 153, 0.5));
}

/* ---------- Studio network ---------- */

.network-canvas {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(252, 207, 232, 0.28), transparent 60%),
    radial-gradient(ellipse at 75% 80%, rgba(196, 181, 253, 0.28), transparent 60%),
    #fff;
  padding: 0;
}

#studio-network {
  width: 100%;
  min-height: 460px;
  display: block;
  cursor: grab;
  touch-action: none;
}

#studio-network:active { cursor: grabbing; }

.graph-edge { stroke: rgba(124, 58, 237, 0.25); fill: none; }
.graph-edge.focal { stroke: rgba(236, 72, 153, 0.6); stroke-width: 2; }

.graph-node {
  fill: var(--lavender);
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 2.5;
  filter: drop-shadow(0 4px 10px rgba(124, 58, 237, 0.25));
  cursor: pointer;
  transition: fill 180ms ease;
}

.graph-node:hover { fill: var(--lavender-deep); }

.graph-node-focal {
  fill: var(--rose);
  filter: drop-shadow(0 6px 14px rgba(236, 72, 153, 0.4));
}

.graph-label {
  fill: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--sans);
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-linejoin: round;
  stroke-width: 4px;
  pointer-events: none;
}

.graph-caption {
  fill: var(--lavender-deep);
  font-size: 11px;
  font-family: var(--script);
  font-weight: 600;
}

/* ====================================================================
   Lightbox
   ==================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 27, 75, 0.84);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms cubic-bezier(.2,.8,.2,1);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-figure {
  margin: 0;
  display: grid;
  gap: var(--s-3);
  max-width: 96vw;
  max-height: 95vh;
  align-items: center;
  justify-items: center;
}

.lightbox-img {
  display: block;
  max-width: 96vw;
  max-height: calc(95vh - 60px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-2);
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform: scale(0.96);
  transition: transform 280ms cubic-bezier(.2,.8,.2,1);
}

.lightbox.is-open .lightbox-img { transform: scale(1); }

.lightbox-caption {
  font-family: var(--serif);
  font-size: 0.92rem;
  color: rgba(245, 243, 255, 0.80);
  text-align: center;
  max-width: 80ch;
  line-height: 1.5;
  font-style: italic;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  border: 0;
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 180ms cubic-bezier(.2,.8,.2,1);
}

.lightbox-close:hover {
  transform: rotate(90deg) scale(1.05);
  background: #fff;
}

.lightbox-close:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox-img,
  .lightbox-close { transition: none; }
  .live-pill::before { animation: none; }
}

/* ====================================================================
   Colophon
   ==================================================================== */

.colophon {
  margin-top: var(--s-6);
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-2);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
}

.colophon::before {
  content: "✦  ";
  color: var(--rose);
  font-style: normal;
}

.colophon-disclaimer {
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--glass-rule);
  font-size: 0.78rem;
  color: var(--muted-soft);
  font-style: normal;
}

/* ====================================================================
   Empty / status states
   ==================================================================== */

.empty {
  color: var(--muted);
  font-size: 0.94rem;
  font-style: italic;
  margin: 0;
  padding: var(--s-5);
  font-family: var(--serif);
  text-align: center;
}

/* ====================================================================
   Responsive
   ==================================================================== */

@media (max-width: 1020px) {
  .hero-facts { grid-template-columns: 1fr 1fr; gap: var(--s-3); }
  .hero-facts > div:nth-child(2n) { border-right: none; }
  .hero-facts > div:nth-child(n+3) {
    border-top: 1px dashed var(--glass-rule);
    padding-top: var(--s-3);
  }
}

@media (max-width: 720px) {
  .hero { margin-top: var(--s-6); }
  .hero-inner { padding: var(--s-6) var(--s-5); }
  .topbar-inner {
    gap: var(--s-2);
    padding: 7px 0;
    min-height: 34px;
    font-size: 0.74rem;
  }
  .mark { font-size: 0.88rem; }
  .topbar-jp { display: none; }                /* hide kanji on mobile */
  .topbar-title { display: none; }             /* hide title; keep mark + credit */
  .topbar-credit { font-size: 0.6rem; letter-spacing: 0.1em; }
  .tabs { top: 48px; }
  .tab { padding: 8px 14px; font-size: 0.82rem; }
  .tab-num { display: none; }
  .visual-group { padding: var(--s-5); }
  .figure-frame img { max-height: 56vh; }
  .findings-grid,
  .method-grid,
  .takeaway-grid { grid-template-columns: 1fr; }
  .card { padding: var(--s-5); }
  .card-tldr,
  .card-summary { padding: var(--s-6) var(--s-4); }
  .control-row { gap: 8px; }
  .static-link { margin-left: 0; }
  #studio-network { min-height: 380px; }
  .live-canvas { padding: var(--s-3); }
  .lightbox-close { top: 12px; right: 12px; width: 38px; height: 38px; font-size: 1.2rem; }
}


@media (max-width: 480px) {
  .hero-facts { grid-template-columns: 1fr; gap: var(--s-3); }
  .hero-facts > div { border-right: none; }
  .hero-facts > div:not(:first-child) {
    border-top: 1px dashed var(--glass-rule);
    padding-top: var(--s-3);
  }
  .data-table table { font-size: 0.86rem; }
}
