.cookie-consent-page h1 {
    margin: 0 0 10px;
}

.cookie-consent-page p {
    margin: 0;
    line-height: 1.6;
}

.cookie-group-form input[type="submit"] {
    border-radius: 999px;
    font: inherit;
    padding: 11px 18px;
    transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease;
}

.cookie-group-form .cookie-group-accept {
    border: none;
    background: var(--gain);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.cookie-group-form .cookie-group-decline {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    color: #f8fafc;
    cursor: pointer;
}

.cookie-group-form .cookie-group-decline {
    border-color: #cbd5e1;
    background: #ffffff;
    color: #0f172a;
}

.cookie-group-form input[type="submit"]:hover {
    transform: translateY(-1px);
}

.cookie-consent-page {
    max-width: 900px;
    margin: 48px auto 72px;
    padding: 0 20px;
}

.cookie-group {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid #d9e0ea;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.cookie-group-title {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.cookie-group-title h3 {
    margin: 0;
}

.cookie-group-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.cookie-group-form form {
    margin: 0;
}

.cookie-group-required,
.cookie-consent-accepted,
.cookie-consent-declined {
    font-weight: 700;
}

.cookie-group-required,
.cookie-consent-accepted {
    color: #166534;
}

.cookie-consent-declined {
    color: #b91c1c;
}

.cookie-group table {
    width: 100%;
    margin-top: 18px;
    border-collapse: collapse;
}

.cookie-group th,
.cookie-group td {
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.cookie-group th {
    width: 28%;
    color: #0f172a;
}

@media (max-width: 640px) {
    .cookie-group {
        padding: 20px;
    }

    .cookie-group th,
    .cookie-group td {
        display: block;
        width: 100%;
    }

    .cookie-group td {
        padding-top: 0;
    }
}

/* Soft-launch feedback widget */
#bp-feedback-launcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 6px;
}
#bp-feedback-launcher[hidden] { display: none; }
#bp-feedback-btn {
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    background: var(--gain);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#bp-feedback-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(15, 23, 42, 0.32); }
#bp-feedback-dismiss {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.55);
    color: #f8fafc;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
}
#bp-feedback-dismiss:hover { opacity: 1; }
#bp-feedback-modal { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center; }
#bp-feedback-modal[hidden] { display: none; }
.bp-feedback-backdrop { position: absolute; inset: 0; background: rgba(8, 14, 26, 0.6); }
.bp-feedback-card {
    position: relative;
    width: min(440px, calc(100% - 24px));
    background: #ffffff;
    color: #0f172a;
    border-radius: 18px;
    padding: 24px 24px 20px;
    box-shadow: 0 30px 70px rgba(8, 14, 26, 0.45);
}
.bp-feedback-card h2 { margin: 0 0 6px; font-size: 20px; }
.bp-feedback-lead { margin: 0 0 16px; color: #475569; font-size: 14px; line-height: 1.5; }
.bp-feedback-card label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; color: #1e293b; }
.bp-feedback-card input[type="text"],
.bp-feedback-card textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    background: #f8fafc;
    color: #0f172a;
    box-sizing: border-box;
}
.bp-feedback-card textarea { resize: vertical; }
.bp-feedback-card input[type="text"]:focus,
.bp-feedback-card textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: #ffffff; }
.bp-feedback-actions { margin-top: 16px; display: flex; justify-content: flex-end; }
.bp-feedback-submit {
    border: none;
    background: var(--gain);
    color: #fff;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
}
.bp-feedback-submit:disabled { opacity: 0.6; cursor: progress; }
.bp-feedback-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}
.bp-feedback-status { margin: 12px 0 0; font-size: 13px; }
.bp-feedback-status.ok { color: #166534; }
.bp-feedback-status.err { color: #b91c1c; }
/* On a phone the launcher floats over whatever is being read -- usually the
   rightmost column of a table, which is where the diffs live. So it shrinks
   to a round icon (the label stays for screen readers), wears its dismiss as
   a corner badge, and site-chrome.js tucks it below the fold while the
   reader scrolls down. */
#bp-feedback-launcher { transition: transform 0.22s ease, opacity 0.22s ease; }
@media (max-width: 640px) {
    #bp-feedback-launcher {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
    #bp-feedback-btn {
        width: 44px;
        height: 44px;
        padding: 0;
        font-size: 19px;
        line-height: 44px;
        text-align: center;
    }
    .bp-feedback-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    #bp-feedback-dismiss {
        position: absolute;
        top: -6px;
        right: -6px;
        width: 20px;
        height: 20px;
        font-size: 13px;
    }
    #bp-feedback-launcher.is-tucked {
        transform: translateY(calc(100% + 24px));
        opacity: 0;
        pointer-events: none;
    }
    #bp-feedback-launcher.is-tucked:focus-within { transform: none; opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) {
    #bp-feedback-launcher { transition: none; }
}

/* Player search dropdown (navbar autocomplete) */
#player-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}
#player-search-suggestions[hidden] { display: none; }
#player-search-suggestions li {
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
}
#player-search-suggestions li:hover,
#player-search-suggestions li[aria-selected="true"] {
    background: #eee;
}
#player-search-suggestions img {
    width: 20px;
    height: 20px;
}

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

/* Promotion band. Sits under the nav on every route (base.html), and above the
   front-page masthead for the ordinary signup prompt when the offer is closed.

   Built in the page's own idiom rather than as chrome of its own: the board
   card. Same frost border and 2px corners, same coloured top rule saying which
   kind of thing this is (goal red while a deadline runs, gain green for access
   you hold, blue line for a standing invitation), the masthead's ice gradient
   for a ground, and a mono label at the right where every card on the front
   page carries one. The offer sentence and the button sit together at the left;
   the label holds the far edge, so the row is composed rather than split into
   two lonely corners. */
.promo-bar {
    width: 100%;
    /* The content column, not the card: pages lay their own content out in a
       1180px column inside the wider white card, and a band running wider than
       everything beneath it was the tell that it had been bolted on. */
    max-width: var(--page-max, 1180px);
    margin: 18px auto 14px;
    box-sizing: border-box;
    font-family: var(--font-body, system-ui, sans-serif);
}
.promo-bar[hidden] { display: none; }

/* On the front page it is already inside that column. */
.home-page > .promo-bar { max-width: none; margin: 0 0 14px; padding: 0; }

.promo-bar__plate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 26px;
    padding: 15px 18px 16px;
    border: 1px solid var(--frost, #DCE4E9);
    border-top: 3px solid var(--goal-red, #C8102E);
    border-radius: 2px;
    /* The masthead's ground, warmed a shade towards the rule above it. */
    background: linear-gradient(180deg, #FDF7F4 0%, #F2F4F4 100%);
}
.promo-bar--holder .promo-bar__plate { border-top-color: var(--gain, #0F7A4D); }
.promo-bar--signup .promo-bar__plate { border-top-color: var(--blue-line, #1B4F8C); }

.promo-bar__body { flex: 0 1 auto; min-width: 0; }

.promo-bar__lead {
    margin: 0;
    font-family: var(--font-display, 'Arial Narrow', sans-serif);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--board, #101820);
}

.promo-bar__note {
    margin: 5px 0 0;
    max-width: 62ch;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--twill, #6B7885);
}

/* The same button as every other call to action on the site, at the same
   radius — the plate is a place on the page, not a different product. */
.promo-bar .promo-bar__cta {
    flex: 0 0 auto;
    padding: 10px 18px;
    box-sizing: border-box;
    border: 1px solid var(--blue-line, #1B4F8C);
    border-radius: 4px;
    background: var(--blue-line, #1B4F8C);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.18s, border-color 0.18s;
}
.promo-bar .promo-bar__cta:hover {
    background: #163e6e;
    border-color: #163e6e;
    color: #fff;
}
.promo-bar .promo-bar__cta:focus-visible,
.promo-bar .promo-bar__dismiss:focus-visible {
    outline: 2px solid var(--blue-line, #1B4F8C);
    outline-offset: 2px;
}

/* Where every board card on the front page carries its own. */
.promo-bar__meta {
    margin-left: auto;
    font-family: var(--font-data, ui-monospace, monospace);
    font-size: 10px;
    letter-spacing: 0.02em;
    color: var(--twill, #6B7885);
    white-space: nowrap;
}

.promo-bar__dismiss {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    margin: 0 -6px 0 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--twill, #6B7885);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}
.promo-bar__dismiss:hover {
    background: rgba(16, 24, 32, 0.08);
    color: var(--board, #101820);
}
/* With a dismiss present the label no longer holds the edge on its own. */
.promo-bar__meta + .promo-bar__dismiss { margin-left: 4px; }

@media (max-width: 720px) {
    .promo-bar { margin-top: 12px; }
    .promo-bar__plate { gap: 12px 16px; padding: 13px 14px 14px; }
    .promo-bar__lead { font-size: 18px; }
    .promo-bar__note { font-size: 12px; }
    .promo-bar__body { flex: 1 1 100%; }
    .promo-bar .promo-bar__cta {
        display: inline-flex;
        align-items: center;
        min-height: 38px;
    }
    /* The label is the first thing worth dropping when the row has to stack. */
    .promo-bar__meta { display: none; }
}
