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

* {
  box-sizing: border-box;
}

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

button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

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

h2,
h3,
h4,
p,
li,
dd,
td,
th {
  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 {
  min-height: 44px;
  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;
}

.content-panel {
  display: none;
}

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

.article-source-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  min-width: 0;
  padding: 10px 14px;
  color: var(--wine-950);
  background: var(--gold-500);
  border: 1px solid var(--cream-300);
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
  box-shadow: 0 9px 20px rgba(91, 19, 6, 0.1);
}

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

.paper-hero {
  position: relative;
  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;
}

.doi-block {
  display: grid;
  gap: 7px;
  justify-items: start;
  max-width: 100%;
}

.doi-block span {
  color: var(--gold-300);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.kicker,
.keyword-row span,
.evidence-copy span,
.finding-card > 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.75rem, 2.8vw, 2.55rem);
  line-height: 1.08;
}

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

.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;
}

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

.insight-strip article,
.lens-card,
.section-card,
.finding-card,
.evidence-card,
.care-card {
  background: var(--paper);
  border: 1px solid var(--cream-300);
  border-radius: 8px;
  box-shadow: 0 9px 20px rgba(91, 19, 6, 0.08);
}

.insight-strip article {
  min-height: 106px;
  padding: 14px;
}

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

.insight-strip strong {
  display: block;
  margin-top: 6px;
  color: var(--wine-900);
  font-size: 1.5rem;
  line-height: 1;
}

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

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

.no-top {
  margin-top: 0;
}

.compact-section,
.visual-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: 34px;
  height: 30px;
  font-size: 0.78rem;
}

.lens-grid,
.finding-grid,
.care-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(3, minmax(0, 1fr));
}

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

.lens-card,
.section-card,
.finding-card,
.care-card {
  padding: 16px;
}

.lens-card h4,
.finding-card h4,
.care-card 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,
.evidence-copy p,
.care-card p {
  color: var(--muted);
  line-height: 1.43;
}

.lens-card p,
.finding-card p,
.care-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;
}

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

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

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

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

.finding-card h4 {
  font-size: 1.22rem;
}

.evidence-stack {
  display: grid;
  gap: 16px;
}

.evidence-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  overflow: hidden;
}

.evidence-card.is-reversed {
  grid-template-columns: minmax(280px, 0.55fr) minmax(0, 1.45fr);
}

.evidence-card.is-reversed .evidence-visual {
  grid-column: 2;
  grid-row: 1;
}

.evidence-card.is-reversed .evidence-copy {
  grid-column: 1;
  grid-row: 1;
  border-left: 0;
  border-right: 1px solid var(--cream-300);
}

.evidence-visual {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.evidence-copy {
  display: grid;
  align-content: center;
  gap: 11px;
  padding: 22px;
  background: linear-gradient(180deg, #fff7df, #fff1c5);
  border-left: 1px solid var(--cream-300);
}

.evidence-copy h4 {
  margin: 0;
  color: var(--wine-950);
  font-size: 1.18rem;
  line-height: 1.22;
}

.article-figure {
  display: grid;
  gap: 10px;
  place-items: center;
  min-height: 260px;
  margin: 0;
}

.article-figure img {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid rgba(212, 168, 78, 0.62);
  border-radius: 6px;
}

.article-figure figcaption {
  color: var(--wine-900);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.conclusion-card {
  background: linear-gradient(180deg, #fffaf0, #fff1c5);
}

.article-table {
  min-width: 0;
  overflow-x: visible;
}

.article-table table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  background: rgba(255, 251, 238, 0.8);
  table-layout: fixed;
}

.article-table th,
.article-table td {
  padding: 10px 8px;
  border: 2px solid var(--wine-900);
  vertical-align: top;
  line-height: 1.25;
  white-space: normal;
}

.article-table th {
  color: var(--wine-900);
  background: var(--gold-300);
  font-size: 0.86rem;
  text-align: left;
}

.article-table td {
  color: var(--muted);
  font-size: 0.88rem;
}

.article-table td:first-child {
  color: var(--wine-900);
  font-weight: 900;
}

.article-table th:first-child,
.article-table td:first-child {
  width: 36%;
}

.article-table th:nth-child(2),
.article-table td:nth-child(2) {
  width: 28%;
}

.care-card {
  min-height: 145px;
}

.care-card:nth-child(3n + 1) {
  border-top: 6px solid var(--gold-500);
}

.care-card:nth-child(3n + 2) {
  border-top: 6px solid var(--blue);
}

.care-card:nth-child(3n) {
  border-top: 6px solid var(--green);
}

.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;
}

.nexus-shell {
  position: relative;
  display: grid;
  gap: 18px;
}

#nexusPanel.is-dark-mode .network-card,
#nexusPanel.is-dark-mode .nexus-drawer,
#nexusPanel.is-dark-mode .nexus-dashboard,
#nexusPanel.is-dark-mode .nexus-achievements,
#nexusPanel.is-dark-mode .stat-card,
#nexusPanel.is-dark-mode .nexus-badge {
  background: rgba(78, 6, 2, 0.92);
  color: #fff8dc;
  border-color: rgba(255, 224, 138, 0.38);
}

#nexusPanel.is-dark-mode .nexus-drawer {
  background: linear-gradient(180deg, rgba(112, 11, 6, 0.98), rgba(78, 6, 2, 0.98));
  color: #fff8dc;
}

#nexusPanel.is-dark-mode .concept-card {
  color: #fff8dc;
  background: rgba(255, 246, 216, 0.08);
  border-color: rgba(255, 224, 138, 0.55);
}

#nexusPanel.is-dark-mode .section-heading h3 {
  color: #fff8dc;
}

#nexusPanel.is-dark-mode .drawer-stage h4,
#nexusPanel.is-dark-mode .concept-card h4,
#nexusPanel.is-dark-mode .stat-card strong,
#nexusPanel.is-dark-mode .nexus-badge strong {
  color: var(--gold-300);
}

#nexusPanel.is-dark-mode .stat-card span,
#nexusPanel.is-dark-mode .nexus-badge span,
#nexusPanel.is-dark-mode .concept-region {
  color: #e9c773;
}

#nexusPanel.is-dark-mode .drawer-stage p,
#nexusPanel.is-dark-mode .stat-card p,
#nexusPanel.is-dark-mode .nexus-badge p {
  color: #f5d9a0;
}

#nexusPanel.is-dark-mode .drawer-stage p,
#nexusPanel.is-dark-mode .concept-card p,
#nexusPanel.is-dark-mode .concept-card small {
  color: #f5d9a0;
}

#nexusPanel.is-dark-mode .drawer-stage h4,
#nexusPanel.is-dark-mode .concept-card h4,
#nexusPanel.is-dark-mode .concept-region {
  color: var(--gold-300);
}

#nexusPanel.is-dark-mode .drawer-stage span {
  color: #f0c96e;
}

#nexusPanel.is-dark-mode .stat-bar {
  background: rgba(255, 224, 138, 0.14);
}

#nexusPanel.is-dark-mode .stat-bar span {
  background: linear-gradient(90deg, #b34015, var(--gold-500), var(--gold-300));
}

.nexus-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 26px;
  overflow: hidden;
  color: #fff8dc;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 204, 61, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(127, 12, 3, 0.98), rgba(78, 6, 2, 0.98));
  border: 1px solid var(--cream-300);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(91, 19, 6, 0.18);
}

.nexus-hero h3 {
  margin: 16px 0 10px;
  color: #fff8dc;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.nexus-hero p {
  max-width: none;
  margin: 0;
  color: #f5d9a0;
  font-size: 1.05rem;
  line-height: 1.45;
}

.nexus-primary,
.nexus-secondary {
  border: 1px solid var(--cream-300);
  border-radius: 6px;
  font-weight: 900;
}

.nexus-hero-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.nexus-primary {
  min-height: 46px;
  padding: 12px 18px;
  color: var(--wine-950);
  background: var(--gold-500);
  box-shadow: 0 12px 24px rgba(35, 12, 4, 0.22);
}

.nexus-secondary {
  min-height: 42px;
  padding: 10px 16px;
  color: #ffe08a;
  background: rgba(78, 6, 2, 0.58);
  box-shadow: none;
}

.nexus-progress {
  display: grid;
  grid-template-columns: minmax(0, 260px) 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  color: #fff8dc;
  background: linear-gradient(90deg, var(--wine-900), var(--wine-950));
  border: 1px solid var(--cream-300);
  border-radius: 8px;
}

.nexus-progress span {
  display: block;
  color: var(--gold-300);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.nexus-progress strong {
  display: block;
  margin-top: 3px;
}

.nexus-progress-track {
  height: 14px;
  overflow: hidden;
  background: rgba(255, 246, 216, 0.16);
  border: 1px solid rgba(255, 224, 138, 0.35);
  border-radius: 999px;
}

.nexus-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  transition: width 260ms ease;
}

.nexus-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.nexus-stage {
  display: grid;
  gap: 6px;
  min-height: 122px;
  padding: 14px;
  text-align: left;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--cream-300);
  border-radius: 8px;
  box-shadow: 0 9px 20px rgba(91, 19, 6, 0.08);
}

.nexus-stage.is-active {
  color: #fff8dc;
  background: linear-gradient(140deg, var(--wine-900), var(--wine-950));
  border-color: var(--gold-500);
}

.nexus-stage span {
  color: var(--gold-500);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.nexus-stage strong {
  color: inherit;
  font-size: 1rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.nexus-stage small {
  color: inherit;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.nexus-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.network-card,
.nexus-dashboard,
.nexus-achievements {
  background: rgba(255, 250, 240, 0.92);
  border: 1px solid var(--cream-300);
  border-radius: 8px;
  box-shadow: 0 9px 20px rgba(91, 19, 6, 0.08);
}

.network-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: stretch;
  overflow: hidden;
}

.network-board {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  height: 640px;
  overflow: hidden;
  cursor: grab;
  background:
    linear-gradient(rgba(255, 204, 61, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 204, 61, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 46% 42%, rgba(255, 224, 138, 0.26), transparent 34%),
    linear-gradient(135deg, #4e0602, #7f0c03 48%, #2b0705);
  background-size: 34px 34px, 34px 34px, auto, auto;
}

.network-board:active {
  cursor: grabbing;
}

.network-board.is-static,
.network-board.is-static:active {
  cursor: default;
}

.network-board.is-static .network-plane {
  transition: none;
}

.network-plane {
  position: absolute;
  inset: 0;
  width: 960px;
  height: 640px;
  transform-origin: 0 0;
  transition: transform 120ms ease;
}

.network-lines,
.network-nodes {
  position: absolute;
  inset: 0;
}

.network-lines {
  width: 960px;
  height: 640px;
  overflow: visible;
}

.nexus-link {
  fill: none;
  stroke: rgba(255, 204, 61, 0.72);
  stroke-width: 3;
  stroke-dasharray: 8 10;
  animation: nexusDash 1.8s linear infinite;
}

.network-board.is-static .nexus-link {
  animation: none;
}

.nexus-link.is-complete {
  stroke: var(--gold-500);
  stroke-width: 4;
  filter: drop-shadow(0 0 7px rgba(255, 204, 61, 0.42));
}

.nexus-link-label {
  pointer-events: none;
}

.nexus-link-label rect {
  fill: rgba(78, 6, 2, 0.94);
  stroke: rgba(255, 204, 61, 0.78);
  stroke-width: 1;
}

.nexus-link-label text {
  fill: #ffe08a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
}

@keyframes nexusDash {
  to {
    stroke-dashoffset: -34;
  }
}

.nexus-node {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 150px;
  min-height: 50px;
  padding: 9px 10px;
  color: #fff8dc;
  background: rgba(255, 250, 240, 0.08);
  border: 1px solid rgba(255, 224, 138, 0.55);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(20, 3, 1, 0.26);
  backdrop-filter: blur(8px);
  touch-action: none;
}

.network-board.is-static .nexus-node {
  cursor: pointer;
}

.nexus-node span {
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.nexus-node.skin {
  border-color: #ffcc3d;
}

.nexus-node.axis {
  border-color: #ffe08a;
}

.nexus-node.effects {
  border-color: #bb6d6b;
}

.nexus-node.care {
  border-color: #7b9d45;
}

.nexus-node.is-selected {
  color: var(--wine-950);
  background: var(--gold-500);
  border-color: #fff6d8;
  transform: translateY(-2px);
}

.nexus-node.is-filtered {
  opacity: 0.22;
}

.nexus-drawer {
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(255, 247, 223, 0.96), rgba(255, 241, 197, 0.96));
  border-left: 1px solid var(--cream-300);
  box-shadow: none;
}

.nexus-drawer .drawer-body {
  grid-template-columns: 1fr;
  align-items: start;
}

.drawer-toggle {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: #fff8dc;
  text-align: left;
  background: linear-gradient(90deg, var(--wine-900), var(--wine-950));
  font-weight: 900;
}

.drawer-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.nexus-drawer.is-collapsed .drawer-body {
  display: none;
}

.drawer-stage span,
.concept-region {
  color: var(--wine-900);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.drawer-stage h4,
.concept-card h4 {
  margin: 5px 0 7px;
  color: var(--wine-950);
}

.drawer-stage p,
.concept-card p {
  margin: 0;
  line-height: 1.38;
}

.drawer-message {
  margin: 0;
  padding: 10px;
  color: #fff8dc;
  background: var(--wine-900);
  border-radius: 6px;
  line-height: 1.35;
}

.concept-card {
  padding: 16px;
  background: #fff6d8;
  border: 1px solid var(--cream-300);
  border-radius: 8px;
}

.concept-card p {
  max-width: 68ch;
  font-size: 1rem;
}

.concept-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.34;
}

.nexus-dashboard,
.nexus-achievements {
  padding: 14px;
}

.nexus-dashboard .section-heading,
.nexus-achievements .section-heading {
  gap: 8px;
  margin-bottom: 10px;
}

.nexus-dashboard .section-heading span,
.nexus-achievements .section-heading span {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  font-size: 0.78rem;
}

.nexus-dashboard .section-heading h3,
.nexus-achievements .section-heading h3 {
  font-size: 1.12rem;
}

.nexus-stats,
.badge-grid {
  display: grid;
  gap: 10px;
}

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

.stat-card,
.nexus-badge {
  padding: 11px;
  background: #fffaf0;
  border: 1px solid var(--cream-300);
  border-radius: 6px;
}

.stat-card span,
.nexus-badge span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-card strong,
.nexus-badge strong {
  display: block;
  margin-top: 5px;
  color: var(--wine-900);
  font-size: 1.12rem;
  line-height: 1.08;
}

.stat-card p,
.nexus-badge p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.22;
}

.stat-bar {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  background: rgba(112, 11, 6, 0.12);
  border-radius: 999px;
}

.stat-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--wine-900), var(--gold-500));
}

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

.nexus-badge {
  opacity: 0.82;
}

.nexus-badge.is-active {
  opacity: 1;
  background: linear-gradient(180deg, #fff6d8, #ffe08a);
  border-color: var(--gold-500);
}

#nexusPanel.is-dark-mode .nexus-badge {
  opacity: 1;
}

#nexusPanel.is-dark-mode .nexus-badge.is-active {
  color: var(--wine-950);
  background: linear-gradient(180deg, #7f0c03, #4e0602);
  border-color: var(--gold-500);
  box-shadow: inset 0 0 0 1px rgba(255, 204, 61, 0.3), 0 10px 28px rgba(35, 12, 4, 0.2);
}

@media (max-width: 1120px) {
  .paper-hero,
  .lens-grid,
  .finding-grid,
  .care-grid,
  .evidence-card,
  .evidence-card.is-reversed,
  .bottom-grid,
  .nexus-workspace,
  .network-card,
  .nexus-stats,
  .badge-grid {
    grid-template-columns: 1fr;
  }

  .evidence-card.is-reversed .evidence-visual,
  .evidence-card.is-reversed .evidence-copy {
    grid-column: auto;
    grid-row: auto;
  }

  .evidence-card.is-reversed .evidence-copy,
  .evidence-copy {
    border: 0;
    border-top: 1px solid var(--cream-300);
  }

  .nexus-drawer .drawer-body {
    grid-template-columns: 1fr;
  }

  .network-board,
  .nexus-drawer {
    grid-column: 1;
  }

  .network-board {
    grid-row: 1;
  }

  .nexus-drawer {
    grid-row: 2;
    border-left: 0;
    border-top: 1px solid var(--cream-300);
  }
}

@media (max-width: 980px) {
  .app-layout,
  .insight-strip,
  .nexus-tabs,
  .nexus-progress,
  .nexus-hero {
    grid-template-columns: 1fr;
  }

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

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

  .content-stage,
  .side-panel {
    padding: 16px;
  }

  .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,
  .evidence-visual,
  .evidence-copy,
  .section-card,
  .finding-card,
  .care-card {
    padding: 14px;
  }

  .network-board {
    height: 560px;
  }

  .nexus-node {
    width: 148px;
  }

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

  .article-table th,
  .article-table td {
    padding: 9px 8px;
    font-size: 0.84rem;
  }

  .article-source-button {
    position: static;
    justify-self: start;
  }
}
