/* Shared styles for all sub-pages (loaded after styles.css) */
.sub-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.sub-crumbs a:hover {
  color: var(--red);
}

.sub-crumbs span[aria-hidden] {
  opacity: 0.5;
}

.sub-hero aside {
  align-self: end;
}

.sub-hero aside small {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sub-hero aside strong {
  margin: 10px 0 18px;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.15;
}

.sub-hero aside a {
  color: #fff;
  font-weight: 800;
  border-bottom: 2px solid var(--gold);
}

.sub-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 clamp(18px, 5vw, 64px) 96px;
}

.sub-nav {
  position: sticky;
  top: 128px;
  align-self: start;
  max-height: calc(100vh - 156px);
  overflow-y: auto;
  border-top: 4px solid var(--red);
  background: var(--soft);
}

.sub-nav p {
  margin: 0;
  padding: 16px 16px 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sub-nav a {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  transition: background 140ms ease, color 140ms ease;
}

.sub-nav a:hover {
  color: var(--red);
  background: #fff;
}

.sub-nav a[aria-current="page"] {
  color: #fff;
  background: var(--red);
}

.sub-content h2 {
  margin: 0 0 24px;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.05;
}

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

.focus-grid article {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 190px;
  padding: 24px;
  border-top: 4px solid var(--red);
  background: var(--mist);
}

.focus-grid span {
  color: var(--red);
  font-weight: 800;
}

.focus-grid h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.sub-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 56px;
  padding: clamp(28px, 4vw, 48px);
  color: #fff;
  background: var(--red-dark);
}

.sub-cta h2 {
  max-width: 460px;
  margin: 0;
  color: #fff;
}

.sub-cta .primary-button {
  color: var(--ink);
  background: #fff;
}

.sub-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.sub-pager a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--line);
  font-weight: 800;
  transition: border-color 140ms ease;
}

.sub-pager a:hover {
  border-color: var(--red);
}

.sub-pager a:last-child:not(:first-child) {
  grid-column: 2;
  text-align: right;
}

.sub-pager small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 920px) {
  .sub-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sub-nav {
    position: static;
    display: flex;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .sub-nav p {
    display: none;
  }

  .sub-nav a {
    flex: none;
    white-space: nowrap;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .sub-hero.split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .focus-grid,
  .sub-pager {
    grid-template-columns: 1fr;
  }

  .sub-pager a:last-child:not(:first-child) {
    grid-column: auto;
  }

  .focus-grid article {
    min-height: 0;
  }

  .sub-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Long titles (e.g. industry names) must wrap on word boundaries */
.sub-hero h1 {
  max-width: 14ch;
  font-size: clamp(34px, 5.4vw, 72px);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

@media (max-width: 920px) {
  .sub-hero h1 { max-width: none; }
}
