/* ADAPT-Nan styles.
   Sections follow the page order. Later rules override earlier ones, so the
   responsive and Thai-language adjustments come after the base rules. */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap');


/* ================================================================ */
/* Colors and base elements (change site colors in :root)           */
/* ================================================================ */
:root {
  --ink: #233e30;
  --green: #2c563f;
  --paper: #f7f6ee;
  --muted: #647266;
  --line: #d9ded1;
  --lime: #d9e6a5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans',Arial,sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
h1,
h2,
h3,
.brand {
  font-family: Manrope,Arial,sans-serif;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(42px,5.4vw,76px);
  font-weight: 500;
  line-height: 1.09;
  letter-spacing: -3px;
  margin-bottom: 26px;
}
h2 {
  font-size: clamp(30px,3.2vw,44px);
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: -1.7px;
}
h3 {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.6px;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button,
a,
input,
summary {
  outline-offset: 5px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #9b741e;
}
button {
  cursor: pointer;
}
a:hover {
  color: #68843a;
}


/* ================================================================ */
/* Header, logo, and navigation                                     */
/* ================================================================ */
.site-header {
  height: 124px;
  max-width: 1440px;
  margin: auto;
  padding: 0 5.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 31px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.brand img {
  width: auto;
  height: 92px;
  object-fit: contain;
}
.brand-nan {
  font-weight: 500;
}
.brand small {
  font-family: 'DM Sans',sans-serif;
  font-size: 10px;
  letter-spacing: 1.7px;
  display: block;
  margin-top: 8px;
}
.brand-tagline {
  letter-spacing: .2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
  max-width: 340px;
  white-space: normal;
}
nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  font-weight: 500;
}
nav a[aria-current] {
  text-decoration: underline;
  text-underline-offset: 7px;
}
.nav-contact {
  border: 1px solid #bac5b7;
  border-radius: 5px;
  padding: 10px 17px;
}
.menu-toggle {
  display: none;
}
.skip {
  position: fixed;
  left: 20px;
  top: -80px;
  background: white;
  padding: 10px;
  z-index: 50;
}
.skip:focus {
  top: 10px;
}
.container {
  max-width: 1280px;
  margin: auto;
  padding: 0 5.5%;
}


/* ================================================================ */
/* Home: hero, principles, research themes, learning band           */
/* ================================================================ */
.hero {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  max-width: 1440px;
  margin: auto;
  border-top: 1px solid var(--line);
}
.hero-copy {
  padding: 66px 9% 40px 10.6%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 2.3px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.eyebrow.dot:before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7d943c;
  display: inline-block;
  margin-right: 10px;
}
.hero h1 em {
  font-family: Georgia,serif;
  font-weight: 400;
  color: #687e45;
}
.hero-copy>p {
  font-size: 16px;
  max-width: 420px;
  color: var(--muted);
  margin-bottom: 29px;
}
.hero-art {
  position: relative;
  overflow: hidden;
  background: #c5ceb3;
}
.hero-art>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
}
.art-label {
  position: absolute;
  top: 28px;
  left: 28px;
  border: 1px solid #ffffff70;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 10px;
  letter-spacing: 1.2px;
  background: #f7f6ee55;
}
.art-caption {
  position: absolute;
  bottom: 27px;
  left: 28px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  color: white;
  font-size: 11px;
  letter-spacing: .3px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}


/* ================================================================ */
/* Buttons and text links                                           */
/* ================================================================ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 13px 21px;
  background: var(--green);
  color: white;
  border: 1px solid var(--green);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.button:hover {
  background: #173e2b;
  color: white;
}
.button.light {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid #849277;
  padding-bottom: 3px;
}
.principles {
  background: #e9ecdf;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  padding: 24px 5.5%;
  gap: 30px;
}
.principles>div {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 500;
  justify-content: center;
}
.principles img {
  flex: none;
  width: 44px;
  height: 44px;
}
.principles small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}


/* ================================================================ */
/* Sections, grids, and cards                                       */
/* ================================================================ */
.section {
  padding-top: 78px;
  padding-bottom: 78px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 50px;
  margin-bottom: 34px;
}
.section-head h2 {
  margin: 0;
  max-width: 560px;
}
.section-head>p {
  max-width: 350px;
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 22px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 29px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #fafaf4;
}
.card .number {
  font-size: 12px;
  color: #738059;
  letter-spacing: 1px;
  margin-bottom: 40px;
}
.card p {
  font-size: 14px;
  color: var(--muted);
}
.card .text-link {
  margin-top: auto;
  align-self: flex-start;
}
.card:hover {
  border-color: #879d78;
}
.card-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 22px;
  background: #e7e6dd;
}
.theme-card .number {
  margin-bottom: 14px;
}
.learning-band {
  background: var(--green);
  color: #f7f6ee;
}
.learning-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 75px;
  align-items: center;
}
.learning-layout p {
  color: #d1dacd;
  font-size: 14px;
}
.learning-list a {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid #ffffff30;
}
.learning-list a:first-child {
  border-top: 1px solid #ffffff30;
}
.learning-list b {
  font-weight: 500;
}
.learning-list small {
  display: block;
  color: #ccd6c2;
  font-size: 11px;
}
.learning-list .arrow {
  margin-left: auto;
}
.learning-list .num {
  color: #d9e6a5;
  font-size: 12px;
}


/* ================================================================ */
/* Partner logos and footer                                         */
/* ================================================================ */
.partners {
  text-align: center;
  padding: 48px 0 60px;
}
.partners img {
  height: auto;
  display: block;
  max-width: 820px;
  width: 95%;
  margin: 28px auto 0;
  mix-blend-mode: multiply;
}
.partners .eyebrow {
  color: var(--muted);
}
footer {
  background: #e9ecdf;
  padding: 52px 5.5% 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  max-width: 1120px;
  margin: auto;
  gap: 40px;
}
.footer-brand {
  font-size: 28px;
  letter-spacing: -1px;
  font-weight: 800;
}
.footer-brand .brand-nan {
  font-weight: 500;
}
.footer-top p {
  font-size: 12px;
  color: var(--muted);
  margin: 13px 0;
}
.footer-top small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.8px;
  margin-bottom: 19px;
}
.footer-top>div>a:not(.footer-brand),
.footer-top>div>span {
  display: block;
  font-size: 12px;
  margin-bottom: 9px;
}


/* ================================================================ */
/* Inner pages: headings, filters, search                           */
/* ================================================================ */
.page-heading {
  padding: 57px 0 45px;
  border-top: 1px solid var(--line);
}
.page-heading h1 {
  max-width: 1100px;
  font-size: clamp(38px,4.6vw,62px);
}
.page-heading p {
  max-width: 690px;
  color: var(--muted);
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 28px;
}
.filter {
  border: 1px solid #bec9b6;
  border-radius: 30px;
  padding: 9px 18px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.filter[aria-pressed=true] {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.search {
  width: 100%;
  max-width: 480px;
  padding: 13px 17px;
  border: 1px solid #bcc6b5;
  border-radius: 4px;
  background: #fffdf5;
  color: var(--ink);
  margin-bottom: 12px;
}
.result-count {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}
.research-grid .card h3 {
  font-size: 21px;
}
.research-grid .card .number {
  margin-bottom: 22px;
}
.research-grid .card {
  min-height: 300px;
}
.badge {
  display: inline-block;
  background: #e8ecd9;
  color: #567039;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 10px;
  letter-spacing: .4px;
}


/* ================================================================ */
/* Research detail, callouts, learning tabs                         */
/* ================================================================ */
.article {
  max-width: 830px;
  margin: auto;
  padding: 0 5.5% 70px;
}
.article p {
  color: #4c6051;
  line-height: 1.85;
}
.article h2 {
  font-size: 30px;
  margin-top: 38px;
}
.breadcrumb {
  font-size: 12px;
  display: inline-block;
  margin-bottom: 26px;
}
.callout {
  padding: 28px;
  background: #e9eddd;
  border-left: 3px solid #79974b;
  margin: 28px 0;
}
.callout p:last-child {
  margin: 0;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
.body-copy {
  color: var(--muted);
}
.wide-image {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin: 28px 0;
}
.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.doc-link {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}
.doc-link small {
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .5px;
  color: var(--muted);
}
.doc-link:hover {
  border-color: var(--green);
}
.gallery {
  margin-bottom: 18px;
}
.gallery-frame {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  background: #e7e6dd;
  aspect-ratio: 16 / 9;
}
.gallery-slide {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease;
}
.gallery-slide.is-current {
  opacity: 1;
  visibility: visible;
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: #ffffffd9;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease;
}
.gallery-frame:hover .gallery-arrow,
.gallery-arrow:focus-visible {
  opacity: 1;
}
.gallery-arrow.prev { left: 10px; }
.gallery-arrow.next { right: 10px; }
/* Touch screens have no hover, so the arrows stay visible there. */
@media (hover:none) {
  .gallery-arrow { opacity: 1; }
}
.gallery-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 30px;
  background: #00000073;
  color: #fff;
  font-size: 11px;
  letter-spacing: .6px;
}
.gallery-dots {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.gallery-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
}
.gallery-dot.is-current {
  background: var(--green);
  transform: scale(1.3);
}
.no-scroll {
  overflow: hidden;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  background: #11170fe8;
}
.lightbox[hidden] {
  display: none;
}
.lightbox-figure {
  margin: 0;
  max-width: min(1100px, 100%);
  text-align: center;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 5px;
  display: block;
  margin: 0 auto;
}
.lightbox-figure figcaption {
  color: #ffffffcc;
  font-size: 13px;
  margin-top: 14px;
  max-width: 640px;
  margin-inline: auto;
}
.lightbox-arrow,
.lightbox-close {
  border: 0;
  border-radius: 50%;
  background: #ffffff26;
  color: #fff;
  cursor: pointer;
  flex: none;
}
.lightbox-arrow {
  width: 44px;
  height: 44px;
  font-size: 26px;
  line-height: 1;
}
.lightbox-arrow:hover,
.lightbox-close:hover {
  background: #ffffff40;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  font-size: 24px;
  line-height: 1;
}
.tabs-content {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.tabs-content h2 {
  font-size: 34px;
}
.tabs-content ul {
  padding-left: 22px;
}
.tabs-content li {
  margin-bottom: 10px;
}


/* About: keep "How we work" close to the introduction. */
.about-intro {
  padding-top: 10px;
  padding-bottom: 24px;
}
.how-we-work {
  padding-top: 24px;
}

/* Farmers & communities: the introduction with a photo on the right. */
.community-intro {
  grid-template-columns: 1.55fr 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 8px;
}
.community-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
}

/* Learning: a frame where photos will go until they are supplied. */
.photo-slot {
  margin-top: 18px;
  aspect-ratio: 16/9;
  display: grid;
  place-items: center;
  border: 1px dashed #bcc6b5;
  border-radius: 5px;
  background: #f1f2ea;
  color: var(--muted);
  font-size: 13px;
}
.split .gallery {
  margin-top: 18px;
}
.learning-centers {
  margin-top: 44px;
}


/* ================================================================ */
/* Resources: publication plan                                      */
/* ================================================================ */
.book {
  background: #e4e8d7;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 35px;
  padding: 35px;
  border-radius: 5px;
  margin-bottom: 35px;
}
.book-cover {
  background: #2d513d;
  color: var(--paper);
  min-height: 250px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 5px 6px 0 #abb69b;
}
.book-cover strong {
  font-family: Georgia,serif;
  font-size: 29px;
  line-height: 1.15;
  font-weight: 400;
}
.book-cover small {
  font-size: 9px;
  letter-spacing: 1px;
}
.book h2 {
  font-size: 32px;
}
.book p {
  font-size: 14px;
  color: var(--muted);
}
.book-intro {
  margin-bottom: 4px;
}
.resource-grid {
  grid-template-columns: repeat(2,1fr);
}
.resource-photo {
  aspect-ratio: 16/9;
}
.resource-card .number {
  margin-bottom: 14px;
}

/* Learning media page */
.topic-filters {
  display: grid;
  grid-template-columns: auto repeat(3,1fr);
  gap: 12px 20px;
  align-items: start;
  margin: 0 0 26px;
}
.topic-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.topic-group-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #738059;
  margin-bottom: 2px;
}
.media-grid {
  margin-bottom: 30px;
}
.media-thumb {
  position: relative;
}
.media-card .card-photo {
  aspect-ratio: 560/432;
}
/* Videos keep their whole frame on a dark background, with a play badge. */
.media-thumb.is-video .card-photo {
  object-fit: contain;
  background: #1d2b22;
}
.play-badge {
  position: absolute;
  left: 50%;
  top: calc(50% - 11px);
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding-left: 4px;
  background: #c4302bdd;
  color: #fff;
  font-size: 20px;
  pointer-events: none;
}
.channel-link {
  margin: -14px 0 26px;
}
.media-card h3 {
  font-size: 20px;
  margin-bottom: 4px;
}
.media-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.topic-tag {
  font-size: 10px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
}
.card .media-place {
  font-size: 12px;
  color: #738059;
  margin-bottom: 10px;
}
.text-link small {
  font-weight: 400;
  color: var(--muted);
}
details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
summary {
  font-size: 18px;
  cursor: pointer;
}
details li {
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0;
}


/* ================================================================ */
/* Team directory                                                   */
/* ================================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 15px;
}
.person {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.person h3 {
  font-size: 16px;
  margin-bottom: 7px;
}
.person p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
}
.empty {
  grid-column: 1/-1;
  padding: 35px;
  border: 1px dashed var(--line);
}
.contact-panel {
  background: #e6eadc;
  padding: 32px;
  margin-top: 50px;
  border-radius: 5px;
}
.contact-panel h2 {
  font-size: 30px;
  margin-bottom: 18px;
}
.contact-panel p {
  font-size: 14px;
}


/* ================================================================ */
/* Utilities                                                        */
/* ================================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}


/* ================================================================ */
/* Responsive layout (whole site)                                   */
/* ================================================================ */
@media (min-width:1441px) {
  .principles {
    padding-left: calc((100vw - 1280px)/2);
    padding-right: calc((100vw - 1280px)/2);
  }
}

@media (max-width:1000px) {
  nav {
    gap: 17px;
  }
  .site-header {
    padding: 0 4%;
  }
  .hero-copy {
    padding: 50px 8% 40px;
  }
  h1 {
    letter-spacing: -2px;
  }
  .grid {
    gap: 15px;
  }
  .card {
    padding: 22px;
  }
  .learning-layout {
    gap: 40px;
  }
}

@media (max-width:760px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    padding: 40px 6%;
  }
  .hero h1 {
    font-size: 53px;
    max-width: 500px;
  }
  .hero-art {
    min-height: 340px;
  }
  .hero-art>img {
    object-position: 50% 57%;
  }
  .principles {
    gap: 15px;
    padding: 23px 6%;
    grid-template-columns: 1fr;
  }
  .principles>div {
    justify-content: flex-start;
  }
  .principles small {
    display: inline;
    margin-left: 6px;
  }
  .section {
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .section-head {
    display: block;
  }
  .section-head>p {
    margin-top: 20px;
  }
  .grid,
  .team-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }
  .topic-filters {
    grid-template-columns: 1fr;
  }
  .topic-filters > .filter {
    justify-self: start;
  }
  .topic-group {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .topic-group-name {
    flex-basis: 100%;
  }
  .card .number {
    margin-bottom: 26px;
  }
  .card {
    padding: 27px;
  }
  .learning-layout,
  .split {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
  .footer-top>div:first-child {
    grid-column: 1/-1;
  }
  .page-heading {
    padding: 37px 0 22px;
  }
  .page-heading h1 {
    letter-spacing: -1.5px;
  }
  .book {
    grid-template-columns: 1fr;
    padding: 25px;
  }
  .book-cover {
    max-width: 200px;
    min-height: 270px;
  }
  .tabs-content {
    padding: 22px;
  }
  .art-caption {
    font-size: 10px;
  }
  .partners {
    padding: 35px 0;
  }
  .research-grid .card {
    min-height: 250px;
  }
}


/* ================================================================ */
/* Motion                                                           */
/* ================================================================ */
@media (prefers-reduced-motion:no-preference) {
  .button,
  .card,
  a {
    transition: background .18s,color .18s,border-color .18s;
  }
  main {
    animation: appear .25s ease-out;
  }

  @keyframes appear {
    from {
      opacity: .8;
    }
    to {
      opacity: 1;
    }
  }
}


/* ================================================================ */
/* Language switch and Thai typography                              */
/* ================================================================ */
/* The language switch stays visible alongside the mobile menu. */
.language-switch {
  display: flex;
  gap: 2px;
  border: 1px solid #bdc8b5;
  border-radius: 5px;
  padding: 3px;
  order: 3;
  flex-shrink: 0;
}
.language-switch button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 3px;
  min-height: 32px;
  min-width: 35px;
}
.language-switch button[aria-pressed=true] {
  background: var(--green);
  color: white;
}
.site-header nav {
  margin-left: auto;
  gap: 20px;
}
html[lang=th] body {
  font-family: 'Noto Sans Thai','Tahoma',sans-serif;
  line-height: 1.85;
}
html[lang=th] h1,
html[lang=th] h2,
html[lang=th] h3 {
  font-family: 'Noto Sans Thai','Tahoma',sans-serif;
  letter-spacing: 0;
  line-height: 1.45;
}
html[lang=th] h1 {
  font-size: clamp(34px,4.1vw,58px);
}
html[lang=th] .hero h1 em {
  font-family: inherit;
  font-style: normal;
  font-weight: 500;
}
html[lang=th] .eyebrow,
html[lang=th] .number,
html[lang=th] .brand small {
  letter-spacing: .4px;
}
html[lang=th] .brand small {
  font-size: 11px;
}
html[lang=th] .hero-copy>p {
  font-size: 17px;
}
html[lang=th] .book-cover strong {
  font-family: inherit;
  line-height: 1.5;
}
html[lang=th] footer p[lang=th] {
  display: none;
}


/* ================================================================ */
/* Header on tablets and phones                                     */
/* ================================================================ */
@media (max-width:1000px) {
  .site-header nav {
    gap: 12px;
    font-size: 12px;
  }
  .site-header .nav-contact {
    padding: 9px;
  }
}

@media (max-width:850px) {
  .site-header {
    height: 96px;
    gap: 10px;
  }
  .brand {
    font-size: 25px;
    gap: 12px;
  }
  .brand small {
    font-size: 8px;
    letter-spacing: 1px;
  }
  html[lang=th] .brand small {
    font-size: 9px;
  }
  .brand img {
    height: 70px;
  }
  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    padding: 7px 10px;
    background: transparent;
    border-radius: 4px;
    color: var(--ink);
    font-size: 12px;
    order: 4;
  }
  .language-switch {
    margin-left: auto;
  }
  .language-switch button {
    padding: 4px 7px;
    min-width: 30px;
  }
  .site-header nav {
    display: none;
    position: absolute;
    top: 96px;
    left: 0;
    right: 0;
    padding: 23px;
    background: var(--paper);
    z-index: 10;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 20px #203c3015;
    margin: 0;
  }
  .site-header nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .site-header nav a {
    padding: 8px;
  }
}

@media (max-width:480px) {
  .brand small {
    letter-spacing: .7px;
  }
  /* Keep the logo, language switch, and menu button within narrow phones. */
  .brand {
    font-size: 21px;
    gap: 8px;
  }
  .brand img {
    height: 54px;
  }
  .brand small {
    font-size: 7px;
  }
  .brand .brand-tagline {
    font-size: 8px;
    letter-spacing: 0;
  }
  .site-header {
    gap: 6px;
    padding: 0 4%;
  }
  .menu-toggle {
    padding: 7px;
    font-size: 11px;
    gap: 6px;
  }
  .language-switch button {
    font-size: 11px;
    padding: 3px 6px;
    min-width: 27px;
  }
  html[lang=th] .hero h1 {
    font-size: clamp(30px,8.8vw,39px);
  }
  html[lang=th] .hero h1 em {
    display: block;
  }
  html[lang=th] .principles small {
    display: block;
    margin-left: 0;
  }
  html[lang=th] .page-heading h1 {
    font-size: 35px;
  }
}


/* ================================================================ */
/* Contact panel                                                    */
/* ================================================================ */
/* "Contact us" opens the contact form in a pop-up window. */
.contact-panel h2 {
  margin-bottom: 18px;
}
.contact-panel .button {
  gap: 14px;
  font-size: 14px;
  padding: 13px 24px;
}

/* Pop-up windows (a person's bio, the contact form). */
.modal {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  border: 0;
  border-radius: 8px;
  padding: 34px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 60px #11170f40;
}
.modal::backdrop {
  background: #11170fb3;
}
.modal h2 {
  font-size: 28px;
  margin-bottom: 6px;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #e6eadc;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}
.modal-close:hover {
  background: #d9e0cc;
}
.bio {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 20px;
  padding-right: 30px;
}
.bio .avatar {
  flex-basis: 110px;
  width: 110px;
  height: 110px;
  font-size: 32px;
}
.bio-org {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.bio-text {
  color: #4c6051;
  line-height: 1.8;
  margin: 0;
}
.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #bcc6b5;
  border-radius: 4px;
  background: #fffdf5;
  color: var(--ink);
  font-weight: 400;
}
.contact-form textarea {
  resize: vertical;
}
.contact-form .button {
  justify-self: start;
  font-size: 13px;
  cursor: pointer;
}
.contact-form .button:disabled {
  opacity: .6;
  cursor: wait;
}
.form-status {
  font-size: 13px;
  color: var(--green);
  margin: 0;
  min-height: 1.4em;
}
@media (max-width:760px) {
  .modal {
    padding: 26px 22px;
  }
  .bio {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ================================================================ */
/* Team page: leader, assistants, institution groups                */
/* ================================================================ */
.team-section {
  margin-bottom: 46px;
}
.team-heading {
  font-size: 26px;
  margin-bottom: 18px;
}
.person-featured {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 18px;
  background: #fafaf4;
}
.avatar {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  background: #dfe5d2;
  display: grid;
  place-items: center;
  color: var(--green);
  font: 600 22px Manrope,Arial,sans-serif;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}
.person-lead {
  padding: 28px;
  gap: 28px;
  background: #e6eadc;
  border-color: #cfd8c4;
}
.person-lead .avatar {
  flex-basis: 132px;
  width: 132px;
  height: 132px;
  font-size: 36px;
}
.person-lead h3 {
  font-size: 22px;
}
.person-lead p {
  font-size: 14px;
}
.featured-grid {
  grid-template-columns: repeat(2,1fr);
}
/* Someone with a photo inside an institution list. */
.org-group .person-featured {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  padding: 20px 0;
  align-items: center;
}
.org-group .avatar {
  flex-basis: 52px;
  width: 52px;
  height: 52px;
  font-size: 16px;
}
/* A card whose name opens the person's bio. */
.has-bio {
  cursor: pointer;
}
.has-bio:hover {
  border-color: #879d78;
}
.person-open {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.person-more {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  border-bottom: 1px solid #9fb08f;
}
.org-group {
  margin-bottom: 34px;
}
.org-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}
.org-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Nan Community College supplies a wide wordmark; show only its emblem. */
.org-logo[src$="nan-community-college.png"] {
  object-fit: cover;
  object-position: left center;
}
.org-logo-text {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfe5d2;
  color: var(--green);
  font: 700 16px Manrope,Arial,sans-serif;
}
.org-head h3 {
  margin: 0;
  font-size: 19px;
}

@media (max-width:760px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .person-lead {
    flex-direction: column;
    padding: 22px;
  }
  .person-lead .avatar {
    width: 110px;
    height: 110px;
    flex-basis: 110px;
  }
}


/* ================================================================ */
/* Back link                                                        */
/* ================================================================ */
.page-back {
  display: flex;
  justify-content: center;
  padding: 10px 5.5% 60px;
}
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  border-bottom: 1px solid #849277;
  padding: 4px 2px;
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
}
.back-button:hover {
  color: #68843a;
  border-color: #68843a;
}
