:root {
  --header-height: 302px;
  --frame-margin: 18px;
  --burgundy: #700b06;
  --burgundy-dark: #5a0805;
  --bg: #f7ecd0;
  --panel: #ffffff;
  --panel-strong: #fff8e6;
  --ink: #160907;
  --muted: #3f2719;
  --line: #9b6a1f;
  --accent: #700b06;
  --accent-dark: #4f0704;
  --accent-soft: rgba(112, 11, 6, 0.24);
  --warning-line: #d99b18;
  --shadow: 0 12px 28px rgba(89, 43, 8, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

button { font: inherit; }
a { color: var(--accent); }

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

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

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

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  max-width: 1500px;
  margin: 18px var(--frame-margin) 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(90deg, var(--burgundy) 0 300px, #ffffff 300px);
  box-shadow: 0 18px 44px rgba(89, 43, 8, 0.12);
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: stretch;
  min-height: 100%;
  padding: 24px;
  background: linear-gradient(180deg, var(--burgundy), var(--burgundy-dark));
  color: #fff8dc;
  border-radius: 13px 0 0 13px;
  box-shadow: inset -1px 0 0 rgba(255, 231, 163, 0.16);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 241, 184, 0.28);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f4c542;
  color: #3a0905;
  font-weight: 800;
}

.brand h1 { margin: 0; font-size: 1.05rem; line-height: 1.2; }
.brand p { margin: 5px 0 0; color: #f5d9a0; font-size: 0.86rem; }

.menu-label {
  display: block;
  margin: 24px 0 8px;
  color: #ffe7a3;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.side-nav { display: grid; gap: 8px; }
.side-nav a {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff4c7;
  text-decoration: none;
}
.side-nav a:hover,
.side-nav a:focus-visible {
  border-color: rgba(255, 241, 184, 0.42);
  background: rgba(255, 241, 184, 0.14);
  color: #fff;
  outline: 0;
}
.side-nav span {
  display: block;
  margin-top: 2px;
  color: #f1cf86;
  font-size: 0.78rem;
}

.mobile-section-select {
  display: none;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 241, 184, 0.62);
  border-radius: 8px;
  background: #fff7dc;
  color: var(--burgundy);
  font: inherit;
  font-weight: 800;
}

.content {
  min-width: 0;
  padding: 28px;
  background: var(--panel-strong);
}

.hero {
  min-height: 0;
  padding: 20px;
  border: 1px solid var(--warning-line);
  border-radius: 14px;
  background: #fff3cf;
  color: var(--ink);
}

.hero-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #8b1209;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero h1 {
  margin: 8px 0 0;
  color: #1f0805;
  font-size: clamp(34px, 3.2vw, 46px);
  line-height: 1.12;
}

h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.2vw, 2.35rem);
  line-height: 1.1;
}
h3 { margin: 0 0 10px; font-size: 1.15rem; line-height: 1.25; }
p { line-height: 1.55; }

.hero-actions,
.top-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero-action {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--warning-line);
  border-radius: 7px;
  color: #260803;
  font-weight: 800;
  text-decoration: none;
}

.hero-action.primary {
  border-color: var(--burgundy);
  background: var(--burgundy);
  color: #ffffff;
}

.hero-action.secondary {
  background: #f4c542;
}

.btn {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: var(--accent);
  color: #fff8dc;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { background: var(--accent-dark); }
.btn.secondary {
  border: 1px solid var(--line);
  background: #f3d071;
  color: #4f0704;
}

.hero-note,
.notice {
  margin-top: 12px;
  margin-bottom: 0;
  padding: 14px 16px;
  border: 1px solid var(--warning-line);
  border-radius: 7px;
  background: #fff7dc;
}

.subtitle {
  margin: 0;
  color: #2e1b10;
  font-size: 15px;
  line-height: 1.55;
}

.info-card,
.panel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section {
  margin-top: 26px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  scroll-margin-top: 18px;
}
.section-head {
  max-width: 860px;
  margin-bottom: 16px;
}
.section-head p:last-child { color: var(--muted); margin-bottom: 0; }

.source-grid,
.metric-grid,
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.metric-grid,
.challenge-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel-card,
.info-card {
  padding: 18px;
}

.section > .panel-card,
.section > .quiz-card {
  box-shadow: none;
}

.dual-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.dual-toggle {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 15px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.dual-toggle.active,
.dual-toggle:hover {
  border-color: var(--burgundy);
  background: var(--burgundy);
  color: #fff8dc;
}

.dual-role-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.dual-role-card {
  border-left: 6px solid var(--burgundy);
}

.role-pathway {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.role-pathway span {
  position: relative;
  display: grid;
  min-height: 64px;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff5dd;
  color: #4f0704;
  font-weight: 800;
  text-align: center;
  line-height: 1.25;
}

.role-pathway span:not(:last-child)::after {
  content: ">";
  position: absolute;
  right: -10px;
  color: var(--burgundy);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 10px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff0bd;
  color: #7f120a;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cargo-board {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(340px, 1.05fr);
  gap: 16px;
  align-items: stretch;
}
.exosome-model {
  position: relative;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.78) 0 18%, rgba(238, 190, 185, 0.24) 19% 28%, rgba(255,255,255,0.22) 29% 36%, transparent 37%),
    radial-gradient(circle at 50% 50%, rgba(112,11,6,0.06) 0 35%, transparent 36%),
    linear-gradient(135deg, #fffdf4, #faedc9);
  box-shadow: none;
  overflow: hidden;
}
.exosome-model::before {
  content: "";
  position: absolute;
  inset: 10%;
  border: 10px double rgba(112, 11, 6, 0.12);
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 42%, rgba(176, 118, 186, 0.58) 0 5%, transparent 6%),
    radial-gradient(circle at 58% 58%, rgba(212, 154, 32, 0.58) 0 5%, transparent 6%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.5), transparent 58%);
}
.cargo-dot {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-width: 168px;
  min-height: 58px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff8dc;
  border-radius: 999px;
  padding: 8px 14px;
  background: #700b06;
  color: #fff8dc;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(112, 11, 6, 0.28);
  line-height: 1.1;
}
.cargo-dot strong {
  font-size: 0.98rem;
  line-height: 1.1;
}
.cargo-dot span {
  color: #f8df9d;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
}
.cargo-dot.active,
.cargo-dot:hover {
  background: #f4c542;
  color: #3a0905;
}
.cargo-dot.active span,
.cargo-dot:hover span {
  color: #5a0a05;
}

.cargo-role {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 0 0 12px;
  padding: 5px 10px;
  border: 1px solid #e0c175;
  border-radius: 999px;
  background: #fff8dc;
  color: var(--burgundy);
  font-size: 0.84rem;
  font-weight: 800;
}

.cargo-detail .tag {
  text-transform: none;
}
.cargo-detail ul,
.source-grid ul {
  margin: 14px 0 0;
  padding-left: 20px;
  line-height: 1.55;
}

.journey-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(340px, 1.1fr);
  gap: 16px;
  align-items: stretch;
}

.journey-map {
  display: grid;
  gap: 10px;
}

.journey-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-strong);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.journey-step strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f4c542;
  color: #3a0905;
}

.journey-step span {
  color: #4f0704;
  font-weight: 800;
}

.journey-step.active,
.journey-step:hover {
  border-color: var(--burgundy);
  background: #fff0bd;
}

.journey-card {
  border-left: 6px solid var(--burgundy);
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: var(--panel-strong);
  color: #4f0704;
  cursor: pointer;
  font-weight: 700;
}
.tab.active,
.tab:hover {
  border-color: #8b1209;
  background: #700b06;
  color: #fff8dc;
}

.builder {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
}

.therapy-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.therapy-filter {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: #ffffff;
  color: var(--burgundy);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
}

.therapy-filter.active,
.therapy-filter:hover {
  border-color: var(--burgundy);
  background: var(--burgundy);
  color: #fff8dc;
}

.strategy-list {
  display: grid;
  gap: 8px;
}
.strategy-button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--panel-strong);
  color: #4f0704;
  text-align: left;
  cursor: pointer;
  font-weight: 800;
}
.strategy-button span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.strategy-button.active,
.strategy-button:hover {
  background: #700b06;
  color: #fff8dc;
}
.strategy-button.active span,
.strategy-button:hover span { color: #f1cf86; }

.mechanism-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.mechanism-step {
  position: relative;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff8e6;
  text-align: center;
}

.mechanism-step:not(:last-child)::after {
  content: ">";
  position: absolute;
  right: -10px;
  top: 50%;
  color: var(--burgundy);
  font-weight: 900;
  transform: translateY(-50%);
}

.mechanism-step span {
  display: block;
  color: var(--burgundy);
  font-size: 0.8rem;
  font-weight: 900;
}

.mechanism-step p {
  position: absolute;
  top: 50%;
  left: 12px;
  right: 12px;
  transform: translateY(-50%);
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.quiz-card { max-width: 820px; }
.quiz-progress {
  display: inline-block;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #e0c175;
  border-radius: 999px;
  background: #fff5dd;
  color: var(--burgundy);
  font-size: 0.84rem;
  font-weight: 800;
}
.quiz-options {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}
.quiz-option {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fffdf3;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.quiz-option.correct { border-color: #2f7d32; background: #e7f6df; }
.quiz-option.wrong { border-color: #9b1c1c; background: #ffe1de; }
.quiz-feedback {
  min-height: 24px;
  margin: 0 0 14px;
  font-weight: 700;
}
.quiz-feedback.correct { color: #2f7d32; }
.quiz-feedback.wrong { color: #9b1c1c; }
.quiz-result {
  margin: 6px 0 16px;
}
.quiz-result h3 {
  margin: 0 0 6px;
  color: var(--burgundy);
}
.quiz-result p {
  margin: 8px 0;
  line-height: 1.55;
}
.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.source-note {
  margin-top: 24px;
  padding: 18px;
  border-left: 5px solid var(--burgundy);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
}

.source-note p {
  margin: 10px 0;
  line-height: 1.6;
  color: var(--ink);
}

.site-footer {
  margin: 0 var(--frame-margin) 18px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--burgundy), var(--burgundy-dark));
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  padding: 14px 18px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 250px minmax(0, 1fr);
    background: linear-gradient(90deg, var(--burgundy) 0 250px, #ffffff 250px);
  }
  .metric-grid,
  .challenge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cargo-board,
  .journey-layout,
  .builder { grid-template-columns: 1fr; }
  .mechanism-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dual-role-panel,
  .role-pathway { grid-template-columns: 1fr; }
  .role-pathway span:not(:last-child)::after {
    content: "v";
    right: 50%;
    bottom: -14px;
    top: auto;
    transform: translateX(50%);
  }
}

@media (max-width: 820px) {
  :root { --header-height: auto; --frame-margin: 12px; }
  .page-header {
    margin: 12px;
    min-height: 0;
    padding: 0;
    border-radius: 12px;
    background: transparent;
  }
  .image-banner {
    min-height: 0;
    border-radius: 12px;
    background: transparent;
  }
  .image-banner img {
    width: 100%;
    max-width: 100%;
  }
  .app-shell {
    display: block;
    background: #ffffff;
  }
  .sidebar {
    position: static;
    min-height: auto;
    padding: 14px;
    border-radius: 13px 13px 0 0;
  }
  .brand { display: none; }
  .menu-label { margin: 0 0 8px; }
  .mobile-section-select { display: block; }
  .side-nav { display: none; }
  .content { padding: 18px; }
  .hero-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .hero-actions { display: none; }
  .hero-note {
    margin-top: 16px;
    padding: 12px;
  }
  .hero-note .subtitle {
    font-size: 15px;
    line-height: 1.45;
  }
  .section { padding: 20px; }
  .source-grid,
  .metric-grid,
  .challenge-grid {
    grid-template-columns: 1fr;
  }
  .mechanism-map { grid-template-columns: 1fr; }
  .mechanism-step:not(:last-child)::after {
    content: "v";
    right: 50%;
    top: auto;
    bottom: -14px;
    transform: translateX(50%);
  }
  .top-actions { justify-content: flex-start; }
  .site-footer {
    margin: 0 12px 12px;
    border-radius: 12px;
  }
}
