/* ==========================================================================
   STYLE.CSS
   The design of the website. Colors and fonts are set in content.js
   (theme), so you don't need to edit this file.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --soft: #f6f8fb;
  --text: #152034;
  --muted: #667085;
  --line: #e6e9ef;
  --accent: #2558e5;
  --accent-dark: #173fae;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, #ffffff);
  --navy: #101b32;
  --green: #168267;
  --max: 1120px;
  --radius: 16px;
  --shadow: 0 18px 45px rgba(18, 32, 55, .08);
  --card-shadow: 0 12px 28px rgba(16, 24, 40, .06);
  --font: "Inter";
  --heading-font: "Inter Tight";
  --fallback: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---- Base --------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font), var(--fallback);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; }
.container { width: min(calc(100% - 2.5rem), var(--max)); margin: auto; }
h1, h2, h3 { font-family: var(--heading-font), var(--font), var(--fallback); line-height: 1.15; letter-spacing: -.035em; }
h1 { font-size: clamp(2.6rem, 5.8vw, 4.7rem); margin: .85rem 0 1.1rem; }
h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); }
h3 { font-size: 1.15rem; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 3px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
#app { min-height: 100vh; display: flex; flex-direction: column; }
#app > main { flex: 1; }
.skip-link { position: absolute; left: -9999px; top: .6rem; z-index: 100; padding: .55rem .8rem; border-radius: 8px; background: #fff; box-shadow: var(--shadow); font-weight: 700; }
.skip-link:focus { left: .6rem; }

/* ---- Header ------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nav__brand { font-family: var(--heading-font), var(--font), var(--fallback); font-weight: 800; color: var(--text); letter-spacing: -.025em; }
.nav__brand:hover { color: var(--text); }
.nav__links { display: flex; align-items: center; gap: 1.4rem; font-size: .9rem; font-weight: 600; }
.nav__links > a, .more-menu > summary { color: #3e495c; cursor: pointer; list-style: none; }
.nav__links > a:hover, .more-menu > summary:hover, .nav__links > a[aria-current="page"], .more-menu > summary.is-current { color: var(--accent); }
.more-menu { position: relative; }
.more-menu > summary { display: inline-flex; align-items: center; gap: .2rem; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu > summary svg { width: 15px; height: 15px; transition: transform .18s ease; }
.more-menu[open] > summary svg { transform: rotate(180deg); }
.more-menu__panel { position: absolute; z-index: 40; right: 0; top: calc(100% + .8rem); width: 340px; max-width: calc(100vw - 1.5rem); padding: .45rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 22px 50px rgba(16, 27, 50, .16); display: grid; gap: .1rem; }
.more-menu[open] .more-menu__panel { animation: menu-in .16s ease; }
/* covers the gap under "More", so the mouse can travel to the menu without closing it */
.more-menu__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -.9rem; height: .9rem; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.more-link { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: .75rem; align-items: center; padding: .5rem .55rem; border-radius: 10px; color: var(--text); }
.more-link__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.more-link__icon svg { width: 20px; height: 20px; }
.more-link__label { display: block; font-size: .9rem; font-weight: 700; line-height: 1.3; }
.more-link__hint { display: block; margin-top: .1rem; color: var(--muted); font-size: .78rem; font-weight: 500; line-height: 1.35; }
.more-link:hover, .more-link:focus-visible, .more-link[aria-current="page"] { background: var(--soft); color: var(--text); }
.more-link:hover .more-link__label, .more-link[aria-current="page"] .more-link__label { color: var(--accent); }

/* ---- Labels and buttons -------------------------------------------------- */
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--green); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .72rem 1rem; border-radius: 9px; font-size: .9rem; font-weight: 800; border: 1px solid var(--line); color: var(--text); background: #fff; }
.btn:hover { border-color: color-mix(in srgb, var(--accent) 35%, #ffffff); color: var(--accent); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn--pill { border-radius: 999px; }
button.btn { font-family: inherit; cursor: pointer; }
button.btn[disabled] { opacity: .65; cursor: progress; }
.text-link { display: inline-flex; margin-top: 1.25rem; font-size: .88rem; font-weight: 800; }
.pill { display: inline-block; margin: 0 0 .9rem; padding: .28rem .75rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: .8rem; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.chip { display: inline-flex; align-items: center; padding: .22rem .65rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font-size: .76rem; font-weight: 700; line-height: 1.5; }
.chip:hover { border-color: color-mix(in srgb, var(--accent) 40%, #ffffff); color: var(--accent); }
.chip svg { width: 13px; height: 13px; margin-right: .3rem; flex: none; }
.tag { display: inline-block; padding: .16rem .55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: .72rem; font-weight: 800; }
.tone-0 { background: #e9f0ff; color: #1d4ed8; }
.tone-1 { background: #fff4df; color: #945400; }
.tone-2 { background: #e2f6ee; color: #0e6a4d; }
.tone-3 { background: #ffebe2; color: #a3431a; }
.tone-4 { background: #f1eaff; color: #6a3dbd; }

/* ---- Home: top section ---------------------------------------------------- */
.hero { padding: 4.5rem 0 3.2rem; }
.hero-grid { display: grid; grid-template-columns: 1fr 300px; gap: 4.5rem; align-items: center; }
.hero-lead { max-width: 760px; color: var(--muted); font-size: 1.1rem; margin: 0 0 1.6rem; }
.portrait { width: 300px; aspect-ratio: 1; object-fit: cover; border-radius: 24px; box-shadow: 18px 18px 0 #edf1f8; }

/* ---- Home: credentials strip ---------------------------------------------- */
.credentials { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.credential-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); padding: 1.35rem 0; }
.credential { padding: 0 1.35rem; border-right: 1px solid var(--line); }
.credential:first-child { padding-left: 0; }
.credential:last-child { border-right: 0; }
.credential strong, .credential span { display: block; }
.credential strong { font-size: .9rem; }
.credential span { font-size: .78rem; color: var(--muted); margin-top: .15rem; }

/* ---- Sections ------------------------------------------------------------- */
.section { padding: 4.5rem 0; }
.section--soft { background: var(--soft); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 1.7rem; }
.section-head h2, .section-head p { margin: 0; }
.section-head p { max-width: 590px; color: var(--muted); }

/* ---- Project cards ---------------------------------------------------------- */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.project-card { border-top: 3px solid var(--accent); padding: 1.25rem 0 0; display: flex; flex-direction: column; }
.project-card .label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.project-card h3 { margin: .75rem 0 .45rem; }
.project-card p { color: var(--muted); font-size: .9rem; margin: 0 0 .9rem; }
.links { margin-top: auto; display: flex; flex-wrap: wrap; gap: .8rem; font-size: .82rem; font-weight: 800; }
.project-card--visual { padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 10px 26px rgba(18, 32, 55, .055); transition: transform .2s ease, box-shadow .2s ease; }
.project-card--visual:hover { transform: translateY(-3px); box-shadow: 0 15px 34px rgba(18, 32, 55, .09); }
.project-thumb { display: block; width: 100%; height: 126px; object-fit: cover; border-bottom: 1px solid var(--line); }
.project-card__body { display: flex; flex: 1; flex-direction: column; padding: 1rem 1.05rem 1.05rem; }

/* ---- Dark banner -------------------------------------------------------------- */
.strip { background: var(--navy); color: #fff; border-radius: 18px; padding: 2.2rem 2.5rem; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.strip h2 { margin: 0 0 .5rem; color: #fff; }
.strip p { margin: 0; color: #cbd5e5; max-width: 760px; }
.strip .btn { white-space: nowrap; }

/* ---- Updates list ----------------------------------------------------------- */
.update-list { border-top: 1px solid var(--line); }
.update { display: grid; grid-template-columns: 145px 1fr; gap: 1.5rem; padding: 1.05rem 0; border-bottom: 1px solid var(--line); }
.update__date { color: var(--muted); font-size: .82rem; font-weight: 700; }
.update p { margin: 0; font-weight: 600; }
.update__more { margin-left: .35rem; font-size: .82rem; font-weight: 700; white-space: nowrap; }

/* ---- Footer ------------------------------------------------------------------ */
.footer { padding: 2rem 0; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }
.footer-row { display: flex; justify-content: space-between; gap: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; font-weight: 700; }
.footer-links a { color: var(--text); }
.footer-links a:hover { color: var(--accent); }
.footer-settings { padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.footer-settings:hover { color: var(--accent); }

/* ---- Pages in the "More" menu (built from sections) ------------------------------ */
.empty-note { display: flex; align-items: center; gap: .7rem; max-width: 640px; margin: 0; padding: 1.05rem 1.2rem; border: 1px dashed color-mix(in srgb, var(--text) 20%, #ffffff); border-radius: 14px; background: #fff; color: var(--muted); font-size: .92rem; font-weight: 600; }
.empty-note svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.chip--static:hover { border-color: var(--line); color: var(--text); }
.section-prose { max-width: 760px; margin: 0; }
.section-prose ul { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--muted); }
.section-prose li + li { margin-top: .3rem; }

.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.tile-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--card-shadow); }
.tile__media { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #10213a; border-bottom: 1px solid var(--line); }
.tile__media--full { height: auto; aspect-ratio: auto; object-fit: contain; background: none; }
.tile__body { display: flex; flex: 1; flex-direction: column; padding: 1.15rem 1.2rem 1.2rem; }
.tile__icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: .9rem; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.tile__icon svg { width: 24px; height: 24px; }
.tile__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin-bottom: .45rem; color: var(--muted); font-size: .78rem; font-weight: 700; }
.tile__meta .mini-label { margin: 0; }
.tile h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; letter-spacing: -.015em; }
.tile__text p { margin: .4rem 0 0; color: var(--muted); font-size: .9rem; }
.tile__facts { display: grid; gap: .35rem; margin: .85rem 0 0; font-size: .84rem; }
.tile__facts div { display: flex; gap: .6rem; }
.tile__facts dt { min-width: 92px; color: var(--muted); font-weight: 600; }
.tile__facts dd { margin: 0; font-weight: 700; }
.tile__notes { display: grid; gap: .7rem; margin-top: .85rem; }
.tile__note h4 { margin: 0 0 .2rem; color: var(--accent-dark); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tile__note p { margin: 0; color: var(--muted); font-size: .9rem; }
.tile .chips { margin-top: .95rem; }
.tile__links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: auto; padding-top: 1rem; font-size: .84rem; font-weight: 800; }

.country-stats { display: flex; gap: 2.2rem; margin: 0 0 1.5rem; }
.country-stats p { margin: 0; }
.country-stats strong { display: block; font-size: 2.2rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.country-stats span { display: block; margin-top: .3rem; color: var(--muted); font-size: .82rem; font-weight: 700; }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.country { display: flex; flex-direction: column; min-width: 0; padding: 1.15rem 1.2rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--card-shadow); }
.country__top { display: flex; align-items: center; gap: .9rem; }
.country__head { min-width: 0; }
.country__head h3 { margin: 0; font-size: 1.1rem; letter-spacing: -.015em; }
.country__when { margin: .15rem 0 0; color: var(--muted); font-size: .8rem; font-weight: 700; }
.country__top .tag { margin-left: auto; align-self: flex-start; }
.flag-emoji { font-size: 2.4rem; line-height: 1; }
.flag-code { display: grid; place-items: center; flex: none; width: 48px; height: 34px; border-radius: 7px; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.country__cities { display: flex; align-items: flex-start; gap: .4rem; margin: .95rem 0 0; font-size: .9rem; font-weight: 700; }
.country__cities svg { width: 16px; height: 16px; flex: none; margin-top: .18rem; color: var(--accent); }
.country__text p { margin: .5rem 0 0; color: var(--muted); font-size: .88rem; }

.letter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.letter-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 1.15rem; padding: 1.15rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--card-shadow); }
.letter-card__thumb { display: grid; place-items: center; align-self: start; aspect-ratio: 1 / 1.414; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--accent); }
.letter-card__thumb svg { width: 34px; height: 34px; }
.letter-card__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.letter-card__body { display: flex; flex-direction: column; min-width: 0; }
.letter-card h3 { margin: 0; font-size: 1.05rem; letter-spacing: -.015em; }
.letter-card__role { margin: .2rem 0 0; color: var(--muted); font-size: .86rem; }
.letter-card__relation { margin: .35rem 0 0; font-size: .86rem; font-weight: 600; }
.letter-card blockquote { margin: .8rem 0 0; padding-left: .85rem; border-left: 3px solid color-mix(in srgb, var(--accent) 30%, #ffffff); font-size: .92rem; font-style: italic; }
.letter-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: auto; padding-top: .9rem; color: var(--muted); font-size: .8rem; font-weight: 700; }
.letter-card__link { font-size: .86rem; font-weight: 800; }

.learn-group + .learn-group { margin-top: 2.2rem; }
.learn-group__head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; margin-bottom: .95rem; }
.learn-group__head h3 { margin: 0; font-size: 1.1rem; letter-spacing: -.015em; }
.learn-group__head p { flex-basis: 100%; margin: 0; color: var(--muted); font-size: .9rem; }
.learn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.learn-card { display: flex; flex-direction: column; min-width: 0; padding: 1.05rem 1.15rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--card-shadow); }
.learn-card__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .7rem; margin-bottom: .35rem; color: var(--muted); font-size: .78rem; font-weight: 700; }
.learn-card h4 { margin: 0; font-size: 1rem; line-height: 1.35; letter-spacing: -.01em; }
.learn-card__text { margin: .35rem 0 0; color: var(--muted); font-size: .88rem; }
.learn-card__label { margin: .85rem 0 .3rem; color: var(--accent-dark); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.learn-card ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: .88rem; }
.learn-card li { margin: .28rem 0; }
.learn-card .tile__links { padding-top: .85rem; }

.notes { display: grid; gap: 1rem; max-width: 760px; }
.note { padding: 1.2rem 1.35rem 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--card-shadow); }
.note__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; color: var(--muted); font-size: .8rem; font-weight: 700; }
.note__title { margin: .45rem 0 0; font-size: 1.15rem; letter-spacing: -.02em; }
.note__body { margin-top: .55rem; }
.note__body p { margin: 0 0 .75rem; }
.note__body > :last-child { margin-bottom: 0; }
.note__more { margin-top: .75rem; }
.note__more > summary { display: inline-flex; align-items: center; gap: .3rem; color: var(--accent); font-size: .86rem; font-weight: 800; cursor: pointer; list-style: none; }
.note__more > summary::-webkit-details-marker { display: none; }
.note__more > summary svg { width: 15px; height: 15px; transition: transform .18s ease; }
.note__more[open] > summary svg { transform: rotate(180deg); }
.note__more .note__close, .note__more[open] .note__open { display: none; }
.note__more[open] .note__close { display: inline; }

/* ---- Privacy popup (visitor log) ------------------------------------------------ */
.consent { position: fixed; left: 1.25rem; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 50; width: min(430px, calc(100vw - 2.5rem)); max-height: calc(100dvh - 2.5rem); overflow-y: auto; overscroll-behavior: contain; padding: 1.15rem 1.2rem 1.05rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--text); box-shadow: 0 24px 64px rgba(16, 27, 50, .22); opacity: 0; transform: translateY(12px); transition: opacity .22s ease, transform .22s ease; }
.consent.is-shown { opacity: 1; transform: none; }
.consent[hidden] { display: none; }
.consent .consent__title { margin: 0 0 .4rem; font-family: var(--font), var(--fallback); font-size: 1.02rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.consent .consent__title:focus { outline: none; }
.consent__text { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.consent__details { margin-top: .7rem; font-size: .82rem; line-height: 1.55; }
.consent__details summary { width: fit-content; color: var(--accent); font-weight: 700; cursor: pointer; }
.consent__details ul { margin: .55rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.consent__details li { margin: .4rem 0; }
.consent__details strong { color: var(--text); }
.consent__status, .consent__preview { margin: .75rem 0 0; color: var(--muted); font-size: .78rem; }
.consent__preview { padding: .45rem .65rem; border-radius: 8px; background: var(--soft); }
.consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; }
.consent__btn { width: 100%; border-color: color-mix(in srgb, var(--text) 24%, #ffffff); }

/* ---- Inner pages: title area and blocks --------------------------------------- */
.page-hero { padding: 4rem 0 2.3rem; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 4rem); margin: .7rem 0 .7rem; }
.page-hero p { max-width: 780px; color: var(--muted); font-size: 1.05rem; margin: 0; }
.page-hero .actions { margin-top: 1.4rem; }
.content-section { padding: 3.3rem 0; }
.prose { max-width: 850px; margin: 0 auto; }
.prose p { color: var(--muted); }
.interest-grid, .workplace-grid, .content-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.info-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: #fff; }
.info-card h2 { font-size: 1.35rem; margin: .1rem 0 .6rem; }
.info-card h3 { margin: .1rem 0 .45rem; }
.info-card p { margin: 0 0 .7rem; color: var(--muted); font-size: .9rem; }
.info-card p:last-child { margin-bottom: 0; }
.info-card .btn { margin-top: .6rem; }
.workplace-card { position: relative; display: block; min-height: 245px; overflow: hidden; border-radius: var(--radius); color: #fff; }
.workplace-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.workplace-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 25%, rgba(8, 14, 26, .88)); }
.workplace-copy { position: absolute; z-index: 1; left: 1.2rem; right: 1.2rem; bottom: 1.1rem; }
.workplace-copy strong, .workplace-copy span { display: block; }
.workplace-copy span { font-size: .84rem; color: #e4eaf5; }
.workplace-card:hover { color: #fff; }
.credit { font-size: .75rem; color: var(--muted); margin-top: .7rem; }
.grant-list, .service-list, .news-list, .apply-list { margin: 0; padding-left: 1.2rem; }
.grant-list li, .news-list li, .service-list li, .apply-list li { margin: .8rem 0; }
.apply-list li { color: var(--muted); font-size: .9rem; margin: .45rem 0; }
.grant-title { font-weight: 800; color: var(--text); }
.service-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.service-columns--3 { grid-template-columns: .8fr 1.35fr 1fr; }
.service-column { border-top: 3px solid var(--accent); padding-top: 1rem; }
.service-column h2 { font-size: 1.25rem; margin: 0 0 .7rem; }
.cta { background: var(--navy); color: #fff; border-radius: 18px; padding: 2rem; }
.cta h2 { color: #fff; margin-top: 0; }
.cta p { color: #cbd5e5; }

/* ---- Publications --------------------------------------------------------------- */
.pub-featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.pub-feature { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--card-shadow); }
.pub-feature .venue { display: inline-block; padding: .14rem .5rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: .7rem; font-weight: 800; }
.pub-feature strong { display: block; margin: .55rem 0 .25rem; }
.pub-feature p { margin: 0; color: var(--muted); font-size: .86rem; }
.pub-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1.1rem; }
.pub-search { flex: 1 1 280px; min-width: 0; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font: inherit; font-size: .9rem; }
.pub-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.pub-filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip-btn { padding: .55rem .95rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.chip-btn:hover { border-color: color-mix(in srgb, var(--accent) 40%, #ffffff); }
.chip-btn.is-active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, #ffffff); color: var(--accent-dark); }
.no-results { color: var(--muted); font-weight: 600; }
.topic-grid { columns: 2 380px; column-gap: 1rem; }
.topic-card { break-inside: avoid; margin: 0 0 1rem; padding: 1rem 1.1rem .4rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--card-shadow); }
.topic-title { display: inline-block; margin: 0 0 .4rem; padding: .25rem .75rem; border-radius: 999px; font-size: .82rem; letter-spacing: 0; font-family: var(--font), var(--fallback); font-weight: 800; }
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-item { display: grid; grid-template-columns: 88px 1fr; gap: .9rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.pub-item:last-child { border-bottom: 0; }
.pub-thumb { width: 88px; height: 58px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.pub-body { min-width: 0; grid-column: 2; }
.pub-item > .pub-body:first-child { grid-column: 1 / -1; }
.pub-title { margin: 0; font-weight: 700; font-size: .92rem; line-height: 1.4; color: var(--text); }
.pub-authors { margin: .2rem 0 0; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.pub-authors strong { color: var(--text); }
.pub-meta { margin: .2rem 0 0; font-size: .8rem; color: var(--muted); }

/* ---- People --------------------------------------------------------------------- */
.strip--stack { display: block; position: relative; overflow: hidden; margin-bottom: 1.4rem; background: linear-gradient(135deg, var(--accent) 0%, #7048e8 55%, #e64980 100%); box-shadow: 0 14px 34px rgba(79, 70, 229, .25); }
.strip--stack::after { content: ""; position: absolute; width: 180px; height: 180px; right: -65px; top: -95px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.strip--stack > * { position: relative; }
.strip--stack p { margin-bottom: 1.1rem; color: rgba(255, 255, 255, .92); }
.strip--stack .btn { border-color: #fff; }
.jump-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; }
.jump-chips .chip { padding: .45rem .85rem; font-size: .8rem; }
.group-title { margin: 1.4rem 0 .8rem; font-size: 1.1rem; letter-spacing: -.01em; }
.person-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.person { display: grid; grid-template-columns: 52px 1fr; gap: .85rem; align-items: start; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--card-shadow); }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.avatar--initials { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; font-size: .9rem; }
.person h3 { margin: 0; font-size: 1rem; letter-spacing: -.01em; }
.person__role { margin: .15rem 0 0; font-size: .82rem; color: var(--muted); line-height: 1.45; }
.person__status { margin: .45rem 0 0; font-size: .86rem; line-height: 1.5; }
.person__area { margin: .35rem 0 0; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.alumni { margin: 1rem 0 1.6rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--card-shadow); }
.alumni > summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem 1.15rem; cursor: pointer; list-style: none; }
.alumni > summary::-webkit-details-marker { display: none; }
.alumni__title { font-weight: 800; }
.alumni__toggle { color: var(--accent); font-size: .82rem; font-weight: 800; }
.alumni__hide, .alumni[open] .alumni__show { display: none; }
.alumni[open] .alumni__hide { display: inline; }
.alumni-list { margin: 0; padding: 0 1.15rem 1rem; list-style: none; border-top: 1px solid var(--line); }
.alumni-list li { display: flex; flex-wrap: wrap; gap: .2rem .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.alumni-list li:last-child { border-bottom: 0; }
.alumni-list span { color: var(--muted); }

/* ---- Consulting ------------------------------------------------------------------- */
.page-consulting { background: var(--soft); }
.lang-bar { background: #fff; border-bottom: 1px solid var(--line); }
.languages { min-height: 46px; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .45rem; }
.language-label { margin-right: .25rem; color: var(--muted); font-size: .8rem; }
.language-link { padding: .3rem .62rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: .78rem; font-weight: 700; }
.language-link.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 42px rgba(16, 24, 40, .08); }
.consult-hero { padding: 2.5rem 0 1.1rem; }
.consult-hero__grid { display: grid; grid-template-columns: 1.45fr .55fr; gap: 1.2rem; align-items: stretch; }
.consult-intro { padding: clamp(1.35rem, 3vw, 2.6rem); background: radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--accent) 16%, #ffffff) 0, transparent 35%), #fff; }
.consult-intro h1 { font-size: clamp(2rem, 4.3vw, 3.7rem); margin: .85rem 0 .8rem; max-width: 900px; }
.consult-intro .hero-lead { font-size: clamp(1rem, 1.4vw, 1.18rem); max-width: 780px; margin: 0; }
.consult-intro .actions { margin-top: 1.25rem; }
.kicker { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 4px rgba(34, 160, 107, .12); }
.small-note { margin: .9rem 0 0; color: var(--muted); font-size: .78rem; }
.profile-card { padding: 1.3rem; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.profile-card__photo { width: 172px; height: 172px; margin: 0 auto .9rem; object-fit: cover; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 10px 28px rgba(17, 29, 54, .16); }
.profile-card h2 { margin: 0; font-size: 1.3rem; }
.profile-card p { margin: .35rem 0 .85rem; color: var(--muted); font-size: .88rem; }
.availability { align-self: center; display: inline-block; padding: .32rem .65rem; border-radius: 999px; background: #ecfdf3; color: #0f766e; font-size: .76rem; font-weight: 800; }
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-top: 1rem; }
.trust-item { padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.trust-item strong { display: block; font-size: .88rem; }
.trust-item span { display: block; margin-top: .12rem; color: var(--muted); font-size: .75rem; }
.consult-section { padding: .75rem 0; }
.consult-section:last-child { padding-bottom: 3rem; }
.panel { padding: clamp(1.15rem, 2.5vw, 2rem); background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 42px rgba(16, 24, 40, .08); }
.panel .section-head { margin-bottom: 1rem; }
.panel .section-head h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.service-grid, .card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.service-card, .mini-card { padding: 1rem 1.05rem; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfe; }
.service-icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: .75rem; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.service-icon svg { width: 20px; height: 20px; }
.service-card h3, .mini-card h3 { margin: .1rem 0 .35rem; font-size: 1rem; letter-spacing: -.015em; }
.service-card p, .mini-card p { margin: 0; color: var(--muted); font-size: .87rem; }
.mini-card { display: flex; flex-direction: column; }
.mini-card .tag { align-self: flex-start; margin-bottom: .55rem; }
.mini-card .place { color: var(--accent); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.mini-card__use { margin-top: .6rem !important; color: var(--text) !important; }
.mini-card .links { margin-top: auto; padding-top: .8rem; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin: 0; padding: 0; list-style: none; }
.step { padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfe; }
.step__num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 800; }
.step h3 { margin: .65rem 0 .3rem; font-size: 1rem; letter-spacing: -.015em; }
.step p { margin: 0; color: var(--muted); font-size: .86rem; }
.contact-panel { padding: clamp(1.4rem, 3vw, 2.2rem); border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--navy), color-mix(in srgb, var(--navy) 72%, var(--accent))); }
.contact-panel h2 { margin: 0 0 .7rem; color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.contact-panel p { max-width: 720px; margin: 0 0 1.2rem; color: #cbd5e5; }
.contact-panel .btn:not(.btn--primary) { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
.contact-panel .btn:not(.btn--primary):hover { border-color: #fff; }

/* ---- Talks ------------------------------------------------------------------------- */
.year-block { margin-bottom: 1.4rem; }
.year-pill { display: inline-block; margin: 0 0 .65rem; padding: .28rem .7rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-family: var(--font), var(--fallback); font-size: .88rem; letter-spacing: 0; font-weight: 800; }
.talk-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--card-shadow); }
.talk { display: grid; grid-template-columns: 42px 1fr auto; gap: .8rem; align-items: center; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.talk:last-child { border-bottom: 0; }
.badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: .68rem; font-weight: 800; }
.talk__title { margin: 0; font-family: var(--font), var(--fallback); font-size: .95rem; letter-spacing: 0; line-height: 1.4; }
.talk__host { margin: .1rem 0 0; color: var(--muted); font-size: .84rem; }
.talk .chips { margin-top: .4rem; }
.talk__date { color: var(--muted); font-size: .82rem; white-space: nowrap; }

/* ---- Teaching ------------------------------------------------------------------------ */
.course { margin-bottom: 1rem; padding: 1.15rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--card-shadow); }
.course__title { margin: 0 0 .3rem; font-family: var(--font), var(--fallback); font-size: 1.02rem; letter-spacing: 0; line-height: 1.4; }
.course__meta { margin: 0 0 .5rem; color: var(--muted); font-size: .85rem; }
.course__text p { margin: 0 0 .5rem; color: var(--muted); font-size: .92rem; }
.weeks { display: grid; gap: .5rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.week { display: grid; grid-template-columns: 80px 1fr; column-gap: .6rem; align-items: baseline; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 10px; font-size: .88rem; }
.week .chips { grid-column: 2; margin-top: .3rem; }

/* ---- Writing -------------------------------------------------------------------------- */
.post-list { display: grid; gap: 1rem; }
.post { display: grid; grid-template-columns: 180px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--card-shadow); }
.post__media { display: grid; place-items: center; min-height: 160px; background: var(--accent-soft); color: var(--accent-dark); }
.post__media:hover { color: var(--accent-dark); }
.post__img { width: 100%; height: 100%; object-fit: cover; }
.post__tile { padding: 1rem; font-size: 1.05rem; font-weight: 800; text-align: center; }
.post__body { padding: 1.05rem 1.2rem; }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; color: var(--muted); font-size: .8rem; }
.post__meta > span:first-child:not(.tag) { margin-right: .15rem; }
.post__title { margin: .55rem 0 .3rem; font-family: var(--font), var(--fallback); font-size: 1.1rem; letter-spacing: -.01em; line-height: 1.35; }
.post__title a { color: var(--text); }
.post__title a:hover { color: var(--accent); }
.post__body > p { margin: 0; color: var(--muted); font-size: .92rem; }
.post__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-top: .75rem; }
.post__read { font-weight: 800; }
.post__info { color: var(--muted); font-size: .8rem; }
.share { display: flex; gap: .35rem; margin-left: auto; }
.share__btn { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: .72rem; font-weight: 800; }
.share__btn:hover { border-color: var(--accent); color: var(--accent); }
.page-article { background: var(--soft); }
.article-wrap { padding: 2rem 0 3.5rem; }
.article { max-width: 780px; margin: 0 auto; padding: clamp(1.3rem, 3.5vw, 2.4rem); }
.article__cats { margin: 0; color: var(--accent); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.article h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin: .6rem 0 .6rem; }
.article__info { margin: 0; color: var(--muted); font-size: .88rem; }
.article__figure { margin: 1.5rem 0 0; }
.article__img { display: block; width: 100%; border-radius: 14px; }
.article__figure figcaption { margin-top: .45rem; color: var(--muted); font-size: .8rem; }
.article__body { margin-top: 1.5rem; font-size: 1.02rem; line-height: 1.8; }
.article__body p { margin: 0 0 1.1rem; }
.article__body h2 { margin: 2rem 0 .6rem; font-size: 1.45rem; }
.article__body h3 { margin: 1.6rem 0 .5rem; }
.article__body ul { margin: 0 0 1.1rem; padding-left: 1.3rem; }
.article__body blockquote { margin: 1.4rem 0; padding: .9rem 1.1rem; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: color-mix(in srgb, var(--accent) 6%, #ffffff); color: #3e495c; font-style: italic; }
.article__sources { margin: 1.4rem 0 0; color: var(--muted); font-size: .86rem; }
.article__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.6rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.article__foot .share { margin-left: 0; }
.share__btn--long { width: auto; height: auto; padding: .4rem .8rem; border-radius: 999px; color: var(--text); font-size: .8rem; }
.article > .text-link { margin-top: 1.1rem; }

/* ---- Recommendation letter ---------------------------------------------------------- */
.letter-wrap { padding: 2.5rem 0 3.5rem; }
.page-letter { background: var(--soft); }
.letter { max-width: 860px; margin: 0 auto; padding: clamp(1.3rem, 3vw, 2.2rem); }
.letter h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin: .2rem 0 1rem; }
.letter h2 { font-size: 1.2rem; margin: 1.6rem 0 .5rem; letter-spacing: -.015em; }
.note-box { margin: 1rem 0; padding: 1rem 1.1rem; border: 1px solid color-mix(in srgb, var(--accent) 18%, #ffffff); border-radius: 14px; background: color-mix(in srgb, var(--accent) 7%, #ffffff); }
.note-box p { margin: 0; }
.note-box p + p { margin-top: .6rem; }
.flow-step { margin: .8rem 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; }
.flow-step p { margin: .5rem 0 .9rem; color: var(--muted); }
.flow-actions { display: flex; gap: .5rem; }
.choice-btn { min-width: 3.4rem; padding: .6rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.choice-btn--yes { background: var(--accent); border-color: var(--accent); color: #fff; }
.choice-btn:hover { filter: brightness(.95); }
.result { margin: .8rem 0; padding: 1rem 1.1rem; border-radius: 14px; }
.result p { margin: .4rem 0 0; }
.result--no { background: #fff4f2; border: 1px solid #ffd3cc; }
.result--yes { background: #ecfdf3; border: 1px solid #b7ebcd; }
.checklist { padding-left: 1.2rem; }
.checklist li { margin: .45rem 0; }
.letter > .btn { margin-top: .6rem; }

/* ---- Course pages ---------------------------------------------------------------------- */
.page-course { background: var(--soft); }
.course-page { padding: 1.6rem 0 3rem; }
.mini-label { display: inline-block; margin: 0 0 .6rem; color: var(--accent-dark); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.course-hero { padding: clamp(1.2rem, 3vw, 1.8rem); border: 1px solid color-mix(in srgb, var(--accent) 20%, #ffffff); border-radius: var(--radius); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, #ffffff), #fff); box-shadow: var(--card-shadow); }
.course-hero h1 { margin: .1rem 0 .6rem; font-size: clamp(2rem, 4.6vw, 3.2rem); }
.course-hero p { max-width: 760px; margin: 0; color: var(--muted); font-size: 1.02rem; }
.pills { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.pills span { padding: .3rem .65rem; border: 1px solid color-mix(in srgb, var(--accent) 20%, #ffffff); border-radius: 999px; background: #fff; font-size: .82rem; font-weight: 700; }
.course-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.course-card { padding: 1.05rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--card-shadow); }
.course-card h2 { margin: 0 0 .35rem; font-size: 1.08rem; letter-spacing: -.015em; overflow-wrap: anywhere; }
.course-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.course-split { display: grid; grid-template-columns: .76fr 1.24fr; gap: 1rem; align-items: start; margin-top: 1rem; }
.course-split > *, .course-cards > *, .materials > * { min-width: 0; }
.course-heading { margin: 0 0 .5rem; font-size: 1.3rem; letter-spacing: -.03em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--card-shadow); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table-wrap th, .table-wrap td { padding: .78rem .9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table-wrap th { background: #fafcff; color: var(--muted); font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:first-child { font-weight: 700; }
.table-note { margin: .55rem 0 0; color: var(--muted); font-size: .78rem; }
.course-block { margin-top: 1.2rem; padding: clamp(1.1rem, 2.5vw, 1.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--card-shadow); }
.course-block--highlight { border-color: color-mix(in srgb, var(--accent) 28%, #ffffff); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, #ffffff), #fff); }
.course-block__text { margin: 0 0 .9rem; font-size: .92rem; }
.course-block__note { margin: .9rem 0 0; color: var(--accent-dark); font-size: .82rem; font-weight: 700; }
.materials { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.material { display: flex; flex-direction: column; align-items: flex-start; padding: .95rem; border: 1px solid color-mix(in srgb, var(--accent) 18%, #ffffff); border-radius: 12px; background: #fff; }
.material .mini-label { margin-bottom: .35rem; font-size: .7rem; }
.material h3 { margin: 0 0 .4rem; font-size: .98rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.material p { margin: 0; color: var(--muted); font-size: .86rem; }
.material .material__meta { margin-top: .35rem; color: var(--text); font-size: .78rem; font-weight: 700; }
.material__btn { margin-top: auto; padding: .48rem .75rem; border-radius: 8px; background: var(--accent); color: #fff; font-size: .82rem; font-weight: 700; }
.material p + .material__btn, .material h3 + .material__btn { margin-top: .8rem; }
.material__btn:hover { background: var(--accent-dark); color: #fff; }
.course-schedule { margin-top: 1.6rem; }
.schedule-hint { margin: -.2rem 0 .8rem; color: var(--muted); font-size: .88rem; }
.schedule { display: grid; gap: .55rem; }
.week-item { border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.week-item > summary, div.week-item { display: grid; grid-template-columns: 46px minmax(0, 1fr) 120px; gap: .75rem; align-items: center; padding: .75rem .85rem; }
.week-item > summary { list-style: none; cursor: pointer; }
.week-item > summary::-webkit-details-marker { display: none; }
.week-item--published { border-color: color-mix(in srgb, var(--accent) 35%, #ffffff); background: color-mix(in srgb, var(--accent) 5%, #ffffff); transition: border-color .18s, box-shadow .18s; }
.week-item--published:hover, .week-item[open] { border-color: color-mix(in srgb, var(--accent) 55%, #ffffff); box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 10%, transparent); }
.week-item--review { background: #f8faff; }
.week-item--assessment { border-color: #f5ddbd; background: #fff8ef; }
.week-item__num { color: var(--accent); font-weight: 800; font-size: .9rem; }
.week-item__main strong { display: block; font-size: .95rem; }
.week-item__main span { display: block; color: var(--muted); font-size: .83rem; }
.week-item__status { justify-self: end; color: #798399; font-size: .78rem; font-weight: 800; text-align: right; }
.week-item--published .week-item__status { color: var(--accent); }
.week-item--assessment .week-item__num, .week-item--assessment .week-item__status { color: #a35900; }
.week-item__panel { margin: 0 .85rem; padding: .75rem 0 .85rem; border-top: 1px solid var(--line); }
.week-item__notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1rem; }
.week-item__notes p { margin: 0; font-size: .86rem; }
.resource-links { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.resource-links a { padding: .36rem .62rem; border: 1px solid color-mix(in srgb, var(--accent) 25%, #ffffff); border-radius: 7px; background: #fff; font-size: .8rem; font-weight: 700; }

/* ---- Contact page ------------------------------------------------------------------- */
.local-time { display: inline-flex; align-items: center; gap: .55rem; margin-top: 1.1rem !important; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .88rem !important; }
.local-time strong { color: var(--text); font-variant-numeric: tabular-nums; }
.local-time__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 16%, transparent); }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.contact-card { display: flex; flex-direction: column; gap: .5rem; min-width: 0; padding: 1.15rem 1.2rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--card-shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.contact-card:hover, .contact-card:focus-within { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 30%, #ffffff); box-shadow: 0 16px 34px rgba(18, 32, 55, .09); }
.contact-card__top { display: flex; align-items: center; gap: .65rem; }
.contact-card__icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); transition: background .2s ease, color .2s ease; }
.contact-card__icon svg { width: 20px; height: 20px; }
.contact-card:hover .contact-card__icon { background: var(--accent); color: #fff; }
.contact-card__label { color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.contact-card__value { margin: .25rem 0 0; font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.35; overflow-wrap: anywhere; user-select: all; }
.contact-card__note { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.contact-card__actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: auto; padding-top: .6rem; }
.cbtn { display: inline-flex; align-items: center; gap: .38rem; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-size: .82rem; font-weight: 700; line-height: 1.2; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.cbtn svg { width: 15px; height: 15px; flex: none; }
.cbtn:hover { border-color: color-mix(in srgb, var(--accent) 40%, #ffffff); color: var(--accent); }
.cbtn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.cbtn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.cbtn--icon { padding: .5rem .55rem; }
.cbtn.is-active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, #ffffff); color: var(--accent-dark); }
.cbtn__idle, .cbtn__done { display: inline-flex; align-items: center; gap: .38rem; }
.cbtn__done, .cbtn.is-done .cbtn__idle { display: none; }
.cbtn.is-done .cbtn__done { display: inline-flex; }
.cbtn.is-done { border-color: #b7ebcd; background: #ecfdf3; color: #0f766e; }
.contact-card__qr { margin-top: .5rem; padding-top: .9rem; border-top: 1px solid var(--line); text-align: center; }
.qr-box { display: inline-block; width: 172px; max-width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.qr-box svg { display: block; width: 100%; height: auto; }
.contact-card__qr p { margin: .5rem 0 0; color: var(--muted); font-size: .78rem; }
.contact-save { margin-top: 0; }
.contact-save .btn { gap: .5rem; }
.contact-save .btn svg { width: 18px; height: 18px; }
.toast { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 60; max-width: calc(100vw - 2rem); padding: .7rem 1.05rem; border-radius: 10px; background: var(--navy); color: #fff; font-size: .88rem; font-weight: 700; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 10px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; overflow-wrap: anywhere; }
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---- Meeting requests ----------------------------------------------------------------- */
.booking-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.booking-option { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; min-width: 0; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--card-shadow); }
.booking-option__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); }
.booking-option--coffee .booking-option__icon { background: #fff4df; color: #945400; }
.booking-option__icon svg { width: 24px; height: 24px; }
.booking-option h3 { margin: .35rem 0 0; font-size: 1.2rem; }
.booking-option p { margin: 0; color: var(--muted); font-size: .92rem; }
.booking-option__facts { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .15rem 0 .5rem; padding: 0; list-style: none; font-size: .84rem; font-weight: 600; }
.booking-option__facts li { display: inline-flex; align-items: center; gap: .35rem; }
.booking-option__facts svg { width: 16px; height: 16px; color: var(--muted); }
.booking-option .btn { margin-top: auto; }

dialog.booking { width: min(560px, calc(100vw - 2rem)); max-width: none; max-height: min(calc(100dvh - 2rem), 820px); padding: 0; border: 0; border-radius: 18px; background: #fff; color: var(--text); box-shadow: 0 30px 80px rgba(16, 27, 50, .3); overflow: hidden; }
dialog.booking[open] { display: flex; flex-direction: column; }
dialog.booking::backdrop { background: rgba(16, 27, 50, .5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.booking__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.35rem 1rem; border-bottom: 1px solid var(--line); }
.booking__eyebrow { display: inline-flex; align-items: center; gap: .4rem; color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.booking__eyebrow svg { width: 16px; height: 16px; }
.booking__head h2 { margin: .35rem 0 0; font-size: 1.4rem; letter-spacing: -.02em; }
.booking__close { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); cursor: pointer; }
.booking__close:hover { border-color: color-mix(in srgb, var(--accent) 40%, #ffffff); color: var(--text); }
.booking__close svg { width: 18px; height: 18px; }
.booking__form { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.booking__body { display: grid; flex: 1; gap: 1.05rem; min-height: 0; padding: 1.1rem 1.35rem 1.3rem; overflow-y: auto; }
.booking__foot { display: flex; justify-content: flex-end; gap: .6rem; padding: .85rem 1.35rem; border-top: 1px solid var(--line); background: var(--soft); }
.field { display: grid; gap: .4rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend { padding: 0; font-size: .86rem; font-weight: 700; }
.field > legend { margin-bottom: .4rem; }
.field input[type="text"], .field input[type="email"], .field input[type="date"], .field input[type="time"], .field textarea { width: 100%; min-width: 0; padding: .62rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); font: inherit; font-size: .92rem; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.field__hint { margin: 0; color: var(--muted); font-size: .8rem; }
.field__error { margin: 0; color: #c2353a; font-size: .8rem; font-weight: 600; }
.field__error:empty { display: none; }
.field.is-invalid input, .field.is-invalid textarea { border-color: #e5484d; }
.choice-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choice span { display: inline-flex; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .86rem; font-weight: 700; }
.choice input:checked + span { border-color: color-mix(in srgb, var(--accent) 45%, #ffffff); background: var(--accent-soft); color: var(--accent-dark); }
.choice input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.field.is-invalid .choice span { border-color: #f1a9ab; }
.slots { display: grid; gap: .65rem; }
.slot__inputs { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 38px; gap: .45rem; align-items: center; }
.slot__remove { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); cursor: pointer; }
.slot__remove:hover { color: #c2353a; border-color: #f1a9ab; }
.slot__remove svg { width: 16px; height: 16px; }
.slot__note { margin: .3rem 0 0; color: var(--muted); font-size: .8rem; }
.slot__note:empty { display: none; }
.slot__note.is-warning { color: #b45309; font-weight: 600; }
.slots__add { justify-self: start; margin-top: .35rem; }
.booking__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.booking__result { padding: 1.5rem 1.35rem 1.35rem; overflow-y: auto; }
.booking__result-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.booking__result-icon--sent { background: #ecfdf3; color: #0f766e; }
.booking__result-icon--failed { background: #fff1f1; color: #c2353a; }
.booking__result-icon svg { width: 24px; height: 24px; }
.booking__result h3 { margin: .9rem 0 .35rem; font-size: 1.3rem; letter-spacing: -.02em; outline: none; }
.booking__result p { margin: 0; color: var(--muted); }
.booking__message { max-height: 240px; margin: .9rem 0 0; padding: .9rem 1rem; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.booking__summary { display: grid; gap: .4rem; margin: .9rem 0 0; padding: 0; list-style: none; font-size: .9rem; font-weight: 600; }
.booking__summary li { display: flex; align-items: center; gap: .45rem; }
.booking__summary svg { width: 16px; height: 16px; color: var(--muted); }
.booking__result-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.booking__result-actions .btn { gap: .45rem; }
.booking__result-actions svg { width: 17px; height: 17px; }

/* ---- Donate page ---------------------------------------------------------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.donate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.donate-box { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; min-width: 0; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--card-shadow); scroll-margin-top: 100px; }
.donate-box__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); }
.donate-box--coffee .donate-box__icon { background: #fff4df; color: #945400; }
.donate-box__icon svg { width: 24px; height: 24px; }
.donate-box h2 { margin: .15rem 0 0; font-size: 1.35rem; letter-spacing: -.02em; }
.donate-box > p { margin: 0; color: var(--muted); font-size: .92rem; }
.donate-box > p.donate-box__note { font-size: .8rem; }
.donate-box__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.coffee-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; width: 100%; margin: .2rem 0 0; padding: 0; border: 0; }
.coffee-pick__option { position: relative; }
.coffee-pick__option input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.coffee-pick__option span { display: flex; flex-direction: column; align-items: center; gap: .05rem; padding: .8rem .5rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--muted); font-size: .8rem; font-weight: 600; transition: border-color .15s ease, background .15s ease; }
.coffee-pick__option b { color: var(--text); font-size: 1.45rem; font-weight: 800; line-height: 1.2; }
.coffee-pick__option input:checked + span { border-color: #e8b04a; background: #fff8ec; box-shadow: 0 0 0 3px #fdecc8; }
.coffee-pick__option input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.coffee-total { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; width: 100%; padding: .8rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.coffee-total span { color: var(--muted); font-size: .9rem; font-weight: 600; }
.coffee-total strong { font-size: 1.5rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pay-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 100%; max-width: 380px; aspect-ratio: 1.586; padding: 1.2rem 1.35rem; overflow: hidden; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--navy) 0%, color-mix(in srgb, var(--navy) 55%, var(--accent)) 100%); box-shadow: 0 16px 34px rgba(16, 27, 50, .25); }
.pay-card::after { content: ""; position: absolute; top: -90px; right: -70px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.pay-card > * { position: relative; }
.pay-card__top { display: flex; align-items: center; justify-content: space-between; }
.pay-card__chip { width: 42px; height: 32px; border-radius: 7px; background: linear-gradient(135deg, #f3d48b, #c99a3a); }
.pay-card__type { font-size: .85rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.pay-card__number { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(1.1rem, 4.4vw, 1.5rem); letter-spacing: .06em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-card--empty .pay-card__number { opacity: .55; }
.pay-card__name { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.pay-soon { margin: 0; color: var(--muted); font-size: .9rem; font-weight: 600; }
.pay-steps { display: grid; gap: .5rem; width: 100%; margin: .2rem 0 0; padding: 0; list-style: none; }
.pay-steps li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: .6rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 12px; font-size: .86rem; }
.pay-steps strong { font-weight: 800; }
.pay-steps span { color: var(--muted); }
.donate-thanks { margin: 1.4rem 0 0; color: var(--muted); font-weight: 600; text-align: center; }

/* ---- News stories ---------------------------------------------------------------------- */
.news-feed { display: grid; gap: .75rem; max-width: 980px; }
.news-item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--card-shadow); }
.news-item--simple, .news-item > summary { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1.5rem; padding: 1.05rem 1.3rem; }
.news-item > summary { border-radius: var(--radius); list-style: none; cursor: pointer; }
.news-item > summary::-webkit-details-marker { display: none; }
details.news-item { transition: border-color .2s ease, box-shadow .2s ease; }
details.news-item:hover, details.news-item[open] { border-color: color-mix(in srgb, var(--accent) 35%, #ffffff); box-shadow: 0 14px 30px rgba(18, 32, 55, .08); }
.news-item__date { padding-top: .12rem; color: var(--muted); font-size: .84rem; font-weight: 700; }
.news-item--photo { grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; }
.gallery.news-item__thumbs { display: flex; gap: .45rem; max-width: none; margin: 0; }
.news-item__thumbs .gallery__item { width: 168px; aspect-ratio: 16 / 9; }
.news-item__main { display: grid; justify-items: start; gap: .3rem; min-width: 0; }
.news-item__title { margin: 0; color: var(--text); font-size: 1rem; font-weight: 700; line-height: 1.45; }
.news-item__summary { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.news-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-top: .2rem; font-size: .82rem; font-weight: 700; }
.news-item__photos, .news-item__toggle { display: inline-flex; align-items: center; gap: .35rem; }
.news-item__photos { color: var(--muted); }
.news-item__toggle { color: var(--accent); }
.news-item__photos svg, .news-item__toggle svg { width: 16px; height: 16px; }
.news-item__toggle svg { transition: transform .2s ease; }
.news-item[open] .news-item__toggle svg { transform: rotate(180deg); }
.news-item__less, .news-item[open] .news-item__more { display: none; }
.news-item[open] .news-item__less { display: inline; }
.news-item__body { padding: .2rem 1.3rem 1.3rem calc(2.8rem + 150px); }
.news-item__body p { max-width: 720px; margin: 0 0 .85rem; color: #344054; font-size: .95rem; line-height: 1.7; }
.news-item__body h2, .news-item__body h3 { margin: 1.1rem 0 .5rem; font-size: 1.1rem; letter-spacing: -.01em; }
.news-item__body ul { max-width: 720px; margin: 0 0 .85rem; padding-left: 1.2rem; color: #344054; font-size: .95rem; line-height: 1.7; }
.news-item__body p.news-item__sources { margin: .3rem 0 0; color: var(--muted); font-size: .84rem; }
.news-item__videos { max-width: 760px; margin: .3rem 0 .9rem; }
.news-item__videos .intern-block { margin: 0; }
.news-item__videos .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.news-item__videos .video-grid--portrait { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-item__videos .video-grid--portrait .video-card__media { aspect-ratio: 9 / 16; }
.news-item__videos .video-card figcaption p { margin: .35rem 0 0; font-size: .84rem; line-height: 1.5; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem; max-width: 760px; margin: .3rem 0 1rem; }
.gallery__item { display: block; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: var(--soft); cursor: zoom-in; }
.gallery__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.gallery__item:hover .gallery__img { transform: scale(1.04); }
.gallery__item:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
dialog.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0a0f1c; color: #fff; }
dialog.lightbox[open] { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; grid-template-rows: minmax(0, 1fr) auto; align-items: center; }
dialog.lightbox::backdrop { background: rgba(8, 12, 22, .6); }
.lightbox__figure { display: grid; justify-items: center; gap: .7rem; grid-column: 2; grid-row: 1; min-height: 0; margin: 0; padding-top: 3.5rem; touch-action: pan-y; }
.lightbox__img { max-width: 100%; max-height: calc(100dvh - 9rem); border-radius: 8px; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lightbox__caption { max-width: 720px; color: #d6deea; font-size: .92rem; text-align: center; }
.lightbox__caption:empty { display: none; }
.lightbox__nav { display: grid; place-items: center; justify-self: center; grid-row: 1; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.lightbox__nav--prev { grid-column: 1; }
.lightbox__nav--next { grid-column: 3; }
.lightbox__nav:hover { background: rgba(255, 255, 255, .18); }
.lightbox__nav svg { width: 22px; height: 22px; }
.lightbox__close { position: absolute; top: calc(1rem + env(safe-area-inset-top, 0px)); right: 1rem; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.lightbox__close svg { width: 20px; height: 20px; }
.lightbox__count { grid-column: 1 / -1; grid-row: 2; margin: .4rem 0 calc(1rem + env(safe-area-inset-bottom, 0px)); color: #aab6c8; font-size: .85rem; text-align: center; font-variant-numeric: tabular-nums; }

/* ---- Error box (shown only if content.js has a mistake) ------------------------------- */
.load-error { max-width: 640px; margin: 4rem auto; padding: 1.6rem 1.8rem; border: 2px solid #e5484d; border-radius: 16px; background: #fff5f5; color: #3b0d0f; font-family: ui-sans-serif, system-ui, sans-serif; line-height: 1.6; }
.load-error h1 { margin: 0 0 .6rem; font-size: 1.4rem; letter-spacing: -.01em; }
.load-error code { padding: .1rem .35rem; border-radius: 6px; background: #ffe1e1; }
.load-error__detail { padding: .6rem .8rem; border-radius: 8px; background: #fff; font-family: ui-monospace, monospace; font-size: .85rem; }

/* ==========================================================================
   HOME PAGE refinements (slightly tighter spacing and type)
   ========================================================================== */
.page-home { font-size: 16px; line-height: 1.58; }
.page-home .nav { min-height: 66px; }
.page-home .nav__brand { font-family: var(--font), var(--fallback); letter-spacing: -.02em; }
.page-home .nav__links { gap: 1.2rem; font-size: .88rem; }
.page-home h1, .page-home h2, .page-home h3 { font-family: var(--font), var(--fallback); line-height: 1.13; letter-spacing: -.027em; }
.page-home h1 { font-size: clamp(2.4rem, 4.5vw, 3.75rem); margin: .7rem 0 1rem; }
.page-home h2 { font-size: clamp(1.55rem, 2.5vw, 2rem); }
.page-home h3 { font-size: 1.08rem; }
.page-home .eyebrow { font-size: .75rem; letter-spacing: .065em; }
.page-home .eyebrow::before { width: 7px; height: 7px; }
.page-home .hero { padding: 3.25rem 0 2.65rem; }
.page-home .hero-grid { grid-template-columns: minmax(0, 1fr) 270px; gap: 3.5rem; }
.page-home .hero-lead { max-width: 720px; font-size: 1.03rem; line-height: 1.68; margin-bottom: 1.35rem; }
.page-home .portrait { width: 270px; border-radius: 20px; box-shadow: 14px 14px 0 #edf1f8; }
.page-home .btn { padding: .68rem .92rem; border-radius: 8px; font-size: .86rem; font-weight: 700; }
.page-home .actions { gap: .62rem; }
.page-home .credential-grid { padding: 1.1rem 0; }
.page-home .credential { padding: 0 1.2rem; }
.page-home .credential:first-child { padding-left: 0; }
.page-home .credential strong { font-size: .86rem; }
.page-home .credential span { font-size: .75rem; margin-top: .12rem; }
.page-home .section { padding: 3.5rem 0; }
.page-home .section-head { margin-bottom: 1.4rem; }
.page-home .section-head p { max-width: 560px; font-size: .94rem; }
.page-home .project-grid { gap: 1rem; }
.page-home .project-card .label { font-size: .68rem; }
.page-home .project-card h3 { margin: .65rem 0 .4rem; font-size: 1.03rem; }
.page-home .project-card p { font-size: .87rem; line-height: 1.6; margin-bottom: .8rem; min-height: 4.15rem; }
.page-home .links { font-size: .79rem; }
.page-home .strip { border-radius: 16px; padding: 1.8rem 2rem; }
.page-home .strip h2 { margin-bottom: .4rem; }
.page-home .strip p { font-size: .92rem; }
.page-home .update { grid-template-columns: 135px 1fr; gap: 1.35rem; padding: .88rem 0; }
.page-home .update__date { font-size: .78rem; }
.page-home .update p { font-size: .92rem; }
.page-home .text-link { margin-top: 1.05rem; font-size: .83rem; }

/* ---- Internship page -------------------------------------------------------------- */
.intern-hero .pills { margin-top: 1.25rem; }
.intern-hero .actions { margin-top: 1.25rem; }
.status { display: inline-flex; align-items: center; gap: .38rem; padding: .16rem .62rem; border-radius: 999px; font-size: .72rem; font-weight: 800; line-height: 1.5; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--done { background: #e2f6ee; color: #0e6a4d; }
.status--progress { background: #fff1d6; color: #8a4b00; }
.intern-timeline { margin-top: 2.1rem; }
.intern-timeline__title { display: block; margin-bottom: .6rem; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.intern-timeline ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin: 0; padding: 0; list-style: none; }
.intern-timeline li { min-width: 0; }
.intern-timeline__item { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; height: 100%; padding: .9rem 1rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
a.intern-timeline__item:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, #ffffff); box-shadow: var(--card-shadow); transform: translateY(-2px); }
.intern-timeline__date { color: var(--muted); font-size: .78rem; font-weight: 700; }
.intern-timeline__item strong { font-size: .98rem; line-height: 1.35; }
.intern-timeline__item .status { margin-top: auto; }
.intern-timeline__item strong + .status { margin-top: .45rem; }
.intern-head { margin-bottom: 1.2rem; }
.intern-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .7rem; margin-bottom: .55rem; }
.intern-head__meta .mini-label { margin: 0; }
.intern-head h2 { max-width: 820px; margin: 0; }
.intern-text { max-width: 790px; }
.intern-text p { margin: 0 0 .9rem; color: var(--muted); }
.intern-text p:last-child { margin-bottom: 0; }
.intern-block { margin-top: 2rem; }
.intern-block__title { margin: 0 0 .8rem; font-size: 1.08rem; letter-spacing: -.015em; }
.intern-block__text { max-width: 760px; margin: -.4rem 0 1rem; color: var(--muted); font-size: .92rem; }
.intern-points { display: grid; gap: .6rem; max-width: 830px; margin: 0; padding: 0; list-style: none; }
.intern-points li { position: relative; padding-left: 1.45rem; color: var(--muted); }
.intern-points li::before { content: ""; position: absolute; left: .18rem; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.intern-points strong { color: var(--text); }
.intern-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.intern-step { min-width: 0; padding: 1.05rem 1.1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--card-shadow); }
.intern-step__n { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: .75rem; border-radius: 9px; background: var(--accent-soft); color: var(--accent-dark); font-size: .9rem; font-weight: 800; }
.intern-step strong { display: block; margin-bottom: .35rem; font-size: 1rem; line-height: 1.35; }
.intern-step p { margin: 0; color: var(--muted); font-size: .89rem; }
.intern-callout { max-width: 830px; margin-top: 2rem; padding: 1.15rem 1.3rem; border: 1px solid color-mix(in srgb, var(--accent) 24%, #ffffff); border-left: 4px solid var(--accent); border-radius: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, #ffffff), #fff); }
.intern-callout h3 { margin: 0 0 .45rem; font-size: 1.08rem; letter-spacing: -.015em; }
.intern-callout p { margin: 0 0 .65rem; color: var(--muted); }
.intern-callout p:last-child { margin-bottom: 0; }
.intern-callout strong { color: var(--text); }
.flow { display: grid; grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); gap: 2.3rem; margin: 0; padding: 0; list-style: none; }
.flow__step { position: relative; display: grid; align-content: center; gap: .65rem; min-width: 0; }
.flow__step + .flow__step::before { content: "→"; position: absolute; top: 50%; left: -1.62rem; color: var(--accent); font-size: 1.2rem; font-weight: 800; line-height: 1; transform: translateY(-50%); }
.flow__box { padding: .85rem .95rem; border: 1px solid color-mix(in srgb, var(--accent) 22%, #ffffff); border-radius: 12px; background: #fff; }
.flow__box strong { display: block; font-size: .93rem; line-height: 1.35; }
.flow__box span { display: block; margin-top: .25rem; color: var(--muted); font-size: .83rem; line-height: 1.45; }
.flow__step:last-child .flow__box { border-color: var(--accent); background: var(--accent); }
.flow__step:last-child .flow__box strong, .flow__step:last-child .flow__box span { color: #fff; }
.doc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.doc-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); box-shadow: var(--card-shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.doc-card:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 32%, #ffffff); box-shadow: 0 16px 34px rgba(18, 32, 55, .09); transform: translateY(-3px); }
.doc-card__thumb { display: block; aspect-ratio: 16 / 10; padding: 12px 14px 0; overflow: hidden; border-bottom: 1px solid var(--line); background: #edf1f7; }
.doc-card__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 6px 6px 0 0; box-shadow: 0 6px 18px rgba(16, 24, 40, .13); }
.doc-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: .9rem 1rem 1rem; }
.doc-card__body .mini-label { margin-bottom: .3rem; font-size: .68rem; }
.doc-card__title { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.doc-card__text { margin-top: .35rem; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.doc-card__action { margin-top: auto; padding-top: .85rem; color: var(--accent); font-size: .84rem; font-weight: 800; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.video-card { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--card-shadow); }
.video-card__media { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #10213a; }
.video-card figcaption { padding: .95rem 1.1rem 1.1rem; }
.video-card figcaption .mini-label { margin-bottom: .3rem; }
.video-card figcaption strong { display: block; font-size: 1rem; line-height: 1.35; }
.video-card figcaption p { margin: .4rem 0 0; color: var(--muted); font-size: .88rem; }
.video-grid--portrait { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 900px; }
.video-grid--portrait .video-card__media { aspect-ratio: 9 / 14; }
.intern-section > .links { margin-top: 1.7rem; font-size: .86rem; }
.intern-note { max-width: 830px; margin: 1.8rem 0 0; padding: .8rem 1rem; border: 1px dashed color-mix(in srgb, var(--accent) 40%, #ffffff); border-radius: 10px; color: var(--accent-dark); font-size: .88rem; font-weight: 700; }
@media (max-width: 1000px) {
  .doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .letter-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; gap: 1.9rem; max-width: 560px; }
  .flow__step + .flow__step::before { content: "↓"; top: -1.5rem; left: 50%; transform: translateX(-50%); }
  .flow__step--split { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .intern-timeline ol, .intern-steps, .video-grid, .video-grid--portrait { grid-template-columns: 1fr; }
  .video-grid--portrait { max-width: 420px; }
  .intern-timeline__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: .8rem; padding: .75rem .9rem; }
  .intern-timeline__item strong { grid-column: 1; }
  .intern-timeline__item .status, .intern-timeline__item strong + .status { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
}
@media (max-width: 560px) {
  .doc-grid { grid-template-columns: 1fr; }
  .doc-card__thumb { aspect-ratio: 2.4 / 1; }
  .flow__step--split { grid-template-columns: 1fr; }
}

/* ---- Project pages: screenshots, and steps with a status --------------- */
.status--planned { background: var(--accent-soft); color: var(--accent-dark); }
.gallery.screens { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.7rem 1.4rem; max-width: none; margin: 0; }
.screen { min-width: 0; margin: 0; }
.screen--wide { grid-column: 1 / -1; }
.screens .gallery__item { width: 100%; aspect-ratio: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--card-shadow); transition: border-color .2s ease, box-shadow .2s ease; }
.screens .gallery__img { height: auto; }
.screens .gallery__item:hover { border-color: color-mix(in srgb, var(--accent) 45%, #ffffff); box-shadow: 0 16px 34px rgba(16, 24, 40, .1); }
.screens .gallery__item:hover .gallery__img { transform: none; }
.screen figcaption { margin-top: .65rem; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.screens__phones { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 200px)); gap: 1.4rem; }
.screen--phone .gallery__item { border-radius: 18px; }
.intern-steps--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.intern-steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.intern-step__top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .75rem; }
.intern-step__top .intern-step__n { margin-bottom: 0; }
@media (max-width: 1000px) {
  .intern-steps--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .gallery.screens { grid-template-columns: 1fr; gap: 1.4rem; }
  .screens__phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .intern-steps--2, .intern-steps--4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   SMALLER SCREENS
   ========================================================================== */
@media (max-width: 900px) {
  .hero-grid, .page-home .hero-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .portrait, .page-home .portrait { width: 240px; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .service-columns, .service-columns--3 { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr; }
  .pub-featured, .person-grid, .service-grid, .card-grid { grid-template-columns: 1fr 1fr; }
  .consult-hero__grid { grid-template-columns: 1fr; }
  .trust-strip, .steps { grid-template-columns: 1fr 1fr; }
  .page-home .section { padding: 3.1rem 0; }
  .course-cards, .materials { grid-template-columns: 1fr 1fr; }
  .course-split { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .donate-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .container { width: min(calc(100% - 1.5rem), var(--max)); }
  .nav, .page-home .nav { align-items: flex-start; flex-direction: column; gap: .6rem; padding: .9rem 0; }
  .nav__links, .page-home .nav__links { flex-wrap: wrap; gap: .65rem 1rem; }
  .nav { position: relative; }
  .more-menu { position: static; }
  .more-menu__panel { left: 0; right: 0; top: calc(100% - .2rem); width: auto; max-width: none; }
  .hero, .page-home .hero { padding: 2.5rem 0 2.1rem; }
  .credential-grid, .project-grid, .interest-grid, .workplace-grid, .content-grid,
  .pub-featured, .person-grid, .service-grid, .card-grid, .trust-strip, .steps { grid-template-columns: 1fr; }
  .credential, .page-home .credential { border-right: 0; border-bottom: 1px solid var(--line); padding: .8rem 0; }
  .credential:last-child { border-bottom: 0; }
  .section, .content-section, .page-home .section { padding: 2.6rem 0; }
  .section-head { display: block; }
  .section-head p { margin-top: .5rem; }
  .update, .page-home .update { grid-template-columns: 1fr; gap: .15rem; }
  .strip, .page-home .strip { padding: 1.5rem; }
  .footer-row { display: block; }
  .footer-links { margin-top: .8rem; }
  .page-hero { padding: 2.8rem 0 1.9rem; }
  .topic-grid { columns: 1; }
  .talk { grid-template-columns: 36px 1fr; }
  .talk__date { grid-column: 2; }
  .post { grid-template-columns: 1fr; }
  .post__media { min-height: 120px; }
  .share { margin-left: 0; }
  .week { grid-template-columns: 1fr; }
  .week .chips { grid-column: 1; }
  .course-cards, .materials, .week-item__notes { grid-template-columns: 1fr; }
  .week-item > summary, div.week-item { grid-template-columns: 34px minmax(0, 1fr); }
  .week-item__status { grid-column: 2; justify-self: start; text-align: left; }
  .article-wrap { padding: 1rem 0 2.5rem; }
  .contact-grid, .booking-options { grid-template-columns: 1fr; }
  .tile-grid, .tile-grid--2, .letter-grid, .learn-grid { grid-template-columns: 1fr; }
  .tile--icon .tile__body { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: .95rem; align-content: start; padding: 1rem 1.05rem 1.05rem; }
  .tile--icon .tile__body > * { grid-column: 2; }
  .tile--icon .tile__icon { grid-column: 1; grid-row: 1 / span 4; margin: 0; }
  .country-grid { grid-template-columns: 1fr; }
  .letter-card { grid-template-columns: 84px minmax(0, 1fr); gap: .9rem; padding: 1rem; }
  .news-item--simple, .news-item > summary { grid-template-columns: 1fr; gap: .35rem; padding: 1rem; }
  .gallery.news-item__thumbs { margin-top: .45rem; }
  .news-item__thumbs .gallery__item { width: min(100%, 320px); }
  .news-item__body { padding: 0 1rem 1rem; }
  .news-item__videos .video-grid--portrait { grid-template-columns: minmax(0, 260px); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  dialog.lightbox[open] { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .lightbox__figure { padding: 3.75rem .75rem 0; }
  .lightbox__nav { position: absolute; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
  .lightbox__nav--prev { left: 1rem; }
  .lightbox__nav--next { right: 1rem; }
  dialog.booking { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); border-radius: 16px; }
  .consent { left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); width: auto; max-height: calc(100dvh - 1.5rem); padding: 1rem 1rem .95rem; }
  .booking__head, .booking__body, .booking__foot, .booking__result { padding-left: 1rem; padding-right: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project-card--visual, .contact-card, .toast, .gallery__img, .screens .gallery__item, details.news-item, .news-item__toggle svg, .doc-card, .intern-timeline__item, .consent, .more-menu > summary svg, .note__more > summary svg { transition: none; }
  .more-menu[open] .more-menu__panel { animation: none; }
  .project-card--visual:hover, .contact-card:hover, .contact-card:focus-within, .doc-card:hover, a.intern-timeline__item:hover { transform: none; }
}
