:root {
  --sage-tint: #e7eee9;
  --olive-tint: #f0f0e3;
  --error: #a02f35;
  --input-surface: #fdfefd;
  --input-rule: #7c9885;
}

/* Shared section typography and layout */
main {
  outline-offset: -6px;
}

main section[id] {
  scroll-margin-top: 130px;
}

main h1,
main h2,
main h3 {
  text-wrap: balance;
}

main h2 {
  font-size: clamp(32px,3.35vw,48px);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 600;
  margin: 0 0 24px;
}

main h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.02em;
  margin: 0 0 14px;
}

main p {
  margin: 0 0 18px;
  text-wrap: pretty;
}

.section {
  padding-block: 100px;
}

.section-lead {
  font-size: 20px;
  line-height: 1.55;
  max-width: 37ch;
}

.section-heading {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 48px;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-heading p {
  color: var(--text-muted);
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.text-link {
  font-size: 15px;
  font-weight: 600;
  display: inline-block;
  padding-block: 10px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

/* Hero */
.hero {
  background: var(--teal);
  color: #fdfefd;
  padding-top: 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 72px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(42px,4.35vw,64px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -.04em;
  margin: 0 0 25px;
}

.hero h1 span {
  color: var(--yellow);
}

.hero-copy>p {
  font-size: 16px;
  line-height: 1.75;
  max-width: 63ch;
  color: #e5f0ef;
}

.hero-copy>.hero-lead {
  font-size: 20px;
  font-weight: 500;
  color: #fdfefd;
  line-height: 1.5;
  margin-bottom: 16px;
}

.hero .actions {
  margin-top: 28px;
}

.button-yellow {
  background: var(--yellow);
  color: var(--navy);
}

.button-yellow:hover {
  background: var(--olive);
}

.button-outline {
  background: transparent;
  color: #fdfefd;
  outline: 1px solid #bdd1d1;
  outline-offset: -1px;
}

.button-outline:hover {
  background: #20565e;
}

.hero-copy>.hero-note {
  font-size: 13px;
  margin: 20px 0 0;
  color: #e5f0ef;
}

.hero :focus-visible {
  outline-color: var(--yellow);
}

.hero-visual {
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  align-self: center;
  background: var(--yellow);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
  object-position: 50% 48%;
}

.hero-visual figcaption {
  font-size: 20px;
  line-height: 1.35;
  padding: 24px 30px;
  color: var(--navy);
  font-weight: 400;
}

.hero-visual figcaption strong {
  font-weight: 600;
}

.hero-highlights {
  list-style: none;
  padding: 28px 0;
  margin: 54px 0 0;
  border-top: 1px solid #659095;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 30px;
}

.hero-highlights li {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  max-width: 25ch;
}

/* About and benefits */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 100px;
}

.about-grid .section-lead {
  max-width: 30ch;
  margin-bottom: 24px;
}

.reading-copy {
  max-width: 67ch;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
}

.reading-copy p:last-child {
  margin-bottom: 0;
}

.purpose-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 24px;
  margin-top: 52px;
}

.purpose-grid article {
  padding: 36px 40px;
  color: var(--navy);
  border-radius: 12px;
}

.purpose-grid p {
  font-size: 16px;
  line-height: 1.75;
  margin: 0;
  max-width: 58ch;
}

.mission {
  background: var(--sage-tint);
}

.vision {
  background: var(--olive-tint);
}

.why-section {
  background: var(--surface-subtle);
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 80px;
  margin-bottom: 36px;
}

.benefits-grid article {
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}

.benefits-grid p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
  max-width: 62ch;
}

/* Job categories */
.opportunities-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 100px;
  align-items: start;
}

.opportunities-intro h2 {
  max-width: 16ch;
}

.opportunities-intro .section-lead {
  margin-bottom: 30px;
  color: var(--text-muted);
}

.category-list {
  border-top: 1px solid var(--input-rule);
}

details {
  border-bottom: 1px solid var(--rule);
}

summary {
  cursor: pointer;
  padding: 24px 4px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
}

summary::marker {
  font-size: 12px;
  color: var(--teal);
}

summary:hover {
  color: var(--teal);
}

details[open]>summary {
  color: var(--teal);
}

.category-body {
  padding: 0 4px 26px 20px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
}

.category-body p {
  margin-bottom: 15px;
}

.category-body .text-link {
  color: var(--text);
}

.example-roles {
  font-size: 14px;
}

.example-roles strong {
  font-weight: 600;
  color: var(--text);
}

/* Application process */
.process-section {
  background: var(--sage-tint);
  color: var(--navy);
}

.process-section .section-heading p {
  color: #36595f;
}

.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 80px;
}

.process-list li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  border-top: 1px solid #adbfaf;
  padding-block: 32px;
}

.step-number {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--teal);
}

.process-list p {
  font-size: 15px;
  line-height: 1.8;
  color: #36595f;
  margin: 0;
}

.process-close {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 18px;
}

.process-close p {
  font-size: 13px;
  max-width: 56ch;
  margin: 0;
  color: #36595f;
}

/* Testimonials */
.testimonials .section-heading {
  margin-bottom: 50px;
}

.testimonial-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.testimonials figure {
  margin: 0;
}

.testimonials blockquote {
  margin: 0 0 26px;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -.01em;
}

.testimonials figcaption {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 1.8;
}

.testimonials figcaption strong {
  font-size: 14px;
  font-weight: 600;
}

.testimonials figcaption span {
  color: var(--text-muted);
}

.featured-quote {
  background: var(--olive-tint);
  color: var(--navy);
  padding: 44px;
  border-radius: 12px;
  align-self: start;
}

.featured-quote blockquote {
  font-size: 27px;
  line-height: 1.5;
  letter-spacing: -.025em;
}

.featured-quote figcaption span {
  color: #36595f;
}

.supporting-quotes {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.supporting-quotes figure+figure {
  border-top: 1px solid var(--rule);
  padding-top: 30px;
}

/* Frequently asked questions */
.faq-section {
  background: var(--surface-subtle);
}

.faq-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 100px;
}

.faq-grid .section-lead {
  color: var(--text-muted);
}

.faq-list {
  border-top: 1px solid var(--input-rule);
}

.faq-list summary {
  font-size: 17px;
  padding-block: 22px;
}

.faq-list details>div {
  padding: 0 4px 24px 20px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
  max-width: 70ch;
}

.faq-list p {
  margin: 0;
}

.faq-list a {
  text-decoration: underline;
}

/* Closing call to action */
.next-chapter {
  background: var(--olive);
  color: var(--navy);
}

.chapter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
}

.chapter-grid h2 {
  max-width: 18ch;
}

.chapter-grid p {
  font-size: 16px;
  line-height: 1.8;
  max-width: 60ch;
}

.chapter-grid .section-lead {
  font-size: 21px;
  line-height: 1.5;
}

.chapter-grid .chapter-note {
  font-size: 13px;
  margin: 24px 0 0;
}

.next-chapter :focus-visible {
  outline-color: var(--navy);
}

/* Application form */
.apply-section {
  background: var(--surface-subtle);
}

.apply-grid {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 72px;
  align-items: start;
}

.apply-intro {
  position: sticky;
  top: 145px;
}

.apply-intro h3 {
  font-size: 23px;
  line-height: 1.4;
  max-width: 25ch;
  margin-top: 30px;
}

.apply-intro>p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 43ch;
}

.apply-intro .privacy-message {
  font-size: 13px;
  line-height: 1.8;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

.privacy-message a,
.checkbox-label a,
.form-legal a {
  text-decoration: underline;
}

.form-wrap {
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  min-width: 0;
}

.required-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-wide {
  grid-column: 1/-1;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.optional {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

input,
select,
textarea {
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--input-surface);
  border: 1px solid var(--input-rule);
  border-radius: var(--radius-control);
  width: 100%;
  padding: 12px 13px;
  min-height: 50px;
  caret-color: var(--teal);
  scroll-margin-top: 140px;
}

.select-control {
  position: relative;
  min-width: 0;
}

.select-control::after {
  content: "";
  position: absolute;
  right: 19px;
  top: 21px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  pointer-events: none;
}

select {
  appearance: none;
  padding-inline: 13px 44px;
  cursor: pointer;
}

@supports (appearance: base-select) {
  .select-control::after {
    display: none;
  }

  select,
  select::picker(select) {
    appearance: base-select;
  }

  select {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-inline: 13px 18px;
  }

  select::picker-icon {
    color: var(--text);
    margin-inline-start: auto;
    flex-shrink: 0;
  }

  select:open {
    border-color: var(--teal);
  }

  select::picker(select) {
    font-family: "DM Sans",sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--input-surface);
    border: 1px solid var(--input-rule);
    border-radius: 8px;
    padding: 6px;
    margin-block: 6px;
    max-height: min(320px,50dvh);
    overflow: auto;
    min-width: anchor-size(width);
    max-width: calc(100vw - 32px);
    scrollbar-width: thin;
    scrollbar-color: var(--sage) var(--input-surface);
  }

  select option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 11px 12px;
    border-radius: 5px;
    white-space: normal;
    cursor: pointer;
  }

  select option:hover,
  select option:focus {
    background: var(--sage-tint);
    color: var(--text);
    outline: none;
  }

  select option:checked {
    background: var(--olive-tint);
    color: var(--text);
    font-weight: 600;
  }

  select option::checkmark {
    color: var(--teal);
    order: 1;
    margin-inline-start: auto;
  }
}

textarea {
  resize: vertical;
  min-height: 120px;
  max-height: 500px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--teal);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.field-hint {
  font-size: 11px;
  line-height: 1.65;
  color: var(--text-muted);
}

.field-hint:empty,
.field-error:empty {
  display: none;
}

.field-error {
  font-size: 12px;
  line-height: 1.6;
  color: var(--error);
}

[aria-invalid="true"] {
  border-color: var(--error);
}

.error-summary {
  padding: 20px;
  border: 1px solid var(--error);
  border-radius: 8px;
  margin-bottom: 26px;
  scroll-margin-top: 130px;
  color: var(--error);
}

.error-summary h3 {
  font-size: 17px;
  color: var(--text);
  margin: 0 0 12px;
}

.error-summary ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
}

.error-summary a {
  text-decoration: underline;
  display: inline-block;
  padding-block: 4px;
}

.consent-group {
  margin-block: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.8;
  padding-block: 4px;
}

.checkbox-label input {
  accent-color: var(--teal);
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  flex-shrink: 0;
  margin: 3px 0 0;
}

.consent-field .field-error {
  display: block;
  padding-left: 32px;
}

.submit-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  cursor: pointer;
}

.submit-button:disabled {
  opacity: .75;
  cursor: wait;
}

.form-result {
  margin-top: 22px;
  padding: 20px;
  background: var(--sage-tint);
  border-radius: 8px;
  color: var(--navy);
  scroll-margin-top: 140px;
  font-size: 15px;
}

.form-result p {
  margin: 8px 0 0;
}

.form-result a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.form-result strong {
  font-size: 13px;
}

.form-result[data-state="error"] {
  background: var(--olive-tint);
}

.form-legal {
  font-size: 11px;
  line-height: 1.8;
  color: var(--text-muted);
  margin: 20px 0 0;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Responsive layout */
@media (max-width: 1250px) {
  .hero-grid {
    gap: 44px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .hero-copy>p {
    font-size: 15px;
  }

  .hero-copy>.hero-lead {
    font-size: 19px;
  }

  .hero-visual figcaption {
    font-size: 18px;
  }

  .about-grid,
  .opportunities-grid,
  .faq-grid,
  .chapter-grid {
    gap: 60px;
  }

  .section-heading {
    gap: 50px;
  }

  .apply-grid {
    gap: 42px;
  }

  .form-wrap {
    padding: 28px;
  }

  .form-grid {
    gap: 22px 16px;
  }

  .benefits-grid,
  .process-list,
  .testimonial-layout {
    column-gap: 50px;
  }
}

@media (max-width: 1000px) {
  .section {
    padding-block: 76px;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-grid {
    gap: 36px;
    grid-template-columns: 1.1fr 1fr;
  }

  .hero h1 {
    font-size: 43px;
  }

  .hero-copy>.hero-lead {
    font-size: 18px;
  }

  .hero-copy>p {
    font-size: 14px;
  }

  .hero .button {
    padding-inline: 20px;
  }

  .hero-highlights {
    gap: 20px;
    margin-top: 40px;
  }

  .hero-highlights li {
    font-size: 12px;
  }

  .about-grid,
  .opportunities-grid,
  .faq-grid,
  .chapter-grid {
    gap: 40px;
  }

  .purpose-grid article {
    padding: 28px;
  }

  .apply-grid {
    grid-template-columns: .7fr 1.3fr;
    gap: 32px;
  }

  .apply-intro h2 {
    font-size: 34px;
  }

  .apply-intro h3 {
    font-size: 21px;
  }

  .apply-intro>p {
    font-size: 14px;
  }

  .form-wrap {
    padding: 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .featured-quote {
    padding: 32px;
  }

  .featured-quote blockquote {
    font-size: 23px;
  }

  .process-list {
    gap: 0 40px;
  }

  .process-list li {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }
}

@media (max-width: 767px) {
  main section[id] {
    scroll-margin-top: 108px;
  }

  .section {
    padding-block: clamp(48px, 8vw, 60px);
  }

  main h2 {
    font-size: 34px;
    margin-bottom: 20px;
  }

  main h3 {
    font-size: 20px;
  }

  .section-lead {
    font-size: 18px;
  }

  .section-heading {
    display: block;
    margin-bottom: 32px;
  }

  .section-heading p {
    margin-top: 18px;
  }

  .hero {
    padding-top: 40px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero h1 {
    font-size: clamp(34px,9vw,50px);
    line-height: 1.1;
    letter-spacing: -.035em;
    margin-bottom: 22px;
  }

  .hero-copy>.hero-lead {
    font-size: 18px;
  }

  .hero-copy>p {
    font-size: 15px;
    line-height: 1.75;
  }

  .hero-copy>.hero-note {
    font-size: 12px;
    line-height: 1.7;
  }

  .hero .actions {
    gap: 12px;
  }

  .hero .button {
    font-size: 13px;
    padding-inline: 19px;
  }

  .hero-visual img {
    aspect-ratio: 3/2;
  }

  .hero-visual figcaption {
    padding: 20px 24px;
    font-size: 20px;
  }

  .hero-highlights {
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    margin-top: 34px;
    padding-block: 26px;
  }

  .hero-highlights li {
    font-size: 12px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .about-grid h2 br {
    display: none;
  }

  .reading-copy {
    font-size: 15px;
  }

  .purpose-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 32px;
  }

  .purpose-grid article {
    padding: 28px;
  }

  .purpose-grid p {
    font-size: 15px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    margin-bottom: 28px;
  }

  .benefits-grid article {
    padding-block: 24px;
  }

  .opportunities-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .opportunities-intro h2 {
    max-width: 20ch;
  }

  .opportunities-intro .section-lead {
    margin-bottom: 24px;
  }

  summary {
    font-size: 18px;
    padding-block: 23px;
  }

  .category-body {
    padding-left: 16px;
  }

  .process-list {
    grid-template-columns: 1fr;
  }

  .process-list li {
    padding-block: 26px;
    grid-template-columns: 38px 1fr;
    gap: 14px;
  }

  .step-number {
    font-size: 22px;
  }

  .process-list h3 {
    font-size: 19px;
  }

  .process-close {
    display: block;
    margin-top: 12px;
  }

  .process-close p {
    margin-top: 18px;
    font-size: 12px;
  }

  .testimonial-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .featured-quote {
    padding: 30px;
  }

  .featured-quote blockquote {
    font-size: 23px;
    line-height: 1.55;
  }

  .supporting-quotes {
    gap: 26px;
  }

  .testimonials blockquote {
    margin-bottom: 20px;
  }

  .testimonials .section-heading {
    margin-bottom: 32px;
  }

  .faq-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .faq-list summary {
    font-size: 16px;
  }

  .chapter-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .chapter-grid h2 {
    max-width: 20ch;
  }

  .chapter-grid .section-lead {
    font-size: 19px;
  }

  .chapter-grid .actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .apply-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .apply-intro {
    position: static;
  }

  .apply-intro h2 br {
    display: none;
  }

  .apply-intro h3 {
    margin-top: 20px;
    max-width: 30ch;
    font-size: 22px;
  }

  .apply-intro>p {
    font-size: 15px;
    max-width: 60ch;
  }

  .apply-intro .privacy-message {
    margin-top: 24px;
    padding-top: 20px;
  }

  .form-wrap {
    padding: 24px 20px;
  }

  .form-grid {
    gap: 20px;
  }

  .field label {
    font-size: 14px;
  }

  .error-summary,
  .form-result {
    scroll-margin-top: 110px;
  }
}

@media (max-width: 420px) {
  .hero .actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --sage-tint: #214b4c;
    --olive-tint: #3d493b;
    --input-surface: #103b4a;
    --input-rule: #779b9d;
    --error: #ffb6ac;
  }

  .purpose-grid article {
    color: var(--text);
  }

  summary::marker,
  summary:hover,
  details[open]>summary {
    color: var(--yellow);
  }

  .process-section {
    color: var(--text);
  }

  .process-section .section-heading p,
  .process-list p,
  .process-close p {
    color: #d1e0db;
  }

  .step-number {
    color: var(--yellow);
  }

  .process-list li {
    border-color: #577571;
  }

  .featured-quote {
    color: var(--text);
  }

  .featured-quote figcaption span {
    color: #d1e0db;
  }

  .form-result {
    color: var(--text);
  }

  .next-chapter {
    background: #b5b682;
    color: var(--navy);
  }

  .field input:focus-visible,
  .field select:focus-visible,
  .field textarea:focus-visible {
    outline-color: var(--yellow);
  }

  .checkbox-label input {
    accent-color: var(--yellow);
  }

  select option::checkmark {
    color: var(--yellow);
  }
}
