/* ---------- Detail pages ---------- */
.crumbs { display: flex; gap: 6px; align-items: center; font-size: var(--step--1); color: var(--ink-2); margin-bottom: var(--space-s); flex-wrap: wrap; }
.crumbs button { border: 0; background: none; padding: 2px 0; color: var(--ink-2); display: inline-flex; gap: 4px; align-items: center; }
.crumbs button:hover { color: var(--ink); }
.crumbs svg { width: 14px; height: 14px; }
.d-head { display: flex; justify-content: space-between; gap: var(--space-m); align-items: flex-start; flex-wrap: wrap; margin-bottom: var(--space-m); }
.d-head h1 { margin: 0 0 6px; font-size: var(--step-3); font-weight: 600; letter-spacing: -0.035em; line-height: 1.08; max-width: 24ch; text-wrap: balance; }
.d-sub { color: var(--ink-2); font-size: var(--step-0); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.d-sub .sep { color: var(--ink-3); }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.review-bar {
  display: flex;
  justify-content: space-between;
  gap: var(--space-s);
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  margin-bottom: var(--space-m);
}
.review-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 14rem;
}
.review-bar-pill {
  flex: none;
}
.review-bar .txt {
  font-size: var(--step--1);
  color: var(--ink-2);
  line-height: 1.35;
}
.review-bar .txt b {
  color: var(--ink);
  font-weight: 600;
}
.review-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.review-bar-actions .btn svg {
  width: 14px;
  height: 14px;
}

.idea-banner {
  display: flex; gap: var(--space-s); align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px var(--space-m); border-radius: var(--radius);
  background: color-mix(in srgb, #8b5cf6 10%, var(--surface));
  border: 1px solid color-mix(in srgb, #8b5cf6 25%, transparent);
  box-shadow: var(--shadow-1); margin-bottom: var(--space-m);
}
.idea-banner .txt { flex: 1; min-width: 14rem; font-size: var(--step--1); color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
.idea-banner .txt strong { color: var(--ink); font-weight: 600; font-size: var(--step-0); }

.detail-visual {
  position: relative;
  width: 100%;
}
.visual-crossfade-stage {
  position: relative;
  width: 100%;
}

.stage {
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  background-color: var(--canvas);
  background-image: radial-gradient(circle, var(--canvas-dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), var(--shadow-1);
  padding: clamp(var(--space-m), 2.8vw, var(--space-xl));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, clamp(300px, 40vw, 500px)), 1fr));
  gap: clamp(var(--space-m), 3.2vw, var(--space-xl));
  justify-items: center;
  align-items: start;
  margin-bottom: var(--space-l);
}
.variant {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  width: 100%;
  max-width: 520px;
  min-width: 0;
  margin: 0;
  align-items: center;
}
.v-frame {
  position: relative;
  border-radius: var(--radius);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: none;
}
.v-frame img {
  max-width: 100%;
  max-height: min(72vh, 740px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 48px -14px rgba(0, 0, 0, 0.38), 0 0 0 1px var(--line);
  cursor: zoom-in;
  display: block;
}
.v-frame .wire {
  width: 100%;
  max-width: 480px;
  height: auto;
  aspect-ratio: 320 / 336;
  color: var(--ink);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--wf-paper, var(--surface));
  display: block;
  box-shadow: 0 20px 44px -12px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.v-frame .wire:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 52px -12px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.v-frame.is-wireframe {
  padding: 0;
  background: none;
  outline: none;
}
.v-frame.drop.over {
  outline: 2px dashed var(--focus);
  outline-offset: 4px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--focus) 8%, transparent);
}
.v-upload {
  position: absolute;
  inset: auto 0 14px 0;
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.v-frame:hover .v-upload,
.v-frame:focus-within .v-upload {
  opacity: 1;
}
.v-cap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.v-cap .k {
  font-family: var(--font-num);
  font-size: var(--step--1);
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  flex: none;
  background: var(--hover);
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.v-cap .k.is-ctrl {
  background: var(--wf-coral, #f27b93);
  color: var(--wf-on-fill, #14161b);
  border-color: color-mix(in srgb, var(--ink) 16%, transparent);
}
.v-cap .k.is-var,
.v-cap .k.is-win {
  background: var(--wf-green, #6fd957);
  color: var(--wf-on-fill, #14161b);
  border-color: color-mix(in srgb, var(--ink) 16%, transparent);
}
.v-cap-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
  padding-top: 2px;
}
.v-cap-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.v-cap .name { font-weight: 600; font-size: var(--step-0); color: var(--ink); line-height: 1.35; }
.v-cap .desc { color: var(--ink-2); font-size: var(--step--1); line-height: 1.45; }

.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: var(--space-m); margin-bottom: var(--space-l); }
.summary .block {
  background-color: var(--surface);
  background-image:
    radial-gradient(ellipse 110% 90% at 50% -15%, rgba(55, 95, 185, 0.14) 0%, rgba(20, 26, 42, 0.03) 60%, transparent 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.005) 100%);
  border: 1px solid var(--card-hairline, var(--line));
  border-radius: var(--radius-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--shadow-1);
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.summary .block:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--shadow-2);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .summary .block {
    background-image:
      radial-gradient(ellipse 110% 90% at 50% -15%, rgba(59, 108, 246, 0.05) 0%, transparent 70%),
      linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
    border: 1px solid var(--line);
    box-shadow: 0 1px 3px rgba(17, 18, 20, 0.04), 0 0 0 1px rgba(17, 18, 20, 0.03);
  }
  :root:not([data-theme="dark"]) .summary .block:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
}
:root[data-theme="light"] .summary .block {
  background-image:
    radial-gradient(ellipse 110% 90% at 50% -15%, rgba(59, 108, 246, 0.05) 0%, transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(17, 18, 20, 0.04), 0 0 0 1px rgba(17, 18, 20, 0.03);
}
:root[data-theme="light"] .summary .block:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.block {
  background-color: var(--surface);
  background-image: var(--surface-sheen, none);
  border: 1px solid var(--card-hairline, var(--line));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}
.block p { margin: 0; font-size: var(--step-0); line-height: 1.55; }
.block p.muted { color: var(--ink-3); }
.result-n { font-size: var(--step-3); font-weight: 600; letter-spacing: -0.045em; line-height: 1; overflow-wrap: anywhere; }
.result-metric { color: var(--ink-2); font-size: var(--step--1); }
.statline { display: flex; gap: var(--space-xs) var(--space-m); flex-wrap: wrap; margin-top: 6px; font-size: var(--step--1); }
.statline span { color: var(--ink-3); }
.statline b { font-weight: 500; color: var(--ink); }

.two { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--space-m); align-items: start; }
@media (max-width: 900px) { .two { grid-template-columns: minmax(0, 1fr); } }
.score-row { display: flex; align-items: center; gap: var(--space-m); flex-wrap: wrap; }
.dial { position: relative; width: clamp(88px, 7vw, 110px); aspect-ratio: 1; flex: none; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial .lbl { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dial .lbl b { font-size: var(--step-2); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.dial .lbl span { font-size: var(--step--2); color: var(--ink-3); margin-top: 2px; }
.score-txt { flex: 1; min-width: 12rem; }
.score-txt h3 { margin: 0 0 2px; font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; }
.score-txt p { margin: 0; color: var(--ink-2); font-size: var(--step--1); }
.checks { list-style: none; margin: var(--space-s) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 6px var(--space-m); }
.checks li { display: flex; gap: 9px; align-items: center; font-size: var(--step--1); color: var(--ink-2); }
.checks li.ok { color: var(--ink); }
.tick { width: 18px; height: 18px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--ev-track); color: var(--ink-3); }
.checks li.ok .tick { background: var(--pos); color: var(--on-ink); }
.tick svg { width: 11px; height: 11px; }
details.more { margin-top: var(--space-s); border-top: 1px solid var(--line); padding-top: var(--space-s); }
details.more summary { cursor: pointer; list-style: none; font-size: var(--step--1); font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.25s var(--ease); }
details.more[open] summary::before { transform: rotate(45deg); }
.bars { display: flex; flex-direction: column; gap: 10px; margin-top: var(--space-s); }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) clamp(60px, 26%, 160px) 3.2rem; gap: 12px; align-items: center; font-size: var(--step--1); }
.bar-row small { display: block; color: var(--ink-3); font-size: var(--step--2); }
.bar-row .meter { height: 5px; }
.bar-row .v { text-align: right; color: var(--ink-2); font-size: var(--step--2); }
.flags { display: flex; flex-direction: column; gap: 6px; margin-top: var(--space-s); }
.flag { display: flex; gap: 8px; align-items: flex-start; font-size: var(--step--1); padding: 8px 10px; border-radius: var(--radius-s); background: var(--mix-soft); color: var(--mix); }
.flag.bad { background: var(--neg-soft); color: var(--neg); }
.flag svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

/* Psychology & Reality Check + Mechanism Pairings */
.psych-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.psych-lead {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.psych-motif {
  flex: 0 0 96px;
  max-width: 104px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-s);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.psych-main {
  flex: 1 1 200px;
  min-width: 0;
  font-size: var(--step--1);
}
.psych-main h3 {
  margin: 0 0 6px;
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.psych-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.psych-directives {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.psych-rule {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  font-size: var(--step--1);
  line-height: 1.45;
  color: var(--ink-2);
}
.psych-rule.do {
  color: var(--ink);
}
.psych-rule-ico {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  flex: none;
}
.psych-rule.do .psych-rule-ico {
  background: var(--pos-soft);
  color: var(--pos);
}
.psych-rule.warn .psych-rule-ico {
  background: var(--neg-soft);
  color: var(--neg);
}
.psych-rule-ico svg {
  width: 11px;
  height: 11px;
}
.psych-rule-lbl {
  font-weight: 600;
  color: var(--ink);
  margin-right: 4px;
}

.pairing-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  background: var(--hover);
  border: 1px solid var(--line);
  border-left: 2.5px solid var(--pos);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pairing-banner.clash {
  border-left-color: var(--neg);
}
.pairing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.pairing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--step--2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pos);
}
.pairing-banner.clash .pairing-kicker {
  color: var(--neg);
}
.pairing-kicker svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.pairing-stat {
  font-size: var(--step--2);
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.pairing-title {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.pairing-desc {
  margin: 0 !important;
  font-size: var(--step--1) !important;
  color: var(--ink-2);
  line-height: 1.45 !important;
}
.pairing-sec-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--step--2);
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.pairing-sec-h.pos svg { color: var(--pos); }
.pairing-sec-h.neg svg { color: var(--neg); }
.pairing-sec-h svg { width: 13px; height: 13px; flex: none; }

/* Behavioral Playbook Section */
.playbook-sec {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
  border: 1px solid var(--line);
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  margin-bottom: var(--space-l);
}

/* Nuggets Strip */
.nuggets-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: var(--space-s);
  border-bottom: 1px solid var(--line);
}
.nuggets-h {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nuggets-title {
  font-size: var(--step--2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2);
}
.nuggets-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nugget-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--hover);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-size: var(--step--1);
}
.nugget-note {
  flex: 1;
  min-width: 0;
  color: var(--ink-2);
  font-size: var(--step--1);
  line-height: 1.4;
}
.nugget-parent {
  flex: none;
  font-size: var(--step--2);
}

/* Pairings Grid */
.pairings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--space-m);
  align-items: start;
}
.pairings-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.pairings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.pairing-card {
  background: var(--hover);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.pairing-card:hover {
  border-color: var(--line-2);
}
.pairing-card-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.pairing-card-title {
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.pairing-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 3px;
}
.pairing-formula {
  font-size: var(--step--2);
  color: var(--ink-2);
}
.pairing-formula b {
  color: var(--ink);
  font-weight: 600;
}
.pairing-stat-pill {
  font-size: var(--step--2);
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex: none;
}
.pill.sm {
  font-size: var(--step--2);
  padding: 1px 7px;
}

/* Clean aligned Implementation / Guardrail directive row (no tinted callout box) */
.pairing-directive {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
  line-height: 1.45;
}
.pairing-dir-ico {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  flex: none;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}
.pairing-dir-ico.pos {
  color: var(--pos);
}
.pairing-dir-ico.neg {
  color: var(--neg);
}
.pairing-dir-ico svg {
  width: 11px;
  height: 11px;
}
.pairing-dir-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pairing-dir-lbl {
  font-size: var(--step--2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.pairing-dir-txt {
  color: var(--ink);
  font-weight: 500;
}
.pairing-why {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-2);
  line-height: 1.48;
}
.pairing-card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 2px;
  margin-top: auto;
}
.pairing-action-btn {
  border: 0;
  background: none;
  padding: 2px 0;
  font-size: var(--step--2);
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s, transform 0.15s;
}
.pairing-action-btn:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pairing-action-btn svg {
  width: 12px;
  height: 12px;
}

.links-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.lrow { display: flex; gap: 10px; align-items: center; border: 0; background: var(--hover); border-radius: var(--radius-s); padding: 10px 12px; text-align: left; width: 100%; transition: background 0.2s; }
.lrow:hover { background: var(--press); }
.lrow .t { flex: 1; min-width: 0; font-size: var(--step--1); font-weight: 500; }
.lrow .t small { display: block; color: var(--ink-2); font-weight: 400; }
dl.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px var(--space-m); margin: 4px 0 0; font-size: var(--step--1); }
dl.facts dt { color: var(--ink-3); }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
dl.facts a { color: var(--ink); text-underline-offset: 3px; }
.note { font-size: var(--step--1); color: var(--ink-2); }

/* Learning detail */
.d-sub-label {
  font-size: var(--step--2);
  color: var(--ink-3);
  margin-left: 2px;
}
.lhero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: var(--space-l);
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
  padding: var(--space-l);
  margin-bottom: var(--space-l);
}
@media (max-width: 760px) {
  .lhero { grid-template-columns: minmax(0, 1fr); }
}
.lhero-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  min-width: 0;
}
.lhero-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
@media (max-width: 560px) {
  .lhero-top { flex-direction: column; }
}
.lhero-motif {
  flex: 0 0 118px;
  width: 118px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-s);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--canvas);
}
.lhero-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lhero .statement {
  margin: 0;
  font-size: var(--step-1);
  line-height: 1.42;
  color: var(--ink);
  font-weight: 500;
  max-width: 58ch;
  letter-spacing: -0.015em;
}
.build {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}
.build .stack { height: 10px; border-radius: 5px; }
.build-legend { display: flex; gap: var(--space-m); flex-wrap: wrap; font-size: var(--step--2); color: var(--ink-2); }
.build-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.build-legend b { color: var(--ink); font-weight: 600; }

.lhero-proofs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.lhero-proofs-lbl {
  font-size: var(--step--2);
  color: var(--ink-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lhero-proofs-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lhero-proof-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--hover);
  color: var(--ink);
  font-size: var(--step--2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.lhero-proof-chip:hover {
  border-color: var(--line-2);
  background: var(--surface);
  transform: translateY(-1px);
}
.lhero-proof-co {
  font-weight: 500;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lhero-proof-eff {
  font-weight: 600;
  color: var(--pos);
}

.lhero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.lhero-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding-left: var(--space-m);
  border-left: 1px solid var(--line);
}
@media (max-width: 760px) {
  .lhero-side {
    flex-direction: row;
    text-align: left;
    padding-left: 0;
    padding-top: var(--space-m);
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
.next-step {
  margin: 0;
  font-size: var(--step--2);
  line-height: 1.45;
  color: var(--ink-2);
  display: flex;
  gap: 7px;
  align-items: flex-start;
  text-align: left;
}
.next-step svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--ink-3); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-s); margin: var(--space-l) 0 var(--space-s); }
.sec-h h2 { margin: 0; font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; }
.sec-h span { color: var(--ink-3); font-size: var(--step--1); }

/* Gaps */
.matrix-wrap { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-1); padding: var(--space-s); overflow-x: auto; }
table.matrix { border-collapse: separate; border-spacing: 4px; width: 100%; min-width: 680px; font-size: var(--step--1); }
.matrix th { font-weight: 500; color: var(--ink-3); font-size: var(--step--2); text-align: center; padding: 6px 4px; letter-spacing: 0.02em; }
.matrix th.rh { text-align: left; color: var(--ink); font-size: var(--step--1); white-space: nowrap; padding-right: 12px; }
.matrix td { height: 52px; border-radius: 10px; text-align: center; vertical-align: middle; }
.matrix td.gap { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--hover) 6px 7px); color: var(--ink-3); }
.matrix td.has { cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.matrix td.has:hover { transform: scale(1.04); box-shadow: 0 0 0 2px var(--ink); }
.matrix td b { display: block; font-size: var(--step-0); font-weight: 600; }
.matrix td span { display: block; font-size: var(--step--2); opacity: 0.8; }
.seg { display: inline-flex; background: var(--hover); padding: 3px; border-radius: 999px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 13px; border-radius: 999px; font-size: var(--step--1); font-weight: 500; color: var(--ink-2); transition: background 0.2s, color 0.2s; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* Related experiments & continuous exploration */
.card-match {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--step--2);
  font-weight: 600;
  color: var(--focus);
  background: color-mix(in srgb, var(--focus) 10%, transparent);
  padding: 2px 7px;
  border-radius: var(--radius-s);
  width: fit-content;
  margin-bottom: 4px;
}
.prior-art-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--focus);
  padding: var(--space-s) var(--space-m);
  border-radius: var(--radius-s);
  font-size: var(--step--1);
  color: var(--ink-2);
  line-height: 1.5;
  margin-top: var(--space-xs);
}
.prior-art-box strong {
  color: var(--ink);
  font-weight: 600;
}
.exploration-guide {
  margin-top: var(--space-l);
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
  padding: var(--space-m) var(--space-l);
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}
.exploration-guide .eg-header h3 {
  margin: 2px 0 0;
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.eg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--space-m);
}
.eg-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-s) var(--space-m);
  background: var(--hover);
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
}
.eg-card .eg-num {
  font-size: var(--step--2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.eg-card strong {
  font-size: var(--step--1);
  color: var(--ink);
  font-weight: 600;
}
.eg-card p {
  margin: 0;
  font-size: var(--step--2);
  color: var(--ink-2);
  line-height: 1.45;
}

/* ---------- PDP Sticky Scroll Header ---------- */
.pdp-sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px -4px rgba(17, 18, 20, 0.08);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.pdp-sticky-bar.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pdp-sticky-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  height: 48px;
  min-width: 0;
}

.pdp-sticky-back {
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  font-size: var(--step--1);
  font-weight: 500;
  padding: 6px 8px 6px 0;
  border-radius: var(--radius-s);
  cursor: pointer;
  flex: none;
  transition: color 0.15s, transform 0.15s;
}

.pdp-sticky-back:hover {
  color: var(--ink);
}

.pdp-sticky-back:active {
  transform: scale(0.94);
}

.pdp-sticky-back svg {
  width: 14px;
  height: 14px;
}

.pdp-sticky-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  padding: 4px 6px;
  margin-left: -4px;
  border-radius: var(--radius-s);
  transition: background 0.15s;
}

.pdp-sticky-info:hover {
  background: var(--hover);
}

.pdp-sticky-info:active {
  background: var(--press);
}

.pdp-sticky-company {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  font-size: var(--step--2);
  color: var(--ink-2);
}

.pdp-sticky-company b {
  font-weight: 600;
  color: var(--ink);
}

.pdp-sticky-title {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 0;
}

.pdp-sticky-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.pdp-sticky-pill {
  flex: 0 0 auto;
  white-space: nowrap;
}

.pdp-sticky-outcome-lbl {
  opacity: 0.85;
}

/* Desktop positioning: sits right below sticky topbar */
@media (min-width: 761px) {
  .pdp-sticky-bar {
    top: var(--topbar-h, 60px);
  }
}

/* Mobile responsive adjustments */
@media (max-width: 760px) {
  .crumbs {
    margin-bottom: 6px;
    font-size: var(--step--2);
    gap: 4px;
  }
  .crumbs svg {
    width: 12px;
    height: 12px;
  }

  .d-head {
    flex-direction: column;
    gap: 10px;
    margin-bottom: var(--space-s);
  }
  .d-head h1 {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem);
    line-height: 1.15;
    margin: 0 0 4px;
    max-width: 100%;
    letter-spacing: -0.025em;
  }
  .d-sub {
    font-size: var(--step--1);
    gap: 4px 6px;
    line-height: 1.3;
  }
  .d-sub .company-tag {
    gap: 4px;
  }
  .d-actions {
    width: 100%;
    display: flex;
    gap: 6px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .d-actions::-webkit-scrollbar {
    display: none;
  }
  .d-actions .btn {
    height: 32px;
    padding: 0 10px;
    font-size: var(--step--2);
    white-space: nowrap;
    flex: 1 0 auto;
    justify-content: center;
  }
  .d-actions .d-domain {
    display: none;
  }

  .review-bar {
    padding: 8px 10px;
    margin-bottom: var(--space-s);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .review-bar-info {
    min-width: 0;
    gap: 6px;
  }
  .review-bar .txt {
    font-size: var(--step--2);
    line-height: 1.25;
  }
  .review-bar-actions {
    width: 100%;
    display: flex;
    gap: 6px;
  }
  .review-bar-actions .btn {
    flex: 1;
    justify-content: center;
    height: 32px;
    padding: 0 4px;
    font-size: var(--step--2);
  }

  .idea-banner {
    padding: 10px 12px;
    margin-bottom: var(--space-s);
    gap: 8px;
  }
  .idea-banner .txt {
    min-width: 0;
    font-size: var(--step--2);
  }
  .idea-banner .txt strong {
    font-size: var(--step--1);
  }
  .idea-banner div:last-child {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .idea-banner div:last-child .btn {
    width: 100%;
    justify-content: center;
  }

  .viz-bar {
    margin-bottom: 6px;
    gap: 6px;
  }
  .viz-bar .seg button {
    padding: 4px 10px;
    font-size: var(--step--2);
    height: 28px;
  }
  .viz-bar button[data-focus] {
    padding: 4px 8px;
    font-size: var(--step--2);
    height: 28px;
  }

  .art-frame {
    margin-bottom: var(--space-m);
  }
  .stage {
    padding: var(--space-s);
    gap: var(--space-s);
    margin-bottom: var(--space-m);
  }
  .summary {
    gap: var(--space-s);
    margin-bottom: var(--space-m);
  }

  .pdp-sticky-bar {
    top: 0 !important;
    padding-top: env(safe-area-inset-top, 0px);
  }
  .pdp-sticky-wrap {
    height: 48px;
    gap: 6px;
    padding-inline: 12px;
  }
  .pdp-sticky-back-txt {
    display: none;
  }
  .pdp-sticky-back {
    padding: 6px 4px;
    flex-shrink: 0;
  }
  .pdp-sticky-company b {
    display: none;
  }
  .pdp-sticky-company {
    flex-shrink: 0;
  }
  .pdp-sticky-share {
    display: none;
  }
  .pdp-sticky-outcome-lbl {
    display: none;
  }
}

@media (max-width: 420px) {
  .pdp-sticky-wrap {
    gap: 4px;
    padding-inline: 8px;
  }
  .pdp-sticky-title {
    font-size: var(--step--2);
  }
  .pdp-sticky-pill {
    padding-inline: 7px;
    font-size: 0.72rem;
  }
}



/* Breadcrumb + actions share one row so the title gets full width */
.d-top { display: flex; align-items: center; justify-content: space-between; gap: 8px var(--space-m); flex-wrap: wrap; margin-bottom: var(--space-s); }
.d-top .crumbs { margin-bottom: 0; min-width: 0; }
.d-top .d-actions { margin-left: auto; }
.d-head > div { flex-basis: 100%; }
.d-head h1 { max-width: 32ch; }
