.topic-page {
  max-width: 1120px;
  padding: clamp(68px, 10vw, 122px) 0 clamp(92px, 12vw, 144px);
}

.topic-page h1,
.topic-page h2,
.topic-page h3,
.topic-page p,
.topic-page li,
.topic-page a,
.topic-page dd {
  overflow-wrap: anywhere;
}

.topic-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: clamp(42px, 8vw, 96px);
  align-items: end;
}

.topic-hero h1 {
  max-width: 820px;
  font-size: clamp(3.25rem, 7vw, 6.6rem);
}

.topic-lede {
  max-width: 760px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  line-height: 1.75;
}

.topic-boundary {
  padding: 26px;
  border-top: 4px solid var(--green);
  background: rgba(255, 255, 255, 0.4);
}

.topic-boundary strong {
  display: block;
  font-family: "Newsreader", serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.topic-boundary p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.topic-section {
  margin-top: clamp(76px, 10vw, 112px);
  padding-top: clamp(58px, 8vw, 78px);
  border-top: 1px solid var(--line);
}

.topic-section-heading {
  max-width: 780px;
  margin-bottom: 38px;
}

.topic-section-heading h2 {
  font-size: clamp(2.55rem, 5vw, 4.7rem);
}

.topic-section-heading p:last-child {
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.topic-card,
.route-card {
  min-width: 0;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
}

.topic-card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
}

.topic-label,
.route-label,
.topic-status {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topic-card h3,
.route-card h3 {
  margin-top: 18px;
  font-family: "Newsreader", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.topic-card p,
.route-card p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.topic-question {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.topic-question strong {
  color: var(--ink);
}

.topic-status {
  margin-top: auto;
  padding-top: 24px;
}

.topic-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.route-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
}

.route-card a,
.topic-links a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  color: var(--green);
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.route-card a {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 24px;
}

.topic-method {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.topic-method div {
  min-width: 0;
  padding: 26px;
}

.topic-method div + div {
  border-left: 1px solid var(--line);
}

.topic-method dt {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topic-method dd {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
}

.topic-view-nav {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(244, 240, 231, 0.96);
}

.topic-view-nav a {
  display: inline-flex;
  min-height: 44px;
  flex: 1 1 120px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid transparent;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.topic-view-nav a:hover {
  border-color: var(--line);
  color: var(--green);
  background: rgba(255, 255, 255, 0.56);
}

.topic-preview-section {
  scroll-margin-top: 92px;
}

.topic-fact-grid,
.topic-record-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.topic-fact-grid > div,
.topic-record-fields > div {
  min-width: 0;
  padding: 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.topic-fact-grid dt,
.topic-record-fields dt {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.topic-fact-grid dd,
.topic-record-fields dd {
  margin: 10px 0 0;
  color: var(--ink);
  line-height: 1.5;
}

.topic-distinction-grid,
.topic-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.topic-record-card,
.topic-empty-card,
.topic-update-card {
  min-width: 0;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
}

.topic-record-card h3,
.topic-empty-card h3,
.topic-update-card h3,
.topic-timeline h3 {
  margin-top: 14px;
  font-family: "Newsreader", serif;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  line-height: 1.12;
}

.topic-record-card > p,
.topic-empty-card p,
.topic-update-card p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.topic-record-card code,
.topic-update-card code,
.topic-timeline code {
  font-size: 0.84em;
  overflow-wrap: anywhere;
}

.topic-record-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.topic-record-note {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.topic-record-wide {
  max-width: 900px;
}

.topic-update-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: end;
}

.topic-update-card a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  color: var(--green);
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.topic-empty-card {
  border-style: dashed;
}

.topic-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-timeline li {
  position: relative;
  padding: 0 0 40px 42px;
  border-left: 1px solid var(--line);
}

.topic-timeline li::before {
  position: absolute;
  top: 3px;
  left: -7px;
  width: 13px;
  height: 13px;
  border: 3px solid #f4f0e7;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.topic-timeline time {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topic-timeline p {
  margin: 10px 0 0;
  color: var(--muted);
}

.topic-page a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (max-width: 900px) {
  .topic-hero {
    grid-template-columns: 1fr;
  }

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

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

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

  .topic-method div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .topic-method div:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .topic-grid,
  .topic-grid-two,
  .route-grid,
  .topic-method,
  .topic-fact-grid,
  .topic-record-fields,
  .topic-distinction-grid,
  .topic-evidence-grid,
  .topic-update-card {
    grid-template-columns: 1fr;
  }

  .topic-view-nav {
    position: static;
  }

  .topic-view-nav a {
    flex-basis: calc(50% - 8px);
  }

  .topic-card,
  .route-card {
    min-height: 0;
  }

  .topic-method div + div,
  .topic-method div:nth-child(3),
  .topic-method div:nth-child(4) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 360px) {
  .topic-hero h1,
  .topic-section-heading h2 {
    font-size: 2.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topic-page *,
  .topic-page *::before,
  .topic-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Published topic discovery */
.published-topic-page {
  max-width: 1180px;
}

.reader-topic-hero h1 {
  max-width: 870px;
}

.reader-topic-hero .topic-boundary a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  margin-top: 18px;
  color: var(--green);
  font-weight: 700;
}

.topic-jump-nav {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 52px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(244, 240, 231, 0.96);
}

.topic-jump-nav a {
  display: inline-flex;
  min-height: 44px;
  flex: 1 1 160px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid transparent;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.topic-jump-nav a:hover {
  border-color: var(--line);
  color: var(--green);
  background: rgba(255, 255, 255, 0.52);
}

.published-topic-section {
  scroll-margin-top: 88px;
  margin-top: clamp(72px, 10vw, 112px);
  padding-top: clamp(54px, 8vw, 78px);
  border-top: 1px solid var(--line);
}

.published-topic-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(40px, 8vw, 100px);
  align-items: end;
  margin-bottom: 38px;
}

.published-topic-heading h2 {
  max-width: 760px;
  font-size: clamp(2.8rem, 5.3vw, 5rem);
}

.published-topic-heading > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.topic-story-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-story-list li {
  min-width: 0;
}

.topic-story-list a {
  display: flex;
  min-height: 160px;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(22px, 3.5vw, 32px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.38);
  color: var(--ink);
  text-decoration: none;
}

.topic-story-list a:hover {
  border-color: var(--green);
}

.topic-story-list strong {
  font-family: "Newsreader", serif;
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.13;
}

.topic-story-list span {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.45;
}

.published-topic-section-small .topic-story-list {
  grid-template-columns: minmax(0, 0.7fr) minmax(220px, 0.3fr);
}

.published-topic-section-small .topic-story-list li {
  grid-column: 1;
}

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

.topic-roadmap-note {
  max-width: 820px;
  margin: 34px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.72;
}

.topic-methodology {
  padding-bottom: 0;
}

@media (max-width: 820px) {
  .published-topic-heading,
  .topic-story-list,
  .published-topic-section-small .topic-story-list {
    grid-template-columns: 1fr;
  }

  .published-topic-section-small .topic-story-list li {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .topic-jump-nav {
    position: static;
  }

  .topic-jump-nav a {
    flex-basis: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .topic-story-list a {
    min-height: 0;
  }
}

@media (max-width: 360px) {
  .published-topic-heading h2 {
    font-size: 2.65rem;
  }
}


.topic-category-path {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  margin: -8px 0 20px;
}

.topic-category-newest,
.topic-archive-link {
  min-width: 0;
  margin: 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
}

.topic-category-newest span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.topic-category-newest a,
.topic-archive-link {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.5;
  text-underline-offset: 0.18em;
}

.topic-archive-link {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--green);
}

@media (max-width: 620px) {
  .topic-category-path {
    grid-template-columns: 1fr;
  }
}


/* Reader-first published category hubs */
.topic-hub-link {
  color: inherit;
  text-decoration-color: rgba(18, 120, 82, 0.34);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
}

.topic-hub-link:hover {
  color: var(--green);
  text-decoration-color: currentColor;
}

.topic-hub-count-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.category-hub-page {
  max-width: 1180px;
}

.category-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 42px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.category-breadcrumbs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--green);
  text-underline-offset: 0.18em;
}

.category-hub-hero {
  align-items: start;
}

.category-hub-feature,
.category-hub-coverage,
.category-hub-next {
  margin-top: clamp(72px, 10vw, 112px);
  padding-top: clamp(52px, 8vw, 76px);
  border-top: 1px solid var(--line);
}

.category-hub-feature {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
  gap: clamp(34px, 7vw, 84px);
}

.category-section-heading {
  max-width: 820px;
}

.category-section-heading h2,
.category-hub-next h2 {
  margin-top: 14px;
  font-family: "Newsreader", serif;
  font-size: clamp(2.55rem, 5.2vw, 4.8rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
}

.category-section-heading > p:last-child,
.category-hub-next p {
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.72;
}

.category-feature-meta {
  display: grid;
  align-content: start;
  gap: 0;
  border-top: 1px solid var(--line);
}

.category-feature-meta > * {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.category-feature-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  align-self: end;
  color: var(--green);
  font-weight: 700;
}

.category-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 38px;
}

.category-story-card {
  display: flex;
  min-width: 0;
  min-height: 390px;
  flex-direction: column;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.38);
}

.category-story-card h3 {
  margin-top: 20px;
  font-family: "Newsreader", serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.category-story-card > p {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.category-story-card .story-scope {
  margin-top: 20px;
}

.category-story-card > a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 24px;
  color: var(--green);
  font-weight: 700;
}

.category-hub-next {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(34px, 7vw, 84px);
  align-items: end;
}

.category-hub-next nav {
  display: grid;
  gap: 10px;
}

.category-hub-next nav a {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--green);
  font-weight: 700;
}

@media (max-width: 820px) {
  .category-hub-feature,
  .category-hub-next {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .category-story-grid {
    grid-template-columns: 1fr;
  }

  .category-story-card {
    min-height: 0;
  }
}

@media (max-width: 360px) {
  .category-section-heading h2,
  .category-hub-next h2 {
    font-size: 2.55rem;
  }
}
