/* ==========================================================================
   Lenses — project page design system
   Shared tokens + components. Widget-specific styles live in their own files.
   ========================================================================== */

@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/Geist-var.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/GeistMono-var.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/InstrumentSerif-Regular.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/InstrumentSerif-Italic.woff2") format("woff2"); }

:root {
  /* surfaces */
  --bg: #0a0b0e;
  --bg-2: #0f1115;
  --panel: #14161c;
  --panel-2: #1a1d25;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  /* text */
  --text: #eeede8;
  --muted: #a3a7b0;
  --dim: #6d727d;
  /* the five lenses — the only chromatic colours on the page */
  --lit: #58b9cf;   /* Literal    */
  --fig: #f4a56f;   /* Figurative */
  --abs: #9a8af5;   /* Abstract   */
  --bkg: #a9d07c;   /* Background */
  --emo: #f2607a;   /* Emotional  */
  --glob: #f2d94e;  /* global embedding / fallback */
  /* type */
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", "Geist", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* shape */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(154, 138, 245, 0.45); }

/* lens colour plumbing: any element with data-lens gets --c */
[data-lens="Literal"]    { --c: var(--lit); }
[data-lens="Figurative"] { --c: var(--fig); }
[data-lens="Abstract"]   { --c: var(--abs); }
[data-lens="Background"] { --c: var(--bkg); }
[data-lens="Emotional"]  { --c: var(--emo); }
[data-lens="Global"]     { --c: var(--glob); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 132px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 820px; margin-bottom: clamp(32px, 5vw, 56px); }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 12px;
}
.eyebrow b { color: var(--text); font-weight: 500; }
.eyebrow::after { content: ""; height: 1px; width: 56px; background: var(--line-2); }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
h2 { font-family: var(--serif); font-size: clamp(38px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -0.012em; }
h2 em { font-style: italic; }
h3 { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); line-height: 1.1; }
h4 { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(17px, 1.6vw, 19.5px); color: var(--muted); max-width: 64ch; }
.lede strong, .prose strong { color: var(--text); font-weight: 500; }
.prose { color: var(--muted); max-width: 66ch; }
.prose + .prose { margin-top: 14px; }
.sub-head { margin: clamp(48px, 7vw, 84px) 0 22px; display: grid; gap: 10px; max-width: 760px; }
.sub-head p { color: var(--muted); }
.mono { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lc { color: var(--c); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 60px;
  display: flex; align-items: center;
  background: rgba(10, 11, 14, 0.72); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 24px; line-height: 1; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a {
  font-size: 13.5px; color: var(--muted); text-decoration: none; padding: 7px 11px; border-radius: 99px; transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.nav-cta { display: flex; gap: 8px; }
@media (max-width: 1020px) { .nav-links { display: none; } .nav-cta { margin-left: auto; } }
@media (max-width: 460px) { .nav-cta .btn:first-child { display: none; } }

/* ---------- buttons, chips, controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  padding: 11px 18px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent;
  font-size: 14.5px; font-weight: 500; text-decoration: none; line-height: 1;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease), color 0.2s;
}
.btn:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.3); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-solid { background: var(--text); color: #0a0b0e; border-color: var(--text); }
.btn-solid:hover { background: #fff; border-color: #fff; }
.btn-sm { padding: 8px 13px; font-size: 13px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 6px 12px 6px 10px; border-radius: 99px; font-size: 13px; font-weight: 500; line-height: 1;
  border: 1px solid color-mix(in srgb, var(--c, #fff) 38%, transparent);
  background: color-mix(in srgb, var(--c, #fff) 11%, transparent);
  color: var(--c, var(--text));
}
.chip svg { width: 15px; height: 15px; flex: none; }
button.chip { transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease); }
button.chip:hover { background: color-mix(in srgb, var(--c, #fff) 20%, transparent); }
button.chip[aria-pressed="false"] { color: var(--muted); border-color: var(--line); background: transparent; }
button.chip[aria-pressed="false"]:hover { color: var(--c, var(--text)); border-color: color-mix(in srgb, var(--c, #fff) 38%, transparent); }
button.chip[aria-pressed="true"], button.chip[aria-selected="true"] { background: var(--c, var(--text)); color: #0a0b0e; border-color: var(--c, var(--text)); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--text)); flex: none; }

/* segmented control */
.seg { display: inline-flex; padding: 3px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg-2); gap: 2px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; padding: 7px 13px; border-radius: 99px; line-height: 1;
  transition: background 0.2s, color 0.2s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: rgba(255, 255, 255, 0.12); color: var(--text); }

/* range slider */
.field { display: grid; gap: 6px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--muted); }
.field-label output, .field-label .val { font-family: var(--mono); color: var(--text); font-size: 13px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer;
  --fill: var(--c, var(--text));
}
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; margin-top: -7px;
  background: var(--fill); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--fill);
}
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--fill); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--fill); }

/* toggle switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; transition: background 0.25s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform 0.25s var(--ease); }
.switch input:checked + .track { background: var(--c, var(--abs)); }
.switch input:checked + .track::after { transform: translateX(16px); background: #0a0b0e; }
.switch input:focus-visible + .track { outline: 2px solid var(--text); outline-offset: 3px; }

/* ---------- panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 2.6vw, 30px); position: relative; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-title h4 { font-size: 14px; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.note { font-size: 13px; color: var(--dim); line-height: 1.5; }
.note b { color: var(--muted); font-weight: 500; }
.illus { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.illus::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--dim); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

/* formula block (KaTeX) */
.formula { overflow-x: auto; overflow-y: hidden; padding: 16px 18px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); font-size: 15.5px; scrollbar-width: thin; }
.formula .katex-display { margin: 0; }
.katex { font-size: 1.06em; }
.formula-cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12.5px; color: var(--dim); }

/* tooltip (shared singleton, see core.js LX.tip) */
.lx-tip {
  position: fixed; z-index: 100; pointer-events: none; max-width: 300px;
  padding: 9px 12px; border-radius: 10px; background: #23262f; border: 1px solid var(--line-2); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
  font-size: 13px; line-height: 1.45; color: var(--text); opacity: 0; transform: translateY(4px); transition: opacity 0.14s, transform 0.14s;
}
.lx-tip.is-on { opacity: 1; transform: none; }
.lx-tip b { font-weight: 600; }
.lx-tip .num { color: var(--text); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding: clamp(96px, 9vw, 124px) 0 clamp(56px, 7vw, 96px); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-bg i {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(90px); opacity: 0.2; mix-blend-mode: screen;
  background: var(--c); animation: drift 26s ease-in-out infinite alternate;
}
.hero-bg i:nth-child(1) { --c: var(--lit); left: -14vmax; top: -18vmax; }
.hero-bg i:nth-child(2) { --c: var(--abs); right: -10vmax; top: -22vmax; animation-delay: -6s; }
.hero-bg i:nth-child(3) { --c: var(--emo); right: 4vmax; bottom: -30vmax; animation-delay: -12s; opacity: 0.14; }
.hero-bg i:nth-child(4) { --c: var(--fig); left: 18vmax; bottom: -34vmax; animation-delay: -18s; opacity: 0.12; }
@keyframes drift { to { transform: translate3d(5vmax, 3vmax, 0) scale(1.12); } }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 980px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }
.venue { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 99px; }
.venue i { width: 7px; height: 7px; border-radius: 50%; background: var(--bkg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bkg) 22%, transparent); }
.hero h1 { font-family: var(--serif); font-size: clamp(64px, 9.4vw, 132px); line-height: 0.86; letter-spacing: -0.025em; margin: 26px 0 0; }
.hero h1 > span { display: block; font-size: 0.3em; line-height: 1.12; letter-spacing: -0.005em; margin-top: 0.5em; color: var(--muted); font-style: italic; max-width: 17ch; }
.hero-tag { margin-top: 26px; font-size: clamp(17px, 1.7vw, 20px); color: var(--muted); max-width: 46ch; }
.hero-tag strong { color: var(--text); font-weight: 500; }
.authors { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 16px; }
.authors a { text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 1px; }
.authors a:hover { border-bottom-color: var(--text); }
.affil { margin-top: 6px; color: var(--dim); font-size: 14px; }
.hero-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }

/* lens viewer */
.viewer { position: relative; }
.viewer-frame {
  position: relative; border-radius: var(--r-lg); overflow: hidden; background: #000; border: 1px solid var(--line-2);
  aspect-ratio: 4 / 3; cursor: none; touch-action: pan-y; isolation: isolate;
  box-shadow: 0 40px 120px -40px color-mix(in srgb, var(--c, #000) 55%, transparent); transition: box-shadow 0.6s;
}
.viewer-frame img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.viewer-base { filter: grayscale(1) brightness(0.5) contrast(1.05); transition: filter 0.5s; }
.viewer-loupe {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-image: radial-gradient(circle var(--r, 120px) at var(--x, 50%) var(--y, 50%), #000 98.5%, transparent 100%);
  mask-image: radial-gradient(circle var(--r, 120px) at var(--x, 50%) var(--y, 50%), #000 98.5%, transparent 100%);
}
.viewer-loupe::after { content: ""; position: absolute; inset: 0; background: var(--c); mix-blend-mode: soft-light; opacity: 0.55; transition: background 0.4s; }
.viewer-ring {
  position: absolute; left: var(--x, 50%); top: var(--y, 50%); width: calc(var(--r, 120px) * 2); height: calc(var(--r, 120px) * 2);
  margin: calc(var(--r, 120px) * -1) 0 0 calc(var(--r, 120px) * -1); border-radius: 50%; pointer-events: none;
  border: 2px solid var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.3), 0 0 44px color-mix(in srgb, var(--c) 55%, transparent);
  transition: border-color 0.4s, box-shadow 0.4s;
}
.viewer-ring span {
  position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); background: var(--c); color: #0a0b0e;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; padding: 4px 9px; border-radius: 99px; white-space: nowrap;
  transition: background 0.4s;
}
.viewer-lenses { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.viewer-caption { margin-top: 16px; min-height: 5.6em; }
.viewer-caption q { quotes: none; display: block; font-family: var(--serif); font-size: clamp(21px, 2.1vw, 26px); line-height: 1.22; color: var(--text); }
.viewer-caption q.swap { animation: capIn 0.5s var(--ease); }
@keyframes capIn { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }
.viewer-meta { margin-top: 10px; font-size: 12.5px; color: var(--dim); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ==========================================================================
   Idea (one vector vs. lens slots)
   ========================================================================== */
.idea-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .idea-grid { grid-template-columns: minmax(0, 1fr); } }
.idea-card h3 { margin-bottom: 8px; }
.idea-card p { color: var(--muted); font-size: 15px; }
.idea-viz { height: 210px; margin: 6px 0 18px; }
.idea-viz svg { width: 100%; height: 100%; overflow: visible; }
.contrib { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.contrib > div { padding: 24px 26px; border-right: 1px solid var(--line); }
.contrib > div:last-child { border-right: 0; }
.contrib .tag { display: block; margin-bottom: 10px; }
.contrib h4 { font-family: var(--serif); font-size: 23px; font-weight: 400; line-height: 1.15; margin-bottom: 8px; }
.contrib p { font-size: 14.5px; color: var(--muted); }
@media (max-width: 860px) { .contrib { grid-template-columns: minmax(0, 1fr); } .contrib > div { border-right: 0; border-bottom: 1px solid var(--line); } .contrib > div:last-child { border-bottom: 0; } }

/* ==========================================================================
   Dataset
   ========================================================================== */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stat { padding: 26px 26px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .v { font-family: var(--serif); font-size: clamp(40px, 5vw, 62px); line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat .k { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* lens legend cards */
.lens-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.lens-card { border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 12%, transparent), transparent 70%); border-radius: var(--r); padding: 18px 16px 16px; transition: transform 0.3s var(--ease), border-color 0.3s; }
.lens-card:hover { transform: translateY(-4px); border-color: var(--c); }
.lens-card svg { width: 26px; height: 26px; color: var(--c); margin-bottom: 14px; }
.lens-card h4 { color: var(--c); font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1; margin-bottom: 8px; }
.lens-card p { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
@media (max-width: 980px) { .lens-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* explorer */
.explorer { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 560px; }
.ex-stage { position: relative; background: #050506; display: grid; place-items: center; min-height: 380px; overflow: hidden; }
.ex-stage img { max-height: 640px; width: 100%; height: 100%; object-fit: contain; transition: opacity 0.35s; }
.ex-stage .ex-glow { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(50px) saturate(1.4) brightness(0.45); transform: scale(1.3); }
.ex-stage img { position: relative; }
.ex-src { position: absolute; left: 14px; top: 14px; z-index: 2; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(10, 11, 14, 0.7); backdrop-filter: blur(8px); border: 1px solid var(--line-2); padding: 5px 10px; border-radius: 99px; }
.ex-nav { position: absolute; z-index: 2; bottom: 14px; right: 14px; display: flex; gap: 6px; }
.ex-nav button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(10, 11, 14, 0.7); backdrop-filter: blur(8px); display: grid; place-items: center; }
.ex-nav button:hover { background: rgba(255, 255, 255, 0.16); }
.ex-nav svg { width: 16px; height: 16px; }
.ex-side { padding: clamp(18px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 18px; min-width: 0; border-left: 1px solid var(--line); }
.ex-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ex-title h3 { font-size: 28px; }
.ex-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-caps { display: grid; gap: 10px; align-content: start; }
.ex-cap {
  --bgmix: 9%;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 13px 14px; border-radius: var(--r);
  border: 1px solid color-mix(in srgb, var(--c) 26%, transparent); background: color-mix(in srgb, var(--c) var(--bgmix), transparent);
  text-align: left; width: 100%; transition: background 0.25s, opacity 0.25s, transform 0.3s var(--ease), border-color 0.25s;
  animation: capIn 0.45s var(--ease) backwards;
}
.ex-cap:hover { --bgmix: 16%; border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.ex-cap svg { width: 18px; height: 18px; color: var(--c); margin-top: 2px; }
.ex-cap .l { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c); }
.ex-cap .t { grid-column: 2; font-size: 15px; line-height: 1.45; color: var(--text); }
.ex-caps.is-solo .ex-cap .t { font-family: var(--serif); font-size: 23px; line-height: 1.25; }
.ex-prompts { border-top: 1px solid var(--line); padding-top: 16px; margin-top: auto; }
.ex-prompts .tag { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.ex-prompt { display: flex; gap: 9px; align-items: baseline; font-size: 13.5px; color: var(--muted); padding: 4px 0; line-height: 1.45; }
.ex-prompt .dot { transform: translateY(-1px); }
.ex-prompt code { font-family: var(--mono); font-size: 10.5px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); border-radius: 5px; padding: 1px 5px; margin-left: 6px; white-space: nowrap; }
.ex-thumbs { display: flex; gap: 8px; padding: 14px; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.ex-thumbs button { flex: none; width: 84px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; background: #000; opacity: 0.5; transition: opacity 0.2s, border-color 0.2s, transform 0.2s var(--ease); }
.ex-thumbs button:hover { opacity: 0.9; transform: translateY(-2px); }
.ex-thumbs button[aria-selected="true"] { opacity: 1; border-color: var(--text); }
.ex-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .explorer { grid-template-columns: minmax(0, 1fr); } .ex-side { border-left: 0; border-top: 1px solid var(--line); } .ex-stage img { max-height: 420px; } }

/* split bars (Table 1) */
.dist-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.dist-rows { display: grid; gap: 12px; }
.dist-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) 84px; gap: 14px; align-items: center; font-size: 14px; }
.dist-row .name { display: flex; align-items: center; gap: 8px; color: var(--c); font-weight: 500; }
.dist-row .name svg { width: 16px; height: 16px; }
.dist-bar { height: 24px; border-radius: 6px; background: rgba(255, 255, 255, 0.045); overflow: hidden; }
.dist-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent), var(--c)); transition: width 0.9s var(--ease); }
.dist-row .num { text-align: right; font-size: 13.5px; }
.dist-foot { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.dist-foot b { color: var(--text); font-family: var(--mono); font-weight: 500; }
@media (max-width: 560px) { .dist-row { grid-template-columns: 88px minmax(0, 1fr) 64px; gap: 8px; } }

/* pipeline */
.pipe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); }
.pipe-step { padding: 26px; border-right: 1px solid var(--line); position: relative; display: flex; flex-direction: column; gap: 12px; }
.pipe-step:last-child { border-right: 0; }
.pipe-step .tag b { color: var(--text); }
.pipe-step h4 { font-family: var(--serif); font-size: 25px; font-weight: 400; line-height: 1.12; }
.pipe-step p { font-size: 14.5px; color: var(--muted); }
.pipe-model { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); }
.pipe-q { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.3; color: var(--text); padding-left: 14px; border-left: 2px solid var(--line-2); }
.pipe-checks { display: grid; gap: 7px; margin-top: 2px; }
.pipe-checks > span { display: flex; gap: 9px; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.pipe-checks > span::before { content: ""; flex: none; width: 15px; height: 15px; margin-top: 2px; border-radius: 50%; background: color-mix(in srgb, var(--bkg) 22%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a9d07c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.pipe-checks b { color: var(--text); font-weight: 500; }
.funnel { display: grid; gap: 5px; margin-top: auto; padding-top: 8px; }
.funnel i { display: block; height: 9px; border-radius: 5px; background: var(--line-2); }
.funnel i:last-child { width: 10%; background: var(--text); }
.funnel span { font-size: 12px; color: var(--dim); font-family: var(--mono); }
@media (max-width: 900px) { .pipe { grid-template-columns: minmax(0, 1fr); } .pipe-step { border-right: 0; border-bottom: 1px solid var(--line); } .pipe-step:last-child { border-bottom: 0; } }

/* request data */
.request {
  margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: clamp(22px, 3vw, 34px); border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background:
    radial-gradient(600px 220px at 0% 0%, color-mix(in srgb, var(--lit) 18%, transparent), transparent 70%),
    radial-gradient(600px 220px at 100% 100%, color-mix(in srgb, var(--abs) 18%, transparent), transparent 70%),
    var(--panel);
}
.request h3 { margin-bottom: 8px; }
.request p { color: var(--muted); max-width: 60ch; font-size: 15.5px; }
@media (max-width: 760px) { .request { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Cite + footer
   ========================================================================== */
.cite-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .cite-grid { grid-template-columns: minmax(0, 1fr); } }
.bib { position: relative; }
.bib pre { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--muted); overflow-x: auto; white-space: pre; }
.bib pre b { color: var(--text); font-weight: 500; }
.bib .btn { position: absolute; top: 16px; right: 16px; }
.contact p { color: var(--muted); font-size: 15.5px; }
.contact a.mail { display: inline-block; margin-top: 12px; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); text-decoration-thickness: 1px; }
.contact .stack { display: grid; gap: 22px; }
.ack { margin-top: 28px; font-size: 13.5px; color: var(--dim); max-width: 90ch; }
footer { border-top: 1px solid var(--line); padding: 28px 0 44px; font-size: 13px; color: var(--dim); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }
