.n9fc-matchday .site-main > article:is(.n9fc-team-profile, .n9fc-team-directory) {
  min-width: 0;
  padding: clamp(.8rem, 2.6vw, 1.65rem);
}

.n9fc-team-profile .entry-content {
  min-width: 0;
  margin: 0;
}

.n9fc-matchday .site-main > article > .n9fc-team-hero {
  display: grid;
  gap: .85rem;
  padding: clamp(.85rem, 3vw, 1.5rem);
  border-top: .23rem solid var(--n9fc-red);
  border-radius: .55rem;
  background: var(--n9fc-header);
  color: #fff;
}

.n9fc-team-identity {
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 2vw, 1rem);
}

.n9fc-team-hero .sp-section-content-logo,
.n9fc-team-hero .sp-template-team-logo {
  float: none;
  flex: 0 0 auto;
  width: clamp(3rem, 11vw, 5.2rem);
  max-width: none;
  margin: 0;
}

.n9fc-team-hero .sp-template-team-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.n9fc-matchday .site-main .n9fc-team-hero .entry-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.55rem, 3.8vw, 2.75rem);
  text-align: start;
}

.n9fc-team-season {
  margin: 0 0 .22rem;
  color: var(--n9fc-gold);
  font: 700 .76rem/1.25 var(--n9fc-body);
}

.n9fc-team-shortcuts,
.n9fc-team-directory-links {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.n9fc-team-shortcuts a,
.n9fc-team-directory-links a,
.n9fc-team-directory-card .n9fc-team-view {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .3rem .72rem;
  border: 1px solid var(--n9fc-line);
  border-radius: .35rem;
  font: 700 .82rem/1.2 var(--n9fc-body);
  text-align: start;
}

.n9fc-team-shortcuts a {
  border-color: #5e5854;
  background: #292729;
  color: #fff;
}

.n9fc-team-shortcuts a:hover {
  background: #3a3336;
}

.n9fc-team-matchday {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .55rem;
  margin-bottom: 1.45rem;
}

.n9fc-matchday .site-main .n9fc-team-profile :is(.n9fc-team-matchday > h2, .n9fc-standings .sp-table-caption, .n9fc-team-about > h2),
.n9fc-matchday .site-main .n9fc-team-directory .entry-content > h2 {
  margin: 0 0 .2rem;
  padding: 0 0 0 .5rem;
  border: 0;
  border-inline-start: .21rem solid var(--n9fc-red);
  background: transparent;
  color: var(--n9fc-ink);
  font: 600 clamp(1.22rem, 2.35vw, 1.55rem)/1.2 var(--n9fc-display);
  letter-spacing: normal;
  text-transform: none;
}

.n9fc-team-matchday > :is(h2, .sp-view-all-link) {
  grid-column: 1 / -1;
}

.n9fc-team-matchday .n9fc-matchday-item {
  min-width: 0;
  padding: .68rem .7rem;
  border: 1px solid var(--n9fc-line);
  border-radius: .5rem;
  background: #fcfaf7;
}

.n9fc-team-matchday .n9fc-matchday-item + .n9fc-matchday-item {
  background: #fff;
}

.n9fc-team-matchday .n9fc-matchday-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem .5rem;
  margin-bottom: .5rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--n9fc-line);
}

.n9fc-team-matchday .n9fc-matchday-meta h3 {
  margin: 0;
  color: #851c29;
  font: 700 .74rem/1.25 var(--n9fc-body);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.n9fc-team-matchday .sp-event-date {
  color: var(--n9fc-muted);
  font: 600 .77rem/1.25 var(--n9fc-body);
  font-variant-numeric: tabular-nums;
}

.n9fc-team-matchday .n9fc-matchday-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .45rem;
}

.n9fc-team-matchday .sp-event-title {
  font: 700 .89rem/1.27 var(--n9fc-body);
  overflow-wrap: anywhere;
}

.n9fc-team-matchday .sp-event-title a {
  color: var(--n9fc-ink);
}

.n9fc-team-matchday .n9fc-matchday-teams {
  display: grid;
  gap: .4rem;
}

.n9fc-team-matchday .n9fc-matchday-team {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  align-items: center;
  gap: .42rem;
}

.n9fc-team-matchday .n9fc-matchday-team img {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  object-fit: contain;
}

.n9fc-team-matchday .sp-event-results {
  min-width: 2.4rem;
  padding: .38rem .54rem;
  border-radius: .3rem;
  background: #f8e7e8;
  color: #851c29;
  font: 600 .96rem/1.2 var(--n9fc-display);
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.n9fc-team-matchday .n9fc-matchday-item + .n9fc-matchday-item .sp-event-results {
  background: var(--n9fc-ink);
  color: #fff;
}

.n9fc-matchday .site-main .n9fc-team-matchday .sp-event-results :is(a, .sp-result) {
  color: inherit;
}

.n9fc-team-matchday .sp-view-all-link {
  margin: 0;
  padding: 0;
  text-align: start;
}

.n9fc-team-matchday .sp-view-all-link a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: #851c29;
  font-size: .88rem;
  font-weight: 700;
}

.n9fc-team-profile .sp-section-content-lists,
.n9fc-team-profile .sp-section-content-tables,
.n9fc-team-about {
  margin-block: 1.45rem;
}

.n9fc-team-profile .n9fc-table-scroll:has(> .n9fc-team-roster) {
  border: 1px solid var(--n9fc-line);
  border-radius: .5rem;
}

.n9fc-team-profile .n9fc-table-scroll .n9fc-team-roster {
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 0;
  table-layout: fixed;
}

.n9fc-team-profile .n9fc-table-scroll .n9fc-team-roster-wide {
  min-width: 36rem;
}

.n9fc-matchday .n9fc-team-profile .n9fc-standings-grid .n9fc-team-club-row {
  --n9fc-standings-row: #faeeee;
}

.n9fc-team-profile .n9fc-team-club-row td.data-rank {
  box-shadow: inset .18rem 0 var(--n9fc-red);
}

.n9fc-team-profile [id^="team-"] {
  scroll-margin-block-start: 1rem;
}

.n9fc-matchday .site-main .n9fc-team-profile .n9fc-team-roster :is(th, td) {
  box-sizing: border-box;
  padding: .52rem .39rem !important;
  border-width: 0 0 1px;
  border-color: var(--n9fc-line);
  font-size: .82rem;
  line-height: 1.26;
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
}

.n9fc-team-profile .n9fc-team-roster tr:nth-child(even) td {
  background: #faf8f4;
}

.n9fc-matchday .site-main .n9fc-team-profile .n9fc-team-roster th:is(.sorting, .sorting_asc, .sorting_desc) {
  position: relative;
  padding-inline-end: .68rem !important;
  background-image: none !important;
  white-space: nowrap;
}

.n9fc-team-profile .n9fc-team-roster th:is(.sorting, .sorting_asc, .sorting_desc)::after {
  position: absolute;
  inset: 50% .26rem auto auto;
  width: .28rem;
  height: .28rem;
  border: solid var(--n9fc-muted);
  border-width: 0 1px 1px 0;
  content: '';
  transform: translateY(-65%) rotate(45deg);
}

.n9fc-team-profile .n9fc-team-roster th.sorting_asc::after {
  transform: translateY(-25%) rotate(225deg);
}

.n9fc-team-profile .n9fc-team-roster th.data-number { width: 2.15rem; }
.n9fc-team-profile .n9fc-team-roster th.data-age { width: 2.8rem; }
.n9fc-team-profile .n9fc-team-roster th.data-position { width: clamp(5rem, 11vw, 8.2rem); }

.n9fc-matchday .site-main .n9fc-team-profile .n9fc-team-roster :is(.data-number, .data-age) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.n9fc-team-profile .n9fc-team-roster td.data-name a {
  color: var(--n9fc-ink);
  font-weight: 700;
}

.n9fc-team-profile .n9fc-team-roster td.data-name a:has(> .player-flag) {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
}

.n9fc-team-profile .n9fc-team-roster .player-flag {
  float: none;
  flex: 0 0 .95rem;
  width: .95rem;
  margin: .16rem 0 0;
  line-height: 1;
}

.n9fc-team-profile .n9fc-team-roster .player-flag img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.n9fc-team-standing {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 0 .6rem;
}

.n9fc-team-standing div {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .34rem .53rem;
  border: 1px solid #efd3d3;
  border-radius: .34rem;
  background: #fbefef;
  color: #851c29;
}

.n9fc-team-standing :is(dt, dd) {
  margin: 0;
  font: 700 .79rem/1.2 var(--n9fc-body);
}

.n9fc-team-standing dd {
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
}

.n9fc-team-about {
  padding: .9rem;
  border: 1px solid var(--n9fc-line);
  border-radius: .5rem;
  background: #fcfaf7;
}

.n9fc-team-about .sp-post-content p {
  margin: .55rem 0;
}

.n9fc-team-about .sp-team-details {
  margin: .7rem 0;
}

.n9fc-team-about .sp-team-details dd { margin: 0 0 .4rem; }

.n9fc-matchday .n9fc-team-about form .sp-team-button {
  min-height: 2.75rem;
  margin: 0;
  padding: .38rem .75rem;
  border: 1px solid #851c29;
  border-radius: .35rem;
  background: #851c29;
  color: #fff;
  font: 700 .86rem/1.2 var(--n9fc-body);
}

.n9fc-team-about .sp-section-content-link > br { display: none; }

.n9fc-team-archive {
  margin-top: 1rem;
}

.n9fc-team-archive > summary {
  padding: .66rem .8rem;
  border: 1px solid var(--n9fc-line);
  border-radius: .4rem;
  background: #f7f4ef;
  color: #851c29;
  font-weight: 700;
  cursor: pointer;
}

.n9fc-team-archive > .sp-section-content-events { margin-top: .75rem; }

.n9fc-team-directory .entry-content > .n9fc-team-directory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .65rem;
  margin: .65rem 0 1.4rem;
}

.n9fc-team-directory-grid :is(.wp-block-column, .wp-block-group):has(.n9fc-team-directory-card) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0 !important;
  border: 0;
  background: transparent !important;
}

.n9fc-team-directory-grid .wp-block-group { flex: 1; }

.n9fc-team-directory-grid .n9fc-team-directory-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: .42rem;
  padding: .85rem;
  border: 1px solid var(--n9fc-line);
  border-top: .18rem solid var(--n9fc-red);
  border-radius: .45rem;
  background: #fcfaf7;
}

.n9fc-team-directory-card > h3 {
  margin: 0;
  color: var(--n9fc-ink);
  font: 600 clamp(1.12rem, 2.2vw, 1.43rem)/1.2 var(--n9fc-display);
}

.n9fc-matchday .site-main .n9fc-team-directory-card > p {
  margin: 0;
  color: var(--n9fc-muted);
  font-size: .86rem;
  line-height: 1.4;
}

.n9fc-team-directory-actions {
  padding-top: .32rem;
}

.n9fc-team-directory-card .n9fc-team-view {
  border-color: #851c29;
  background: #851c29;
  color: #fff;
}

.n9fc-team-directory-links { margin-top: .45rem; }

.n9fc-team-directory-links a {
  background: #fff;
  color: #851c29;
}

@media (min-width: 680px) {
  .n9fc-team-matchday,
  .n9fc-team-directory .entry-content > .n9fc-team-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 981px) {
  .n9fc-matchday .content-wrapper:has(> #primary :is(.n9fc-team-profile, .n9fc-team-directory)):has(> #secondary) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(20rem, 29vw, 23.25rem);
    align-items: start;
    gap: clamp(1rem, 2vw, 1.8rem);
  }

  .n9fc-matchday .content-wrapper:has(> #primary :is(.n9fc-team-profile, .n9fc-team-directory)) > :is(#primary, #secondary) {
    float: none;
    width: auto;
    min-width: 0;
    padding-inline: 0;
  }
}

.n9fc-matchday:has(.n9fc-team-profile, .n9fc-team-directory) #secondary .adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}
