.rd-wrap {
  max-width: 1120px;
  margin: 1.25rem auto 2.6rem;
  padding: 0 1rem;
}

.rd-arrival {
  margin: 0 0 1rem;
  padding: .7rem .9rem;
  background: var(--color-surface-2, #f4f6fb);
  border: 1px solid var(--color-border, #e2e8f0);
  color: var(--color-text-2, #475569);
  font-size: .88rem;
}

.rd-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr);
  gap: 1rem;
  margin: .9rem 0 1rem;
}

.rd-hero-copy,
.rd-hero-note,
.rd-map-card,
.rd-point,
.rd-next-card {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .035);
}

.rd-hero-copy,
.rd-hero-note,
.rd-map-card,
.rd-next-card {
  padding: 1rem;
}

.rd-kicker,
.rd-point-eyebrow,
.rd-next-kicker,
.rd-note-title,
.rd-map-title {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.rd-kicker,
.rd-point-eyebrow,
.rd-next-kicker,
.rd-note-title {
  color: var(--color-text-3, #64748b);
}

.rd-hero-copy h2 {
  margin: .3rem 0 .5rem;
  font-size: 1.38rem;
  line-height: 1.22;
  font-weight: 650;
  color: var(--color-text-1, #111827);
}

.rd-hero-copy p,
.rd-hero-note p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.65;
  color: var(--color-text-2, #475569);
}

.rd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .85rem;
}

.rd-badge {
  position: relative;
  display: inline-flex;
  gap: .4rem;
  align-items: center;
  justify-content: space-between;
  min-width: 7.2rem;
  padding: .32rem .52rem;
  background: var(--color-surface-2, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  font-size: .82rem;
  font: inherit;
  line-height: 1.25;
  color: var(--color-text-2, #475569);
  cursor: help;
  overflow: hidden;
}

.rd-badge::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--rd-fill, 0%);
  background: rgba(59, 130, 246, .14);
  pointer-events: none;
}

.rd-badge > span,
.rd-badge strong {
  position: relative;
  z-index: 1;
}

.rd-badge strong {
  color: var(--color-text-1, #111827);
}

.rd-badge-cohesion::before {
  background: rgba(59, 130, 246, .16);
}

.rd-badge-tension::before {
  background: rgba(245, 158, 11, .18);
}

.rd-badge-vitality::before {
  background: rgba(16, 185, 129, .16);
}

.rd-badge:hover,
.rd-badge:focus-visible {
  background: var(--color-surface, #fff);
  border-color: #cbd5e1;
  outline: none;
}

.rd-badge-help {
  min-height: 1.25rem;
  margin-top: .45rem;
  font-size: .78rem;
  line-height: 1.45;
  color: var(--color-text-3, #64748b);
}

.rd-badge-help[hidden] {
  display: none;
}

.rd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1rem;
}

.rd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: .58rem .82rem;
  border: 1px solid var(--color-border, #d1d5db);
  background: var(--color-surface, #fff);
  color: var(--color-text-1, #111827);
  text-decoration: none;
  font-size: .86rem;
  font-weight: 700;
}

.rd-btn:hover {
  background: var(--color-surface-2, #f8fafc);
}

.rd-btn-primary {
  background: var(--color-text-1, #111827);
  border-color: var(--color-text-1, #111827);
  color: #fff;
}

.rd-btn-primary:hover {
  background: #1f2937;
}

.rd-btn-quiet {
  color: var(--color-text-2, #475569);
}

.rd-hero-note {
  background: var(--color-surface-2, #f8fafc);
}

.rd-note-title {
  margin-bottom: .45rem;
  color: var(--color-text-2, #334155);
}

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

.rd-points {
  display: grid;
  gap: .75rem;
  align-content: start;
}

.rd-points-list {
  display: grid;
  gap: .75rem;
}

.rd-points-list[hidden],
.rd-node-detail[hidden] {
  display: none;
}

.rd-point {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: .75rem;
  padding: .82rem;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.rd-point:hover,
.rd-point:focus-visible,
.rd-point.is-active {
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, .11);
  transform: translateY(-1px);
  outline: none;
}

.rd-point-order {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-2, #f8fafc);
  color: var(--color-text-1, #0f172a);
  font-size: .9rem;
  font-weight: 750;
  border: 1px solid var(--color-border, #e2e8f0);
}

.rd-point.is-active .rd-point-order {
  background: #f59e0b;
  color: #fff;
  border-color: #f59e0b;
}

.rd-point-body h3 {
  margin: .16rem 0 .3rem;
  font-size: .95rem;
  line-height: 1.25;
  font-weight: 650;
  color: var(--color-text-1, #111827);
}

.rd-point-body p {
  margin: 0;
  font-size: .86rem;
  line-height: 1.56;
  color: var(--color-text-2, #475569);
}

.rd-point-evidence {
  margin-top: .55rem;
  font-size: .76rem;
  font-weight: 700;
  color: #b45309;
}

.rd-node-detail {
  padding: 1rem;
  background: var(--color-surface, #fff);
  border: 1px solid #f59e0b;
  box-shadow: 0 4px 16px rgba(245, 158, 11, .11);
  outline: none;
}

.rd-detail-back {
  margin: 0 0 .85rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-accent, #1d4ed8);
  font: inherit;
  font-size: .82rem;
  font-weight: 750;
  cursor: pointer;
}

.rd-detail-back:hover {
  text-decoration: underline;
}

.rd-node-detail h3 {
  margin: .2rem 0 .35rem;
  font-size: 1.12rem;
  line-height: 1.25;
  color: var(--color-text-1, #111827);
}

.rd-detail-role {
  display: inline-flex;
  margin-bottom: .75rem;
  padding: .24rem .5rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: .78rem;
  font-weight: 800;
}

.rd-node-detail p {
  margin: 0 0 .9rem;
  font-size: .9rem;
  line-height: 1.62;
  color: var(--color-text-2, #475569);
}

.rd-detail-lines {
  display: grid;
  gap: .55rem;
}

.rd-detail-lines div {
  padding: .58rem .65rem;
  background: var(--color-surface-2, #f8fafc);
  border: 1px solid var(--color-border, #e5e7eb);
  color: var(--color-text-2, #475569);
  font-size: .82rem;
  line-height: 1.52;
}

.rd-map-card {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.rd-map-head {
  margin-bottom: .75rem;
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: flex-start;
}

.rd-map-title {
  margin-bottom: .2rem;
  color: var(--color-text-1, #0f172a);
}

.rd-map-subtitle {
  font-size: .86rem;
  line-height: 1.5;
  color: var(--color-text-3, #64748b);
}

.rd-map-tabs {
  display: inline-flex;
  gap: .35rem;
  padding: .2rem;
  background: var(--color-surface-2, #f8fafc);
  border: 1px solid var(--color-border, #e5e7eb);
}

.rd-map-tab {
  min-height: 2rem;
  padding: .36rem .58rem;
  border: 0;
  background: transparent;
  color: var(--color-text-2, #475569);
  font: inherit;
  font-size: .78rem;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.rd-map-tab:hover,
.rd-map-tab.is-active {
  background: var(--color-surface, #fff);
  color: var(--color-text-1, #111827);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.rd-map-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 430px;
  background: #f2ede6;
  border: 1px solid var(--color-border, #e5e7eb);
  overflow: hidden;
}

.rd-constellation {
  position: absolute;
  inset: 0;
}

.rd-map-panel {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s;
}

.rd-map-panel.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.rd-constellation canvas {
  display: block;
}

.rd-map-2d {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.78), rgba(242,237,230,.78) 55%, rgba(232,224,213,.9)),
    linear-gradient(135deg, rgba(148, 163, 184, .14) 25%, transparent 25%) 0 0 / 34px 34px;
}

.rd-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.rd-map-edge {
  stroke: #94a3b8;
  stroke-width: 1.4;
  opacity: .26;
}

.rd-map-edge.is-focus {
  stroke: #64748b;
  opacity: .52;
}

.rd-map-edge.is-active {
  stroke: #f59e0b;
  stroke-width: 3.4;
  opacity: .95;
}

.rd-map-node {
  fill: #8a94aa;
  stroke: rgba(255,255,255,.88);
  stroke-width: 2;
  cursor: pointer;
  opacity: .9;
}

.rd-map-node.is-positive {
  fill: #2f9b63;
}

.rd-map-node.is-negative {
  fill: #b94f46;
}

.rd-map-node.is-self {
  fill: #f59e0b;
  stroke: #b45309;
  stroke-width: 3;
}

.rd-map-node.is-central {
  stroke: #2563eb;
  stroke-width: 3;
}

.rd-map-node.is-muted {
  opacity: .34;
}

.rd-map-node.is-active {
  fill: #f59e0b;
  stroke: #fff7ed;
  stroke-width: 4;
  opacity: 1;
}

.rd-map-label {
  fill: #334155;
  paint-order: stroke;
  stroke: rgba(255,255,255,.92);
  stroke-width: 4;
  stroke-linejoin: round;
  font-size: 12px;
  font-weight: 650;
  pointer-events: none;
}

.rd-map-label.is-muted {
  opacity: .28;
}

.rd-map-label.is-active,
.rd-map-label.is-self,
.rd-map-label.is-central {
  opacity: 1;
  font-weight: 800;
}

.rd-map-label.is-active {
  fill: #92400e;
}

.rd-constellation-tools {
  position: absolute;
  top: .65rem;
  left: .65rem;
  z-index: 4;
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

.rd-tool-btn {
  min-height: 2rem;
  padding: .4rem .65rem;
  border: 1px solid rgba(15, 23, 42, .16);
  background: rgba(255, 255, 255, .88);
  color: #334155;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.rd-tool-btn:hover {
  background: #fff;
  color: #111827;
}

.rd-tool-btn.is-muted {
  opacity: .58;
}

.rd-map-stage.is-2d .rd-tool-btn[data-rd-view="home"],
.rd-map-stage.is-2d .rd-tool-btn[data-rd-view="top"] {
  display: none;
}

.rd-const-label {
  padding: 1px 5px;
  background: rgba(255, 255, 255, .82);
  color: #333;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 4px rgba(255, 255, 255, .9);
}

.rd-const-label.is-central {
  color: #1a5fa8;
  font-weight: 800;
}

.rd-const-label.is-self {
  background: rgba(255, 200, 50, .22);
  border: 1px solid rgba(243, 156, 18, .4);
  color: #9a5000;
  font-weight: 800;
}

.rd-const-label.is-active {
  background: rgba(245, 158, 11, .95);
  border-color: rgba(245, 158, 11, 1);
  color: #fff;
  text-shadow: none;
}

.rd-map-links {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: .75rem;
}

.rd-map-links a,
.rd-next-card a {
  font-size: .86rem;
  font-weight: 700;
  color: var(--color-accent, #1d4ed8);
  text-decoration: none;
}

.rd-map-links a:hover,
.rd-next-card a:hover {
  text-decoration: underline;
}

.rd-next {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1.55rem;
  padding: .85rem;
  background: var(--color-surface-2, #f8fafc);
  border: 1px solid var(--color-border, #e5e7eb);
}

.rd-next-card {
  padding: .82rem;
  background: rgba(255, 255, 255, .72);
  box-shadow: none;
}

.rd-next-card h3 {
  margin: .24rem 0 .3rem;
  font-size: .92rem;
  font-weight: 650;
  color: var(--color-text-1, #111827);
}

.rd-next-card p {
  margin: 0 0 .65rem;
  font-size: .82rem;
  line-height: 1.52;
  color: var(--color-text-3, #64748b);
}

@media (max-width: 980px) {
  .rd-hero,
  .rd-layout,
  .rd-next {
    grid-template-columns: 1fr;
  }

  .rd-map-card {
    position: static;
    min-height: 0;
  }

  .rd-map-head {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .rd-wrap {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .rd-hero-copy h2 {
    font-size: 1.28rem;
  }

  .rd-point {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: .7rem;
    padding: .85rem;
  }

  .rd-point-order {
    width: 38px;
    height: 38px;
  }

  .rd-actions,
  .rd-map-links {
    flex-direction: column;
  }

  .rd-btn,
  .rd-map-links a {
    width: 100%;
  }

  .rd-map-stage {
    height: 430px;
    min-height: 430px;
    flex: none;
  }
}
