/* LURCH project page: components built on top of the template styles */
:root {
  --c-length: #64748b;
  --c-scope: #f59e0b;
  --c-scope-soft: #fef3c7;
  --c-scope-ink: #92400e;
  --c-disp: #8b5cf6;
  --c-disp-soft: #ede9fe;
  --c-disp-ink: #5b21b6;
  --c-depth: #10b981;
  --c-depth-soft: #d1fae5;
  --c-depth-ink: #065f46;
  --c-good: #10b981;
  --c-mid: #f59e0b;
  --c-bad: #ef4444;
}

html[data-theme="dark"] {
  --c-scope: #fbbf24;
  --c-scope-soft: #422006;
  --c-scope-ink: #fde68a;
  --c-disp: #c4b5fd;
  --c-disp-soft: #2e1065;
  --c-disp-ink: #ddd6fe;
  --c-depth: #34d399;
  --c-depth-soft: #064e3b;
  --c-depth-ink: #a7f3d0;
  --c-good: #34d399;
  --c-mid: #fbbf24;
  --c-bad: #f87171;
}

.lurch-name {
  font-variant: small-caps;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Hero extras */
.venue-pill {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  background: var(--background-accent);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
}

.button.is-soon {
  opacity: 0.5;
  pointer-events: none;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.section-nav a {
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.section-nav a:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background: var(--nav-hover);
}

.section-lead {
  max-width: 760px;
  margin: -0.75rem auto 2rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  text-align: center;
}

.figure-caption {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ---------- Teaser: equal length, different difficulty ---------- */
.example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.example-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.example-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.example-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.example-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 6px;
  background: var(--surface-inverse);
  color: var(--ink-inverse);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.example-head h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
}

.example-mean {
  text-align: right;
  line-height: 1;
}

.example-mean span {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
}

.example-mean small {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
}

.example-mean.s-hi span { color: var(--c-good); }
.example-mean.s-mid span { color: var(--c-mid); }
.example-mean.s-lo span { color: var(--c-bad); }

.example-q {
  font-size: 0.95rem;
  color: var(--text-primary);
  min-height: 3.2em;
}

.example-src {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.05rem 0.45rem;
  border-radius: 4px;
  background: var(--background-accent);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: 1px;
}

.evidence-strip {
  position: relative;
  height: 22px;
  border-radius: 6px;
  background: var(--background-accent);
  overflow: hidden;
}

.strip-span {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(45deg, rgb(139 92 246 / 0.16) 0 4px, transparent 4px 8px);
  border-left: 2px solid var(--c-disp);
  border-right: 2px solid var(--c-disp);
}

.strip-seg {
  position: absolute;
  top: 3px;
  bottom: 3px;
  min-width: 3px;
  border-radius: 2px;
  background: var(--c-scope);
}

.strip-axis {
  display: flex;
  justify-content: space-between;
  margin-top: -0.45rem;
  font-size: 0.72rem;
  color: var(--text-light);
}

.strip-note {
  margin-top: -0.35rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.metric-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.chip-scope { background: var(--c-scope-soft); color: var(--c-scope-ink); }
.chip-disp { background: var(--c-disp-soft); color: var(--c-disp-ink); }
.chip-depth { background: var(--c-depth-soft); color: var(--c-depth-ink); }

.ops {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-light);
}

.op {
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-secondary);
  font-weight: 600;
}

.op-answer {
  background: var(--surface-inverse);
  border-color: var(--surface-inverse);
  color: var(--ink-inverse);
}

.model-details {
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border-color);
}

.model-details summary {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.model-scores {
  list-style: none;
  margin: 0.5rem 0 0;
}

.chip-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.chip-key > div {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.chip-key dd {
  margin: 0;
}

.stats-details {
  margin-top: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--background-primary);
}

.stats-details summary {
  padding: 0.7rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.stats-details p {
  padding: 0 1.1rem 1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.model-scores li {
  display: grid;
  grid-template-columns: 7.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 0.15rem 0;
}

.model-scores .bar {
  height: 8px;
  border-radius: 4px;
  background: var(--background-accent);
  overflow: hidden;
}

.model-scores .fill {
  display: block;
  height: 100%;
  border-radius: 4px;
}

.model-scores .val {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.fill.s-hi { background: var(--c-good); }
.fill.s-mid { background: var(--c-mid); }
.fill.s-lo { background: var(--c-bad); }

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.swatch {
  display: inline-block;
  width: 18px;
  height: 12px;
  border-radius: 3px;
}

.swatch-evidence { background: var(--c-scope); }
.swatch-span {
  background: repeating-linear-gradient(45deg, rgb(139 92 246 / 0.25) 0 3px, transparent 3px 6px);
  border-left: 2px solid var(--c-disp);
  border-right: 2px solid var(--c-disp);
}

/* ---------- Key findings ---------- */
.findings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.finding-card {
  padding: 1.5rem;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}

.finding-card .rq {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.finding-card h3 {
  margin: 0.35rem 0 0.75rem;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
}

.finding-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.finding-card .rq-question {
  margin: 0.5rem 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.45;
}

.finding-card .finding-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ---------- Hero title ---------- */
.publication-title .title-main,
.publication-title .title-sub {
  display: block;
}

.publication-title .title-main {
  font-size: 3.75rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.publication-title .title-sub {
  margin-top: 0.6rem;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.25;
}

@media screen and (max-width: 768px) {
  .publication-title .title-main {
    font-size: 2.6rem;
  }

  .publication-title .title-sub {
    font-size: 1.35rem;
  }
}

/* ---------- Properties ---------- */
.property-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.property-card {
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

.property-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-ink);
}

.property-card .question {
  margin: 0.25rem 0 0.75rem;
  font-style: italic;
  color: var(--text-secondary);
}

.property-card .katex-display {
  margin: 0.75rem 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.property-card p {
  font-size: 0.93rem;
  color: var(--text-secondary);
}

.property-card.scope { --accent: var(--c-scope); --accent-ink: var(--c-scope-ink); }
.property-card.disp { --accent: var(--c-disp); --accent-ink: var(--c-disp-ink); }
.property-card.depth { --accent: var(--c-depth); --accent-ink: var(--c-depth-ink); }

/* Playground */
.playground {
  padding: 1.75rem;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}

.playground-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.playground-head h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.playground-head p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pg-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pg-buttons button {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--background-primary);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.pg-buttons button:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pg-stage {
  position: relative;
  padding-top: 30px;
  user-select: none;
  -webkit-user-select: none;
}

.pg-bracket {
  position: absolute;
  top: 6px;
  height: 18px;
  border: 2px solid var(--c-disp);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  transition: left 0.08s, width 0.08s;
}

.pg-bracket span {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 0.4rem;
  background: var(--background-primary);
  color: var(--c-disp-ink);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.pg-track {
  position: relative;
  height: 60px;
  border-radius: 8px;
  background: var(--background-accent);
  cursor: crosshair;
  touch-action: none;
}

.pg-gap {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(45deg, rgb(139 92 246 / 0.14) 0 5px, transparent 5px 10px);
  pointer-events: none;
}

.pg-block {
  position: absolute;
  top: 8px;
  bottom: 8px;
  min-width: 6px;
  border-radius: 4px;
  background: var(--c-scope);
  box-shadow: 0 1px 3px rgb(146 64 14 / 0.35);
  cursor: grab;
}

.pg-block:hover,
.pg-block.dragging {
  background: #d97706;
}

.pg-block.dragging {
  cursor: grabbing;
}

.pg-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
}

.pg-handle.l { left: -5px; }
.pg-handle.r { right: -5px; }

.pg-axis {
  position: relative;
  height: 1.4rem;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-light);
}

.pg-axis span {
  position: absolute;
  transform: translateX(-50%);
}

.pg-axis span:first-child { transform: none; }
.pg-axis span:last-child { transform: translateX(-100%); }

.pg-hint {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--text-light);
}

.pg-readout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.pg-metric {
  padding: 1.1rem 1.25rem;
  border-radius: var(--border-radius);
  background: var(--background-secondary);
  border: 1px solid var(--border-color);
}

.pg-metric .name {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pg-metric.scope .name { color: var(--c-scope-ink); }
.pg-metric.disp .name { color: var(--c-disp-ink); }

.pg-metric .value {
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.pg-metric .calc {
  font-family: 'SF Mono', 'Cascadia Code', 'Roboto Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.meter {
  position: relative;
  height: 8px;
  margin: 1.6rem 0 0.35rem;
  border-radius: 4px;
  background: var(--border-color);
}

.meter-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.1s;
}

.pg-metric.scope .meter-fill { background: var(--c-scope); }
.pg-metric.disp .meter-fill { background: var(--c-disp); }

.meter-mark {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--text-primary);
}

.meter-mark span {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.meter-ends {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.68rem;
  color: var(--text-light);
}

.pg-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pg-stats b {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Depth */
.depth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  margin-top: 2.5rem;
}

.depth-graph {
  padding: 1rem;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}

.depth-graph svg {
  display: block;
  width: 100%;
  height: auto;
}

html[data-theme="dark"] .depth-graph [fill="#1e293b"] {
  fill: #e2e8f0;
}

html[data-theme="dark"] .depth-graph text[fill="#ffffff"] {
  fill: #0f172a;
}

html[data-theme="dark"] .depth-graph [fill="#fef3c7"] {
  fill: #422006;
}

html[data-theme="dark"] .depth-graph [stroke="#f59e0b"] {
  stroke: #fbbf24;
}

html[data-theme="dark"] .depth-graph [fill="#92400e"] {
  fill: #fde68a;
}

html[data-theme="dark"] .depth-graph [fill="#d1fae5"] {
  fill: #064e3b;
}

html[data-theme="dark"] .depth-graph [stroke="#10b981"] {
  stroke: #34d399;
}

html[data-theme="dark"] .depth-graph [fill="#065f46"] {
  fill: #6ee7b7;
}

.depth-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.depth-text p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

/* ---------- Benchmark ---------- */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.pipe-step {
  flex: 1 1 0;
  padding: 1.1rem;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.pipe-step.final {
  background: var(--surface-inverse);
  border-color: var(--surface-inverse);
  color: var(--ink-inverse);
}

.pipe-step .icon {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.pipe-step.final .icon { color: var(--inverse-accent); }

.pipe-step h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.pipe-step p {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.pipe-step.final p { color: var(--ink-inverse-muted); }

.pipe-arrow {
  display: flex;
  align-items: center;
  color: var(--text-light);
  flex: 0 0 auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat {
  padding: 1.1rem 1rem;
  text-align: center;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.stat .num {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.stat .label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.depth-dist h4 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stacked {
  display: flex;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
}

.stacked span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
}

.stacked-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.sources-details {
  margin-top: 2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--background-primary);
}

.sources-details summary {
  padding: 0.9rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
}

.sources-details .table-container {
  padding: 0 1.25rem 1.25rem;
}

.sources-table {
  width: 100%;
  font-size: 0.88rem;
}

.sources-table th {
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.sources-table th::after {
  content: ' \2195';
  color: var(--text-light);
  font-weight: 400;
}

.sources-table td.num,
.sources-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Results ---------- */
.result-block {
  margin-bottom: 3.5rem;
}

.result-block:last-child {
  margin-bottom: 0;
}

.result-head .rq {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.result-head h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.2rem 0 0.5rem;
}

.result-head p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.chart-card {
  padding: 1.5rem;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
}

.control-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.control-group > label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-light);
}

.seg-control {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 3px;
  border-radius: 999px;
  background: var(--background-accent);
}

.seg-control button {
  padding: 0.3rem 0.85rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.seg-control button.active {
  background: var(--background-primary);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.seg-control button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.plot-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 210px;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0;
}

.plot-label {
  font-weight: 600;
  font-size: 0.92rem;
}

.plot-value {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.plot-value b {
  color: var(--text-primary);
}

.plot-track {
  position: relative;
  height: 28px;
}

.plot-zero {
  position: absolute;
  top: -10px;
  bottom: -10px;
  width: 0;
  border-left: 1px dashed var(--text-light);
}

.plot-ci {
  position: absolute;
  top: 50%;
  height: 4px;
  border-radius: 2px;
  transform: translateY(-50%);
  transition: left 0.5s ease, width 0.5s ease;
}

.plot-pt {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--background-primary);
  box-shadow: var(--shadow-md);
  transform: translate(-50%, -50%);
  transition: left 0.5s ease;
}

.plot-pt.hollow {
  background: var(--background-primary) !important;
  border: 2px solid currentColor;
}

.plot-line {
  position: absolute;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: var(--border-color);
}

.plot-axis {
  position: relative;
  height: 1.5rem;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-light);
}

.plot-axis span {
  position: absolute;
  transform: translateX(-50%);
}

.plot-axis-wrap {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 210px;
  gap: 1rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.25rem;
}

.plot-axis-title {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.sig-tag {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0 0.35rem;
  border-radius: 4px;
  background: var(--background-accent);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Heatmaps */
.heatmap-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.heatmap {
  display: grid;
  grid-template-columns: 1.5rem 3.2rem repeat(3, 86px);
  grid-template-rows: repeat(3, 86px) 1.6rem 1.6rem;
  gap: 6px;
}

.hm-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.4s;
}

.hm-cell:hover,
.hm-cell.active {
  transform: scale(1.06);
  box-shadow: 0 0 0 3px var(--text-primary);
}

.hm-tick {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.hm-ylabel {
  grid-column: 1;
  grid-row: 1 / span 3;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.hm-xlabel {
  grid-column: 3 / span 3;
  grid-row: 5;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.hm-legend {
  margin-top: 1.25rem;
  max-width: 300px;
}

.hm-legend .bar {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #dc2626, var(--hm-mid), #2563eb);
  border: 1px solid var(--border-color);
}

.hm-legend .ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.hm-detail {
  padding: 1.25rem;
  border-radius: var(--border-radius);
  background: var(--background-secondary);
  border: 1px solid var(--border-color);
}

.hm-detail .cell-name {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hm-detail dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  font-size: 0.9rem;
}

.hm-detail dt {
  color: var(--text-secondary);
}

.hm-detail dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hm-note {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* Takeaway */
.takeaway {
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  background: var(--takeaway-bg);
  border: 1px solid var(--takeaway-border);
  text-align: center;
}

.takeaway p {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.15rem;
  color: var(--text-primary);
}

/* Responsive */
@media screen and (max-width: 1023px) {
  .pipeline {
    flex-direction: column;
  }

  .pipe-arrow {
    justify-content: center;
    transform: rotate(90deg);
  }
}

@media screen and (max-width: 900px) {
  .example-grid,
  .findings-grid,
  .property-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .depth-layout,
  .heatmap-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .heatmap {
    margin: 0 auto;
  }
}

@media screen and (max-width: 640px) {
  .pg-readout {
    grid-template-columns: minmax(0, 1fr);
  }

  .plot-row,
  .plot-axis-wrap {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .plot-value {
    grid-column: 2;
    margin-top: -0.4rem;
  }

  .plot-axis-wrap > :last-child {
    display: none;
  }

  .heatmap {
    grid-template-columns: 1.2rem 2.8rem repeat(3, 68px);
    grid-template-rows: repeat(3, 68px) 1.6rem 1.6rem;
  }
}
