/* =========================================================================
   Team pages — loaded after style.css and header.css.
   team.html        : masthead · headline with inline faces · portrait accordion · end credits
   team-member.html : arched portrait + spec sheet · contact sheet viewer · more from the crew
   Uses the editorial tokens (--mono-*, --accent, --editorial-*) so light/dark
   theme and Arabic (RTL) keep working.
   ========================================================================= */

.tm-main {
  --tm-mono: "JetBrains Mono", ui-monospace, monospace;
  --tm-ease: cubic-bezier(.16, 1, .3, 1);
  --tm-gutter: clamp(20px, 5vw, 80px);
  --tm-pencil: #d2452d;
  display: block;
  color: var(--mono-text);
  overflow-x: clip;
}
.tm-main a { color: inherit; text-decoration: none; }
.tm-main h1, .tm-main h2 { color: var(--mono-text); }
.tm-main .tm-panel-name { color: #f2efe9; }
.tm-main .tm-credits-title, .tm-main .tm-others h2 { color: var(--mono-muted); }
.tm-main :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Shared button (solid with a square arrow chip) */
.tm-btn, .tm-join-link {
  display: inline-flex; align-items: center; gap: 16px; padding: 8px 8px 8px 24px;
  background: var(--mono-text); color: var(--mono-dark) !important;
  font: 600 12px/1 var(--editorial-sans); letter-spacing: .14em; text-transform: uppercase;
  transition: background-color .35s ease;
}
.tm-btn b, .tm-join-link b { display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; background: var(--accent); color: #fff; font-weight: 400; }
/* Square chip stays put; the arrow flies out of the corner and its twin slides in. */
.tm-btn b i, .tm-join-link b i { display: block; font-style: normal; text-shadow: -26px 26px 0 currentColor; transition: transform .55s var(--tm-ease); }
.tm-btn:hover b i, .tm-join-link:hover b i { transform: translate(26px, -26px); }
html[dir="rtl"] .tm-btn, html[dir="rtl"] .tm-join-link { padding: 8px 24px 8px 8px; font: 700 15px/1 var(--editorial-arabic-sans); letter-spacing: 0; }
html[dir="rtl"] .tm-btn b, html[dir="rtl"] .tm-join-link b { scale: -1 1; }

/* =========================================================================
   TEAM PAGE
   ========================================================================= */

/* ---------- Masthead + headline ---------- */
.tm-head { padding: clamp(28px, 4vw, 52px) var(--tm-gutter) clamp(40px, 5vw, 64px); }
.tm-masthead {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 16px;
  margin-bottom: clamp(44px, 7vw, 96px); padding-block: 12px; border-block: 1px solid var(--mono-line);
  color: var(--mono-muted); font: 500 10px/1.3 var(--tm-mono); letter-spacing: .18em; text-transform: uppercase;
}
.tm-masthead span:nth-child(2) { text-align: center; }
.tm-masthead span:last-child { text-align: end; }
.tm-headline {
  max-width: 16ch; margin: 0; color: var(--mono-text);
  font: 500 clamp(46px, 6.4vw, 108px)/1.02 var(--editorial-serif); letter-spacing: -.035em; text-wrap: balance;
}
.tm-headline em { color: var(--accent); }
.tm-faces { display: inline-flex; vertical-align: middle; margin-inline: .08em .14em; translate: 0 -.05em; }
.tm-faces img {
  width: .8em; height: .8em; margin-inline-start: -.26em; border: 3px solid var(--mono-dark); border-radius: 50%;
  object-fit: cover; object-position: 50% 22%;
  animation: tm-pop .9s var(--tm-ease) backwards; animation-delay: calc(.25s + var(--i, 0) * .08s);
}
.tm-faces img:first-child { margin-inline-start: 0; }
@keyframes tm-pop { from { opacity: 0; scale: .3; } }
.tm-lede { max-width: 500px; margin: clamp(22px, 3vw, 34px) 0 0; color: var(--mono-muted); font: 400 16px/1.8 var(--editorial-sans); }

/* ---------- Portrait accordion ---------- */
.tm-accordion { display: flex; gap: 8px; height: clamp(460px, 74vh, 700px); padding-inline: var(--tm-gutter); }
.tm-panel {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; background: var(--mono-panel); cursor: pointer;
  transition: flex-grow .9s var(--tm-ease);
  animation: tm-rise 1.1s var(--tm-ease) backwards; animation-delay: calc(.15s + var(--i, 0) * .08s);
  -webkit-tap-highlight-color: transparent;
}
.tm-panel.is-active { flex-grow: 4.4; cursor: default; }
@keyframes tm-rise { from { opacity: 0; transform: translateY(40px); } }
.tm-panel-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  filter: grayscale(.9) brightness(.6); scale: 1.08;
  transition: filter .8s ease, scale 1.4s var(--tm-ease);
}
.tm-panel.is-active .tm-panel-img { filter: none; scale: 1; }
.tm-panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 7, 6, .88) 0%, rgba(8, 7, 6, .25) 48%, transparent 72%);
}
.tm-panel-num { position: absolute; top: 16px; inset-inline-start: 16px; z-index: 2; color: #f2efe9; font: 500 11px/1 var(--tm-mono); letter-spacing: .1em; }
.tm-panel-spine {
  position: absolute; bottom: 24px; left: 50%; z-index: 2;
  color: #f2efe9; font: 500 clamp(18px, 1.7vw, 24px)/1 var(--editorial-serif); white-space: nowrap;
  writing-mode: vertical-rl; rotate: 180deg; translate: -50% 0;
  transition: opacity .35s ease;
}
.tm-panel.is-active .tm-panel-spine { opacity: 0; }
.tm-panel-body {
  position: absolute; inset-inline: clamp(20px, 2.6vw, 40px); bottom: clamp(22px, 2.6vw, 38px); z-index: 2;
  max-width: 460px; color: #f2efe9;
  opacity: 0; translate: 0 22px; pointer-events: none;
  transition: opacity .45s ease, translate .8s var(--tm-ease);
}
.tm-panel.is-active .tm-panel-body { opacity: 1; translate: 0 0; pointer-events: auto; transition-delay: .25s; }
.tm-panel-role { margin: 0 0 12px; color: #e8a26f; font: 500 10px/1.3 var(--tm-mono); letter-spacing: .2em; text-transform: uppercase; }
.tm-panel-name { margin: 0; font: 500 clamp(34px, 3.6vw, 60px)/1 var(--editorial-serif); letter-spacing: -.03em; white-space: nowrap; }
.tm-panel-bio { max-width: 380px; margin: 14px 0 24px; color: rgba(242, 239, 233, .78); font: 400 15px/1.7 var(--editorial-sans); }
.tm-panel-link { display: inline-flex; align-items: center; gap: 12px; color: #fff !important; font: 600 11px/1 var(--editorial-sans); letter-spacing: .16em; text-transform: uppercase; }
.tm-panel-link b { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 50%; font-weight: 400; transition: background-color .35s, border-color .35s, rotate .6s var(--tm-ease); }
.tm-panel-link:hover b, .tm-panel-link:focus-visible b { background: var(--accent); border-color: var(--accent); rotate: 45deg; }

/* ---------- End credits ---------- */
.tm-credits { display: grid; justify-items: center; padding: clamp(100px, 13vw, 180px) var(--tm-gutter) clamp(70px, 9vw, 120px); text-align: center; }
.tm-credits-title {
  display: flex; align-items: center; gap: 18px; margin: 0 0 clamp(36px, 5vw, 64px);
  color: var(--mono-muted); font: 500 11px/1 var(--tm-mono); letter-spacing: .34em; text-transform: uppercase;
}
.tm-credits-title::before, .tm-credits-title::after { content: ""; width: 44px; height: 1px; background: currentColor; opacity: .5; }
.tm-credits-list { display: grid; gap: 2px; width: min(880px, 100%); margin: 0; padding: 0; list-style: none; }
.tm-credits-list a { display: grid; grid-template-columns: auto minmax(24px, 1fr) auto; align-items: baseline; gap: 18px; padding: 14px 0; }
.tm-credit-role { color: var(--mono-muted); font: 500 11px/1.3 var(--tm-mono); letter-spacing: .16em; text-transform: uppercase; text-align: start; }
.tm-credits-list i { border-bottom: 1px dotted color-mix(in srgb, var(--mono-text) 32%, transparent); translate: 0 -5px; transition: border-color .4s ease; }
.tm-credit-name { font: 500 clamp(28px, 3.3vw, 50px)/1.1 var(--editorial-serif); letter-spacing: -.02em; transition: color .35s ease; }
.tm-credits-list a:hover .tm-credit-name { color: var(--accent); }
.tm-credits-list a:hover i { border-bottom-color: var(--accent); }
.tm-credits-end { margin: clamp(34px, 4vw, 52px) 0 0; color: var(--mono-muted); font: italic 500 clamp(20px, 2vw, 28px)/1.4 var(--editorial-serif); }
.tm-credits-list li, .tm-credits-end, .tm-join { opacity: 0; transform: translateY(22px); transition: opacity .8s ease var(--d, 0ms), transform 1s var(--tm-ease) var(--d, 0ms); }
.tm-credits-list li.is-in, .tm-credits-end.is-in, .tm-join.is-in { opacity: 1; transform: none; }

/* ---------- Join band ---------- */
.tm-join {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px;
  margin: 0 var(--tm-gutter) clamp(70px, 9vw, 120px); padding-block: clamp(26px, 4vw, 44px);
  border-block: 1px solid var(--mono-line);
}
.tm-join p { margin: 0; font: 500 clamp(26px, 3vw, 46px)/1.15 var(--editorial-serif); letter-spacing: -.02em; }

/* =========================================================================
   MEMBER PAGE
   ========================================================================= */
.tm-member { padding-bottom: clamp(70px, 9vw, 120px); }

.tm-crumbs {
  display: flex; align-items: center; gap: 12px; padding: 18px var(--tm-gutter); border-bottom: 1px solid var(--mono-line);
  color: var(--mono-muted); font: 500 10px/1.3 var(--tm-mono); letter-spacing: .16em; text-transform: uppercase;
}
.tm-crumbs a { transition: color .3s ease; }
.tm-crumbs a:hover { color: var(--accent); }
.tm-crumbs [aria-current] { color: var(--mono-text); }
.tm-crumbs-back { margin-inline-start: auto; }
.tm-crumbs-back b { display: inline-block; font-weight: 400; transition: translate .4s var(--tm-ease); }
.tm-crumbs-back:hover b { translate: -4px 0; }
html[dir="rtl"] .tm-crumbs-back b { scale: -1 1; }
html[dir="rtl"] .tm-crumbs-back:hover b { translate: 4px 0; }

/* ---------- Profile: arched portrait + spec sheet ---------- */
.tm-profile {
  display: grid; grid-template-columns: minmax(260px, .85fr) minmax(0, 1fr); align-items: center;
  gap: clamp(36px, 7vw, 120px); padding: clamp(46px, 6vw, 96px) var(--tm-gutter);
}
.tm-arch { justify-self: center; width: min(100%, 430px); margin: 0; }
.tm-arch-frame { position: relative; isolation: isolate; display: block; }
.tm-arch-frame::before {
  content: ""; position: absolute; z-index: -1; inset-block: 18px -18px; inset-inline: 18px -18px;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 999px 999px 0 0;
}
.tm-arch img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 25%;
  border-radius: 999px 999px 0 0;
  animation: tm-arch-in 1.5s var(--tm-ease) backwards .1s;
}
@keyframes tm-arch-in { from { clip-path: inset(100% 0 0 0 round 999px 999px 0 0); } to { clip-path: inset(0 0 0 0 round 999px 999px 0 0); } }
.tm-arch figcaption { margin-top: 30px; color: var(--mono-muted); font: 500 10px/1 var(--tm-mono); letter-spacing: .18em; text-transform: uppercase; text-align: center; }

.tm-profile-copy { animation: tm-rise 1.1s var(--tm-ease) backwards .3s; }
.tm-profile-kicker { margin: 0; color: var(--mono-muted); font: 500 11px/1 var(--tm-mono); letter-spacing: .18em; text-transform: uppercase; }
.tm-profile-kicker bdi { margin: 0 10px; color: var(--accent); font-family: var(--tm-mono); }
.tm-profile h1 { margin: 20px 0 8px; color: var(--mono-text); font: 500 clamp(50px, 6.2vw, 100px)/.95 var(--editorial-serif); letter-spacing: -.04em; }
.tm-profile-role { margin: 0; color: var(--accent); font: italic 500 clamp(22px, 2.2vw, 32px)/1.2 var(--editorial-serif); }
.tm-profile-bio { max-width: 470px; margin: 24px 0 30px; color: var(--mono-muted); font: 400 16px/1.8 var(--editorial-sans); }
.tm-spec { max-width: 470px; margin: 0 0 34px; border-top: 1px solid var(--mono-line); }
.tm-spec div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--mono-line); }
.tm-spec dt { color: var(--mono-muted); font: 500 10px/1.5 var(--tm-mono); letter-spacing: .14em; text-transform: uppercase; }
.tm-spec dd { margin: 0; font: 500 15px/1.3 var(--editorial-sans); text-align: end; }
.tm-profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.tm-text-link { padding-bottom: 4px; border-bottom: 1px solid var(--mono-line); color: var(--mono-muted) !important; font: 500 12px/1 var(--editorial-sans); letter-spacing: .12em; text-transform: uppercase; transition: color .3s, border-color .3s; }
.tm-text-link:hover { color: var(--mono-text) !important; border-color: var(--accent); }

/* ---------- Contact sheet ---------- */
.tm-sheet { padding: clamp(60px, 8vw, 110px) var(--tm-gutter); border-top: 1px solid var(--mono-line); scroll-margin-top: 84px; }
.tm-sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin-bottom: clamp(26px, 4vw, 46px); }
.tm-sheet-head h2 { margin: 0; color: var(--mono-text); font: 500 clamp(36px, 4.2vw, 66px)/1 var(--editorial-serif); letter-spacing: -.03em; }
.tm-sheet-head p { margin: 0; color: var(--mono-muted); font: 500 11px/1.4 var(--tm-mono); letter-spacing: .14em; text-transform: uppercase; }
.tm-sheet-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: clamp(24px, 4vw, 64px); }

.tm-stage { position: sticky; top: 108px; margin: 0; }
.tm-stage-frame { display: grid; place-items: center; height: min(72vh, 660px); overflow: hidden; background: var(--mono-panel); cursor: pointer; }
.tm-stage-frame img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.tm-stage-frame.is-wipe img { animation: tm-wipe .9s var(--tm-ease); }
@keyframes tm-wipe { from { clip-path: inset(0 100% 0 0); scale: 1.05; } to { clip-path: inset(0 0 0 0); scale: 1; } }
html[dir="rtl"] .tm-stage-frame.is-wipe img { animation-name: tm-wipe-rtl; }
@keyframes tm-wipe-rtl { from { clip-path: inset(0 0 0 100%); scale: 1.05; } to { clip-path: inset(0 0 0 0); scale: 1; } }
.tm-stage figcaption { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.tm-stage-count { color: var(--mono-muted); font: 500 12px/1 var(--tm-mono); letter-spacing: .12em; direction: ltr; }
.tm-stage-count b { color: var(--mono-text); font-weight: 500; }
.tm-stage-nav { display: flex; gap: 8px; }
.tm-stage-nav button {
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid var(--mono-line); border-radius: 50%;
  background: none; color: var(--mono-text); font-size: 17px; cursor: pointer; transition: background-color .3s, border-color .3s, color .3s;
}
.tm-stage-nav button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.tm-stage-nav b { font-weight: 400; }
html[dir="rtl"] .tm-stage-nav b { display: inline-block; scale: -1 1; }

/* The sheet itself: printed paper, numbered frames, grease-pencil circle on the pick */
.tm-contact {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 16px;
  margin: 0; padding: clamp(16px, 2vw, 26px); list-style: none;
  background: #ece5d8; box-shadow: 0 30px 70px rgba(0, 0, 0, .3);
  rotate: -.6deg;
}
html[dir="rtl"] .tm-contact { rotate: .6deg; }
.tm-contact button { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tm-contact img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; opacity: .7; filter: grayscale(.3); transition: opacity .35s ease, filter .35s ease; }
.tm-contact button:hover img, .tm-contact button.is-current img { opacity: 1; filter: none; }
.tm-contact span { display: block; margin-top: 7px; color: #5b5246; font: 500 10px/1 var(--tm-mono); letter-spacing: .12em; text-align: start; direction: ltr; }
.tm-mark { position: absolute; top: -10px; left: -11px; width: calc(100% + 22px); height: calc(100% + 2px); overflow: visible; pointer-events: none; }
.tm-mark path {
  /* No non-scaling-stroke: it breaks pathLength dashes. The uneven stretch reads as a hand-drawn line. */
  fill: none; stroke: var(--tm-pencil); stroke-width: 1.5; stroke-linecap: round;
  stroke-dasharray: 1.02; stroke-dashoffset: 1.02; opacity: 0;
  transition: stroke-dashoffset .75s cubic-bezier(.65, 0, .35, 1), opacity .2s ease;
}
.tm-contact button.is-current .tm-mark path { stroke-dashoffset: 0; opacity: 1; }

/* ---------- More from the crew ---------- */
.tm-others { padding: clamp(60px, 8vw, 100px) var(--tm-gutter) 0; border-top: 1px solid var(--mono-line); text-align: center; }
.tm-others h2 { margin: 0 0 clamp(30px, 4vw, 48px); color: var(--mono-muted); font: 500 11px/1 var(--tm-mono); letter-spacing: .3em; text-transform: uppercase; }
/* Equal columns, so long names/roles can't push their neighbours around */
.tm-others ul {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start;
  gap: clamp(28px, 4vw, 48px) clamp(16px, 3vw, 40px); width: min(920px, 100%); margin: 0 auto; padding: 0; list-style: none;
}
.tm-others a { display: grid; justify-items: center; align-content: start; gap: 6px; }
.tm-other-name, .tm-other-role { max-width: 100%; text-wrap: balance; }
.tm-others img {
  width: clamp(88px, 9vw, 126px); height: auto; aspect-ratio: 1; margin-bottom: 10px; border-radius: 50%;
  object-fit: cover; object-position: 50% 22%; filter: grayscale(1);
  outline: 1px solid var(--mono-line); outline-offset: 5px;
  transition: filter .5s ease, scale .6s var(--tm-ease), outline-color .4s ease;
}
.tm-others a:hover img { filter: none; scale: 1.05; outline-color: var(--accent); }
.tm-other-name { font: 500 22px/1.1 var(--editorial-serif); }
.tm-other-role { color: var(--mono-muted); font: 500 10px/1.3 var(--tm-mono); letter-spacing: .12em; text-transform: uppercase; }

/* =========================================================================
   Arabic: Arabic faces, no tracking, no italics
   ========================================================================= */
html[dir="rtl"] .tm-headline,
html[dir="rtl"] .tm-panel-name,
html[dir="rtl"] .tm-panel-spine,
html[dir="rtl"] .tm-credit-name,
html[dir="rtl"] .tm-join p,
html[dir="rtl"] .tm-profile h1,
html[dir="rtl"] .tm-sheet-head h2,
html[dir="rtl"] .tm-other-name { font-family: var(--editorial-arabic-display); font-weight: 600; letter-spacing: 0; }
html[dir="rtl"] .tm-headline { font-size: clamp(40px, 5.4vw, 90px); line-height: 1.35; max-width: 14ch; }
html[dir="rtl"] .tm-headline em,
html[dir="rtl"] .tm-profile-role,
html[dir="rtl"] .tm-credits-end { font-style: normal; }
html[dir="rtl"] .tm-panel-name { font-size: clamp(30px, 3vw, 50px); line-height: 1.3; }
html[dir="rtl"] .tm-panel-spine { font-size: clamp(17px, 1.5vw, 21px); }
html[dir="rtl"] .tm-profile h1 { font-size: clamp(44px, 5.2vw, 84px); line-height: 1.25; }
html[dir="rtl"] .tm-profile-role { font: 600 clamp(20px, 2vw, 28px)/1.4 var(--editorial-arabic-sans); }
html[dir="rtl"] .tm-credit-name { font-size: clamp(26px, 2.8vw, 42px); line-height: 1.4; }
html[dir="rtl"] .tm-credits-end { font: 500 clamp(18px, 1.8vw, 24px)/1.6 var(--editorial-arabic-sans); }
html[dir="rtl"] .tm-lede,
html[dir="rtl"] .tm-panel-bio,
html[dir="rtl"] .tm-profile-bio { font-family: var(--editorial-arabic-sans); font-size: 16px; line-height: 1.9; }
html[dir="rtl"] .tm-masthead,
html[dir="rtl"] .tm-panel-role,
html[dir="rtl"] .tm-panel-link,
html[dir="rtl"] .tm-credits-title,
html[dir="rtl"] .tm-credit-role,
html[dir="rtl"] .tm-crumbs,
html[dir="rtl"] .tm-profile-kicker,
html[dir="rtl"] .tm-spec dt,
html[dir="rtl"] .tm-spec dd,
html[dir="rtl"] .tm-text-link,
html[dir="rtl"] .tm-sheet-head p,
html[dir="rtl"] .tm-arch figcaption,
html[dir="rtl"] .tm-others h2,
html[dir="rtl"] .tm-other-role { font-family: var(--editorial-arabic-sans); font-weight: 600; letter-spacing: 0; text-transform: none; }
html[dir="rtl"] .tm-masthead, html[dir="rtl"] .tm-crumbs, html[dir="rtl"] .tm-spec dt,
html[dir="rtl"] .tm-arch figcaption, html[dir="rtl"] .tm-other-role, html[dir="rtl"] .tm-sheet-head p { font-size: 13px; }
html[dir="rtl"] .tm-panel-role, html[dir="rtl"] .tm-credit-role, html[dir="rtl"] .tm-profile-kicker, html[dir="rtl"] .tm-text-link { font-size: 14px; }
html[dir="rtl"] .tm-panel-link, html[dir="rtl"] .tm-credits-title, html[dir="rtl"] .tm-others h2 { font-size: 15px; }
html[dir="rtl"] .tm-spec dd { font-size: 15px; }
html[dir="rtl"] .tm-panel-link b { scale: -1 1; }
html[dir="rtl"] .tm-panel-link:hover b, html[dir="rtl"] .tm-panel-link:focus-visible b { rotate: -45deg; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1000px) {
  .tm-profile { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .tm-arch { width: min(76%, 380px); }
  .tm-profile-copy { display: grid; justify-items: center; }
  .tm-profile-bio, .tm-spec { margin-inline: auto; }
  .tm-spec { width: 100%; text-align: start; }
  .tm-profile-actions { justify-content: center; }
  .tm-sheet-body { grid-template-columns: 1fr; }
  .tm-stage { position: static; }
  .tm-stage-frame { height: min(118vw, 600px); }
  .tm-contact { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 10px; rotate: 0deg !important; }
}

@media (max-width: 760px) {
  .tm-masthead { grid-template-columns: 1fr 1fr; }
  .tm-masthead span:nth-child(2) { text-align: end; }
  .tm-masthead span:last-child { display: none; }

  /* Accordion stacks vertically: tap a name to open it */
  .tm-accordion { flex-direction: column; height: auto; gap: 6px; }
  .tm-panel { flex: none; height: 84px; transition: height .8s var(--tm-ease); }
  .tm-panel.is-active { flex-grow: 0; height: min(124vw, 540px); }
  .tm-panel:not(.is-active)::after { background: rgba(8, 7, 6, .55); }
  .tm-panel-num { top: 50%; translate: 0 -50%; transition: top .5s var(--tm-ease), translate .5s var(--tm-ease); }
  .tm-panel.is-active .tm-panel-num { top: 16px; translate: 0 0; }
  .tm-panel-spine { top: 50%; bottom: auto; left: auto; inset-inline-start: 56px; writing-mode: horizontal-tb; rotate: none; translate: 0 -50%; font-size: 24px; }
  .tm-panel-name { white-space: normal; }
  .tm-panel-bio { font-size: 14.5px; margin-bottom: 18px; }

  .tm-credits-list a { grid-template-columns: 1fr; gap: 6px; justify-items: center; padding: 12px 0; }
  .tm-credits-list i { display: none; }
  .tm-credit-role { text-align: center; }
  .tm-join { flex-direction: column; align-items: flex-start; }

  .tm-crumbs > span:not(.tm-crumbs-back), .tm-crumbs > a:first-child { display: none; }
  .tm-crumbs-back { margin-inline-start: 0; }
  .tm-others ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-others img { width: clamp(96px, 30vw, 124px); }
  .tm-other-name { font-size: 20px; }
  .tm-contact { gap: 14px 6px; padding: 10px; }
  .tm-contact span { font-size: 8px; margin-top: 5px; }
  .tm-mark { top: -6px; left: -6px; width: calc(100% + 12px); height: calc(100% - 2px); }
}

@media (prefers-reduced-motion: reduce) {
  .tm-panel, .tm-panel-img, .tm-panel-body, .tm-faces img, .tm-arch img, .tm-profile-copy,
  .tm-stage-frame img, .tm-mark path { animation: none !important; transition: none !important; }
  .tm-credits-list li, .tm-credits-end, .tm-join { opacity: 1; transform: none; transition: none; }
}

/* No visible member / offline: "coming soon" in place of the accordion and the credits (team.js). */
.tm-is-empty .tm-accordion, .tm-is-empty .tm-credits { display: none; }
.tm-is-empty .tm-lede { display: grid; gap: 10px; max-width: 520px; }
.tm-empty-title { color: var(--accent); font: 500 clamp(30px, 3.2vw, 44px)/1.1 var(--editorial-serif); letter-spacing: -.02em; }
.tm-empty-text { color: var(--mono-muted); }
html[dir="rtl"] .tm-empty-title { font-family: var(--editorial-arabic-display); font-weight: 600; letter-spacing: 0; }
