/* Card presentation shared by the entity pages. The fixture page has its own
   .match-* rules in match-design.css; these are the same primitives under
   page-neutral names, ready for that file to converge on later. */
.sf-card { min-width: 0; padding: 18px; background: white; border: 1px solid #dfe7ed; border-radius: 12px; }
.sf-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.sf-card-head h2, .sf-card-head h3 { min-width: 0; flex: 1; font-size: 15px; font-weight: 700; line-height: 1.35; color: #102b3b; }
.sf-card-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; background: #e7f7ef; border-radius: 9px; color: #087a58; }
.sf-card-icon svg { width: 18px; height: 18px; }
.sf-card-aside { flex: none; font-size: 12px; color: #6b8079; }
.sf-card-link { flex: none; font-size: 12px; font-weight: 700; color: #087a58; }
.sf-card-link:hover { text-decoration: underline; }
.sf-card-empty { font-size: 12px; line-height: 1.6; color: #6b8079; }
.sf-card-note { margin-top: 12px; font-size: 11px; line-height: 1.55; color: #90a4af; }

/* x-smart-logo wraps its image in <picture>, so rules reach through it. */
.sf-logo { display: inline-flex; flex: none; align-items: center; justify-content: center; }
.sf-logo :is(picture,img,div) { width: 100%; height: 100%; object-fit: contain; }

/* Season statistics: a grid of figures. */
.sf-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.sf-stat { min-width: 0; padding: 12px 8px; text-align: center; background: #f7fafb; border: 1px solid #e6edf1; border-radius: 10px; }
.sf-stat-value { font-size: 23px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sf-stat-label { margin-top: 3px; font-size: 11px; line-height: 1.35; color: #5d7480; }
.sf-tone-neutral { color: #102b3b; }
.sf-tone-win { color: #16a34a; }
.sf-tone-draw { color: #d97706; }
.sf-tone-loss { color: #e0576b; }
.sf-tone-for { color: #0f766e; }
.sf-tone-against { color: #ea7a3c; }
.sf-tone-extra { color: #7c5cd6; }

/* Form badges and their tally. */
.sf-form-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-form-badge { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; font-size: 12px; font-weight: 800; }
.sf-form-badge.is-win { background: #16a34a; color: white; }
.sf-form-badge.is-draw { background: #d7e0e6; color: #48606b; }
.sf-form-badge.is-loss { background: #e0576b; color: white; }
.sf-form-badge.is-unknown { background: #eef2f5; color: #90a4af; }
a.sf-form-badge:hover { filter: brightness(1.08); }
.sf-form-tally { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef3f6; }
.sf-form-tally > div { text-align: center; }
.sf-form-tally dd { margin: 0; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sf-form-tally dt { margin-top: 2px; font-size: 11px; color: #5d7480; }

.sf-subhead { margin-bottom: 10px; font-size: 12px; font-weight: 700; color: #102b3b; }

/* Two-column split, used by home vs away. */
.sf-split { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.sf-split > div { min-width: 0; padding: 14px; background: #f7fafb; border: 1px solid #e6edf1; border-radius: 10px; }
.sf-split h3 { margin-bottom: 10px; font-size: 12px; font-weight: 700; color: #102b3b; }

/* Label and value rows, used by records and the split panels. */
.sf-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 7px 0; border-top: 1px solid #eef3f6; }
.sf-rows > div:first-child { padding-top: 0; border-top: 0; }
.sf-rows dt, .sf-rows > div > span:first-child { flex: none; font-size: 12px; color: #6b8079; }
.sf-rows dd, .sf-rows > div > span:last-child { min-width: 0; margin: 0; font-size: 12px; font-weight: 700; text-align: right; color: #102b3b; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Ranked player list. */
.sf-rank-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.sf-rank-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 10px; background: #f7fafb; border: 1px solid #e6edf1; border-radius: 10px; }
.sf-rank-index { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; background: #e7f7ef; border-radius: 8px; font-size: 11px; font-weight: 800; color: #087a58; font-variant-numeric: tabular-nums; }
.sf-rank-name { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.sf-rank-name > span:first-child { overflow: hidden; font-size: 13px; font-weight: 600; color: #102b3b; text-overflow: ellipsis; white-space: nowrap; }
.sf-rank-name > span:last-child { font-size: 10px; color: #7e9299; }
.sf-rank-value { flex: none; text-align: right; }
.sf-rank-value > span:first-child { display: block; font-size: 15px; font-weight: 800; color: #102b3b; font-variant-numeric: tabular-nums; }
.sf-rank-value > span:last-child { font-size: 10px; color: #7e9299; font-variant-numeric: tabular-nums; }

/* Fixture rows, used by the upcoming list. */
.sf-fixture-rows { display: flex; flex-direction: column; gap: 4px; margin: -4px -6px -2px; }
.sf-fixture-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 8px; border-radius: 9px; }
.sf-fixture-row:hover { background: #f7fafb; }
.sf-fixture-teams { display: flex; min-width: 0; align-items: center; gap: 8px; }
.sf-fixture-teams .sf-logo { width: 20px; height: 20px; }
.sf-fixture-teams > span:not(.sf-logo) { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 600; color: #102b3b; text-overflow: ellipsis; white-space: nowrap; }
.sf-fixture-when { flex: none; text-align: right; }
.sf-fixture-when > span:first-child { display: block; font-size: 13px; font-weight: 800; color: #102b3b; font-variant-numeric: tabular-nums; }
.sf-fixture-when > span:last-child { font-size: 10px; color: #7e9299; }

/* Sidebar quick links. */
.sf-links { display: flex; flex-direction: column; gap: 2px; margin: -4px -6px -2px; }
.sf-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 8px; border-radius: 8px; }
.sf-link:hover { background: #f7fafb; }
.sf-link > span:first-child { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 600; color: #102b3b; text-overflow: ellipsis; white-space: nowrap; }
.sf-link:hover > span:first-child { color: #087a58; }
.sf-link > span:last-child { flex: none; font-size: 12px; color: #90a4af; }

/* Country prompt card. */
.sf-prompt { background: linear-gradient(135deg,#edfaf4,#fafffd); border-color: #cde8dc; }
.sf-prompt p { font-size: 12px; line-height: 1.6; color: #526b63; }
.sf-prompt a.sf-prompt-cta { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 9px 15px; background: #16a34a; border-radius: 9px; font-size: 13px; font-weight: 700; color: white; }
.sf-prompt a.sf-prompt-cta:hover { background: #15803d; }

@media(max-width:639px) {
    .sf-card { padding: 15px; }
    .sf-card-head { margin-bottom: 13px; }
    .sf-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
    .sf-stat-value { font-size: 20px; }
    .sf-split { grid-template-columns: minmax(0,1fr); gap: 12px; }
    .sf-rank-list { grid-template-columns: minmax(0,1fr); }
    .sf-form-tally { margin-top: 14px; padding-top: 13px; }
    .sf-form-tally dd { font-size: 18px; }
}
