/* ── Roadmap detail page layout ─────────────────────────────────── */

.rp-header {
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
  border-bottom: 1px solid var(--border);
}

.rp-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: .03em;
  margin-bottom: 2rem;
  transition: color .15s;
}
.rp-back:hover { color: var(--accent); }

.rp-phase-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.rp-phase-badge .phase-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rp-phase-badge.phase-done   { color: var(--green); }
.rp-phase-badge.phase-done .phase-dot { background: var(--green); }

.rp-phase-badge.phase-active { color: var(--accent); }
.rp-phase-badge.phase-active .phase-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.rp-phase-badge.phase-next   { color: var(--muted); }
.rp-phase-badge.phase-next .phase-dot { background: var(--muted); }

.rp-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: 1rem;
}

.rp-lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.65;
}

/* ── Content sections ───────────────────────────────────────────── */

.rp-body {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.rp-section {
  margin-bottom: 3rem;
}

.rp-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1rem;
}

.rp-section p,
.rp-section ul,
.rp-section ol {
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 700px;
}

.rp-section ul,
.rp-section ol {
  padding-left: 1.4rem;
  margin-top: .5rem;
}

.rp-section li {
  margin-bottom: .4rem;
}

.rp-section strong {
  color: var(--text);
  font-weight: 600;
}

.rp-section code {
  font-family: 'Courier New', Courier, monospace;
  font-size: .87em;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1em .4em;
  color: var(--accent);
}

/* ── Status card ────────────────────────────────────────────────── */

.rp-status-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.rp-status-card .rp-status-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.rp-status-card .rp-status-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* ── Nav between roadmap pages ──────────────────────────────────── */

.rp-pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

.rp-pagination a {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  text-decoration: none;
  color: var(--text);
  max-width: 45%;
}

.rp-pagination a:last-child {
  text-align: right;
  align-items: flex-end;
}

.rp-pagination .rp-pag-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rp-pagination .rp-pag-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Photo placeholder ──────────────────────────────────────────── */

.rp-photo-placeholder {
  background: var(--surface2);
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: .875rem;
  font-style: italic;
  margin-block: 1.5rem;
}

/* ── Photo gallery ──────────────────────────────────────────────── */

.rp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
  margin-block: 1.5rem;
}

.rp-gallery-wide {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.rp-gallery-item {
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.rp-gallery-item a {
  display: block;
}

.rp-gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: opacity .2s;
}

.rp-gallery-item img:hover {
  opacity: .85;
}

.rp-gallery-item.tall img {
  height: 260px;
}

/* ── Inline PDF embed ────────────────────────────────────────────── */

.rp-pdf-wrap {
  margin-block: 1.5rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.rp-pdf-wrap object {
  width: 100%;
  height: 480px;
  display: block;
  background: var(--surface2);
}

.rp-pdf-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .5rem;
  display: block;
}

/* ── Download section ────────────────────────────────────────────── */

.rp-downloads {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  margin-block: 2.5rem;
}

.rp-downloads-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.rp-download-list {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.rp-download-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: .83rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s, transform .1s;
}

.rp-download-btn:hover {
  opacity: .88;
  transform: translateY(-1px);
}

.rp-download-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.rp-download-btn.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.rp-download-btn.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

/* ── 3D model viewer ─────────────────────────────────────────────── */

.rp-model-viewer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-block: 1.5rem;
}

.rp-model-viewer-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface2);
  position: relative;
}

.rp-model-viewer-wrap model-viewer {
  width: 100%;
  height: 340px;
  display: block;
  --poster-color: transparent;
}

.rp-model-viewer-label {
  display: block;
  padding: .55rem .85rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.rp-model-viewer-hint {
  position: absolute;
  bottom: .6rem;
  right: .75rem;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--muted);
  pointer-events: none;
  user-select: none;
  opacity: .75;
}

/* ── Sub-page cards (v2 overview) ───────────────────────────────── */

.rp-subpages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.rp-subpage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .15s;
  display: block;
}

.rp-subpage-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.rp-subpage-card .rp-sp-badge {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

.rp-subpage-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.rp-subpage-card p {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.rp-pagination a:hover .rp-pag-title {
  text-decoration: underline;
}

/* ── Progress bar ────────────────────────────────────────────────── */

.rp-progress-wrap {
  margin-block: 1.75rem;
}

.rp-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .55rem;
}

.rp-progress-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rp-progress-pct {
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
}

.rp-progress-track {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.rp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #fff));
  border-radius: 99px;
  transition: width .6s ease;
}

.rp-progress-note {
  font-size: .75rem;
  color: var(--muted);
  margin-top: .45rem;
  font-style: italic;
}

/* ── Next steps box ──────────────────────────────────────────────── */

.rp-next-steps {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  margin-block: 2rem;
}

.rp-next-steps-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.rp-next-steps ul {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.rp-next-steps li {
  font-size: .88rem;
  line-height: 1.6;
}

/* ── Contributor callout ─────────────────────────────────────────── */

.rp-callout {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  margin-block: 2.5rem;
}

.rp-callout-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: .6rem;
}

.rp-callout p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.65;
  color: var(--text);
}

.rp-callout a {
  color: var(--accent);
  font-weight: 600;
}
