:root {
  --frame-margin: 14px;
  --wine-950: #4e0602;
  --wine-900: #650800;
  --wine-800: #7f0c03;
  --wine-700: #9b1508;
  --source-burgundy: #700b06;
  --gold-500: #ffcc3d;
  --gold-300: #ffe08a;
  --cream-100: #fff6d8;
  --cream-200: #fff1c5;
  --cream-300: #edcf80;
  --paper: #fffaf0;
  --ink: #24100c;
  --muted: #704834;
  --line: #d4a84e;
  --blue: #517fa8;
  --green: #7b9d45;
  --rose: #bb6d6b;
  --shadow: 0 18px 44px rgba(89, 43, 8, 0.13);
}

/* Schema overview additions */
.schema-hero {
  background:
    linear-gradient(120deg, rgba(255, 204, 61, 0.2), transparent 38%),
    radial-gradient(circle at 82% 22%, rgba(255, 224, 138, 0.2), transparent 26%),
    linear-gradient(135deg, var(--wine-900), var(--wine-950));
}

.schema-map-section,
.schema-findings-section,
.schema-evidence-section {
  padding: 18px;
  background: rgba(255, 241, 197, 0.55);
  border: 1px solid rgba(212, 168, 78, 0.72);
  border-radius: 8px;
}

.attachment-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.attachment-card,
.schema-theory-panel,
.schema-method-panel,
.hypothesis-card,
.schema-evidence-shell,
.schema-pathway-card,
.schema-takeaway-card {
  background: var(--paper);
  border: 1px solid var(--cream-300);
  border-radius: 8px;
  box-shadow: 0 9px 20px rgba(91, 19, 6, 0.08);
}

.attachment-card {
  display: grid;
  align-content: space-between;
  gap: 14px;
  min-height: 274px;
  padding: 16px;
  border-top: 6px solid var(--wine-800);
}

.attachment-green {
  border-top-color: var(--green);
}

.attachment-rose {
  border-top-color: var(--rose);
}

.attachment-gold {
  border-top-color: var(--gold-500);
}

.attachment-card-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.attachment-card-head > span,
.pathway-list > article > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--wine-950);
  background: var(--gold-500);
  border-radius: 6px;
  font-weight: 900;
}

.attachment-card strong,
.theory-stack strong,
.pathway-list strong {
  display: block;
  color: var(--wine-950);
  line-height: 1.18;
}

.attachment-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.attachment-card h4,
.hypothesis-card h4,
.schema-evidence-detail h4 {
  margin: 0;
  color: var(--wine-900);
  font-size: 1.15rem;
  line-height: 1.15;
}

.attachment-card p,
.theory-stack p,
.pathway-list p,
.schema-evidence-detail p,
.schema-takeaway-card li,
.hypothesis-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.43;
}

.attachment-meter {
  display: grid;
  gap: 7px;
}

.attachment-meter i {
  display: block;
  height: 10px;
  overflow: hidden;
  background: rgba(112, 11, 6, 0.13);
  border-radius: 999px;
}

.attachment-meter em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--wine-800), var(--gold-500));
  border-radius: inherit;
}

.attachment-meter b {
  color: var(--wine-900);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.schema-two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
  gap: 14px;
}

.schema-theory-panel,
.schema-method-panel,
.schema-pathway-card,
.schema-takeaway-card {
  padding: 16px;
}

.theory-stack,
.method-card-grid,
.pathway-list {
  display: grid;
  gap: 10px;
}

.theory-stack article,
.method-card-grid div,
.pathway-list article {
  padding: 13px;
  background: #fff7df;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-radius: 8px;
}

.theory-stack article {
  display: grid;
  gap: 6px;
  border-left: 5px solid var(--wine-800);
}

.method-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.method-card-grid div {
  min-height: 112px;
}

.method-card-grid span,
.schema-evidence-detail span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.method-card-grid strong {
  display: block;
  margin-top: 9px;
  color: var(--wine-950);
  font-size: 1.03rem;
  line-height: 1.22;
}

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

.hypothesis-card {
  display: grid;
  gap: 10px;
  min-height: 224px;
  padding: 16px;
  border-left: 6px solid var(--wine-800);
}

.hypothesis-card span {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  padding: 6px 9px;
  color: var(--wine-950);
  background: var(--gold-300);
  border: 1px solid var(--cream-300);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-not-supported {
  border-left-color: var(--rose);
}

.status-partially-supported {
  border-left-color: var(--blue);
}

.schema-evidence-shell {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

.schema-evidence-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: linear-gradient(90deg, var(--wine-900), var(--wine-950));
  border-bottom: 1px solid rgba(255, 224, 138, 0.25);
}

.schema-evidence-tab {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--cream-100);
  text-align: center;
  background: rgba(255, 246, 216, 0.09);
  border: 1px solid rgba(255, 224, 138, 0.12);
  border-bottom: 3px solid transparent;
  border-radius: 5px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.18;
}

.schema-evidence-tab:hover,
.schema-evidence-tab.is-active {
  color: var(--gold-500);
  background: rgba(255, 204, 61, 0.12);
  border-color: rgba(255, 224, 138, 0.24);
  border-bottom-color: var(--gold-500);
}

.schema-evidence-detail {
  display: grid;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 0.58fr);
  min-height: 390px;
  background: linear-gradient(180deg, #fff7df, #fff1c5);
}

.schema-evidence-detail figure {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.schema-evidence-detail img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid rgba(212, 168, 78, 0.7);
  border-radius: 7px;
  box-shadow: 0 12px 24px rgba(91, 19, 6, 0.1);
}

.schema-evidence-detail > div {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 24px;
  border-left: 0;
}

.schema-evidence-detail .generated-scheme {
  align-content: stretch;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 246, 216, 0.72), rgba(255, 250, 240, 0.94)),
    #fffaf0;
  border-left: 1px solid rgba(212, 168, 78, 0.72);
}

.scheme-board {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(210px, 0.65fr);
  gap: 14px;
  height: 100%;
}

.scheme-board-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 9px 12px;
  color: var(--wine-950);
  background:
    linear-gradient(90deg, rgba(255, 204, 61, 0.22), rgba(255, 250, 240, 0.94)),
    #fff7df;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-left: 6px solid var(--gold-500);
  border-radius: 8px;
}

.scheme-board-head span {
  color: var(--wine-900);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.scheme-board-head strong {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  color: var(--wine-950);
  background: var(--gold-500);
  border: 1px solid var(--gold-300);
  border-radius: 6px;
  font-size: 0.88rem;
  box-shadow: 0 7px 14px rgba(91, 19, 6, 0.08);
}

.scheme-bars {
  display: grid;
  gap: 10px;
}

.scheme-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  background: #fff7df;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-left: 6px solid var(--wine-800);
  border-radius: 8px;
}

.scheme-tone-green {
  border-left-color: var(--green);
}

.scheme-tone-rose {
  border-left-color: var(--rose);
}

.scheme-tone-gold {
  border-left-color: var(--gold-500);
}

.scheme-tone-blue {
  border-left-color: var(--blue);
}

.scheme-row-label strong,
.scheme-cluster-item strong,
.profile-node strong {
  display: block;
  color: var(--wine-950);
  line-height: 1.14;
}

.scheme-row-label span,
.schema-cluster-item small,
.profile-node span,
.scheme-bar span,
.scheme-stats span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.scheme-row-bars {
  display: grid;
  gap: 8px;
}

.scheme-bar {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: center;
}

.scheme-bar i {
  display: block;
  height: 10px;
  overflow: hidden;
  background: rgba(112, 11, 6, 0.13);
  border-radius: 999px;
}

.scheme-bar em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--wine-800), var(--gold-500));
  border-radius: inherit;
}

.spread-bar em {
  background: linear-gradient(90deg, var(--blue), var(--rose));
}

.scheme-bar b {
  color: var(--wine-900);
  font-size: 0.8rem;
  text-align: right;
}

.scheme-stats {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scheme-stats span {
  min-height: 24px;
  padding: 5px 7px;
  background: rgba(255, 224, 138, 0.45);
  border: 1px solid rgba(212, 168, 78, 0.56);
  border-radius: 5px;
}

.profile-constellation,
.schema-cluster {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 100%;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 204, 61, 0.14), rgba(255, 250, 240, 0.92)),
    #fffaf0;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-radius: 8px;
}

.profile-constellation {
  align-content: stretch;
  grid-template-rows: minmax(76px, 0.95fr) repeat(4, minmax(48px, 1fr));
}

.schema-cluster {
  align-content: stretch;
  grid-auto-rows: minmax(58px, 1fr);
}

.profile-core {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  text-align: left;
  color: #fff8dc;
  background:
    linear-gradient(135deg, rgba(255, 204, 61, 0.13), transparent 45%),
    linear-gradient(135deg, var(--wine-900), var(--wine-950));
  border: 1px solid rgba(255, 224, 138, 0.38);
  border-radius: 8px;
}

.profile-core-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--wine-950);
  background: var(--gold-500);
  border: 1px solid var(--gold-300);
  border-radius: 8px;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 -8px 14px rgba(112, 11, 6, 0.08);
}

.profile-core span {
  color: var(--gold-300);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-core strong {
  display: block;
  margin-top: 3px;
  color: #fff8dc;
  font-size: 1.15rem;
  line-height: 1.1;
}

.profile-core small {
  display: block;
  margin-top: 5px;
  color: #f7dfac;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.profile-node,
.schema-cluster-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  align-content: center;
  padding: 10px;
  background: #fff7df;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-left-width: 6px;
  border-radius: 8px;
}

.profile-node {
  grid-template-columns: minmax(0, 1fr) 56px;
}

.profile-node strong {
  color: var(--wine-900);
  font-size: 1.25rem;
  text-align: right;
}

.schema-cluster-item > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--wine-950);
  background: var(--gold-500);
  border-radius: 6px;
  font-weight: 900;
}

.scheme-copy {
  background:
    linear-gradient(180deg, rgba(255, 241, 197, 0.58), rgba(255, 246, 216, 0.84)),
    #fff1c5;
}

.scheme-callouts {
  display: grid;
  gap: 9px;
  margin-top: 6px;
}

.scheme-callouts article {
  padding: 10px;
  background: rgba(255, 250, 240, 0.78);
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-radius: 7px;
}

.scheme-callouts small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.scheme-callouts strong {
  display: block;
  margin-top: 4px;
  color: var(--wine-950);
  line-height: 1.18;
}

.scheme-note {
  padding: 10px;
  background: rgba(101, 8, 0, 0.07);
  border-left: 4px solid var(--gold-500);
  border-radius: 6px;
  font-weight: 800;
}

.pathway-list article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
}

.schema-takeaway-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.schema-takeaway-card li::marker {
  color: var(--wine-900);
}

@media (max-width: 1180px) {
  .attachment-map,
  .hypothesis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .schema-two-column,
  .schema-evidence-detail,
  .scheme-board {
    grid-template-columns: 1fr;
  }

  .schema-evidence-detail > div {
    border-left: 0;
    border-top: 0;
  }

  .schema-evidence-detail .generated-scheme {
    border-left: 0;
    border-top: 1px solid rgba(212, 168, 78, 0.72);
  }
}

@media (max-width: 760px) {
  .attachment-map,
  .hypothesis-grid,
  .method-card-grid,
  .schema-evidence-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .schema-map-section,
  .schema-findings-section,
  .schema-evidence-section,
  .schema-theory-panel,
  .schema-method-panel,
  .schema-pathway-card,
  .schema-takeaway-card,
  .attachment-card,
  .hypothesis-card,
  .schema-evidence-nav,
  .schema-evidence-detail figure,
  .schema-evidence-detail > div {
    padding: 14px;
  }

  .schema-evidence-detail {
    min-height: 0;
  }

  .scheme-row,
  .scheme-bar,
  .profile-core,
  .profile-node,
  .schema-cluster-item {
    grid-template-columns: 1fr;
  }

  .scheme-bar span,
  .scheme-bar b,
  .profile-node strong {
    text-align: left;
  }

  .profile-core-mark {
    width: 46px;
    height: 46px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--cream-100);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

button,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
}

h2,
h3,
h4,
h5,
p,
li,
dd {
  overflow-wrap: anywhere;
}

.page-header {
  margin: 8px var(--frame-margin) 0;
  min-height: 302px;
  padding: 8px;
  background: var(--source-burgundy);
  border-radius: 14px;
  overflow: hidden;
}

.image-banner {
  display: grid;
  place-items: center start;
  min-height: 286px;
  background: var(--source-burgundy);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
}

.image-banner img {
  display: block;
  width: min(1120px, 100%);
  height: auto;
  max-width: 1120px;
}

.app-layout {
  min-height: calc(100vh - 390px);
  margin: 18px var(--frame-margin) 24px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--cream-100);
  box-shadow: var(--shadow);
}

.side-panel {
  padding: 22px;
  color: var(--cream-100);
  background: linear-gradient(180deg, var(--wine-900), var(--wine-950));
  box-shadow: inset -1px 0 0 rgba(255, 231, 163, 0.18);
}

.side-title {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 224, 138, 0.25);
}

.side-title span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--gold-500);
  border-radius: 6px;
  font-weight: 900;
}

.section-tabs {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.tab-button {
  padding: 12px 10px;
  color: var(--cream-100);
  text-align: left;
  background: transparent;
  border-left: 3px solid transparent;
  border-radius: 4px;
}

.tab-button:hover,
.tab-button.is-active {
  color: var(--gold-500);
  background: rgba(255, 204, 61, 0.09);
  border-left-color: var(--gold-500);
}

.content-stage {
  min-width: 0;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(112, 11, 6, 0.06), rgba(112, 11, 6, 0) 96px),
    var(--cream-100);
}

.stage-top {
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--wine-800);
  font-size: 0.77rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stage-top h2 {
  margin: 0;
  color: var(--wine-950);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
}

.article-subtitle {
  max-width: 980px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.35;
}

.article-authors {
  display: block;
  margin-top: 3px;
  color: var(--wine-800);
}

.article-authors strong {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.content-panel {
  display: none;
}

.content-panel.is-visible {
  display: block;
}

.paper-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  min-height: 310px;
  overflow: hidden;
  color: #fff8dc;
  background:
    linear-gradient(120deg, rgba(255, 204, 61, 0.18), transparent 42%),
    linear-gradient(135deg, var(--wine-900), var(--wine-950));
  border: 1px solid var(--cream-300);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(91, 19, 6, 0.14);
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 30px;
}

.kicker,
.keyword-row span,
.finding-card > span,
.evidence-copy-block span {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  padding: 7px 10px;
  color: var(--wine-950);
  background: var(--gold-300);
  border: 1px solid var(--cream-300);
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-copy h3 {
  max-width: 820px;
  margin: 0;
  color: #fff8dc;
  font-size: clamp(1.8rem, 3.1vw, 2.75rem);
  line-height: 1.08;
}

.hero-copy p {
  max-width: 780px;
  margin: 0;
  color: #f5d9a0;
  font-size: 1.04rem;
  line-height: 1.48;
}

.article-link-button {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  color: var(--wine-950);
  background: var(--gold-500);
  border: 1px solid var(--gold-300);
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(36, 16, 12, 0.18);
}

.article-link-button:hover {
  background: var(--gold-300);
}

.hero-facts {
  padding: 22px;
  background: rgba(255, 246, 216, 0.09);
  border-left: 1px solid rgba(255, 224, 138, 0.22);
}

.hero-facts dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.hero-facts div {
  padding: 13px;
  background: rgba(255, 246, 216, 0.13);
  border: 1px solid rgba(255, 224, 138, 0.24);
  border-radius: 7px;
}

.hero-facts dt {
  color: var(--gold-300);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-facts dd {
  margin: 5px 0 0;
  color: #fff8dc;
  line-height: 1.35;
}

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

.metric-card,
.lens-card,
.section-card,
.finding-card,
.relationship-panel,
.dimension-panel,
.evidence-switcher,
.table-card {
  background: var(--paper);
  border: 1px solid var(--cream-300);
  border-radius: 8px;
  box-shadow: 0 9px 20px rgba(91, 19, 6, 0.08);
}

.metric-card {
  min-height: 112px;
  padding: 14px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  color: var(--wine-900);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1;
}

.metric-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.28;
}

.overview-section {
  margin-top: 22px;
}

.compact-section,
.visual-section,
.table-map-section {
  padding: 18px;
  background: rgba(255, 241, 197, 0.55);
  border: 1px solid rgba(212, 168, 78, 0.72);
  border-radius: 8px;
}

.section-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.section-heading span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--wine-950);
  background: var(--gold-500);
  border-radius: 6px;
  font-weight: 900;
}

.section-heading h3 {
  margin: 0;
  color: var(--wine-950);
  font-size: 1.35rem;
}

.small-heading {
  margin-bottom: 10px;
}

.small-heading span {
  width: 30px;
  height: 30px;
  font-size: 0.85rem;
}

.lens-grid,
.finding-grid,
.split-evidence-section,
.bottom-grid {
  display: grid;
  gap: 14px;
}

.lens-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(330px, 1.1fr);
}

.finding-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split-evidence-section,
.bottom-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.lens-card,
.section-card,
.finding-card,
.relationship-panel,
.dimension-panel {
  padding: 16px;
}

.relationship-panel {
  display: grid;
  align-content: stretch;
  min-width: 0;
  overflow: hidden;
}

.lens-card h4,
.finding-card h4,
.evidence-copy-block h4 {
  margin: 0 0 9px;
  color: var(--wine-900);
  font-size: 1.08rem;
}

.lens-card p,
.lens-card li,
.section-card li,
.finding-card p,
.relationship-panel p,
.dimension-item p,
.evidence-copy-block p,
.table-card p {
  color: var(--muted);
  line-height: 1.43;
}

.lens-card p,
.finding-card p,
.relationship-panel p,
.dimension-item p,
.evidence-copy-block p,
.table-card p {
  margin: 0;
}

.lens-card ul,
.section-card ul {
  margin: 0;
  padding-left: 18px;
}

.lens-card li + li,
.section-card li + li {
  margin-top: 7px;
}

.keyword-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.keyword-row span {
  background: #fff6d8;
  width: auto;
  overflow-wrap: anywhere;
  white-space: normal;
}

.comparison-bars {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.comparison-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 13px;
  background: #fff7df;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-radius: 8px;
}

.comparison-label {
  display: grid;
  grid-template-columns: minmax(150px, max-content) minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.relationship-takeaway {
  display: grid;
  grid-template-columns: minmax(145px, 0.32fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 128px;
  padding: 16px;
  color: #fff8dc;
  background:
    linear-gradient(135deg, rgba(255, 204, 61, 0.18), rgba(255, 204, 61, 0)),
    linear-gradient(135deg, var(--wine-900), var(--wine-950));
  border: 1px solid rgba(255, 224, 138, 0.34);
  border-radius: 8px;
}

.relationship-takeaway span {
  display: block;
  color: var(--gold-300);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.relationship-takeaway strong {
  display: block;
  margin-top: 7px;
  color: #fff8dc;
  font-size: clamp(1.75rem, 2.8vw, 2.6rem);
  line-height: 1;
}

.relationship-takeaway p {
  min-width: 0;
  color: #f7dfac;
  line-height: 1.45;
}

.relationship-takeaway ul {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.relationship-takeaway li {
  padding: 8px 10px;
  min-width: 0;
  color: var(--wine-950);
  background: var(--gold-300);
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 900;
}

.comparison-label strong,
.dimension-item strong,
.table-card strong {
  display: block;
  color: var(--wine-950);
}

.comparison-label span {
  display: block;
  margin-top: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.dual-bars {
  display: grid;
  gap: 10px;
  align-content: center;
}

.score-line {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
}

.score-line span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.score-line i,
.dimension-meter i {
  display: block;
  height: 10px;
  overflow: hidden;
  background: rgba(112, 11, 6, 0.13);
  border-radius: 999px;
}

.score-line em,
.dimension-meter em {
  display: block;
  height: 100%;
  background: var(--wine-800);
  border-radius: inherit;
}

.score-line.attitude em {
  background: var(--green);
}

.score-line strong {
  color: var(--wine-900);
  font-size: 0.88rem;
  text-align: right;
}

.dimension-list {
  display: grid;
  gap: 10px;
}

.dimension-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #fff7df;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-radius: 8px;
}

.dimension-item div:first-child {
  display: flex;
  gap: 9px;
  align-items: center;
}

.dimension-item div:first-child span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--wine-950);
  background: var(--gold-300);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
}

.dimension-meter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 10px;
  align-items: center;
}

.dimension-meter b {
  color: var(--wine-900);
  font-size: 0.82rem;
  text-align: right;
}

.finding-card {
  min-height: 214px;
  border-top: 6px solid var(--gold-500);
}

.finding-relationship {
  border-top-color: var(--rose);
}

.finding-demographics {
  border-top-color: var(--blue);
}

.finding-adoption {
  border-top-color: var(--green);
}

.finding-card > span {
  margin-bottom: 12px;
  background: #fff6d8;
}

.finding-card h4 {
  font-size: 1.18rem;
  line-height: 1.18;
}

.evidence-switcher {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
}

.evidence-nav {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 16px;
  background: linear-gradient(180deg, var(--wine-900), var(--wine-950));
}

.evidence-tab {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--cream-100);
  text-align: left;
  background: rgba(255, 246, 216, 0.09);
  border-left: 3px solid transparent;
  border-radius: 5px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.18;
}

.evidence-tab:hover,
.evidence-tab.is-active {
  color: var(--gold-500);
  background: rgba(255, 204, 61, 0.12);
  border-left-color: var(--gold-500);
}

.evidence-detail {
  display: grid;
  grid-template-columns: minmax(240px, 0.45fr) minmax(0, 0.55fr);
  min-height: 354px;
  background: linear-gradient(180deg, #fff7df, #fff1c5);
}

.evidence-image {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.6);
}

.evidence-image img {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  border: 1px solid rgba(212, 168, 78, 0.7);
  border-radius: 7px;
  box-shadow: 0 12px 24px rgba(91, 19, 6, 0.1);
}

.generated-visual {
  display: grid;
  gap: 14px;
  align-content: center;
  min-height: 100%;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 246, 216, 0.88), rgba(255, 255, 255, 0.68)),
    var(--paper);
}

.generated-visual > strong {
  color: var(--wine-950);
  font-size: 1.1rem;
}

.generated-bars,
.generated-means {
  display: grid;
  gap: 12px;
}

.generated-bar {
  display: grid;
  gap: 7px;
}

.generated-bar div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--wine-900);
  font-size: 0.88rem;
  font-weight: 900;
}

.generated-bar span {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.76rem;
}

.generated-bar i {
  display: block;
  height: 12px;
  overflow: hidden;
  background: rgba(112, 11, 6, 0.12);
  border-radius: 999px;
}

.generated-bar em {
  display: block;
  height: 100%;
  background: var(--wine-800);
  border-radius: inherit;
}

.generated-bar.attitude em {
  background: var(--green);
}

.generated-bar.anxiety em {
  background: var(--rose);
}

.generated-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.generated-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 6px 8px;
  color: var(--wine-950);
  background: rgba(255, 224, 138, 0.54);
  border: 1px solid rgba(212, 168, 78, 0.72);
  border-radius: 5px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.generated-legend span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--rose);
}

.generated-legend .legend-attitude::before {
  background: var(--green);
}

.mean-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  background: #fff7df;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-radius: 8px;
}

.mean-card h5 {
  margin: 0;
  color: var(--wine-950);
  font-size: 0.98rem;
}

.generated-correlation {
  place-items: center;
  text-align: center;
}

.correlation-value {
  display: grid;
  place-items: center;
  width: min(190px, 68vw);
  height: min(190px, 68vw);
  color: #fff8dc;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 224, 138, 0.22), transparent 35%),
    linear-gradient(135deg, var(--wine-800), var(--wine-950));
  border: 1px solid var(--cream-300);
  border-radius: 50%;
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(91, 19, 6, 0.18);
}

.correlation-axis {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  color: var(--wine-900);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.correlation-axis i {
  height: 2px;
  background: var(--wine-800);
  position: relative;
}

.correlation-axis i::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  border-left: 2px solid var(--wine-800);
  border-bottom: 2px solid var(--wine-800);
  transform: translateY(-50%) rotate(45deg);
}

.generated-correlation p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.generated-tension {
  align-content: center;
  padding: 18px;
}

.readiness-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  width: 100%;
}

.readiness-center {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 132px;
  padding: 18px;
  color: #fff8dc;
  background:
    linear-gradient(145deg, rgba(255, 204, 61, 0.16), transparent 42%),
    linear-gradient(135deg, var(--wine-900), var(--wine-950));
  border: 1px solid rgba(255, 224, 138, 0.5);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(91, 19, 6, 0.16);
}

.readiness-center span {
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  padding: 7px 9px;
  color: var(--wine-950);
  background: var(--gold-300);
  border: 1px solid var(--cream-300);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.readiness-center strong {
  max-width: 100%;
  color: #fff8dc;
  font-size: clamp(1.12rem, 2vw, 1.55rem);
  line-height: 1.14;
}

.readiness-card-stack {
  display: grid;
  gap: 10px;
}

.readiness-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 5px;
  align-items: start;
  min-height: 88px;
  padding: 12px;
  background: #fff7df;
  border: 1px solid rgba(212, 168, 78, 0.72);
  border-left: 6px solid var(--gold-500);
  border-radius: 8px;
  box-shadow: 0 9px 18px rgba(91, 19, 6, 0.08);
}

.readiness-card-2 {
  border-left-color: var(--rose);
}

.readiness-card-3 {
  border-left-color: var(--green);
}

.readiness-card span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  min-height: 48px;
  min-width: 0;
  color: var(--wine-950);
  background: rgba(255, 224, 138, 0.58);
  border: 1px solid rgba(212, 168, 78, 0.72);
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.readiness-card h5 {
  margin: 0;
  color: var(--wine-950);
  font-size: 0.98rem;
  line-height: 1.18;
}

.readiness-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.32;
}

.tension-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tension-points i {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 7px 10px;
  color: var(--wine-950);
  background: rgba(255, 224, 138, 0.54);
  border: 1px solid rgba(212, 168, 78, 0.72);
  border-radius: 5px;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.evidence-copy-block {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 24px;
  border-left: 1px solid var(--cream-300);
}

.evidence-copy-block h4 {
  color: var(--wine-950);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.09;
}

.table-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.table-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 144px;
  padding: 14px;
}

.table-card > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--wine-950);
  background: var(--gold-500);
  border-radius: 6px;
  font-weight: 900;
}

.table-card p {
  margin-top: 6px;
  font-size: 0.86rem;
  font-weight: 800;
}

.conclusion-card {
  background:
    linear-gradient(135deg, rgba(255, 204, 61, 0.12), rgba(255, 250, 240, 0.9)),
    var(--paper);
}

.explorer-shell {
  display: grid;
  gap: 16px;
}

.explorer-top,
.explorer-grid,
.explorer-side,
.explorer-workspace,
.explorer-facts,
.explorer-stage-body > *,
.explorer-highlight-strip article,
.explorer-intro-card,
.explorer-intro-points article,
.explorer-info-card,
.tool-card,
.quality-card,
.role-card,
.dimension-map-card,
.anova-card,
.story-grid article,
.method-flow article,
.explorer-integrity-note {
  border: 1px solid rgba(255, 224, 138, 0.34);
  box-shadow: 0 16px 34px rgba(91, 19, 6, 0.12);
}

.explorer-top {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 22px;
  color: #fff8dc;
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 204, 61, 0.2), transparent 24%),
    linear-gradient(135deg, var(--wine-900), var(--wine-950));
  border-radius: 8px;
}

.explorer-top h3 {
  margin: 6px 0 0;
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  line-height: 1.03;
}

.explorer-top p {
  max-width: 820px;
  margin: 8px 0 0;
  color: #fff0c2;
  line-height: 1.45;
}

.explorer-grid {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 241, 197, 0.76), rgba(255, 250, 240, 0.72));
  border-radius: 8px;
}

.explorer-side,
.explorer-workspace,
.explorer-facts {
  min-width: 0;
  padding: 14px;
  background: rgba(255, 250, 240, 0.94);
  border-radius: 8px;
}

.explorer-progress,
.explorer-stage-body,
.explorer-facts,
.explorer-facts > div,
.explorer-facts dl {
  display: grid;
  gap: 10px;
}

.explorer-progress-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 45px;
  padding: 7px;
  color: var(--wine-950);
  text-align: left;
  background: #fffaf0;
  border: 1px solid rgba(138, 29, 11, 0.18);
  border-radius: 6px;
}

.explorer-progress-step span {
  display: grid;
  place-items: center;
  height: 31px;
  color: var(--ink);
  background: rgba(255, 204, 61, 0.35);
  border-radius: 5px;
  font-weight: 900;
}

.explorer-progress-step strong {
  font-size: 0.86rem;
  line-height: 1.15;
}

.explorer-progress-step:hover,
.explorer-progress-step.is-active,
.explorer-progress-step.is-done {
  background: var(--gold-500);
}

.explorer-stage-head {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
}

.explorer-stage-head span,
.explorer-facts span,
.explorer-wide-note span,
.tool-card h5,
.quality-card h5,
.anova-card h5,
.role-card-head span,
.participant-total span,
.correlation-readout span,
.story-grid span,
.method-flow span,
.explorer-info-card span,
.explorer-highlight-strip span {
  color: var(--wine-900);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.explorer-stage-head h4 {
  margin: 4px 0;
  color: var(--wine-950);
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.06;
}

.explorer-stage-head p {
  max-width: 800px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.explorer-stage-head > strong {
  white-space: nowrap;
  color: var(--wine-900);
}

.explorer-stage-body > * {
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 246, 216, 0.8), rgba(255, 250, 240, 0.97));
  border-radius: 8px;
}

.explorer-landing-card {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 1.08fr);
  gap: 16px;
  align-items: center;
  color: #fff8dc;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 204, 61, 0.22), transparent 32%),
    linear-gradient(135deg, var(--wine-900), var(--wine-950));
}

.explorer-landing-copy h5 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(1.65rem, 3vw, 3rem);
  line-height: 1.02;
}

.explorer-landing-copy p {
  margin: 12px 0 0;
  color: #fff0c2;
  line-height: 1.45;
}

.explorer-primary-action,
.explorer-actions button,
.explorer-pill-nav button {
  min-height: 38px;
  padding: 9px 12px;
  color: var(--wine-950);
  background: #fffaf0;
  border: 1px solid rgba(138, 29, 11, 0.22);
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 900;
}

.explorer-primary-action {
  margin-top: 18px;
  background: var(--gold-500);
}

.explorer-primary-action:hover,
.explorer-actions button:hover,
.explorer-pill-nav button:hover {
  transform: translateY(-1px);
}

.explorer-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.explorer-actions button:disabled {
  cursor: default;
  opacity: 0.48;
  transform: none;
}

.relation-figure,
.correlation-chart {
  display: grid;
  place-items: center;
  margin: 0;
}

.relation-svg,
.correlation-svg {
  width: min(100%, 760px);
  height: auto;
}

.relation-svg rect,
.correlation-svg rect {
  fill: rgba(255, 250, 240, 0.08);
  stroke: rgba(255, 224, 138, 0.28);
}

.relation-svg line,
.correlation-svg line {
  stroke: rgba(255, 224, 138, 0.36);
  stroke-width: 3;
}

.relation-svg path,
.correlation-svg path {
  fill: none;
  stroke: url(#relationGlow);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 700;
  animation: explorerDraw 1.8s ease both;
}

.correlation-svg path {
  stroke: var(--gold-500);
}

.relation-svg circle {
  fill: var(--gold-500);
  stroke: #fff8dc;
  stroke-width: 3;
}

.relation-svg text,
.correlation-svg text {
  fill: #fff8dc;
  font-size: 17px;
  font-weight: 900;
}

.correlation-svg text {
  fill: var(--wine-950);
}

.explorer-highlight-strip,
.explorer-card-grid,
.tool-grid,
.quality-grid,
.role-compare-grid,
.anova-grid,
.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.explorer-highlight-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.explorer-highlight-strip article,
.explorer-info-card,
.tool-card,
.quality-card,
.role-card,
.anova-card,
.story-grid article,
.method-flow article {
  padding: 14px;
  background: #fffaf0;
  border-radius: 8px;
}

.explorer-highlight-strip strong,
.explorer-info-card strong {
  display: block;
  margin-top: 7px;
  color: var(--wine-900);
  font-size: 1.38rem;
  line-height: 1.08;
}

.explorer-highlight-strip p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.explorer-intro-card {
  display: grid;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(255, 204, 61, 0.18), rgba(255, 250, 240, 0.96)),
    #fffaf0;
}

.explorer-intro-card > div:first-child {
  max-width: 980px;
}

.explorer-intro-card span {
  color: var(--wine-900);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.explorer-intro-card h5 {
  margin: 6px 0 0;
  color: var(--wine-950);
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.08;
}

.explorer-intro-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.48;
}

.explorer-intro-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.explorer-intro-points article {
  padding: 13px;
  background: #fffaf0;
  border-radius: 8px;
}

.explorer-intro-points strong {
  color: var(--wine-950);
  font-size: 0.98rem;
}

.explorer-intro-caution {
  padding: 12px;
  color: var(--wine-950);
  background: rgba(101, 8, 0, 0.07);
  border-left: 4px solid var(--gold-500);
  border-radius: 6px;
  font-weight: 800;
}

.explorer-stage-body.is-fallback-animated > * {
  animation: explorerFadeUp 0.42s ease both;
}

.explorer-info-card {
  min-height: 104px;
}

.explorer-info-card strong {
  font-size: 1.05rem;
}

.explorer-wide-note {
  color: var(--wine-950);
  background: linear-gradient(135deg, rgba(255, 204, 61, 0.18), rgba(255, 250, 240, 0.94));
}

.explorer-wide-note p,
.explorer-wide-note li,
.tool-card li,
.story-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.explorer-wide-note ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.explorer-pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.explorer-pill-nav button.is-active {
  color: var(--ink);
  background: var(--gold-500);
}

.participant-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.36fr);
  gap: 14px;
}

.participant-bars,
.tool-card,
.quality-card,
.role-card,
.dimension-map,
.correlation-readout,
.correlation-notes {
  display: grid;
  gap: 10px;
}

.participant-bar {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #fffaf0;
  border: 1px solid rgba(138, 29, 11, 0.18);
  border-radius: 8px;
}

.participant-bar div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.participant-bar span,
.role-mean span {
  color: var(--muted);
  font-size: 0.88rem;
}

.participant-bar i,
.role-mean i,
.dimension-map-card i {
  position: relative;
  display: block;
  height: 9px;
  overflow: hidden;
  background: rgba(112, 72, 52, 0.14);
  border-radius: 999px;
}

.participant-bar em,
.role-mean em,
.dimension-map-card em {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--wine-800), var(--gold-500));
  border-radius: inherit;
}

.participant-total {
  display: grid;
  align-content: center;
  min-height: 180px;
  padding: 16px;
  color: #fff8dc;
  background: linear-gradient(135deg, var(--wine-900), var(--wine-950));
  border-radius: 8px;
}

.participant-total span {
  color: var(--gold-300);
}

.participant-total strong {
  font-size: 3.6rem;
  line-height: 1;
}

.participant-total p {
  margin: 8px 0 0;
  color: #fff0c2;
  line-height: 1.35;
}

.tool-card h5,
.quality-card h5,
.anova-card h5 {
  margin: 0 0 10px;
  color: var(--wine-950);
  font-size: 1.1rem;
  text-transform: none;
}

.tool-card dl,
.quality-card dl,
.role-card dl,
.dimension-map-card dl,
.correlation-readout dl,
.explorer-facts dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.tool-card dl div,
.quality-card dl div,
.role-card dl div,
.dimension-map-card dl div,
.correlation-readout dl div,
.explorer-facts dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
  background: rgba(255, 246, 216, 0.8);
  border: 1px solid rgba(138, 29, 11, 0.13);
  border-radius: 6px;
}

.tool-card dt,
.quality-card dt,
.role-card dt,
.dimension-map-card dt,
.correlation-readout dt,
.explorer-facts dt {
  color: var(--muted);
  font-weight: 800;
}

.tool-card dd,
.quality-card dd,
.role-card dd,
.dimension-map-card dd,
.correlation-readout dd,
.explorer-facts dd {
  margin: 0;
  color: var(--wine-950);
  font-weight: 900;
  text-align: right;
}

.tool-note-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.tool-note-list span {
  min-height: 26px;
  padding: 6px 8px;
  color: var(--wine-900);
  background: rgba(255, 204, 61, 0.18);
  border: 1px solid rgba(138, 29, 11, 0.15);
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 900;
}

.role-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.role-card-head strong {
  color: var(--wine-900);
}

.role-mean {
  display: grid;
  gap: 8px;
}

.role-mean strong {
  color: var(--wine-950);
  font-size: 2rem;
}

.dimension-map-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fffaf0;
  border-radius: 8px;
}

.dimension-map-card.is-highlighted {
  border-color: var(--gold-500);
  background: linear-gradient(135deg, rgba(255, 204, 61, 0.2), #fffaf0);
}

.dimension-map-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.dimension-map-card > div:first-child span {
  color: var(--wine-950);
  font-weight: 900;
}

.dimension-map-card > div:first-child strong {
  color: var(--wine-900);
  font-size: 1.55rem;
}

.dimension-map-card dl {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.significance-banner {
  display: grid;
  gap: 6px;
  color: #fff8dc;
  background: linear-gradient(135deg, var(--wine-900), var(--wine-950));
}

.significance-banner strong {
  color: var(--gold-300);
  font-size: 1.2rem;
}

.significance-banner p {
  margin: 0;
  color: #fff0c2;
}

.anova-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.correlation-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.55fr);
  gap: 14px;
  align-items: center;
}

.correlation-chart {
  min-height: 280px;
  background: linear-gradient(135deg, rgba(255, 246, 216, 0.72), rgba(255, 250, 240, 0.96));
  border: 1px solid rgba(138, 29, 11, 0.16);
  border-radius: 8px;
}

.correlation-readout {
  padding: 16px;
  color: #fff8dc;
  background: linear-gradient(135deg, var(--wine-900), var(--wine-950));
  border-radius: 8px;
}

.correlation-readout span {
  color: var(--gold-300);
}

.correlation-readout > strong {
  display: block;
  margin: 8px 0 12px;
  font-size: 3rem;
  line-height: 1;
}

.correlation-readout dl div {
  background: rgba(255, 246, 216, 0.12);
  border-color: rgba(255, 224, 138, 0.2);
}

.correlation-readout dt {
  color: #fff0c2;
}

.correlation-readout dd {
  color: #fff8dc;
}

.correlation-notes {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.correlation-notes article {
  padding: 14px;
  color: var(--wine-950);
  background: #fffaf0;
  border: 1px solid rgba(138, 29, 11, 0.18);
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.35;
}

.story-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-grid article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.story-grid span,
.method-flow span {
  display: grid;
  place-items: center;
  height: 34px;
  color: var(--ink);
  background: var(--gold-500);
  border-radius: 6px;
}

.story-grid p {
  margin: 0;
}

.method-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.method-flow article {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 94px;
}

.method-flow strong {
  color: var(--wine-950);
  line-height: 1.22;
}

.quiz-shell {
  display: grid;
  gap: 14px;
}

.quiz-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.28fr);
  gap: 14px;
  align-items: stretch;
}

.quiz-intro > div:first-child,
.quiz-score-card,
.quiz-question,
.quiz-footer {
  padding: 14px;
  background: #fffaf0;
  border: 1px solid rgba(138, 29, 11, 0.18);
  border-radius: 8px;
}

.quiz-intro span,
.quiz-score-card span,
.quiz-question-head span {
  color: var(--wine-900);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quiz-intro h5,
.quiz-question h5 {
  margin: 5px 0 0;
  color: var(--wine-950);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.12;
}

.quiz-intro p,
.quiz-score-card p,
.quiz-feedback,
.quiz-footer span {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.42;
}

.quiz-score-card {
  display: grid;
  align-content: center;
  color: #fff8dc;
  background: linear-gradient(135deg, var(--wine-900), var(--wine-950));
}

.quiz-score-card span {
  color: var(--gold-300);
}

.quiz-score-card strong {
  margin-top: 7px;
  color: #fff8dc;
  font-size: 2.2rem;
  line-height: 1;
}

.quiz-score-card p {
  color: #fff0c2;
}

.quiz-step-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.quiz-step-bar button {
  min-height: 38px;
  color: var(--wine-950);
  background: #fff7df;
  border: 1px solid rgba(138, 29, 11, 0.18);
  border-radius: 7px;
  font-weight: 900;
}

.quiz-step-bar button.is-active {
  color: #fff8dc;
  background: var(--wine-800);
  border-color: var(--wine-900);
}

.quiz-step-bar button.is-answered:not(.is-active) {
  background: var(--gold-300);
}

.quiz-question-list {
  display: grid;
  gap: 12px;
}

.quiz-question {
  display: grid;
  gap: 12px;
}

.quiz-question.is-correct {
  border-color: #8bc47d;
  background: linear-gradient(135deg, #eff9ec, #fffaf0);
}

.quiz-question.is-wrong {
  border-color: #d9948f;
  background: linear-gradient(135deg, #fff0ee, #fffaf0);
}

.quiz-question-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.quiz-question-head span {
  display: grid;
  place-items: center;
  height: 34px;
  color: var(--ink);
  background: var(--gold-500);
  border-radius: 6px;
}

.quiz-question-head h5 {
  margin: 0;
}

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

.quiz-option,
.quiz-footer button {
  min-height: 48px;
  padding: 11px 12px;
  color: var(--wine-950);
  text-align: left;
  background: #fff7df;
  border: 1px solid rgba(138, 29, 11, 0.2);
  border-radius: 8px;
  font-weight: 900;
  line-height: 1.25;
}

.quiz-option:hover:not(:disabled),
.quiz-footer button:hover {
  background: var(--gold-300);
  transform: translateY(-1px);
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option.is-selected {
  color: #fff8dc;
  background: var(--wine-800);
  border-color: var(--wine-900);
}

.quiz-option.is-correct-answer {
  color: var(--ink);
  background: var(--gold-500);
  border-color: var(--gold-300);
}

.quiz-feedback {
  padding: 11px;
  background: rgba(255, 246, 216, 0.78);
  border-radius: 7px;
}

.quiz-feedback strong {
  color: var(--wine-950);
}

.quiz-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.quiz-nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.quiz-footer button {
  width: max-content;
  min-height: 42px;
  text-align: center;
  background: var(--gold-500);
}

.quiz-footer button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.explorer-facts {
  align-content: start;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
}

.explorer-facts span {
  color: var(--wine-900);
}

.explorer-integrity-note {
  padding: 14px;
  color: #fff8dc;
  background: linear-gradient(135deg, var(--wine-900), var(--wine-950));
  border-radius: 8px;
}

.explorer-integrity-note strong {
  display: block;
  color: var(--gold-300);
  line-height: 1.2;
}

.explorer-integrity-note p {
  margin: 8px 0 0;
  color: #fff0c2;
  line-height: 1.35;
}

/* Relational Patterns Lab */
.lab-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 16px;
  min-height: 0;
  padding: 18px;
  color: #fff8dc;
  background:
    linear-gradient(120deg, rgba(255, 204, 61, 0.18), transparent 42%),
    radial-gradient(circle at 82% 18%, rgba(255, 224, 138, 0.2), transparent 24%),
    linear-gradient(135deg, var(--wine-900), var(--wine-950));
  border: 1px solid var(--cream-300);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(91, 19, 6, 0.14);
}

.lab-hero > div,
.lab-hero aside {
  display: grid;
  align-content: center;
  gap: 9px;
}

.lab-hero span,
.lab-scene-card > span,
.lab-choice-head span,
.lab-readout > span,
.lab-summary > span,
.lab-network-head span,
.lab-research-hero span,
.lab-research-grid span,
.lab-section-title span {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  padding: 7px 10px;
  color: var(--wine-950);
  background: var(--gold-300);
  border: 1px solid var(--cream-300);
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lab-hero h3 {
  max-width: 920px;
  margin: 0;
  color: #fff8dc;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.08;
}

.lab-hero p,
.lab-hero aside p {
  margin: 0;
  color: #f7dda7;
  font-size: 0.95rem;
  line-height: 1.35;
}

.lab-hero aside {
  padding: 13px;
  background: rgba(255, 246, 216, 0.08);
  border: 1px solid rgba(255, 224, 138, 0.22);
  border-radius: 8px;
}

.lab-hero aside strong {
  color: var(--gold-300);
  font-size: 1rem;
  line-height: 1.15;
}

.lab-shell {
  margin-top: 16px;
  overflow: hidden;
  background: rgba(255, 241, 197, 0.55);
  border: 1px solid rgba(212, 168, 78, 0.72);
  border-radius: 8px;
}

.lab-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: linear-gradient(90deg, var(--wine-900), var(--wine-950));
}

.lab-mode-button {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--cream-100);
  background: rgba(255, 246, 216, 0.09);
  border: 1px solid rgba(255, 224, 138, 0.14);
  border-bottom: 3px solid transparent;
  border-radius: 5px;
  font-weight: 900;
}

.lab-mode-button:hover,
.lab-mode-button.is-active {
  color: var(--gold-500);
  background: rgba(255, 204, 61, 0.12);
  border-bottom-color: var(--gold-500);
}

#labContent {
  padding: 18px;
}

.lab-story,
.lab-research {
  display: grid;
  gap: 16px;
}

.lab-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.lab-progress button {
  display: grid;
  gap: 6px;
  min-height: 68px;
  padding: 10px;
  color: var(--wine-950);
  text-align: left;
  background: #fff7df;
  border: 1px solid rgba(138, 29, 11, 0.16);
  border-left: 4px solid rgba(212, 168, 78, 0.76);
  border-radius: 8px;
  font-weight: 900;
  line-height: 1.15;
}

.lab-progress span {
  color: var(--wine-800);
  font-size: 0.72rem;
}

.lab-progress button.is-active {
  color: #fff8dc;
  background: var(--wine-800);
  border-color: var(--wine-950);
  border-left-color: var(--gold-500);
}

.lab-progress button.is-complete:not(.is-active) {
  background: #ffe9a8;
}

.lab-stage {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(320px, 0.38fr) minmax(260px, 0.28fr);
  gap: 14px;
}

.lab-scene-card,
.lab-choice-card,
.lab-readout,
.lab-network,
.lab-summary,
.lab-research-hero,
.lab-research-grid article,
.lab-hypotheses,
.lab-correlation-browser,
.lab-limits {
  background: var(--paper);
  border: 1px solid var(--cream-300);
  border-radius: 8px;
  box-shadow: 0 9px 20px rgba(91, 19, 6, 0.08);
}

.lab-scene-card,
.lab-choice-card,
.lab-readout,
.lab-summary,
.lab-network,
.lab-hypotheses,
.lab-correlation-browser,
.lab-limits {
  padding: 16px;
}

.lab-scene-card,
.lab-choice-card,
.lab-readout {
  display: grid;
  align-content: start;
  gap: 13px;
  min-height: 390px;
}

.lab-scene-card h4,
.lab-readout h4,
.lab-summary h4,
.lab-research-hero h4,
.lab-section-title h4 {
  margin: 0;
  color: var(--wine-900);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.12;
}

.lab-scene-card p,
.lab-scene-card small,
.lab-choice-head strong,
.lab-readout p,
.lab-readout small,
.lab-summary p,
.lab-research-hero p,
.lab-research-hero strong,
.lab-research-grid p,
.lab-hypotheses p,
.lab-limits li,
.lab-gender p {
  margin: 0;
  color: var(--muted);
  line-height: 1.43;
}

.lab-thought {
  padding: 14px;
  background: #fff1c5;
  border: 1px solid rgba(212, 168, 78, 0.72);
  border-left: 6px solid var(--gold-500);
  border-radius: 8px;
}

.lab-thought strong,
.lab-choice-head strong,
.lab-network-head strong,
.lab-summary-grid strong,
.lab-gender strong {
  display: block;
  color: var(--wine-950);
  line-height: 1.2;
}

.lab-choice-list {
  display: grid;
  gap: 10px;
}

.lab-choice {
  min-height: 58px;
  padding: 12px;
  color: var(--wine-950);
  text-align: left;
  background: #fff7df;
  border: 1px solid rgba(138, 29, 11, 0.18);
  border-left: 5px solid var(--cream-300);
  border-radius: 8px;
  font-weight: 900;
  line-height: 1.25;
}

.lab-choice:hover,
.lab-choice.is-selected {
  color: #fff8dc;
  background: var(--wine-800);
  border-color: var(--wine-950);
  border-left-color: var(--gold-500);
}

.lab-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lab-chip-row b {
  padding: 7px 9px;
  color: var(--wine-950);
  background: var(--gold-300);
  border-radius: 6px;
  font-size: 0.76rem;
}

.lab-connection-stack {
  display: grid;
  gap: 8px;
}

.lab-connection-stack article,
.lab-lines article {
  padding: 10px;
  background: #fff7df;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-left: 5px solid var(--wine-800);
  border-radius: 8px;
}

.lab-connection-stack article.is-negative,
.lab-lines article.is-negative {
  border-left-color: var(--blue);
}

.lab-connection-stack strong,
.lab-lines strong {
  display: block;
  color: var(--wine-950);
  font-size: 0.88rem;
}

.lab-connection-stack span,
.lab-lines span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.lab-network-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.lab-network-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.25fr) minmax(280px, 0.5fr) minmax(150px, 0.25fr);
  gap: 12px;
  align-items: stretch;
}

.lab-node-column {
  display: grid;
  gap: 7px;
}

.lab-node-column b {
  padding: 8px 9px;
  color: var(--muted);
  background: #fff7df;
  border: 1px solid rgba(138, 29, 11, 0.14);
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.15;
}

.lab-node-column b.is-active {
  color: var(--wine-950);
  background: var(--gold-300);
  border-color: var(--line);
  box-shadow: inset 5px 0 0 var(--wine-800);
}

.lab-lines {
  display: grid;
  align-content: center;
  gap: 9px;
  min-height: 220px;
  padding: 12px;
  background: linear-gradient(180deg, #fffaf0, #fff1c5);
  border: 1px solid rgba(212, 168, 78, 0.56);
  border-radius: 8px;
}

.lab-lines article {
  display: grid;
  grid-template-columns: minmax(16px, var(--strength)) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.lab-lines i {
  display: block;
  height: 8px;
  background: linear-gradient(90deg, var(--wine-800), var(--gold-500));
  border-radius: 999px;
}

.lab-lines .is-negative i {
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.lab-lines p {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.lab-summary-grid,
.lab-research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.lab-summary-grid article {
  padding: 13px;
  background: #fff7df;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-radius: 8px;
}

.lab-summary-grid p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.lab-summary-grid b {
  color: var(--wine-950);
}

.lab-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.lab-controls button {
  min-height: 42px;
  padding: 10px 14px;
  color: var(--wine-950);
  background: var(--gold-500);
  border: 1px solid var(--gold-300);
  border-radius: 6px;
  font-weight: 900;
}

.lab-controls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lab-research-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 14px;
  padding: 18px;
}

.lab-research-hero strong {
  align-self: stretch;
  padding: 14px;
  background: #fff1c5;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-radius: 8px;
}

.lab-research-grid article {
  min-height: 132px;
  padding: 15px;
}

.lab-hypotheses > div:last-child {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.lab-hypotheses article {
  padding: 13px;
  background: #fff7df;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-left: 5px solid var(--wine-800);
  border-radius: 8px;
}

.lab-hypotheses b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 9px;
  color: var(--wine-950);
  background: var(--gold-500);
  border-radius: 6px;
}

.lab-hypotheses strong {
  display: block;
  color: var(--wine-950);
}

.lab-correlation-group {
  margin-top: 12px;
}

.lab-correlation-group h5 {
  margin: 0 0 8px;
  color: var(--wine-900);
  font-size: 1.05rem;
}

.lab-correlation-group > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.lab-correlation-group button {
  min-height: 92px;
  padding: 10px;
  color: var(--wine-950);
  text-align: left;
  background: #fff7df;
  border: 1px solid rgba(138, 29, 11, 0.16);
  border-left: 5px solid var(--line);
  border-radius: 8px;
}

.lab-correlation-group button.is-negative {
  border-left-color: var(--blue);
}

.lab-correlation-group button.is-muted {
  opacity: 0.64;
}

.lab-correlation-group span,
.lab-correlation-group strong,
.lab-correlation-group small {
  display: block;
}

.lab-correlation-group span {
  font-weight: 900;
  line-height: 1.15;
}

.lab-correlation-group strong {
  margin-top: 8px;
  font-size: 1rem;
}

.lab-correlation-group small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 900;
}

.lab-limits {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(300px, 0.42fr);
  gap: 16px;
}

.lab-limits ul {
  margin: 0;
  padding-left: 20px;
}

.lab-gender {
  padding: 14px;
  background: #fff1c5;
  border: 1px solid rgba(212, 168, 78, 0.66);
  border-radius: 8px;
}

.lab-shell {
  background:
    linear-gradient(180deg, rgba(255, 204, 61, 0.12), rgba(255, 246, 216, 0.68)),
    var(--cream-100);
}

#labContent {
  padding: 18px;
}

.lab-game {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.game-level-map,
.game-stage,
.game-impact,
.game-path {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(255, 241, 197, 0.88));
  border: 1px solid rgba(212, 168, 78, 0.78);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(91, 19, 6, 0.1);
}

.game-level-map {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.game-map-title,
.game-stage-head,
.game-path-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.game-map-title span,
.game-stage-head span,
.game-path-head span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 6px 9px;
  color: var(--wine-950);
  background: var(--gold-300);
  border: 1px solid var(--cream-300);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.game-map-title strong,
.game-stage-head strong,
.game-path-head strong {
  color: var(--wine-950);
  font-size: 0.88rem;
  line-height: 1.18;
}

.game-level-map button {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  min-height: 72px;
  padding: 10px;
  color: var(--wine-950);
  text-align: left;
  background: #fff7df;
  border: 1px solid rgba(138, 29, 11, 0.16);
  border-left: 5px solid rgba(212, 168, 78, 0.76);
  border-radius: 8px;
}

.game-level-map button:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 30px;
  bottom: -11px;
  width: 2px;
  height: 10px;
  background: var(--line);
}

.game-level-map button span {
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  color: var(--wine-950);
  background: var(--gold-500);
  border-radius: 50%;
  font-weight: 900;
}

.game-level-map button i {
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.game-level-map button strong {
  color: var(--wine-950);
  line-height: 1.15;
}

.game-level-map button.is-active {
  color: #fff8dc;
  background: linear-gradient(135deg, var(--wine-800), var(--wine-950));
  border-color: var(--wine-950);
  border-left-color: var(--gold-500);
}

.game-level-map button.is-active strong,
.game-level-map button.is-active i {
  color: #fff8dc;
}

.game-level-map button.is-complete:not(.is-active) {
  background: #ffe9a8;
}

.game-level-map button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.game-stage {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.game-scene-visual {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 0.4fr) minmax(0, 0.6fr);
  gap: 18px;
  align-items: center;
  min-height: 318px;
  overflow: hidden;
  padding: 20px;
  color: #fff8dc;
  background:
    radial-gradient(circle at 28% 36%, rgba(255, 204, 61, 0.24), transparent 26%),
    linear-gradient(135deg, var(--wine-900), var(--wine-950));
  border: 1px solid rgba(255, 224, 138, 0.25);
  border-radius: 8px;
}

.game-scene-visual article {
  display: grid;
  gap: 14px;
}

.game-scene-visual article > p {
  margin: 0;
  color: #fff8dc;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  font-weight: 900;
  line-height: 1.12;
}

.game-scene-visual small {
  color: #f8ddb1;
  line-height: 1.35;
}

.game-orbit {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 260px;
  margin: 0 auto;
  border: 1px solid rgba(255, 224, 138, 0.56);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 204, 61, 0.2), rgba(81, 127, 168, 0.18) 45%, rgba(255, 250, 240, 0.06) 46%, transparent 62%);
  box-shadow: inset 0 0 44px rgba(255, 224, 138, 0.16), 0 0 0 12px rgba(255, 204, 61, 0.06);
}

.game-orbit::before {
  content: "";
  position: absolute;
  inset: 19%;
  border-radius: 50% 50% 46% 46%;
  background:
    linear-gradient(90deg, transparent 43%, rgba(255, 248, 220, 0.18) 44% 48%, transparent 49%),
    radial-gradient(circle at 50% 30%, rgba(255, 248, 220, 0.82) 0 10%, transparent 11%),
    linear-gradient(180deg, rgba(255, 248, 220, 0.58), rgba(81, 127, 168, 0.2));
  clip-path: polygon(44% 18%, 58% 18%, 64% 38%, 70% 75%, 30% 75%, 36% 38%);
}

.game-orbit i {
  position: absolute;
  inset: 7%;
  border: 2px solid rgba(255, 204, 61, 0.56);
  border-radius: 50%;
  animation: labPulse 3s ease-in-out infinite;
}

.game-orbit b {
  position: absolute;
  bottom: 18px;
  color: var(--gold-300);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.game-choice-zone {
  display: grid;
  gap: 12px;
}

.game-choice-zone .lab-choice {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 64px;
  background: #fffaf0;
  border-color: rgba(112, 11, 6, 0.22);
  border-left-color: var(--gold-500);
}

.game-choice-zone .lab-choice span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--wine-950);
  background: var(--gold-300);
  border-radius: 50%;
  font-size: 0.78rem;
}

.game-choice-zone .lab-choice.is-selected span,
.game-choice-zone .lab-choice:hover span {
  background: var(--gold-500);
}

.game-impact {
  position: sticky;
  top: 18px;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 520px;
  padding: 16px;
}

.game-impact .lab-connection-stack {
  max-height: 250px;
  overflow: auto;
  padding-right: 2px;
}

.game-network-wrap,
.game-path {
  grid-column: 1 / -1;
}

.game-network-wrap .lab-network {
  box-shadow: none;
}

.game-path {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.game-path-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px 0;
}

.game-path-track::before,
.game-path-track i {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  background: rgba(112, 11, 6, 0.16);
  border-radius: 999px;
  transform: translateY(-50%);
}

.game-path-track i {
  right: auto;
  background: linear-gradient(90deg, var(--wine-800), var(--gold-500));
}

.game-path-track b {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0 auto;
  color: var(--wine-950);
  background: #fff7df;
  border: 2px solid var(--cream-300);
  border-radius: 50%;
}

.game-path-track b.is-complete,
.game-path-track b.is-active {
  background: var(--gold-500);
  border-color: var(--wine-800);
}

.game-path .lab-summary {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

@keyframes labPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.68;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

/* Game presentation skin, kept inside the existing application layout */
body.is-lab-active .stage-top {
  display: none;
}

body.is-lab-active .content-stage {
  padding: 0;
}

#labPanel .lab-shell {
  min-height: 760px;
  margin: 0;
  padding: 0;
  color: #f8dfaf;
  background:
    linear-gradient(90deg, rgba(255, 204, 61, 0.08), transparent 22%, transparent 78%, rgba(255, 204, 61, 0.08)),
    radial-gradient(circle at 66% 38%, rgba(255, 204, 61, 0.12), transparent 24%),
    #170305;
  border: 1px solid rgba(204, 154, 63, 0.84);
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 231, 163, 0.1);
}

#labPanel #labContent {
  padding: 18px;
}

#labPanel .lab-game {
  display: grid;
  grid-template-columns: 300px minmax(430px, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
  min-height: 720px;
  padding: 16px;
  color: #f8dfaf;
  border: 1px solid rgba(204, 154, 63, 0.46);
  border-radius: 2px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 204, 61, 0.08), transparent 20%),
    linear-gradient(135deg, rgba(73, 8, 11, 0.96), rgba(23, 3, 5, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 231, 163, 0.08), 0 24px 42px rgba(32, 4, 4, 0.18);
}

.game-titlebar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 54px;
  padding: 6px 14px 10px;
  border-bottom: 1px solid rgba(204, 154, 63, 0.26);
}

.game-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.game-brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 2px solid #d7ae62;
  transform: rotate(45deg);
  box-shadow: 0 0 18px rgba(255, 204, 61, 0.24);
}

.game-brand-mark::before,
.game-brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 224, 138, 0.78);
}

.game-brand-mark::after {
  inset: 15px;
  background: rgba(255, 204, 61, 0.2);
}

.game-titlebar strong,
.game-titlebar span {
  color: #e7c878;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

.game-titlebar strong {
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.game-titlebar span {
  justify-self: center;
  position: relative;
  color: #f3d98b;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.game-titlebar span::before,
.game-titlebar span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: clamp(40px, 8vw, 92px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215, 174, 98, 0.78));
}

.game-titlebar span::before {
  right: calc(100% + 18px);
}

.game-titlebar span::after {
  left: calc(100% + 18px);
  transform: scaleX(-1);
}

.game-titlebar > i {
  min-height: 1px;
}

#labPanel .game-level-map,
#labPanel .game-stage,
#labPanel .game-impact,
#labPanel .game-path {
  color: #f8dfaf;
  background: rgba(29, 5, 7, 0.72);
  border: 1px solid rgba(204, 154, 63, 0.48);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 231, 163, 0.05), 0 18px 42px rgba(0, 0, 0, 0.28);
}

#labPanel .game-level-map {
  gap: 0;
  align-content: start;
  padding: 18px 10px 18px 20px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

#labPanel .game-map-title {
  display: grid;
  gap: 20px;
  justify-content: start;
  margin: 0 0 14px 12px;
}

#labPanel .game-map-title span,
#labPanel .game-stage-head span,
#labPanel .game-path-head span,
#labPanel .lab-choice-head span,
#labPanel .impact-section span,
#labPanel .connection-balance span,
#labPanel .lab-summary > span {
  width: max-content;
  color: #f3d98b;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

#labPanel .game-map-title strong,
#labPanel .game-stage-head strong,
#labPanel .game-path-head strong {
  color: rgba(248, 223, 175, 0.78);
  font-size: 0.96rem;
  font-weight: 600;
}

#labPanel .game-level-map button {
  position: relative;
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0;
  row-gap: 6px;
  min-height: 132px;
  padding: 22px 12px 20px 0;
  overflow: visible;
  color: rgba(248, 223, 175, 0.84);
  background: transparent;
  border: 0;
  border-radius: 0 16px 16px 0;
}

#labPanel .game-level-map button::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 13px;
  z-index: 1;
  width: 76px;
  height: 76px;
  background:
    radial-gradient(circle, #42110d 0 39%, transparent 40%),
    radial-gradient(circle, transparent 0 47%, rgba(255, 232, 157, 0.98) 48% 50%, transparent 51%),
    radial-gradient(circle, transparent 0 58%, rgba(215, 174, 98, 0.74) 59% 61%, transparent 62%),
    radial-gradient(circle, rgba(255, 228, 139, 0.15), transparent 66%);
  border: 1px solid rgba(215, 174, 98, 0.82);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 10px rgba(23, 6, 6, 0.9),
    0 0 13px rgba(255, 204, 61, 0.22);
}

#labPanel .game-level-map button:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 56px;
  bottom: -30px;
  z-index: 0;
  width: 1px;
  height: 58px;
  background:
    linear-gradient(rgba(215, 174, 98, 0.88), rgba(215, 174, 98, 0.88)) center / 1px 100% no-repeat;
}

#labPanel .game-level-map button:not(:last-child) strong::after {
  display: none;
  content: none;
}

#labPanel .game-level-map button span {
  position: relative;
  z-index: 3;
  grid-column: 2;
  grid-row: 1;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  color: #d7ae62;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.16rem;
  font-weight: 500;
  line-height: 1;
}

#labPanel .game-level-map button i {
  position: absolute;
  left: 41px;
  top: 36px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: visible;
  color: #caa15b;
  font-style: normal;
}

#labPanel .game-level-map button i svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#labPanel .game-level-map button i svg rect {
  fill: rgba(202, 161, 91, 0.12);
  stroke: currentColor;
}

#labPanel .game-level-map button.is-active i svg path:first-child {
  fill: #fff0bc;
  stroke: #fff0bc;
}

#labPanel .game-level-map button.is-active i svg path:not(:first-child) {
  stroke: #4a160f;
  stroke-width: 2.5;
}

#labPanel .game-level-map button.is-active i,
#labPanel .game-level-map button.is-complete i {
  color: #fff0bc;
}

#labPanel .game-level-map button strong {
  position: relative;
  z-index: 3;
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  color: rgba(248, 223, 175, 0.82);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.12;
}

#labPanel .game-level-map button.is-active {
  min-height: 122px;
  background:
    linear-gradient(90deg, transparent 0 54px, rgba(91, 32, 22, 0.72) 55px, rgba(64, 20, 17, 0.38) 100%);
  border: 1px solid rgba(215, 174, 98, 0.24);
  border-left-color: transparent;
  box-shadow:
    inset 0 0 28px rgba(255, 204, 61, 0.04),
    0 0 0 1px rgba(60, 13, 11, 0.18);
}

#labPanel .game-level-map button.is-active::before {
  border-color: #ffdc86;
  background:
    radial-gradient(circle at 50% 50%, #814224 0 35%, transparent 36%),
    radial-gradient(circle, transparent 0 43%, #fff0bc 44% 47%, transparent 48%),
    radial-gradient(circle, transparent 0 55%, rgba(255, 225, 139, 0.92) 56% 58%, transparent 59%),
    radial-gradient(circle, rgba(255, 229, 148, 0.2), transparent 70%);
  box-shadow:
    inset 0 0 0 9px rgba(65, 8, 10, 0.74),
    0 0 24px rgba(255, 204, 61, 0.58),
    0 0 48px rgba(255, 204, 61, 0.3);
}

#labPanel .game-level-map button.is-complete:not(.is-active) {
  background: transparent;
}

#labPanel .game-level-map button:disabled span,
#labPanel .game-level-map button:disabled strong {
  color: rgba(248, 223, 175, 0.58);
}

#labPanel .game-level-map button:disabled {
  opacity: 1;
}

#labPanel .game-level-map button:disabled::before {
  opacity: 0.78;
  background:
    radial-gradient(circle, rgba(79, 37, 26, 0.96) 0 39%, transparent 40%),
    radial-gradient(circle, transparent 0 47%, rgba(215, 174, 98, 0.64) 48% 50%, transparent 51%),
    radial-gradient(circle, transparent 0 58%, rgba(215, 174, 98, 0.35) 59% 61%, transparent 62%),
    radial-gradient(circle, rgba(255, 228, 139, 0.08), transparent 66%);
  box-shadow:
    0 0 10px rgba(255, 204, 61, 0.08);
}

#labPanel .game-stage {
  align-self: stretch;
  container-type: inline-size;
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 18px;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: rgba(54, 7, 10, 0.72);
}

#labPanel .game-stage-head {
  display: none;
}

#labPanel .game-stage-head strong {
  display: none;
}

#labPanel .game-stage-head span {
  color: #f3d98b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  text-transform: none;
}

#labPanel .game-scene-visual {
  position: relative;
  display: block;
  min-height: 196px;
  margin: 0 18px;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
}

.scene-backdrop {
  position: relative;
  min-height: 196px;
  aspect-ratio: 16 / 5.75;
  overflow: hidden;
  padding: 28px 64px;
  background: #170507;
  border: 1px solid rgba(215, 174, 98, 0.62);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 166, 0.08), 0 16px 28px rgba(0, 0, 0, 0.22);
}

.scene-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.scene-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(15, 3, 4, 0.08), rgba(15, 3, 4, 0.36) 52%, rgba(15, 3, 4, 0.7)),
    linear-gradient(90deg, rgba(12, 2, 3, 0.42), transparent 22%, transparent 70%, rgba(12, 2, 3, 0.32)),
    linear-gradient(180deg, rgba(255, 232, 166, 0.06), rgba(15, 3, 4, 0.34));
  opacity: 0.98;
  pointer-events: none;
}

.scene-copy {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 140px;
  text-align: center;
}

.scene-copy h4 {
  margin: 0;
  color: #fff8dc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 2.67vw, 2.5rem);
  font-weight: 500;
  line-height: 1.04;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.48);
}

.scene-copy h4::after {
  content: "";
  display: block;
  width: 150px;
  height: 1px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, rgba(215, 174, 98, 0.88), transparent);
}

.scene-copy p {
  max-width: 560px;
  margin: 0;
  color: #fff3cf;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.36;
}

#labPanel .game-orbit {
  position: absolute;
  right: -74px;
  top: 50%;
  width: 118px;
  max-width: none;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 42% 48%, rgba(255, 204, 61, 0.42), transparent 34%),
    radial-gradient(circle at 66% 50%, rgba(81, 127, 168, 0.42), transparent 44%),
    rgba(20, 6, 8, 0.72);
  border-color: rgba(255, 224, 138, 0.78);
}

#labPanel .game-choice-zone {
  justify-self: stretch;
  width: 100%;
  width: -webkit-fill-available;
  width: 100cqw;
  inline-size: -webkit-fill-available;
  inline-size: 100cqw;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0 18px 18px;
}

#labPanel .lab-choice-head {
  position: relative;
  display: grid;
  place-items: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 46px;
  padding-right: 118px;
  margin-bottom: 0;
}

#labPanel .lab-choice-head strong {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: #f8dfaf;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.36rem;
  font-weight: 500;
  overflow-wrap: normal;
  white-space: normal;
}

#labPanel .choice-next-button {
  position: absolute;
  right: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 98px;
  min-height: 38px;
  padding: 8px 16px;
  color: #2a0d09;
  background: linear-gradient(135deg, #fff4be, #d6a948);
  border: 1px solid rgba(255, 245, 194, 0.72);
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(255, 204, 61, 0.22), inset 0 0 0 1px rgba(70, 20, 8, 0.12);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}

#labPanel .choice-next-button::after {
  content: ">";
  margin-left: 8px;
}

#labPanel .choice-next-button:disabled {
  color: rgba(248, 223, 175, 0.42);
  background: rgba(255, 246, 216, 0.08);
  border-color: rgba(215, 174, 98, 0.22);
  box-shadow: none;
  cursor: not-allowed;
}

#labPanel .lab-choice-list {
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#labPanel .game-choice-zone .lab-choice {
  grid-template-columns: 64px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 73px;
  padding: 12px 18px;
  color: #3a130f;
  background:
    linear-gradient(#fffaf0, #f3e6ca);
  border: 2px solid rgba(215, 174, 98, 0.74);
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(74, 32, 16, 0.12), 0 8px 16px rgba(0, 0, 0, 0.24);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.17rem;
  font-weight: 600;
}

#labPanel .game-choice-zone .lab-choice .choice-glyph {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #8c5b13;
  background: transparent;
  border: 0;
  border-radius: 0;
  filter: drop-shadow(0 2px 3px rgba(80, 22, 4, 0.18));
}

#labPanel .game-choice-zone .lab-choice .choice-glyph::before,
#labPanel .game-choice-zone .lab-choice .choice-glyph::after {
  display: none;
  content: none;
}

#labPanel .game-choice-zone .lab-choice .choice-glyph img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

#labPanel .game-choice-zone .lab-choice .choice-label {
  display: block;
  width: auto;
  height: auto;
  min-width: 0;
  max-width: 100%;
  color: inherit;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.18;
  overflow-wrap: normal;
  white-space: normal;
}

#labPanel .game-choice-zone .lab-choice:hover,
#labPanel .game-choice-zone .lab-choice.is-selected {
  color: #2a0d09;
  background: linear-gradient(#fff4c5, #e7c878);
  border-color: #ffdf87;
}

.choice-aftermath {
  display: grid;
  gap: 10px;
  width: 100cqw;
  max-width: 100%;
  min-width: 0;
  padding: 0 18px 18px;
}

.consequence-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.consequence-cards article,
.secure-alternative {
  min-width: 0;
  padding: 10px 12px;
  color: #f8dfaf;
  background: rgba(255, 246, 216, 0.055);
  border: 1px solid rgba(215, 174, 98, 0.26);
  border-radius: 8px;
}

.consequence-cards span,
.secure-alternative span {
  display: block;
  color: #f3d98b;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.consequence-cards strong,
.secure-alternative strong {
  display: block;
  margin-top: 4px;
  color: #fff8dc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.14;
}

.consequence-cards p,
.secure-alternative p {
  margin: 5px 0 0;
  color: rgba(248, 223, 175, 0.74);
  font-size: 0.78rem;
  line-height: 1.3;
}

.secure-alternative {
  border-color: rgba(255, 220, 107, 0.42);
  background:
    linear-gradient(90deg, rgba(255, 204, 61, 0.1), rgba(255, 246, 216, 0.035));
}

#labPanel .game-impact {
  min-height: auto;
  align-content: start;
  gap: 0;
  padding: 34px 28px;
  background: rgba(31, 5, 8, 0.78);
}

.impact-section {
  display: grid;
  gap: 20px;
  padding: 0;
  border-bottom: 0;
}

#labPanel .impact-feature > span,
#labPanel .connection-balance > span {
  justify-self: center;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d7ae62;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.26rem;
  font-weight: 500;
  text-transform: none;
}

.impact-feature-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.impact-feature-row img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 204, 61, 0.18));
}

.impact-section h4 {
  margin: 0;
  color: #fff8dc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.14;
}

.impact-section p,
.impact-note p,
.compact-evidence small {
  margin: 0;
  color: rgba(248, 223, 175, 0.78);
  font-size: 0.98rem;
  line-height: 1.42;
}

.impact-rule {
  position: relative;
  height: 1px;
  margin: 30px 10px;
  background: linear-gradient(90deg, transparent, rgba(215, 174, 98, 0.42), transparent);
}

.impact-rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(215, 174, 98, 0.82);
  background: #2c0709;
  transform: translate(-50%, -50%) rotate(45deg);
}

.connection-balance {
  display: grid;
  gap: 14px;
  padding: 0;
  border-bottom: 0;
}

.connection-balance i {
  position: relative;
  display: block;
  height: 4px;
  margin: 14px 24px 0;
  background: linear-gradient(90deg, #3e8ac0, #d7ae62 50%, #5dbd69);
  border-radius: 999px;
}

.connection-balance i::before,
.connection-balance i::after {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: #220507;
  font-family: Arial, sans-serif;
  font-size: 1.24rem;
  line-height: 1;
  transform: translateY(-50%);
}

.connection-balance i::before {
  content: "-";
  left: -29px;
  color: #58a7dd;
}

.connection-balance i::after {
  content: "+";
  right: -29px;
  color: #68d06f;
}

.connection-balance b {
  position: absolute;
  top: 50%;
  width: 15px;
  height: 15px;
  background: #f2d17e;
  border: 1px solid #fff5c2;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.connection-balance div {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}

.connection-balance small:first-child {
  color: #58a7dd;
}

.connection-balance small:last-child {
  color: #68d06f;
}

.impact-note {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 0;
  background: rgba(255, 204, 61, 0.06);
  border: 0;
  border-radius: 0;
}

.impact-note img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 204, 61, 0.16));
}

.impact-note strong {
  color: #f3d98b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  font-weight: 500;
}

.compact-evidence {
  display: none;
  gap: 6px;
}

.compact-evidence small {
  padding: 7px 9px;
  background: rgba(255, 246, 216, 0.06);
  border-radius: 6px;
  font-size: 0.74rem;
}

#labPanel .game-path {
  background: rgba(25, 4, 6, 0.78);
}

#labPanel .game-path-track::before {
  background: rgba(215, 174, 98, 0.24);
}

#labPanel .game-path-track i {
  background: linear-gradient(90deg, #7c0f08, #f0c762);
}

#labPanel .game-path-track b {
  color: #f3d98b;
  background: #240609;
  border-color: rgba(215, 174, 98, 0.6);
}

#labPanel .game-path-track b.is-complete,
#labPanel .game-path-track b.is-active {
  color: #250806;
  background: linear-gradient(135deg, #fff4be, #d6a948);
  box-shadow: 0 0 18px rgba(255, 204, 61, 0.38);
}

.path-dashboard {
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(280px, 0.9fr) minmax(290px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.path-center-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.path-timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.path-step {
  display: grid;
  grid-template-rows: auto 46px auto;
  gap: 6px;
  place-items: center;
  min-width: 0;
  min-height: 118px;
  padding: 10px 6px;
  color: rgba(248, 223, 175, 0.74);
  background: rgba(255, 246, 216, 0.045);
  border: 1px solid rgba(215, 174, 98, 0.22);
  border-radius: 8px;
}

.path-step span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #2a0d09;
  background: linear-gradient(135deg, #fff4be, #d6a948);
  border-radius: 50%;
  font-weight: 900;
}

.path-step img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.28));
}

.path-step i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: rgba(248, 223, 175, 0.56);
  border: 1px solid rgba(215, 174, 98, 0.28);
  border-radius: 50%;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.path-step strong {
  max-width: 100%;
  color: inherit;
  font-size: 0.78rem;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
}

.path-step.is-complete {
  color: #fff8dc;
  border-color: rgba(255, 220, 107, 0.5);
  background: rgba(255, 204, 61, 0.09);
}

.path-step.is-active {
  border-color: #ffdc6b;
  box-shadow: inset 0 0 0 1px rgba(255, 246, 216, 0.12), 0 0 20px rgba(255, 204, 61, 0.18);
}

.path-step.is-locked {
  opacity: 0.58;
}

.path-strategy-mix {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.path-meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.path-meters article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  background: rgba(255, 246, 216, 0.055);
  border: 1px solid rgba(215, 174, 98, 0.25);
  border-radius: 8px;
}

.path-meters article div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.path-meters strong,
.path-meters span {
  color: #f3d98b;
  font-size: 0.78rem;
  font-weight: 900;
}

.path-meters i {
  display: block;
  height: 8px;
  overflow: hidden;
  background: rgba(255, 246, 216, 0.12);
  border-radius: 999px;
}

.path-meters b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3e8ac0, #ffcf58, #5dbd69);
  border-radius: inherit;
}

.path-meters small {
  color: rgba(248, 223, 175, 0.7);
  font-size: 0.7rem;
  line-height: 1.2;
}

.path-strategy-mix article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  background: rgba(255, 246, 216, 0.045);
  border: 1px solid rgba(215, 174, 98, 0.2);
  border-radius: 8px;
}

.path-strategy-mix article div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.path-strategy-mix strong,
.path-strategy-mix span {
  color: #f3d98b;
  font-size: 0.78rem;
  font-weight: 900;
}

.path-strategy-mix i {
  display: block;
  height: 7px;
  overflow: hidden;
  background: rgba(255, 246, 216, 0.12);
  border-radius: 999px;
}

.path-strategy-mix b {
  display: block;
  height: 100%;
  min-width: 4px;
  background: linear-gradient(90deg, #8d160d, #ffcf58);
  border-radius: inherit;
}

.path-strategy-mix article:not(.has-value) b {
  min-width: 0;
}

.path-insight {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  background: rgba(255, 204, 61, 0.07);
  border: 1px solid rgba(215, 174, 98, 0.28);
  border-radius: 8px;
}

.path-insight > span {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  color: #2a0d09;
  background: radial-gradient(circle, #fff4be, #d6a948);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 204, 61, 0.22);
  font-size: 1.08rem;
  font-weight: 900;
}

.path-insight strong {
  color: #fff8dc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.12;
}

.path-insight p,
.path-insight small {
  display: block;
  margin: 6px 0 0;
  color: rgba(248, 223, 175, 0.78);
  line-height: 1.3;
}

.path-insight small {
  color: #f3d98b;
  font-weight: 800;
}

.final-profile {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  color: #f8dfaf;
  background:
    radial-gradient(circle at 8% 20%, rgba(255, 204, 61, 0.13), transparent 26%),
    rgba(255, 246, 216, 0.05);
  border: 1px solid rgba(255, 220, 107, 0.34);
  border-radius: 10px;
}

.final-profile > div,
.final-profile article {
  min-width: 0;
}

.final-profile span {
  color: #f3d98b;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.final-profile h4 {
  margin: 6px 0;
  color: #fff8dc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.24rem;
  font-weight: 500;
  line-height: 1.12;
}

.final-profile strong {
  display: block;
  color: #f3d98b;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.final-profile p {
  margin: 7px 0 0;
  color: rgba(248, 223, 175, 0.78);
  line-height: 1.28;
}

.final-profile b {
  float: right;
  color: #fff8dc;
}

.final-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 204, 61, 0.18), transparent 34%),
    rgba(15, 2, 4, 0.82);
  backdrop-filter: blur(8px);
}

.final-modal {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(780px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 34px;
  color: #f8dfaf;
  background:
    linear-gradient(135deg, rgba(255, 204, 61, 0.08), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(215, 174, 98, 0.18), transparent 26%),
    linear-gradient(160deg, #250509, #4d0707 52%, #190306);
  border: 1px solid rgba(255, 220, 107, 0.58);
  border-radius: 16px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.52), inset 0 0 0 1px rgba(255, 246, 216, 0.08);
}

.final-modal::before,
.final-modal::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.final-modal::before {
  inset: 10px;
  border: 1px solid rgba(215, 174, 98, 0.24);
  border-radius: 12px;
}

.final-modal::after {
  left: 50%;
  top: 13px;
  width: 10px;
  height: 10px;
  background: #f0c762;
  border: 1px solid rgba(255, 246, 216, 0.78);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 18px rgba(255, 204, 61, 0.5);
}

.final-modal-close {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #2a0d09;
  background: linear-gradient(135deg, #fff4be, #d6a948);
  border: 1px solid rgba(255, 245, 194, 0.72);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(255, 204, 61, 0.22);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.final-modal-crest {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 82px;
  height: 82px;
  background:
    radial-gradient(circle, rgba(255, 244, 190, 0.94) 0 28%, rgba(214, 169, 72, 0.52) 29% 38%, transparent 39%),
    radial-gradient(circle, transparent 0 55%, rgba(240, 199, 98, 0.85) 56% 58%, transparent 59%),
    radial-gradient(circle, transparent 0 70%, rgba(215, 174, 98, 0.58) 71% 73%, transparent 74%);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(255, 204, 61, 0.32);
}

.final-modal-crest span {
  width: 24px;
  height: 24px;
  background: #8e5d15;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.final-modal-copy {
  display: grid;
  gap: 10px;
  text-align: center;
}

.final-modal-copy span,
.final-modal-grid span {
  color: #f3d98b;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.final-modal-copy h3 {
  margin: 0;
  color: #fff8dc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.85rem);
  font-weight: 500;
  line-height: 1.05;
}

.final-modal-copy p {
  width: min(620px, 100%);
  margin: 0 auto;
  color: rgba(248, 223, 175, 0.86);
  font-size: 1.05rem;
  line-height: 1.5;
}

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

.final-modal-score article,
.final-modal-grid article,
.final-modal-note {
  min-width: 0;
  padding: 14px;
  background: rgba(255, 246, 216, 0.06);
  border: 1px solid rgba(215, 174, 98, 0.28);
  border-radius: 10px;
}

.final-modal-score article {
  display: grid;
  gap: 9px;
}

.final-modal-score div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.final-modal-score strong,
.final-modal-score b {
  color: #fff4be;
  font-size: 0.9rem;
  font-weight: 900;
}

.final-modal-score i {
  display: block;
  height: 9px;
  overflow: hidden;
  background: rgba(255, 246, 216, 0.13);
  border-radius: 999px;
}

.final-modal-score em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3e8ac0, #ffcf58, #5dbd69);
  border-radius: inherit;
}

.final-modal-score p,
.final-modal-grid p,
.final-modal-note p {
  margin: 0;
  color: rgba(248, 223, 175, 0.78);
  line-height: 1.34;
}

.final-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.final-modal-grid article {
  display: grid;
  gap: 9px;
  align-content: start;
}

.final-modal-grid strong {
  color: #fff8dc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.12;
}

.final-modal-note {
  border-left: 4px solid #f0c762;
}

.final-modal-note strong {
  display: block;
  margin-bottom: 5px;
  color: #fff4be;
  font-size: 0.92rem;
  text-transform: uppercase;
}

.final-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.final-modal-actions button {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.final-modal-primary {
  color: #2a0d09;
  background: linear-gradient(135deg, #fff4be, #d6a948);
  border: 1px solid rgba(255, 245, 194, 0.72);
  box-shadow: 0 0 20px rgba(255, 204, 61, 0.24);
}

.final-modal-secondary {
  color: #f3d98b;
  background: rgba(255, 246, 216, 0.06);
  border: 1px solid rgba(215, 174, 98, 0.32);
}

#labPanel .game-path .lab-summary h4 {
  color: #fff8dc;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

#labPanel .game-path .lab-summary p,
#labPanel .lab-summary-grid p {
  color: rgba(248, 223, 175, 0.76);
}

#labPanel .lab-summary-grid article {
  background: rgba(255, 246, 216, 0.06);
  border-color: rgba(215, 174, 98, 0.25);
}

#labPanel .lab-summary-grid strong,
#labPanel .lab-summary-grid b {
  color: #f3d98b;
}

#labPanel .lab-controls button {
  color: #2a0d09;
  background: linear-gradient(135deg, #ffdc6b, #d7a43a);
  border: 1px solid rgba(255, 245, 194, 0.62);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

#labPanel .lab-controls button:disabled {
  opacity: 0.42;
}

#labPanel .game-path .lab-controls {
  display: none;
}

@keyframes explorerDraw {
  from {
    stroke-dashoffset: 700;
  }
  to {
    stroke-dashoffset: 0;
  }
}

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

.site-footer {
  margin: 0 var(--frame-margin) 18px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--wine-900), var(--wine-950));
  color: #fff8dc;
  text-align: center;
  padding: 14px 18px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1180px) {
  .finding-grid,
  .table-map,
  .explorer-highlight-strip,
  .method-flow,
  .lab-progress,
  .lab-correlation-group > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .explorer-grid,
  .lab-game,
  .lab-stage,
  .lab-network-grid,
  .lab-research-hero,
  .lab-limits {
    grid-template-columns: 1fr;
  }

  .game-level-map,
  .game-impact {
    position: static;
  }

  .game-level-map {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .game-map-title {
    grid-column: 1 / -1;
  }

  .game-level-map button:not(:last-child)::after {
    display: none;
  }

  .explorer-side {
    display: grid;
    grid-template-columns: 1fr;
  }

  .explorer-progress {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .paper-hero,
  .lens-grid,
  .split-evidence-section,
  .bottom-grid,
  .evidence-detail,
  .explorer-landing-card,
  .correlation-explorer {
    grid-template-columns: 1fr;
  }

  .hero-facts,
  .evidence-copy-block {
    border-left: 0;
    border-top: 1px solid var(--cream-300);
  }
}

@media (max-width: 980px) {
  .page-header,
  .app-layout,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .side-panel {
    border-radius: 12px 12px 0 0;
  }
}

@media (max-width: 760px) {
  .evidence-switcher,
  .comparison-row,
  .relationship-takeaway,
  .relationship-takeaway ul,
  .table-map,
  .finding-grid,
  .readiness-board,
  .explorer-card-grid,
  .tool-grid,
  .quality-grid,
  .role-compare-grid,
  .anova-grid,
  .story-grid,
  .correlation-notes,
  .participant-visual,
  .explorer-intro-points,
  .explorer-highlight-strip,
  .method-flow,
  .lab-game,
  .lab-hero,
  .game-level-map,
  .game-scene-visual,
  .lab-progress,
  .lab-stage,
  .lab-summary-grid,
  .lab-research-grid,
  .lab-hypotheses > div:last-child,
  .lab-correlation-group > div,
  .dimension-map-card dl,
  .quiz-intro,
  .quiz-options {
    grid-template-columns: 1fr;
  }

  .score-line {
    grid-template-columns: 1fr 58px;
  }

  .score-line span {
    grid-column: 1 / -1;
  }

  .explorer-top,
  .explorer-stage-head {
    display: grid;
  }

  .explorer-progress {
    grid-template-columns: 1fr;
  }

  .participant-bar div,
  .dimension-map-card > div:first-child {
    display: grid;
  }

  .quiz-footer {
    display: grid;
  }

  .quiz-nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quiz-footer button {
    width: 100%;
  }

  .lab-mode-tabs,
  .lab-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .game-impact {
    min-height: 0;
  }

}

@media (max-width: 620px) {
  :root {
    --frame-margin: 8px;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .page-header,
  .app-layout {
    width: calc(100vw - (var(--frame-margin) * 2));
    max-width: calc(100vw - (var(--frame-margin) * 2));
  }

  .app-layout,
  .paper-hero {
    display: block;
  }

  .content-stage,
  .side-panel {
    padding: 16px;
    width: 100%;
    max-width: 100%;
  }

  .page-header {
    min-height: 0;
    padding: 4px;
    border-radius: 12px;
  }

  .image-banner {
    min-height: 0;
    border-radius: 12px;
  }

  .hero-copy,
  .hero-facts,
  .compact-section,
  .visual-section,
  .table-map-section,
  .relationship-panel,
  .dimension-panel,
  .evidence-image,
  .evidence-copy-block,
  .generated-visual,
  .section-card,
  .finding-card,
  .explorer-top,
  .explorer-grid,
  .explorer-side,
  .explorer-workspace,
  .explorer-facts,
  .explorer-stage-body > *,
  .explorer-intro-points article,
  .quiz-intro > div:first-child,
  .quiz-score-card,
  .quiz-question,
  .quiz-footer,
  .lab-hero,
  #labContent,
  .lab-scene-card,
  .lab-choice-card,
  .lab-readout,
  .lab-network,
  .lab-summary,
  .lab-research-hero,
  .lab-research-grid article,
  .lab-hypotheses,
  .lab-correlation-browser,
  .lab-limits {
    padding: 14px;
  }

  .hero-copy h3 {
    font-size: 1.42rem;
  }

  .keyword-row {
    gap: 6px;
  }

  .keyword-row span {
    min-height: 26px;
    padding: 6px 8px;
    font-size: 0.68rem;
  }

  .app-layout,
  .content-stage,
  .content-panel,
  .paper-hero,
  .hero-copy,
  .hero-facts,
  .overview-section,
  .lens-card,
  .finding-card,
  .relationship-panel,
  .dimension-panel,
  .evidence-switcher,
  .evidence-detail,
  .table-card,
  .section-card,
  .explorer-shell,
  .explorer-top,
  .explorer-grid,
  .explorer-side,
  .explorer-workspace,
  .explorer-facts,
  .explorer-stage-body > *,
  .relation-svg,
  .correlation-svg,
  .lab-hero,
  .lab-shell,
  .lab-game,
  .game-level-map,
  .game-stage,
  .game-impact,
  .game-path,
  .lab-story,
  .lab-research,
  .lab-stage,
  .lab-scene-card,
  .lab-choice-card,
  .lab-readout,
  .lab-network,
  .lab-network-grid,
  .lab-summary,
  .lab-summary-grid,
  .lab-research-hero,
  .lab-research-grid,
  .lab-hypotheses,
  .lab-correlation-browser,
  .lab-limits {
    min-width: 0;
    max-width: 100%;
  }

  .article-subtitle,
  .article-authors,
  .hero-copy h3,
  .hero-copy p,
  .hero-facts dd,
  .lens-card p,
  .finding-card p,
  .evidence-copy-block p,
  .section-card li,
  .explorer-stage-head h4,
  .explorer-stage-head p,
  .explorer-landing-copy h5,
  .explorer-landing-copy p,
  .explorer-intro-card h5,
  .explorer-intro-card p,
  .explorer-info-card strong,
  .tool-card dd,
  .quality-card dd,
  .role-card dd,
  .dimension-map-card dd,
  .correlation-readout dd,
  .story-grid p,
  .method-flow strong,
  .quiz-intro h5,
  .quiz-intro p,
  .quiz-question h5,
  .quiz-option,
  .quiz-feedback,
  .quiz-footer span,
  .lab-hero h3,
  .lab-hero p,
  .game-stage-head,
  .game-scene-visual,
  .game-scene-visual p,
  .lab-scene-card,
  .lab-choice,
  .lab-readout,
  .lab-summary,
  .lab-research-hero,
  .lab-research-grid,
  .lab-correlation-group button {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .article-subtitle span,
  .article-authors strong,
  .hero-copy,
  .hero-copy h3,
  .hero-copy p,
  .hero-facts,
  .hero-facts div,
  .metric-card,
  .comparison-label,
  .evidence-copy-block,
  .table-card div,
  .explorer-stage-head,
  .explorer-stage-head div,
  .explorer-stage-body,
  .explorer-pill-nav,
  .participant-bar,
  .tool-card,
  .quality-card,
  .role-card,
  .dimension-map-card,
  .anova-card,
  .story-grid article,
  .method-flow article,
  .quiz-shell,
  .quiz-intro,
  .quiz-question,
  .quiz-option,
  .quiz-footer,
  .lab-hero,
  .lab-shell,
  .lab-game,
  .game-level-map,
  .game-stage,
  .game-impact,
  .game-path,
  .lab-story,
  .lab-research,
  .lab-stage,
  .lab-scene-card,
  .lab-choice-card,
  .lab-readout,
  .lab-network,
  .lab-summary,
  .lab-summary-grid,
  .lab-research-hero,
  .lab-research-grid,
  .lab-hypotheses,
  .lab-correlation-browser,
  .lab-limits {
    width: 100%;
    max-width: 100%;
  }

  .content-stage {
    overflow: hidden;
  }

  .paper-hero {
    overflow: hidden;
  }

  .image-banner {
    min-height: 124px;
  }

  .image-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
  }

  .hero-copy h3 {
    max-width: 100%;
    font-size: 1.38rem;
    line-height: 1.12;
  }

  .image-banner img,
  .evidence-image img {
    max-width: 100%;
  }

  .readiness-center {
    min-height: 190px;
  }

  .readiness-card {
    grid-template-columns: 1fr;
  }

  .readiness-card span {
    grid-row: auto;
    width: max-content;
  }

  .explorer-actions {
    display: grid;
  }

  .correlation-readout > strong,
  .participant-total strong {
    font-size: 2.45rem;
  }
}

@media (max-width: 760px) {
  :root {
    --frame-margin: 8px;
  }

  html,
  body,
  body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .page-header,
  .app-layout {
    width: calc(100vw - (var(--frame-margin) * 2)) !important;
    max-width: calc(100vw - (var(--frame-margin) * 2)) !important;
  }

  .app-layout,
  .paper-hero,
  .schema-two-column,
  .schema-evidence-shell,
  .schema-evidence-detail,
  .lab-hero,
  .lab-stage,
  .lab-network-grid,
  .lab-research-hero,
  .lab-limits {
    display: block !important;
  }

  .side-panel,
  .content-stage,
  .content-panel,
  .paper-hero,
  .hero-copy,
  .hero-facts,
  .metric-strip,
  .schema-map-section,
  .schema-findings-section,
  .schema-evidence-section,
  .schema-two-column,
  .attachment-map,
  .attachment-card,
  .schema-theory-panel,
  .schema-method-panel,
  .hypothesis-grid,
  .hypothesis-card,
  .schema-evidence-shell,
  .schema-evidence-detail,
  .schema-pathway-card,
  .schema-takeaway-card,
  .lab-hero,
  .lab-shell,
  .lab-stage,
  .lab-scene-card,
  .lab-choice-card,
  .lab-readout,
  .lab-network,
  .lab-summary,
  .lab-research-hero,
  .lab-research-grid,
  .lab-hypotheses,
  .lab-correlation-browser,
  .lab-limits {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .content-stage,
  .paper-hero,
  .schema-evidence-shell,
  .schema-evidence-detail,
  .lab-shell,
  .game-stage,
  .game-impact,
  .game-path,
  .lab-network {
    overflow: hidden;
  }

  .article-subtitle,
  .article-authors,
  .article-authors strong,
  .hero-copy h3,
  .hero-copy p,
  .hero-facts dd,
  .metric-card,
  .attachment-card,
  .hypothesis-card,
  .schema-evidence-detail,
  .schema-evidence-detail h4,
  .schema-evidence-detail p,
  .schema-takeaway-card li,
  .lab-hero,
  .lab-hero h3,
  .game-stage-head,
  .game-scene-visual,
  .game-choice-zone,
  .game-path,
  .lab-scene-card,
  .lab-choice,
  .lab-readout,
  .lab-summary,
  .lab-research-hero,
  .lab-research-grid article,
  .lab-correlation-group button {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero-copy h3 {
    font-size: clamp(1.32rem, 6vw, 1.58rem);
  }

  .schema-evidence-detail img {
    max-width: 100%;
  }
}

@media (max-width: 1180px) {
  #labPanel .lab-game {
    grid-template-columns: 1fr;
  }

  #labPanel .path-dashboard {
    grid-template-columns: 1fr;
  }

  #labPanel .final-profile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #labPanel .game-level-map {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #labPanel .game-map-title {
    grid-column: 1 / -1;
  }

  #labPanel .game-level-map button:not(:last-child)::after {
    display: none;
  }

  #labPanel .game-stage,
  #labPanel .game-impact,
  #labPanel .game-path {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  #labPanel #labContent {
    padding: 12px;
  }

  #labPanel .lab-game {
    gap: 12px;
    min-height: 0;
    padding: 10px;
  }

  #labPanel .game-titlebar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 8px 12px;
  }

  #labPanel .game-brand {
    gap: 12px;
  }

  #labPanel .game-titlebar strong,
  #labPanel .game-titlebar span {
    justify-self: start;
    font-size: 1.35rem;
  }

  #labPanel .game-titlebar span::before,
  #labPanel .game-titlebar span::after,
  #labPanel .game-titlebar > i {
    display: none;
  }

  #labPanel .game-level-map {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  #labPanel .game-level-map button {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 118px;
  }

  #labPanel .game-stage {
    gap: 14px;
    overflow: hidden;
  }

  #labPanel .game-scene-visual {
    min-height: 182px;
    margin: 0;
    overflow: hidden;
  }

  #labPanel .scene-backdrop {
    width: 100%;
    min-height: 182px;
    aspect-ratio: auto;
    padding: 20px 18px;
  }

  #labPanel .scene-copy {
    min-height: 142px;
    padding-right: 0;
  }

  #labPanel .scene-copy h4 {
    font-size: 1.32rem;
  }

  #labPanel .scene-copy p {
    font-size: 0.74rem;
  }

  #labPanel .game-orbit {
    right: 10px;
    top: 10px;
    width: 64px;
    transform: none;
  }

  #labPanel .game-orbit b {
    bottom: 10px;
    font-size: 0.62rem;
  }

  #labPanel .game-choice-zone {
    padding: 0 8px 12px;
  }

  #labPanel .lab-choice-head {
    padding-right: 0;
  }

  #labPanel .choice-next-button {
    position: static;
    justify-self: end;
    margin-top: 6px;
  }

  #labPanel .game-choice-zone .lab-choice {
    grid-template-columns: 60px minmax(0, 1fr);
    min-height: 75px;
    font-size: 1.12rem;
  }

  #labPanel .choice-aftermath {
    padding: 0 8px 12px;
  }

  #labPanel .consequence-cards,
  #labPanel .path-meters,
  #labPanel .final-modal-score,
  #labPanel .final-modal-grid,
  #labPanel .final-profile {
    grid-template-columns: 1fr;
  }

  #labPanel .final-modal-backdrop {
    padding: 12px;
  }

  #labPanel .final-modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 28px 18px 18px;
  }

  #labPanel .final-modal-close {
    right: 12px;
    top: 12px;
    width: 32px;
    height: 32px;
  }

  #labPanel .final-modal-copy p {
    font-size: 0.95rem;
  }

  #labPanel .final-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  #labPanel .game-impact,
  #labPanel .game-path {
    padding: 14px;
  }

  #labPanel .game-path-track {
    grid-template-columns: repeat(6, minmax(32px, 1fr));
  }

  #labPanel .path-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
