/* Profile, My matches, Standings and Match details in the home page's scoreboard style.
   Builds on home.css (load it first): these pages wrap their content in .fx-home and reuse its
   hero, cards, boards and pills; only what home has no use for lives here. */

/* Hero on an inner page: a breadcrumb trail, a title, and room for the cards to overlap it. */
.fx-hero--page { padding: 22px 0 96px; }
.fx-hero--page h1 { margin-top: 12px; font-size: clamp(36px, 5vw, 60px); }
.fx-crumbs { display: flex; flex-wrap: wrap; gap: 4px 10px; list-style: none; margin: 0 0 22px; padding: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-stretch: 85%; color: rgba(255, 255, 255, .6); }
.fx-crumbs li + li::before { content: "/"; margin-right: 10px; color: rgba(255, 255, 255, .4); }
.fx-crumbs a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.fx-crumbs a:hover { color: #fff; text-decoration: underline; }
.fx-crumbs [aria-current] { color: #fff; }
.fx-hero-sub { margin: 10px 0 0; color: rgba(255, 255, 255, .8); font-size: 18px; }
.fx-hero h1 .fx-hero-sub { font-size: clamp(18px, 2vw, 22px); font-weight: 600; font-stretch: 100%; letter-spacing: 0; line-height: 1.3; }
.fx-hero .fx-actions { margin-top: 24px; }

/* Email and phone, each on one line beside its icon. */
.fx-contact-list { border: 0; background: none; }
.fx-contact-list li { display: flex; gap: 8px; align-items: baseline; }
.fx-contact-list a { overflow-wrap: anywhere; min-width: 0; }

/* Big numbers in the hero: a record, a place in the standings. */
.fx-statbar { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); border-radius: 20px; overflow: hidden; }
.fx-statbar li { flex: 1 1 0; padding: 18px 26px; text-align: center; min-width: 96px; }
.fx-statbar li + li { border-left: 1px solid rgba(255, 255, 255, .16); }
.fx-statbar strong { display: block; font-size: 40px; font-weight: 800; font-stretch: 115%; line-height: 1.05; letter-spacing: -.03em; white-space: nowrap; }
.fx-statbar li:first-child strong { color: var(--fx-lime); }
.fx-statbar span { font-size: 14px; color: rgba(255, 255, 255, .75); white-space: nowrap; }

/* Main column and sidebar, pulled up over the hero like the home dashboard. */
.fx-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: -64px; position: relative; }
.fx-layout--flush { margin-top: 28px; }
.fx-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.fx-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.fx-stack { display: flex; flex-direction: column; gap: 24px; margin-top: -64px; position: relative; }
.fx-card-title--sm { font-size: 22px; }
.fx-card .alert { margin: 16px 0 0; }

/* Won / Lost / unfinished, beside a result. */
.fx-result { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; background: var(--fx-soft); color: #3b4556; }
.fx-result.is-win { background: var(--fx-lime); color: var(--fx-navy); }
.fx-result.is-loss { background: #fde3df; color: #8a1c12; }
.fx-result--letter { width: 26px; padding: 0; font-size: 13px; letter-spacing: 0; }
.fx-board-foot { display: block; margin-top: 6px; font-size: 13px; color: var(--fx-muted); overflow-wrap: anywhere; }

/* A list of rows: leagues, results, meetings. */
.fx-rows { list-style: none; margin: 12px 0 0; padding: 0; }
.fx-rows > li { border-top: 1px solid var(--fx-soft); }
.fx-row { display: flex; align-items: center; gap: 8px 14px; min-height: 56px; padding: 10px 4px; color: var(--fx-navy); text-decoration: none; }
a.fx-row:hover { background: var(--fx-paper); color: var(--fx-navy); }
a.fx-row:focus-visible { outline: 3px solid var(--fx-navy); outline-offset: -3px; border-radius: 8px; }
.fx-row-main { flex: 1 1 auto; min-width: 0; }
.fx-row-title { display: block; font-weight: 800; overflow-wrap: anywhere; }
.fx-row-sub { display: block; font-size: 14px; color: var(--fx-muted); overflow-wrap: anywhere; }
.fx-row-aside { flex: none; font-size: 14px; color: var(--fx-muted); text-align: right; }

/* A calendar leaf for the next match. */
.fx-date-tile { flex: none; display: inline-flex; flex-direction: column; align-items: center; min-width: 58px; padding: 6px 10px; border-radius: 14px; background: var(--fx-lime); color: var(--fx-navy); line-height: 1.1; font-weight: 800; }
.fx-date-tile small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.fx-date-tile b { font-size: 22px; font-stretch: 112%; }

/* Light chips on a white card. */
.fx-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; background: #f0efe6; color: var(--fx-navy); font-size: 13px; font-weight: 700; white-space: nowrap; }
.fx-chip--up { background: #e6eefb; }
.fx-chip--down { background: #fde3df; color: #8a1c12; }
.fx-chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.fx-label, .fx-home .fx-label { margin: 18px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-stretch: 85%; color: var(--fx-muted); }

/* Segmented filters: Mine / Everyone's, a skill-level group. */
.fx-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; background: #fff; border: 1px solid var(--fx-line); border-radius: 999px; padding: 4px; }
.fx-seg a, .fx-seg button { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--fx-muted); font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.fx-seg a:hover, .fx-seg button:hover { color: var(--fx-navy); }
.fx-seg .is-on, .fx-seg [aria-current="page"], .fx-seg [aria-pressed="true"] { background: var(--fx-navy); color: #fff; }
.fx-seg a:focus-visible, .fx-seg button:focus-visible { outline: 3px solid var(--fx-navy); outline-offset: 2px; }
.fx-hero .fx-seg { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); }
.fx-hero .fx-seg a, .fx-hero .fx-seg button { color: rgba(255, 255, 255, .8); }
.fx-hero .fx-seg .is-on, .fx-hero .fx-seg [aria-current="page"], .fx-hero .fx-seg [aria-pressed="true"] { background: var(--fx-lime); color: var(--fx-navy); }
.fx-hero .fx-seg a:focus-visible, .fx-hero .fx-seg button:focus-visible { outline-color: var(--fx-lime); }
.fx-select { min-height: 46px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background-color: rgba(255, 255, 255, .08); color: #fff; padding: 0 40px 0 18px; font-weight: 600; }
.fx-select:focus { border-color: var(--fx-lime); box-shadow: 0 0 0 .2rem rgba(216, 245, 60, .35); background-color: rgba(255, 255, 255, .12); color: #fff; }
.fx-select option { color: var(--fx-navy); }

/* Matches still to be played, as cards. */
.fx-todo-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 12px; }
.fx-todo { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--fx-line); border-radius: 16px; padding: 14px 16px; background: #fbfaf6; }
.fx-todo-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.fx-todo-who { font-weight: 800; font-size: 18px; overflow-wrap: anywhere; }
.fx-todo-who a { color: inherit; text-decoration: none; }
.fx-todo-who a:hover { text-decoration: underline; }
.fx-todo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.fx-due { flex: none; display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--fx-soft); color: #3b4556; }
.fx-due.is-late { background: #fde3df; color: #8a1c12; }
.fx-due.is-soon { background: var(--fx-lime); color: var(--fx-navy); }

/* Results grouped by league. */
.fx-result-group + .fx-result-group { margin-top: 26px; }
.fx-result-group-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding: 0 4px 6px; }
.fx-result-group-head h3 { font-size: 19px; }
.fx-result-group-head h3 a { color: inherit; text-decoration: none; }
.fx-result-group-head h3 a:hover { text-decoration: underline; }
.fx-result-row { display: grid; grid-template-columns: 104px 26px minmax(0, 1fr) 210px minmax(0, 1fr) 16px; align-items: center; gap: 6px 16px; }
.fx-result-row .fx-row-sub { font-size: 13px; }
.fx-set-row { display: inline-flex; gap: 4px; }
.fx-set-row .fx-set { width: 30px; height: 30px; font-size: 15px; }
.fx-players { font-weight: 700; overflow-wrap: anywhere; }
.fx-players .is-winner { font-weight: 800; }
.fx-players .fx-vs { font-weight: 500; color: var(--fx-muted); }

/* Standings. */
.fx-table-wrap { margin-top: 8px; overflow-x: auto; }
.fx-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fx-table th { padding: 10px 12px; border-bottom: 2px solid var(--fx-navy); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-stretch: 85%; color: var(--fx-muted); text-align: left; white-space: nowrap; }
.fx-table th button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.fx-table th button:focus-visible { outline: 3px solid var(--fx-navy); outline-offset: 2px; border-radius: 4px; }
.fx-table td { padding: 12px; border-bottom: 1px solid var(--fx-soft); vertical-align: middle; }
.fx-table .num { text-align: right; }
.fx-table tr.is-you td { background: #f4f9d6; }
.fx-rank { font-weight: 800; font-size: 18px; width: 40px; }
.fx-wl { font-weight: 800; font-size: 17px; white-space: nowrap; }
.fx-contact { display: inline-flex; gap: 6px; }
.fx-contact .fx-btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
.fx-place { background: var(--fx-navy); color: #fff; border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 24px 60px rgba(0, 0, 0, .22); }
.fx-place .fx-eyebrow { color: var(--fx-lime); }
.fx-place-big { font-weight: 900; font-stretch: 115%; font-size: 48px; line-height: 1.05; letter-spacing: -.03em; }
.fx-place-big small { font-size: 18px; font-weight: 600; color: rgba(255, 255, 255, .75); letter-spacing: 0; }
.fx-summary { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; margin-top: -64px; position: relative; }
.fx-summary > .fx-card { flex: 1 1 260px; }
.fx-summary > .fx-card + .fx-card { flex: 2 1 420px; }
.fx-empty { border-style: dashed; }

/* Match details: one big scoreboard. The page title is the small kicker above it. */
.fx-match .fx-hero--page { padding-bottom: 48px; }
.fx-hero h1.fx-kicker { margin: 0; font-size: 13px; line-height: 1.4; letter-spacing: .14em; font-stretch: 85%; }
.fx-scoreboard { max-width: 760px; margin-top: 24px; background: #fff; color: var(--fx-navy); border-radius: 24px; padding: 18px 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, .28); }
.fx-scoreboard table { width: 100%; border-collapse: collapse; }
.fx-scoreboard tr + tr td { border-top: 1px solid var(--fx-soft); }
.fx-scoreboard td { padding: 12px 0; vertical-align: middle; }
.fx-scoreboard .fx-board-dot { width: 26px; }
.fx-scoreboard .fx-dot { width: 14px; height: 14px; }
.fx-sb-name { font-size: 26px; font-weight: 600; overflow-wrap: anywhere; padding-right: 12px; }
.fx-sb-name a { color: inherit; text-decoration: none; }
.fx-sb-name a:hover { text-decoration: underline; }
.is-winner .fx-sb-name { font-weight: 800; }
.fx-sb-name .badge { vertical-align: middle; font-size: 13px; }
.fx-sb-sets { white-space: nowrap; text-align: right; }
.fx-scoreboard .fx-set { width: 54px; height: 58px; font-size: 30px; border-radius: 12px; margin-left: 6px; }
.fx-scoreboard .fx-set sup { font-size: 14px; }
.fx-sb-status { text-align: right; }
.fx-h2h { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; margin-top: 16px; font-weight: 700; }
.fx-h2h-big { font-size: 44px; font-weight: 900; font-stretch: 112%; line-height: 1; }
.fx-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; margin: 16px 0 0; }
.fx-details dt { color: var(--fx-muted); font-weight: 500; }
.fx-details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.fx-note { margin-top: 20px; background: var(--fx-paper); border-radius: 14px; padding: 14px 16px; white-space: pre-line; overflow-wrap: anywhere; }

/* Profile: rating and leagues in two columns under the results; compact rows in each. */
.fx-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; align-items: start; }
.fx-profile .profile-rating .fx-chart { height: 120px; margin-top: 10px; }
.fx-profile .profile-rating .fx-rating-num { font-size: 52px; }
.fx-profile .profile-leagues .fx-row-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.fx-profile .profile-leagues .fx-row { min-height: 0; padding: 8px 4px; }

/* Profile on a phone: the two columns flatten so the cards can be ordered by what a visitor
   wants first: how to reach this player, what's next, then results; settings last. */
@media (max-width: 991.98px) {
    .fx-profile .fx-layout { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
    .fx-profile .fx-main, .fx-profile .fx-side, .fx-profile .fx-pair { display: contents; }
    .fx-profile .profile-photo { order: 1; }
    .fx-profile .profile-main { order: 2; }
    .fx-profile .profile-upcoming { order: 3; }
    .fx-profile .profile-h2h { order: 4; }
    .fx-profile .profile-history { order: 5; }
    .fx-profile .profile-rating { order: 6; }
    .fx-profile .profile-leagues { order: 7; }
    .fx-profile .profile-passkeys { order: 8; }
}

@media (max-width: 767.98px) {
    .fx-hero--page { padding: 18px 0 84px; }
    .fx-statbar { width: 100%; }
    .fx-statbar li { padding: 14px 10px; }
    .fx-statbar strong { font-size: 30px; }
    .fx-result-row { grid-template-columns: 26px minmax(0, 1fr) auto; }
    .fx-result-row .fx-set-row { justify-content: flex-end; }
    .fx-result-row .fx-result-date, .fx-result-row .fx-result-where { grid-column: 2 / -1; }
    .fx-result-row .fx-result-date { order: 5; }
    .fx-result-row > .bi-chevron-right { display: none; }
    .fx-scoreboard { padding: 10px 16px; }
    .fx-sb-name { font-size: 19px; }
    .fx-scoreboard .fx-set { width: 38px; height: 42px; font-size: 21px; margin-left: 4px; }
    .fx-scoreboard .fx-set sup { font-size: 11px; }
    .fx-place-big { font-size: 40px; }
    .fx-hero .fx-seg { width: 100%; border-radius: 22px; }
}
