/* Team and staff pages: dark, editorial, sharp-edged. Photos sit in monochrome until you reach for them. */

body[data-page="team"], body[data-page="staff"] { background: #0a1430; }
.outline { color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .55); }
.tm-over { font: 600 12px/1 var(--body); letter-spacing: 3px; text-transform: uppercase; color: var(--gold); }
.tm-h { font: 600 12px/1 var(--body); letter-spacing: 3px; text-transform: uppercase; color: var(--muted); padding-bottom: 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.tm-link { font: 600 13px/1 var(--body); letter-spacing: .4px; color: var(--muted); transition: color .2s; }
.tm-link:hover { color: var(--gold); }

/* ---------- Roster hero ---------- */
.tm-hero { position: relative; isolation: isolate; padding: 300px 0 0; }
/* Each team page sets its own banner photo with --banner (and --banner-pos); the team photo is the fallback. */
.tm-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--banner, url('https://fifeflyers.co.uk/wp-content/uploads/2026/10/team-20026.jpg')) var(--banner-pos, 50% 30%) / cover no-repeat; }
.tm-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #0a1430 0%, rgba(8, 16, 40, .82) 30%, rgba(8, 16, 40, .35) 65%, rgba(8, 16, 40, .7) 100%); }
.tm-hero h1 { font-size: clamp(72px, 14vw, 210px); font-weight: 900; line-height: .82; letter-spacing: -2px; margin-top: 18px; }
.tm-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 44px; border-bottom: 1px solid var(--line); }
.tm-tabs { display: flex; gap: 30px; overflow-x: auto; scrollbar-width: none; }
.tm-tabs button {
  flex: none; padding: 0 0 16px; border: 0; background: none; color: var(--muted); cursor: pointer;
  font: 700 22px/1 var(--display); letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 3px solid transparent; margin-bottom: -1px; transition: color .2s, border-color .2s;
}
.tm-tabs sup { margin-left: 5px; font: 500 11px/1 var(--body); color: var(--muted); }
.tm-tabs button:hover { color: #fff; }
.tm-tabs button[aria-pressed="true"] { color: #fff; border-color: var(--gold); }
.tm-bar .tm-link { padding-bottom: 18px; }

/* ---------- Leaders ---------- */
.tm-leaders-h { margin-top: 56px; font: 800 28px/1 var(--display); letter-spacing: .5px; text-transform: uppercase; }
.tm-leaders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.tm-leaders a { position: relative; overflow: hidden; display: grid; align-content: end; gap: 8px; min-height: 230px; padding: 28px 170px 28px 30px; background: linear-gradient(135deg, var(--navy-hi), var(--navy)); border-top: 4px solid var(--gold); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); transition: transform .25s, box-shadow .25s; }
.tm-leaders a:hover { transform: translateY(-4px); box-shadow: 0 24px 50px rgba(0, 0, 0, .6); }
.tm-leaders span { align-self: start; font: 700 12px/1 var(--body); letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); }
.tm-leaders b { font: 900 104px/.85 var(--display); color: #fff; }
.tm-leaders strong { font: 700 24px/1 var(--display); letter-spacing: .6px; text-transform: uppercase; }
.tm-leaders img { position: absolute; right: 0; bottom: 0; height: 100%; width: 170px; object-fit: cover; object-position: 50% 0; mask-image: linear-gradient(90deg, transparent, #000 35%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); }

/* ---------- Player cards ---------- */
.tm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 40px; margin-bottom: 96px; background: var(--line); border: 1px solid var(--line); }
.pl { position: relative; overflow: hidden; aspect-ratio: 3 / 4; background: #0f1d47; isolation: isolate; }
.pl img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; filter: grayscale(1) contrast(1.15) brightness(.82); transition: filter .4s, transform .6s cubic-bezier(.2, .7, .2, 1); z-index: -2; }
.pl::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #0a1430 4%, rgba(8, 16, 40, .55) 34%, rgba(8, 16, 40, 0) 62%); }
.pl::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.pl:hover img, .pl:focus-visible img { filter: none; transform: scale(1.04); }
.pl:hover::after, .pl:focus-visible::after { transform: none; }
.pl-num { position: absolute; top: 14px; left: 18px; font: 900 64px/.9 var(--display); color: transparent; -webkit-text-stroke: 1.5px var(--gold); }
.pl-role { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; display: grid; place-items: center; background: var(--gold); color: #0a1430; font: 900 18px/1 var(--display); }
.pl-meta { position: absolute; left: 20px; bottom: 86px; font: 600 10px/1 var(--body); letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.pl-name { position: absolute; left: 20px; right: 20px; bottom: 22px; font: 900 34px/.95 var(--display); text-transform: uppercase; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.pl-name small { display: block; margin-bottom: 4px; font: 500 14px/1 var(--body); letter-spacing: .3px; text-transform: none; color: #c5cadb; }
.pl-stats { position: absolute; left: 20px; bottom: 20px; font: 600 11px/1 var(--body); letter-spacing: 1.5px; color: var(--muted); opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .4s cubic-bezier(.2, .7, .2, 1); }
.pl-stats b { margin: 0 4px 0 14px; font: 800 22px/1 var(--display); color: #fff; letter-spacing: 0; }
.pl-stats b:first-child { margin-left: 0; }
.pl:hover .pl-name, .pl:hover .pl-meta, .pl:focus-visible .pl-name, .pl:focus-visible .pl-meta { transform: translateY(-34px); }
.pl:hover .pl-stats, .pl:focus-visible .pl-stats { opacity: 1; transform: none; }

/* ---------- Profile ---------- */
.pf-hero { position: relative; overflow: hidden; padding-top: 150px; background: radial-gradient(60% 90% at 78% 40%, rgba(24, 86, 166, .5), rgba(14, 28, 65, .25) 50%, transparent 75%); }
.pf-ghost { position: absolute; right: -2%; top: 60px; font: 900 clamp(280px, 46vw, 720px)/.8 var(--display); color: transparent; -webkit-text-stroke: 2px rgba(246, 208, 0, .22); pointer-events: none; }
.pf-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: end; min-height: 560px; }
.pf-copy { padding-bottom: 56px; }
.pf-copy .tm-over { margin: 34px 0 20px; }
.pf-copy h1 { font-size: clamp(64px, 11.5vw, 176px); font-weight: 900; line-height: .84; letter-spacing: -1.5px; }
.pf-copy h1 span { display: block; }
.pf-photo { width: 100%; max-height: 600px; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .7)); }
.pf-stats { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 0; margin-bottom: 0; border: 1px solid var(--line); border-bottom: 0; background: rgba(8, 16, 40, .8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pf-stats div { padding: 22px 26px; border-left: 1px solid var(--line); }
.pf-stats div:first-child { border-left: 0; }
.pf-stats dt { font: 600 11px/1 var(--body); letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); }
.pf-stats dd { margin: 10px 0 0; font: 900 56px/.9 var(--display); }
.pf-stats dd small { margin-left: 4px; font: 600 14px/1 var(--body); color: var(--muted); }
.pf-stats .hi { background: var(--gold); color: #0a1430; }
.pf-stats .hi dt { color: #0a1430; }

.pf-body { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 72px; padding: 80px 0; border-top: 1px solid var(--line); }
.pf-spec { margin: 0; }
.pf-spec div { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.pf-spec dt { font-size: 14px; color: var(--muted); }
.pf-spec dd { margin: 0; font-weight: 600; text-align: right; }
/* Every bio paragraph, player or staff, first or last, is set the same. */
.pf-lede, .pf-para { margin-top: 22px; font-size: 18px; line-height: 1.65; font-weight: 400; letter-spacing: 0; color: #d6dae6; max-width: 80ch; }
.pf-note { margin-top: 22px; font-size: 14px; color: var(--muted); }
.pf-note a { color: #fff; border-bottom: 1px solid var(--gold); white-space: nowrap; }
.pf-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding: 22px 24px; border: 1px solid var(--line); background: #0f1d47; }
.pf-cta div { flex: 1 1 220px; }
.pf-cta span { display: block; font: 600 11px/1 var(--body); letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); }
.pf-cta b { display: block; margin-top: 8px; font-size: 15px; }
.pf-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pf-nav a { padding: 26px 28px; background: #0f1d47; transition: background .2s; }
.pf-nav a:last-child { text-align: right; }
.pf-nav a:hover { background: var(--gold); color: #0a1430; }
.pf-nav span { display: block; font: 600 11px/1 var(--body); letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); }
.pf-nav a:hover span { color: #0a1430; }
.pf-nav b { display: block; margin-top: 10px; font: 800 30px/1 var(--display); text-transform: uppercase; }
.pf-more { padding-top: 72px; }
.pf-more .tm-grid { grid-template-columns: repeat(6, 1fr); margin-top: 24px; }
.pf-more .pl-name { font-size: 24px; }
.pf-more .pl-num { font-size: 44px; }

/* ---------- Staff ---------- */
.st-group { padding: 56px 0 0; }
.st-group:last-of-type { padding-bottom: 96px; }
.st-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 24px; background: var(--line); border: 1px solid var(--line); }
.st { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 300px; padding: 28px; background: #0f1d47; overflow: hidden; }
.st-mark { font: 900 120px/.8 var(--display); color: transparent; -webkit-text-stroke: 1.5px rgba(246, 208, 0, .5); margin-bottom: auto; }
.st img { position: absolute; right: 0; top: 0; width: 46%; height: 100%; object-fit: cover; object-position: 50% 0; filter: grayscale(1) contrast(1.1); mask-image: linear-gradient(90deg, transparent, #000 55%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%); }
.st-role { position: relative; font: 600 11px/1.3 var(--body); letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); }
.st h3 { position: relative; font-size: 40px; font-weight: 900; line-height: .95; }
.st p { position: relative; font-size: 14px; color: var(--muted); max-width: 46ch; }
.st.open { background: repeating-linear-gradient(-45deg, #0f1d47 0 14px, #0f1d47 14px 28px); }
.st.open h3 { color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .5); }
.st.open .st-mark { -webkit-text-stroke-color: rgba(255, 255, 255, .18); }

.st { min-height: 0; }
.st-mark { font-size: 84px; margin-bottom: 26px; }
.st h3 { font-size: 32px; }
.st-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.st.big { min-height: 300px; background: linear-gradient(150deg, rgba(22, 48, 111, .55), #0f1d47 60%); }
.st.big .st-mark { font-size: 150px; margin-bottom: auto; }
.st.big h3 { font-size: clamp(40px, 5vw, 64px); }

.st-mail { position: relative; align-self: flex-start; margin-top: 4px; font-size: 14px; color: #c5cadb; border-bottom: 1px solid var(--gold); overflow-wrap: anywhere; transition: color .2s; }
.st-mail:hover, .dir-dept li a:hover { color: var(--gold); }
.dir-dept li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) !important; }
.dir-dept li a { color: #c5cadb; overflow-wrap: anywhere; transition: color .2s; }
@media (max-width: 760px) { .dir-dept li { grid-template-columns: 1fr !important; } }


.st-foot { margin-top: 18px; font-size: 15px; color: var(--muted); }   /* a plain line of text: no accent bar */

/* Player sponsor block on a profile */
.pf-sponsor { display: grid; gap: 12px; justify-items: start; margin-top: 28px; padding: 22px; border: 1px solid var(--line); background: #0f1d47; }
.pf-sponsor span { font: 600 11px/1 var(--body); letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); }
.pf-sponsor b { font: 800 26px/1 var(--display); text-transform: uppercase; }
.pf-sponsor-logo { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 280px; height: 130px; padding: 16px; background: #fff; overflow: hidden; }
.pf-sponsor-logo.dark { background: #16306f; }
.pf-sponsor-logo img { width: auto; height: auto; max-width: 100%; max-height: 98px; object-fit: contain; }
a.pf-sponsor.open { border-style: dashed; transition: border-color .2s; }
a.pf-sponsor.open:hover { border-color: var(--gold); }

/* Fan group landing pages */
.tm-tab { flex: none; padding: 0 0 16px; color: var(--muted); font: 700 22px/1 var(--display); letter-spacing: 1px; text-transform: uppercase; border-bottom: 3px solid transparent; margin-bottom: -1px; transition: color .2s, border-color .2s; }
.tm-tab:hover { color: #fff; }
.tm-tab[aria-current="true"] { color: #fff; border-color: var(--gold); }
.gr-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.gr-points li { position: relative; padding: 0 0 12px 26px; border-bottom: 1px solid var(--line); color: #d5d9e6; }
.gr-points li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; background: var(--gold); }
.gr-todo { margin-top: 22px; min-height: 0; }
.gr-todo p { max-width: none; font-size: 16px; color: #d5d9e6; }

/* Staff photos: a real photo when supplied, otherwise an empty frame */
.ph { position: relative !important; display: block; width: 120px !important; height: 150px !important; margin-bottom: 22px; object-fit: cover; object-position: 50% 10%; filter: none !important; -webkit-mask-image: none !important; mask-image: none !important; border: 1px solid var(--line); }
.ph.empty { display: grid; place-content: center; justify-items: center; gap: 8px; background: repeating-linear-gradient(-45deg, #0f1d47 0 10px, #13265a 10px 20px); border: 1px dashed rgba(255, 255, 255, .28); color: var(--muted); }
.ph.empty svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
.ph.empty small { font: 600 10px/1 var(--body); letter-spacing: 1.5px; text-transform: uppercase; }
.st.big .ph { width: 170px !important; height: 212px !important; margin-bottom: auto; }
.st.big { gap: 12px; }
.st.big .st-role { margin-top: 26px; }
.sp-photo { justify-self: end; align-self: end; padding-bottom: 56px; }
.sp-photo .ph { width: 300px !important; height: 375px !important; margin: 0; }
.sp-photo .ph.empty svg { width: 90px; height: 90px; }
.sp-photo .ph.empty small { font-size: 12px; }
@media (max-width: 760px) { .sp-photo { justify-self: start; padding-bottom: 32px; } .sp-photo .ph { width: 200px !important; height: 250px !important; } }

/* Staff cards are links to a profile page */
a.st { transition: border-color .2s, background .2s; }
a.st:hover { border-color: var(--gold); }
.st-more { position: relative; margin-top: 6px; font: 600 13px/1 var(--body); color: var(--muted); transition: color .2s; }
a.st:hover .st-more { color: var(--gold); }
.sp-hero .pf-inner { min-height: 380px; }
.sp-hero .pf-ghost { top: 40px; }
.sp-mail, .dir-name { border-bottom: 1px solid var(--gold); }
.dir-name { font-weight: 600; color: #fff !important; justify-self: start; }
/* Business personnel names are plain text (no profile pages), so no link underline. */
b.dir-name { border-bottom: 0; }
.pf-more .st-grid { margin-bottom: 96px; }

/* Business directory */
.dir-search input { width: 100%; height: 56px; padding: 0 20px; border: 1px solid var(--line); background: #0f1d47; color: #fff; font: 500 16px/1 var(--body); }
.dir-search input:focus { border-color: var(--gold); outline: 0; }
.dir { margin-top: 32px; border-top: 1px solid var(--line); }
.dir-dept { display: grid; grid-template-columns: 280px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.dir-dept h2 { font-size: 28px; color: var(--gold); }
.dir-dept ul { list-style: none; margin: 0; padding: 0; }
.dir-dept li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dir-dept li:last-child { border-bottom: 0; }
.dir-dept li b { font-weight: 600; }
.dir-dept li span { color: var(--muted); }
.dir-none { padding: 32px 0; color: var(--muted); }
.dir-contact { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 40px 0 96px; padding: 24px; border: 1px solid var(--line); background: #0f1d47; }
.dir-contact div { flex: 1 1 260px; display: grid; gap: 10px; }
@media (max-width: 760px) {
  .dir-dept { grid-template-columns: 1fr; gap: 10px; }
  .dir-dept li { grid-template-columns: 1fr; gap: 2px; }
  .st-grid.cols-2 { grid-template-columns: 1fr; }
  .st.big { min-height: 0; } .st.big .st-mark { font-size: 96px; margin-bottom: 26px; }
}

/* Grids that may end on a part-filled row: separate bordered cells instead of a shared hairline backdrop. */
.tm-grid, .st-grid { gap: 10px; background: none; border: 0; }
.pl, .st { border: 1px solid var(--line); }

@media (max-width: 1100px) {
  .tm-grid { grid-template-columns: repeat(3, 1fr); }
  .pf-more .tm-grid { grid-template-columns: repeat(3, 1fr); }
  .pf-body { grid-template-columns: 1fr; gap: 48px; }
  .st-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .tm-hero { padding-top: 150px; }
  .tm-tabs { gap: 22px; } .tm-tabs button { font-size: 19px; }
  .tm-leaders { grid-template-columns: 1fr; }
  .tm-leaders a { padding: 20px 130px 20px 20px; } .tm-leaders b { font-size: 54px; }
  .tm-grid, .pf-more .tm-grid { grid-template-columns: repeat(2, 1fr); margin-bottom: 64px; }
  .pl-name { font-size: 24px; left: 14px; right: 14px; bottom: 16px; }
  .pl-meta { left: 14px; bottom: 66px; letter-spacing: 1.5px; }
  .pl-num { font-size: 44px; left: 12px; }
  .pl-stats { display: none; }
  .pl:hover .pl-name, .pl:hover .pl-meta { transform: none; }
  .pl img { filter: grayscale(.4) contrast(1.05) brightness(.9); }
  .pf-hero { padding-top: 130px; }
  .pf-inner { grid-template-columns: 1fr; min-height: 0; }
  .pf-copy { padding-bottom: 12px; }
  .pf-photo { max-height: 380px; }
  .pf-stats { grid-template-columns: repeat(3, 1fr); }
  .pf-stats div { padding: 16px; } .pf-stats dd { font-size: 40px; }
  .pf-stats div:nth-child(4) { border-left: 0; }
  .pf-stats div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .pf-body { padding: 48px 0; }
  .pf-nav b { font-size: 20px; } .pf-nav a { padding: 18px; }
  .st-grid { grid-template-columns: 1fr; }
  .st { min-height: 0; } .st-mark { font-size: 80px; margin-bottom: 20px; }
}

/* Staff cards are one size whatever the person's seniority: same name size, same photo frame. */
.st.big h3 { font-size: 32px; }
.st.big .ph { width: 120px !important; height: 150px !important; margin-bottom: 22px; }
.st.big, .st { min-height: 0; }
.st.big .st-role { margin-top: 0; }

/* Every personnel photo gets the same treatment whatever the source picture looks like:
   same portrait frame, cropped from the top so the face sits in the same place, in natural colour. */
img.ph { object-fit: cover; object-position: 50% 12%; filter: none !important; background: #0f1d47; }

/* On phones the name must shrink to the screen, not stretch its column past the edge. */
.pf-copy { min-width: 0; }
@media (max-width: 760px) { .pf-inner { grid-template-columns: minmax(0, 1fr); } }

/* Phones: team leader cards stack; the name keeps clear of the photo. */
@media (max-width: 760px) {
  .tm-leaders { grid-template-columns: 1fr; }
  .tm-leaders a { min-height: 180px; padding: 22px 140px 22px 22px; }
  .tm-leaders img { width: 132px; }
  .tm-leaders b { font-size: 72px; }
  .tm-leaders strong { font-size: 19px; line-height: 1.1; }
}

/* Roster banner: the photo is 1080px wide, so it sits on the right half of the banner at its real size
   (stretching it across the full width made it blurry) and fades into the page on the left. */
.tm-hero.split::before { inset: 0 0 0 auto; width: min(56%, 1080px); }
.tm-hero.split::after { background: linear-gradient(90deg, #0a1430 44%, rgba(8, 16, 40, .55) 62%, rgba(8, 16, 40, .05) 100%), linear-gradient(0deg, #0a1430 0%, rgba(8, 16, 40, .25) 40%, rgba(8, 16, 40, .45) 100%); }
@media (max-width: 760px) {
  .tm-hero.split::before { inset: 0; width: auto; }
  .tm-hero.split::after { background: linear-gradient(0deg, #0a1430 0%, rgba(8, 16, 40, .82) 30%, rgba(8, 16, 40, .35) 65%, rgba(8, 16, 40, .7) 100%); }
}

/* Roster banner: full width, sharpened, and with a lighter shade over it so the photo reads clearly. */
.tm-hero.crisp::before { filter: url(#banner-sharpen) contrast(1.06) saturate(1.05); }
.tm-hero.crisp::after { background: linear-gradient(0deg, #0a1430 0%, rgba(8, 16, 40, .72) 26%, rgba(8, 16, 40, .12) 58%, rgba(8, 16, 40, .5) 100%); }

/* A lighter shade over a banner photo that is sharp enough to show clearly. */
.tm-hero.bright::after { background: linear-gradient(0deg, #0a1430 0%, rgba(8, 16, 40, .72) 26%, rgba(8, 16, 40, .12) 58%, rgba(8, 16, 40, .5) 100%); }

/* Phones: the banner photo is shown whole, as a 3:2 picture under the header, and the page title sits below it
   (a wide team photo cropped into a narrow banner cut people off and put the title across their faces). */
@media (max-width: 760px) {
  .tm-hero { padding-top: calc(104px + 66.67vw + 26px); }
  .tm-hero::before, .tm-hero.split::before { inset: 104px 0 auto 0; width: auto; height: 66.67vw; background-size: cover; background-position: 50% 50%; filter: none; }
  .tm-hero::after, .tm-hero.split::after, .tm-hero.bright::after, .tm-hero.crisp::after { inset: 104px 0 auto 0; height: 66.67vw; background: linear-gradient(0deg, #0a1430 0%, rgba(8, 16, 40, 0) 30%); }
  .tm-hero h1 { margin-top: 12px; }
}

/* Staff photos are supplied at exact display sizes; keep them centred and let the browser render them crisply. */
img.ph[srcset] { object-position: 50% 50%; image-rendering: auto; }

/* Staff card photos are a third larger (160 by 200) so faces read clearly; empty frames match. */
.st .ph, .st.big .ph { width: 160px !important; height: 200px !important; }
@media (max-width: 760px) { .st .ph, .st.big .ph { width: 140px !important; height: 175px !important; } }

/* ---------- Framed banner (coaching staff, front office, business personnel) ----------
   Computer: a blurred, darkened copy of the photo fills the banner; the photo itself sits in a frame on the right
   at no more than 620px wide, so a 1,000px picture is never enlarged. Phones keep the whole-photo layout above. */
.tm-photo { display: none; }
@media (min-width: 761px) {
  .tm-hero.framed { overflow: hidden; padding-top: 330px; }
  .tm-hero.framed::before { inset: -40px; background-position: 50% 50%; filter: blur(26px) brightness(.5) saturate(1.1); }
  .tm-hero.framed::after { background: linear-gradient(90deg, rgba(10, 20, 48, .9) 0%, rgba(10, 20, 48, .6) 55%, rgba(10, 20, 48, .35) 100%), linear-gradient(0deg, #0a1430 0%, rgba(10, 20, 48, 0) 30%); }
  .tm-hero.framed .tm-photo { display: block; position: absolute; z-index: 0; margin: 0; right: max(24px, calc((100vw - 1240px) / 2)); bottom: 96px; width: min(44%, 620px); aspect-ratio: 3 / 2; border-top: 4px solid var(--gold); box-shadow: 0 28px 60px rgba(0, 0, 0, .55); background: #0f1d47; }
  .tm-hero.framed .tm-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .tm-hero.framed .wrap { position: relative; z-index: 1; }
  .tm-hero.framed h1 { max-width: 50%; font-size: clamp(54px, 7vw, 108px); line-height: .88; }
  .tm-hero.framed .tm-over { max-width: 50%; }
}

/* Framed banner: fixed height with the title and tabs pinned to the bottom, and the photo hung below the menu. */
@media (min-width: 761px) {
  .tm-hero.framed { display: flex; flex-direction: column; justify-content: flex-end; min-height: 670px; padding-top: 150px; }
  .tm-hero.framed .tm-photo { top: 150px; bottom: auto; }
}

/* Framed banner, full size: the sharp photo now fills the banner's full height across the right two-thirds, the same
   size as the roster's banner photo, and feathers into the blurred copy on the left where the title sits. It is
   never drawn wider than the picture's own 1,000 pixels, which is what keeps it sharp. */
@media (min-width: 761px) {
  .tm-hero.framed { min-height: 570px; padding-top: 130px; }
  .tm-hero.framed .tm-photo { top: 0; bottom: 0; right: 0; width: min(66%, 1000px); height: auto; aspect-ratio: auto; border: 0; box-shadow: none; background: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%); mask-image: linear-gradient(90deg, transparent 0%, #000 26%); }
  .tm-hero.framed .tm-photo img { object-position: 50% 62%; }
  .tm-hero.framed .tm-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #0a1430 0%, rgba(10, 20, 48, .55) 16%, rgba(10, 20, 48, 0) 38%), linear-gradient(180deg, rgba(10, 20, 48, .55) 0%, rgba(10, 20, 48, 0) 24%); }
  .tm-hero.framed h1 { max-width: 46%; }
}

/* Framed banner: the photo is capped at 880px wide, so a 1,000-pixel picture is shown at about its real size even
   on screens that pack more pixels in, and never looks soft. */
@media (min-width: 761px) {
  .tm-hero.framed .tm-photo { width: min(60%, 880px); }
}

/* Link from a player's profile to their Elite Prospects page */
.pf-spec dd a { color: #fff; border-bottom: 1px solid var(--gold); white-space: nowrap; transition: color .2s; }
.pf-spec dd a:hover { color: var(--gold); }

/* "Fife Flyers 2026/27" under the page title on the roster and staff pages: ordinary text in the site's one
   font, the same style as other supporting lines (not the small spaced-out gold label it used to be). */
.tm-hero h1 { margin-top: 0; }
.tm-sub { margin-top: 16px; font: 500 18px/1.4 var(--body); letter-spacing: 0; text-transform: none; color: #d6dae6; }
@media (min-width: 761px) { .tm-hero.framed .tm-sub { max-width: 46%; } }
@media (max-width: 760px) { .tm-hero h1 { margin-top: 12px; } .tm-sub { margin-top: 10px; font-size: 16px; } }

/* Business personnel: less empty space around the list and under the "Club office" box.
   (The box used to carry 96px of its own space on top of the section's 96px, leaving a 192px gap above the sponsors.) */
.st-group:has(.dir-contact) { padding-top: 40px; padding-bottom: 64px; }
.dir { margin-top: 24px; }
.dir-dept { padding: 22px 0; }
.dir-contact { margin: 28px 0 0; padding: 20px 24px; }
.dir-contact div { gap: 6px; }
@media (max-width: 760px) { .st-group:has(.dir-contact) { padding-top: 28px; padding-bottom: 48px; } .dir-contact { margin-top: 22px; padding: 18px; } }

/* ---------- Business personnel: one full-width table ----------
   The "Business Personnel" heading that sat on the left is gone (the page title already says it), so the list
   uses the whole width: a panel with a header row (Name, Title, Email) and one row per person.
   On a phone the header row is hidden and each person becomes a short stack: name, title, email. */
.dir { margin-top: 20px; border-top: 0; }
.dir-dept { display: block; padding: 0; border: 1px solid var(--line); background: #0f1d47; }
.dir-head, .dir-dept li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.25fr) !important; gap: 24px; align-items: center; padding: 0 28px; }
.dir-head { height: 46px; background: rgba(255, 255, 255, .04); border-bottom: 1px solid var(--line); font: 600 13px/1 var(--body); color: var(--muted); }
.dir-dept li { min-height: 68px; padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); transition: background .2s; }
.dir-dept li:last-child { border-bottom: 0; }
.dir-dept li:hover { background: rgba(255, 255, 255, .035); }
.dir-dept li b.dir-name { font: 700 19px/1.25 var(--body); color: #fff; }
.dir-dept li span { font-size: 16px; line-height: 1.35; color: #c5cadb; }
.dir-dept li a { font-size: 16px; color: #fff; justify-self: start; border-bottom: 1px solid rgba(246, 208, 0, .55); padding-bottom: 1px; }
.dir-dept li a:hover { color: var(--gold); border-bottom-color: var(--gold); }
@media (max-width: 760px) {
  .dir-head { display: none; }
  .dir-dept li { grid-template-columns: 1fr !important; gap: 4px; min-height: 0; padding: 16px 18px; }
  .dir-dept li b.dir-name { font-size: 18px; }
  .dir-dept li span, .dir-dept li a { font-size: 15px; }
  .dir-dept li a { margin-top: 4px; }
  .dir-nomail { display: none; }
}

/* ---------- Stand-in picture ----------
   Shown for anyone who has no photo yet: the Flyers crest on a navy panel, the same size as a real photo.
   It replaces the old striped "Photo to come" box. */
.ph.empty {
  display: block; gap: 0; color: transparent;
  border: 1px solid var(--line);
  background:
    url("https://fifeflyers.co.uk/wp-content/uploads/2025/02/logo-600x310.png") center 46% / 68% auto no-repeat,
    radial-gradient(120% 90% at 50% 30%, #1d3a86 0%, #13265a 55%, #0b1738 100%);
}
/* ---------- Staff photos: round portraits, not boxes ----------
   Every coaching and leadership photo is shown as a circle with a thin gold ring set slightly off it.
   A circle shows the face and the top of the shoulders, which also evens out photos taken against very
   different backgrounds. The stand-in crest (for anyone without a photo yet) uses the same shape. */
.st .ph, .st.big .ph { width: 150px !important; height: 150px !important; border-radius: 50%; border: 0; outline: 2px solid var(--gold); outline-offset: 6px; margin: 8px 0 30px 8px; }
.sp-photo .ph { width: 300px !important; height: 300px !important; border-radius: 50%; border: 0; outline: 3px solid var(--gold); outline-offset: 9px; margin: 12px; }
img.ph, img.ph[srcset] { object-position: 50% 14%; }
.ph.empty { background-size: 64% auto, auto; background-position: center 50%, center; }
@media (max-width: 760px) {
  .st .ph, .st.big .ph { width: 126px !important; height: 126px !important; margin-bottom: 24px; }
  .sp-photo .ph { width: 216px !important; height: 216px !important; }
}
/* ---------- Staff profile: one compact screen ----------
   Photo and details on the left, name and bio on the right. The aim is that the whole bio can be read on a
   laptop without scrolling. On a phone it stacks: photo, name, bio, then the details. */
.sp2 { padding-top: 132px; padding-bottom: 44px; }
.sp2-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-areas: "photo main" "facts main"; grid-template-rows: auto 1fr; column-gap: 64px; row-gap: 26px; margin-top: 22px; align-items: start; }
.sp2-photo { grid-area: photo; }
.sp2-main { grid-area: main; min-width: 0; }
.sp2-facts { grid-area: facts; }
.sp2-photo .ph { width: 200px !important; height: 200px !important; border-radius: 50%; border: 0; outline: 3px solid var(--gold); outline-offset: 8px; margin: 11px 0 11px 11px; }
.sp2-main .tm-over { margin: 6px 0 12px; }
/* The person's name: plain, sentence case and a sensible size (not a giant outlined headline). */
.sp2-main h1 { font-size: clamp(30px, 3.1vw, 42px); font-weight: 800; line-height: 1.08; letter-spacing: -.4px; text-transform: none; margin-bottom: 4px; }
.sp2-main .pf-para { margin-top: 16px; font-size: 17px; line-height: 1.58; max-width: none; }
.sp2-facts .pf-spec div { padding: 11px 0; font-size: 15px; }
.sp2-facts .pf-spec div:first-child { border-top: 1px solid var(--line); }
.sp2-facts .btn { margin-top: 18px; }
.sp2 + .pf-nav { margin-top: 0; }
#person-view .pf-more { padding-top: 48px; }
@media (max-width: 900px) {
  .sp2 { padding-top: 120px; padding-bottom: 32px; }
  .sp2-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "photo" "main" "facts"; grid-template-rows: none; row-gap: 20px; }
  .sp2-photo .ph { width: 132px !important; height: 132px !important; margin: 9px 0 6px 9px; outline-width: 2px; outline-offset: 6px; }
  .sp2-main .pf-para { font-size: 16px; }
}
/* ---------- Player profile: everything above the fold, and tighter sections ----------
   The top of a player's page (name, photo and the row of number tiles) is sized to the height of the screen,
   so the tiles are always in view without scrolling. The photo takes whatever height is left and sits on top
   of the tiles; it is never stretched beyond its own size. The sections underneath are closer together. */
.pf-hero:not(.sp-hero) { padding-top: 122px; }
.pf-hero:not(.sp-hero) .pf-inner { min-height: 0; height: clamp(360px, calc(100svh - 122px - 100px), 600px); align-items: end; }
.pf-hero:not(.sp-hero) .pf-copy { padding-bottom: 30px; }
.pf-hero:not(.sp-hero) .pf-copy .tm-over { margin: 22px 0 14px; }
.pf-hero:not(.sp-hero) .pf-copy h1 { font-size: clamp(56px, 9.2vw, 144px); }
.pf-hero:not(.sp-hero) .pf-photo { align-self: stretch; width: 100%; height: 100%; min-height: 0; max-height: none; object-fit: contain; object-position: 50% 100%; }
.pf-hero:not(.sp-hero) .pf-ghost { top: 40px; font-size: clamp(240px, 40vw, 600px); }
.pf-stats div { padding: 17px 24px; }
.pf-stats dd { margin-top: 8px; font-size: 46px; }
.pf-body { gap: 56px; padding: 46px 0; }
.pf-spec div { padding: 9px 0; font-size: 15px; }
.pf-spec dt { font-size: 13px; }
.pf-lede, .pf-para { margin-top: 16px; font-size: 17px; line-height: 1.6; }
/* The sponsor box sits under the "See him live" strip, in the right-hand column. */
.pf-sponsor { margin-top: 12px; padding: 16px 20px; }
.pf-sponsor b { font-size: 22px; }
.pf-body .pf-sponsor { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 20px; }
.pf-body .pf-sponsor span { grid-column: 1 / -1; }
.pf-body .pf-sponsor-logo { width: 200px; height: 88px; padding: 10px; }
.pf-body .pf-sponsor-logo img { max-height: 68px; }
.pf-cta { margin-top: 24px; padding: 16px 20px; }
.pf-games { padding-bottom: 44px; }
.pf-nav a { padding: 20px 24px; }
.pf-nav b { font-size: 26px; }
@media (max-width: 760px) {
  .pf-hero:not(.sp-hero) { padding-top: 116px; }
  .pf-hero:not(.sp-hero) .pf-inner { height: auto; }
  .pf-hero:not(.sp-hero) .pf-copy { padding-bottom: 6px; }
  .pf-hero:not(.sp-hero) .pf-copy .tm-over { margin: 14px 0 10px; }
  .pf-hero:not(.sp-hero) .pf-copy h1 { font-size: clamp(46px, 14vw, 64px); }
  .pf-hero:not(.sp-hero) .pf-photo { align-self: end; height: clamp(220px, calc(100svh - 116px - 190px - 150px), 380px); }
  .pf-stats div { padding: 12px 14px; }
  .pf-stats dd { margin-top: 6px; font-size: 34px; }
  .pf-body { gap: 36px; padding: 34px 0; }
  .pf-nav a { padding: 16px; } .pf-nav b { font-size: 20px; }
}
/* Under a staff member's photo on their own page: the photographer's name, where the picture came with one. */
.sp2-credit { margin: 6px 0 0 11px; width: 200px; text-align: center; font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .sp2-credit { margin-left: 9px; width: 132px; font-size: 11px; } }

/* Business personnel: a second list on the tab (the Commercial Team) has its own heading. It has no Email
   column, but it keeps the same three-column grid as the list above it (the third is simply empty), so the
   names and the titles line up down the whole page. */
.dir-group + .dir-group { margin-top: 44px; }
.dir-title { margin-bottom: 18px; }
.dir-group[hidden] { display: none; }
@media (max-width: 760px) { .dir-group + .dir-group { margin-top: 32px; } }

/* Business personnel opens on a short list: the lists after the first stay out of sight until "Load more" is
   pressed or something is typed in the search box (staff.html adds "all" to the list's wrapper for both). */
.dir:not(.all) .dir-group.more { display: none; }
.dir-more { display: block; margin: 26px auto 0; font-size: 15px; }
.dir-more[hidden] { display: none; }
