/* ============================================================
   SUFCdb — sufcdb.net
   Southend United FC Statistics Database
   Colour scheme: Navy #1a2744, Yellow #f5c800
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poller+One&display=swap');

/* ── Custom Properties ─────────────────────────────────────── */
:root {
    --navy:        #1a2744;
    --navy-light:  #253560;
    --navy-dark:   #101a2e;
    --yellow:      #f5c800;
    --yellow-dark: #d4a900;
    --white:       #ffffff;
    --off-white:   #f8f6f1;
    --grey-light:  #efefef;
    --grey-mid:    #c0bfba;
    --grey-text:   #5a5a5a;
    --green:       #1e7a3e;
    --red:         #b92b2b;
    --amber:       #e07b00;

    --font-display: Tahoma, 'Trebuchet MS', Arial, sans-serif;
    --font-body:    Tahoma, 'Trebuchet MS', Arial, sans-serif;
    --font-mono:    Tahoma, 'Trebuchet MS', Arial, sans-serif;
    --font-table:   Tahoma, 'Trebuchet MS', Arial, sans-serif;

    --max-width: 1150px;
    --gutter: 1.5rem;
    --radius: 2px;
    --shadow: 0 2px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 6px 24px rgba(0,0,0,0.18);

    /* ── Header band heights ── */
    /* Total = nav + navy + gold + bottom. Sammy circle = this total. */
    --header-nav-height:    28px;   /* top off-white band (nav links) */
    --header-navy-height:  60px;   /* navy title band */
    --header-gold-height:    4px;   /* gold stripe */
    --header-bottom-height: 28px;   /* bottom off-white band (page title) */
    --header-total-height: calc(var(--header-nav-height) + var(--header-navy-height) + var(--header-gold-height) + var(--header-bottom-height));

/* The links section of the header */
.header-page-links {
    font-family: var(--font-display);
    font-size: var(--header-nav-font-size);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    pointer-events: auto;
    white-space: nowrap;
    margin-left: auto;
}
.header-page-links a {
    color: var(--navy);
    text-decoration: none;
    padding: 3px 10px;
    position: relative;
    transition: color 0.15s ease;
    display: inline-block;
}
.header-page-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 10px; right: 10px;
    height: 2px;
    background: var(--yellow);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.15s ease;
}
.header-page-links a:hover {
    color: var(--yellow-dark);
    text-decoration: none;
}
.header-page-links a:hover::after {
    transform: scaleX(1);
}
.page-link-disabled {
    color: var(--grey-mid);
    font-family: var(--font-display);
    font-size: var(--header-nav-font-size);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
}
.page-link-sep {
    color: var(--grey-mid);
    padding: 0 2px;
}

    /* ── Sammy ── */
    --header-sammy-size: var(--header-total-height);  /* fills all four bands exactly */
    --header-sammy-left: 20px;

    /* ── Title text ── */
    --header-font-size:      41px;  /* SUFCdb Poller One */
    --header-font-scale:      1.6;  /* horizontal stretch */
    --header-subtitle-size:  12px;  /* subtitle under SUFCdb */
    --header-title-gap:      12px;  /* gap between circle and title text */

    /* ── Nav ── */
    --header-nav-font-size:  13px;

    /* ── Page title (in bottom off-white band) ── */
.header-page-title {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--yellow);
    background: var(--navy);
    white-space: nowrap;
    pointer-events: auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 2px;
    bottom: 0;
    border-top: 1px solid var(--off-white);
    border-bottom: 1px solid var(--off-white);
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    font-size: 1.3rem;
    line-height: 1;
}



}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; background: var(--off-white); }
body {
    font-family: var(--font-body);
    background: var(--off-white);
    color: var(--navy-dark);
    line-height: 1.45;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1150px;
    margin: 0 auto;
}
img { max-width: 100%; display: block; }

/* ── Global links — nav style: no underline, gold on hover ── */
a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--yellow-dark);
    text-decoration: underline;
    text-decoration-color: var(--yellow);
}

/* ============================================================
   HEADER
   Four bands (top-to-bottom):
     1. off-white nav band
     2. navy title band  (SUFCdb + subtitle)
     3. gold stripe
     4. off-white page-title band
   Sammy circle is absolutely positioned, spans all four bands,
   overflowing top and bottom symmetrically.
   ============================================================ */

.site-header {
    position: relative;
    font-family: var(--font-display);
}

/* ── BAND 1: off-white nav ── */
.header-band-nav {
    background: var(--off-white);
    height: var(--header-nav-height);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px;
    position: relative;
    z-index: 30;
}

.header-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.header-nav ul li a {
    display: block;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: var(--header-nav-font-size);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--navy);
    text-decoration: none;
    padding: 3px 10px;
    position: relative;
    transition: color 0.15s ease;
}

.header-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 10px; right: 10px;
    height: 2px;
    background: var(--yellow);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.15s ease;
}

.header-nav ul li a:hover,
.header-nav ul li a.active {
    color: var(--yellow-dark);
    text-decoration: none;
}

.header-nav ul li a:hover::after,
.header-nav ul li a.active::after {
    transform: scaleX(1);
}

/* ── BAND 2: Navy title ── */
.header-band-navy {
    background: var(--navy);
    height: var(--header-navy-height);
    display: flex;
    align-items: center;
    padding: 0;
    position: relative;
    overflow: visible;
    z-index: 20;
}

/* Title block — offset right of Sammy circle */
.header-titles {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: calc(var(--header-sammy-left) + var(--header-sammy-size) + var(--header-title-gap));
    flex: 1;
}

/* SUFCdb — Poller One, stretched */
.header-site-name {
    font-family: 'Poller One', serif;
    font-size: var(--header-font-size);
    line-height: 1;
    display: block;
    transform: scaleX(var(--header-font-scale));
    transform-origin: left center;
    letter-spacing: 0.03em;
}

.header-sufc { color: #ffffff; }
.header-db   { color: var(--yellow); }

/* Subtitle — Inter, same visual width as SUFCdb block */
.header-subtitle {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--header-subtitle-size);
    color: rgba(255,255,255,0.65);
    display: block;
    margin-top: -5px;
    letter-spacing: 0.16em;
   
}
.header-subtitle-main   { color: #ffffff; }
.header-subtitle-accent { color: var(--yellow); }

/* Ghost text — navy on navy, barely visible watermark */
.header-ghost {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 34%;
    overflow: hidden;
    pointer-events: none;
}

.header-ghost .ghost {
    font-family: 'Poller One', serif;
    color: #253660;
    position: absolute;
    white-space: nowrap;
    user-select: none;
}

.header-ghost .g1 { font-size: 20px; top: 5px;  right: 20px; }
.header-ghost .g2 { font-size: 9px;  top: 26px; right: 50px;
                    font-family: var(--font-display);
                    font-weight: 600;
                    letter-spacing: 0.14em;
                    text-transform: uppercase; }
.header-ghost .g3 { font-size: 14px; top: 37px; right: 14px; }

/* ── BAND 3: Gold stripe ── */
.header-band-gold {
    background: var(--yellow);
    height: var(--header-gold-height);
    position: relative;
    z-index: 20;
    pointer-events: none;
}

/* ── BAND 4: off-white page-title band ── */
.header-band-bottom {
    background: var(--off-white);
    height: var(--header-bottom-height);
    display: flex;
    align-items: center;
    padding-left: calc(var(--header-sammy-left) + var(--header-sammy-size) + var(--header-title-gap));
    padding-right: 24px;
    position: relative;
    z-index: 20;
    pointer-events: none;
    gap: 1rem;
}

/* Page title — navy block, yellow text, centred in band */
.header-page-title {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--navy);
    color: var(--yellow);
    padding: 0.18em 0.75em;
    border-radius: var(--radius);
    white-space: nowrap;
    pointer-events: auto;
    /* Push to centre of the band */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Page links — left side of band, navy text, yellow underline on hover */
.header-page-links {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: auto;
    white-space: nowrap;
}
.header-page-links a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.15s ease;
}
.header-page-links a:hover {
    color: var(--navy);
    text-decoration: underline;
    text-decoration-color: var(--yellow);
}

/* ── SAMMY ──
   Absolutely positioned, spanning all four bands.
   Circle centre is at mid-point of the full header height,
   so it overflows equally above (into band-nav) and below (into band-bottom).
── */
.header-sammy {
    position: absolute;
    top: 0;
    left: var(--header-sammy-left);
    height: var(--header-total-height);
    width: var(--header-sammy-size);
    z-index: 50;
    display: flex;
    align-items: center;   /* vertically centres the circle within total height */
    justify-content: center;
}

.header-sammy-circle {
    width: var(--header-sammy-size);
    height: var(--header-sammy-size);
    border-radius: 50%;
    background: var(--off-white);
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-sammy-circle img {
    width: 88%;
    height: 88%;
    object-fit: contain;
}

/* ── Page wrapper ──────────────────────────────────────────── */
.page-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.25rem var(--gutter);
    flex: 1;
}

/* ── Page heading (used inside page-wrap, below header) ─────── */
/* Clean navy Oswald, no border, no underline */
.page-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--navy);
    margin: 1.25rem 0 0.6rem;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border: 1px solid var(--grey-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    background: var(--navy);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--yellow);
}
.card-header .badge {
    background: var(--yellow);
    color: var(--navy-dark);
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
    font-weight: 700;
}

/* ── Tables ────────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

/* Column headers — Oswald, navy text, grey background */
.data-table th {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--navy);
    background: #e8e6e0;
    padding: 0.4rem 0.65rem;
    text-align: left;
    border-bottom: 2px solid var(--yellow);
    white-space: nowrap;
}
.data-table td {
    padding: 0.4rem 0.65rem;
    border-bottom: 1px solid var(--grey-light);
    color: var(--navy);
    vertical-align: middle;
    font-family: var(--font-table);
    font-size: 0.82rem;
    line-height: 1.35;
}

/* Numeric columns — center-align, alata */
.data-table th.num {
    text-align: center;
    font-family: var(--font-display);
}
.data-table td.num {
    text-align: center;
    font-family: var(--font-table);
}

.data-table tbody tr:hover td {
    background: #f0ede6;
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Southend row highlight in league tables */
.data-table tr.sufc-row td {
    background: #fff8cc;
    font-weight: 600;
    border-left: 3px solid var(--yellow);
}

/* Links inside table cells — inherit table font/size, gold hover */
.data-table td a {
    color: var(--navy);
    text-decoration: none;
    font-family: inherit;
    font-size: inherit;
}
.data-table td a:hover {
    color: var(--yellow-dark);
    text-decoration: underline;
    text-decoration-color: var(--yellow);
}

/* ── Result badges ─────────────────────────────────────────── */
.result-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 2px;
    letter-spacing: 0;
}
.result-w { background: var(--green);  color: var(--white); }
.result-d { background: var(--amber);  color: var(--white); }
.result-l { background: var(--red);    color: var(--white); }

/* ── Score ─────────────────────────────────────────────────── */
.score {
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* ── Comp badge ────────────────────────────────────────────── */
.comp-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
    background: var(--grey-light);
    color: var(--grey-text);
    vertical-align: middle;
}
.comp-league     { background: var(--navy-light); color: var(--white); }
.comp-fa_cup     { background: #8b0000; color: var(--white); }
.comp-league_cup { background: #335; color: var(--white); }
.comp-play_off   { background: var(--amber); color: var(--white); }

/* ── Home/Away pill ─────────────────────────────────────────── */
.venue-pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
    font-weight: 500;
}
.venue-H { background: var(--navy); color: var(--white); }
.venue-A { background: var(--grey-light); color: var(--grey-text); }
.venue-N { background: var(--yellow); color: var(--navy-dark); }

/* ── Stats grid ─────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1px;
    background: var(--grey-light);
    border: 1px solid var(--grey-light);
    border-radius: var(--radius);
    overflow: hidden;
}
.stat-box {
    background: var(--white);
    padding: 0.75rem;
    text-align: center;
}
.stat-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    display: block;
}
.stat-label {
    font-family: var(--font-display);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--grey-text);
    margin-top: 0.2rem;
    display: block;
}

/* ── Home page hero ─────────────────────────────────────────── */
.home-hero {
    background: var(--navy);
    color: var(--white);
    padding: 2rem var(--gutter);
    margin-bottom: 1.5rem;
    border-bottom: 4px solid var(--yellow);
    position: relative;
    overflow: hidden;
}
.home-hero::before {
    content: 'SUFC';
    position: absolute;
    right: -1rem;
    top: -0.5rem;
    font-family: var(--font-display);
    font-size: 10rem;
    font-weight: 700;
    color: rgba(255,255,255,0.04);
    letter-spacing: -0.04em;
    pointer-events: none;
    line-height: 1;
}
.home-hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
}
.home-hero h1 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
}
.home-hero h1 span { color: var(--yellow); }
.home-hero p {
    color: rgba(255,255,255,0.6);
    font-size: 0.88rem;
    margin-top: 0.4rem;
    font-style: italic;
}

/* ── Home grid ──────────────────────────────────────────────── */
.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter) 1.5rem;
}
@media (max-width: 768px) {
    .home-grid { grid-template-columns: 1fr; }
}
.home-grid .card.span-2 { grid-column: span 2; }
@media (max-width: 768px) {
    .home-grid .card.span-2 { grid-column: span 1; }
}

/* ── Form strip ─────────────────────────────────────────────── */
.form-strip {
    display: flex;
    gap: 4px;
    align-items: center;
}
.form-dot {
    width: 24px;
    height: 24px;
    border-radius: 2px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

/* ── Season selector ────────────────────────────────────────── */
.season-selector {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.season-selector label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey-text);
}
.season-selector select {
    font-family: var(--font-display);
    font-size: 0.82rem;
    padding: 0.3rem 0.65rem;
    border: 2px solid var(--navy);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--navy);
    cursor: pointer;
}
.season-selector select:focus { outline: 2px solid var(--yellow); }

/* ── Competition section divider ────────────────────────────── */
.comp-section {
    margin-bottom: 1.5rem;
}
.comp-section-header {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--navy);
    padding: 0.4rem 0.75rem;
    border-left: 4px solid var(--yellow);
    margin-bottom: 0;
}

/* ── Player profile ─────────────────────────────────────────── */
.player-header {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 1.25rem;
}
.player-photo {
    width: 45px;
    height: 54px;
    object-fit: cover;
    border: 3px solid var(--navy);
    border-radius: var(--radius);
    flex-shrink: 0;
    background: var(--grey-light);
}
.player-meta dt {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--grey-text);
}
.player-meta dd {
    font-family: var(--font-display);
    font-size: 0.82rem;
    color: var(--navy-dark);
    margin-bottom: 0.3rem;
}

/* ── Back / navigation links ────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 0.75rem;
    text-decoration: none;
}
.back-link:hover {
    color: var(--yellow-dark);
    text-decoration: none;
}
.back-link::before { content: '←'; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
    background: var(--navy-dark);
    color: rgba(255,255,255,0.4);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.75rem var(--gutter);
    border-top: 3px solid var(--navy);
    margin-top: auto;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.footer-inner a { color: rgba(255,255,255,0.5); }
.footer-inner a:hover { color: var(--yellow); text-decoration: none; }

/* ── Utility ────────────────────────────────────────────────── */
.text-muted   { color: var(--grey-text); font-size: 0.82rem; }
.text-mono    { font-family: var(--font-mono); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .site-header { width: 100%; margin: 0 auto; }
}
@media (max-width: 768px) {
    .home-hero h1 { font-size: 1.6rem; }
    .home-hero::before { font-size: 6rem; }
    .page-title { font-size: 1.25rem; }
    .data-table { font-size: 0.76rem; }
    .data-table th, .data-table td { padding: 0.35rem 0.4rem; }
}
@media (max-width: 600px) {
    .header-nav ul li:nth-child(n+4) { display: none; }
    .header-ghost { display: none; }
    .site-header { width: 100%; margin: 0 auto; }
}

/* ── History page ──────────────────────────────────────────── */
.history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
.history-col h2 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--navy);
    border-left: 4px solid var(--yellow);
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.75rem;
}
.history-col p,
.history-col li {
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--navy-dark);
    margin-bottom: 0.6rem;
}
.history-col ul { padding-left: 1.1rem; }

@media (max-width: 900px) {
    .history-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .history-grid { grid-template-columns: 1fr; }
}

/* ── Statistics page ───────────────────────────────────────── */

/* Season navigator — navy box, gold arrow */
.season-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.season-nav-label {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--navy);
    min-width: 90px;
    text-align: center;
}

.season-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--navy);
    color: var(--yellow);
    font-size: 0.9rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background 0.15s;
    flex-shrink: 0;
}
.season-nav-btn:hover {
    background: var(--navy-light);
    text-decoration: none;
    color: var(--yellow);
}
.season-nav-disabled {
    background: var(--grey-light);
    color: var(--grey-mid);
    cursor: default;
}

/* Section title — navy bg, white text, gold left bar (consistent pattern) */
.stats-section {
    margin-bottom: 2rem;
}
.stats-section-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--navy);
    padding: 0.4rem 0.75rem;
    border-left: 4px solid var(--yellow);
    margin-bottom: 0;
    display: block;
}

/* Summary table */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.stats-table th,
.stats-table td {
    padding: 0.4rem 0.65rem;
    border-bottom: 1px solid var(--grey-light);
    vertical-align: top;
    text-align: left;
}
.stats-table th {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--grey-text);
    width: 160px;
    white-space: nowrap;
}
.stats-table td {
    font-family: var(--font-display);
    color: var(--navy);
}
.stats-table tr:last-child th,
.stats-table tr:last-child td {
    border-bottom: none;
}
.stats-table td a {
    color: var(--navy);
    text-decoration: none;
}
.stats-table td a:hover {
    color: var(--yellow-dark);
    text-decoration: underline;
    text-decoration-color: var(--yellow);
}

.position-note {
    display: inline-block;
    margin-left: 0.4rem;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--yellow);
    color: var(--navy);
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius);
}
.stat-note {
    margin-left: 0.4rem;
    font-size: 0.75rem;
    color: var(--grey-text);
}
.header-ghost {
    display: none;
}

/* ── Header search ────────────────────────────────────────────── */
.header-search {
    position: absolute;
    top: 44px;
    right: 24px;
    z-index: 9999;
}

.search-wrap {
    position: relative;
    z-index: 9999;
}

.header-search input {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.82rem;
    padding: 0.3rem 0.7rem;
    width: 200px;
    outline: none;
    transition: border-color 0.2s, width 0.2s;
}

.header-search input::placeholder {
    color: rgba(255,255,255,0.5);
}

.header-search input:focus {
    border-color: var(--yellow);
    width: 260px;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 260px;
    background: var(--white);
    border: 1px solid var(--grey-light);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    overflow: hidden;
}

.search-group-heading {
    background: var(--grey-light);
    color: var(--grey-text);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
}

.search-item {
    display: block;
    padding: 0.4rem 0.75rem;
    color: var(--navy);
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px solid var(--grey-light);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover,
.search-item.focused {
    background: var(--off-white);
    color: var(--navy);
}

.search-no-results {
    padding: 0.6rem 0.75rem;
    color: var(--grey-text);
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .header-search {
        display: none;
    }
}
.stat-notes-cell {
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--grey-text);
}

/* ── Player Profile ───────────────────────────────────────────── */

/* Back/Next navigation */
.player-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 8px;
    font-size: 0.85rem;
}
.player-nav-btn {
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border: 2px solid var(--navy);
    border-radius: var(--radius);
}
.player-nav-btn:hover { background: var(--navy); color: var(--white); text-decoration: none; }
.player-nav-btn.disabled { color: var(--grey-mid); border-color: var(--grey-mid); pointer-events: none; }
.player-nav-home { margin: 0 auto; color: var(--grey-text); text-decoration: none; font-size: 0.8rem; }
.player-nav-home:hover { color: var(--navy); text-decoration: none; }

/* ── Grid layout — 376px left + 760px right, 8px gap ── */
.profile-page {
    max-width: 1160px;
    padding: 1.25rem 8px 1.5rem;
}
.profile-layout {
    display: grid;
    grid-template-columns: 376px 760px;
    gap: 8px;
    align-items: start;
}

/* ── Universal box — 2px border, 8px bottom margin ── */
.profile-box {
    background: var(--white);
    border: 2px solid var(--grey-light);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 8px;
}

/* Navy title bar — matches comp-section-header pattern */
.profile-box-title {
    background: var(--navy);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4rem 0.65rem;
    border-left: 4px solid var(--yellow);
}

/* ── Box 1: Player header ── */
.profile-header-body {
    display: flex;
    align-items: stretch;
}
.profile-header-photo {
    flex-shrink: 0;
    width: 130px;
    border-right: 2px solid var(--grey-light);
}
.profile-photo {
    width: 130px;
    height: 183px;
    display: block;
    object-fit: cover;
}
.profile-header-badges {
    width: 110px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    background: var(--off-white);
}
.profile-squad-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    background: var(--navy);
    color: var(--yellow);
    padding: 0.1em 0.35em;
    border-radius: var(--radius);
    line-height: 1;
    text-align: center;
}
.profile-flag {
    height: 44px;
    width: auto;
    border: 1px solid var(--grey-light);
    display: block;
}
.player-flag {
    width: 20px !important;
    height: 14px !important;
    min-width: 20px !important;
    object-fit: cover;
    vertical-align: middle;
    border: 1px solid #ccc;
    display: inline-block !important;
    overflow: hidden;
}
.profile-squad-badge {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
    background: var(--green);
    color: var(--white);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    letter-spacing: 0.04em;
    text-align: center;
}
.profile-header-position {
    background: var(--off-white);
    border-top: 2px solid var(--grey-light);
    padding: 0.35rem 0.65rem;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--grey-text);
    text-align: center;
}

/* ── Box 4: Personal details table ── */
.profile-personal-table {
    width: 100%;
    font-size: 0.82rem;
    border-collapse: collapse;
}
.profile-personal-table th {
    color: var(--grey-text);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.5rem 0.35rem 0.65rem;
    white-space: nowrap;
    vertical-align: top;
    width: 80px;
    border-bottom: 1px solid var(--grey-light);
}
.profile-personal-table td {
    padding: 0.35rem 0.65rem 0.35rem 0.5rem;
    color: var(--navy);
    line-height: 1.4;
    border-bottom: 1px solid var(--grey-light);
}
.profile-personal-table tr:last-child th,
.profile-personal-table tr:last-child td {
    border-bottom: none;
}

/* ── Biography ── */
.profile-bio-body {
    padding: 0.75rem 0.85rem;
}
.profile-bio-text {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--navy);
}
.profile-bio-default {
    color: var(--grey-text);
    font-style: italic;
}

/* ── Transfers + squad ── */
.loan-badge {
    font-size: 0.7rem;
    background: var(--amber);
    color: var(--white);
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius);
    font-weight: 600;
}
.squad-badge {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--navy);
    color: var(--yellow);
    padding: 0.1em 0.35em;
    border-radius: var(--radius);
    line-height: 1;
    text-align: center;
    display: inline-block;
    min-width: 1.6rem;
}


/* ── Utility ── */
.table-scroll { overflow-x: auto; }

/* ── Remove number input spinners sitewide ── */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
.table-scroll { overflow-x: auto; }

/* ── Responsive: tablet 768px–1024px — stack columns ── */
@media (max-width: 1024px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .profile-left,
    .profile-right {
        width: 100%;
    }
}

/* ── Responsive: mobile under 768px — same single column ── */
@media (max-width: 768px) {
    .profile-page {
        padding: 0 4px 1rem;
    }
    .profile-header-badges {
        width: 80px;
    }
    .profile-squad-number {
        font-size: 1.4rem;
    }
}
