/*
 * Six Again - the design system.
 *
 * One idea: a match-day score desk. Flat dark surfaces with no gradients or
 * glows, a strict surface ladder so a card reads as a card and a row as a row,
 * numbers that line up, and colour used only when it means something.
 *
 * Colour has three jobs and no others:
 *   green  the brand, anything won or selected, and anything happening now
 *   red    a loss, and a knockout
 *   azure  interactive and informational
 * Everything else is one of six neutrals. If a new colour is needed, the answer
 * is almost always a different neutral.
 *
 * Loaded first on every page. /nrl/nrl.css and /scores.css build on it and own
 * no colours of their own.
 */

:root {
    /* Surfaces, darkest to lightest. A panel sits on the page, a row sits in a
       panel, a hovered row sits above that. Nothing skips a step. */
    --bg: #080D14;
    --bg-soft: #0B121B;
    --surface: #0E1520;
    --surface-2: #141E2C;
    --surface-3: #1B2736;
    --line: #1F2B3B;
    --line-2: #2C3B4F;

    /* Text, in three weights of attention. */
    --text: #EEF3F9;
    --text-dim: #9FB0C4;
    --text-mute: #64768B;

    /* Brand green: the mark, the active state, a win. */
    --brand: #4FC96A;
    --brand-bright: #7BE38F;
    --brand-deep: #2E9B48;
    --brand-wash: rgba(79, 201, 106, 0.12);
    --brand-edge: rgba(79, 201, 106, 0.35);
    --on-brand: #04140A;

    /* Azure: links, and anything informational rather than evaluative. */
    --accent: #58B8F0;
    --accent-wash: rgba(88, 184, 240, 0.12);
    --accent-edge: rgba(88, 184, 240, 0.32);

    /* Live is green, the way the app shows it: a match happening now is the
       good thing on the page, not a warning. It shares the brand hue rather
       than inventing a second green. */
    --live: #4FC96A;
    --live-wash: rgba(79, 201, 106, 0.14);
    --live-edge: rgba(79, 201, 106, 0.45);

    /* Red is a loss, and a tie nobody comes back from. Nothing else may use it. */
    --loss: #FF5A5A;
    --loss-wash: rgba(255, 90, 90, 0.14);
    --warn: #F0B429;
    --warn-wash: rgba(240, 180, 41, 0.14);

    /* Shape and rhythm. Four values, used everywhere. */
    --r-sm: 8px;
    --r: 12px;
    --r-lg: 16px;
    --r-pill: 999px;

    --gap-1: 0.25rem;
    --gap-2: 0.5rem;
    --gap-3: 0.75rem;
    --gap-4: 1rem;
    --gap-5: 1.5rem;
    --gap-6: 2rem;
    --gap-7: 3rem;

    --page: 1160px;
    --gutter: 1.25rem;
    --bar: 3.5rem;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-bar: 0 1px 0 var(--line);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font);
    /* Numbers are the content here, so they line up by default and any run of
       prose that would rather not can opt out. */
    font-variant-numeric: tabular-nums;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--text);
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

/* The marketing pages carry a decorative wash element; the site is flat now,
   so it stays in the markup and does nothing. The badge clip-path definitions
   are the same: present on every page, occupying no space. A zero-sized inline
   SVG still gets a line box, which is a stray 28px above the bar. */
.glow {
    display: none;
}

/* Taken out of flow rather than hidden: a display:none SVG is not a reliable
   place to keep a clipPath that badges elsewhere on the page reference. */
.badge-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ------------------------------------------------------------------- the bar */

.app-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(11, 18, 27, 0.92);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    box-shadow: var(--shadow-bar);
}

.app-bar-inner {
    display: flex;
    align-items: center;
    gap: var(--gap-5);
    max-width: var(--page);
    height: var(--bar);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.02rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--text);
    white-space: nowrap;
}

.brand img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.brand:hover {
    color: var(--text);
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-right: auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.app-nav::-webkit-scrollbar {
    display: none;
}

.app-nav a {
    position: relative;
    padding: 0.45rem 0.7rem;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
    white-space: nowrap;
}

.app-nav a:hover {
    background: var(--surface-2);
    color: var(--text);
}

.app-nav a[aria-current] {
    color: var(--text);
}

.app-nav a[aria-current]::after {
    content: "";
    position: absolute;
    left: 0.7rem;
    right: 0.7rem;
    bottom: -0.35rem;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
}

.app-cta {
    padding: 0.45rem 0.9rem;
    border-radius: var(--r-pill);
    background: var(--brand);
    color: var(--on-brand);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.app-cta:hover {
    background: var(--brand-bright);
    color: var(--on-brand);
}

/* ------------------------------------------------------------------- layout */

main {
    max-width: var(--page);
    margin: 0 auto;
    padding: var(--gap-5) var(--gutter) var(--gap-7);
}

article {
    max-width: 100%;
}

.breadcrumbs {
    margin-bottom: var(--gap-4);
    font-size: 0.8rem;
    color: var(--text-mute);
}

.breadcrumbs a {
    color: var(--text-mute);
}

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

/* -------------------------------------------------------------------- type */

h1 {
    font-size: clamp(1.65rem, 3.2vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: var(--gap-3);
}

h2 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.lede {
    max-width: 62ch;
    margin-bottom: var(--gap-5);
    font-size: 1.02rem;
    color: var(--text-dim);
}

article p,
article li {
    color: var(--text-dim);
}

article p {
    margin-bottom: var(--gap-4);
}

article strong {
    color: var(--text);
    font-weight: 650;
}

/* ------------------------------------------------------------------ footer */

footer {
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
    margin-top: var(--gap-7);
}

footer > * {
    max-width: var(--page);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap-6);
    padding-top: var(--gap-6);
    padding-bottom: var(--gap-6);
    text-align: left;
}

.footer-group h2 {
    margin: 0 0 var(--gap-3);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.footer-group ul {
    display: grid;
    gap: var(--gap-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-group li {
    margin: 0;
}

.footer-group a {
    display: inline-block;
    padding: 0.12rem 0;
}

.footer-legal {
    padding-top: var(--gap-4);
    padding-bottom: var(--gap-5);
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
    color: var(--text-mute);
}

footer a {
    color: var(--text-dim);
}

footer a:hover {
    color: var(--text);
}

@media (max-width: 720px) {
    .app-bar-inner {
        gap: var(--gap-3);
    }

    .brand span {
        display: none;
    }

    main {
        padding-top: var(--gap-4);
    }

    .footer-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--gap-5) var(--gap-4);
    }
}

@media (max-width: 440px) {
    .footer-nav {
        grid-template-columns: 1fr;
    }
}
