.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-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-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 {
    grid-template-columns: 1fr;
  }

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