/* =========================================================
   Our Team (team.php). Builds on about.css (eyebrows, headings, reveal, gliding row) and programmes.css (buttons).
   ========================================================= */
.tm section[id] { scroll-margin-top: 96px; }
.tm-photo { display: block; width: 100%; height: 100% !important; object-fit: cover; object-position: 50% 30%; }

/* Initials, until a photograph is added in Admin → Team */
.tm-mono { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; overflow: hidden; container-type: inline-size; }
.tm-mono span { position: relative; font-family: var(--ab-serif); font-weight: 500; font-size: 34cqi; line-height: 1; letter-spacing: .02em; }
.tm-mono::before { content: ''; position: absolute; width: 140%; aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid currentColor; opacity: .16; box-shadow: 0 0 0 18cqi transparent, inset 0 0 0 18cqi rgba(255, 255, 255, .03); }
.tm-mono::after { content: ''; position: absolute; width: 74%; aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; border: 1px dashed currentColor; opacity: .22; }
.tm-mono.tone-0 { background: radial-gradient(circle at 30% 22%, #1f6e51, var(--ab-deep) 70%); color: #cfe9d8; }
.tm-mono.tone-1 { background: radial-gradient(circle at 30% 22%, #2c9a54, var(--ab-green) 70%); color: #fff; }
.tm-mono.tone-2 { background: radial-gradient(circle at 30% 22%, #2a9dcb, var(--ab-blue) 70%); color: #fff; }
.tm-mono.tone-3 { background: radial-gradient(circle at 30% 22%, #fbf8f1, var(--ab-sand) 70%); color: var(--ab-deep); }

.tm-role { display: block; font-size: 12px; font-weight: 800; line-height: 1.45; letter-spacing: .1em; text-transform: uppercase; color: var(--ab-green); }
.tm-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 0; min-height: 32px; border: 0; background: none; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--ab-green); cursor: pointer; }
.tm-more svg { transition: transform .2s ease; }
.tm-more:hover svg, .tm-more:focus-visible svg { transform: translateX(3px); }

/* ---------- 1. Opening ---------- */
.ab .tm-hero { overflow: hidden; padding: clamp(28px, 4vw, 52px) 0 clamp(64px, 8vw, 112px); background: var(--ab-cream); }
.tm-hero .ab-crumb { color: var(--ab-soft); }
.tm-hero .ab-crumb a { color: var(--ab-deep); }
.tm-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(40px, 6vw, 100px); align-items: center; }
.ab .tm-hero h1 { margin: 14px 0 22px; max-width: 17ch; font-size: var(--fs-display); color: var(--ab-deep); }
.ab .tm-hero-copy > p:not(.ab-lead) { max-width: 58ch; }
.tm-facts { list-style: none; display: flex; flex-wrap: wrap; margin: 30px 0 0; padding: 0; }
.tm-facts li { padding: 0 clamp(18px, 2.4vw, 30px); border-left: 1px solid var(--ab-line); }
.tm-facts li:first-child { padding-left: 0; border-left: 0; }
.tm-facts strong { display: block; font-family: var(--ab-serif); font-weight: 500; font-size: clamp(34px, 3.4vw, 46px); line-height: 1; color: var(--ab-green); font-variant-numeric: lining-nums; }
.tm-facts span { display: block; margin-top: 6px; font-size: 13.5px; color: var(--ab-soft); }
.tm-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.tm-jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ab-line); background: #fff; font-size: 14px; font-weight: 700; color: var(--ab-deep); transition: border-color .2s ease, color .2s ease; }
.tm-jump a:hover { border-color: var(--ab-green); color: var(--ab-green); }
.tm-hero-photo { position: relative; isolation: isolate; width: 100%; max-width: 580px; margin: 0 0 0 auto; padding: 13% 0 21%; }
.tm-hero-photo::before { content: ''; position: absolute; z-index: -1; right: -10%; top: 2%; width: 62%; aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed rgba(8, 114, 45, .35); }
.tm-hero-main { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 150px 28px 28px 28px; box-shadow: 0 30px 60px rgba(11, 61, 46, .16); }
.tm-hero-a { position: absolute; left: -9%; bottom: 0; width: 54%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 22px 22px 22px 80px; border: 7px solid var(--ab-cream); box-shadow: 0 18px 36px rgba(11, 61, 46, .2); }
.tm-hero-b { position: absolute; right: -5%; top: 0; width: 30%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: 47% 30%; border-radius: 50%; border: 7px solid var(--ab-cream); box-shadow: 0 18px 36px rgba(11, 61, 46, .2); }
.tm-hero-photo figcaption { position: absolute; right: 3%; bottom: 7%; padding: 7px 13px; border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 700; color: var(--ab-deep); box-shadow: 0 8px 20px rgba(11, 61, 46, .1); }

/* ---------- Who we are: women-led, refugee-led, youth-led ---------- */
.ab .tm-who { overflow: hidden; color: #fff; background: radial-gradient(900px 520px at 0% 0%, rgba(8, 114, 45, .45), transparent 60%), radial-gradient(800px 520px at 100% 100%, rgba(0, 124, 173, .25), transparent 62%), var(--ab-deep); }
.tm-who h2 { color: #fff; }
.tm-who .ab-eyebrow { color: #9fd6b2; }
.tm-who .ab-eyebrow::before { background: #9fd6b2; }
.ab .tm-who .ab-head-sub { color: rgba(255, 255, 255, .82); }
.tm-who h2 .ab-mark path { fill: rgba(159, 214, 178, .55); }
.tm-who-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.tm-who-card { display: flex; flex-direction: column; padding: 22px 22px 26px; border-radius: 26px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); transition-delay: calc(var(--i) * 90ms); }
.tm-who-art { height: 170px; margin-bottom: 20px; border-radius: 18px; overflow: hidden; }
.tm-who-tag { align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: #9fd6b2; color: var(--ab-deep); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ab .tm-who-card h3 { margin: 14px 0 8px; font-family: var(--ab-serif); font-weight: 500; font-size: clamp(21px, 1.9vw, 25px); line-height: 1.2; color: #fff; }
.ab .tm-who-card p { margin: 0; font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, .82); }
/* Women-led: the women of the team, overlapping */
.tm-who-faces { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; padding: 0 10px 0 22px; background: rgba(255, 255, 255, .05); }
.tm-who-face { width: 62px; height: 62px; margin: 4px 0 4px -12px; overflow: hidden; border-radius: 50%; border: 3px solid var(--ab-deep); background: var(--ab-sand); box-shadow: 0 6px 14px rgba(0, 0, 0, .25); }
/* Refugee-led: the team at Bidi Bidi FM */
.tm-who-photo img { width: 100%; height: 100% !important; object-fit: cover; }
/* Youth-led: nineteen */
.tm-who-number { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(circle at 50% 40%, rgba(159, 214, 178, .22), rgba(255, 255, 255, .04) 70%); }
.tm-who-number strong { font-family: var(--ab-serif); font-weight: 500; font-size: 104px; line-height: .9; color: #9fd6b2; font-variant-numeric: lining-nums; }
.tm-who-number span { margin-top: 8px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .8); }
/* What our people lead beyond BetterLife: a slow ribbon (pauses under the pointer; still with reduced motion) */
.tm-beyond { margin-top: clamp(32px, 4vw, 48px); }
.ab .tm-beyond-title { margin: 0 0 14px; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #9fd6b2; }
.tm-beyond-window { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%); }
.tm-beyond-track { display: flex; width: max-content; animation: tmRibbon 70s linear infinite; }
.tm-beyond-window:hover .tm-beyond-track, .tm-beyond-window:focus-within .tm-beyond-track { animation-play-state: paused; }
@keyframes tmRibbon { to { transform: translateX(-50%); } }
.tm-beyond-set { display: flex; gap: 12px; margin: 0; padding: 0 12px 0 0; list-style: none; }
.tm-beyond-chip { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .07); font: inherit; color: #fff; text-align: left; white-space: nowrap; }
button.tm-beyond-chip { cursor: pointer; transition: background .2s ease, border-color .2s ease; }
button.tm-beyond-chip:hover, button.tm-beyond-chip:focus-visible { background: rgba(159, 214, 178, .18); border-color: #9fd6b2; outline: none; }
.tm-beyond-face { flex: 0 0 auto; width: 46px; height: 46px; overflow: hidden; border-radius: 50%; background: var(--ab-sand); }
.tm-beyond-text strong { display: block; font-size: 14px; font-weight: 700; line-height: 1.25; }
.tm-beyond-text small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.3; color: rgba(255, 255, 255, .78); }

/* ---------- 2. Leadership ---------- */
.ab .tm-lead { background: #fff; }
.tm-lead-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px clamp(22px, 3vw, 36px); }
.tm-lead-card { display: grid; grid-template-columns: clamp(120px, 12vw, 160px) minmax(0, 1fr); gap: 22px; align-items: center; padding: 18px; border-radius: 24px; background: var(--ab-cream); border: 1px solid var(--ab-line); transition-delay: calc(var(--i) * 90ms); }
.tm-lead-photo { aspect-ratio: 1; overflow: hidden; border-radius: 999px 999px 18px 18px; background: var(--ab-sand); }
.ab .tm-lead-body h3 { margin: 8px 0 10px; font-family: var(--ab-serif); font-weight: 600; font-size: clamp(21px, 1.9vw, 25px); line-height: 1.2; color: var(--ab-deep); }
.ab .tm-lead-body p { margin: 0; font-size: 15px; line-height: 1.6; }
/* The founder: a larger, dark card spanning both rows */
.tm-lead-card.is-first { grid-row: span 2; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(22px, 3vw, 36px); padding: clamp(20px, 2.4vw, 30px); background: var(--ab-deep); border-color: transparent; box-shadow: 0 30px 60px rgba(11, 61, 46, .18); }
.tm-lead-card.is-first .tm-lead-photo { aspect-ratio: 4 / 5; }
.tm-lead-card.is-first .tm-role { color: #9fd6b2; }
.ab .tm-lead-card.is-first h3 { font-weight: 500; font-size: clamp(28px, 2.8vw, 38px); color: #fff; }
.ab .tm-lead-card.is-first p { font-size: 15.5px; color: rgba(255, 255, 255, .86); }
.tm-lead-card.is-first .tm-more { margin-top: 20px; padding: 0 18px; min-height: 44px; border-radius: 999px; background: #fff; color: var(--ab-deep); }

/* ---------- 3. Country teams on the map ---------- */
.ab .tm-where { overflow: hidden; color: #fff; background: radial-gradient(900px 560px at 100% 0%, rgba(0, 124, 173, .26), transparent 62%), radial-gradient(800px 560px at 0% 100%, rgba(8, 114, 45, .4), transparent 60%), var(--ab-deep); }
.tm-where h2 { color: #fff; }
.tm-where .ab-eyebrow { color: #9fd6b2; }
.tm-where .ab-eyebrow::before { background: #9fd6b2; }
.ab .tm-where .ab-head-sub { color: rgba(255, 255, 255, .8); }
.tm-map { position: relative; width: min(100%, 980px, calc((100vh - 130px) * 790 / 640)); margin: 0 auto; aspect-ratio: 790 / 640; }
.tm-map-art { position: absolute; inset: 0; }
.tm-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tm-leader.is-narrow, .tm-map-faces { display: none; }
/* Narrower screens: portraits on the map, each with its country */
.tm-map-faces { list-style: none; margin: 0; padding: 0; }
.tm-mface { --fs: 54px; position: absolute; transform: translate(-50%, calc(var(--fs) / -2)); }
.tm-mface-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: #fff; }
button.tm-mface-btn { cursor: pointer; }
.tm-mface-btn:focus-visible { outline: none; }
.tm-mface-btn:focus-visible .tm-mface-img { outline: 3px solid #fff; outline-offset: 3px; }
.tm-mface-img { display: block; width: var(--fs); height: var(--fs); overflow: hidden; border-radius: 50%; border: 2.5px solid #fff; background: var(--ab-sand); box-shadow: 0 8px 18px rgba(0, 0, 0, .35); transition: transform .25s ease, border-color .25s ease; }
.tm-mface-label { display: flex; flex-direction: column; align-items: center; max-width: 100px; padding: 4px 9px 5px; border-radius: 12px; background: rgba(6, 22, 15, .8); text-align: center; line-height: 1.2; }
.tm-mface-label strong { font-size: 11.5px; font-weight: 700; color: #fff; }
.tm-mface-label small { margin-top: 2px; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #9fd6b2; }
.tm-mface.is-home .tm-mface-label small { margin: 0; color: #fff; }
.tm-mface.is-regional .tm-mface-label small { color: #7cc4e4; }
.tm-mface.is-on .tm-mface-img, button.tm-mface-btn:hover .tm-mface-img { transform: scale(1.08); border-color: #9fd6b2; }
.tm-mface-btn[data-member] .tm-mface-img { animation: tmTap 2.6s ease-out infinite; }
@keyframes tmTap { 0% { box-shadow: 0 8px 18px rgba(0, 0, 0, .35), 0 0 0 0 rgba(159, 214, 178, .7); } 70%, 100% { box-shadow: 0 8px 18px rgba(0, 0, 0, .35), 0 0 0 12px rgba(159, 214, 178, 0); } }
.tm-land { fill: rgba(255, 255, 255, .07); stroke: rgba(255, 255, 255, .22); stroke-width: .8; stroke-linejoin: round; }
.tm-country { fill: rgba(159, 214, 178, .4); stroke: rgba(255, 255, 255, .55); stroke-width: .8; stroke-linejoin: round; transition: fill .25s ease; }
.tm-country.is-on { fill: #9fd6b2; }
.tm-leader path { fill: none; stroke: #9fd6b2; stroke-width: 1.3; stroke-dasharray: 3 4; opacity: .75; transition: opacity .25s ease; }
.tm-leader circle { fill: #fff; stroke: var(--ab-green); stroke-width: 2.4; }
.tm-leader.is-on path { opacity: 1; stroke: #fff; }
.tm-leader.is-regional path { stroke: #7cc4e4; stroke-dasharray: 2 5; opacity: .5; }
.tm-leader.is-regional.is-on path { stroke: #fff; opacity: .95; }
.tm-pin.is-regional .tm-pin-face, .tm-mface.is-regional .tm-mface-img { border-color: #7cc4e4; }
.tm-pin.is-regional .tm-pin-text small { color: #7cc4e4; }
.tm-pins { list-style: none; margin: 0; padding: 0; }
.tm-pin { position: absolute; display: flex; align-items: center; gap: 12px; transform: translate(-39px, -50%); }
.tm-pin.is-left { flex-direction: row-reverse; text-align: right; transform: translate(calc(-100% + 39px), -50%); }
.tm-pin-face { flex: 0 0 auto; width: 78px; height: 78px; overflow: hidden; border-radius: 50%; border: 3px solid #fff; background: var(--ab-sand); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); transition: transform .25s ease; }
.tm-pin.is-on .tm-pin-face { transform: scale(1.08); }
.tm-pin-mark { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--ab-green); color: #fff; }
.tm-pin-text strong { display: block; font-family: var(--ab-serif); font-weight: 600; font-size: 17px; line-height: 1.2; color: #fff; white-space: nowrap; }
.tm-pin-text small { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #9fd6b2; }
/* Read bio: a clear button on each pin; the portrait opens the bio too */
.tm-pin .tm-more { margin-top: 7px; padding: 0 12px; min-height: 30px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .1); font-size: 12.5px; color: #fff; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.tm-pin .tm-more:hover, .tm-pin .tm-more:focus-visible { background: #9fd6b2; border-color: #9fd6b2; color: var(--ab-deep); }
.tm-pin-face[data-member] { cursor: pointer; }
.tm-pin-face[data-member]:hover { transform: scale(1.06); }
.tm-map-hint { display: none; }
.tm-pin.is-left .tm-more { flex-direction: row; }

/* ---------- 4. Programme team ---------- */
.ab .tm-people { background: var(--ab-cream); }
/* One row for up to six people on wide screens (the count comes from the page), three across on tablets */
.tm-grid { --gx: clamp(16px, 2vw, 26px); list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(22px, 2.6vw, 32px) var(--gx); }
/* Each card takes its share of a row; a shorter last row sits in the middle */
.tm-grid > .tm-card { flex: 0 0 calc((100% - (var(--cols, 5) - 1) * var(--gx)) / var(--cols, 5)); min-width: 0; }
.tm-card { text-align: center; transition-delay: calc(var(--i) * 80ms); }
.tm-card-photo { aspect-ratio: 4 / 5; margin-bottom: 16px; overflow: hidden; border-radius: 999px 999px 22px 22px; background: var(--ab-sand); box-shadow: 0 18px 36px rgba(11, 61, 46, .1); transition: transform .3s ease, box-shadow .3s ease; }
.tm-card:hover .tm-card-photo { transform: translateY(-4px); box-shadow: 0 26px 48px rgba(11, 61, 46, .16); }
.ab .tm-card h3 { margin: 0; font-family: var(--ab-serif); font-weight: 600; font-size: 20px; line-height: 1.25; color: var(--ab-deep); }
.tm-card .tm-role { margin-top: 7px; font-size: 11.5px; letter-spacing: .07em; }
.tm-card .tm-more { margin-top: 8px; }

/* ---------- 5. Board: seated around a table ---------- */
.ab .tm-board { overflow: hidden; background: #fff; }
.tm-council { position: relative; width: min(100%, 1000px); margin: 0 auto; aspect-ratio: 2 / 1.1; }
/* The table: a half-disc at the foot of the stage, with a dashed inner edge and a soft floor line */
.tm-council-table { position: absolute; left: 21%; right: 21%; bottom: 0; aspect-ratio: 2 / 1; border-radius: 9999px 9999px 0 0; background: radial-gradient(circle at 50% 100%, #17694d, var(--ab-deep) 72%); box-shadow: 0 30px 60px rgba(11, 61, 46, .18); }
.tm-council-table::before { content: ''; position: absolute; inset: 7% 7% 0; border: 1px dashed rgba(159, 214, 178, .4); border-bottom: 0; border-radius: inherit; }
.tm-council::after { content: ''; position: absolute; left: 6%; right: 6%; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--ab-line), transparent); }
.tm-seats { position: absolute; inset: 0; }
.tm-seat { --fs: clamp(78px, 10vw, 116px); position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, calc(var(--fs) / -2)); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; border: 0; background: none; font: inherit; color: var(--ab-soft); cursor: pointer; }
.tm-seat-face { display: block; width: var(--fs); height: var(--fs); overflow: hidden; border-radius: 50%; border: 4px solid #fff; background: var(--ab-sand); box-shadow: 0 14px 30px rgba(11, 61, 46, .16); filter: saturate(.7); transition: transform .3s ease, box-shadow .3s ease, filter .3s ease, border-color .3s ease; }
.tm-seat-name { font-size: 13.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; transition: color .3s ease; }
.tm-seat:hover .tm-seat-face { filter: none; transform: scale(1.05); }
.tm-seat[aria-selected="true"] .tm-seat-face { filter: none; transform: scale(1.12); border-color: var(--ab-green); box-shadow: 0 0 0 6px rgba(8, 114, 45, .16), 0 18px 36px rgba(11, 61, 46, .24); }
.tm-seat[aria-selected="true"] .tm-seat-name { color: var(--ab-deep); }
.tm-seat:focus-visible { outline: none; }
.tm-seat:focus-visible .tm-seat-face { outline: 3px solid var(--ab-blue); outline-offset: 3px; }
/* What the chosen member says, written on the table */
.tm-seat-panels { position: absolute; left: 27%; right: 27%; bottom: 5%; height: 40%; display: grid; align-items: end; text-align: center; }
.tm-seat-panel { outline: none; }
.ab-js .tm-seat-panel { grid-area: 1 / 1; }
.ab-js .tm-seat-panel:not(.is-active) { visibility: hidden; }
.ab-js .tm-seat-panel.is-active { animation: tmPanel .5s ease; }
@keyframes tmPanel { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tm-seat-panel .tm-role { color: #9fd6b2; }
.ab .tm-seat-panel h3 { margin: 6px 0 8px; font-family: var(--ab-serif); font-weight: 500; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; color: #fff; }
.ab .tm-seat-panel p { max-width: 46ch; margin: 0 auto; font-size: 14.5px; line-height: 1.6; color: rgba(255, 255, 255, .86); }
.tm-seat-panel .tm-more { margin-top: 8px; color: #9fd6b2; }

/* ---------- 6. Who the work is for ---------- */
.ab .tm-close { overflow: hidden; padding: clamp(64px, 8vw, 112px) 0; background: var(--ab-cream); }
.tm-faces { margin-bottom: clamp(36px, 5vw, 56px); }
.tm-faces .ab-glide-row { --h: clamp(210px, 22vw, 310px); }
.tm-faces .tm-face { overflow: hidden; background: var(--ab-sand); border-radius: 999px 999px 18px 18px !important; }
.tm-face img { width: 100%; height: 100% !important; object-fit: cover; object-position: 50% 22%; }
.tm-close-inner { max-width: 860px; text-align: center; }
.tm-close-inner .ab-eyebrow { justify-content: center; }
.ab .tm-close h2 { max-width: 28ch; margin: 14px auto 16px; font-size: var(--fs-h2-feature); color: var(--ab-deep); }
.ab .tm-close-inner p { margin: 0 auto; max-width: 52ch; }
.tm-close-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.tm-close .pg-btn-ghost { color: var(--ab-deep); border-color: rgba(11, 61, 46, .35); }
.tm-close .pg-btn-ghost:hover { background: rgba(11, 61, 46, .06); color: var(--ab-deep); }

/* ---------- Reading panel ---------- */
.tm-dialog { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 28px; background: #fff; color: var(--ab-ink); box-shadow: 0 40px 120px rgba(0, 0, 0, .35); overflow: hidden; }
.tm-dialog::backdrop { background: rgba(6, 22, 15, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.tm-dialog[open] { animation: tmIn .35s ease; }
@keyframes tmIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.tm-dialog-card { position: relative; display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
.tm-dialog-photo { position: relative; min-height: 460px; overflow: hidden; background: var(--ab-deep); }
.tm-dialog-photo > * { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; object-position: 50% 25%; }
.tm-dialog-photo .tm-mono span { font-size: 26cqi; }
/* The text column scrolls on its own, so a long bio can be read to the end beside the photo */
.tm-dialog-body { display: flex; flex-direction: column; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: clamp(28px, 4vw, 52px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ab.tm-dialog h2 { margin: 10px 0 18px; font-family: var(--ab-serif); font-weight: 500; font-size: clamp(28px, 3vw, 38px); line-height: 1.15; color: var(--ab-deep); }
.ab.tm-dialog p { margin: 0; font-size: 16.5px; line-height: 1.75; color: var(--ab-ink); }
.ab.tm-dialog .tm-dialog-bio p + p { margin-top: 14px; }
.tm-dialog-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 30px; }
.tm-dialog-nav button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ab-line); background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: var(--ab-deep); cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.tm-dialog-nav button:hover { border-color: var(--ab-green); color: var(--ab-green); }
.tm-dialog-nav button[data-step="-1"] svg { transform: rotate(180deg); }
.tm-dialog-count { font-size: 13px; color: var(--ab-soft); font-variant-numeric: tabular-nums; }
.tm-dialog-close { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--ab-deep); cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }

/* ---------- Narrower screens ---------- */
@media (max-width: 1100px) {
  .tm-grid { --cols: 3 !important; }
  .tm-lead-grid { grid-template-columns: 1fr 1fr; }
  .tm-lead-card.is-first { grid-column: 1 / -1; grid-row: auto; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }
}
/* Narrower screens: the people sit on the map as portrait buttons, and the wide-screen cards are hidden */
@media (max-width: 980px) {
  .tm-map { width: 100%; aspect-ratio: auto; }
  .tm-map-art { position: relative; inset: auto; width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 572 / 640; }
  .tm-leader:not(.is-narrow) { display: none; }
  .tm-leader.is-narrow { display: inline; }
  .tm-map-faces { display: block; }
  .tm-map-hint { display: block; margin: 0 0 12px; text-align: center; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .78); }
  .tm-pins { display: none; }
}
@media (max-width: 900px) {
  .tm-who-grid { grid-template-columns: 1fr 1fr; }
  .tm-who-card:last-child { grid-column: 1 / -1; }
  .tm-hero-grid { grid-template-columns: 1fr; }
  .tm-hero-photo { max-width: 460px; margin: 8px auto 0; }
  .tm-hero-a { left: -3%; }
  .tm-hero-b { right: -2%; }
  /* The board: seats on an arc above a card that carries what they say */
  .tm-council { width: 100%; aspect-ratio: auto; }
  .tm-council::after, .tm-council-table { display: none; }
  .tm-seats { position: relative; inset: auto; aspect-ratio: 2 / 1.1; }
  .tm-seat { --fs: clamp(52px, 12vw, 84px); }
  .tm-seat-name { display: none; }
  .tm-seat-panels { position: relative; left: auto; right: auto; bottom: auto; height: auto; margin-top: 10px; padding: 34px 22px 26px; border-radius: 160px 160px 24px 24px / 70px 70px 24px 24px; background: radial-gradient(circle at 50% 0%, #17694d, var(--ab-deep) 75%); }
  .tm-dialog-card { grid-template-columns: 1fr; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .tm-dialog-photo { min-height: 0; aspect-ratio: 16 / 10; }
  .tm-dialog-body { max-height: none; overflow: visible; }
}
@media (max-width: 720px) {
  .tm-who-grid { grid-template-columns: 1fr; }
  .tm-who-card:last-child { grid-column: auto; }
  .tm-who-art { height: 150px; }
  .tm-who-face { width: 54px; height: 54px; }
  .tm-who-number strong { font-size: 88px; }
  .tm-beyond-text small { font-size: 12px; }
  .tm-lead-grid { grid-template-columns: 1fr; }
  .tm-lead-card { grid-template-columns: 104px minmax(0, 1fr); gap: 16px; padding: 14px; }
  .tm-lead-card.is-first { grid-template-columns: 1fr; padding: 16px 16px 22px; }
  .tm-lead-card.is-first .tm-lead-photo { aspect-ratio: 1; max-width: 300px; }
  .tm-mface { --fs: 46px; }
  .tm-mface-label { max-width: 86px; padding: 3px 7px 4px; }
  .tm-mface-label strong { font-size: 10.5px; }
  .tm-mface-label small { font-size: 9px; }
  .tm-grid { --cols: 2 !important; --gx: 14px; row-gap: 22px; }
  .ab .tm-card h3 { font-size: 17.5px; }
  .tm-card .tm-role { font-size: 10.5px; }
  .tm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tm-facts li { padding: 0 12px; }
  .tm-facts strong { font-size: 30px; }
  .tm-facts span { font-size: 12.5px; line-height: 1.35; }
  .tm-hero-a, .tm-hero-b { border-width: 5px; }
  .tm-hero-main { border-radius: 90px 20px 20px 20px; }
  .tm-hero-photo figcaption { display: none; }
  .tm-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); border-radius: 22px; }
  .tm-dialog-card { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); }   /* dvh: the screen above the browser bar */
  .ab.tm-dialog p { font-size: 15.5px; line-height: 1.7; }
  .tm-dialog-nav button span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-beyond-track { animation: none; }
  .tm-beyond-window { overflow-x: auto; }
  .tm-beyond-set[aria-hidden] { display: none; }
  .tm-dialog[open] { animation: none; }
  .tm-card-photo, .tm-pin-face, .tm-more svg { transition: none; }
  .tm-mface-btn[data-member] .tm-mface-img { animation: none; }
  .ab-js .tm-seat-panel.is-active { animation: none; }
  .tm-seat-face { transition: none; }
}
