
    /* Breadcrumb above title bar */
    .fb-crumbs {
      color: #6c757d;
      font-size: 0.82rem;
      padding: 0.75rem 0 0.5rem 0;
    }
    .fb-crumbs a { color: #243447; text-decoration: none; }
    .fb-crumbs a:hover { text-decoration: underline; }
    .fb-crumbs .sep { margin: 0 6px; color: #b0b8c4; }

    /* Navy team header card */
    .team-header {
      background: #1a1142;
      color: #fff;
      border-radius: 8px;
      padding: 18px 20px;
      display: flex;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
      margin-bottom: 1rem;
    }
    .team-header .team-logo-big {
      width: 64px;
      height: 64px;
      object-fit: contain;
      flex-shrink: 0;
      background: #fff;
      border-radius: 6px;
      padding: 4px;
    }
    .team-header h1 {
      color: #fff;
      font-size: 1.25rem;
      font-weight: 600;
      margin: 0 0 4px 0;
      line-height: 1.25;
    }
    .team-header .meta {
      color: #c7c2e8;
      font-size: 0.8rem;
    }
    .team-header .meta .meta-item {
      display: inline-flex;
      align-items: center;
      margin-right: 14px;
      margin-top: 2px;
    }
    .team-header .meta .meta-item img {
      vertical-align: middle;
      border-radius: 2px;
      margin-right: 4px;
    }
    .team-header .meta a {
      color: #b8d8ff;
      text-decoration: none;
    }
    .team-header .meta a:hover { text-decoration: underline; }

    /* Star favourite button sits next to the team H1 on the navy header.
       Give it a transparent hover on the dark card so it doesn't jump
       against the light default from base.html. */
    .team-header-star:hover { background: rgba(255,255,255,0.12) !important; }
    .team-header-star:focus-visible { outline-color: #fff !important; }

    /* Form pills inside the header */
    .team-header .form-strip {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .team-header .form-strip .form-label {
      font-size: 0.7rem;
      color: rgba(255,255,255,0.65);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-right: 6px;
    }
    .form-pill-circle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      font-size: 0.7rem;
      font-weight: 700;
      color: #fff;
      line-height: 1;
    }
    .form-pill-circle.win { background: #2fa85f; }
    .form-pill-circle.draw { background: #9aa0a8; }
    .form-pill-circle.loss { background: #d90429; }

    /* Section card (info, fixtures, stats) */
    .team-section {
      background: #fff;
      border: 1px solid #e4e7eb;
      border-radius: 8px;
      margin-bottom: 1rem;
      overflow: hidden;
      box-shadow: 0 1px 2px rgba(26, 17, 66, 0.04);
    }
    .team-section-header {
      background: #1a1142;
      color: #fff;
      padding: 10px 16px;
      font-size: 0.85rem;
      font-weight: 600;
      margin: 0;
    }
    .team-section-header.live { background: #d90429; }
    .team-seo-body {
      padding: 14px 18px 16px 18px;
      color: #3a4452;
      font-size: 0.9rem;
      line-height: 1.55;
    }
    .team-seo-body p { margin: 0 0 10px 0; }
    .team-seo-body p:last-child { margin-bottom: 0; }
    .team-seo-body a { color: #4d2cd8; text-decoration: none; font-weight: 500; }
    .team-seo-body a:hover { text-decoration: underline; }

    /* Team match table — uses .football-match-table so the legacy
       `.football-match-table .table-active~div:not(.table-active){padding:13px 0 13px 15px}`
       rule provides match-row padding (otherwise margin:-10px on rows collapses heights). */
    .team-match-table {
      background: #fff;
      border-radius: 8px;
      overflow: hidden;
      margin-bottom: 1rem;
      box-shadow: 0 1px 2px rgba(26, 17, 66, 0.04);
    }
    .team-match-table .match-state-header {
      background: #f5f6f8;
      border-bottom: 1px solid #e4e7eb;
      padding: 9px 16px;
      margin: 0;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #6c757d;
    }
    .team-match-table .match-state-header.is-live {
      background: #fff5f6;
      color: #d90429;
    }

    /* Stat grid */
    .team-stat-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
      padding: 12px;
    }
    .team-stat-grid .stat {
      text-align: center;
      padding: 10px 6px;
      background: #f8f9fa;
      border-radius: 6px;
    }
    .team-stat-grid .stat .num {
      display: block;
      font-size: 1.35rem;
      font-weight: 700;
      color: #1a1142;
      line-height: 1;
    }
    .team-stat-grid .stat .lbl {
      display: block;
      font-size: 0.66rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #6c757d;
      margin-top: 4px;
    }

    /* Info card */
    .team-info-card {
      padding: 12px 16px;
    }
    .team-info-card dl {
      margin: 0;
    }
    .team-info-card dt {
      color: #6c757d;
      font-weight: 500;
      font-size: 0.78rem;
    }
    .team-info-card dd {
      font-weight: 600;
      font-size: 0.85rem;
      color: #243447;
      margin-bottom: 0.5rem;
    }
    .team-info-card dd:last-child { margin-bottom: 0; }

    /* Competitions list */
    .team-comp-list {
      list-style: none;
      margin: 0;
      padding: 0;
    }
    .team-comp-list li {
      border-bottom: 1px solid #f1f3f5;
    }
    .team-comp-list li:last-child { border-bottom: none; }
    .team-comp-list li a {
      display: flex;
      align-items: center;
      padding: 0.55rem 1rem;
      text-decoration: none;
      color: #243447;
      font-size: 0.85rem;
    }
    .team-comp-list li a:hover { background: #f8f9fa; color: #1a1142; }
    .team-comp-list li img {
      width: 18px;
      height: 18px;
      object-fit: contain;
      margin-right: 8px;
    }
    .team-comp-list li .country {
      margin-left: auto;
      color: #8d949e;
      font-size: 0.72rem;
    }

    /* Next match card */
    .next-match-card {
      padding: 1rem;
      text-align: center;
    }
    .next-match-card .teams {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 8px;
    }
    .next-match-card .teams img {
      width: 36px;
      height: 36px;
      object-fit: contain;
    }
    .next-match-card .teams .t {
      flex: 1;
      font-size: 0.85rem;
      font-weight: 600;
      color: #243447;
    }
    .next-match-card .vs {
      font-size: 0.72rem;
      color: #6c757d;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .next-match-card .when {
      font-size: 0.8rem;
      color: #495057;
      margin-bottom: 4px;
    }
    .next-match-card .comp-tag {
      font-size: 0.72rem;
      color: #6c757d;
    }
    .next-match-card .btn-details {
      display: inline-block;
      margin-top: 10px;
      padding: 6px 14px;
      background: #1a1142;
      color: #fff;
      border-radius: 4px;
      text-decoration: none;
      font-size: 0.78rem;
      font-weight: 600;
    }
    .next-match-card .btn-details:hover { background: #2a1f5e; color: #fff; }

    .team-empty {
      background: #fff;
      border-radius: 8px;
      padding: 40px 20px;
      text-align: center;
      color: #6c757d;
    }

    /* Squad section — position-grouped grid of player cards */
    .squad-group-label {
      background: #f5f6f8;
      border-bottom: 1px solid #e4e7eb;
      padding: 7px 16px;
      margin: 0;
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #6c757d;
    }
    .squad-group-label .count {
      color: #adb5bd;
      font-weight: 500;
      margin-left: 6px;
    }
    .squad-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 1px;
      background: #e4e7eb;
      padding: 1px;
    }
    .squad-card {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      background: #fff;
      text-decoration: none;
      color: #243447;
      min-height: 52px;
      transition: background 0.12s ease;
    }
    .squad-card:hover {
      background: #f8f9fa;
      color: #1a1142;
      text-decoration: none;
    }
    .squad-card img.squad-avatar,
    .squad-card .squad-avatar-fallback {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      object-fit: cover;
      background: #f1f3f5;
      flex-shrink: 0;
    }
    .squad-card .squad-avatar-fallback {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.8rem;
      font-weight: 700;
      color: #8d949e;
      text-transform: uppercase;
    }
    .squad-card .squad-body {
      display: flex;
      flex-direction: column;
      min-width: 0;
      flex: 1;
    }
    .squad-card .squad-name {
      font-size: 0.82rem;
      font-weight: 600;
      line-height: 1.2;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .squad-card .squad-meta {
      font-size: 0.68rem;
      color: #6c757d;
      margin-top: 2px;
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .squad-card .squad-flag {
      width: 12px;
      height: 9px;
      object-fit: cover;
      border-radius: 1px;
    }

    /* League position card */
    .league-position-card {
      padding: 1rem;
      text-align: center;
    }
    .league-position-card .rank {
      display: inline-block;
      font-size: 2.4rem;
      font-weight: 800;
      color: #1a1142;
      line-height: 1;
    }
    .league-position-card .rank-suffix {
      font-size: 0.9rem;
      font-weight: 700;
      color: #6c757d;
      vertical-align: super;
      margin-left: 2px;
    }
    .league-position-card .of {
      font-size: 0.78rem;
      color: #6c757d;
      margin-top: 4px;
    }
    .league-position-card .chip-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 6px;
      margin-top: 10px;
    }
    .league-position-card .chip {
      background: #f8f9fa;
      border-radius: 4px;
      padding: 6px 2px;
    }
    .league-position-card .chip .v {
      font-size: 0.9rem;
      font-weight: 700;
      color: #1a1142;
      line-height: 1;
      display: block;
    }
    .league-position-card .chip .k {
      font-size: 0.6rem;
      text-transform: uppercase;
      color: #8d949e;
      letter-spacing: 0.04em;
      margin-top: 3px;
      display: block;
    }
    .league-position-card .leader-gap {
      font-size: 0.72rem;
      color: #6c757d;
      margin-top: 8px;
    }

    /* Team top scorers list */
    .team-scorers-list {
      list-style: none;
      margin: 0;
      padding: 0;
    }
    .team-scorers-list li {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0.55rem 1rem;
      border-bottom: 1px solid #f1f3f5;
      font-size: 0.85rem;
    }
    .team-scorers-list li:last-child { border-bottom: none; }
    .team-scorers-list li .rank-num {
      width: 20px;
      color: #8d949e;
      font-size: 0.72rem;
      font-weight: 700;
    }
    .team-scorers-list li .avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      object-fit: cover;
      background: #f1f3f5;
      flex-shrink: 0;
    }
    .team-scorers-list li .avatar-fallback {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: #f1f3f5;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.68rem;
      font-weight: 700;
      color: #8d949e;
      flex-shrink: 0;
    }
    .team-scorers-list li .pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .team-scorers-list li .goals {
      background: #f8f9fa;
      padding: 2px 8px;
      border-radius: 10px;
      font-size: 0.75rem;
      font-weight: 700;
      color: #1a1142;
    }

    /* Home/away splits grid */
    .home-away-split {
      display: grid;
      grid-template-columns: 1fr 1fr;
      padding: 12px;
      gap: 8px;
    }
    .home-away-split .split-cell {
      background: #f8f9fa;
      border-radius: 6px;
      padding: 10px 6px;
      text-align: center;
    }
    .home-away-split .split-cell .split-label {
      font-size: 0.65rem;
      text-transform: uppercase;
      color: #8d949e;
      letter-spacing: 0.05em;
      font-weight: 700;
    }
    .home-away-split .split-cell .split-record {
      font-size: 0.95rem;
      font-weight: 700;
      color: #1a1142;
      margin-top: 5px;
    }
    .home-away-split .split-cell .split-record .w { color: #2fa85f; }
    .home-away-split .split-cell .split-record .l { color: #d90429; }

    /* Biggest win/loss card */
    .big-score-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      padding: 12px;
    }
    .big-score-grid .bs-cell {
      background: #f8f9fa;
      border-radius: 6px;
      padding: 12px;
      text-decoration: none;
      color: inherit;
      display: block;
    }
    .big-score-grid .bs-cell:hover { background: #eff1f5; text-decoration: none; color: inherit; }
    .big-score-grid .bs-cell .bs-label {
      font-size: 0.65rem;
      text-transform: uppercase;
      color: #8d949e;
      letter-spacing: 0.05em;
      font-weight: 700;
    }
    .big-score-grid .bs-cell .bs-score {
      font-size: 1rem;
      font-weight: 700;
      color: #1a1142;
      margin-top: 4px;
    }
    .big-score-grid .bs-cell.win .bs-label { color: #2fa85f; }
    .big-score-grid .bs-cell.loss .bs-label { color: #d90429; }
    .big-score-grid .bs-cell .bs-meta {
      font-size: 0.7rem;
      color: #6c757d;
      margin-top: 4px;
    }
    @media (max-width: 575px) {
      .big-score-grid { grid-template-columns: 1fr; }
      .home-away-split { grid-template-columns: 1fr; }
    }
  