/* A field guide for life after the Fellowship. */
#next-chapter {
  --pine: #12493f;
  --fern: #216250;
  --leaf-line: #b4cfc0;
  --leaf-ink: #3e574f;
  overflow: visible;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 7rem) 0 clamp(2.5rem, 4vw, 4rem);
  border-radius: 0;
  background: transparent;
}
#next-chapter .resource-hub-inner {
  display: grid;
  grid-template-columns: minmax(14rem, .75fr) minmax(0, 1.8fr);
  gap: 1.5rem clamp(2rem, 4.6vw, 5.1rem);
  padding: 0;
  align-items: start;
}
.resource-rail {
  min-width: 0;
  padding-top: .4rem;
}
#next-chapter-title {
  max-width: 10ch;
  font-size: clamp(2.9rem, 4.9vw, 4.8rem);
  letter-spacing: -.052em;
  line-height: 1.01;
  color: var(--pine);
  text-wrap: balance;
}
.resource-introduction p {
  max-width: 34ch;
  margin-top: 1rem;
  color: var(--leaf-ink);
  font-size: clamp(1.05rem, 1.45vw, 1.2rem);
  line-height: 1.55;
}
#next-chapter .resource-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: .55rem;
  max-width: 24rem;
  margin: 1.65rem 0 0;
}
#next-chapter .resource-tabs > button {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .25rem;
  min-height: 44px;
  padding: .56rem .94rem;
  border: 1px solid #9cbfae;
  border-radius: 99px;
  background: #ffffff77;
  color: var(--pine);
  font-size: .97rem;
  line-height: 1.35;
}
#next-chapter .resource-tabs > button:hover { background: #d5e9dd; }
#next-chapter .resource-tabs > button[aria-selected="true"] {
  color: white;
  background: var(--pine);
  border-color: var(--pine);
}
#next-chapter .resource-tabs > button > span { display: inline; margin: 0; font-size: .85em; }
#next-chapter .resource-panels {
  overflow-wrap: break-word;
  background: linear-gradient(125deg, #f7fcf7f2, #edf7efe6);
  border: 1px solid #9cbfae;
  border-radius: clamp(1.25rem, 2.5vw, 2.25rem) .75rem .75rem .75rem;
  padding: clamp(1.4rem, 2.7vw, 2.6rem);
}
#next-chapter .resource-panels h3, #next-chapter .programme-options h4 { color: var(--pine); }
#next-chapter .resource-panels .text-link { color: var(--pine); }
#next-chapter .resource-panels .button {
  border-radius: 99px;
  background: var(--pine);
  color: #fff;
}
#next-chapter .resource-panels .button:hover { background: #256550; }
#next-chapter #opportunities > .wrap {
  display: flex;
  flex-direction: column;
}
#next-chapter #opportunities .section-top {
  position: static;
  order: 2;
  margin: .2rem 0 0;
  justify-content: start;
}
#next-chapter #opportunities .pill-filters {
  padding: 0;
  gap: 0 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--leaf-line);
}
#next-chapter .pill-filters button { color: var(--leaf-ink); }
#next-chapter .pill-filters button[aria-pressed="true"] { color: var(--pine); border-color: var(--fern); }
#next-chapter .live-opportunity {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.25rem, 2.25vw, 2rem);
  border-radius: 1rem .4rem 1rem .4rem;
  background: linear-gradient(120deg, #12493f, #226248);
}
#next-chapter .live-opportunity h3 { color: #fff; }
#next-chapter .live-opportunity p { color: #e5f5ec; }
#next-chapter .live-opportunity .small-label { color: #ffdd9a; }
#next-chapter .live-opportunity .button {
  justify-self: start;
  color: #16362d;
  background: #ffcf7d;
}
#next-chapter .live-opportunity .button:hover { background: #ffe2ab; }
#next-chapter .opportunity-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: visible;
  padding-bottom: 0;
}
#next-chapter .opportunity-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: 'type save' 'title action' 'description action';
  gap: .18rem 1.3rem;
  align-items: start;
  padding: 1rem 0;
  border: 0;
  border-bottom: 1px solid var(--leaf-line);
}
#next-chapter .opportunity-top { display: contents; }
#next-chapter .resource-type { grid-area: type; margin: .3rem 0; color: var(--leaf-ink); }
#next-chapter .save-resource {
  grid-area: save;
  justify-self: end;
  width: 38px;
  height: 38px;
  background: transparent;
  color: var(--fern);
  border-color: var(--leaf-line);
}
#next-chapter .save-resource[aria-pressed="true"] { color: #fff; background: var(--fern); }
#next-chapter .opportunity-card h3 { grid-area: title; font-size: 1.3rem; margin: 0; }
#next-chapter .opportunity-card p { grid-area: description; color: var(--leaf-ink); margin: .25rem 0 0; font-size: 1rem; }
#next-chapter .opportunity-card .text-link {
  grid-area: action;
  align-self: end;
  justify-self: end;
  max-width: 13rem;
  min-height: 36px;
  margin: 0;
  text-align: right;
  font-size: .91rem;
}
#next-chapter .resource-note, #next-chapter .pathway-description { color: var(--leaf-ink); }
#next-chapter .pathway-view-tabs { background: #dbece1; }
#next-chapter .pathway-view-tabs [aria-pressed="true"] { background: var(--pine); }
#next-chapter .pathway-value { color: var(--fern); font-size: clamp(2.3rem, 3.7vw, 3.5rem); }
#next-chapter .pathway-snapshot-content { gap: 1rem; }
#next-chapter .pathway-snapshot-details, #next-chapter .programme-disclosure { border-color: var(--leaf-line); }
#next-chapter #hub { grid-template-columns: minmax(0, 1fr) minmax(5rem, 25%); gap: 1rem; }
#next-chapter .hub-illustration { width: 100%; }
#next-chapter .event-result { grid-template-columns: 1fr; }
#next-chapter .event-item, #next-chapter .empty-state { background: #deede1; }
#next-chapter .event-date { background: #ffe5ad; color: #4d351c; }
@media (max-width: 980px) {
  #next-chapter .resource-hub-inner { grid-template-columns: minmax(12rem, .72fr) minmax(0, 1.6fr); column-gap: 1.8rem; }
  #next-chapter .pathway-snapshot-heading { display: block; }
  #next-chapter .pathway-view-tabs { width: fit-content; margin-top: .7rem; }
  #next-chapter .programme-options { grid-template-columns: minmax(0, 1fr); }
  #next-chapter .pathway-snapshot-content { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  #next-chapter .resource-hub-inner { display: flex; flex-direction: column; gap: 1.25rem; }
  #next-chapter .resource-rail, #next-chapter .resource-panels { width: 100%; }
  #next-chapter-title { max-width: 14ch; font-size: clamp(2.55rem, 8vw, 3.4rem); }
  .resource-introduction p { margin-top: .65rem; max-width: 43ch; font-size: 1.03rem; }
  #next-chapter .resource-tabs { margin-top: 1.15rem; max-width: none; gap: .42rem; }
  #next-chapter .resource-tabs > button { font-size: .93rem; padding: .5rem .72rem; }
  #next-chapter .resource-panels { padding: 1.15rem; }
}
@media (max-width: 600px) {
  #next-chapter .opportunity-card { grid-template-areas: 'type save' 'title save' 'description description' 'action action'; }
  #next-chapter .opportunity-card .text-link { justify-self: start; max-width: none; text-align: left; }
  #next-chapter #hub { grid-template-columns: minmax(0, 1fr); }
  #next-chapter .hub-illustration { width: 7rem; }
}

/* A two-by-two tab menu keeps the four destinations within reach on phones. */
@media (max-width: 600px) {
  .alumni-movement-home #next-chapter {
    padding-block: 2.5rem 2.25rem;
  }

  .alumni-movement-home #next-chapter .resource-hub-inner { gap: 1rem; }
  .alumni-movement-home #next-chapter .resource-rail { padding-top: 0; }
  .alumni-movement-home .resource-introduction p { margin-top: .6rem; line-height: 1.45; }
  .alumni-movement-home #next-chapter .resource-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    margin-top: .9rem;
    gap: .42rem;
  }

  .alumni-movement-home #next-chapter .resource-tabs > button {
    min-width: 0;
    min-height: 46px;
    flex-direction: column;
    gap: .12rem;
    padding: .34rem .45rem;
    border-radius: .8rem;
    font-size: 1rem;
    line-height: 1.16;
    text-align: center;
  }

  .alumni-movement-home #next-chapter .resource-tabs > button > span {
    padding: .08rem .47rem;
    border-radius: 1rem;
    background: #e4eee7;
    color: #315643;
    font-size: .78rem;
    line-height: 1.28;
  }

  .alumni-movement-home #next-chapter .resource-tabs > button[aria-selected="true"] > span {
    background: #306a59;
    color: #f5fff7;
  }

  .alumni-movement-home #next-chapter .resource-panels {
    padding: clamp(.8rem, 3.9vw, 1.2rem);
  }

  .alumni-movement-home #next-chapter #opportunities .pill-filters {
    gap: 0 .85rem;
    margin-bottom: .7rem;
  }

  .alumni-movement-home #next-chapter .pill-filters button {
    min-height: 44px;
    padding-block: .5rem;
    font-size: .94rem;
  }

  .alumni-movement-home #next-chapter .live-opportunity {
    padding: 1rem;
    gap: .7rem;
    margin-bottom: .4rem;
  }

  .alumni-movement-home #next-chapter .opportunity-card {
    grid-template-columns: minmax(0, 1fr) 44px;
    column-gap: .7rem;
    padding-block: .75rem;
  }

  .alumni-movement-home #next-chapter .resource-type { margin: .12rem 0; font-size: .875rem; }
  .alumni-movement-home #next-chapter .save-resource { width: 44px; height: 44px; }
  .alumni-movement-home #next-chapter :is(.text-link, .pathway-view-tabs button, .programme-disclosure summary, .button) {
    min-height: 44px;
  }

  .alumni-movement-home #next-chapter .opportunity-card .text-link {
    font-size: .96rem;
    line-height: 1.32;
  }

  .alumni-movement-home #next-chapter .pathway-view-tabs {
    display: flex;
    width: fit-content;
    max-width: 100%;
    gap: .15rem;
    padding: .2rem;
  }

  .alumni-movement-home #next-chapter .pathway-view-tabs button {
    min-width: 0;
    padding: .4rem .55rem;
    font-size: .94rem;
    line-height: 1.3;
  }

  .alumni-movement-home #next-chapter .event-result {
    margin-block: .85rem;
    gap: .7rem;
  }

  .alumni-movement-home #next-chapter .event-item {
    gap: .65rem;
    padding: .9rem .7rem;
  }

  .alumni-movement-home #next-chapter :is(.hub-copy, .events-content) > .actions {
    gap: .35rem .7rem;
  }

  .alumni-movement-home #next-chapter select { min-height: 44px; font-size: 1rem; }
}
