/* /roadmap/<slug>/<topic>: public teaser page for one roadmap node. The first
   paragraph of the topic is shown; everything else lives on the map behind
   the roadmap's gate. Rendered by server/routes/roadmap-pages.js. */

.roadmap-topic {
  padding: 0 1rem;
  color: var(--secondary-color);
}

.roadmap-topic__article {
  max-width: 720px;
  margin: 0 auto;
}

.roadmap-topic__crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roadmap-topic__crumbs a {
  color: var(--primary-color);
  text-decoration: none;
}

.roadmap-topic__crumbs a:hover {
  text-decoration: underline;
}

.roadmap-topic__crumbs span {
  color: var(--secondary-color);
  opacity: 0.6;
}

.roadmap-topic__crumb-sep {
  opacity: 0.35;
}

.roadmap-topic__title {
  margin: 0 0 1rem;
  font-size: 2.45rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--secondary-color);
}

.roadmap-topic__chips {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.roadmap-topic__chips li {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  color: var(--secondary-color);
  opacity: 0.8;
}

.roadmap-topic__teaser {
  font-size: 1.15rem;
  line-height: 1.75;
}

.roadmap-topic__teaser p {
  margin: 0 0 1rem;
}

.roadmap-topic__teaser code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.roadmap-topic__teaser a {
  color: var(--primary-color);
}

.roadmap-topic__gate {
  margin: 2rem 0 2.5rem;
  padding: 1.5rem 1.6rem;
  border-radius: 16px;
  border: 1px solid rgba(16, 172, 132, 0.35);
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(16, 172, 132, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.03);
}

.roadmap-topic__gate-title {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  color: var(--secondary-color);
}

.roadmap-topic__gate p {
  margin: 0 0 1.2rem;
  line-height: 1.65;
  opacity: 0.85;
}

.roadmap-topic__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.roadmap-topic__btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.roadmap-topic__btn:hover {
  background: var(--primary-color);
  color: #fff;
}

.roadmap-topic__btn--primary {
  background: var(--primary-color);
  color: #fff;
}

.roadmap-topic__btn--primary:hover {
  background: #0d9470;
  border-color: #0d9470;
}

.roadmap-topic__btn--ghost {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--secondary-color);
}

.roadmap-topic__siblings h2 {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
  color: var(--secondary-color);
}

.roadmap-topic__siblings ol {
  margin: 0;
  padding-left: 1.4rem;
  columns: 2;
  column-gap: 2rem;
  line-height: 1.7;
  font-size: 0.95rem;
}

.roadmap-topic__siblings li {
  break-inside: avoid;
}

.roadmap-topic__siblings li::marker {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85em;
}

.roadmap-topic__siblings a {
  color: var(--secondary-color);
  text-decoration: none;
  opacity: 0.85;
}

.roadmap-topic__siblings a:hover {
  color: var(--primary-color);
  opacity: 1;
}

.roadmap-topic__siblings [aria-current="page"] span {
  color: var(--primary-color);
  font-weight: 600;
}

.roadmap-topic__pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.roadmap-topic__pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
}

.roadmap-topic__pager-link span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
}

.roadmap-topic__pager-link--next {
  text-align: right;
  margin-left: auto;
}

.roadmap-topic__pager-link:hover {
  color: var(--primary-color);
}

.roadmap-topic__all {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
}

.roadmap-topic__all a {
  color: var(--primary-color);
  text-decoration: none;
}

.roadmap-topic__all a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .roadmap-topic__title {
    font-size: 1.9rem;
  }

  .roadmap-topic__teaser {
    font-size: 1.05rem;
  }

  .roadmap-topic__siblings ol {
    columns: 1;
  }
}

/* Related blog articles, between the gate box and the sibling topics. */
.roadmap-topic__related {
  margin: 0 0 2.5rem;
}

.roadmap-topic__related h2 {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
  color: var(--secondary-color);
}

.roadmap-topic__related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.roadmap-topic__related li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.roadmap-topic__related a {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: none;
}

.roadmap-topic__related a:hover {
  color: var(--primary-color);
}

.roadmap-topic__related-meta {
  font-size: 0.8rem;
  color: var(--secondary-color);
  opacity: 0.55;
}

/* Sibling list mirrors the roadmap hierarchy. */
.roadmap-topic__siblings ol ol,
.roadmap-topic__tree--nested {
  columns: auto;
  margin-top: 0.2rem;
  padding-left: 1.1rem;
  font-size: 0.92em;
}

.roadmap-topic__tree-unlinked {
  opacity: 0.6;
}
