/**
 * /hall-of-fame/{season}/gw{n} - one week, public.
 *
 * Standalone rather than an add-on to hall-of-fame.css: this page is landed on cold from a
 * link in a message, often on mobile data, and the archive stylesheet is ~700 lines of podium,
 * chart and board that none of it uses.
 *
 * The token block below is copied from .hof in hall-of-fame.css on purpose. The two pages are
 * meant to look like the same trophy cabinet, so if a colour changes there it should change
 * here - but the alternative was shipping the whole archive stylesheet to make one card match.
 *
 * Everything the page says lives on the card. The body gradient behind it (main.css) runs from
 * #CBDE85 down, and every ink here is built for a dark panel: on that lime the eyebrow measured
 * 1.1:1 and the heading 1.4:1, so the whole header was invisible. Nothing floats on the
 * gradient any more, and nothing new should - put it on a surface or give it its own panel.
 */

.hofw {
    --hofw-ink:      var(--grey100);      /* #F8F8F7 */
    --hofw-ink-2:    var(--grey300);      /* #CBCAC2 */
    --hofw-ink-3:    var(--grey400);      /* #B1B0A9 - 4.8:1 on --hofw-panel */
    --hofw-hero:     #2F2B25;             /* the card itself */
    --hofw-panel:    #443F37;             /* blocks inset on the card */
    --hofw-panel-2:  #38342D;
    --hofw-gold:     var(--yellow500);
    /* Right result, wrong score. green300, the same step the archive chart uses for a record
       bar - 7.2:1 on --hofw-panel, and not the gold that already means "exact" here. */
    --hofw-correct:  #CCDF86;

    max-width: 560px;
    margin: 0 auto;
    padding: 40px 16px 64px;
    font-family: "Montserrat", sans-serif;
    color: var(--hofw-ink);
}

/* Kills the browser's default margins without winning against the rules below. Written plain,
   `.hofw p` is specificity (0,1,1) and beats every (0,1,0) class in this file, so every margin
   set on a paragraph here was silently dropped - the stamp sat on the claim, the score on the
   name, and the boldest-call line on the last row it was meant to stand clear of. :where()
   contributes no specificity, so this lands at (0,1,0) and loses to anything later. */
.hofw :where(h1, h2, p) { margin: 0; }

/* main.css reserves a 48px top margin on every page for the fixed title bar. This page has
   no title bar - it is landed on cold from a shared link - so that would be a gap above the
   card with nothing in it. */
.hofw_body { margin-top: 0; }

.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;
}

/* ------------------------------------------------------------------ card --- */

/* Every card is the dark surface, not just records: that is what makes the header inside it
   readable (ink 13.2:1, ink-2 8.6:1, ink-3 6.5:1, gold 9.4:1). A record is told apart by the
   gold rule and the ribbon, which say so in words, rather than by being the only dark one.

   Capped below the 560px the page allows so it stays a comfortable portrait crop - this is
   the thing people screenshot. */
.hofw_card {
    position: relative;   /* the date sits in the corner of it */
    max-width: 520px;
    margin: 0 auto;
    background: var(--hofw-hero);
    border: 1px solid rgba(249, 208, 6, 0.18);
    border-radius: 20px;
    /* Tight at the top: the medal is the first thing and should sit near the edge rather than
       float in a band of its own. The bottom carries the footer's breathing room instead. */
    padding: 18px 20px 22px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

/* Centred straight above the heading, close enough to belong to it: the top of the card then
   reads down in one line - the season, the week, who won it, what they scored. */
.hofw_season {
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    color: var(--hofw-ink-2);
}

/* Dates the achievement, not the visit. Out of the flow in the card's corner, so it stamps the
   whole card rather than joining the heading stack - and so the head below stays centred on
   the card rather than on what is left of it. */
.hofw_date {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 11px;
    letter-spacing: 0.3px;
    color: var(--hofw-ink-3);
    white-space: nowrap;
}

.hofw_card.is_record {
    border-top: 4px solid var(--hofw-gold);
}

/* A shared week is a stack: the summary of it, then one full card per winner, each with its own
   share button between it and the next. The button row already carries the gap above it, so
   only the space under it needs adding. */
.hofw_share_row + .hofw_card { margin-top: 26px; }

/* The summary is the week, not a winner - no medal-to-footer stack to make room for, and no
   button under it, so it does not need the deep bottom padding the real cards do. */
.hofw_summary { padding-bottom: 18px; }

/* ------------------------------------------------------------------ head --- */

/**
 * main.css styles bare <header> and <footer> elements, for the page furniture the rest of the
 * site is built from: a 96px flex header with a 32px top margin, and a footer that is
 * absolutely positioned, 64px tall, painted --grey100 and set at line-height 64px.
 *
 * The card uses those two elements for what they mean, not for that styling, and a class
 * selector only wins the properties it actually declares - everything else was still landing.
 * That is where the 32px of dead air above the medal came from, and why the claim and the
 * stamp were grey on a white strip that had been pulled out of the card and was too short to
 * hold two lines.
 *
 * So both are reset here. Anything the card puts in a semantic element needs the same
 * treatment, or main.css will dress it as page furniture again.
 */
.hofw_head {
    display: block;
    width: auto;
    height: auto;
    margin-top: 0;
    text-align: center;
    margin-bottom: 16px;
}

.hofw_mark {
    font-size: 30px;
    line-height: 1;
    color: var(--hofw-gold);
}

.hofw_eyebrow {
    margin-top: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--hofw-ink-2);
}

/* "GW10 WINNER" - a caption on the stack it heads, not a banner. The name and the score under
   it are the thing worth looking at, so this stays small and lets them carry the weight. It is
   still the page's h1: what a heading means does not depend on how big it is set. */
.hofw_hero h1,
.hofw_list h1 {
    font-size: 12px;
    /* Explicit, and tight: a heading's default line box is built for a heading's size, and at
       12px it left the season and the name floating well clear of a caption. */
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--hofw-ink-2);
}

.hofw_list h1 { margin-bottom: 4px; }

/* ------------------------------------------------------- the winner, alone --- */

.hofw_hero,
.hofw_list {
    position: relative;
    background: var(--hofw-panel);
    border-radius: 14px;
    padding: 18px 16px 16px;
}

/* The ribbon owns a band of its own at the top of the block, which is what the extra padding
   buys: absolutely positioned, it could otherwise land on top of a long name. */
.hofw_hero.has_ribbon,
.hofw_list.has_ribbon { padding-top: 40px; }

.hofw_ribbon {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #3B2F00;
    background: var(--hofw-gold);
    border-radius: 999px;
    padding: 3px 12px;
}

.hofw_hero { text-align: center; }

.hofw_hero_name {
    margin-top: 2px;
    font-family: "Roboto Condensed", sans-serif;
    font-size: clamp(22px, 6vw, 26px);
    line-height: 1.2;
    color: var(--hofw-ink);
    word-break: break-word;
}

/* The boast. Proportional digits on purpose - tabular is for columns of numbers and looks
   loose at this size, same as .hof_kpi.is_hero on the archive page. */
.hofw_hero_pts {
    margin-top: 6px;
    font-size: clamp(56px, 16vw, 76px);
    line-height: 1;
    font-weight: 700;
    color: var(--hofw-gold);
}

/* "300" on its own means nothing to someone who has never seen this site. */
.hofw_hero_label {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--hofw-ink-3);
}

.hofw_hero .hofw_tags {
    justify-content: center;
    margin-top: 12px;
}

/* ------------------------------------------------------ the winners, shared --- */

.hofw_shared {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--hofw-ink-3);
    margin-bottom: 10px;
}

/* Two rows, never one: the name and what it scored, then the tags under them. Wrapping used to
   decide that per winner, so a list of nine came out with the tags beside some names and below
   the others depending on how long the names happened to be. */
.hofw_winner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--hofw-panel-2);
    border-radius: 10px;
    padding: 10px 14px;
}
.hofw_winner + .hofw_winner { margin-top: 8px; }

.hofw_winner_top {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.hofw_winner_name {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 18px;
    color: var(--hofw-ink);
    word-break: break-word;
}

.hofw_winner_pts {
    margin-left: auto;
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--hofw-ink);
}

/* ------------------------------------------------------------------ tags --- */

.hofw_tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.hofw_tag {
    font-size: 11px;
    line-height: 18px;
    color: var(--hofw-ink-2);
    background: rgba(248, 248, 247, 0.08);
    border-radius: 999px;
    padding: 1px 9px;
    white-space: nowrap;
}
.hofw_tag b { color: var(--hofw-ink); }

.hofw_tag_joker {
    color: var(--hofw-gold);
    background: rgba(249, 208, 6, 0.12);
}
.hofw_tag_joker i { margin-right: 5px; }

/* ---------------------------------------------------------- the card played --- */

/* Ten fixtures have to fit inside a card that is still worth screenshotting, so the rows
   borrow the predict page's mobile render (.mob_team in predictions.css): three-letter team
   codes, uppercase, and nothing else on the line. */

.hofw_picks { margin-top: 16px; }

.hofw_picks_head {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--hofw-ink-3);
    margin-bottom: 8px;
    word-break: break-word;
}

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

.hofw_pick {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 10px;
    background: var(--hofw-panel);
    border-radius: 8px;
    font-size: 13px;
    /**
     * The outcome colour, as a bar the whole block can be scanned down.
     *
     * A real border rather than `box-shadow: inset 3px 0 0` - which is what this was, and
     * which reads the same on the page. html2canvas draws no box-shadow at all, so the share
     * image lost every one of these bars, and they are how the table says what happened. The
     * 3px comes back out of the left padding, so the rows sit exactly where they did, and a
     * transparent border still occupies its 3px, so a missed row stays aligned with the rest.
     */
    border-left: 3px solid var(--outcome, transparent);
    padding: 6px 10px 6px 9px;
}
.hofw_pick + .hofw_pick { margin-top: 4px; }

.hofw_pick.is_exact   { --outcome: var(--hofw-gold); }
.hofw_pick.is_correct { --outcome: var(--hofw-correct); }
.hofw_pick.is_missed  { --outcome: transparent; color: var(--hofw-ink-3); }

/* The rarest call that came off - the line worth screenshotting, so it is the one that is
   lifted rather than left to be found. */
.hofw_pick.is_boldest {
    background: var(--hofw-panel-2);
    outline: 1px solid rgba(249, 208, 6, 0.35);
    outline-offset: -1px;
}

.hofw_pick_fix {
    font-family: "Roboto Condensed", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hofw_pick_fix b { font-weight: 700; }

.hofw_pick_res {
    margin: 0 5px;
    font-variant-numeric: tabular-nums;
    color: var(--hofw-ink-2);
}
.hofw_pick.is_missed .hofw_pick_res { color: var(--hofw-ink-3); }

.hofw_pick_pick {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.hofw_pick_pick i {
    margin-right: 4px;
    font-size: 11px;
    color: var(--hofw-gold);
}

.hofw_pick_out {
    min-width: 48px;
    text-align: right;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--outcome, var(--hofw-ink-3));
}

.hofw_pick_field {
    min-width: 46px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--hofw-ink-2);
}
.hofw_pick.is_missed .hofw_pick_field { color: var(--hofw-ink-3); }

/* Says out loud what the top row is, for a reader who has no idea a percentage there is
   remarkable. Set well clear of the last row - butted up against it, it read as another row
   rather than as a remark about them. */
.hofw_picks_foot {
    margin-top: 18px;
    font-size: 12px;
    line-height: 18px;
    color: var(--hofw-ink-2);
}
.hofw_picks_foot b { color: var(--hofw-ink); }

/* ----------------------------------------------------------- foot of the card --- */

/* The claim and the stamp are the last thing read and the thing a screenshot is cropped to, so
   they get room rather than being tucked against the edge: a clear gap above the rule, more
   again below it, and the two lines set apart from each other instead of sharing a baseline. */
/* The <footer> reset - see the note on .hofw_head above. Without the first five lines this is
   an absolutely positioned white bar, 64px tall, sitting outside the card. */
.hofw_card_foot {
    position: static;
    width: auto;
    height: auto;
    background-color: transparent;
    /* line-height is inherited, so 64px would reach the stamp, which sets no line-height. */
    line-height: 20px;
    font-size: 13px;

    margin-top: 24px;
    padding: 20px 0 0;
    border-top: 1px solid rgba(248, 248, 247, 0.10);
}

/* The sentence that makes the number mean something to someone who has never seen this site. */
.hofw_claim {
    font-size: 13px;
    line-height: 20px;
    color: var(--hofw-ink-2);
    text-wrap: balance;
}

/* So a cropped screenshot still says where it came from. */
.hofw_stamp {
    margin-top: 14px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--hofw-ink-3);
    white-space: nowrap;
}

/* ------------------------------------------------------------------ share --- */

/* Sits under the card, never in it - a button caught in a picture of the card would be the
   first thing anyone noticed. Ships hidden; share-image.js reveals it only where an image can
   actually be produced. */
.hofw_share_row {
    margin-top: 14px;
    text-align: center;
}

.hofw_share {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;              /* the touch target, whatever the text does */
    padding: 0 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--hofw-ink-2);
    background: rgba(47, 43, 37, 0.9);
    border: 1px solid rgba(248, 248, 247, 0.14);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.hofw_share:hover {
    background: var(--hofw-hero);
    color: var(--hofw-ink);
}

/* The `display` above beats the browser's own [hidden] rule, so the attribute has to be
   honoured explicitly. Without this the button shows through its own hidden state, which is how
   a button the script had given up on ended up on the page looking pressable. */
.hofw_share[hidden] { display: none; }

/* Rendering takes a moment on a phone, and the press has no other effect until it finishes. */
.hofw_share.is_busy {
    cursor: default;
    opacity: 0.75;
}
.hofw_share.is_busy span::after {
    content: '\2026';               /* "Share this card…" */
}

.hofw_share.is_failed {
    color: var(--hofw-ink);
    border-color: rgba(249, 208, 6, 0.5);
}
.hofw_share.is_failed span { font-size: 0; }
.hofw_share.is_failed span::after {
    content: 'Could not make the image';
    font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
    .hofw_share { transition: none; }
}

/* ------------------------------------------------------------------- cta --- */

.hofw_cta {
    margin-top: 20px;
    text-align: center;
}

/* Signed out there is copy either side of the button, and copy needs a surface. Signed in it
   is one gold pill, which carries its own background - no panel needed for that. */
.hofw_cta.is_panel {
    max-width: 520px;
    margin: 20px auto 0;
    background: var(--hofw-hero);
    border-radius: 16px;
    padding: 20px 18px;
}

.hofw_pitch {
    font-size: 15px;
    line-height: 22px;
    color: var(--hofw-ink);
    margin-bottom: 14px;
}

.hofw_button {
    display: inline-block;
    background: var(--hofw-gold);
    color: #3B2F00;
    font-size: 15px;
    font-weight: 700;
    border-radius: 999px;
    padding: 12px 28px;
}
.hofw_button:hover { color: #3B2F00; opacity: 0.9; }

.hofw_foot {
    margin-top: 12px;
    font-size: 12px;
    color: var(--hofw-ink-2);
}
.hofw_foot a {
    color: var(--hofw-ink-2);
    text-decoration: underline;
}
.hofw_foot a:hover { color: var(--hofw-ink); }

/* ----------------------------------------------------------------- small --- */

@media screen and (max-width: 480px) {
    .hofw { padding: 32px 12px 56px; }
    .hofw_card { padding: 20px 14px 20px; }
    .hofw_winner { padding: 10px; }
    .hofw_winner_pts { font-size: 20px; }

    /* The outcome word is the one column the colour bar already says. It goes first when the
       row runs out of width, rather than letting the fixture truncate. */
    .hofw_pick { grid-template-columns: 1fr auto auto; gap: 8px; font-size: 12px; }
    .hofw_pick_out { display: none; }
    .hofw_pick_field { min-width: 42px; }

    /* Still roomy, just not desktop-roomy - the card is the whole screen here. */
    .hofw_card_foot { margin-top: 20px; padding-top: 16px; }
}
