/* Shared layout for teacher-first topic destinations. Load after styles.css. */
.standard-topic-page {
  max-width: 1100px;
}

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

.topic-heading h1 {
  margin-bottom: 8px;
}

.topic-heading p {
  margin: 0;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.6;
}

.topic-section {
  margin: 30px 0;
}

.topic-section > h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font: 700 1.45rem/1.3 Poppins, sans-serif;
}

.topic-section-intro {
  max-width: 780px;
  margin: 0 0 16px;
  color: #475569;
  line-height: 1.6;
}

.topic-resource-grid,
.topic-concept-grid,
.related-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.topic-resource-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 22px;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #f29c38;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
}

.resource-type {
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font: 700 .78rem/1 Poppins, sans-serif;
  letter-spacing: .02em;
}

.topic-resource-card h3,
.topic-concept-card h3,
.related-topic-card h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font: 700 1.08rem/1.35 Poppins, sans-serif;
}

.topic-resource-card p,
.topic-concept-card p,
.related-topic-card p {
  margin: 0 0 14px;
  color: #475569;
  line-height: 1.55;
}

.topic-resource-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: auto;
  padding: 10px 16px;
  border-radius: 9px;
  background: #1d4ed8;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.topic-resource-action:hover,
.topic-resource-action:focus-visible {
  background: #1e3a8a;
  color: #fff;
}

.topic-concept-card,
.related-topic-card {
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.related-topic-card a,
.subject-return a {
  color: #1d4ed8;
  font-weight: 700;
}

.subject-return {
  padding: 20px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1e293b;
}

@media (max-width: 640px) {
  .standard-topic-page { padding-inline: 16px; }
  .topic-heading { margin-bottom: 12px; }
  .topic-section { margin: 24px 0; }
  .topic-resource-grid,
  .topic-concept-grid,
  .related-topic-grid { grid-template-columns: 1fr; }
  .topic-resource-card { min-height: 0; padding: 18px; }
  .topic-resource-action { width: 100%; }
}
