/* region accents for the directory filter chips */
[data-region="north-america"]        { --acc: #a3200f; }
[data-region="latin-america"]        { --acc: #e2741a; }
[data-region="europe"]               { --acc: #2b5fa8; }
[data-region="asia"]                 { --acc: #1c6f66; }
[data-region="pacific"]              { --acc: #cf9426; }
[data-region="middle-east---africa"] { --acc: #6e1812; }

/* ==========================================================================
   The Wider World, and the centre directory
   ========================================================================== */

.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.stat {
  background: var(--paper); border: 1px solid var(--rule-soft);
  border-top: 3px solid var(--saffron); border-radius: 12px; padding: 1.1rem 1.2rem;
}
.stat b { display: block; font-family: var(--f-display); font-size: clamp(1.6rem,1.2rem+1.2vw,2.2rem); line-height: 1; color: var(--red); font-weight: 500; }
.stat span { display: block; margin-top: .45rem; font-size: .8rem; line-height: 1.4; color: var(--tx-soft); }

/* teachers */
.teachers {
  display: grid; gap: clamp(.8rem, 1.6vw, 1.2rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}
.teacher {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.11);
  border-radius: 14px; padding: 1.3rem 1.4rem;
  display: flex; flex-direction: column;
  transition: background-color .3s, border-color .3s;
}
.teacher:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.teacher__head { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; justify-content: space-between; }
.teacher h3 { font-size: 1.14rem; margin: 0 0 .2rem; color: #fff; line-height: 1.25; }
.teacher__dates { font-size: .74rem; color: var(--gold-lt); white-space: nowrap; }
.teacher__role {
  font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 600;
  color: rgba(244,236,224,.5); margin: 0 0 .9rem; max-width: none;
}
.teacher__text { font-size: .88rem; line-height: 1.65; color: rgba(244,236,224,.8); max-width: none; flex: 1; }
.teacher__link {
  display: inline-flex; align-items: center; gap: .45rem; margin-top: .6rem;
  font-size: .8rem; font-weight: 600; color: var(--gold-lt); text-decoration: none;
}
.teacher__link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* monasteries */
.mons { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.mon {
  display: grid; gap: .6rem 2.5rem; padding: clamp(1.4rem,2.5vw,2rem) 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 860px) { .mon { grid-template-columns: 18rem 1fr; } }
.mon h3 { font-size: 1.3rem; margin: 0 0 .3rem; }
.mon h3 .tib { font-size: .72em; color: var(--saffron); margin-left: .35em; }
.mon__founded { font-size: .82rem; color: var(--tx-faint); margin: 0; max-width: none; }
.mon__body p { font-size: .93rem; line-height: 1.65; color: var(--tx-soft); max-width: none; }
.mon__exile {
  font-size: .88rem; color: var(--tx); margin-bottom: .7rem;
  border-left: 2px solid var(--red); padding-left: .85rem;
}
.mon__exile span {
  display: block; font-size: .6rem; letter-spacing: .17em; text-transform: uppercase;
  color: var(--tx-faint); margin-bottom: .1rem;
}
.mon__link {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .8rem; font-weight: 600; color: var(--red); text-decoration: none;
}
.mon__link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* resource columns */
.rescols {
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.rescol h3 {
  font-family: var(--f-body); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--red); margin: 0 0 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--rule);
}
.rescol ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.rescol li { display: grid; gap: .2rem; }
/* These are outbound links, so they have to look like links without being
   hovered: accent colour, a standing underline, and an arrow marking that the
   link leaves the site. */
.rescol a { text-decoration: none; display: inline-flex; align-items: baseline; gap: .35rem; }
.rescol a b {
  font-family: var(--f-display); font-size: 1.03rem; font-weight: 500;
  color: var(--red); transition: color .2s;
  text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: rgba(163, 32, 15, .38); text-underline-offset: 3px;
}
.rescol a::after {
  content: "\2197";           /* north-east arrow: this link leaves the site */
  font-size: .82em; line-height: 1; color: var(--red);
  opacity: .55; transition: opacity .2s, transform .2s;
}
.rescol a:hover b, .rescol a:focus-visible b {
  color: var(--maroon); text-decoration-color: currentColor;
}
.rescol a:hover::after, .rescol a:focus-visible::after { opacity: 1; transform: translate(1px, -1px); }
@media (prefers-reduced-motion: reduce) { .rescol a::after { transition: none; } }
.rescol span { font-size: .85rem; line-height: 1.55; color: var(--tx-soft); }

/* ---------- centre directory --------------------------------------------- */

.jumpbox { border: 1px solid var(--rule); border-radius: 11px; background: var(--paper); }
.jumpbox summary {
  list-style: none; cursor: pointer; padding: .85rem 1.1rem;
  font-size: .84rem; font-weight: 600; color: var(--red);
  display: flex; align-items: center; gap: .5rem;
}
.jumpbox summary::-webkit-details-marker { display: none; }
.jumpbox summary::after {
  content: ""; width: 6px; height: 6px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-1px); transition: transform .3s var(--ease);
}
.jumpbox[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.jump { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 1.1rem 1.1rem; }
.jump a {
  font-size: .8rem; text-decoration: none; color: var(--tx-soft);
  border: 1px solid var(--rule); border-radius: 999px; padding: .3rem .75rem;
  transition: background-color .2s, color .2s;
}
.jump a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.country { margin-bottom: clamp(2rem, 4vw, 3.2rem); scroll-margin-top: 7rem; }
.country.is-hidden { display: none; }
.country__head {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule); padding-bottom: .7rem; margin-bottom: 1.1rem;
}
.country__head h3 { font-size: clamp(1.3rem,1.1rem+.8vw,1.75rem); margin: 0; }
.country__head h3 span {
  font-family: var(--f-body); font-size: .68rem; font-weight: 600; color: var(--tx-faint);
  vertical-align: middle; margin-left: .5rem;
  background: var(--ground-2); border-radius: 999px; padding: .2rem .55rem;
}
.country__head a { font-size: .78rem; color: var(--red); text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.country__head a:hover { text-decoration: underline; text-underline-offset: 3px; }

.centres {
  display: grid; gap: .7rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
}
.centre {
  background: var(--paper); border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--gold); border-radius: 11px; padding: .95rem 1.1rem;
  transition: box-shadow .25s, border-color .25s;
}
.centre:hover { border-color: var(--rule); box-shadow: 0 16px 36px -30px rgba(43,26,18,.55); }
.centre.is-hidden { display: none; }
.centre h4 { font-family: var(--f-display); font-size: 1.02rem; font-weight: 500; margin: 0 0 .2rem; line-height: 1.25; }
.centre__place { font-size: .76rem; letter-spacing: .04em; color: var(--red); margin: 0 0 .5rem; max-width: none; }
.centre__addr { font-size: .83rem; line-height: 1.5; color: var(--tx-soft); margin: 0 0 .45rem; max-width: none; }
.centre__meta { font-size: .77rem; line-height: 1.6; color: var(--tx-faint); margin: 0; max-width: none; overflow-wrap: anywhere; }
.centre__meta a { color: var(--tx-soft); text-decoration: none; }
.centre__meta a:hover { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }

.hubgrid {
  display: grid; gap: .8rem; margin-top: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.hub {
  display: block; text-decoration: none; color: inherit;
  background: var(--paper); border: 1px solid var(--rule-soft);
  border-top: 3px solid var(--red); border-radius: 12px; padding: 1.1rem 1.2rem;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.hub:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -30px rgba(43,26,18,.55); }
.hub b { display: block; font-family: var(--f-display); font-size: 1.1rem; font-weight: 500; margin-bottom: .3rem; }
.hub span { font-size: .85rem; line-height: 1.55; color: var(--tx-soft); }
