/* ============================================================================
   GSC-TEMPC — TEAM PROFILE / PREMIUM OVERLAY   (v3)
   --------------------------------------------------------------------------
   Editorial, annual-report style profile experience for the Organizational
   Structure.

   Design language
   - deep forest-green portrait gallery beside a warm ivory "paper" page
   - antique gold used sparingly: hairlines, corner brackets, one progress line
   - large display name as the single memorable element; everything else quiet
   - paper grain, inset gold frame, fine ledger rules

   v3 upgrades
   - direction-aware content transitions (next / previous / open)
   - portrait: 4-corner gold brackets, mouse tilt + spotlight, loading shimmer,
     light sweep, logo fallback, dynamic ghost numeral
   - facts with icons, quote-style statement, keyboard hints
   - navigation shows neighbour names + gold progress line
   - mobile bottom sheet with grabber, swipe to browse
   - all small type raised for legibility
   - scroll-lock + click fixes from v2 are kept at the bottom of this file
============================================================================ */

@keyframes tmRise       { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes tmSlideNext  { from { opacity: 0; transform: translateX(38px); } to { opacity: 1; transform: translateX(0); } }
@keyframes tmSlidePrev  { from { opacity: 0; transform: translateX(-38px); } to { opacity: 1; transform: translateX(0); } }
@keyframes tmPortraitIn { from { opacity: 0; transform: translateY(16px) scale(.94); filter: blur(6px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes tmSweep      { from { transform: translateX(-130%) skewX(-18deg); opacity: 0; } 20% { opacity: 1; } to { transform: translateX(260%) skewX(-18deg); opacity: 0; } }
@keyframes tmSkeleton   { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes tmLedger     { from { background-position: 0% 0; } to { background-position: 200% 0; } }

.gsc-team-modal,
.gsc-team-modal *,
.gsc-team-modal *::before,
.gsc-team-modal *::after {
    box-sizing: border-box;
}

.gsc-team-modal {
    --tm-forest-950: #04160e;
    --tm-forest: #08291b;
    --tm-forest-2: #0d4630;
    --tm-forest-3: #17694a;
    --tm-ivory: #faf7ee;
    --tm-paper: #fffdf8;
    --tm-ink: #15342a;
    --tm-muted: #66726a;
    --tm-gold: #b48a3c;
    --tm-gold-deep: #8a6a2b;
    --tm-gold-light: #dcc27a;
    --tm-gold-pale: #f0dca0;
    --tm-line: rgba(19, 57, 39, .14);
    --tm-ease: cubic-bezier(.22, 1, .36, 1);

    --tm-display: var(--oc-font-display, Fraunces, Georgia, serif);
    --tm-body: var(--oc-font-body, Poppins, 'Inter', sans-serif);
    --tm-nav-h: 88px;
    --tm-shell-max: min(880px, 92vh);
    --tm-anim-name: tmRise;

    /* Paper grain (tiny inline SVG noise, no extra request). */
    --tm-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .26 0 0 0 0 .14 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 3vw, 46px);
    font-family: var(--tm-body);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .38s ease, visibility .38s ease;
}

.gsc-team-modal[data-dir="next"] { --tm-anim-name: tmSlideNext; }
.gsc-team-modal[data-dir="prev"] { --tm-anim-name: tmSlidePrev; }

.gsc-team-modal button {
    font-family: inherit;
}

.gsc-team-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* ---------------------------------------------------------------- backdrop */
.gsc-team-modal__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 42%, rgba(23, 105, 74, .22), transparent 46%),
        radial-gradient(circle at 50% 120%, rgba(0, 0, 0, .55), transparent 60%),
        rgba(3, 16, 10, .82);
    backdrop-filter: blur(9px) saturate(1.1);
    -webkit-backdrop-filter: blur(9px) saturate(1.1);
}

/* ------------------------------------------------------------------- shell */
.gsc-team-modal__shell {
    position: relative;
    z-index: 2;
    width: min(1200px, 100%);
    max-height: var(--tm-shell-max);
    overflow: hidden;
    border: 1px solid rgba(204, 171, 96, .52);
    background:
        radial-gradient(circle at 90% 8%, rgba(180, 138, 60, .09), transparent 28%),
        linear-gradient(135deg, #fffdf8 0%, #f8f4ea 54%, #efe9db 100%);
    box-shadow:
        0 60px 140px rgba(0, 0, 0, .45),
        0 0 0 1px rgba(255, 255, 255, .04),
        0 1px 0 rgba(255, 255, 255, .85) inset;
    opacity: 0;
    transform: translateY(36px) scale(.98);
    transition: transform .7s var(--tm-ease), opacity .45s ease;
}

.gsc-team-modal.is-ready .gsc-team-modal__shell {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* faint ledger grid on the paper */
.gsc-team-modal__shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .4;
    background:
        linear-gradient(90deg, rgba(24, 61, 42, .045) 1px, transparent 1px),
        linear-gradient(rgba(24, 61, 42, .035) 1px, transparent 1px);
    background-size: 76px 76px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

/* inset gold frame — the "matted print" detail */
.gsc-team-modal__shell::after {
    content: "";
    position: absolute;
    inset: 9px;
    z-index: 7;
    pointer-events: none;
    border: 1px solid rgba(214, 180, 100, .3);
}

.gsc-team-modal__grabber {
    display: none;
}

.gsc-team-modal__ledger {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 8;
    height: 4px;
    display: grid;
    grid-template-columns: 1fr 200px 1fr;
}

.gsc-team-modal__ledger span:nth-child(1),
.gsc-team-modal__ledger span:nth-child(3) {
    background: var(--tm-forest);
}

.gsc-team-modal__ledger span:nth-child(2) {
    background: linear-gradient(90deg, var(--tm-gold), var(--tm-gold-pale), var(--tm-gold), var(--tm-gold-pale), var(--tm-gold));
    background-size: 200% 100%;
    animation: tmLedger 6s linear infinite;
}

/* ------------------------------------------------------------- close button */
.gsc-team-modal__close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(25, 57, 42, .2);
    background: rgba(255, 253, 248, .8);
    color: var(--tm-forest);
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.gsc-team-modal__close span {
    display: block;
    margin-top: -3px;
    font-family: Arial, sans-serif;
    font-size: 1.7rem;
    font-weight: 300;
    line-height: 1;
    transition: transform .45s var(--tm-ease);
}

.gsc-team-modal__close:hover {
    background: var(--tm-forest);
    color: var(--tm-gold-pale);
    border-color: var(--tm-forest);
    box-shadow: 0 12px 30px rgba(8, 41, 27, .28);
}

.gsc-team-modal__close:hover span {
    transform: rotate(90deg);
}

/* ------------------------------------------------------------------ layout */
.gsc-team-modal__content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(300px, .74fr) minmax(0, 1.26fr);
    min-height: 610px;
    max-height: calc(var(--tm-shell-max) - var(--tm-nav-h));
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(180, 138, 60, .55) transparent;
}

.gsc-team-modal__content::-webkit-scrollbar { width: 6px; }
.gsc-team-modal__content::-webkit-scrollbar-thumb { background: rgba(180, 138, 60, .55); }

/* ---------------------------------------------------------- portrait column */
.gsc-team-modal__portrait-column {
    --mx: 50%;
    --my: 40%;

    position: relative;
    min-height: 610px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 96px clamp(28px, 4vw, 60px) 46px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 50% 42%, rgba(58, 131, 88, .34), transparent 32%),
        radial-gradient(circle at 50% 108%, rgba(180, 138, 60, .16), transparent 46%),
        linear-gradient(150deg, #0a3826 0%, #0b432b 50%, #052619 100%);
}

/* dynamic ghost numeral (value comes from data-ghost, set by team.php) */
.gsc-team-modal__portrait-column::before {
    content: attr(data-ghost);
    position: absolute;
    left: -5%;
    bottom: -14%;
    color: rgba(255, 255, 255, .04);
    font-family: var(--tm-display);
    font-size: clamp(12rem, 24vw, 21rem);
    font-weight: 600;
    line-height: .7;
    letter-spacing: -.06em;
    pointer-events: none;
}

.gsc-team-modal__portrait-column::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 58px 58px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 82%);
    mask-image: linear-gradient(180deg, #000, transparent 82%);
}

/* soft gold light that follows the pointer */
.gsc-team-modal__spotlight {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(440px circle at var(--mx) var(--my), rgba(226, 201, 126, .17), transparent 62%);
    transition: opacity .3s ease;
}

.gsc-team-modal__brand {
    position: absolute;
    top: 30px;
    left: 34px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gsc-team-modal__brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    padding: 3px;
    border-radius: 50%;
    background: rgba(255, 253, 248, .94);
    box-shadow: 0 0 0 1px rgba(221, 194, 124, .6);
}

.gsc-team-modal__brand span {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--tm-gold-pale);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    line-height: 1;
}

.gsc-team-modal__brand small {
    color: rgba(255, 255, 255, .52);
    font-size: .6rem;
    font-weight: 500;
    letter-spacing: .08em;
}

.gsc-team-modal__portrait-frame {
    position: relative;
    z-index: 2;
    width: min(320px, 70vw);
    aspect-ratio: 4 / 5;
    display: grid;
    place-items: center;
}

/* halo = rotated gold hairline with four corner brackets */
.gsc-team-modal__portrait-halo {
    position: absolute;
    inset: 6%;
    border: 1px solid rgba(222, 194, 124, .5);
    box-shadow:
        0 0 0 10px rgba(255, 255, 255, .022),
        0 0 0 11px rgba(221, 194, 124, .13),
        0 26px 80px rgba(0, 0, 0, .34);
    transform: rotate(2deg);
    background:
        linear-gradient(var(--tm-gold-pale), var(--tm-gold-pale)) left top / 46px 2px no-repeat,
        linear-gradient(var(--tm-gold-pale), var(--tm-gold-pale)) left top / 2px 46px no-repeat,
        linear-gradient(var(--tm-gold-pale), var(--tm-gold-pale)) right top / 46px 2px no-repeat,
        linear-gradient(var(--tm-gold-pale), var(--tm-gold-pale)) right top / 2px 46px no-repeat,
        linear-gradient(var(--tm-gold-pale), var(--tm-gold-pale)) left bottom / 46px 2px no-repeat,
        linear-gradient(var(--tm-gold-pale), var(--tm-gold-pale)) left bottom / 2px 46px no-repeat,
        linear-gradient(var(--tm-gold-pale), var(--tm-gold-pale)) right bottom / 46px 2px no-repeat,
        linear-gradient(var(--tm-gold-pale), var(--tm-gold-pale)) right bottom / 2px 46px no-repeat;
}

.gsc-team-modal__portrait-tilt {
    position: relative;
    z-index: 2;
    width: 72%;
    height: 78%;
    transform: perspective(1000px) rotateX(var(--tm-ry, 0deg)) rotateY(var(--tm-rx, 0deg));
    transition: transform .5s var(--tm-ease);
    will-change: transform;
}

/* loading shimmer sits under the image and only shows while loading */
.gsc-team-modal__portrait-tilt::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border: 8px solid rgba(250, 247, 238, .94);
    background: linear-gradient(100deg, #e6dfcd 30%, #f6f1e3 50%, #e6dfcd 70%);
    background-size: 200% 100%;
    animation: tmSkeleton 1.3s linear infinite;
    opacity: 0;
    transition: opacity .3s ease;
}

.gsc-team-modal__portrait-frame.is-loading .gsc-team-modal__portrait-tilt::before {
    opacity: 1;
}

.gsc-team-modal__portrait {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border: 8px solid rgba(250, 247, 238, .94);
    background: #e9e3d6;
    box-shadow:
        0 0 0 1px rgba(205, 171, 91, .9),
        0 32px 80px rgba(0, 0, 0, .4);
    filter: saturate(.94) contrast(1.03);
    opacity: 1;
    transition: opacity .55s ease;
}

.gsc-team-modal__portrait-frame.is-loading .gsc-team-modal__portrait {
    opacity: 0;
}

/* no photo / broken photo -> the seal on a soft paper card */
.gsc-team-modal__portrait-frame.is-fallback .gsc-team-modal__portrait {
    object-fit: contain;
    padding: 28px;
    background: radial-gradient(circle at 50% 38%, #fffdf6, #ebe4d0);
    filter: none;
}

/* one-time light sweep across the portrait */
.gsc-team-modal__portrait-sheen {
    position: absolute;
    inset: 8px;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.gsc-team-modal__portrait-sheen::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40%;
    opacity: 0;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .34), transparent);
}

.gsc-team-modal.is-animating .gsc-team-modal__portrait-sheen::after {
    animation: tmSweep 1.5s .55s var(--tm-ease) both;
}

.gsc-team-modal__portrait-mark {
    position: absolute;
    z-index: 4;
    right: 6%;
    bottom: 5%;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(221, 194, 124, .8);
    background: linear-gradient(145deg, var(--tm-forest-2), var(--tm-forest));
    color: var(--tm-gold-pale);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28), 0 0 0 4px rgba(8, 41, 27, .55);
}

.gsc-team-modal__portrait-mark i {
    font-size: .95rem;
}

.gsc-team-modal__portrait-caption {
    position: relative;
    z-index: 2;
    width: min(320px, 70vw);
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, .78);
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.gsc-team-modal__caption-rule {
    width: 38px;
    height: 1px;
    flex: 0 0 auto;
    background: var(--tm-gold-light);
}

/* ----------------------------------------------------------- profile column */
.gsc-team-modal__profile {
    position: relative;
    min-width: 0;
    padding: clamp(60px, 6vw, 90px) clamp(34px, 6vw, 88px) 40px;
}

/* paper grain */
.gsc-team-modal__profile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--tm-grain);
    opacity: .32;
    mix-blend-mode: multiply;
}

.gsc-team-modal__profile > * {
    position: relative;
    z-index: 1;
}

.gsc-team-modal__header {
    position: relative;
    padding-right: 64px;
}

.gsc-team-modal__kicker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.gsc-team-modal__kicker-line {
    width: 42px;
    height: 1px;
    background: var(--tm-gold);
}

.gsc-team-modal__kicker {
    color: var(--tm-gold-deep);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.gsc-team-modal__chapter {
    position: absolute;
    top: -6px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    color: #7a837d;
    font-size: .58rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gsc-team-modal__chapter strong {
    color: var(--tm-forest);
    font-family: var(--tm-display);
    font-size: 2.5rem;
    font-weight: 600;
    line-height: .8;
    letter-spacing: -.04em;
    font-variant-numeric: lining-nums;
}

/* the memorable element: the name */
.gsc-team-modal__header h2 {
    max-width: 760px;
    margin: 0;
    color: var(--tm-forest);
    font-family: var(--tm-display);
    font-size: clamp(2.7rem, 4.8vw, 5rem);
    font-weight: 600;
    line-height: .93;
    letter-spacing: -.05em;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.gsc-team-modal__header h2[data-len="long"] { font-size: clamp(2.2rem, 3.8vw, 3.8rem); line-height: .98; }
.gsc-team-modal__header h2[data-len="xl"]   { font-size: clamp(1.9rem, 3.1vw, 3.1rem); line-height: 1.02; letter-spacing: -.035em; }

.gsc-team-modal__position {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin: 24px 0 0;
    padding: 9px 18px 9px 15px;
    border: 1px solid rgba(180, 138, 60, .42);
    background: linear-gradient(90deg, rgba(180, 138, 60, .11), rgba(180, 138, 60, .02));
    color: #465a4e;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .13em;
    line-height: 1.4;
    text-transform: uppercase;
}

.gsc-team-modal__position::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    background: var(--tm-gold);
    transform: rotate(45deg);
}

.gsc-team-modal__position:empty {
    display: none;
}

.gsc-team-modal__hairline {
    position: relative;
    height: 1px;
    margin: 32px 0 28px;
    background: rgba(22, 60, 41, .15);
}

.gsc-team-modal__hairline span {
    position: absolute;
    left: 0;
    top: -1px;
    width: 110px;
    height: 3px;
    background: linear-gradient(90deg, var(--tm-gold), rgba(180, 138, 60, .06));
}

/* facts */
.gsc-team-modal__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--tm-line);
    border-left: 1px solid var(--tm-line);
}

.gsc-team-modal__fact {
    position: relative;
    min-width: 0;
    min-height: 92px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px 20px 16px;
    border-right: 1px solid var(--tm-line);
    border-bottom: 1px solid var(--tm-line);
    background: rgba(255, 255, 255, .34);
    transition: background .3s ease;
}

.gsc-team-modal__fact::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -1px;
    bottom: -1px;
    width: 2px;
    background: var(--tm-gold);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .4s var(--tm-ease);
}

.gsc-team-modal__fact:hover {
    background: rgba(255, 255, 255, .78);
}

.gsc-team-modal__fact:hover::before {
    transform: scaleY(1);
}

.gsc-team-modal__fact-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(180, 138, 60, .38);
    background: rgba(180, 138, 60, .08);
    color: var(--tm-gold-deep);
    font-size: .8rem;
    transition: background .3s ease, color .3s ease, border-color .3s ease;
}

.gsc-team-modal__fact:hover .gsc-team-modal__fact-icon {
    background: var(--tm-forest);
    border-color: var(--tm-forest);
    color: var(--tm-gold-pale);
}

.gsc-team-modal__fact-body {
    min-width: 0;
}

.gsc-team-modal__fact-label {
    display: block;
    margin-bottom: 7px;
    color: var(--tm-gold-deep);
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.gsc-team-modal__fact strong {
    display: block;
    color: var(--tm-ink);
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.gsc-team-modal__fact-note {
    display: block;
    margin-top: 4px;
    color: var(--tm-muted);
    font-size: .72rem;
    line-height: 1.45;
}

.gsc-team-modal__fact-note:empty {
    display: none;
}

/* statement */
.gsc-team-modal__statement {
    position: relative;
    margin-top: 30px;
    padding: 26px 26px 26px 30px;
    border-left: 2px solid var(--tm-gold);
    background: linear-gradient(90deg, rgba(180, 138, 60, .09), transparent 78%);
    overflow: hidden;
}

.gsc-team-modal__statement::before {
    content: "“";
    position: absolute;
    top: -6px;
    right: 22px;
    color: rgba(180, 138, 60, .2);
    font-family: var(--tm-display);
    font-size: 6.5rem;
    line-height: 1;
    pointer-events: none;
}

.gsc-team-modal__statement-label {
    display: block;
    margin-bottom: 12px;
    color: var(--tm-gold-deep);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.gsc-team-modal__statement p {
    position: relative;
    max-width: 640px;
    margin: 0;
    color: #43524a;
    font-size: .92rem;
    line-height: 1.85;
}

/* footer */
.gsc-team-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 26px;
}

.gsc-team-modal__footer-left {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.gsc-team-modal__footer-mark {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--tm-gold);
}

.gsc-team-modal__footer-mark span {
    width: 28px;
    height: 1px;
    background: rgba(180, 138, 60, .45);
}

.gsc-team-modal__footer-mark i {
    font-size: .62rem;
}

.gsc-team-modal__hints {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7c847e;
    font-size: .64rem;
    font-weight: 500;
    letter-spacing: .04em;
}

.gsc-team-modal__hints kbd {
    min-width: 24px;
    padding: 3px 7px;
    border: 1px solid rgba(19, 57, 39, .2);
    border-bottom-width: 2px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .7);
    color: var(--tm-forest);
    font-family: inherit;
    font-size: .62rem;
    font-weight: 600;
    text-align: center;
}

.gsc-team-modal__hints span {
    margin-right: 10px;
}

.gsc-team-modal__footer-copy {
    color: #7c847e;
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-align: right;
}

/* -------------------------------------------------------------- navigation */
.gsc-team-modal__navigation {
    position: relative;
    z-index: 8;
    min-height: var(--tm-nav-h);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 0 clamp(24px, 4vw, 60px);
    border-top: 1px solid rgba(24, 61, 42, .13);
    background: rgba(255, 253, 248, .88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* progress line: how far through the directory this profile is */
.gsc-team-modal__progress {
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 2px;
    background: rgba(19, 57, 39, .08);
}

.gsc-team-modal__progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--tm-gold), var(--tm-gold-pale));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .7s var(--tm-ease);
}

.gsc-team-modal__nav {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tm-forest);
    cursor: pointer;
    transition: opacity .2s ease;
}

.gsc-team-modal__nav--next {
    justify-self: end;
}

.gsc-team-modal__nav-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(19, 57, 39, .22);
    border-radius: 50%;
    font-size: .8rem;
    transition: background .3s ease, color .3s ease, border-color .3s ease, transform .4s var(--tm-ease);
}

.gsc-team-modal__nav:hover:not(:disabled) .gsc-team-modal__nav-icon {
    background: var(--tm-forest);
    border-color: var(--tm-forest);
    color: var(--tm-gold-pale);
}

.gsc-team-modal__nav--prev:hover:not(:disabled) .gsc-team-modal__nav-icon { transform: translateX(-4px); }
.gsc-team-modal__nav--next:hover:not(:disabled) .gsc-team-modal__nav-icon { transform: translateX(4px); }

.gsc-team-modal__nav-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    text-align: left;
}

.gsc-team-modal__nav--next .gsc-team-modal__nav-copy {
    align-items: flex-end;
    text-align: right;
}

.gsc-team-modal__nav-copy small {
    color: var(--tm-gold-deep);
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.gsc-team-modal__nav-copy strong {
    max-width: 220px;
    overflow: hidden;
    color: var(--tm-ink);
    font-size: .82rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gsc-team-modal__nav:disabled {
    opacity: .28;
    cursor: default;
}

.gsc-team-modal__nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.gsc-team-modal__nav-label {
    color: #8a938c;
    font-size: .56rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.gsc-team-modal__nav-status {
    color: var(--tm-forest);
    font-family: var(--tm-display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: .03em;
    font-variant-numeric: lining-nums tabular-nums;
}

.gsc-team-modal__close:focus-visible,
.gsc-team-modal__nav:focus-visible {
    outline: 2px solid rgba(180, 138, 60, .9);
    outline-offset: 4px;
}

/* ---------------------------------------------------- staged transitions
   Every .tm-reveal element animates in with a small stagger (--i). Direction
   comes from data-dir on the modal: open = rise, next = from right, prev = from
   left. The classes are re-applied by team.php on every profile change.       */
.gsc-team-modal.is-animating .tm-reveal {
    animation-name: var(--tm-anim-name);
    animation-duration: .8s;
    animation-timing-function: var(--tm-ease);
    animation-fill-mode: both;
    animation-delay: calc(var(--i, 0) * 55ms + 40ms);
}

.gsc-team-modal.is-animating .gsc-team-modal__portrait-frame {
    animation: tmPortraitIn 1s var(--tm-ease) both;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
    .gsc-team-modal__nav-copy strong { max-width: 150px; }
    .gsc-team-modal__hints { display: none; }
}

@media (max-width: 900px) {
    .gsc-team-modal { padding: 14px; }
    .gsc-team-modal__shell { --tm-shell-max: 94vh; }

    .gsc-team-modal__content {
        grid-template-columns: 250px minmax(0, 1fr);
        min-height: 540px;
    }

    .gsc-team-modal__portrait-column {
        min-height: 540px;
        padding: 88px 24px 40px;
    }

    .gsc-team-modal__brand { left: 24px; }
    .gsc-team-modal__brand small { display: none; }

    .gsc-team-modal__portrait-frame,
    .gsc-team-modal__portrait-caption { width: 210px; }

    .gsc-team-modal__profile { padding: 54px 36px 30px; }
    .gsc-team-modal__header h2 { font-size: clamp(2.5rem, 6vw, 4rem); }
}

/* mobile = bottom sheet */
@media (max-width: 680px) {
    .gsc-team-modal {
        align-items: flex-end;
        padding: 0;
    }

    .gsc-team-modal__backdrop {
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .gsc-team-modal__shell {
        --tm-shell-max: 96vh;
        --tm-nav-h: 68px;
        width: 100%;
        border-left: 0;
        border-right: 0;
        border-radius: 18px 18px 0 0;
        transform: translateY(48px);
    }

    .gsc-team-modal.is-ready .gsc-team-modal__shell { transform: translateY(0); }

    .gsc-team-modal__shell::after { inset: 6px; }

    .gsc-team-modal__grabber {
        display: block;
        position: absolute;
        top: 10px;
        left: 50%;
        z-index: 9;
        width: 44px;
        height: 4px;
        border-radius: 4px;
        background: rgba(255, 255, 255, .55);
        transform: translateX(-50%);
    }

    .gsc-team-modal__content {
        display: block;
        min-height: 0;
        max-height: calc(96vh - var(--tm-nav-h));
    }

    .gsc-team-modal__portrait-column {
        min-height: 340px;
        padding: 78px 24px 30px;
    }

    .gsc-team-modal__brand { top: 26px; left: 22px; }

    .gsc-team-modal__portrait-frame {
        width: 190px;
        aspect-ratio: 1 / 1.12;
    }

    .gsc-team-modal__portrait-caption {
        width: min(300px, 82vw);
        margin-top: 20px;
    }

    .gsc-team-modal__profile { padding: 40px 24px 30px; }
    .gsc-team-modal__header { padding-right: 46px; }
    .gsc-team-modal__chapter strong { font-size: 2rem; }
    .gsc-team-modal__header h2 { font-size: clamp(2.4rem, 12vw, 4rem); }
    .gsc-team-modal__header h2[data-len="long"] { font-size: clamp(2rem, 9.5vw, 3rem); }
    .gsc-team-modal__header h2[data-len="xl"]   { font-size: clamp(1.8rem, 8vw, 2.5rem); }

    .gsc-team-modal__facts { grid-template-columns: 1fr; }
    .gsc-team-modal__fact { min-height: auto; }
    .gsc-team-modal__footer-mark { display: none; }
    .gsc-team-modal__footer { justify-content: center; }
    .gsc-team-modal__footer-copy { text-align: center; }

    .gsc-team-modal__navigation { padding: 0 20px; }
    .gsc-team-modal__nav-copy { display: none; }
    .gsc-team-modal__nav-icon { width: 42px; height: 42px; }

    .gsc-team-modal__close {
        top: 16px;
        right: 14px;
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 420px) {
    .gsc-team-modal__portrait-column { min-height: 310px; }
    .gsc-team-modal__portrait-frame { width: 165px; }
    .gsc-team-modal__portrait-mark { width: 46px; height: 46px; }
    .gsc-team-modal__profile { padding: 34px 18px 25px; }
    .gsc-team-modal__statement { padding: 22px 18px 22px 20px; }
    .gsc-team-modal__statement::before { font-size: 5rem; }
    .gsc-team-modal__position { font-size: .68rem; letter-spacing: .1em; }
}

/* short landscape screens (phones on their side, small laptops) */
@media (max-height: 640px) and (min-width: 681px) {
    .gsc-team-modal { padding: 10px; }
    .gsc-team-modal__shell { --tm-shell-max: 100%; --tm-nav-h: 72px; }
    .gsc-team-modal__content,
    .gsc-team-modal__portrait-column { min-height: 0; }
    .gsc-team-modal__portrait-column { padding-top: 84px; }
    .gsc-team-modal__portrait-frame { width: 200px; }
    .gsc-team-modal__portrait-caption { margin-top: 16px; width: 200px; }
    .gsc-team-modal__profile { padding-top: 54px; }
}

/* touch devices don't need keyboard hints or hover tilt */
@media (hover: none) {
    .gsc-team-modal__hints { display: none; }
    .gsc-team-modal__spotlight { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .gsc-team-modal,
    .gsc-team-modal__shell,
    .gsc-team-modal__close,
    .gsc-team-modal__close span,
    .gsc-team-modal__nav,
    .gsc-team-modal__nav-icon,
    .gsc-team-modal__portrait,
    .gsc-team-modal__portrait-tilt,
    .gsc-team-modal__progress span,
    .gsc-team-modal__fact,
    .gsc-team-modal__fact::before {
        transition: none !important;
    }

    .gsc-team-modal.is-animating .tm-reveal,
    .gsc-team-modal.is-animating .gsc-team-modal__portrait-frame,
    .gsc-team-modal.is-animating .gsc-team-modal__portrait-sheen::after,
    .gsc-team-modal__ledger span:nth-child(2),
    .gsc-team-modal__portrait-tilt::before {
        animation: none !important;
    }

    .gsc-team-modal__spotlight { display: none; }
}


/* ============================================================================
   SCROLL LOCK + CLICK FIXES  (kept from v2 — do not remove)
   ----------------------------------------------------------------------------
   1) SCROLL LOCK
      The page is locked by putting overflow:hidden on <html> (class added by
      team.php). <body> is NEVER position:fixed, so the scroll position is never
      reset -> no jump to the top, no "scroll back" animation. These rules also
      neutralise the old `body.team-modal-open { position: fixed }` block that
      may still live in about.php.
   2) CLICKABLE CARDS
      Every card in the directory (Board, Officers, Management, Committees,
      Staff) accepts clicks and shows a pointer cursor, in case
      organizational_structure_modern.css disables it for non-board cards.
   3) OVERSCROLL
      Scrolling inside the modal never chains to the page behind it.
============================================================================ */

html.gsc-team-modal-lock {
    overflow: hidden !important;
    scroll-behavior: auto !important;
}

body.team-modal-open {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    overflow: visible !important;
}

#teamGrid .team-card {
    pointer-events: auto !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.gsc-team-modal,
.gsc-team-modal__shell,
.gsc-team-modal__content {
    overscroll-behavior: contain;
}

.gsc-team-modal__backdrop {
    touch-action: none;
}
/* ============================================================
   TIERED POSITION BADGE — mirrors the org structure page's
   hierarchy (Chairman > Vice-Chairman > Board of Directors >
   Secretary/Treasurer/Management > Committees > Staff) inside
   the profile modal. data-position / data-role-type are set on
   #gscTeamModalPosition directly by team.php's JS.
   ============================================================ */

#gscTeamModalPosition {
    border-radius: 999px !important;
}

/* ---- BOARD OF DIRECTORS (regular member) — plain gold pill,
   same family as the org page's tier-1 grid pill ---- */
#gscTeamModalPosition[data-role-type="Board of Directors"] {
    border: 1.5px solid rgba(177, 138, 66, .75) !important;
    background: linear-gradient(90deg, rgba(216,189,120,.42), rgba(250,232,170,.92), rgba(190,146,61,.42)) !important;
    box-shadow:
        0 8px 20px rgba(177, 138, 66, .28),
        0 0 0 1px rgba(255,255,255,.35) inset !important;
    color: #5c4116 !important;
    font-weight: 900 !important;
}

#gscTeamModalPosition[data-role-type="Board of Directors"]::before {
    content: "";
    width: 6px; height: 6px;
    background: #8a6423;
    transform: rotate(45deg);
}

/* ---- CHAIRMAN — gold insignia, animated shine + pulse
   (copied directly from the org-structure page's working
   .gsc-chairman-feature__eyebrow treatment) ---- */
#gscTeamModalPosition[data-position*="chairman" i],
#gscTeamModalPosition[data-position*="chairperson" i] {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 8px 20px !important;
    border: 1.5px solid rgba(255, 221, 140, .95) !important;
    border-radius: 999px !important;

    background: linear-gradient(
        100deg,
        #8a6423 0%,
        #f6e3a8 20%,
        #fffbe9 32%,
        #e7c477 46%,
        #a97f34 60%,
        #f6e3a8 78%,
        #8a6423 100%
    ) !important;
    background-size: 250% 100% !important;

    box-shadow:
        0 8px 20px rgba(0,0,0,.32),
        0 0 0 1px rgba(255,255,255,.18) inset,
        0 0 26px rgba(230,197,106,.55) !important;

    color: #241705 !important;
    font-weight: 900 !important;
    letter-spacing: .24em !important;
    line-height: 1.3 !important;
    text-shadow: 0 1px 0 rgba(255,255,255,.35) !important;
    overflow: hidden;

    animation:
        gsc-modal-chairman-shine 3.2s linear infinite,
        gsc-modal-chairman-pulse 2.4s ease-in-out infinite !important;
}

/* crown glyph — no font-family override, same as the org page */
#gscTeamModalPosition[data-position*="chairman" i]::before,
#gscTeamModalPosition[data-position*="chairperson" i]::before {
    content: "\265B" !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    color: #241705 !important;
    font-size: .9rem !important;
    line-height: 1 !important;
    opacity: 1 !important;
    transform: none !important;
}

@keyframes gsc-modal-chairman-shine { from { background-position: 0% 0; } to { background-position: -250% 0; } }
@keyframes gsc-modal-chairman-pulse {
    0%, 100% { box-shadow: 0 8px 20px rgba(0,0,0,.32), 0 0 0 1px rgba(255,255,255,.18) inset, 0 0 20px rgba(230,197,106,.45); }
    50%      { box-shadow: 0 8px 20px rgba(0,0,0,.32), 0 0 0 1px rgba(255,255,255,.18) inset, 0 0 34px rgba(230,197,106,.80); }
}

@media (prefers-reduced-motion: reduce) {
    #gscTeamModalPosition[data-position*="chairman" i],
    #gscTeamModalPosition[data-position*="chairperson" i] {
        animation: none !important;
        background-position: 0 0 !important;
    }
}
/* ---- VICE-CHAIRMAN — cool silver/champagne, quieter shine
   (overrides the generic Board of Directors rule above) ---- */
#gscTeamModalPosition[data-position*="vice" i] {
    position: relative;
    border: 1.5px solid rgba(200, 200, 210, .85) !important;
    background: linear-gradient(
        100deg,
        #b8bcc4 0%, #eef0f2 22%, #fdfdfe 38%, #e2ddc9 55%,
        #c9b98a 72%, #eef0f2 88%, #b8bcc4 100%
    ) !important;
    background-size: 220% 100%;
    animation: gsc-modal-vc-shine 5.5s linear infinite;
    color: #3a3a2e !important;
    font-weight: 900 !important;
    box-shadow:
        0 6px 16px rgba(90,90,100,.22),
        0 0 0 1px rgba(255,255,255,.30) inset,
        0 0 14px rgba(200,190,160,.35);
}

#gscTeamModalPosition[data-position*="vice" i]::before {
    content: "";
    width: 6px; height: 6px;
    background: #8a8266;
    transform: rotate(45deg);
}

@keyframes gsc-modal-vc-shine { from { background-position: 0% 0; } to { background-position: -220% 0; } }

/* ---- SECRETARY / TREASURER / GENERAL MANAGER — warm gold pill ---- */
#gscTeamModalPosition[data-role-type="Elected Officer"],
#gscTeamModalPosition[data-role-type="Management Team"] {
    border: 1px solid rgba(177, 138, 66, .55) !important;
    background: linear-gradient(90deg, rgba(216,189,120,.22), rgba(244,226,162,.55), rgba(190,146,61,.22)) !important;
    box-shadow: 0 5px 14px rgba(177, 138, 66, .16) !important;
    color: #6b4e1e !important;
    font-weight: 800 !important;
}

#gscTeamModalPosition[data-role-type="Elected Officer"]::before,
#gscTeamModalPosition[data-role-type="Management Team"]::before {
    content: "";
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #b28a3e;
    transform: none;
}

/* ---- COMMITTEES — same gold family, scaled down ---- */
#gscTeamModalPosition[data-role-type="Oversight Committee"],
#gscTeamModalPosition[data-role-type="Standing Committee"] {
    border: 1px solid rgba(177, 138, 66, .50) !important;
    background: linear-gradient(90deg, rgba(216,189,120,.18), rgba(244,226,162,.46), rgba(190,146,61,.18)) !important;
    box-shadow: 0 4px 10px rgba(177, 138, 66, .13) !important;
    color: #6b4e1e !important;
    font-weight: 800 !important;
    font-size: .68rem !important;
}

#gscTeamModalPosition[data-role-type="Oversight Committee"]::before,
#gscTeamModalPosition[data-role-type="Standing Committee"]::before {
    content: "";
    width: 4px; height: 4px;
    border-radius: 50%;
    background: #b28a3e;
    transform: none;
}

/* ---- STAFF — quietest gold tint ---- */
#gscTeamModalPosition[data-role-type="Staff Member"] {
    border: 1px solid rgba(177, 138, 66, .42) !important;
    background: linear-gradient(90deg, rgba(216,189,120,.14), rgba(244,226,162,.36), rgba(190,146,61,.14)) !important;
    box-shadow: 0 3px 8px rgba(177, 138, 66, .10) !important;
    color: #705323 !important;
    font-weight: 800 !important;
    font-size: .68rem !important;
}

@media (prefers-reduced-motion: reduce) {
    #gscTeamModalPosition[data-position*="chairman" i],
    #gscTeamModalPosition[data-position*="chairperson" i],
    #gscTeamModalPosition[data-position*="vice" i] {
        animation: none !important;
        background-position: 0 0 !important;
    }
}
