:root {
    --bg: #f4f7f4;
    --surface: #ffffff;
    --surface-muted: #eef3ef;
    --text: #17211b;
    --muted: #647067;
    --line: #dce5de;
    --brand: #147d4f;
    --brand-dark: #0e5d3b;
    --accent: #d7a928;
    --danger: #b42318;
    --shadow: 0 18px 55px rgba(20, 56, 36, .09);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(20, 125, 79, .08), transparent 360px),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-shell {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(220, 229, 222, .9);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.nav-links a {
    border-radius: 999px;
    padding: 8px 12px;
}

.nav-links a:hover {
    background: var(--surface-muted);
    color: var(--text);
}

.page-main {
    padding-block: 32px 56px;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 22px;
}

.hero-copy,
.hero-board,
.panel,
.stat-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: clamp(28px, 5vw, 52px);
}

.eyebrow,
.panel-kicker {
    display: inline-flex;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 16px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 0;
    font-size: 20px;
    line-height: 1.2;
}

.hero-copy p {
    max-width: 620px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 800;
}

.button-primary {
    background: var(--brand);
    color: #fff;
}

.button-secondary {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
}

.hero-board {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(20, 125, 79, .96), rgba(14, 93, 59, .96)),
        #0f5136;
    color: #fff;
}

.board-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .78;
}

.score-preview {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    margin-block: 48px;
    font-weight: 800;
}

.score-preview span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-preview span:first-child {
    text-align: right;
}

.score-preview strong {
    border-radius: 8px;
    background: rgba(255, 255, 255, .16);
    padding: 12px 16px;
    color: #fff;
}

.hero-board p {
    margin: 0;
    color: rgba(255, 255, 255, .78);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    padding: 20px;
}

.stat-card span,
.mini-stats span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 34px;
    line-height: 1;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(310px, .8fr);
    gap: 22px;
    margin-bottom: 22px;
}

.panel {
    padding: 20px;
    margin-bottom: 22px;
}

.panel-large,
.panel-stack .panel {
    margin-bottom: 0;
}

.panel-stack {
    display: grid;
    gap: 22px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.panel-header a {
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 800;
}

.match-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border-top: 1px solid var(--line);
    padding: 15px 0;
}

.match-row:first-of-type {
    border-top: 0;
}

.match-meta {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.match-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    font-weight: 800;
}

.match-teams span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-teams span:first-child {
    text-align: right;
}

.match-teams strong {
    min-width: 64px;
    border-radius: 8px;
    background: var(--surface-muted);
    padding: 7px 10px;
    text-align: center;
}

.match-side {
    min-width: 116px;
    color: var(--muted);
    font-size: 13px;
    text-align: right;
}

.match-side small {
    display: block;
}

.mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mini-stats div {
    border-radius: 8px;
    background: var(--surface-muted);
    padding: 14px;
}

.mini-stats strong {
    display: block;
    margin-top: 4px;
    font-size: 28px;
    line-height: 1;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.competition-card {
    display: block;
    min-height: 128px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}

.competition-card:hover {
    border-color: var(--brand);
}

.competition-card span,
.competition-card small {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.competition-card strong {
    display: block;
    margin-block: 8px 14px;
    font-size: 17px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.empty-state {
    border: 1px dashed #c7d2cc;
    border-radius: 8px;
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

.empty-state.compact {
    padding: 18px;
}

.table-wrap {
    overflow-x: auto;
}

.standings-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 14px;
}

.standings-table th {
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .06em;
    padding: 12px 10px;
    text-align: center;
    text-transform: uppercase;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
    text-align: left;
}

.standings-table td {
    border-bottom: 1px solid #eef2ef;
    padding: 13px 10px;
    text-align: center;
}

.standings-table tr:last-child td {
    border-bottom: 0;
}

main > .mb-6,
main > .mb-8 {
    margin-bottom: 24px;
}

main > .mb-6 h1,
main > .mb-8 h1 {
    margin-bottom: 8px;
    font-size: clamp(30px, 4vw, 44px);
}

main > .mb-6 p,
main > .mb-8 p {
    color: var(--muted);
}

main > .grid,
main > .rounded,
main > section.rounded {
    margin-bottom: 22px;
}

.pagination,
nav[role="navigation"] {
    margin-top: 20px;
}

.page-heading {
    max-width: 760px;
    margin-bottom: 24px;
}

.page-heading h1,
.detail-header h1 {
    margin-block: 8px 10px;
    font-size: clamp(32px, 5vw, 52px);
}

.page-heading p,
.detail-header p {
    color: var(--muted);
    font-size: 17px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.content-grid.two-columns {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}

.info-card,
.entity-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.entity-card {
    display: block;
    min-height: 132px;
}

.entity-card:hover,
.info-card:hover {
    border-color: var(--brand);
}

.entity-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.entity-card h2 {
    margin-bottom: 4px;
    font-size: 18px;
}

.entity-card p,
.card-meta {
    color: var(--muted);
    font-size: 14px;
}

.card-meta {
    margin-top: 16px;
}

.entity-avatar,
.detail-photo,
.player-photo {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--brand-dark);
    font-weight: 900;
    object-fit: cover;
    text-transform: uppercase;
}

.entity-avatar {
    width: 54px;
    height: 54px;
}

.player-photo {
    width: 88px;
    height: 88px;
    margin-bottom: 14px;
}

.detail-photo {
    width: 96px;
    height: 96px;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.plain-list {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    color: var(--muted);
    list-style: none;
}

.list-panel {
    display: grid;
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--line);
    padding: 14px 0;
    font-size: 14px;
}

.list-row:first-child {
    border-top: 0;
}

.list-row span {
    font-weight: 800;
}

.list-row small {
    color: var(--muted);
    font-size: 13px;
}

.list-row.stacked {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
}

.match-hero {
    margin-bottom: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    padding: clamp(20px, 4vw, 34px);
    text-align: center;
}

.match-scoreboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-block: 20px 14px;
}

.match-scoreboard a {
    overflow-wrap: anywhere;
    font-size: clamp(20px, 4vw, 34px);
    font-weight: 900;
    line-height: 1.1;
}

.match-scoreboard a:first-child {
    text-align: right;
}

.match-scoreboard a:last-child {
    text-align: left;
}

.match-scoreboard strong {
    min-width: 92px;
    border-radius: 8px;
    background: var(--surface-muted);
    padding: 14px 18px;
    font-size: 28px;
}

.match-context {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.pager {
    margin-top: 18px;
}

.pager nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pager a,
.pager span[aria-current] span,
.pager span[aria-disabled] span {
    display: inline-flex;
    min-width: 36px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.pager span[aria-current] span {
    background: var(--brand);
    color: #fff;
}

@media (max-width: 900px) {
    .hero-panel,
    .dashboard-grid,
    .content-grid,
    .content-grid.two-columns {
        grid-template-columns: 1fr;
    }

    .stats-grid,
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .site-shell {
        width: min(100% - 24px, 1180px);
    }

    .site-nav {
        align-items: flex-start;
        flex-direction: column;
        padding-block: 14px;
    }

    .nav-links {
        width: 100%;
    }

    .hero-copy,
    .hero-board,
    .panel {
        padding: 16px;
    }

    .stats-grid,
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .detail-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .match-row {
        grid-template-columns: 1fr;
    }

    .match-side {
        text-align: left;
    }

    .match-teams {
        grid-template-columns: 1fr;
    }

    .match-teams span:first-child,
    .match-teams span {
        text-align: left;
    }

    .match-teams strong {
        width: fit-content;
    }

    .match-scoreboard {
        grid-template-columns: 1fr;
    }

    .match-scoreboard a:first-child,
    .match-scoreboard a:last-child {
        text-align: center;
    }
}
