/*
 * Squad pages: rules for pages with <body class="p-squad">. Shared rules are in sfp.css.
 */

/* ------------------------------------------------------------------
   SHELL
------------------------------------------------------------------- */
.p-squad .section > .sub { margin: -6px 4px 0; font-size: 13px; color: var(--ink-faint); line-height: 1.35; }
.p-squad .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------
   SITE HEADER
------------------------------------------------------------------- */
.p-squad a:focus-visible, .p-squad button:focus-visible, .p-squad summary:focus-visible, .p-squad .snap:focus-visible, .p-squad label.btn:focus-within {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 8px;
}

/* ------------------------------------------------------------------
   THE CARD
------------------------------------------------------------------- */
.p-squad .card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
}
.p-squad .card-title .note { font-size: 12px; font-weight: 400; color: var(--ink-faint); }

/* ------------------------------------------------------------------
   HERO
------------------------------------------------------------------- */
.p-squad .hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-squad .hero h1 { margin: 0; font-size: 36px; font-weight: 700; line-height: .98; }
.p-squad .crest { flex: none; width: 92px; height: 101px; }
.p-squad .stat-bars { margin: 16px 0 0; display: grid; gap: 8px; }

/* ------------------------------------------------------------------
   STARTING XI
------------------------------------------------------------------- */
.p-squad .xi { padding: 0; overflow: hidden; }
.p-squad .field { position: relative; aspect-ratio: 340 / 450; background: linear-gradient(180deg, rgba(60,200,150,.17), rgba(30,120,130,.1)); }
.p-squad .field svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.p-squad .field svg.lines * { fill: none; stroke: rgba(255,255,255,.3); stroke-width: 1.2; }
.p-squad .field svg.lines .spot { fill: rgba(255,255,255,.3); stroke: none; }
.p-squad .xi-row {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-evenly;
  margin: 0;
  padding: 0 4px;
  list-style: none;
}
.p-squad .pl { flex: 1 1 0; min-width: 0; max-width: 84px; text-align: center; }
.p-squad .pl .disc {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--royal);
  border: 2px solid var(--accent);
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,40,.45);
}
.p-squad .pl.gk .disc { border-color: var(--gold); }
.p-squad .pl .nm {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,40,.8);
}
.p-squad .pl .op { display: block; font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,40,.8); }
.p-squad .xi-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--ink-soft);
  border-top: 1px solid var(--hair);
}

/* ------------------------------------------------------------------
   LISTS AND TABLES
------------------------------------------------------------------- */
.p-squad .bench ul { list-style: none; margin: 0; padding: 0; }
.p-squad .bench li {
  display: grid;
  grid-template-columns: 30px 1fr auto 40px;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,.09);
  font-size: 14.5px;
}
.p-squad .bench li:first-child { border-top: 0; }
.p-squad .bench .p { font-size: 11.5px; color: var(--ink-faint); font-weight: 500; }
.p-squad .bench .n small, .p-squad .tbl .n small { font-size: 11px; color: var(--ink-faint); margin-left: 5px; font-weight: 400; }
.p-squad .bench .s { font-size: 12px; color: var(--ink-faint); }
.p-squad .bench .v { text-align: right; font-weight: 700; color: var(--accent); }
.p-squad .bench li.z { opacity: .55; }
.p-squad .note-line { margin: 0 0 6px; font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.p-squad .note-line b { color: var(--ink); font-weight: 600; }
.p-squad .tbl-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
.p-squad table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.p-squad table.tbl th { font-size: 11.5px; font-weight: 500; color: var(--ink-faint); text-align: right; padding: 4px 4px 6px; white-space: nowrap; }
.p-squad table.tbl th:nth-child(1), .p-squad table.tbl th:nth-child(2) { text-align: left; }
.p-squad table.tbl td { padding: 7px 4px; text-align: right; border-top: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.p-squad table.tbl td.st { text-align: left; width: 18px; }
.p-squad table.tbl td.n { text-align: left; font-weight: 500; }
.p-squad table.tbl td.tot { font-weight: 700; color: var(--accent); min-width: 34px; }
.p-squad table.tbl tr.grp td {
  text-align: left;
  padding: 14px 4px 5px;
  border-top: 1px solid rgba(255,255,255,.26);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.p-squad table.tbl tr.grp td span { float: right; color: var(--accent); font-weight: 700; }
.p-squad table.tbl tr.z td { opacity: .55; }
.p-squad .pip { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); vertical-align: -1px; }
.p-squad .pip.b { background: transparent; border: 1.5px solid var(--accent-2); }
.p-squad .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--ink-soft);
}
.p-squad .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* ------------------------------------------------------------------
   TOP SCORERS
------------------------------------------------------------------- */
.p-squad .bars { display: grid; gap: 9px; }
.p-squad .bar-row { display: grid; grid-template-columns: 104px 1fr 28px; gap: 8px; align-items: center; font-size: 13.5px; }
.p-squad .bar-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.p-squad .bar-row .tr { height: 14px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.p-squad .bar-row .tr i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.p-squad .bar-row.b .tr i { background: var(--accent-2); }
.p-squad .bar-row .v { text-align: right; font-weight: 700; }

/* ------------------------------------------------------------------
   DONUTS + TILES
------------------------------------------------------------------- */
.p-squad .donuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.p-squad .donut { position: relative; width: 100%; max-width: 104px; margin: 0 auto; aspect-ratio: 1; }
.p-squad .donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.p-squad .donut .trk { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 10; }
.p-squad .donut .arc { fill: none; stroke: var(--accent); stroke-width: 10; }
.p-squad .donut b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; font-weight: 600; }
.p-squad .donut-lab { margin: 8px 0 0; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.p-squad .donut-sub { margin: 1px 0 0; font-size: 11.5px; color: var(--ink-faint); }
.p-squad .tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.p-squad .tile { padding: 14px 14px 12px; }
.p-squad .tile b { display: block; font-size: 44px; font-weight: 500; line-height: 1; color: var(--accent-2); }
.p-squad .tile span { display: block; margin-top: 6px; font-size: 13px; color: var(--ink-soft); line-height: 1.25; }

/* ------------------------------------------------------------------
   FIXTURES
------------------------------------------------------------------- */
.p-squad .fx { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.09); }
.p-squad .fx:first-child { border-top: 0; padding-top: 2px; }
.p-squad .fx .when { font-size: 12.5px; color: var(--ink-soft); line-height: 1.3; }
.p-squad .fx .when b { display: block; font-weight: 600; color: var(--ink); }
.p-squad .fx .match { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; }
.p-squad .fx .match i { font-style: normal; font-weight: 400; color: var(--ink-faint); }
.p-squad .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.p-squad .chip {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--accent);
  background: rgba(242,44,247,.18);
}
.p-squad .chip.b { border: 1px dashed rgba(255,255,255,.4); background: transparent; color: var(--ink-soft); }

/* ------------------------------------------------------------------
   DATA PANEL + FOOTER
------------------------------------------------------------------- */
.p-squad .status { margin-top: 12px; font-size: 13px; min-height: 18px; color: var(--ink-soft); }

/* ------------------------------------------------------------------
   CAREER AND HISTORY
------------------------------------------------------------------- */
.p-squad .sample {
  display: inline-block;
  vertical-align: 4px;
  margin-left: 8px;
  padding: 2px 9px;
  border: 1px dashed rgba(255,255,255,.5);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink-soft);
}
.p-squad .divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.p-squad .divider::before, .p-squad .divider::after { content: ""; flex: 1; border-top: 1px solid var(--hair); }
.p-squad .form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.p-squad .scroller {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
}
.p-squad .scroller::-webkit-scrollbar { display: none; }
.p-squad .scroller:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 8px; }
.p-squad .track { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(60px, 1fr)); min-width: calc(var(--n) * 60px); }
.p-squad .svg-over { position: absolute; left: 0; pointer-events: none; overflow: visible; }
.p-squad .fcol { display: grid; grid-template-rows: 22px 28px 64px 24px; justify-items: center; align-items: center; }
.p-squad .fcol .wk, .p-squad .pcol .wk { font-size: 12px; color: var(--ink-faint); }
.p-squad .fcol .rank { font-size: 18px; font-weight: 600; }
.p-squad .chg { font-size: 12px; font-weight: 500; color: var(--ink-faint); }
.p-squad .chg.up { color: #7cf0ac; }
.p-squad .chg.down { color: #ff8fa8; }
.p-squad .pcol { display: grid; grid-template-rows: 22px 96px 24px; justify-items: center; align-items: end; }
.p-squad .pcol .wk { align-self: start; }
.p-squad .pcol .bar { width: 26px; min-height: 2px; border-radius: 4px 4px 2px 2px; background: rgba(255,255,255,.34); }
.p-squad .pcol .bar.hi { background: var(--accent); }
.p-squad .pcol .v { align-self: center; font-size: 13px; font-weight: 500; }
.p-squad .swatch-dash { display: inline-block; width: 16px; border-top: 2px dashed var(--ink-soft); margin-right: 6px; vertical-align: 3px; }
.p-squad .snap {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 calc(var(--page-pad) * -1);
  padding: 2px var(--page-pad) 4px;
  scroll-padding: 0 var(--page-pad);
}
.p-squad .snap::-webkit-scrollbar { display: none; }
.p-squad .snap > * { scroll-snap-align: start; flex: none; }
.p-squad .snap:focus-visible, .p-squad .trophies:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 8px; }
.p-squad .scard { width: min(76%, 290px); padding: 16px; }
.p-squad .scard h3 { margin: 0 0 10px; font-size: 18px; font-weight: 600; text-align: center; }
.p-squad .scard dl { margin: 0; }
.p-squad .scard dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 14px;
}
.p-squad .scard dt { color: var(--ink-soft); }
.p-squad .scard dd { margin: 0; font-weight: 600; }
.p-squad .avatar {
  width: 128px;
  height: 150px;
  margin: 4px auto 10px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 44px;
  font-weight: 300;
  letter-spacing: .04em;
  background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(255,255,255,.05));
  border: 1px solid var(--card-border);
}
.p-squad .scard .cap { margin: 0; text-align: center; font-size: 14px; color: var(--ink-soft); }
.p-squad .scard .crest-lg { width: 120px; height: 132px; margin: 6px auto 8px; display: block; }
.p-squad .band {
  margin: 22px calc(var(--page-pad) * -1) 0;
  padding: 34px 12px 32px;
  text-align: center;
  background: rgba(0,0,40,.38);
  border-block: 1px solid var(--hair);
}
.p-squad .band b { display: block; font-size: 96px; font-weight: 300; line-height: .95; letter-spacing: .02em; }
.p-squad .band span { display: block; margin-top: 10px; font-size: 22px; font-weight: 500; }
.p-squad .chart { width: 100%; height: auto; display: block; }
.p-squad .chart text { font-family: var(--font); fill: var(--ink-faint); font-size: 9px; }
.p-squad .legend.ln i { width: 16px; height: 0; border-radius: 0; border-top: 2.5px solid; background: none; vertical-align: middle; }
.p-squad .legend.ln i.dash { border-top-style: dashed; }
.p-squad .legend.ln i.sq { width: 9px; height: 9px; border: 0; border-radius: 2px; }
.p-squad .foot-note { margin: 8px 0 0; font-size: 11px; color: var(--ink-faint); text-align: right; line-height: 1.4; }
.p-squad .trophies {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 calc(var(--page-pad) * -1);
  padding: 2px var(--page-pad) 4px;
  scroll-padding: 0 var(--page-pad);
}
.p-squad .trophies::-webkit-scrollbar { display: none; }
.p-squad .trophy { flex: none; width: 112px; scroll-snap-align: start; text-align: center; padding: 14px 6px 12px; }
.p-squad .trophy svg { width: 64px; height: 84px; display: block; margin: 0 auto 8px; }
.p-squad .trophy span { display: block; font-size: 12px; color: var(--ink-soft); }
.p-squad .trophy b { display: block; margin-top: 2px; font-size: 18px; font-weight: 600; }

/* ------------------------------------------------------------------
   LAYOUT HELPERS
------------------------------------------------------------------- */
.p-squad .hero-l, .p-squad .hero-r { display: block; min-width: 0; }
.p-squad .hero h1 { font-size: clamp(26px, 7.3vw, 36px); min-width: 0; }
.p-squad .crest { width: 80px; height: 88px; }
.p-squad .hero-r .pills { margin-top: 14px; }
.p-squad .stat-bars dd { white-space: nowrap; }
.p-squad .fx-wrap { display: block; }

/* ------------------------------------------------------------------
   DESKTOP
------------------------------------------------------------------- */
@media (min-width: 1000px) {
  .p-squad .page {
    max-width: 1180px;
    padding: 28px var(--page-pad) 64px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 28px;
    align-items: start;
  }
  .p-squad #hero { grid-column: 1 / -1; grid-row: 1; }
  .p-squad #xi { grid-column: 1 / 6; grid-row: 2; }
  .p-squad #bench { grid-column: 1 / 6; grid-row: 3; }
  .p-squad #squad { grid-column: 6 / 13; grid-row: 2 / span 2; }
  .p-squad #top-sec { grid-column: 1 / 6; grid-row: 4; }
  .p-squad #fixtures { grid-column: 6 / 13; grid-row: 4; }
  .p-squad #pos-sec { grid-column: 1 / 6; grid-row: 5; }
  .p-squad #tiles-sec { grid-column: 6 / 13; grid-row: 5; }
  .p-squad #career-sec { grid-column: 1 / -1; grid-row: 6; margin-top: 12px; }
  .p-squad #form-sec { grid-column: 1 / -1; grid-row: 7; }
  .p-squad #team-stats { grid-column: 1 / -1; grid-row: 8; }
  .p-squad .band { grid-column: 1 / -1; grid-row: 9; margin: 0; border-radius: var(--card-radius); border: 1px solid var(--hair); }
  .p-squad #vs-sec { grid-column: 1 / 9; grid-row: 10; }
  .p-squad #trophy-sec { grid-column: 9 / 13; grid-row: 10; }
  .p-squad #career-fin { grid-column: 1 / -1; grid-row: 11; }
  .p-squad #data-sec { grid-column: 1 / -1; grid-row: 12; max-width: 720px; }
  .p-squad .site-foot { grid-column: 1 / -1; grid-row: 13; margin-top: 8px; }
  .p-squad .hero { padding: 32px 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
  .p-squad .hero h1 { font-size: 60px; }
  .p-squad .crest { width: 120px; height: 132px; }
  .p-squad .stat-bars div { grid-template-columns: 1fr 112px; }
  .p-squad .stat-bars dd { font-size: 24px; white-space: nowrap; }
  .p-squad .chart text { font-size: 11px; }
  .p-squad .pl .disc { width: 48px; height: 48px; font-size: 19px; }
  .p-squad .pl .nm { font-size: 13.5px; }
  .p-squad .pl .op { font-size: 11.5px; }
  .p-squad table.tbl { font-size: 15px; }
  .p-squad table.tbl td { padding: 9px 6px; }
  .p-squad table.tbl th { font-size: 12px; }
  .p-squad #fx-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; align-content: start; }
  .p-squad #fx-card .fx { border-top: 0; border-bottom: 1px solid rgba(255,255,255,.09); padding: 12px 0; }
  .p-squad #fx-card .fx:first-child { padding-top: 12px; }
  .p-squad #fx-card .legend { grid-column: 1 / -1; }
  .p-squad .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p-squad .tile b { font-size: 50px; }
  .p-squad .scroller { -webkit-mask-image: none; mask-image: none; }
  .p-squad .band { padding: 40px 12px; }
  .p-squad .band b { font-size: 120px; }
  .p-squad .scroller:has(#career-wrap) { -webkit-mask-image: none; mask-image: none; }
}
@media (min-width: 1500px) {
  .p-squad .page { max-width: 1320px; }
  .p-squad .hero h1 { font-size: 68px; }
}

/* ------------------------------------------------------------------
   PHP VERSION
------------------------------------------------------------------- */
.p-squad .mine { margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.p-squad .mine .pos { color: var(--accent); font-weight: 700; font-size: 20px; }
.p-squad .fx .fxm { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; }
.p-squad .fx .fxm i { font-style: normal; font-weight: 400; color: var(--ink-faint); }
.p-squad .team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.p-squad .team-card { display: flex; align-items: center; gap: 12px; padding: 14px; color: inherit; text-decoration: none; }
.p-squad .team-card .tn b { display: block; font-size: 16px; font-weight: 600; line-height: 1.15; }
.p-squad .team-card .tn small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--ink-soft); }
.p-squad .team-card.me { border-color: var(--accent); background: rgba(242,44,247,.14); }
.p-squad .team-card:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.p-squad .rankdl { margin: 0; }
.p-squad .rankdl div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 15px; }
.p-squad .rankdl div:first-child { border-top: 0; padding-top: 2px; }
.p-squad .rankdl dt { color: var(--ink-soft); }
.p-squad .rankdl dd { margin: 0; text-align: right; }
.p-squad .rankdl dd b { font-weight: 700; color: var(--accent); font-size: 18px; }
.p-squad .rankdl dd span { margin-left: 8px; color: var(--ink-faint); font-size: 13px; }
.p-squad .notice h3 { color: var(--ink); }
@media (min-width: 1000px) {
  .p-squad #summary, .p-squad #teams-sec, .p-squad .notice, .p-squad .updated, .p-squad .picker { grid-column: 1 / -1; }
  .p-squad #summary { max-width: 760px; }
  .p-squad .picker { justify-self: end; width: 400px; }
  .p-squad #data-sec, .p-squad .site-foot, .p-squad .updated { grid-row: auto; }
  .p-squad .team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .p-squad .team-card { padding: 18px; }
}
@media (max-width: 399px) { .p-squad .team-grid { grid-template-columns: 1fr; } }
@media (min-width: 1000px) {
  .p-squad .hero { grid-template-columns: 1.25fr 1fr; }
  .p-squad .hero h1 { font-size: 52px; min-width: 0; }
}
@media (min-width: 1500px) { .p-squad .hero h1 { font-size: 60px; } }

/* ------------------------------------------------------------------
   7 OCT UPDATE: gameweek view, upper-case names, 600px badge, 4 tabs
------------------------------------------------------------------- */
.p-squad .hero h1 { text-transform: uppercase; overflow-wrap: anywhere; }
.p-squad .team-card .tn b, .p-squad .scard .cap.club { text-transform: uppercase; }
.p-squad .hero-top .badge { flex: none; width: 112px; height: 112px; object-fit: contain; }
.p-squad .section > h2 { text-wrap: balance; }
.p-squad .scard .badge { display: block; width: 150px; height: 150px; margin: 6px auto 8px; object-fit: contain; }
.p-squad .hero-r .pills { grid-template-columns: repeat(var(--np, 3), minmax(0, 1fr)); }
.p-squad .hero-r .pill { padding-left: 2px; padding-right: 2px; white-space: nowrap; font-size: 12px; }
@media (min-width: 440px) { .p-squad .hero-r .pill { font-size: 13px; } }

/* league-table arrows, same colours as Home */
.p-squad .mv { flex: none; width: 12px; height: 12px; }
.p-squad .mv.none { display: none; }
.p-squad .mv.up { fill: var(--up); }
.p-squad .mv.down { fill: var(--down); }
.p-squad .mv.same { fill: var(--accent-2); }
.p-squad .stat-bars dd .pv { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

.p-squad h2 .asof { font-size: .62em; font-weight: 400; color: var(--ink-faint); white-space: nowrap; }
.p-squad .xi-foot b { color: var(--ink); font-weight: 700; }

/* bench and squad tables: week points column */
.p-squad table.tbl td.pp { text-align: left; width: 30px; font-size: 11.5px; color: var(--ink-faint); font-weight: 500; }
.p-squad table.tbl td.wk { font-weight: 600; }
.p-squad table.tbl td.wk.off { font-weight: 400; color: var(--ink-faint); }
.p-squad table.tbl tr.z td.wk { opacity: 1; }

@media (min-width: 1000px) {
  .p-squad .hero-top .badge { width: 170px; height: 170px; }
}
/* Team name size: the longest word (RASENBALLSPORT) must always fit beside the big badge, so it never breaks mid-word */
.p-squad .hero h1 { font-size: clamp(20px, 6.2vw, 36px); }
@media (max-width: 359px) { .p-squad .hero-top .badge { width: 88px; height: 88px; } }
@media (min-width: 440px) and (max-width: 999px) { .p-squad .hero h1 { font-size: min(36px, 5.2vw); } }
@media (min-width: 1000px) and (max-width: 1299px) {
  .p-squad .hero-top .badge { width: 140px; height: 140px; }
  .p-squad .hero h1 { font-size: 38px; }
}
@media (min-width: 1300px) { .p-squad .hero h1 { font-size: 46px; } }
@media (min-width: 1500px) { .p-squad .hero h1 { font-size: 56px; } }


/* ------------------------------------------------------------------
   12 OCT UPDATE: team and manager cards from the master sheet, picture placeholders, honours, bigger trophy cabinet
------------------------------------------------------------------- */
.p-squad .pic { display: block; width: 128px; height: 150px; margin: 4px auto 10px; border-radius: 12px; object-fit: cover; }
.p-squad .pic.kit, .p-squad .pic.logo { object-fit: contain; }
.p-squad .pic.ph {
  display: grid; place-items: center; color: rgba(255,255,255,.34);
  background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.04)); border: 1px dashed rgba(255,255,255,.28);
}
.p-squad .pic.ph svg { width: 64px; height: 72px; fill: currentColor; }
.p-squad .scard .cap { padding-top: 2px; overflow-wrap: anywhere; }
.p-squad .scard dl.fee { margin-top: 8px; }
.p-squad .scard .honours-total { margin: -4px 0 8px; text-align: center; font-size: 30px; font-weight: 600; color: var(--accent-2); line-height: 1; }
.p-squad .scard.hon dl { margin: 0; }
.p-squad .scard.hon dl div { border-top: 0; margin-top: 8px; padding: 7px 10px; border-radius: 6px; background: rgba(110,0,190,.38); border: 1px solid rgba(242,44,247,.55); }
.p-squad .scard .yrs { margin: 5px 0 0; padding: 0 4px; text-align: center; font-size: 12px; color: var(--ink-soft); line-height: 1.4; overflow-wrap: anywhere; }

@media (min-width: 1000px) {
  .p-squad #vs-sec { grid-column: 1 / -1; grid-row: 10; }
  .p-squad #trophy-sec { grid-column: 1 / -1; grid-row: 11; }
  .p-squad #career-fin { grid-column: 1 / -1; grid-row: 12; }
}


/* ------------------------------------------------------------------
   CAROUSELS: the team and manager cards and the trophy cabinet scroll sideways on every screen size.
   Swipe or scroll on touch, arrow buttons and dots (added by js/charts.js) for mouse and keyboard.
------------------------------------------------------------------- */
.p-squad .snap, .p-squad .trophies { padding-top: 6px; padding-bottom: 12px; }
@media (min-width: 600px) {
  .p-squad .scard { width: calc((100% - 20px) / 3); }
  .p-squad .trophy { width: calc((100% - 40px) / 5); }
}
@media (min-width: 1000px) {
  .p-squad .snap { gap: 16px; margin: 0; padding: 6px 2px 12px; scroll-padding: 0 2px; }
  .p-squad .scard { width: calc((100% - 52px) / 4); }
  .p-squad .trophies { gap: 12px; margin: 0; padding: 6px 2px 12px; scroll-padding: 0 2px; }
  .p-squad .trophy { width: calc((100% - 62px) / 6); }
}
.p-squad .car-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 6px; }
.p-squad .car-nav[hidden] { display: none; }
.p-squad .car-btn {
  width: 44px; height: 44px; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--ink);
  border: 1px solid rgba(102,229,246,.7); border-radius: 50%;
  background: linear-gradient(180deg, rgba(102,229,246,.22), rgba(102,229,246,.06));
}
.p-squad .car-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.p-squad .car-btn:hover { background: rgba(102,229,246,.3); }
.p-squad .car-btn[aria-disabled="true"] { opacity: .35; cursor: default; }
.p-squad .car-dots { display: flex; gap: 8px; align-items: center; }
.p-squad .car-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.3); cursor: pointer; }
.p-squad .car-dot[aria-current="true"] { background: var(--accent); transform: scale(1.25); }
.p-squad .car-dot { position: relative; }
.p-squad .car-dot::before { content: ""; position: absolute; inset: -10px; }


/* ------------------------------------------------------------------
   13 OCT UPDATE: squad table keeps players who have left; transfers list
------------------------------------------------------------------- */
.p-squad .transfers h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.p-squad .transfers dl.tl { margin: 0; }
.p-squad .transfers dl.tl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.12); }
.p-squad .transfers dl.tl dt { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.p-squad .transfers dl.tl dd { margin: 0; white-space: nowrap; font-weight: 600; color: var(--accent); }
.p-squad .transfers dl.tl small { display: block; margin-top: 2px; color: var(--ink-faint); font-size: 12px; }
.p-squad .transfers b.in, .p-squad .transfers b.out { display: inline-block; min-width: 34px; margin-right: 6px; padding: 1px 6px; border-radius: 4px; font-size: 11px; text-align: center; color: #07076b; }
.p-squad .transfers b.in { background: var(--up); }
.p-squad .transfers b.out { background: var(--down); }


/* trophy pictures from img/trophies/ (any shape fits the same 84px-high box) */
.p-squad .trophy img { display: block; width: 100%; height: 84px; margin: 0 auto 8px; object-fit: contain; }
