/* SynthBench Studio — borderless, open, Apple / Gemini keynote aesthetic. */
:root {
  color-scheme: light;
  --canvas: #fbfbfd;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --muted: #6e6e73;
  --faint: #86868b;
  --hairline: rgba(29, 29, 31, 0.08);
  --hairline-strong: rgba(29, 29, 31, 0.14);
  --blue: #0071e3;
  --blue-soft: rgba(0, 113, 227, 0.09);
  --teal: #2b9c94;
  --teal-soft: rgba(43, 156, 148, 0.11);
  --coral: #e66a4e;
  --coral-soft: rgba(230, 106, 78, 0.11);
  --violet: #7b6bb0;
  --violet-soft: rgba(123, 107, 176, 0.11);
  --amber: #c77d1a;
  --amber-soft: rgba(199, 125, 26, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "DM Sans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "DM Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Roboto Mono", "SFMono-Regular", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 14% 0%, rgba(0, 113, 227, 0.055), transparent 34rem),
    radial-gradient(circle at 86% 12%, rgba(43, 156, 148, 0.055), transparent 28rem),
    var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.66;
  letter-spacing: 0.01em;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.9em; background: rgba(29, 29, 31, 0.05); padding: 1px 5px; border-radius: 5px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Sticky Topbar + Quartet Navigation Capsule */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid var(--hairline);
}

.topbar__inner {
  width: min(1240px, calc(100% - 40px));
  min-height: 62px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 6px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  background: var(--teal-soft);
}

.brand__mark svg { width: 18px; height: 18px; }
.brand__text { display: flex; align-items: baseline; gap: 6px; font-size: 14px; }
.brand__text strong { font-weight: 650; }
.brand__text span { color: var(--muted); font-weight: 450; }

.quartet-nav {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.045);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow-x: auto;
  max-width: 100%;
}

.quartet-nav a { transition: color 200ms var(--ease); }
.quartet-nav a:hover { color: var(--ink); }
.quartet-nav a.is-current { color: var(--blue); font-weight: 640; }
.quartet-nav__sep { color: rgba(29, 29, 31, 0.22); }

.topbar__meta { display: flex; align-items: center; gap: 8px; }

.live-pill, .compact-button {
  border: 0;
  background: rgba(29, 29, 31, 0.045);
  color: var(--ink-soft);
  border-radius: 999px;
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 540;
  white-space: nowrap;
  transition: background 180ms var(--ease);
}

.compact-button:hover { background: rgba(29, 29, 31, 0.085); }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(43, 156, 148, 0.14);
}

/* Main scroll container */
.story {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 96px;
}

/* Hero */
.hero {
  min-height: calc(88svh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 0 42px;
  text-align: center;
}

.hero__center { width: 100%; max-width: 1040px; margin: 0 auto; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero h1 span {
  background: linear-gradient(92deg, var(--blue), var(--teal) 55%, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  margin: 0 auto 28px;
  max-width: 780px;
  font-size: clamp(15px, 1.55vw, 17.5px);
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: #0062c4; }
.btn--secondary { background: rgba(29, 29, 31, 0.06); color: var(--ink); }
.btn--secondary:hover { background: rgba(29, 29, 31, 0.10); }
.btn--quiet { background: transparent; border-color: var(--hairline-strong); color: var(--ink-soft); }
.btn--quiet:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn--danger { background: var(--coral-soft); color: var(--coral); border-color: rgba(230, 106, 78, 0.28); }
.btn--danger:hover { background: rgba(230, 106, 78, 0.18); }
.btn--sm { padding: 6px 13px; font-size: 12.5px; }

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto 28px;
}

.kpi-item {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-item__num {
  font-family: var(--mono);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 650;
  color: var(--blue);
}

.kpi-item__num--teal { color: var(--teal); }
.kpi-item__num--coral { color: var(--coral); }
.kpi-item__num--violet { color: var(--violet); }
.kpi-item__label { font-size: 12.5px; color: var(--muted); }

/* Module Sections */
.module {
  padding: 54px 0 28px;
  border-top: 1px solid var(--hairline);
}

.module__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.module__kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 6px;
}

.module__title {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.7vw, 31px);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.module__desc {
  margin: 0;
  max-width: 780px;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* Panels & Controls */
.panel {
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid-asymmetric {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.seg-group {
  display: inline-flex;
  background: rgba(29, 29, 31, 0.055);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.seg-btn {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 560;
  color: var(--muted);
  transition: background 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.seg-btn.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: #fff;
  font-size: 12.5px;
  font-weight: 560;
  color: var(--ink-soft);
  user-select: none;
}

.toggle-chip input[type="checkbox"] {
  accent-color: var(--blue);
  width: 15px;
  height: 15px;
  margin: 0;
}

.toggle-chip.is-on {
  border-color: rgba(0, 113, 227, 0.35);
  background: var(--blue-soft);
  color: var(--blue);
}

.dropzone {
  border: 1.5px dashed rgba(0, 113, 227, 0.32);
  background: rgba(0, 113, 227, 0.03);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink-soft);
  transition: background 180ms var(--ease), border-color 180ms var(--ease);
}

.dropzone.is-dragover {
  background: rgba(0, 113, 227, 0.10);
  border-color: var(--blue);
}

.track-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.track-box {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: #fcfcfd;
  padding: 10px 12px 6px;
}

.track-box__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.track-box__title { font-weight: 640; color: var(--ink); }

canvas.stage {
  display: block;
  width: 100%;
  border-radius: 10px;
}

.legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted);
}

.legend__item { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.stat-card {
  background: #f7f8fa;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 10px 12px;
}

.stat-card__k { font-size: 11.5px; color: var(--muted); }
.stat-card__v { font-family: var(--mono); font-size: 18px; font-weight: 650; color: var(--ink); margin-top: 2px; }
.stat-card__v--blue { color: var(--blue); }
.stat-card__v--teal { color: var(--teal); }
.stat-card__v--coral { color: var(--coral); }
.stat-card__v--amber { color: var(--amber); }

.slider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.slider-box {
  background: #f7f8fa;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 10px 12px;
}

.slider-box label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.slider-box input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

.callout {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: #0b3c78;
  font-size: 13px;
  border-left: 3px solid var(--blue);
}

.callout--coral {
  background: var(--coral-soft);
  color: #7c2414;
  border-left-color: var(--coral);
}

.callout--teal {
  background: var(--teal-soft);
  color: #134e4a;
  border-left-color: var(--teal);
}

/* Comparison cards (Module 3) */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.compare-card {
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
}

.compare-card--naive {
  background: rgba(230, 106, 78, 0.05);
  border-color: rgba(230, 106, 78, 0.25);
}

.compare-card--honest {
  background: rgba(43, 156, 148, 0.06);
  border-color: rgba(43, 156, 148, 0.28);
}

.compare-card h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px dashed var(--hairline);
  font-size: 13px;
}

.metric-line:last-child { border-bottom: 0; }

/* Span pills for Module 3 */
.span-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.span-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--hairline-strong);
  background: #fff;
}

.span-pill__tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
}

.tag-reading { background: var(--teal-soft); color: var(--teal); }
.tag-fallback { background: var(--amber-soft); color: var(--amber); }
.tag-nopos { background: var(--coral-soft); color: var(--coral); }

/* Module 4: Heatmap & X-Ray */
.lexicon-input {
  width: 100%;
  min-height: 92px;
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 13px;
  resize: vertical;
  background: #fcfcfd;
}

.heatmap-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 5px;
  margin-top: 10px;
  font-size: 12.5px;
}

.heatmap-table th {
  font-weight: 600;
  color: var(--muted);
  padding: 4px 6px;
  text-align: center;
}

.heatmap-table th:first-child,
.heatmap-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  width: 96px;
}

.hm-cell {
  text-align: center;
  border-radius: 8px;
  padding: 6px 4px;
  font-family: var(--mono);
  font-weight: 600;
  transition: background 220ms var(--ease);
}

.hm-zero {
  background: rgba(230, 106, 78, 0.16);
  color: #b5361d;
  outline: 1px dashed rgba(230, 106, 78, 0.45);
}

.hm-ok {
  background: rgba(43, 156, 148, 0.16);
  color: #156660;
}

.hm-high {
  background: rgba(0, 113, 227, 0.16);
  color: #0052a3;
}

.xray-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  border-radius: 12px;
  font-weight: 640;
  font-size: 14px;
  margin-bottom: 12px;
}

.xray-status--pass {
  background: var(--teal-soft);
  color: #135c56;
  border: 1px solid rgba(43, 156, 148, 0.3);
}

.xray-status--fail {
  background: var(--coral-soft);
  color: #9e2a17;
  border: 1px solid rgba(230, 106, 78, 0.35);
}

.xray-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 290px;
  overflow-y: auto;
}

.xray-item {
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  border: 1px solid var(--hairline);
  background: #fcfcfd;
}

.xray-item--alert {
  background: rgba(230, 106, 78, 0.08);
  border-color: rgba(230, 106, 78, 0.35);
  color: #8c2312;
}

.footer {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 920px) {
  .kpi-strip, .grid-2, .grid-asymmetric, .compare-grid {
    grid-template-columns: 1fr;
  }
  .story { width: calc(100% - 28px); }
}

/* Runtime polish */
.metric-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.boot-error {
  margin: 28px 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--coral-soft);
  border: 1px solid rgba(230, 106, 78, 0.35);
  color: #7c2414;
  font-size: 13px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.28);
  outline-offset: 2px;
}

canvas.stage {
  touch-action: none;
  user-select: none;
}

body:not([data-ready="true"]) .stat-row:empty,
body:not([data-ready="true"]) #heatmap-container:empty,
body:not([data-ready="true"]) #xray-report:empty {
  min-height: 14px;
}

@media (max-width: 680px) {
  .topbar__inner { align-items: flex-start; }
  .quartet-nav { order: 3; width: 100%; padding: 7px 12px; }
  .hero { min-height: auto; padding: 38px 0 24px; }
  .hero h1 { font-size: clamp(30px, 9vw, 44px); }
  .hero__lede { font-size: 15px; }
  .module { padding-top: 40px; }
  .panel { padding: 15px; border-radius: 16px; }
  .slider-grid { grid-template-columns: 1fr; }
  .track-box { padding: 8px 8px 4px; }
  .track-box__head { align-items: flex-start; }
  .legend { gap: 8px; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* -------------------------------------------------------------------------
   Cinematic borderless showcase, aligned with the other three Studios.
   ------------------------------------------------------------------------- */
.topbar { border-bottom: 0; background: rgba(251, 251, 253, 0.76); }
.topbar__inner { width: min(1240px, calc(100% - 64px)); }
.story { width: min(1240px, calc(100% - 64px)); padding-bottom: 104px; }
.hero.hero--story { min-height: calc(100svh - 62px); padding: 82px 0 58px; }
.hero__center { max-width: 1120px; }
.eyebrow { margin-bottom: 20px; letter-spacing: 0.14em; }
.hero.hero--story h1 { max-width: 1120px; margin: 0 auto 26px; font-size: clamp(48px, 7.2vw, 94px); line-height: 0.98; letter-spacing: -0.064em; font-weight: 680; }
.hero.hero--story h1 span { background: none; color: #86868b; -webkit-text-fill-color: currentColor; }
.hero__lede { max-width: 700px; font-size: clamp(16px, 1.65vw, 20px); line-height: 1.68; }
.hero__actions { margin: 32px auto 0; gap: 12px; }
.kpi-strip { max-width: 980px; margin: 52px auto 0; border: 0; background: transparent; gap: clamp(26px, 5vw, 72px); }
.kpi-item { border: 0; background: transparent; padding: 0; border-radius: 0; text-align: center; box-shadow: none; }
.kpi-item__num { font-size: clamp(28px, 3.8vw, 48px); line-height: 1; letter-spacing: -0.04em; }
.kpi-item__label { margin-top: 10px; font-size: 11px; color: var(--faint); }
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 9px; margin-top: 58px; color: #a1a1a6; font-size: 9px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; }
.scroll-cue svg { width: 16px; height: 24px; animation: scroll-cue-breathe 2.2s var(--ease) infinite; }
@keyframes scroll-cue-breathe { 0%, 100% { transform: translateY(0); opacity: 0.35; } 45% { transform: translateY(6px); opacity: 0.95; } }
.status-dot { animation: live-dot 2.4s ease-in-out infinite; }
@keyframes live-dot { 0%, 100% { box-shadow: 0 0 0 3px rgba(43, 156, 148, 0.10); } 50% { box-shadow: 0 0 0 7px rgba(43, 156, 148, 0.02); } }
.js [data-reveal] { will-change: opacity, transform; }
.js .hero, .js .module.showcase { opacity: 0; transform: translateY(62px) scale(0.992); transition: opacity 1.15s var(--ease), transform 1.25s var(--ease); }
.js .hero.is-inview, .js .module.showcase.is-inview { opacity: 1; transform: translateY(0) scale(1); }
.module.showcase { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 11vh 0; border-top: 0; }
.module__head { width: min(1100px, 100%); margin: 0 auto 50px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr); gap: clamp(34px, 7vw, 104px); align-items: end; }
.module__title-group { min-width: 0; }
.module__kicker { margin-bottom: 18px; color: var(--blue); letter-spacing: 0.13em; }
.module__title { max-width: 760px; margin: 0; font-size: clamp(40px, 5.3vw, 72px); line-height: 1.02; letter-spacing: -0.055em; font-weight: 660; }
.module__side { display: flex; flex-direction: column; align-items: flex-start; padding-bottom: 5px; }
.module__desc { max-width: 430px; margin: 0 0 0 auto; color: var(--muted); font-size: 14px; line-height: 1.72; letter-spacing: -0.008em; }
.module__desc code { background: rgba(29, 29, 31, 0.04); }
.panel, .track-box, .stage, .stat-card, .slider-box, .dropzone, .compare-card, .span-pill, .xray-item, .xray-status, .lexicon-input, .heatmap-table { border: 0 !important; box-shadow: none !important; }
.panel { width: min(1180px, 100%); margin-left: auto; margin-right: auto; padding: 0; border-radius: 0; background: transparent; }
.grid-asymmetric, .grid-2 { width: min(1180px, 100%); margin-left: auto; margin-right: auto; gap: clamp(36px, 6vw, 88px); }
.toolbar { margin: 18px 0 24px; }
.track-stack { gap: clamp(32px, 4.8vw, 58px); }
.track-box { position: relative; padding: 0; border-radius: 0; background: transparent; }
.track-box::before { content: ""; position: absolute; inset: 18% 2% 4%; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, rgba(0, 113, 227, 0.055), rgba(43, 156, 148, 0.018) 46%, transparent 72%); filter: blur(22px); }
.track-box__head { min-height: 30px; margin-bottom: 10px; }
.track-box__title { font-size: 11.5px; font-weight: 620; color: var(--ink-soft); }
canvas.stage { border-radius: 0; background: transparent; }
.js .module.showcase .stage { clip-path: inset(0 100% 0 0); opacity: 0.35; transform: translateY(12px); will-change: clip-path, opacity, transform; }
.js .module.showcase.is-inview .stage { animation: stage-reveal 1.4s var(--ease) both; }
@keyframes stage-reveal { 0% { clip-path: inset(0 100% 0 0); opacity: 0.35; transform: translateY(12px); } 100% { clip-path: inset(0 0 0 0); opacity: 1; transform: translateY(0); } }
.dropzone { margin-bottom: 20px; padding: 14px 0; border-radius: 0; background: transparent; }
.seg-group { border: 0; background: rgba(29, 29, 31, 0.045); }
.seg-btn.is-active { box-shadow: none; }
.toggle-chip { border: 0; background: rgba(29, 29, 31, 0.04); }
.toggle-chip.is-on { background: var(--blue-soft); }
.slider-grid { gap: 18px; margin-top: 22px; }
.slider-box { padding: 0; border-radius: 0; background: transparent; }
.slider-box label { margin-bottom: 8px; }
.slider-box input[type="range"] { height: 18px; }
.stat-row { gap: 22px; margin-top: 28px; }
.stat-card { padding: 12px 0 0; border-radius: 0; background: transparent; border-top: 1px solid rgba(29, 29, 31, 0.075) !important; }
.stat-card__v { font-size: 22px; letter-spacing: -0.025em; }
.callout { margin-top: 22px; padding: 12px 16px; border-left: 0; border-radius: 12px; background: rgba(0, 113, 227, 0.055); }
.callout--coral { background: rgba(230, 106, 78, 0.065); }
.callout--teal { background: rgba(43, 156, 148, 0.065); }
.compare-grid { gap: 28px; margin-top: 28px; }
.compare-card { padding: 14px 0 0; border-radius: 0; background: transparent; border-top: 1px solid rgba(29, 29, 31, 0.08) !important; }
.span-controls { gap: 10px; margin-top: 16px; }
.span-pill { background: rgba(29, 29, 31, 0.04); }
.span-pill:hover { background: rgba(29, 29, 31, 0.075); }
.lexicon-input { margin-top: 4px; background: rgba(29, 29, 31, 0.035); }
.heatmap-table { margin-top: 18px; border-spacing: 6px; }
.hm-cell { min-height: 32px; }
.hm-zero, .hm-ok, .hm-high { animation: cell-breathe 4.8s ease-in-out infinite; }
.hm-cell:nth-child(2) { animation-delay: 0.2s; }
.hm-cell:nth-child(3) { animation-delay: 0.4s; }
.hm-cell:nth-child(4) { animation-delay: 0.6s; }
@keyframes cell-breathe { 0%, 100% { transform: scale(1); filter: saturate(1); } 50% { transform: scale(1.015); filter: saturate(1.12); } }
.xray-status { margin-bottom: 16px; border-radius: 10px; }
.xray-list { gap: 10px; position: relative; }
.xray-item { padding: 10px 0; border-radius: 0; background: transparent; border-bottom: 1px solid rgba(29, 29, 31, 0.065) !important; }
.xray-item--alert { padding: 10px 14px; border-radius: 10px; background: rgba(230, 106, 78, 0.065); border-bottom: 0 !important; }
.xray-list::after { content: ""; position: absolute; inset: 0 0 auto; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(0, 113, 227, 0.5), transparent); animation: xray-scan 4.5s linear infinite; }
@keyframes xray-scan { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateY(280px); opacity: 0; } }
.footer { border-top: 1px solid rgba(29, 29, 31, 0.07); }
@media (max-width: 920px) { .topbar__inner, .story { width: calc(100% - 32px); } .module__head { grid-template-columns: 1fr; gap: 20px; } .module__desc { margin-left: 0; max-width: 640px; } .module.showcase { min-height: auto; padding: 82px 0; } .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; } }
@media (max-width: 620px) { .hero.hero--story h1 { font-size: clamp(40px, 12vw, 62px); } .kpi-strip { grid-template-columns: 1fr 1fr; gap: 24px 14px; } .kpi-item__num { font-size: 28px; } .module__title { font-size: clamp(34px, 10vw, 48px); } }
@media (prefers-reduced-motion: reduce) { .js .hero, .js .module.showcase, .js .module.showcase .stage { opacity: 1 !important; transform: none !important; clip-path: none !important; animation: none !important; } }

/* Typography fit and anchor clearance for long Chinese module titles. */
.hero.hero--story h1 span {
  display: block;
  font-size: 0.78em;
  line-height: 1.03;
  white-space: nowrap;
}

.module.showcase {
  scroll-margin-top: 72px;
}

.module__title {
  max-width: 860px;
  font-size: clamp(36px, 4.45vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.052em;
}

.module__side {
  max-width: 430px;
  justify-self: end;
}

@media (max-width: 920px) {
  .hero.hero--story h1 span {
    font-size: 1em;
    white-space: normal;
  }
  .module__side {
    justify-self: start;
  }
}

.kpi-item__num {
  font-size: clamp(22px, 2.65vw, 32px);
  white-space: nowrap;
}

.kpi-item__label {
  white-space: normal;
  line-height: 1.45;
}

.module__head {
  grid-template-columns: minmax(0, 1.32fr) minmax(260px, 0.68fr);
  gap: clamp(30px, 5.4vw, 78px);
}

.quartet-nav {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.quartet-nav::-webkit-scrollbar {
  display: none;
}

@media (max-width: 920px) {
  .module__head {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .module__side {
    max-width: 640px;
    justify-self: start;
  }
}

.module__head {
  grid-template-columns: minmax(0, 1.38fr) minmax(260px, 0.62fr);
}

.module__title {
  font-size: clamp(34px, 4.1vw, 54px);
}

@media (max-width: 920px) {
  .hero__actions {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero__actions .btn {
    flex: 1 1 calc(50% - 6px);
  }
}

/* Contract-path scanner */
.contract-visual {
  width: min(1180px, 100%);
  margin: 34px auto 30px;
}

.contract-visual__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 12px;
}

.contract-visual__head strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
}

.contract-visual__head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
}

#canvas-contract {
  min-height: 260px;
}

.hm-zero,
.hm-ok,
.hm-high {
  animation-duration: 1.8s;
}

.xray-list::after {
  animation-duration: 2.6s;
}

@media (max-width: 700px) {
  .contract-visual__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* -------------------------------------------------------------------------
   Elevated Keynote Visual Polish & Full-Viewport Framing
   ------------------------------------------------------------------------- */
.hero.hero--story {
  min-height: calc(84svh - 62px);
  padding: 54px 0 38px;
}

.module.showcase {
  min-height: auto;
  padding: 54px 0 46px;
}

.module__head {
  margin: 0 auto 24px;
}

.module__kicker {
  margin-bottom: 10px;
}

.module__title {
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.08;
}

.dropzone {
  margin-bottom: 12px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.14), 0 4px 16px rgba(15, 23, 42, 0.025) !important;
}

.toolbar {
  margin: 12px 0 16px;
}

.track-stack {
  gap: 12px;
}

.track-box {
  padding: 10px 14px 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(29, 29, 31, 0.065), 0 8px 24px rgba(15, 23, 42, 0.032) !important;
  transition: box-shadow 260ms var(--ease), transform 260ms var(--ease);
}

.track-box:hover {
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.16), 0 12px 30px rgba(15, 23, 42, 0.05) !important;
}

.track-box__head {
  min-height: 22px;
  margin-bottom: 4px;
}

.stat-row {
  gap: 14px;
  margin-top: 16px;
}

.stat-card {
  padding: 10px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(29, 29, 31, 0.06), 0 4px 14px rgba(15, 23, 42, 0.024) !important;
  border-top: 0 !important;
}

.stat-card__v {
  font-size: 19px;
}

.slider-grid {
  gap: 12px;
  margin-top: 14px;
}

.slider-box {
  padding: 10px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(29, 29, 31, 0.06) !important;
}

.callout {
  margin-top: 14px;
  padding: 11px 15px;
  border-radius: 13px;
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.12) !important;
}

.callout--coral {
  box-shadow: inset 0 0 0 1px rgba(230, 106, 78, 0.16) !important;
}

.callout--teal {
  box-shadow: inset 0 0 0 1px rgba(43, 156, 148, 0.16) !important;
}

.compare-grid {
  gap: 16px;
  margin-top: 16px;
}

.compare-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border-top: 0 !important;
  box-shadow: inset 0 0 0 1px rgba(29, 29, 31, 0.065), 0 8px 24px rgba(15, 23, 42, 0.03) !important;
}

.compare-card--naive {
  background: linear-gradient(180deg, rgba(230, 106, 78, 0.055), rgba(255, 255, 255, 0.85));
  box-shadow: inset 0 0 0 1px rgba(230, 106, 78, 0.18), 0 8px 24px rgba(230, 106, 78, 0.04) !important;
}

.compare-card--honest {
  background: linear-gradient(180deg, rgba(43, 156, 148, 0.06), rgba(255, 255, 255, 0.85));
  box-shadow: inset 0 0 0 1px rgba(43, 156, 148, 0.20), 0 8px 24px rgba(43, 156, 148, 0.04) !important;
}

.lexicon-input {
  min-height: 58px;
  max-height: 76px;
  border-radius: 13px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(29, 29, 31, 0.08) !important;
  line-height: 1.45;
}

.contract-visual {
  margin: 14px auto 16px;
  padding: 14px 16px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.80);
  box-shadow: inset 0 0 0 1px rgba(29, 29, 31, 0.065), 0 8px 24px rgba(15, 23, 42, 0.03) !important;
}

#canvas-contract {
  min-height: 205px;
}

.heatmap-table {
  margin-top: 10px;
  border-spacing: 5px;
}

.hm-cell {
  min-height: 26px;
  padding: 4px;
  font-size: 12px;
}

.seg-btn.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.09);
}

.grid-asymmetric, .grid-2 {
  gap: clamp(20px, 3vw, 36px);
}

