/* Distinct surfaces, one shared space. Incomplete rows stay centered. */
.roster-page { --roster-gap: 16px; --roster-columns: 4; }
.roster-heading { padding: 20px 0 28px; }
.roster-kicker { color: var(--muted); font-size: .875rem; }
.roster-heading h1 { margin-top: 8px; font-size: clamp(2rem, 3.35vw, 3.25rem); font-weight: 600; line-height: 1.35; letter-spacing: -.04em; text-wrap: balance; }
.roster-title-break { display: none; }
.roster-intro { color: var(--muted); font-size: 1rem; margin-top: 12px; }
.roster-layout { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(280px, 1fr); gap: 32px; align-items: start; margin-top: 32px; }
.team-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--roster-gap); }
.team-grid > li { min-width: 0; flex: 0 0 calc((100% - (var(--roster-columns) - 1) * var(--roster-gap)) / var(--roster-columns)); }
.team-card { position: relative; display: flex; flex-direction: column; min-height: 156px; height: 100%; padding: 20px; border: 1px solid oklch(.34 0 0); background: linear-gradient(145deg, oklch(.225 0 0), oklch(.145 0 0) 80%); isolation: isolate; transition: border-color .3s var(--ease), transform .35s var(--ease), color .25s; }
.team-card::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; background: linear-gradient(135deg, oklch(.97 0 0), oklch(.85 0 0) 60%, oklch(.75 0 0)); transition: opacity .35s var(--ease); }
.team-card-number, .team-detail-number { font: 500 .8125rem/1.4 var(--display); letter-spacing: .09em; color: var(--muted); }
.team-card-name { display: block; margin-top: 20px; font-size: clamp(1.25rem, 1.65vw, 1.625rem); font-weight: 600; line-height: 1.4; letter-spacing: -.035em; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.team-card-name.is-long { font-size: clamp(1.125rem, 1.4vw, 1.375rem); }
.team-card-count { align-self: flex-end; margin-top: auto; padding-top: 12px; font-size: .8125rem; color: var(--muted); line-height: 1.5; }
.team-card-arrow { position: absolute; top: 17px; right: 16px; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; opacity: 0; transform: translate(-3px, 3px); transition: opacity .25s, transform .35s var(--ease); }
.team-card[aria-current] { color: var(--paper-ink); border-color: oklch(.86 0 0); }
.team-card[aria-current]::before { opacity: 1; }
.team-card[aria-current] .team-card-number, .team-card[aria-current] .team-card-count { color: oklch(.29 0 0); }
.team-card[aria-current] .team-card-arrow { opacity: 1; transform: translate(0, 0); }
.team-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.team-details { min-width: 0; padding-left: 32px; border-left: 1px solid var(--line); }
.roster-enhanced .team-details { position: sticky; top: calc(var(--header-height) + 24px); display: grid; grid-template-columns: minmax(0, 1fr); }
.roster-enhanced .team-details .team-detail:not([hidden]) { display: contents; }
.roster-enhanced .team-details .team-detail-heading { grid-row: 1; }
.roster-enhanced .team-details > .roster-sculpture { grid-row: 2; }
.roster-enhanced .team-details .team-members-heading { grid-row: 3; }
.roster-enhanced .team-details .team-members { grid-row: 4; }
.roster-enhanced .team-details .roster-sculpture-slot { display: none; }
.team-detail { scroll-margin-top: calc(var(--header-height) + 24px); }
.team-detail[hidden] { display: none; }
.team-detail + .team-detail { margin-top: 56px; }
.roster-enhanced .team-detail { margin-top: 0; }
.team-detail-heading { padding-top: 4px; }
.team-detail h2 { margin-top: 12px; font-size: clamp(2rem, 3.1vw, 3rem); font-weight: 600; line-height: 1.25; letter-spacing: -.04em; overflow-wrap: anywhere; text-wrap: balance; }
.team-detail h2.is-long { font-size: clamp(1.75rem, 2.65vw, 2.625rem); }
.roster-sculpture { position: relative; height: 224px; display: grid; place-items: center; perspective: 900px; overflow: hidden; margin: 8px -12px 16px; pointer-events: none; }
.roster-stage { position: relative; width: 64%; max-width: 192px; aspect-ratio: 5 / 4; transform: rotateX(52deg) rotateZ(-29deg); transform-style: preserve-3d; }
.roster-foundation { position: absolute; inset: -9px; background: linear-gradient(140deg, oklch(.18 0 0), oklch(.105 0 0)); border: 1px solid oklch(.29 0 0); transform: translateZ(-9px); transform-style: preserve-3d; }
.roster-foundation::before { content: ''; position: absolute; inset: 0; outline: 1px solid oklch(.22 0 0); transform: translateZ(-4px); }
.roster-foundation::after, .roster-foundation > i { content: ''; position: absolute; display: block; background: oklch(.145 0 0); }
.roster-foundation::after { left: -1px; right: -1px; top: 100%; height: 4px; transform-origin: top; transform: rotateX(-90deg); }
.roster-foundation > i { top: -1px; bottom: -1px; left: 100%; width: 4px; transform-origin: left; transform: rotateY(90deg); }
.roster-foundation > svg { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); fill: none; stroke: oklch(.48 0 0); stroke-width: 1; }
.roster-matrix { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(4, 1fr); gap: 5px; transform-style: preserve-3d; }
.roster-matrix > span { position: relative; grid-column: span 2; transform-style: preserve-3d; }
/* Half-cell tracks center the last two real teams without adding empty tiles. */
.roster-matrix > span:nth-child(16) { grid-column: 4 / span 2; }
.roster-matrix > span::before { content: ''; position: absolute; inset: 2px; background: oklch(.06 0 0); opacity: .3; transform: translate3d(2px, 4px, -7px); filter: blur(2px); transition: opacity .4s var(--ease); }
.roster-matrix > .is-current::before { opacity: .85; }
.roster-tile-seat { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); fill: none; stroke: oklch(.62 0 0); stroke-width: .8; opacity: 0; transform: translateZ(-6px); transition: opacity .4s var(--ease); }
.roster-matrix > .is-current .roster-tile-seat { opacity: .75; }
.roster-tile-lift, .roster-tile-cap { position: absolute; inset: 0; display: block; transform-style: preserve-3d; }
.roster-tile-lift { transform: translateZ(0); transition: transform .3s var(--ease); }
.roster-matrix > .is-current .roster-tile-lift { transform: translateZ(15px); transition-duration: .5s; transition-delay: .18s; }
.roster-tile-cap { background: linear-gradient(140deg, oklch(.33 0 0), oklch(.22 0 0)); border: 1px solid oklch(.38 0 0); }
.roster-tile-cap::before { content: ''; position: absolute; inset: -1px; background: linear-gradient(135deg, oklch(.97 0 0), oklch(.73 0 0)); border: 1px solid oklch(.8 0 0); opacity: 0; transition: opacity .35s var(--ease); }
.roster-matrix > .is-current .roster-tile-cap::before { opacity: 1; }
.roster-tile-cap::after, .roster-tile-side { content: ''; position: absolute; display: block; background: oklch(.18 0 0); transition: background .35s var(--ease); }
.roster-tile-cap::after { height: 5px; left: -1px; right: -1px; top: calc(100% + 1px); transform-origin: top; transform: rotateX(-90deg); }
.roster-tile-side { width: 5px; top: -1px; bottom: -1px; left: calc(100% + 1px); transform-origin: left; transform: rotateY(90deg); }
.roster-tile-engraving { position: absolute; inset: 3px; border: 1px solid oklch(.38 0 0 / .28); transform: translateZ(.1px); }
.roster-tile-engraving::after { content: ''; position: absolute; right: 3px; bottom: 3px; width: 5px; height: 1px; background: oklch(.38 0 0); opacity: 0; transition: opacity .35s var(--ease); }
.roster-matrix > .is-current .roster-tile-engraving::after { opacity: .65; }
.roster-matrix > .is-current .roster-tile-cap::after { background: oklch(.48 0 0); }
.roster-matrix > .is-current .roster-tile-side { background: oklch(.62 0 0); }
.roster-orbit { position: absolute; width: 96%; height: 51%; transform: rotate(-25deg); }
.roster-orbit svg { display: block; width: 100%; height: 100%; overflow: visible; fill: none; }
.roster-orbit-track { stroke: oklch(.34 0 0); stroke-width: .8; vector-effect: non-scaling-stroke; opacity: .65; }
.roster-orbit-near { stroke: oklch(.38 0 0); stroke-width: .8; vector-effect: non-scaling-stroke; }
.roster-orbit-secondary { width: 85%; height: 47%; transform: rotate(26deg); }
.roster-orbit-secondary .roster-orbit-track { opacity: .6; }
.roster-orbit-secondary stop { stop-color: oklch(.34 0 0); }
.roster-orbit-datum { stroke: oklch(.48 0 0); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .7; }
.roster-datum { position: absolute; width: 7px; height: 7px; color: oklch(.48 0 0); opacity: .65; }
.roster-datum::before, .roster-datum::after { content: ''; position: absolute; background: currentColor; }
.roster-datum::before { width: 7px; height: 1px; top: 3px; }
.roster-datum::after { width: 1px; height: 7px; left: 3px; }
.roster-datum-one { left: 8%; top: 18%; }
.roster-datum-two { right: 8%; bottom: 14%; }
.roster-orbit-signal { stroke: oklch(.7 0 0); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 5 95; stroke-linecap: round; opacity: 0; }
.roster-enhanced .roster-orbit-signal { opacity: .7; animation: roster-orbit-travel 18s linear infinite; animation-delay: var(--orbit-phase, 0s); animation-play-state: paused; }
.roster-enhanced .roster-matrix > .is-current .roster-tile-cap { animation: roster-tile-breathe 5s ease-in-out infinite; animation-play-state: paused; }
.roster-sculpture.is-running .roster-orbit-signal, .roster-sculpture.is-running .is-current .roster-tile-cap { animation-play-state: running; }
@keyframes roster-tile-breathe { 0%, 100% { transform: translateZ(0); } 50% { transform: translateZ(3px); } }
@keyframes roster-orbit-travel { to { stroke-dashoffset: -100; } }
.team-members-heading { display: flex; justify-content: space-between; align-items: baseline; padding: 24px 0 12px; border-top: 1px solid var(--line); color: var(--muted); }
.team-members-heading h3 { font-size: .875rem; font-weight: 400; }
.team-members-heading > span { font-size: .8125rem; }
.team-members > li { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 1.125rem; line-height: 1.6; }
.team-members > li:last-child { border-bottom: 0; }
.member-role { font-size: .75rem; color: var(--muted); }
.team-dialog { display: none; }
@media (hover: hover) and (pointer: fine) {
  .team-card:hover { border-color: oklch(.61 0 0); transform: translateY(-3px); }
  .team-card:hover .team-card-arrow { opacity: 1; transform: translate(0, 0); }
  .team-card[aria-current]:hover { border-color: var(--ink); }
}
@media (min-width: 1600px) {
  .team-card { min-height: 168px; padding: 24px; }
}
@media (max-width: 1200px) {
  .roster-layout { grid-template-columns: minmax(0, 1fr) 272px; gap: 24px; }
  .team-details { padding-left: 24px; }
  .team-card { padding: 16px; }
  .team-card-name { font-size: 1.125rem; }
  .team-card-name.is-long { font-size: 1.0625rem; }
}
@media (max-width: 1050px) {
  .roster-layout { grid-template-columns: 1fr; }
  .team-card { min-height: 150px; padding: 20px; }
  .team-card-name { font-size: 1.375rem; }
  .team-card-name.is-long { font-size: 1.125rem; }
  .team-details { border-left: 0; padding-left: 0; }
  .roster-enhanced .team-details { display: none; }
  .roster-dialog-open { overflow: hidden; }
  .team-dialog[open] { display: block; position: fixed; inset: auto 0 0; margin: auto auto 0; width: min(100%, 520px); max-width: 100%; max-height: min(90svh, 780px); padding: 32px max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); border: 1px solid oklch(.38 0 0); border-bottom: 0; color: var(--ink); background: oklch(.135 0 0); overflow-y: auto; overscroll-behavior: contain; }
  .team-dialog::backdrop { background: rgb(0 0 0 / .78); }
  .team-dialog-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; display: grid; place-items: center; background: oklch(.2 0 0); }
  .team-dialog-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; }
  .team-dialog .team-detail-heading { padding-right: 32px; }
  .team-dialog .team-detail h2 { font-size: 2.25rem; margin-top: 12px; }
  .team-dialog .team-detail h2.is-long { font-size: 1.875rem; }
  .team-dialog .roster-sculpture { height: 196px; margin-top: 4px; }
  .team-dialog .roster-stage { max-width: 184px; }
  .team-dialog .roster-orbit { width: 85%; max-width: 350px; }
  .team-dialog .roster-orbit-secondary { width: 77%; }
  .team-dialog .team-members-heading { padding-top: 20px; }
}
@media (max-width: 650px) {
  .roster-page { --roster-gap: 12px; --roster-columns: 2; }
  .roster-page .information-main { padding-top: 28px; }
  .roster-heading { padding: 0 0 24px; }
  .roster-kicker { font-size: .8125rem; }
  .roster-heading h1 { font-size: clamp(1.875rem, 7.3vw, 2.5rem); margin-top: 12px; line-height: 1.4; }
  .roster-title-break { display: initial; }
  .roster-intro { font-size: .875rem; max-width: 28ch; margin-top: 12px; }
  .roster-layout { margin-top: 24px; }
  .team-card { min-height: 148px; padding: 16px; }
  .team-card-name { margin-top: 20px; font-size: 1.25rem; }
  .team-card-name.is-long { font-size: 1.125rem; }
  .team-card-number { font-size: .75rem; }
  .team-card-arrow { width: 17px; height: 17px; top: 15px; right: 12px; }
  .team-card-count { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .team-card, .team-card::before, .team-card-arrow { transition: none; }
  .team-card:hover { transform: none; }
  .roster-tile-lift, .roster-tile-cap::before, .roster-tile-cap::after, .roster-tile-side, .roster-matrix > span::before, .roster-tile-seat, .roster-tile-engraving::after { transition: none !important; }
  .roster-enhanced .roster-orbit-signal, .roster-enhanced .roster-matrix > .is-current .roster-tile-cap { animation: none; }
}
