/* Topic Hub presentation layer. Content and navigation targets remain source-owned. */
.topic-hub-page {
  margin: 0;
  background: var(--nel-color-page, #f6f8fc);
  color: var(--nel-color-text, #082f59);
  font-family: var(--nel-font-family, Inter, ui-sans-serif, system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.6;
}

.topic-hub-page main {
  width: min(calc(100% - (2 * var(--nel-content-gutter, 24px))), 1120px);
  margin: 0 auto;
  padding: 28px 0 64px;
}

.topic-hub-breadcrumb {
  display: flex;
  width: min(calc(100% - (2 * var(--nel-content-gutter, 24px))), 1120px);
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  margin: 0 auto;
  padding: 18px 0 0;
  color: var(--nel-color-muted, #5d7691);
  line-height: 1.5;
}

.topic-hub-breadcrumb a {
  color: var(--nel-color-primary, #0b5fb8);
  text-underline-offset: 3px;
}

.topic-hub-page main > h1 {
  max-width: var(--nel-reading-max, 760px);
  margin: 0 0 12px;
  color: var(--nel-color-text, #082f59);
  font-size: clamp(2rem, 3.2vw, 3rem);
  letter-spacing: -.035em;
  line-height: 1.12;
}

.topic-hub-page main > p:first-of-type {
  max-width: var(--nel-reading-max, 760px);
  margin: 0 0 30px;
  color: var(--nel-color-muted, #5d7691);
  font-size: 1.1rem;
  line-height: 1.65;
}

.topic-hub-page main > h2 {
  margin: 36px 0 14px;
  color: var(--nel-color-text, #082f59);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -.02em;
  line-height: 1.3;
}

.topic-hub-page main > nav ul,
.topic-hub-page main > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
  margin: 14px 0 26px;
  padding: 0;
  list-style: none;
}

.topic-hub-page main > nav ul {
  display: flex;
  flex-wrap: wrap;
}

.topic-hub-page main > nav li,
.topic-hub-page main > ul li {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--nel-color-border, #d7e3ef);
  border-radius: 12px;
  background: var(--nel-color-surface, #fff);
  line-height: 1.55;
}

.topic-hub-page main > nav li {
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
}

.topic-hub-page main a {
  color: var(--nel-color-primary, #0b5fb8);
  text-underline-offset: 3px;
}

.topic-hub-page main > ul a {
  font-weight: 650;
}

.topic-hub-page main > ul small {
  display: inline-block;
  margin-left: 6px;
  color: var(--nel-color-muted, #5d7691);
  font-size: .8rem;
}

.topic-hub-page .guide-shell {
  padding-top: 24px;
}

.topic-hub-page .topic-tools,
.topic-hub-page .guide-cta {
  border-color: var(--nel-color-border, #d7e3ef);
  border-radius: 12px;
  box-shadow: none;
}

.topic-hub-page .topic-tools,
.topic-hub-page .guide-cta {
  background: var(--nel-color-surface, #fff);
}

.topic-hub-page .guide-related-grid a {
  display: block;
  min-height: 100%;
  padding: 14px 0;
  border: 0;
  border-top: 1px solid var(--nel-color-border, #d7e3ef);
  border-radius: 0;
  background: transparent;
  line-height: 1.6;
}

.topic-hub-page .guide-related-grid {
  gap: 0 24px;
}

.topic-hub-page .topic-tools a,
.topic-hub-page .guide-cta a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--nel-color-primary, #0b6ff2);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 800px) {
  .topic-hub-page main {
    width: calc(100% - (2 * var(--nel-content-gutter-mobile, 14px)));
    padding-top: 20px;
    padding-bottom: 44px;
  }

  .topic-hub-breadcrumb {
    width: calc(100% - (2 * var(--nel-content-gutter-mobile, 14px)));
  }

  .topic-hub-page main > p:first-of-type {
    font-size: 1rem;
  }

  .topic-hub-page main > ul {
    grid-template-columns: 1fr;
  }

  .topic-hub-page .topic-tools a,
  .topic-hub-page .guide-cta a {
    width: 100%;
    box-sizing: border-box;
  }
}

/* NEL_WORKED_EXAMPLE */
.nel-worked-example{margin:28px 0;padding:22px 24px;border:1px solid #c5d7ec;border-radius:16px;background:#f7fbff}
.nel-worked-example h2{margin-top:0;color:#10294d}
.nel-worked-example h3{margin:18px 0 8px;color:#132b4e;font-size:1.05rem}
.nel-worked-example table{width:100%;border-collapse:collapse;margin:10px 0 14px;font-size:.95rem}
.nel-worked-example th,.nel-worked-example td{border:1px solid #c5d7ec;padding:8px 10px;text-align:left;vertical-align:top}
.nel-worked-example th{background:#eef5fc}
.nel-worked-example .nel-worked-formula{margin:10px 0;padding:12px 14px;border-left:4px solid #0b5fb8;background:#fff;color:#243b55}
.nel-worked-example .nel-worked-result{font-weight:700;color:#10294d}
