@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --navy: #09264A;
    --navy-2: #12375f;
    --navy-soft: #eef3f8;
    --green: #70d719;
    --green-ink: #3c7d12;
    --green-soft: #f2fbe8;
    --bg: #f7f9fc;
    --surface: #ffffff;
    --soft: #f5f7fa;
    --soft-2: #fafbfd;
    --border: #e5eaf0;
    --border-strong: #d4dde7;
    --text: #16283f;
    --muted: #66778b;
    --muted-2: #7c8b9d;
    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px rgba(9, 38, 74, 0.04);
    --shadow-lift: 0 6px 18px rgba(9, 38, 74, 0.07);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --shell: 1024px;
    --ad-rail: 160px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

svg {
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

h1,
h2,
h3,
p,
dl,
dd,
figure {
    margin: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--green-ink);
    outline-offset: 2px;
}

::selection {
    background: rgba(112, 215, 25, 0.28);
}

.shell {
    width: 100%;
    max-width: var(--shell);
    margin: 0 auto;
    padding: 0 24px;
}

/* Ad rails — the empty gutters either side of the 1024px shell */

.ad-rail {
    display: none;
    position: fixed;
    top: 88px;
    z-index: 30;
    width: var(--ad-rail);
    min-height: 600px;
}

.ad-rail--left {
    left: calc(50% - (var(--shell) / 2) - var(--ad-rail) - 24px);
}

.ad-rail--right {
    right: calc(50% - (var(--shell) / 2) - var(--ad-rail) - 24px);
}

@media (min-width: 1440px) {
    .ad-rail {
        display: block;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    z-index: 200;
    padding: 10px 14px;
    border-radius: 0 0 8px 8px;
    background: var(--navy);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

.icon {
    width: 18px;
    height: 18px;
    flex: none;
}

.flag {
    width: 20px;
    height: 15px;
    flex: none;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(9, 38, 74, 0.12);
    background: var(--soft);
}

.flag--lg {
    width: 64px;
    height: 48px;
    border-radius: 4px;
}

.flag--empty {
    display: inline-block;
    background: var(--soft);
}

/* Flag beside a label on one line, e.g. a place of birth. */
.flag-text {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* A flag sitting inline in a sentence, e.g. a panel subtitle. */
.panel__sub .flag-text {
    vertical-align: middle;
    gap: 5px;
}

/* Club crest beside a club name. */
.club-logo {
    width: 20px;
    height: 20px;
    flex: none;
    object-fit: contain;
}

/* Substitute count in a performance row, e.g. "3 (2)". */
.perf-sub {
    color: var(--muted-2);
    font-size: 10.5px;
}

.nowrap {
    white-space: nowrap;
}

.text-muted {
    color: var(--muted);
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: saturate(1.2) blur(8px);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex: none;
}

.brand__mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.brand__name {
    color: var(--navy);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.brand__name span {
    color: var(--muted-2);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: -0.01em;
}

.primary-nav {
    flex: 1;
    min-width: 0;
}

.primary-nav__list {
    display: flex;
    align-items: stretch;
    gap: 1px;
}

.primary-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 6px;
    color: #4b5e74;
    font-size: 12px;
    font-weight: 550;
    white-space: nowrap;
    transition: color 120ms ease, background-color 120ms ease;
}

.primary-nav__link:hover {
    color: var(--navy);
    background: #f8fafc;
}

.primary-nav__link.is-active {
    color: var(--navy);
    font-weight: 650;
}

.primary-nav__link.is-active::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 0;
    height: 2px;
    background: var(--green);
    border-radius: 2px 2px 0 0;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

.quick-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 168px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.quick-search:focus-within {
    border-color: #a9cf8c;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(112, 215, 25, 0.12);
}

.quick-search__icon {
    width: 15px;
    height: 15px;
    margin: 0 7px 0 10px;
    color: var(--muted-2);
}

.quick-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 12px;
    outline: none;
}

.quick-search input::placeholder {
    color: var(--muted-2);
}

.quick-search kbd {
    margin-right: 7px;
    padding: 1px 5px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    color: var(--muted-2);
    font-family: var(--font);
    font-size: 10px;
    line-height: 16px;
}

.quick-search--mobile {
    display: none;
    width: 100%;
    height: 40px;
    margin-top: 12px;
    background: #fff;
}

.quick-search--mobile input {
    font-size: 13px;
}

.search-shortcut {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    background: #fff;
}

.search-shortcut:hover {
    color: var(--navy);
    border-color: var(--border-strong);
}

.lang-menu {
    position: relative;
}

.lang-menu summary {
    list-style: none;
}

.lang-menu summary::-webkit-details-marker {
    display: none;
}

.lang-menu__summary {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--navy);
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: 0.02em;
    cursor: pointer;
    user-select: none;
}

.lang-menu__summary:hover {
    border-color: var(--border-strong);
}

.lang-menu__chevron {
    width: 13px;
    height: 13px;
    color: var(--muted-2);
}

.lang-menu__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    width: 196px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    box-shadow: var(--shadow-lift);
}

.lang-menu__title {
    padding: 4px 8px 6px;
    color: var(--muted-2);
    font-size: 9.5px;
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.lang-menu__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text);
}

.lang-menu__item:hover {
    background: var(--soft);
}

.lang-menu__item.is-active {
    background: var(--green-soft);
    color: var(--navy);
    font-weight: 600;
}

.lang-menu__item.is-disabled {
    color: var(--muted-2);
    cursor: default;
}

.lang-menu__code {
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.lang-menu__item.is-disabled .lang-menu__code {
    padding: 1px 5px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--soft);
    font-size: 9px;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--navy);
}

.nav-toggle__close {
    display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__open {
    display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
    display: block;
}

/* Main */

.site-main {
    padding: 26px 0 64px;
}

section[id],
.panel[id] {
    scroll-margin-top: 82px;
}

.breadcrumbs {
    margin-bottom: 15px;
    font-size: 11.5px;
    color: var(--muted-2);
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li + li::before {
    content: "/";
    margin: 0 7px;
    color: #b8c4d2;
}

.breadcrumbs a {
    color: var(--muted);
    transition: color 120ms ease;
}

.breadcrumbs a:hover {
    color: var(--navy);
}

.breadcrumbs [aria-current="page"] {
    color: var(--navy);
    font-weight: 550;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 20px;
}

.page-head__main {
    max-width: 720px;
}

.eyebrow {
    margin-bottom: 6px;
    color: var(--green-ink);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-head h1 {
    color: var(--navy);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.page-head__sub {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    max-width: 640px;
}

.page-head__aside {
    flex: none;
    text-align: right;
    padding-bottom: 2px;
}

.data-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
}

.data-status strong {
    color: var(--navy);
    font-weight: 600;
}

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(112, 215, 25, 0.14);
    flex: none;
}

.page-head__note {
    margin-top: 5px;
    color: var(--muted-2);
    font-size: 11px;
}

/* Panels */

.home-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid #eef2f6;
}

.panel__head-main {
    min-width: 0;
}

.panel__title {
    color: var(--navy);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.panel__sub {
    margin-top: 2px;
    color: var(--muted-2);
    font-size: 10.5px;
}

.panel__action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
}

.panel__action:hover {
    color: var(--green-ink);
}

.panel__action .icon {
    width: 12px;
    height: 12px;
}

.panel__filters {
    display: grid;
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 1px solid #eef2f6;
}

.panel__filter-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.panel__filter-label {
    flex: none;
    padding-top: 4px;
    color: var(--muted-2);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel__filter-row .profile__chips {
    margin-top: 0;
}

.panel__body {
    min-width: 0;
    flex: 1;
}

.panel__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid #eef2f6;
    color: var(--navy);
    font-size: 11.5px;
    font-weight: 600;
    transition: background-color 120ms ease;
}

.panel__link:hover {
    background: #fafcff;
}

.panel__link .icon {
    width: 13px;
    height: 13px;
    color: var(--green-ink);
    transition: transform 120ms ease;
}

.panel__link:hover .icon {
    transform: translateX(2px);
}

/* Tabs */

.tabs {
    display: inline-flex;
    flex: none;
    gap: 2px;
    padding: 2px;
    border: 1px solid #e9eef4;
    border-radius: 7px;
    background: #f4f7fa;
}

.tab {
    padding: 3px 8px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    white-space: nowrap;
    transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.tab:hover {
    color: var(--navy);
}

.tab.is-active {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 1px 2px rgba(9, 38, 74, 0.09);
}

/* Tables */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.table caption {
    text-align: left;
}

.table th {
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
    background: #fbfcfe;
    color: var(--muted-2);
    font-size: 9.5px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}

.table th:first-child,
.table td:first-child {
    padding-left: 16px;
}

.table th:last-child,
.table td:last-child {
    padding-right: 16px;
}

.table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f3f7;
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr {
    transition: background-color 100ms ease;
}

.table tbody tr:hover {
    background: #fafcff;
}

/* Totals row under a table. */
.table tfoot th {
    padding: 8px 10px;
    border-top: 1px solid var(--border);
    background: #f7f9fc;
    color: var(--navy);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

/* Secondary line under the main value in a table cell. */
.cell-sub {
    display: block;
    margin-top: 2px;
    color: var(--muted-2);
    font-size: 10.5px;
    font-weight: 500;
}

.table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Home side reads into the score, away side reads out of it. */
.table .home-col {
    text-align: right;
    white-space: nowrap;
}

.table .match-team {
    color: inherit;
}

.table .score-col {
    text-align: center;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.table .away-col {
    text-align: left;
    white-space: nowrap;
}

.table th.num .sort-link {
    justify-content: flex-end;
}

/* Date and Squad are set narrower than a normal column: both drop their side
   padding, while Date keeps the panel gutter on its left edge. */
.table th.date-col,
.table td.date-col {
    padding-left: 16px;
    padding-right: 0;
    white-space: nowrap;
}

.table th.squad-col,
.table td.squad-col {
    padding-left: 0;
    padding-right: 0;
    white-space: nowrap;
}

/* Abbreviated column titles keep their full label in the title attribute. */
.table th abbr {
    text-decoration: none;
    cursor: help;
}

.table--home {
    min-width: 470px;
}

.table--home td {
    padding-top: 7px;
    padding-bottom: 7px;
}

/* The updates feed lists club fixtures, whose names are longer than the
   entity component's single-line budget. */
.table--updates .entity__name,
.table--updates .entity__meta {
    white-space: normal;
}

/* The away team's flag trails the fixture name in the changes table. */
.table--updates .entity__name .flag {
    display: inline-block;
    margin-left: 6px;
    vertical-align: -2px;
}

.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: inherit;
}

.sort-link:hover {
    color: var(--navy);
}

.table th.is-sorted {
    color: var(--navy);
}

.sort-caret {
    min-width: 7px;
    color: var(--green-ink);
    font-size: 9px;
}

.rank {
    width: 26px;
    color: var(--muted-2);
    font-size: 10.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.rank--top {
    color: var(--navy);
    font-weight: 700;
}

.rank--1 {
    color: var(--green-ink);
}

.fifa-rank {
    color: var(--navy);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fifa-move {
    margin-left: 4px;
    font-size: 9px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--muted-2);
    white-space: nowrap;
}

.fifa-move--up {
    color: var(--green-ink);
}

.fifa-move--down {
    color: #b4453a;
}

.entity {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.entity__body {
    min-width: 0;
}

.entity__name {
    display: block;
    overflow: hidden;
    color: var(--navy);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a .entity__name:hover,
.entity a:hover .entity__name {
    color: var(--green-ink);
}

.entity__meta {
    display: block;
    margin-top: 1px;
    color: var(--muted-2);
    font-size: 9.5px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
}

.meter {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    width: 100%;
}

.meter__track {
    width: 36px;
    height: 4px;
    flex: none;
    overflow: hidden;
    border-radius: 2px;
    background: #edf1f5;
}

.meter__fill {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: var(--green);
}

.meter__fill--navy {
    background: var(--navy);
}

.meter__value {
    min-width: 34px;
    color: var(--navy);
    font-size: 11px;
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Competitions list */

.comp-list {
    display: flex;
    flex-direction: column;
}

.comp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-bottom: 1px solid #f0f3f7;
    transition: background-color 110ms ease;
}

.comp-row:last-child {
    border-bottom: 0;
}

.comp-row:hover {
    background: #fafcff;
}

.comp-row__icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: none;
    border: 1px solid #edf1f6;
    border-radius: 7px;
    background: var(--soft);
    color: var(--navy-2);
}

.comp-row__icon .icon {
    width: 14px;
    height: 14px;
}

.comp-row__body {
    flex: 1;
    min-width: 0;
}

.comp-row__name {
    display: block;
    overflow: hidden;
    color: var(--navy);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comp-row__meta {
    display: block;
    margin-top: 1px;
    color: var(--muted-2);
    font-size: 9.5px;
}

.comp-row__stats {
    flex: none;
    color: var(--muted);
    font-size: 10px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.comp-row__stats b {
    color: var(--navy);
    font-weight: 650;
}

.comp-row__chevron {
    width: 12px;
    height: 12px;
    flex: none;
    color: #c2cdd9;
}

.comp-row:hover .comp-row__chevron {
    color: var(--green-ink);
}

/* Section heading used by the search page. */

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 11px;
}

.section-head__title {
    color: var(--navy);
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.section-head__sub {
    margin-top: 2px;
    color: var(--muted-2);
    font-size: 11px;
}

.section-head__action {
    flex: none;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.section-head__action:hover {
    color: var(--green-ink);
}

/* Summary bar */

.summary-bar {
    display: flex;
    align-items: stretch;
    margin-bottom: 13px;
    padding: 0 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.summary-bar__item {
    display: flex;
    align-items: baseline;
    gap: 7px;
    padding: 12px 16px;
    border-right: 1px solid #eef2f6;
}

.summary-bar__item:last-child {
    border-right: 0;
}

.summary-bar__value {
    color: var(--navy);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.summary-bar__label {
    color: var(--muted);
    font-size: 10.5px;
}

/* Filters */

.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 13px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.filter-bar__search {
    position: relative;
    display: flex;
    align-items: center;
    width: 250px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fbfcfe;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.filter-bar__search:focus-within {
    border-color: #a9cf8c;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(112, 215, 25, 0.1);
}

.filter-bar__search .icon {
    width: 14px;
    height: 14px;
    margin: 0 7px 0 10px;
    color: var(--muted-2);
}

.filter-bar__search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 12.5px;
    outline: none;
}

.filter-bar__search input::placeholder {
    color: var(--muted-2);
}

.select {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.select select {
    height: 34px;
    max-width: 210px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.select select:hover {
    border-color: var(--border-strong);
}

.select .icon {
    position: absolute;
    right: 8px;
    width: 12px;
    height: 12px;
    color: var(--muted-2);
    pointer-events: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn--primary {
    background: var(--navy);
    color: #fff;
}

.btn--primary:hover {
    background: var(--navy-2);
}

.btn--ghost {
    border-color: var(--border);
    background: #fff;
    color: var(--navy);
}

.btn--ghost:hover {
    border-color: var(--border-strong);
    background: var(--soft);
}

.filter-bar__reset {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    padding: 0 4px;
}

.filter-bar__reset:hover {
    color: var(--green-ink);
}

.filter-bar__count {
    margin-left: auto;
    padding-right: 6px;
    color: var(--muted-2);
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
}

/* Content layouts */

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 14px;
}

.content-main {
    min-width: 0;
}

.aside-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.table-panel {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-panel .table {
    font-size: 12.5px;
}

.table-panel .table th {
    padding-top: 8px;
    padding-bottom: 8px;
}

.table-panel .table td {
    padding-top: 9px;
    padding-bottom: 9px;
}

.table--teams {
    min-width: 660px;
}

.table--teams th,
.table--teams td {
    padding-left: 7px;
    padding-right: 7px;
}

.table--referees {
    min-width: 640px;
}

.table--coaches {
    min-width: 660px;
}

.table--players {
    min-width: 640px;
}

.table--matches {
    min-width: 640px;
}

/* The same match rows inside a half-width panel must not force the 640px minimum. */
.table--compact {
    min-width: 0;
}

.table--compact .match-up {
    min-width: 0;
}

.table--cards td {
    padding: 4px 6px;
}

/* Knockout rounds */

.table--knockout th:first-child {
    width: 135px;
}

.table--knockout .round-row th {
    padding: 14px 16px 9px;
    border-bottom: 1px solid var(--border);
    background: #fff;
    color: var(--navy);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.table--knockout tbody:first-of-type .round-row th {
    padding-top: 10px;
}

.table--knockout td:last-child {
    text-align: right;
}

.table--knockout thead th {
    text-align: center;
}

/* Two-line knockout match rows */

.table--stacked {
    min-width: 0;
}

.table--stacked td {
    text-align: center;
}

.table--stacked .match-row--teams td {
    padding-top: 12px;
    padding-bottom: 0;
    border-bottom: 0;
}

.table--stacked .match-row--meta td {
    padding-top: 3px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f3f7;
}

.table--stacked tbody tr:last-child td {
    border-bottom: 0;
}

.table--stacked .match-up {
    min-width: 0;
}

.table--stacked .match-up__name {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.match-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 3px 10px;
}

.match-meta__path,
.match-meta__comp,
.match-meta__stage {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

/* Group tables */

.group-section + .group-section {
    margin-top: 16px;
    border-top: 1px solid #eef2f6;
}

.group-section__head {
    margin: 0;
    padding: 10px 16px 8px;
    color: var(--navy);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.group-section__head a {
    color: inherit;
}

.group-section__head a:hover {
    color: var(--green-ink);
}

.group-table {
    min-width: 420px;
}

.group-table td {
    font-variant-numeric: tabular-nums;
}

.group-table .rank-cell {
    width: 26px;
    color: var(--muted-2);
    font-weight: 600;
}

/* "Advanced" marker for the 1st/2nd-placed teams of a qualifying group. */
.group-table .rank-cell--advanced {
    width: auto;
    white-space: nowrap;
}

/* Qualification labels (Advanced / World Cup / Play-offs) — one style for both
   group tables and match rows. */
.status-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #e7f5ec;
    color: var(--green-ink);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.6;
    text-transform: uppercase;
    vertical-align: 1px;
}

/* Labels that link to the competition/round they qualify for. */
a.status-badge {
    text-decoration: none;
}

a.status-badge:hover,
a.status-badge:focus-visible {
    text-decoration: underline;
}

/* Final placements: gold for the champion, silver for the runner-up, bronze for
   third place, neutral grey for fourth. */
.status-badge--champion {
    background: #fdf0c8;
    color: #7a5200;
}

.status-badge--runner-up {
    background: #eceff3;
    color: #47505c;
}

.status-badge--third {
    background: #f8e4d4;
    color: #8a4b1f;
}

.status-badge--fourth {
    background: #eef1f5;
    color: #5b6472;
}

.group-table td .flag {
    display: inline-block;
    margin-right: 8px;
    vertical-align: -2px;
}

/* Pagination */

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    background: #fcfdff;
}

.pager__count {
    color: var(--muted);
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
}

.pager__count span {
    color: var(--muted-2);
}

.pager__links {
    display: flex;
    align-items: center;
    gap: 3px;
}

.pager__page,
.pager__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 27px;
    height: 27px;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 550;
    font-variant-numeric: tabular-nums;
}

a.pager__page:hover,
a.pager__arrow:hover {
    border-color: var(--border);
    background: #fff;
    color: var(--navy);
}

.pager__page.is-current {
    background: var(--navy);
    color: #fff;
    font-weight: 650;
}

.pager__arrow .icon {
    width: 13px;
    height: 13px;
}

.pager__arrow.is-disabled {
    color: #c2cdd9;
}

.pager__gap {
    padding: 0 2px;
    color: var(--muted-2);
    font-size: 10px;
}

/* Donut / aside */

.donut-panel .panel__body {
    padding: 14px 16px;
}

.donut-figure {
    position: relative;
    width: 118px;
    height: 118px;
    margin: 0 auto 12px;
}

.donut {
    width: 118px;
    height: 118px;
    transform: rotate(-90deg);
}

.donut circle {
    fill: none;
    stroke-width: 5;
}

.donut__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

.donut__center b {
    color: var(--navy);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.donut__center span {
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend__row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
}

.legend__dot {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 2px;
}

.legend__label {
    flex: 1;
}

.legend__value {
    color: var(--navy);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.legend__pct {
    width: 38px;
    color: var(--muted-2);
    font-size: 10px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.definition-list {
    display: flex;
    flex-direction: column;
}

.definition-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px solid #f0f3f7;
    font-size: 11px;
}

.definition-list > div:last-child {
    border-bottom: 0;
}

.definition-list dt {
    color: var(--muted);
}

.definition-list dd {
    color: var(--navy);
    font-weight: 600;
    text-align: right;
}

.info-note {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.info-note + .info-note {
    margin-top: 8px;
}

/* Competition cards */

.competition-group {
    margin-bottom: 24px;
}

.competition-group:last-child {
    margin-bottom: 0;
}

.group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--border);
}

.group-head h2 {
    color: var(--navy);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.group-head__count {
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 500;
}

.competition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.comp-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.comp-card:hover {
    border-color: #c9d6e3;
    box-shadow: var(--shadow-lift);
    transform: translateY(-1px);
}

.comp-card__top {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.comp-card__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    background: var(--soft);
    color: var(--navy);
}

.comp-card__icon .icon {
    width: 17px;
    height: 17px;
}

.comp-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.comp-card__icon--logo .comp-logo {
    width: 24px;
    height: 24px;
}

.comp-row__icon--logo .comp-logo {
    width: 20px;
    height: 20px;
}

/* Home competitions widget: the logo is the artwork, shown at 75px. */
.page-home .comp-row__icon--logo {
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
}

.page-home .comp-row__icon--logo .comp-logo {
    width: 75px;
    height: 75px;
}

/* Home competitions widget: name and confederation centred on two rows. */
.page-home .comp-list .comp-row__body {
    text-align: center;
}

.profile__logo {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 7px;
}

.comp-card__heading {
    min-width: 0;
    flex: 1;
}

.comp-card__name {
    display: block;
    color: var(--navy);
    font-size: 13.5px;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.comp-card__meta {
    display: block;
    margin-top: 2px;
    color: var(--muted-2);
    font-size: 10px;
}

.comp-card__arrow {
    color: #c2cdd9;
}

.comp-card__arrow .icon {
    width: 14px;
    height: 14px;
}

.comp-card:hover .comp-card__arrow {
    color: var(--green-ink);
}

.comp-card__desc {
    margin-top: 9px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comp-card__stats {
    display: flex;
    gap: 16px;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid #f0f3f7;
}

.comp-card__stat b {
    display: block;
    color: var(--navy);
    font-size: 12.5px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.comp-card__stat span {
    display: block;
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 550;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.comp-card__top-team {
    margin-left: auto;
    color: var(--muted-2);
    font-size: 9.5px;
    text-align: right;
}

.comp-card__top-team b {
    display: block;
    color: var(--text);
    font-size: 10.5px;
    font-weight: 600;
}

/* Profile header */

.profile {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.profile__media {
    display: grid;
    place-items: center;
    width: 86px;
    height: 70px;
    flex: none;
    border: 1px solid #edf1f6;
    border-radius: 9px;
    background: #fbfcfe;
}

.profile__media--panel {
    width: 68px;
    height: 68px;
}

/* A player portrait fills an 80px square frame instead of sitting in a badge. */
.profile .profile__media--player {
    width: 80px;
    height: 80px;
    padding: 0;
    overflow: hidden;
}

.profile__media--player .avatar {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    font-size: 24px;
}

.profile__media > .comp-card__icon .icon {
    width: 22px;
    height: 22px;
    color: var(--navy);
}

.avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--navy-soft);
    color: var(--navy);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.avatar--lg {
    width: 58px;
    height: 58px;
    font-size: 19px;
}

.avatar--sm {
    width: 28px;
    height: 28px;
    font-size: 10px;
}

.profile__body {
    min-width: 0;
    flex: 1;
}

.profile__eyebrow {
    color: var(--green-ink);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.profile__status {
    margin: 8px 0 0;
}

.profile__title {
    margin-top: 2px;
    color: var(--navy);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.profile__sub {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11.5px;
}

.profile__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

/* Several chips in one table cell, e.g. every position a player covers. */
.chip-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: #fff;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 550;
    line-height: 1.35;
}

.chip--green {
    border-color: #dcefca;
    background: var(--green-soft);
    color: var(--green-ink);
}

a.chip:hover,
a.chip:focus-visible {
    text-decoration: underline;
}

.chip--navy {
    border-color: #dbe5ef;
    background: var(--navy-soft);
    color: var(--navy);
}

.profile__side {
    display: flex;
    flex: none;
    gap: 22px;
    padding-left: 20px;
    border-left: 1px solid #eef2f6;
    text-align: right;
}

.profile__stat-value {
    color: var(--navy);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.profile__stat-value--text {
    font-size: 15px;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.profile__stat-label {
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.profile__facts {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    text-align: left;
}

.profile__facts > div {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 8px;
}

.profile__facts dd {
    margin: 0;
    color: var(--navy);
    font-size: 11.5px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

/* Card counts read as icons: yellow, second yellow (the pair it became), red. */
.card-counts {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    vertical-align: middle;
}

.card-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-count .card-swatch + .card-swatch {
    margin-left: -3px;
    margin-right: 1px;
}

/* Detail layout */

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 14px;
}

.detail-main,
.detail-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.subnav {
    display: flex;
    gap: 2px;
    margin-bottom: 14px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    width: fit-content;
}

.subnav a {
    padding: 5px 10px;
    border-radius: 5px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 550;
}

.subnav a:hover {
    background: var(--soft);
    color: var(--navy);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: #edf1f6;
}

.stat {
    min-width: 0;
    padding: 12px 14px;
    background: var(--surface);
}

.stat__label {
    display: block;
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stat__value {
    display: block;
    margin-top: 2px;
    color: var(--navy);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.stat__value--text {
    font-size: 13px;
    letter-spacing: -0.01em;
}

/* Two-column stat grid, for panels that sit in a narrow sidebar. */
.stat-grid--aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-grid--aside .stat {
    padding: 11px 12px;
}

.stat-grid--aside .stat__value {
    font-size: 17px;
}

.stat-grid--aside .stat__value--text {
    font-size: 12px;
}

.stat--wide {
    grid-column: 1 / -1;
}

/* Match table */

.match-up {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 300px;
}

.match-up__team {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--text);
    font-size: 11.5px;
    font-weight: 500;
}

.match-up__team--home {
    justify-content: flex-end;
    text-align: right;
}

.match-up__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-up__result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.match-up__shootout {
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.match-up__score {
    display: inline-block;
    min-width: 40px;
    padding: 1px 6px;
    border: 1px solid #e7ecf2;
    border-radius: 5px;
    background: #f8fafc;
    color: var(--navy);
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.match-up__winner {
    color: var(--navy);
    font-weight: 650;
}

.match-date {
    color: var(--muted);
    font-size: 10.5px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

a:hover .match-date,
.match-up__score:hover {
    color: var(--green-ink);
}

.match-venue a:hover {
    color: var(--green-ink);
}

.match-comp {
    color: var(--muted);
    font-size: 10.5px;
    white-space: nowrap;
}

.match-venue {
    color: var(--muted-2);
    font-size: 10px;
    line-height: 1.35;
}

/* Honours / lists */

.honour-list {
    display: flex;
    flex-direction: column;
}

.honour-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
    border-bottom: 1px solid #f0f3f7;
}

.honour-row:last-child {
    border-bottom: 0;
}

.honour-row__pos {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    flex: none;
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.honour-row__pos .icon {
    width: 13px;
    height: 13px;
    color: var(--green-ink);
}

.honour-row__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--navy);
    font-size: 11.5px;
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.honour-row:hover {
    background: #fafcff;
}

.honour-row__count {
    flex: none;
    color: var(--navy);
    font-size: 11px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.honour-row__count span {
    margin-left: 2px;
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 500;
}

.person-list {
    display: flex;
    flex-direction: column;
}

.person-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 16px;
    border-bottom: 1px solid #f0f3f7;
}

.person-row:last-child {
    border-bottom: 0;
}

.person-row:hover {
    background: #fafcff;
}

.person-row__body {
    flex: 1;
    min-width: 0;
}

.person-row__name {
    display: block;
    overflow: hidden;
    color: var(--navy);
    font-size: 11.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.person-row__meta {
    display: block;
    color: var(--muted-2);
    font-size: 9.5px;
}

.person-row__meta .flag {
    display: inline-block;
    width: 14px;
    height: 11px;
    margin-right: 4px;
    vertical-align: -1px;
}

.person-row__value {
    flex: none;
    color: var(--navy);
    font-size: 11px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.person-row__label {
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 500;
}

/* Top-player cards: a compact five-across row above the competition body. */
.player-cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 2px 16px 14px;
}

@media (max-width: 760px) {
    .player-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .player-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

.player-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 16px 12px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--soft-2);
    text-align: center;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.player-card:hover {
    border-color: #c9d6e3;
    background: var(--surface);
    box-shadow: var(--shadow-lift);
    transform: translateY(-1px);
}

.player-card__rank {
    position: absolute;
    top: 9px;
    left: 10px;
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.player-card__name {
    margin-top: 3px;
    color: var(--navy);
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.3;
}

.player-card__team {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 10.5px;
}

.player-card__value {
    margin-top: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--navy-soft);
    color: var(--navy);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.player-card__label {
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 500;
}

/* Two-team labels in the narrow sidebar wrap instead of truncating. */
.person-row__name--wrap {
    overflow: visible;
    white-space: normal;
    line-height: 1.3;
}

.timeline {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
}

.timeline__item {
    position: relative;
    padding: 0 0 14px 16px;
    border-left: 1px solid #e3eaf2;
}

.timeline__item:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}

.timeline__item::before {
    content: "";
    position: absolute;
    top: 4px;
    left: -3px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
}

.timeline__item:first-child::before {
    background: var(--navy);
}

.timeline__label {
    color: var(--navy);
    font-size: 11.5px;
    font-weight: 550;
    line-height: 1.4;
}

.timeline__meta {
    color: var(--muted-2);
    font-size: 9.5px;
}

/* Bars */

.bar-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 13px 16px;
}

.bar-list > li {
    min-width: 0;
}

.bar-row__title {
    display: -webkit-box;
    overflow: hidden;
    min-width: 0;
    color: var(--navy);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.bar-row__title:hover {
    color: var(--green-ink);
}

.bar-row__title .flag-text {
    gap: 4px;
    vertical-align: middle;
}

.bar-row__title .flag {
    width: 16px;
    height: 12px;
}

.bar-row__title span {
    font-variant-numeric: tabular-nums;
}

.bar-row__title .bar-row__age,
.bar-row__title .bar-row__date,
.bar-row__title .bar-row__pos {
    color: var(--muted-2);
    font-weight: 500;
}

.bar-row__flag {
    display: inline-block;
    margin-right: 5px;
    line-height: 0;
    vertical-align: middle;
}

.bar-row__meta {
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted-2);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-row__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 10.5px;
}

.bar-row__head b {
    color: var(--navy);
    font-size: 11px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.bar-track {
    height: 5px;
    overflow: hidden;
    border-radius: 3px;
    background: #edf1f5;
}

.bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--navy);
}

.bar-fill--green {
    background: var(--green);
}

.bar-fill--muted {
    background: #b9c6d4;
}

/* Team card / mini */

.team-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}

.team-mini__body {
    flex: 1;
    min-width: 0;
}

.team-mini__name {
    display: block;
    color: var(--navy);
    font-size: 12.5px;
    font-weight: 650;
}

.team-mini__meta {
    display: block;
    color: var(--muted-2);
    font-size: 10px;
}

.team-mini__arrow {
    color: var(--green-ink);
}

.team-mini__arrow .icon {
    width: 14px;
    height: 14px;
}

/* Search */

.search-hero {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form__field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    height: 46px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #fff;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.search-form__field:focus-within {
    border-color: #9acb74;
    box-shadow: 0 0 0 3px rgba(112, 215, 25, 0.12);
}

.search-form__field .icon {
    width: 17px;
    height: 17px;
    margin: 0 9px 0 13px;
    color: var(--muted-2);
}

.search-form__field input {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.search-form__field input::placeholder {
    color: var(--muted-2);
}

.search-form .btn {
    height: 46px;
    padding: 0 20px;
    font-size: 12.5px;
}

.search-hint {
    margin-top: 8px;
    color: var(--muted-2);
    font-size: 10.5px;
}

.search-hint kbd {
    padding: 1px 4px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--soft);
    font-family: var(--font);
    font-size: 9.5px;
}

.search-summary {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 11.5px;
}

.search-summary strong {
    color: var(--navy);
    font-weight: 650;
}

.result-group {
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.result-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #eef2f6;
    background: #fcfdff;
}

.result-group__head h2 {
    color: var(--navy);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.result-group__head span {
    color: var(--muted-2);
    font-size: 10px;
}

.age-widget {
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(25, 45, 75, 0.04);
}

.age-widget__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.age-widget__title {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.age-widget__divider {
    margin: 12px 0;
    border: 0;
    border-top: 1px solid #edf0f4;
}

.age-widget__teams {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
    text-align: center;
}

.age-widget__team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.age-widget__flag {
    width: 40px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(9, 38, 74, 0.08);
}

.age-widget__team-name {
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

.age-widget__averages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 17px;
}

.age-widget__average {
    padding: 10px 5px;
    background: #f4f7fb;
    border-radius: 9px;
    text-align: center;
}

.age-widget__average-label {
    color: #8793a4;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.age-widget__average-value {
    margin: 4px 0 2px;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.1;
}

.age-widget__average-value--home {
    color: #3979cb;
}

.age-widget__average-value--away {
    color: #e05c65;
}

.age-widget__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 14px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.age-widget__legend {
    display: flex;
    gap: 9px;
    color: #8793a4;
    font-size: 9px;
    font-weight: 500;
}

.age-widget__legend span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.age-widget__dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.age-widget__dot--home {
    background: #6c9fe8;
}

.age-widget__dot--away {
    background: #e98c95;
}

.age-widget__group {
    margin: 0 0 15px;
}

.age-widget__group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    color: #526176;
    font-size: 11px;
}

.age-widget__group-head strong {
    color: var(--text);
}

.age-widget__count--home {
    color: #3979cb;
}

.age-widget__count--away {
    color: #e05c65;
}

.age-widget__slash {
    padding: 0 3px;
    color: #a0aabb;
}

.age-widget__bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.age-widget__track {
    height: 7px;
    width: 100%;
    background: #f0f2f5;
    border-radius: 10px;
    overflow: hidden;
}

.age-widget__bar {
    height: 100%;
    border-radius: 10px;
}

.age-widget__bar--home {
    background: #6c9fe8;
}

.age-widget__bar--away {
    background: #e98c95;
}

.age-widget__footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 3px;
    padding-top: 12px;
    border-top: 1px solid #edf0f4;
    color: #8793a4;
    font-size: 10px;
}

.age-widget__footer-row strong {
    color: var(--text);
}

.age-widget__footer {
    margin-top: 13px;
    color: #a0aabb;
    font-size: 9px;
    text-align: center;
}

.h2h-widget {
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(25, 45, 75, 0.04);
}

.h2h-widget__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.h2h-widget__title {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.h2h-widget__divider {
    margin: 12px 0;
    border: 0;
    border-top: 1px solid #edf0f4;
}

.h2h-widget__teams {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 8px;
    margin: 18px 0;
    text-align: center;
}

.h2h-widget__team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.h2h-widget__flag {
    width: 40px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(9, 38, 74, 0.08);
}

.h2h-widget__vs {
    color: #a0aabb;
    font-size: 11px;
    font-weight: 700;
}

.h2h-widget__overview {
    padding: 13px 10px;
    background: #f4f7fb;
    border-radius: 9px;
    text-align: center;
}

.h2h-widget__overview-label {
    color: #8793a4;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.h2h-widget__total {
    margin: 7px 0 12px;
    color: var(--text);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.h2h-widget__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.h2h-widget__stat {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
}

.h2h-widget__stat--win {
    color: #269b70;
}

.h2h-widget__stat--draw {
    color: #526176;
}

.h2h-widget__stat--loss {
    color: #e05c65;
}

.h2h-widget__stat-label {
    margin-top: 3px;
    color: #8793a4;
    font-size: 10px;
}

.h2h-widget__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 17px 0 12px;
    font-size: 12px;
    font-weight: 700;
}

.h2h-widget__heading span:last-child {
    color: #8793a4;
    font-size: 10px;
    font-weight: 500;
}

.h2h-widget__matches {
    display: grid;
}

.h2h-widget__match {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #edf0f4;
    transition: background-color 110ms ease;
}

.h2h-widget__match:last-child {
    border-bottom: 0;
}

.h2h-widget__match:hover .h2h-widget__score {
    color: #3979cb;
}

.h2h-widget__match-date {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    color: #9aa5b5;
    font-size: 10px;
}

.h2h-widget__match-now {
    color: #3979cb;
    font-weight: 700;
}

.h2h-widget__match--current .h2h-widget__match-teams {
    color: var(--text);
}

.h2h-widget__match-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.h2h-widget__match-teams {
    min-width: 0;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.h2h-widget__score {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.h2h-widget__note,
.h2h-widget__empty {
    margin: 10px 0 0;
    color: #9aa5b5;
    font-size: 10px;
}

.h2h-widget__goal-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 10px 0;
    font-size: 11px;
}

.h2h-widget__goal-row strong {
    color: var(--text);
    white-space: nowrap;
}

.h2h-widget__goal-bar {
    display: flex;
    gap: 2px;
    height: 8px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 10px;
}

.h2h-widget__goal-bar-home {
    background: #6c9fe8;
}

.h2h-widget__goal-bar-away {
    background: #e98c95;
}

.h2h-widget__footer {
    margin: 15px 0 0;
    color: #a0aabb;
    font-size: 9px;
    text-align: center;
}

.result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-bottom: 1px solid #f0f3f7;
    transition: background-color 110ms ease;
}

.result-row:last-child {
    border-bottom: 0;
}

.result-row:hover {
    background: #fafcff;
}

.result-row__body {
    flex: 1;
    min-width: 0;
}

.result-row__name {
    display: block;
    color: var(--navy);
    font-size: 12.5px;
    font-weight: 600;
}

.result-row__meta {
    display: block;
    color: var(--muted-2);
    font-size: 10px;
}

.result-row__arrow {
    color: #c2cdd9;
}

.result-row__arrow .icon {
    width: 14px;
    height: 14px;
}

.result-row:hover .result-row__arrow {
    color: var(--green-ink);
}

.search-suggestions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.suggestion-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.suggestion-card:hover {
    border-color: #c9d6e3;
    box-shadow: var(--shadow-lift);
}

.suggestion-card__icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-bottom: 3px;
    border-radius: 7px;
    background: var(--green-soft);
    color: var(--green-ink);
}

.suggestion-card__icon .icon {
    width: 15px;
    height: 15px;
}

.suggestion-card__title {
    color: var(--navy);
    font-size: 12px;
    font-weight: 650;
}

.suggestion-card__meta {
    color: var(--muted-2);
    font-size: 10px;
}

/* Empty / errors */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 24px;
    text-align: center;
}

.empty-state__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: var(--soft);
    color: var(--muted-2);
}

.empty-state__title {
    color: var(--navy);
    font-size: 14px;
    font-weight: 650;
}

.empty-state__text {
    max-width: 360px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11.5px;
}

.empty-state .btn {
    margin-top: 14px;
}

.error-page {
    display: flex;
    justify-content: center;
    padding: 44px 0 64px;
}

.error-card {
    width: 100%;
    max-width: 560px;
    padding: 34px 32px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-lift);
    text-align: center;
}

.error-code {
    color: var(--green-ink);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.error-card h1 {
    margin-top: 6px;
    color: var(--navy);
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.error-card p {
    margin: 8px auto 0;
    max-width: 400px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--border);
    background: #f2f5f9;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr 1fr 1.2fr;
    gap: 36px;
    padding-top: 34px;
    padding-bottom: 30px;
}

.brand--footer .brand__mark {
    width: 28px;
    height: 28px;
}

.brand--footer .brand__name {
    font-size: 15.5px;
}

.footer-brand__text {
    max-width: 320px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.65;
}

.footer-col__title {
    margin-bottom: 10px;
    color: var(--navy);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-links a {
    color: var(--muted);
    font-size: 11px;
}

.footer-links a:hover {
    color: var(--green-ink);
}

.footer-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 10.5px;
}

.footer-list li span:last-child {
    color: var(--navy);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.footer-note {
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.6;
}

.footer-note + .footer-note {
    margin-top: 7px;
}

.footer-note--muted {
    color: var(--muted-2);
}

.footer-note .status-dot {
    margin-right: 2px;
    vertical-align: middle;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 13px;
    padding-bottom: 15px;
    border-top: 1px solid #e2e8ef;
    color: var(--muted-2);
    font-size: 10px;
}

.footer-bottom__made {
    color: var(--muted-2);
}

/* Responsive */

@media (max-width: 1060px) {
    .quick-search--desktop {
        display: none;
    }

    .search-shortcut {
        display: flex;
    }

    .primary-nav__link {
        padding: 0 7px;
        font-size: 12px;
    }
}

@media (max-width: 980px) {
    .nav-toggle {
        display: flex;
    }

    .primary-nav {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        z-index: 45;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        padding: 8px 24px 18px;
        border-bottom: 1px solid var(--border);
        background: #fff;
        box-shadow: 0 12px 24px rgba(9, 38, 74, 0.08);
    }

    body.nav-open .primary-nav {
        display: block;
    }

    body.nav-open {
        overflow: hidden;
    }

    .primary-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .primary-nav__link {
        height: 44px;
        padding: 0 2px;
        border-bottom: 1px solid #f1f4f8;
        font-size: 13px;
    }

    .primary-nav__link.is-active::after {
        left: 2px;
        right: auto;
        bottom: 0;
        width: 18px;
        height: 2px;
    }

    .quick-search--mobile {
        display: flex;
    }

    .header-inner {
        justify-content: space-between;
    }

    .home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .span-5,
    .span-6,
    .span-7,
    .span-8,
    .span-12 {
        grid-column: span 2;
    }

    .content-layout,
    .detail-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .aside-stack {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .detail-aside {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .search-suggestions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
        gap: 28px;
    }

    .footer-col:last-child {
        grid-column: span 3;
        display: flex;
        align-items: baseline;
        gap: 24px;
        padding-top: 4px;
        border-top: 1px solid #e2e8ef;
    }

    .footer-col:last-child .footer-col__title {
        display: none;
    }

    .footer-col:last-child .footer-note {
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .shell {
        padding: 0 16px;
    }

    .site-main {
        padding-top: 20px;
        padding-bottom: 48px;
    }

    .page-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 16px;
    }

    .page-head h1 {
        font-size: 24px;
    }

    .page-head__aside {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    .page-head__note {
        margin-top: 0;
    }

    .home-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .span-5,
    .span-6,
    .span-7,
    .span-8,
    .span-12 {
        grid-column: span 1;
    }

    .panel__head {
        flex-wrap: wrap;
        padding: 12px 13px;
        gap: 8px;
    }

    .tabs {
        order: 3;
        width: 100%;
    }

    .tab {
        flex: 1;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
        padding-top: 28px;
    }

    .footer-brand {
        grid-column: span 2;
    }

    .footer-col:last-child {
        grid-column: span 2;
        flex-wrap: wrap;
    }

    .footer-bottom {
        flex-wrap: wrap;
        gap: 4px 16px;
    }

    .footer-bottom__made {
        display: none;
    }

    .summary-bar {
        flex-wrap: wrap;
    }

    .summary-bar__item {
        flex: 1 1 40%;
        padding: 9px 12px;
    }

    .summary-bar__item:nth-child(2n) {
        border-right: 0;
    }

    .filter-bar {
        padding: 9px;
    }

    .filter-bar__search {
        width: 100%;
    }

    .select {
        flex: 1;
    }

    .select select {
        width: 100%;
        max-width: none;
    }

    .filter-bar .btn {
        flex: none;
    }

    .filter-bar__count {
        width: 100%;
        margin-left: 0;
        padding: 2px 2px 0;
    }

    .competition-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile {
        flex-wrap: wrap;
        gap: 12px;
        padding: 15px;
    }

    .profile__media {
        width: 66px;
        height: 56px;
    }

    .profile__title {
        font-size: 21px;
    }

    .profile__side {
        width: 100%;
        justify-content: flex-start;
        gap: 28px;
        padding: 10px 0 0;
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid #eef2f6;
        text-align: left;
    }

    .profile__facts {
        width: 100%;
        gap: 4px;
    }

    .profile__facts > div {
        justify-content: flex-start;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat {
        padding: 10px 12px;
    }

    .stat__value {
        font-size: 17px;
    }

    .aside-stack,
    .detail-aside {
        grid-template-columns: minmax(0, 1fr);
    }

    .search-suggestions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-form {
        flex-wrap: wrap;
    }

    .search-form__field {
        flex-basis: 100%;
    }

    .search-form .btn {
        width: 100%;
    }

    .pager {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pager__count {
        width: 100%;
        text-align: center;
    }

    .subnav {
        width: 100%;
        overflow-x: auto;
    }

    .error-card {
        padding: 26px 20px;
    }

    .error-card h1 {
        font-size: 23px;
    }
}

@media (max-width: 480px) {
    .brand__name span {
        display: none;
    }

    .header-inner {
        gap: 8px;
    }

    .header-tools {
        gap: 5px;
    }

    .page-head h1 {
        font-size: 22px;
    }

    .summary-bar__item {
        flex-basis: 100%;
        border-right: 0;
        border-bottom: 1px solid #eef2f6;
    }

    .summary-bar__item:last-child {
        border-bottom: 0;
    }

    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-brand,
    .footer-col:last-child {
        grid-column: span 1;
    }

    .footer-col:last-child {
        display: block;
    }

    .footer-col:last-child .footer-note + .footer-note {
        margin-top: 7px;
    }

    .search-suggestions {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile__side {
        gap: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Stadiums and match detail */

.table--stadiums {
    min-width: 760px;
}

.profile__photo {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.avatar--photo {
    overflow: hidden;
    padding: 0;
    background: var(--soft);
}

.avatar--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-hero {
    margin-bottom: 14px;
    padding: 17px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.match-hero__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    color: var(--muted-2);
    font-size: 10.5px;
    text-align: center;
}

.match-hero__meta a {
    color: var(--green-ink);
    font-weight: 600;
}

.match-hero__scoreline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    max-width: 760px;
    margin: 14px auto 12px;
}

.match-hero__team {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: var(--navy);
    font-size: 15px;
    font-weight: 650;
}

.match-hero__team--away {
    justify-content: flex-end;
    text-align: right;
}

.match-hero__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-hero__flag {
    width: 28px;
    height: 21px;
}

.match-hero__label {
    color: var(--muted-2);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.match-hero__team--away .match-hero__label {
    order: -1;
}

.match-hero__score {
    min-width: 92px;
    text-align: center;
}

.match-hero__result {
    display: block;
    color: var(--navy);
    font-size: 29px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.match-hero__ht {
    display: block;
    margin-top: 4px;
    color: var(--muted-2);
    font-size: 9.5px;
    font-weight: 500;
}

/* Penalty-shootout score under the result, e.g. "3–4 on pens". */
.match-hero__pens {
    display: block;
    margin-top: 3px;
    color: var(--green-ink);
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Who actually went through when the scoreline alone is level. */
.match-hero__decider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 10px 0 0;
    padding: 6px 10px;
    border-radius: 8px;
    background: #eef7e8;
    color: var(--green-ink);
    font-size: 11px;
}

.match-hero__decider .icon {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
}

/* Result awarded by the organiser (technical win) instead of played out. */
.match-hero__award {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #fdf0da;
    color: #8a5a00;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.match-hero__note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 10px 0 0;
    padding: 6px 10px;
    border-radius: 8px;
    background: #fdf0da;
    color: #8a5a00;
    font-size: 11px;
    text-align: center;
}

.match-hero__note .icon {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
}

/* Full-width panel sitting between the page header and the detail columns. */
.panel--full {
    margin-bottom: 14px;
}

/* Long-form copy supplied by the API, e.g. a competition description. */
.panel__prose {
    margin: 10px 10px 10px 10px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.65;
}

.prose-more {
    margin-top: 2px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--soft);
    color: var(--navy);
    font: inherit;
    cursor: pointer;
}

.prose-more:hover {
    border-color: var(--navy);
}

.panel__prose > :first-child {
    margin-top: 0;
}

.panel__prose > :last-child {
    margin-bottom: 0;
}

.panel__prose p {
    margin: 0 0 10px;
}

.panel__prose h3,
.panel__prose h2 {
    margin: 16px 0 6px;
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.panel__prose ul,
.panel__prose ol {
    margin: 0 0 10px;
    padding-left: 18px;
}

.panel__prose li {
    margin-bottom: 4px;
}

.panel__prose strong {
    color: var(--text);
    font-weight: 700;
}

.match-hero__foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px 16px;
    padding-top: 11px;
    border-top: 1px solid #eef2f6;
    color: var(--muted);
    font-size: 10.5px;
}

.match-hero__foot span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.match-hero__foot .icon {
    width: 12px;
    height: 12px;
    color: var(--muted-2);
}

.match-hero__foot a {
    color: var(--navy);
    font-weight: 600;
}

.match-hero__foot a:hover {
    color: var(--green-ink);
}

.match-timeline {
    padding: 4px 16px 12px;
}

.match-timeline__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--border);
}

.match-timeline__team {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.match-timeline__team--away {
    justify-content: flex-end;
    text-align: right;
}

.match-timeline__team--away .match-timeline__team-body {
    align-items: flex-end;
}

.match-timeline__team-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.match-timeline__team-name {
    overflow: hidden;
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-timeline__team-rank {
    margin-top: 2px;
    color: var(--muted-2);
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
}

.match-timeline__flag {
    flex: none;
    width: 28px;
    height: 20px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(9, 38, 74, 0.08);
    object-fit: cover;
}

.match-timeline__score {
    color: var(--navy);
    font-size: 24px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}

.match-timeline__list {
    margin: 0;
    padding: 6px 0 2px;
    list-style: none;
}

.match-event {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
    align-items: center;
    column-gap: 7px;
    min-height: 42px;
}

.match-event__minute {
    justify-self: center;
    min-width: 42px;
    padding: 4px 3px;
    border-radius: 6px;
    background: #f1f4f7;
    color: #596579;
    font-size: 10.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    text-align: center;
}

.match-event__cell {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.match-event__cell--home {
    justify-content: flex-end;
    text-align: right;
}

.match-event__cell--away {
    justify-content: flex-start;
}

.match-event__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: var(--soft);
    color: var(--muted);
}

.match-event__icon .icon {
    width: 12px;
    height: 12px;
}

.match-event__icon--goal {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e7f6ed;
    color: #16834b;
}

.match-event__icon--own {
    background: #fde8e8;
    color: #d33b3b;
}

/* Goal ruled out: the ball stays, greyed and struck through, so the incident is
   on the timeline without reading as a change to the score. */
.match-event__icon--disallowed {
    position: relative;
    background: #f1f3f6;
    color: #9aa3b0;
}

.match-event__icon--disallowed::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 16px;
    height: 1.5px;
    margin: auto;
    border-radius: 1px;
    background: #d33b3b;
    transform: rotate(-45deg);
}

.match-event__icon--card {
    width: auto;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 2px;
}

.match-event__card {
    display: block;
    width: 9px;
    height: 13px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 2px;
    background: #f5c542;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.match-event__card--red {
    background: #e34b4b;
}

.match-event__icon--sub {
    width: 20px;
    height: 20px;
    background: #edf3ff;
    color: #4772c7;
}

.match-event__icon--sub .icon {
    width: 13px;
    height: 13px;
}

.match-event__body {
    min-width: 0;
    color: var(--navy);
    font-size: 11.5px;
    line-height: 1.3;
}

.match-event__player {
    color: var(--navy);
    font-size: 11.5px;
    font-weight: 600;
}

a.match-event__player:hover {
    color: var(--green-ink);
}

.match-event__detail {
    display: block;
    margin-top: 2px;
    color: #8993a2;
    font-size: 10.5px;
}

a.match-event__detail:hover,
.match-event__detail a:hover {
    color: var(--green-ink);
}

/* Penalty shoot-out under the timeline: the kicks in the order they were taken,
   the converted ones ticked and the misses marked with their reason. */
.shootout {
    padding: 4px 16px 14px;
}

.shootout__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 3px 12px;
    padding: 12px 0 8px;
    border-top: 1px solid var(--border);
}

.shootout__title {
    margin: 0;
    color: var(--navy);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.shootout__score {
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.shootout__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* One row per kick in the order they were taken: the taker sits on their own
   side reaching towards the middle column, which holds the tick or the cross;
   the opposite column of the row stays empty. */
.shootout__kick {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    align-items: start;
    column-gap: 10px;
    padding: 3px 0;
}

.shootout__kick--home .shootout__body {
    grid-column: 1;
    justify-self: end;
    text-align: right;
}

.shootout__kick--away .shootout__body {
    grid-column: 3;
    justify-self: start;
    text-align: left;
}

.shootout__kick .shootout__mark {
    grid-column: 2;
    justify-self: center;
    margin-top: 1px;
}

.shootout__mark {
    display: grid;
    flex: none;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e7f6ed;
    color: #16834b;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.shootout__kick--missed .shootout__mark {
    background: #fde8e8;
    color: #d33b3b;
}

.shootout__body {
    min-width: 0;
}

.shootout__player {
    color: var(--navy);
    font-size: 11.5px;
    font-weight: 600;
}

.shootout__kick--missed .shootout__player {
    color: var(--muted);
}

a.shootout__player:hover {
    color: var(--green-ink);
}

.shootout__reason {
    display: block;
    margin-top: 1px;
    color: #8993a2;
    font-size: 10.5px;
}

.lineup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
    padding: 12px 16px 16px;
}

.lineup {
    min-width: 0;
}

.lineup + .lineup {
    border-left: 1px solid #eef2f6;
    padding-left: 18px;
}

.lineup__head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-bottom: 7px;
    border-bottom: 1px solid #eef2f6;
}

.lineup__head h3 {
    color: var(--navy);
    font-size: 12px;
    font-weight: 650;
}

.lineup__label {
    margin: 10px 0 3px;
    color: var(--muted-2);
    font-size: 8.5px;
    font-weight: 650;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.lineup__list {
    display: flex;
    flex-direction: column;
}

.lineup__coach {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    border-bottom: 1px solid #f4f7fa;
    color: var(--muted);
    font-size: 10px;
}

.lineup__coach-label {
    color: var(--muted-2);
    font-size: 8px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lineup__coach-name {
    overflow: hidden;
    color: var(--navy);
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.lineup__coach-name:hover {
    color: var(--green-ink);
}

.lineup__flag {
    flex: none;
    width: 14px;
    height: 10px;
    border-radius: 2px;
    object-fit: cover;
}

.lineup__player {
    display: grid;
    grid-template-columns: 18px 14px minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px;
    min-height: 25px;
    padding: 2px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 10.5px;
}

.lineup__person {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    min-width: 0;
    text-align: left;
}

.lineup__events {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}

.lineup__event {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--muted);
    font-size: 8.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lineup__event svg {
    width: 11px;
    height: 11px;
}

.lineup__event--goal {
    color: var(--green-ink);
}

.lineup__event--disallowed {
    color: #9aa3b0;
    text-decoration: line-through;
}

.lineup__number {
    color: var(--muted-2);
    font-size: 9.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.lineup__name {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--navy);
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.lineup__name:hover {
    color: var(--green-ink);
}

.lineup__position {
    flex: none;
    color: var(--muted-2);
    font-size: 8.5px;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-align: left;
}

.lineup__captain {
    display: inline-grid;
    place-items: center;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: var(--navy);
    color: #fff;
    font-size: 7.5px;
    font-weight: 700;
}

.lineup__list--bench .lineup__name {
    color: var(--muted);
    font-weight: 500;
}

.lineup__list--bench .lineup__event--goal,
.lineup__list--bench .lineup__event--card {
    opacity: 0.9;
}

.lineup__empty {
    padding: 10px 0;
    color: var(--muted-2);
    font-size: 10.5px;
}

.card-swatch {
    width: 7px;
    height: 11px;
    flex: none;
    border-radius: 1px;
}

.card-swatch--yellow {
    background: #f2c94c;
}

.card-swatch--red {
    background: #d94b4b;
}

/* Second yellow: the yellow and the red it became, read as one pair. */
.lineup__event--card .card-swatch + .card-swatch {
    margin-left: 1px;
}

/* Card swatches as a table column header, in place of a text label. */
.th-cards {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}

@media (max-width: 900px) {
    .match-hero__scoreline {
        gap: 10px;
    }

    .match-hero__name {
        font-size: 13px;
    }

    .lineup-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .lineup + .lineup {
        margin-top: 16px;
        padding-top: 14px;
        padding-left: 0;
        border-top: 1px solid #eef2f6;
        border-left: 0;
    }
}

@media (max-width: 620px) {
    .match-hero {
        padding: 14px 12px;
    }

    .match-hero__scoreline {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 6px;
    }

    .match-hero__team {
        flex-direction: column;
        gap: 3px;
        font-size: 11px;
        text-align: center;
    }

    .match-hero__team--away {
        flex-direction: column-reverse;
    }

    .match-hero__team--away .match-hero__label {
        order: 0;
    }

    .match-hero__label {
        display: none;
    }

    .match-hero__flag {
        width: 24px;
        height: 18px;
    }

    .match-hero__result {
        font-size: 24px;
    }

    .match-timeline {
        padding: 2px 12px 10px;
    }

    .shootout {
        padding: 2px 12px 12px;
    }

    .shootout__kick {
        grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
        column-gap: 7px;
    }

    .match-event {
        grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
        column-gap: 4px;
    }

    .match-timeline__head {
        gap: 8px;
    }

    .match-timeline__team-name {
        font-size: 12px;
    }

    .match-timeline__score {
        font-size: 22px;
    }

    .match-event__body {
        font-size: 10.5px;
    }

    .match-event__player {
        font-size: 10.5px;
    }

    .match-event__detail {
        font-size: 9.5px;
    }

    .match-event__cell {
        gap: 5px;
    }

    .match-event__icon {
        width: 18px;
        height: 18px;
    }
}
