:root {
  --burgundy-950: #26040d;
  --burgundy-900: #3a0714;
  --burgundy-800: #5d1024;
  --burgundy-650: #8f1835;
  --gold-500: #f4c542;
  --gold-300: #ffe38a;
  --gold-100: #fff4c9;
  --ink: #211014;
  --paper: #fffaf0;
  --paper-strong: #fffdf8;
  --cool: #e6f2f0;
  --muted: #74565f;
  --line: rgba(93, 16, 36, 0.18);
  --shadow: 0 26px 80px rgba(38, 4, 13, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(93, 16, 36, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(93, 16, 36, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 14% 10%, rgba(244, 197, 66, 0.34), transparent 24rem),
    radial-gradient(circle at 90% 4%, rgba(93, 16, 36, 0.14), transparent 28rem),
    var(--paper);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

@keyframes particleDrift {
  from {
    background-position: 0 0, 0 0, 0 0, 28px 36px, 16px 22px;
  }
  to {
    background-position: 0 0, 0 0, 74px 74px, 146px 154px, 62px 68px;
  }
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
  padding: 0.75rem clamp(1rem, 4vw, 3rem);
  color: white;
  background: rgba(38, 4, 13, 0.9);
  border-bottom: 1px solid rgba(244, 197, 66, 0.32);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: white;
  text-decoration: none;
}

.brand-symbol {
  position: relative;
  display: block;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(244, 197, 66, 0.45);
  border-radius: 0.6rem;
  background:
    radial-gradient(circle at 30% 32%, var(--gold-500) 0 0.46rem, transparent 0.48rem),
    radial-gradient(circle at 70% 30%, var(--gold-300) 0 0.22rem, transparent 0.24rem),
    radial-gradient(circle at 72% 72%, var(--gold-500) 0 0.33rem, transparent 0.35rem),
    linear-gradient(135deg, var(--burgundy-650), var(--burgundy-950));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
}

.brand-symbol span {
  position: absolute;
  height: 1px;
  background: rgba(255, 227, 138, 0.75);
  transform-origin: left center;
}

.brand-symbol span:nth-child(1) {
  width: 1.2rem;
  left: 0.95rem;
  top: 1rem;
  rotate: 16deg;
}

.brand-symbol span:nth-child(2) {
  width: 1rem;
  left: 1.8rem;
  top: 1.05rem;
  rotate: 92deg;
}

.brand-symbol span:nth-child(3) {
  width: 1.05rem;
  left: 1.8rem;
  top: 2.1rem;
  rotate: -148deg;
}

.brand-symbol span:nth-child(4) {
  width: 1.25rem;
  left: 0.92rem;
  top: 1rem;
  rotate: 75deg;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand small {
  color: rgba(255, 244, 201, 0.74);
  font-size: 0.76rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav a {
  color: rgba(255, 250, 240, 0.86);
  padding: 0.58rem 0.82rem;
  border-radius: 999px;
  text-decoration: none;
}

.nav a:hover {
  color: var(--burgundy-950);
  background: var(--gold-500);
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: calc(100svh - 4.75rem);
  isolation: isolate;
  color: white;
  background:
    linear-gradient(125deg, rgba(38, 4, 13, 0.98), rgba(93, 16, 36, 0.9) 48%, rgba(244, 197, 66, 0.18)),
    var(--burgundy-950);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(244, 197, 66, 0.15), transparent 22rem),
    radial-gradient(circle at 82% 34%, rgba(244, 197, 66, 0.12), transparent 20rem),
    radial-gradient(circle, rgba(255, 244, 201, 0.42) 0 1px, transparent 1.7px) 0 0 / 74px 74px,
    radial-gradient(circle, rgba(244, 197, 66, 0.32) 0 1.25px, transparent 1.9px) 28px 36px / 118px 118px,
    radial-gradient(circle, rgba(255, 250, 240, 0.26) 0 0.8px, transparent 1.5px) 16px 22px / 46px 46px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
  animation: particleDrift 18s linear infinite;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 9rem;
  background: linear-gradient(transparent, var(--paper));
  pointer-events: none;
  z-index: 0;
}

.hero-canvas {
  position: absolute;
  left: -18%;
  top: -14%;
  width: 136%;
  height: 128%;
  display: block;
  opacity: 0.95;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(28rem, 0.68fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
  width: min(1220px, calc(100% - 2rem));
  min-height: calc(100svh - 4.75rem);
  margin: 0 auto;
  padding: clamp(2.8rem, 6vw, 4.5rem) 0 clamp(4rem, 7vw, 6rem);
}

.journal-tag,
.micro-label {
  margin: 0 0 0.65rem;
  color: var(--gold-500);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 11.8ch;
  margin: 0;
  color: white;
  font-size: clamp(3rem, 7.2vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-shadow: 0 20px 70px rgba(0, 0, 0, 0.32);
}

.hero-copy p:not(.journal-tag) {
  max-width: 45rem;
  color: rgba(255, 250, 240, 0.82);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  border-radius: 0.55rem;
  font-weight: 850;
  text-decoration: none;
}

.button.primary,
.primary-action {
  color: var(--burgundy-950);
  border: 0;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
  box-shadow: 0 18px 44px rgba(244, 197, 66, 0.18);
}

.button.secondary {
  color: white;
  border: 1px solid rgba(255, 227, 138, 0.38);
  background: rgba(255, 255, 255, 0.08);
}

.hero-side {
  display: grid;
  gap: 1rem;
  align-self: center;
}

.neuro-visual {
  position: relative;
  overflow: visible;
  min-height: 36.4rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.neuro-visual::before {
  content: none;
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.filter-chip,
.segmented button,
.tool-option {
  color: var(--burgundy-800);
  border: 1px solid rgba(93, 16, 36, 0.22);
  border-radius: 999px;
  background: var(--paper-strong);
}

.filter-chip.active,
.segmented button.active,
.tool-option.active {
  color: var(--burgundy-950);
  border-color: transparent;
  background: var(--gold-500);
  font-weight: 900;
}

.paper-station,
.pathway-section,
.atlas-section,
.diagnostic-section,
.simulator-section {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.section-title {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(18rem, 0.55fr);
  gap: 1.4rem;
  align-items: end;
  margin-bottom: 1.4rem;
}

.section-title.compact {
  display: block;
  max-width: 58rem;
}

.section-title h2 {
  margin: 0;
  color: var(--burgundy-950);
  font-size: clamp(2.1rem, 5vw, 4.7rem);
  line-height: 0.95;
}

.section-title p:last-child {
  margin: 0;
  color: var(--muted);
}

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

.paper-panel,
.mechanism-stage,
.pathway-track,
.atlas-card,
.atlas-toolbar,
.case-list,
.case-workbench,
.diagnostic-card {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 18px 56px rgba(38, 4, 13, 0.1);
  backdrop-filter: blur(16px);
}

.paper-panel {
  min-height: 20rem;
  padding: 1.2rem;
}

.paper-panel.accent {
  color: white;
  background:
    radial-gradient(circle at top right, rgba(244, 197, 66, 0.34), transparent 13rem),
    linear-gradient(135deg, var(--burgundy-800), var(--burgundy-950));
}

.panel-topline {
  color: var(--burgundy-650);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.paper-panel.accent .panel-topline {
  color: var(--gold-300);
}

.panel-topline span {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--burgundy-950);
}

.paper-panel h3 {
  margin: 3rem 0 0.8rem;
  color: var(--burgundy-950);
  font-size: 1.85rem;
  line-height: 1.05;
}

.paper-panel.accent h3 {
  color: white;
}

.paper-panel p {
  color: var(--muted);
}

.paper-panel.accent p {
  color: rgba(255, 250, 240, 0.82);
}

.comparison-table {
  display: grid;
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 18px 56px rgba(38, 4, 13, 0.1);
  backdrop-filter: blur(16px);
}

.comparison-table > div {
  display: grid;
  grid-template-columns: minmax(9rem, 0.42fr) minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.comparison-table > div:first-child {
  border-top: 0;
}

.comparison-table span {
  padding: 0.95rem;
  border-left: 1px solid var(--line);
}

.comparison-table span:first-child {
  border-left: 0;
  color: var(--burgundy-950);
  font-weight: 900;
}

.comparison-head {
  color: var(--burgundy-950);
  background: linear-gradient(135deg, var(--gold-500), var(--gold-100));
  font-weight: 950;
}

.pathway-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 0.44fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.4rem;
}

.pathway-track {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  padding: 0.75rem;
}

.path-step {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.8rem;
  align-items: center;
  width: 100%;
  min-height: 4rem;
  padding: 0.7rem;
  color: var(--burgundy-800);
  text-align: left;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: transparent;
}

.path-step span {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  color: var(--burgundy-950);
  border-radius: 50%;
  background: var(--gold-500);
  font-size: 0.76rem;
  font-weight: 950;
}

.path-step:hover,
.path-step.active {
  background: var(--paper-strong);
  border-color: rgba(93, 16, 36, 0.2);
  transform: translateX(0.2rem);
}

.mechanism-stage {
  position: relative;
  min-height: 36rem;
  overflow: hidden;
  padding: clamp(1.3rem, 4vw, 2.4rem);
  color: white;
  background:
    radial-gradient(circle at 82% 78%, rgba(244, 197, 66, 0.24), transparent 17rem),
    linear-gradient(135deg, var(--burgundy-800), var(--burgundy-950));
}

.mechanism-stage h3,
.atlas-card h3,
.case-workbench h3 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1.02;
}

.mechanism-stage p:not(.micro-label) {
  max-width: 44rem;
  color: rgba(255, 250, 240, 0.82);
}

#pathway-points {
  display: grid;
  gap: 0.72rem;
  max-width: 45rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

#pathway-points li {
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(255, 227, 138, 0.26);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.08);
}

.stage-orbit {
  position: absolute;
  right: -5rem;
  bottom: -5rem;
  width: 25rem;
  height: 25rem;
  opacity: 0.65;
}

.stage-orbit span {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255, 227, 138, 0.35);
  border-radius: 50%;
}

.stage-orbit span:nth-child(2) {
  inset: 28%;
}

.stage-orbit span:nth-child(3) {
  inset: 44%;
  background: var(--gold-500);
}

.atlas-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.38fr);
  gap: 1rem;
}

.atlas-toolbar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.75rem;
  box-shadow: none;
}

.filter-chip {
  padding: 0.58rem 0.88rem;
}

.knowledge-map {
  width: 100%;
  min-height: 35rem;
  border: 1px solid rgba(244, 197, 66, 0.22);
  border-radius: 0.75rem;
  background:
    radial-gradient(circle at center, rgba(244, 197, 66, 0.2), transparent 18rem),
    linear-gradient(135deg, rgba(38, 4, 13, 0.96), rgba(93, 16, 36, 0.9));
  box-shadow: var(--shadow);
}

.graph-line {
  stroke: rgba(255, 227, 138, 0.28);
  stroke-width: 2.2;
}

.graph-node {
  cursor: pointer;
}

.graph-node circle {
  fill: rgba(255, 250, 240, 0.94);
  stroke: var(--gold-500);
  stroke-width: 3;
  filter: url("#nodeGlow");
}

.graph-node text {
  fill: var(--burgundy-950);
  font-size: 15px;
  font-weight: 900;
  pointer-events: none;
}

.graph-node.active circle,
.graph-node:hover circle {
  fill: var(--gold-500);
  stroke: white;
  stroke-width: 4;
}

.graph-node.dimmed,
.graph-line.dimmed {
  opacity: 0.18;
}

.atlas-card {
  align-self: stretch;
  padding: 1.2rem;
}

.atlas-card p:not(.micro-label),
.case-workbench p,
.feedback {
  color: var(--muted);
}

.map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.map-links span {
  padding: 0.45rem 0.6rem;
  color: var(--burgundy-950);
  border-radius: 999px;
  background: var(--gold-100);
  font-size: 0.84rem;
  font-weight: 850;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.diagnostic-card {
  position: relative;
  overflow: hidden;
  min-height: 17rem;
  padding: 1rem;
}

.diagnostic-card::after {
  content: "";
  position: absolute;
  inset: auto -2rem -4rem auto;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: rgba(244, 197, 66, 0.18);
}

.diagnostic-card strong {
  display: block;
  color: var(--burgundy-950);
  font-size: 1.25rem;
  line-height: 1.12;
}

.diagnostic-card p {
  color: var(--muted);
}

.diagnostic-card dl {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
}

.diagnostic-card div {
  position: relative;
  z-index: 1;
}

.diagnostic-card dt {
  color: var(--burgundy-650);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diagnostic-card dd {
  margin: 0;
  color: var(--ink);
}

.simulator-grid {
  display: grid;
  grid-template-columns: minmax(15rem, 0.42fr) minmax(0, 1fr);
  gap: 1rem;
}

.case-list {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: 0.75rem;
}

.case-card {
  width: 100%;
  padding: 1rem;
  color: var(--ink);
  text-align: left;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: var(--paper-strong);
}

.case-card:hover,
.case-card.active {
  border-color: rgba(93, 16, 36, 0.22);
  transform: translateY(-0.1rem);
}

.case-card strong,
.case-card span {
  display: block;
}

.case-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.case-workbench {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.choice-block {
  margin-top: 1.35rem;
}

.choice-block h4 {
  margin: 0 0 0.7rem;
  color: var(--burgundy-950);
}

.segmented,
.tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.segmented button,
.tool-option {
  padding: 0.68rem 0.9rem;
}

.tool-option {
  border-radius: 0.55rem;
}

.primary-action {
  margin-top: 1.35rem;
}

.feedback {
  min-height: 5rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(93, 16, 36, 0.18);
  border-radius: 0.55rem;
  background: var(--gold-100);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  padding: 2.2rem 1rem 3rem;
  color: rgba(255, 250, 240, 0.72);
  background: var(--burgundy-950);
}

.footer strong {
  color: var(--gold-500);
}

@media (max-width: 980px) {
  .hero-grid,
  .section-title,
  .pathway-layout,
  .atlas-grid,
  .simulator-grid {
    grid-template-columns: 1fr;
  }

  .paper-grid,
  .diagnostic-grid {
    grid-template-columns: 1fr;
  }

  .comparison-table > div {
    grid-template-columns: 1fr;
  }

  .comparison-table span {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .comparison-table span:first-child {
    border-top: 0;
    background: var(--gold-100);
  }

  .hero-grid {
    align-items: center;
    min-height: auto;
    padding-top: 4rem;
  }

  .hero-canvas {
    left: -12%;
    top: -10%;
    width: 124%;
    height: 120%;
  }

  .neuro-visual {
    min-height: 36.4rem;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
  }

  .brand small {
    max-width: 16rem;
  }

  .hero-copy h1 {
    font-size: 2.75rem;
    line-height: 0.96;
  }

  .hero-canvas {
    left: -10%;
    top: -8%;
    width: 120%;
    height: 116%;
  }

  .neuro-visual {
    min-height: 31.5rem;
  }

  .knowledge-map {
    min-height: 29rem;
  }
}


/* Application-specific additions */
.metric-board {
  position: relative;
  display: grid;
  gap: 0.9rem;
  width: min(100%, 34rem);
  margin: 0 auto;
  padding: 1.15rem;
  border: 1px solid rgba(255, 227, 138, 0.24);
  border-radius: 1rem;
  background: rgba(38, 4, 13, 0.52);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.metric-board h2 {
  margin: 0;
  color: white;
  font-size: 1.45rem;
}

.metric-row {
  display: grid;
  grid-template-columns: minmax(8rem, 0.8fr) minmax(0, 1.4fr) 3rem;
  gap: 0.75rem;
  align-items: center;
}

.metric-label {
  color: rgba(255, 250, 240, 0.86);
  font-size: 0.9rem;
  font-weight: 750;
}

.metric-track {
  overflow: hidden;
  height: 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.metric-fill {
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  transition: width 0.45s ease;
}

.metric-value {
  color: var(--gold-300);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: right;
}

.brain-orbit {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 18rem;
  margin-top: 0.5rem;
}

.brain-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 10.5rem;
  height: 8.2rem;
  border-radius: 48% 52% 46% 54% / 58% 47% 53% 42%;
  color: var(--burgundy-950);
  background:
    radial-gradient(circle at 32% 38%, rgba(255,255,255,.9) 0 4px, transparent 5px),
    radial-gradient(circle at 66% 31%, rgba(255,255,255,.82) 0 3px, transparent 4px),
    radial-gradient(circle at 58% 66%, rgba(255,255,255,.76) 0 4px, transparent 5px),
    linear-gradient(135deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 54px rgba(244,197,66,.38);
  font-weight: 950;
  text-align: center;
  transition: transform .4s ease, filter .4s ease;
}

.brain-core::before,
.brain-core::after {
  content: "";
  position: absolute;
  inset: 14% 48% 14% auto;
  width: 1px;
  background: rgba(93,16,36,.35);
}

.brain-core::after {
  inset: 20% 18% auto;
  width: auto;
  height: 1px;
}

.brain-ring {
  position: absolute;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgba(255, 227, 138, 0.34);
  border-radius: 50%;
  animation: orbitSpin 16s linear infinite;
}

.brain-ring:nth-child(2) {
  width: 12.5rem;
  height: 12.5rem;
  animation-duration: 11s;
  animation-direction: reverse;
}

.brain-ring::before,
.brain-ring::after {
  content: "";
  position: absolute;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 18px rgba(244,197,66,.8);
}

.brain-ring::before {
  left: 1.2rem;
  top: 1.8rem;
}

.brain-ring::after {
  right: 1rem;
  bottom: 2.2rem;
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

.lab-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.lab-stat {
  padding: 0.8rem;
  border: 1px solid rgba(255, 227, 138, 0.2);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.07);
}

.lab-stat strong,
.lab-stat span {
  display: block;
}

.lab-stat strong {
  color: white;
  font-size: 1.15rem;
}

.lab-stat span {
  color: rgba(255, 250, 240, 0.67);
  font-size: 0.75rem;
}

.assessment {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.question-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 253, 248, 0.88);
}

.question-card label {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--burgundy-950);
  font-weight: 850;
}

.question-card input[type="range"] {
  width: 100%;
  accent-color: var(--burgundy-650);
}

.range-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
}

.result-panel {
  display: grid;
  grid-template-columns: minmax(11rem, 0.45fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--paper-strong);
}

.risk-gauge {
  --risk: 25%;
  position: relative;
  display: grid;
  place-items: end center;
  width: 12rem;
  height: 6rem;
  overflow: hidden;
  margin: 0 auto;
}

.risk-gauge::before {
  content: "";
  position: absolute;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: conic-gradient(from 270deg, var(--burgundy-650) var(--risk), var(--gold-100) 0 50%, transparent 0);
}

.risk-gauge::after {
  content: "";
  position: absolute;
  bottom: -4.5rem;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: var(--paper-strong);
}

.risk-gauge strong {
  position: relative;
  z-index: 1;
  color: var(--burgundy-950);
  font-size: 1.55rem;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(8.7rem, 1fr));
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.day-card {
  min-height: 17rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--paper-strong);
}

.day-card h4 {
  margin: 0 0 0.75rem;
  color: var(--burgundy-950);
}

.event-option {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.62rem;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(93,16,36,.15);
  border-radius: 0.5rem;
  background: white;
}

.event-option:hover,
.event-option.selected {
  border-color: var(--burgundy-650);
  background: var(--gold-100);
}

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

.report-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255,253,248,.9);
}

.report-card h3 {
  margin-top: 0;
  color: var(--burgundy-950);
}

.report-card ul {
  padding-left: 1.2rem;
}

.notice {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  color: var(--muted);
  border-left: 4px solid var(--gold-500);
  background: var(--gold-100);
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .metric-row,
  .result-panel,
  .report-grid {
    grid-template-columns: 1fr;
  }

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

  .metric-value {
    text-align: left;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  #final-report,
  #final-report * {
    visibility: visible;
  }

  #final-report {
    position: absolute;
    inset: 0;
    width: 100%;
    padding: 1.5rem;
  }
}


/* =========================================================
   TYPOGRAPHY & OVERLAP SAFETY PATCH
   Keeps all titles readable and prevents text collisions.
   ========================================================= */

:where(
  .topbar,
  .brand,
  .brand > span,
  .nav,
  .hero-grid,
  .hero-copy,
  .hero-side,
  .metric-board,
  .section-title,
  .paper-grid,
  .paper-panel,
  .comparison-table,
  .pathway-layout,
  .pathway-track,
  .mechanism-stage,
  .atlas-grid,
  .atlas-card,
  .diagnostic-grid,
  .diagnostic-card,
  .simulator-grid,
  .case-list,
  .case-workbench,
  .report-grid,
  .report-card,
  .day-card
) {
  min-width: 0;
}

:where(
  h1, h2, h3, h4, p, li, span, strong, small, dt, dd,
  button, a, label
) {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.hero-copy {
  max-width: 100%;
}

.hero-copy h1 {
  max-width: 100%;
  font-size: clamp(2.35rem, 5.15vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

.hero-copy p:not(.journal-tag) {
  max-width: 48rem;
  line-height: 1.68;
}

.brand {
  min-width: 0;
}

.brand > span:last-child {
  min-width: 0;
}

.brand strong {
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.brand small {
  line-height: 1.35;
}

.nav {
  flex: 0 0 auto;
}

.nav a {
  white-space: nowrap;
}

.section-title h2 {
  font-size: clamp(2rem, 4.25vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-title p:last-child,
.paper-panel p,
.mechanism-stage p:not(.micro-label),
.atlas-card p:not(.micro-label),
.case-workbench p,
.feedback,
.diagnostic-card p,
.report-card p,
.report-card li {
  line-height: 1.65;
}

.paper-panel,
.diagnostic-card,
.case-workbench,
.atlas-card,
.report-card {
  overflow: visible;
}

.paper-panel {
  min-height: auto;
}

.paper-panel h3 {
  margin-top: 2.1rem;
  line-height: 1.15;
}

.panel-topline {
  align-items: flex-start;
}

.panel-topline > :first-child {
  min-width: 0;
}

.path-step {
  align-items: start;
}

.path-step strong {
  display: block;
  padding-top: 0.48rem;
  line-height: 1.3;
}

.mechanism-stage {
  min-height: 34rem;
}

.mechanism-stage h3,
.atlas-card h3,
.case-workbench h3 {
  line-height: 1.08;
  text-wrap: balance;
}

#pathway-points li {
  line-height: 1.55;
}

.graph-node text {
  font-size: 14px;
}

.metric-row {
  grid-template-columns: minmax(7.5rem, 0.9fr) minmax(8rem, 1.4fr) 3rem;
}

.metric-label {
  line-height: 1.3;
}

.lab-stat {
  min-width: 0;
}

.lab-stat strong,
.lab-stat span {
  overflow-wrap: anywhere;
}

.question-card label {
  line-height: 1.4;
}

.day-card {
  min-height: auto;
}

.event-option {
  min-height: 3.2rem;
  line-height: 1.35;
}

.case-card strong,
.case-card span {
  line-height: 1.35;
}

.segmented button,
.tool-option,
.primary-action,
.button {
  line-height: 1.25;
  white-space: normal;
}

.footer {
  line-height: 1.55;
  text-align: center;
}

@media (max-width: 1120px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(24rem, 0.82fr);
  }

  .hero-copy h1 {
    font-size: clamp(2.35rem, 5.8vw, 4.25rem);
  }
}

@media (max-width: 980px) {
  .hero-copy h1 {
    max-width: 16ch;
    font-size: clamp(2.3rem, 8vw, 4rem);
    line-height: 1.04;
  }

  .hero-side {
    width: 100%;
  }

  .metric-board {
    width: min(100%, 38rem);
  }

  .mechanism-stage {
    min-height: auto;
    padding-bottom: 12rem;
  }
}

@media (max-width: 680px) {
  .topbar {
    gap: 0.7rem;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-symbol {
    flex: 0 0 3rem;
  }

  .brand strong {
    font-size: 0.9rem;
  }

  .brand small {
    font-size: 0.72rem;
  }

  .hero-grid {
    width: min(100% - 1.25rem, 1220px);
    padding-top: 2.8rem;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(2rem, 10.8vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
  }

  .journal-tag,
  .micro-label {
    line-height: 1.4;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .metric-board {
    padding: 0.9rem;
  }

  .metric-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .metric-value {
    text-align: left;
  }

  .lab-strip {
    grid-template-columns: 1fr 1fr;
  }

  .section-title h2 {
    font-size: clamp(1.85rem, 9vw, 2.8rem);
    line-height: 1.08;
  }

  .paper-station,
  .pathway-section,
  .atlas-section,
  .diagnostic-section,
  .simulator-section {
    width: min(100% - 1.25rem, 1220px);
  }

  .comparison-table span {
    line-height: 1.5;
  }

  .path-step {
    grid-template-columns: 2.4rem minmax(0, 1fr);
  }

  .mechanism-stage {
    padding-bottom: 10rem;
  }

  .atlas-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-chip {
    width: 100%;
  }

  .knowledge-map {
    min-height: 25rem;
  }

  .segmented,
  .tool-grid {
    flex-direction: column;
  }

  .segmented button,
  .tool-option {
    width: 100%;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }
}


/* Qualitative, article-faithful dashboard */
.qualitative-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.qualitative-card {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid rgba(255, 227, 138, 0.2);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.07);
}

.qualitative-card span,
.qualitative-card strong {
  display: block;
}

.qualitative-card span {
  color: rgba(255, 250, 240, 0.7);
  font-size: 0.78rem;
  line-height: 1.35;
}

.qualitative-card strong {
  margin-top: 0.3rem;
  color: var(--gold-300);
  line-height: 1.3;
}

.dashboard-note {
  margin: 0;
  color: rgba(255, 250, 240, 0.72);
  font-size: 0.82rem;
  line-height: 1.5;
}

.question-card select {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  border: 1px solid rgba(93, 16, 36, 0.22);
  border-radius: 0.55rem;
  background: var(--paper-strong);
  font: inherit;
}

.qualitative-result {
  grid-template-columns: 1fr;
}

@media (max-width: 680px) {
  .qualitative-grid {
    grid-template-columns: 1fr;
  }
}


/* Clean initial state: no placeholder assessment labels */
.clean-hero-visual {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1.25rem;
  min-height: 36rem;
}

.hero-brain {
  width: 100%;
  min-height: 24rem;
}

.hero-brain .brain-core {
  width: 12rem;
  height: 9.3rem;
  font-size: 1rem;
  line-height: 1.35;
}

.hero-brain .brain-ring:first-child {
  width: 18rem;
  height: 18rem;
}

.hero-brain .brain-ring:nth-child(2) {
  width: 14.5rem;
  height: 14.5rem;
}

.hero-assessment-button {
  min-width: 13rem;
}

#assessment-result.hidden {
  display: none;
}

@media (max-width: 680px) {
  .clean-hero-visual {
    min-height: 27rem;
  }

  .hero-brain {
    min-height: 19rem;
  }

  .hero-brain .brain-core {
    width: 10.5rem;
    height: 8rem;
    font-size: 0.9rem;
  }

  .hero-brain .brain-ring:first-child {
    width: 15rem;
    height: 15rem;
  }

  .hero-brain .brain-ring:nth-child(2) {
    width: 12.5rem;
    height: 12.5rem;
  }
}


/* =========================================================
   FINAL WORD-INTEGRITY PATCH
   Never split words incorrectly. Reduce font size instead.
   ========================================================= */

html,
body,
button,
input,
select,
textarea,
h1,
h2,
h3,
h4,
p,
span,
strong,
small,
li,
a,
label {
  hyphens: none !important;
  -webkit-hyphens: none !important;
  -ms-hyphens: none !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

h1,
h2,
h3,
h4,
p,
li,
span,
strong,
small,
button,
a,
label {
  max-width: 100%;
}

.hero-copy h1 {
  font-size: clamp(2rem, 4.3vw, 4rem);
  line-height: 1.08;
}

.section-title h2 {
  font-size: clamp(1.9rem, 3.7vw, 3.5rem);
  line-height: 1.1;
}

/* Module 3: give the right information card more room */
.atlas-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(21rem, 0.65fr);
  align-items: stretch;
}

.atlas-card {
  min-width: 0;
  padding: clamp(1.15rem, 2.4vw, 1.8rem);
}

.atlas-card h3 {
  font-size: clamp(1.65rem, 2.45vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.atlas-card p {
  font-size: clamp(0.92rem, 1.15vw, 1rem);
  line-height: 1.65;
}

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

.map-links span {
  min-width: 0;
  padding: 0.62rem 0.72rem;
  font-size: 0.86rem;
  line-height: 1.3;
  text-align: center;
}

/* Prevent large dynamic headings from forcing word splits */
.mechanism-stage h3,
.case-workbench h3 {
  font-size: clamp(1.65rem, 3vw, 2.75rem);
  line-height: 1.12;
}

/* Keep navigation and controls readable without breaking words */
.nav a,
.filter-chip,
.segmented button,
.tool-option,
.primary-action,
.button,
.event-option {
  font-size: clamp(0.78rem, 1vw, 0.95rem);
}

/* On medium screens stack Module 3 before the right card becomes too narrow */
@media (max-width: 1050px) {
  .atlas-grid {
    grid-template-columns: 1fr;
  }

  .atlas-card {
    width: 100%;
  }

  .atlas-card h3 {
    font-size: clamp(1.7rem, 4vw, 2.45rem);
  }
}

@media (max-width: 760px) {
  .hero-copy h1 {
    font-size: clamp(1.85rem, 9vw, 2.75rem);
  }

  .section-title h2 {
    font-size: clamp(1.75rem, 8vw, 2.55rem);
  }

  .atlas-card h3,
  .mechanism-stage h3,
  .case-workbench h3 {
    font-size: clamp(1.5rem, 7vw, 2.15rem);
  }

  .map-links {
    grid-template-columns: 1fr;
  }

  .filter-chip,
  .segmented button,
  .tool-option,
  .primary-action,
  .button,
  .event-option {
    font-size: 0.86rem;
  }
}

@media (max-width: 430px) {
  .hero-copy h1 {
    font-size: 1.8rem;
  }

  .section-title h2 {
    font-size: 1.7rem;
  }

  .atlas-card h3,
  .mechanism-stage h3,
  .case-workbench h3 {
    font-size: 1.45rem;
  }

  .brand strong {
    font-size: 0.78rem;
  }

  .brand small {
    font-size: 0.67rem;
  }
}


/* Module 4 interaction repair */
.day-options {
  display: grid;
  gap: 0.55rem;
}

.event-option {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 3.2rem;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  text-align: left;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.event-option:disabled {
  opacity: 1 !important;
  cursor: pointer;
}

.event-check {
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.event-option.selected .event-check {
  background: currentColor;
}

.event-option.selected .event-check::first-letter {
  color: var(--paper-strong);
}

.event-option.selected {
  transform: none;
}

.week-summary {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(93, 16, 36, 0.18);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.62);
  line-height: 1.55;
}

.week-summary strong,
.week-summary span {
  display: block;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

@media (max-width: 680px) {
  .event-option {
    font-size: 0.84rem;
  }
}


/* The former seven-day simulator module was intentionally removed.
   Remaining module spacing is preserved for a balanced layout. */
