:root {
  --frame-margin: 18px;
  --ink: #160907;
  --muted: #4a3324;
  --line: #9b6a1f;
  --surface: #ffffff;
  --surface-soft: #fff8e6;
  --gold: #f4c542;
  --gold-soft: #fff3cf;
  --burgundy: #700b06;
  --burgundy-dark: #5a0805;
  --rose: #9f1d0f;
  --accent-soft: rgba(112, 11, 6, 0.24);
  --shadow: 0 12px 28px rgba(89, 43, 8, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f7ecd0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.image-banner {
  display: grid;
  min-height: 286px;
  place-items: center start;
  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: #ffffff;
  box-shadow: 0 18px 44px rgba(89, 43, 8, 0.12);
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100%;
  padding: 24px;
  background: linear-gradient(180deg, var(--burgundy), var(--burgundy-dark));
  color: #ffffff;
}

.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;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--gold);
  color: #3a0905;
  font-weight: 900;
}

.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: #ffffff;
  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);
  outline: 0;
}

.side-nav span {
  display: block;
  margin-top: 2px;
  color: #ffe7a3;
  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-weight: 800;
}

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

.hero {
  min-height: 0;
  padding: 20px;
  border: 1px solid #d99a1a;
  border-radius: 14px;
  background: var(--gold-soft);
  color: var(--ink);
  box-shadow: none;
}

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

.hero h1 {
  margin: 8px 0 0;
  max-width: 900px;
  color: #1f0805;
  font-size: clamp(28px, 2.45vw, 38px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero p {
  max-width: 880px;
  margin: 0;
  color: #2e1b10;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
}

.hero-action {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid #d99a1a;
  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: var(--gold);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--burgundy);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-note {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #d99a1a;
  border-radius: 7px;
  background: #fff7dc;
}

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

.section {
  margin-top: 26px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  color: var(--burgundy);
  font-size: 28px;
}

.section-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.abstract-section {
  margin-top: 18px;
}

.abstract-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.abstract-card {
  min-height: 170px;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--burgundy);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.abstract-card h3 {
  margin: 0 0 10px;
  color: var(--burgundy);
  font-size: 18px;
}

.abstract-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

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

.box {
  padding: 20px;
}

.mechanism-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.pathway-map {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.path-node {
  position: relative;
  min-height: 112px;
  padding: 14px 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 8px 20px rgba(89, 43, 8, 0.08);
}

.path-node:not(:last-child)::after {
  content: ">";
  position: absolute;
  top: 50%;
  right: -12px;
  z-index: 1;
  color: var(--burgundy);
  font-size: 21px;
  font-weight: 900;
  transform: translateY(-50%);
}

.path-node.active,
.path-node:hover,
.path-node:focus-visible {
  border-color: var(--burgundy);
  background: var(--gold-soft);
  outline: none;
  transform: translateY(-2px);
}

.path-node strong,
.path-node span {
  display: block;
}

.path-node strong {
  margin-bottom: 7px;
  color: var(--burgundy);
}

.path-node span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.info-card {
  min-height: 250px;
  padding: 24px;
  border-left: 6px solid var(--burgundy);
}

.framework-panel {
  min-height: 250px;
  padding: 22px;
  border-top: 6px solid var(--burgundy);
}

.framework-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.info-card h3,
.framework-panel h3,
.box h3,
.result-card h3 {
  margin: 8px 0 10px;
  color: var(--burgundy);
}

.info-card p,
.box p,
.result-card p {
  margin: 10px 0;
  color: var(--ink);
  line-height: 1.6;
}

.tag {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #e0c175;
  border-radius: 999px;
  background: #fff5dd;
  color: var(--burgundy);
  font-size: 13px;
  font-weight: 800;
}

.mini-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.7;
}

.box {
  border-top: 5px solid var(--burgundy);
}

.monitor-grid .box:nth-child(2),
.monitor-grid .box:nth-child(4) {
  border-top-color: var(--rose);
}

.review-game {
  display: grid;
  gap: 16px;
}

.review-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.review-stat {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.review-stat span {
  display: block;
  color: var(--burgundy);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.review-stat strong {
  display: block;
  margin-top: 8px;
  color: var(--burgundy);
  font-size: 30px;
  line-height: 1.35;
}

.review-stat p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.review-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--burgundy);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.review-card.correct {
  border-color: #5f7f32;
  border-left-color: #5f7f32;
  background: #fbfff2;
}

.review-card.correct .tag {
  border-color: #9eb36a;
  background: #eef6d8;
  color: #2f4317;
}

.review-card.incorrect {
  border-color: var(--rose);
  border-left-color: var(--rose);
  background: #fff8f4;
}

.review-card.incorrect .tag {
  border-color: var(--rose);
  background: #ffe6dc;
  color: var(--burgundy);
}

.review-card h3 {
  margin: 14px 0 12px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.35;
}

.review-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
}

.review-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.review-option {
  display: grid;
  min-height: 118px;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 20px rgba(89, 43, 8, 0.08);
}

.review-option strong {
  color: var(--burgundy);
  font-size: 17px;
}

.review-option span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.review-option:hover,
.review-option:focus-visible {
  border-color: var(--burgundy);
  background: var(--gold-soft);
  outline: none;
}

.review-option.correct {
  border-color: #5f7f32;
  background: #eef6d8;
}

.review-option.correct strong {
  color: #2f4317;
}

.review-option.incorrect {
  border-color: var(--rose);
  background: #ffe6dc;
}

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

.primary-action {
  justify-self: start;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid var(--burgundy);
  border-radius: 8px;
  background: var(--burgundy);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary-action:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

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

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

.source-note p + p {
  margin-top: 14px;
}

.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: 1100px) {
  .pathway-map {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .review-options {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .abstract-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .path-node:nth-child(3)::after {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --frame-margin: 12px;
  }

  .page-header,
  .app-shell {
    margin: 12px;
  }

  .page-header {
    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 {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: 0;
    padding: 14px;
  }

  .brand,
  .side-nav {
    display: none;
  }

  .menu-label {
    margin: 0 0 8px;
  }

  .mobile-section-select {
    display: block;
  }

  .content {
    padding: 18px;
  }

  .mechanism-layout {
    grid-template-columns: 1fr;
  }

  .hero-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero,
  .section {
    padding: 20px;
  }

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

  .review-options {
    grid-template-columns: 1fr;
  }

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

  .path-node:not(:last-child)::after {
    content: "v";
    top: auto;
    right: 50%;
    bottom: -18px;
    transform: translateX(50%);
  }
}
