/* ==========================================================================
   KMR Talent Finder — bright, simple, made for people who don't work with data.
   Brand: pitch green + gold on a warm white page.
   Level colours: one-hue green ramp, B -> A+ gets darker (validated ordinal ramp,
   lightest step 2.03:1 on white). Skill bars: green = strong, grey = average,
   orange = needs work (green/orange validated for colour-blind readers, CVD ΔE 8.1),
   always shown together with the words "Strong / Average / Needs work".
   ========================================================================== */
:root {
  color-scheme: light;
  --page: #f6f7f3;
  --card: #ffffff;
  --soft: #eff3ef;
  --soft-2: #e3e9e4;
  --ink: #14201b;
  --ink-2: #46524c;
  --muted: #6b756f;
  --line: #e3e8e3;
  --line-strong: #cdd5cf;
  --shadow: 0 1px 2px rgba(20, 32, 27, .05), 0 6px 20px -10px rgba(20, 32, 27, .14);
  --shadow-pop: 0 18px 44px -14px rgba(20, 32, 27, .32);

  --brand: #0e6b4f;
  --brand-hover: #0b5a42;
  --brand-dark: #08402f;
  --brand-soft: #e7f3ed;
  --brand-soft-2: #d3eadf;
  --gold: #c9971c;       /* on dark green */
  --gold-ink: #a87a12;   /* on white (3.9:1) */
  --gold-soft: #fbf3dd;

  --lvl-aplus: #0d5c43;
  --lvl-a: #13795a;
  --lvl-bplus: #45a17f;
  --lvl-b: #7fc4a6;
  --lvl-nr: #e3e9e4;

  --strong: #13795a;
  --average: #cdd5cf;
  --weak: #eb6834;
  --weak-ink: #c2410c;
  --weak-soft: #fdeee6;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --star: var(--gold-ink);

  --radius: 18px;
  --radius-sm: 12px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 15.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; }
svg { flex-shrink: 0; }
:focus-visible { outline: 3px solid rgba(14, 107, 79, .45); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- top bar */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--brand-dark); color: #fff; box-shadow: 0 2px 12px -6px rgba(0, 0, 0, .35); }
.topbar-inner { max-width: 1320px; margin: 0 auto; padding: 0 24px; height: 70px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; background: var(--gold); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; font-size: 12.5px; letter-spacing: .02em; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name b { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.brand-name small { font-size: 12.5px; font-weight: 600; color: var(--gold); letter-spacing: .02em; }
.tabs { display: flex; gap: 6px; }
.tabs a { position: relative; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; font-weight: 650; font-size: 15px; color: rgba(255, 255, 255, .78); transition: background .15s, color .15s; }
.tabs a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.tabs a.active { color: var(--brand-dark); background: #fff; }
.tabs a.active svg { color: var(--brand); }
.nav-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--brand-dark); font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.nav-count:empty { display: none; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 13.5px; }
.data-stamp { color: rgba(255, 255, 255, .65); }

.page { max-width: 1320px; margin: 0 auto; padding: 30px 24px 80px; outline: none; }
.loading { padding: 96px 0; text-align: center; color: var(--muted); font-size: 17px; }

/* ---------------------------------------------------------------- headings & cards */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.025em; }
.page-head p { color: var(--ink-2); margin-top: 6px; font-size: 16.5px; max-width: 72ch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 24px 26px; }
.card-title { font-size: 19px; font-weight: 750; }
.card-help { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; }
.section { margin-top: 22px; }
.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--card); font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--soft); border-color: var(--ink-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-big { height: 52px; padding: 0 26px; font-size: 16px; }
.btn-text { border: 0; background: none; color: var(--brand); font-weight: 700; cursor: pointer; padding: 0; }
.btn-text:hover { text-decoration: underline; }
.btn-danger { color: var(--danger); border-color: #f1c4bf; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }

.star-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: #b9c2bc; }
.star-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.star-btn:hover { background: var(--gold-soft); color: var(--gold-ink); }
.star-btn[aria-pressed="true"] { color: var(--star); }
.star-btn[aria-pressed="true"] svg { fill: var(--gold); }
.btn .star-on { fill: var(--gold); stroke: var(--gold-ink); }

/* ---------------------------------------------------------------- level badge */
.level { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 30px; padding: 0 8px; border-radius: 9px; font-weight: 800; font-size: 14.5px; color: #fff; }
.level[data-level="A+"] { background: var(--lvl-aplus); }
.level[data-level="A"] { background: var(--lvl-a); }
.level[data-level="B+"] { background: var(--lvl-bplus); color: var(--ink); }
.level[data-level="B"] { background: var(--lvl-b); color: var(--ink); }
.level[data-level="NR"] { background: var(--lvl-nr); color: var(--ink-2); font-weight: 600; font-size: 12px; }
.level-lg { height: 48px; min-width: 60px; font-size: 23px; border-radius: 13px; }
.level-pill { display: inline-flex; align-items: center; gap: 10px; }
.level-pill strong { font-weight: 650; }

/* ---------------------------------------------------------------- form controls */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.input, select { height: 46px; width: 100%; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); outline: none; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
select { padding-right: 36px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2346524c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m3.5 5.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E") no-repeat right 13px center; }
.input:hover, select:hover { border-color: var(--ink-2); }
.input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft-2); }
.search-input { padding-left: 46px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236b756f' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='m18 18-4.3-4.3'/%3E%3C/svg%3E") no-repeat 15px center; }
.search-big { height: 56px; font-size: 17px; border-radius: 14px; padding-left: 50px; background-position: 17px center; }
.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; user-select: none; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }

/* on/off switch (a checkbox underneath) */
.switch { display: inline-flex; align-items: center; gap: 12px; font-weight: 650; cursor: pointer; user-select: none; min-height: 46px; }
.switch input { appearance: none; -webkit-appearance: none; position: relative; width: 48px; height: 28px; margin: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: background .15s; flex-shrink: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(20px); }

/* ---------------------------------------------------------------- players: filter panel */
.filter-panel { padding: 0; }
.filter-block { padding: 18px 22px; border-top: 1px solid var(--line); }
.filter-block:first-child { border-top: 0; }
.filter-label { display: block; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--card); font-weight: 650; font-size: 15px; color: var(--ink-2); cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .count { font-size: 12.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .count { background: rgba(255, 255, 255, .2); color: #fff; }

.level-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.level-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--card); cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; }
.level-card:hover { border-color: var(--brand); }
.level-card .level { grid-row: span 2; }
.level-card strong { font-weight: 750; font-size: 15px; color: var(--ink); }
.level-card .lc-desc { grid-column: 2 / 4; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.level-card .lc-count { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.level-card[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); }
.level-card[aria-pressed="true"] .lc-count { color: var(--brand-dark); }

.more-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 14px 16px; align-items: end; }

/* ---------------------------------------------------------------- results bar */
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; margin: 26px 2px 12px; flex-wrap: wrap; }
.results-bar h2 { font-size: 21px; font-weight: 800; }
.results-left { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.active-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.active-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 12px; border-radius: 999px; border: 0; background: var(--brand-soft); color: var(--brand-dark); font-weight: 650; font-size: 13.5px; cursor: pointer; }
.active-chip:hover { background: var(--brand-soft-2); }
.active-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.sort-field { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink-2); font-size: 14.5px; }
.sort-field select { width: auto; min-width: 210px; }
.rating-help { display: flex; gap: 10px; align-items: flex-start; margin: 0 2px 12px; color: var(--ink-2); font-size: 14px; }
.rating-help svg { width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; }
.results-bar .hint { color: var(--muted); font-size: 13.5px; }

/* ---------------------------------------------------------------- table */
.table-wrap { overflow-x: auto; }
table.players { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
table.players th { position: sticky; top: 0; z-index: 1; background: var(--soft); text-align: left; padding: 13px 12px; font-size: 13px; font-weight: 750; color: var(--ink-2); white-space: nowrap; border-bottom: 1px solid var(--line); }
table.players th:first-child { border-top-left-radius: var(--radius); }
table.players th:last-child { border-top-right-radius: var(--radius); }
table.players th.sortable { cursor: pointer; user-select: none; }
table.players th.sortable:hover { color: var(--brand-dark); }
table.players th[aria-sort] { color: var(--brand-dark); }
table.players th .arrow { display: inline-block; width: 12px; margin-left: 4px; color: var(--brand); }
table.players td { padding: 13px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
table.players tbody tr:last-child td { border-bottom: 0; }
table.players tbody tr { cursor: pointer; transition: background .1s; }
table.players tbody tr:hover { background: #f3f9f5; }
table.players tbody tr:hover .row-go { color: var(--brand); transform: translateX(2px); }
table.players .r { text-align: right; font-variant-numeric: tabular-nums; }
.row-go { display: inline-block; color: var(--line-strong); font-size: 22px; line-height: 1; transition: transform .1s, color .1s; }
.name-cell strong { display: block; font-weight: 750; font-size: 15.5px; }
.name-cell small, .club-cell small { display: block; color: var(--muted); font-size: 13px; }
.club-cell { display: flex; align-items: center; gap: 10px; }
.rating-cell { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.rating-bar { width: 72px; height: 9px; background: var(--soft-2); border-radius: 5px; overflow: hidden; }
.rating-bar i { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.rating-num { font-weight: 800; min-width: 26px; text-align: right; font-variant-numeric: tabular-nums; }
.contract-soon { color: var(--weak-ink); font-weight: 700; }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); font-size: 16px; }
.empty strong { display: block; color: var(--ink); font-size: 19px; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }

/* phone: a list of cards instead of the wide table */
.player-cards { display: none; list-style: none; margin: 0; padding: 0; }
.pcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 8px 14px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pcard:last-child { border-bottom: 0; }
.pcard:active { background: #f3f9f5; }
.pcard-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pcard-main strong { font-weight: 750; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-main small { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; }
.pcard-main small span { overflow: hidden; text-overflow: ellipsis; }
.pcard-rating { font-size: 22px; font-weight: 800; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; color: var(--brand-dark); }
.pcard-rating small { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* ---------------------------------------------------------------- pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 20px; border-top: 1px solid var(--line); }
.pager-info { color: var(--ink-2); font-size: 14.5px; }
.pager-info b { color: var(--ink); }
.pager-pages { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.page-btn { min-width: 42px; height: 42px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: 11px; background: var(--card); font-weight: 700; cursor: pointer; color: var(--ink-2); }
.page-btn:hover:not(:disabled) { background: var(--soft); color: var(--ink); }
.page-btn[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: default; }
.page-gap { padding: 0 4px; color: var(--muted); }
.pager-size { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14.5px; }
.pager-size select { width: auto; height: 42px; }

/* ---------------------------------------------------------------- profile */
.back { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 10px; margin-bottom: 16px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line-strong); color: var(--ink-2); font-weight: 700; font-size: 14.5px; }
.back:hover { color: var(--brand-dark); border-color: var(--brand); }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fact { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 14px; font-weight: 600; }
.fact-blue, .fact-brand { background: var(--brand-soft); color: var(--brand-dark); }
.fact-warn { background: var(--weak-soft); color: var(--weak-ink); }
.in-short { margin-top: 18px; display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--page); border: 1px solid var(--line); }
.in-short p { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.in-short p b { white-space: nowrap; }
.in-short .ico { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.in-short .ico svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.stats-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: 18px 26px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat span { display: block; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.stat strong { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; margin-top: 2px; }

.skill-list { display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.skill { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; }
.skill-name { font-weight: 700; }
.skill-desc { grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); margin-top: -2px; }
.skill-score { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.skill-score small { color: var(--muted); font-weight: 500; }
.skill-track { grid-column: 1 / -1; height: 11px; border-radius: 6px; background: var(--soft-2); overflow: hidden; }
.skill-track i { display: block; height: 100%; border-radius: 6px; }
.v-strong { background: var(--strong); }
.v-average { background: var(--average); }
.v-weak { background: var(--weak); }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12.5px; font-weight: 750; margin-left: 8px; vertical-align: 2px; white-space: nowrap; }
.tag-strong { background: var(--brand-soft); color: var(--brand-dark); }
.tag-average { background: var(--soft-2); color: var(--ink-2); }
.tag-weak { background: var(--weak-soft); color: var(--weak-ink); }
.skill-group + .skill-group { margin-top: 26px; }
.skill-group h3 { font-size: 14px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.info-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 22px; margin-top: 16px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 650; }
.notes { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--soft); white-space: pre-wrap; color: var(--ink-2); }
.similar { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.similar a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 12px; }
.similar a:hover { background: var(--soft); }
.similar strong { display: block; font-weight: 700; }
.similar small { display: block; color: var(--muted); font-size: 13px; }
.similar .match { font-size: 13px; color: var(--brand-dark); font-weight: 750; white-space: nowrap; background: var(--brand-soft); padding: 3px 9px; border-radius: 999px; }

table.simple { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 14px; }
table.simple th { text-align: left; font-size: 13px; font-weight: 750; color: var(--ink-2); padding: 11px 12px; background: var(--soft); white-space: nowrap; }
table.simple td { padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.simple .r { text-align: right; font-variant-numeric: tabular-nums; }
table.simple tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------------- charts page */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.axis-text { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.label-strong { fill: var(--ink); font-size: 13px; font-weight: 700; font-family: var(--font); }
.gridline { stroke: var(--line); stroke-width: 1; }
.baseline { stroke: var(--line-strong); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--ink-2); margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }
.pos-box { border: 1px solid var(--line); border-radius: 16px; padding: 16px 12px 10px; background: var(--card); }
.pos-box h3 { font-size: 16px; font-weight: 800; padding: 0 10px; }
.top-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.top-list a { display: grid; grid-template-columns: 22px auto minmax(0, 1fr) 92px; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 11px; }
.top-list a:hover { background: var(--soft); }
.top-list .n { color: var(--muted); font-size: 13px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.top-list strong { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-list small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- tooltip, toast, modal */
.tooltip { position: fixed; z-index: 100; pointer-events: none; min-width: 150px; max-width: 280px; padding: 10px 12px; background: #fff; border: 1px solid var(--line-strong); border-radius: 11px; box-shadow: var(--shadow-pop); font-size: 13px; }
.tooltip .tt-title { font-weight: 700; margin-bottom: 6px; }
.tooltip .tt-sub { color: var(--muted); font-size: 12.5px; margin: -4px 0 6px; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.tooltip .tt-row + .tt-row { margin-top: 3px; }
.tooltip .tt-key { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.tooltip .tt-key i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.tooltip .tt-key i.sq { width: 10px; height: 10px; border-radius: 3px; }
.tooltip .tt-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 110; padding: 13px 20px; border-radius: 13px; background: var(--brand-dark); color: #fff; font-weight: 600; box-shadow: var(--shadow-pop); }
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(8, 32, 24, .45); display: grid; place-items: center; padding: 16px; }
.modal { width: min(540px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; }
.modal h2 { font-size: 22px; }
.modal form { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.modal textarea { min-height: 110px; padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); resize: vertical; }
.modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------------------------------------------------------------- flags, club badges */
.with-icon { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.flag { width: 22px !important; height: 16px; line-height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(20, 32, 27, .12); background-size: cover; flex-shrink: 0; }
.club-badge { display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%; font-weight: 800; letter-spacing: .02em; line-height: 1; box-shadow: 0 0 0 1px rgba(20, 32, 27, .08); }
.club-logo { object-fit: contain; flex-shrink: 0; }
img.flag { display: inline-block; object-fit: cover; }
.league-logo { object-fit: contain; flex-shrink: 0; }
.league-small { gap: 5px !important; }
.face { position: relative; display: inline-grid; flex-shrink: 0; border-radius: 50%; }
.face > img, .face-initials { width: 100%; height: 100%; border-radius: 50%; }
.face > img { object-fit: cover; object-position: top; background: #fff; box-shadow: 0 0 0 1px rgba(20, 32, 27, .12); }
.face-initials { display: grid; place-items: center; font-weight: 800; letter-spacing: .02em; box-shadow: inset 0 0 0 1px rgba(20, 32, 27, .1); }
.face-level { position: absolute; right: -7px; bottom: -5px; line-height: 0; }
.face-level .level { min-width: 26px; height: 19px; padding: 0 4px; font-size: 11px; border-radius: 6px; box-shadow: 0 0 0 2px #fff; }
.player-cell { display: flex; align-items: center; gap: 12px; }
.pc-id { display: flex; align-items: flex-start; gap: 18px; }
.pc-id-text { min-width: 0; }
.sheet-who { display: flex; align-items: center; gap: 16px; }
.fact .flag, .fact .club-badge, .fact .club-logo { margin-right: 8px; }
.free-agent { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 700; color: var(--weak-ink); }
.pre { white-space: pre-wrap; }

/* ---------------------------------------------------------------- user menu (top bar) */
.user-menu { position: relative; }
.user-button { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px 0 5px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: #fff; font-weight: 650; cursor: pointer; }
.user-button:hover { background: rgba(255, 255, 255, .14); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--brand-dark); font-size: 12.5px; font-weight: 800; letter-spacing: .02em; flex-shrink: 0; }
.user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 230px; padding: 8px; border-radius: 14px; background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop); }
.user-panel-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-panel-head strong { display: block; font-weight: 750; }
.user-panel-head small { color: var(--muted); }
.user-panel a { display: block; padding: 10px 10px; border-radius: 9px; font-weight: 600; font-size: 15px; }
.user-panel a:hover { background: var(--soft); }

/* ---------------------------------------------------------------- player page */
.box-label { display: block; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.player-card { padding: 28px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px 28px; align-items: start; }
.player-card.no-facts { grid-template-columns: minmax(0, 1fr); }
.pc-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pc-id h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 4px; overflow-wrap: anywhere; }
.club-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; font-weight: 650; color: var(--ink-2); }
.position-line { font-size: 17px; font-weight: 600; }
.who-line { color: var(--ink-2); margin-top: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.level-box { padding: 16px 18px; border-radius: 16px; background: var(--brand-soft); }
.level-row { display: flex; align-items: center; gap: 14px; }
.level-row strong { display: block; font-size: 19px; font-weight: 800; }
.level-row > div > span { display: block; color: var(--ink-2); }
.rating-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; color: var(--ink-2); }
.rating-big { font-size: 32px; font-weight: 800; color: var(--brand-dark); letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; }
.rating-big small { font-size: 15px; font-weight: 700; color: var(--brand); letter-spacing: 0; }
.role-line { margin-top: 10px; font-weight: 600; }
.own-level { margin-top: 6px; font-size: 14px; }
.scouts-strip { min-height: 112px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); }
.scouts-strip.is-empty { border-left-color: var(--line-strong); }
.strip-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 650; }
.strip-line .tag { margin-left: 0; }
.grade-line { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 10px; }
.grade-line .grade-cell b { display: block; font-size: 13px; }
.grade-line .grade-cell small { display: block; max-width: none; }
.strip-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-save.is-saved { border-color: var(--gold); background: var(--gold-soft); color: var(--brand-dark); }
.btn-save.is-saved:hover { background: #f6e9c4; }
.also-on { flex-basis: 100%; font-size: 14px; }
.pc-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.key-facts { padding: 18px 20px; border-radius: 14px; background: var(--soft); }
/* where he plays: a vertical pitch, main position pulsing */
.pitch-box { margin: 0; padding: 16px 18px; border-radius: 14px; background: var(--soft); }
.pitch { display: block; width: 100%; max-width: 230px; height: auto; margin: 4px auto 12px; border-radius: 6px; }
.pitch-grass { fill: #2f8a5d; }
.pitch-stripe { fill: #348f62; }
.pitch-line { stroke: rgba(255, 255, 255, .75); stroke-width: .45; }
.pitch-spot { fill: rgba(255, 255, 255, .8); }
.spot-other { fill: rgba(255, 255, 255, .2); stroke: rgba(255, 255, 255, .6); stroke-width: .4; }
.spot-dot { fill: #fff; stroke: var(--brand-dark); stroke-width: .6; }
.spot-main .spot-dot { fill: var(--gold); stroke: #fff; stroke-width: .8; }
.spot-num { font: 800 3.1px var(--font); fill: var(--brand-dark); }
.spot-main .spot-num { font-size: 3.6px; }
.pulse { fill: var(--gold); transform-box: fill-box; transform-origin: center; animation: pitch-pulse 1.8s ease-out infinite;
  pointer-events: none; }  /* the growing ring must not catch the mouse over a neighbouring spot */
.pulse-soft { fill: #fff; animation-duration: 2.4s; }
@keyframes pitch-pulse { 0% { transform: scale(1); opacity: .75; } 100% { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; opacity: 0; } }
.pitch-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.pitch-legend li { display: flex; align-items: center; gap: 9px; color: var(--ink-2); }
.pitch-legend b { color: var(--ink); font-weight: 650; }
.legend-num { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 11.5px; font-weight: 800;
  background: #fff; color: var(--brand-dark); box-shadow: inset 0 0 0 1.5px var(--brand-dark); }
.pitch-legend .is-main .legend-num { background: var(--gold); box-shadow: none; }
.pitch-note { display: flex; align-items: center; gap: 9px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.legend-other { width: 14px; height: 14px; margin: 0 3px; border-radius: 50%; flex-shrink: 0; background: #59a17d; box-shadow: inset 0 0 0 1.5px #acd0be; }  /* a pale spot as it looks on the grass */
.sheet-club { display: flex; align-items: center; gap: 8px; }
.sheet-club-text { flex: 1; min-width: 0; }
.sheet-cols .pitch-box { margin-top: 18px; max-width: 320px; }
.key-facts .info-list { margin-top: 4px; gap: 9px 18px; }
.passports { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.pc-nums { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--line); }
.pc-nums .box-label { margin-bottom: 4px; }
.stats-row.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 0; }
.stats-4 .stat { padding: 6px 20px 2px 0; border-right: 0 !important; border-bottom: 0 !important; }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.tally { margin-top: 12px; font-weight: 700; }
.report-cards-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.report-card { padding: 16px; border-radius: 14px; border: 1px solid var(--line); }
.rc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.rc-head .tag { margin-left: 0; }
.rc-excerpt { margin-top: 10px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rc-actions { display: flex; gap: 6px 22px; flex-wrap: wrap; margin-top: 8px; }
.rc-actions .btn-text { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
.skill-areas { margin-top: 8px; gap: 8px 40px; }
.skill-areas .skill-group { margin-top: 18px; }
.skill-areas .skill-group + .skill-group { margin-top: 18px; }
.in-short .box-label { margin-bottom: 2px; }
.similar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.similar-grid a { min-height: 56px; }
/* For the agent: clubs that would suit him, bonus targets for his next contract */
.tag-outline { background: none; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink-2); }
.fit-now { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
.fit-filter { max-width: 360px; margin-top: 14px; }
.fit-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fit-card { padding: 16px; border-radius: 14px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.fit-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.fit-name strong { display: block; font-size: 16.5px; font-weight: 750; }
.fit-league { gap: 6px; color: var(--muted); font-size: 13.5px; }
.fit-head .tag { margin-left: 0; }
.fit-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.fit-facts .fact { height: 28px; font-size: 13px; }
.fit-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.fit-line { display: flex; gap: 9px; align-items: flex-start; font-size: 14.5px; }
.fit-warn { color: var(--weak-ink); }
.fit-ico { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; background: var(--strong); }
.fit-warn .fit-ico { background: var(--weak); }
.fit-ico svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fit-more { margin-top: 14px; }
.fit-note { margin-top: 14px; font-size: 13.5px; }
.bonus-basis { margin-top: 10px; font-size: 14px; }
.bonus-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bonus { padding: 16px; border-radius: 14px; background: var(--page); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.bonus .box-label { margin-bottom: 0; }
.bonus .tag { margin-left: 0; }
.bonus-ask { color: var(--ink-2); font-size: 14.5px; }
.bonus-ask strong { display: block; font-size: 26px; line-height: 1.2; font-weight: 800; color: var(--brand-dark); }
.bonus-stretch { font-size: 14.5px; font-weight: 650; }
.bonus-stretch small { display: block; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.bonus-evidence { color: var(--muted); font-size: 13.5px; }
.bonus-note { color: var(--ink-2); font-size: 13.5px; }
.bonus-note.is-raised { color: var(--weak-ink); }
.bonus-tips { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.bonus-tips li { display: flex; gap: 9px; align-items: flex-start; color: var(--ink-2); font-size: 14px; }
.bonus-tips svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.how-to-read { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line-strong); color: var(--ink-2); font-size: 13.5px; }
.how-to-read h3 { font-size: 14px; font-weight: 800; color: var(--ink-2); margin-bottom: 8px; }
.how-to-read > div { columns: 2; column-gap: 40px; }
.how-to-read p { break-inside: avoid; margin-bottom: 6px; }
.pdf-choices { display: flex; flex-direction: column; gap: 10px; }
.pdf-choice { display: block; width: 100%; text-align: left; padding: 16px 18px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--card); cursor: pointer; }
.pdf-choice:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); }
.pdf-choice:disabled { opacity: .6; cursor: default; }
.pdf-choice strong { display: block; font-size: 17px; font-weight: 750; }
.pdf-choice small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 14px; }
.modal-wide { width: min(760px, 100%); }

/* ---------------------------------------------------------------- my list: whose list + sharing */
.list-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.share-line { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 16px; }
.share-line p { color: var(--ink-2); }
.share-list { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; padding: 4px 0; }
.share-list .check { padding: 8px 4px; }
.share-all { padding: 12px 14px; border-radius: 12px; background: var(--soft); }

/* ---------------------------------------------------------------- account and team pages */
.form-stack { display: flex; flex-direction: column; gap: 14px; max-width: 460px; margin-top: 16px; }
.team-table td, .team-table th { white-space: nowrap; }
.team-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.team-actions .btn { height: 38px; padding: 0 12px; font-size: 14px; }
.badge-role { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12.5px; font-weight: 750; background: var(--gold-soft); color: var(--brand-dark); }
.badge-off { background: var(--soft-2); color: var(--ink-2); }
.notice { padding: 14px 18px; border-radius: 13px; background: var(--brand-soft); color: var(--brand-dark); margin-bottom: 16px; }

/* ---------------------------------------------------------------- reports list */
.filters { padding: 20px 22px; display: grid; gap: 14px 16px; align-items: end; }
.filters-reports { grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(150px, 1fr)) auto; }
.written-by { display: flex; align-items: center; min-height: 46px; font-weight: 650; }
.grade { display: inline-grid; place-items: center; min-width: 34px; height: 32px; padding: 0 7px; border-radius: 9px;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; }
.grade-pot { background: var(--gold-soft); color: var(--brand-dark); box-shadow: inset 0 0 0 1.5px var(--gold); }
.grade-pair { display: inline-flex; gap: 5px; }
.grade-cell { display: inline-flex; align-items: center; gap: 8px; }
.grade-cell small { color: var(--muted); font-size: 12.5px; max-width: 150px; white-space: normal; line-height: 1.25; }
.report-mini-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.report-mini-list a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 12px; border-radius: 12px; }
.report-mini-list a:hover { background: var(--soft); }
.report-mini-list strong { display: block; font-weight: 700; }
.report-mini-list small { display: block; color: var(--muted); font-size: 13px; }
.report-cards { display: none; list-style: none; margin: 0; padding: 0; }
.rcard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.rcard:last-child { border-bottom: 0; }
.rcard strong { display: block; font-size: 16px; font-weight: 750; }
.rcard small { display: block; color: var(--ink-2); font-size: 13.5px; }
.rcard .tag { margin-left: 0; }
.rcard-grades { display: flex; gap: 10px; }
.rcard-grades > span { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rcard-grades small { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------------------------------------------------------------- report form: steps */
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; list-style: none; padding: 0; }
.step { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--card); cursor: pointer; text-align: left; color: var(--ink-2); transition: border-color .12s, background .12s; }
.step:hover { border-color: var(--brand); }
.step-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--soft-2); color: var(--ink-2); font-weight: 800; font-size: 15px; }
.step-num svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.step-text { min-width: 0; line-height: 1.25; }
.step-text strong { display: block; font-weight: 750; font-size: 15px; color: var(--ink); }
.step-text small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step[aria-current="step"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); }
.step[aria-current="step"] .step-num { background: var(--brand); color: #fff; }
.step.done .step-num { background: var(--brand-soft-2); color: var(--brand-dark); }
.wizard-nav { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding: 14px 0 18px;
  background: linear-gradient(to top, var(--page) 75%, rgba(246, 247, 243, 0)); }
.wizard-nav .where { color: var(--muted); font-weight: 650; font-size: 14px; }
.wizard-nav .right { display: flex; gap: 10px; margin-left: auto; }
.checklist { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--soft); font-weight: 600; }
.checklist li .ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.checklist li .ico svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.checklist li.ok .ico { background: var(--strong); }
.checklist li.missing { background: var(--weak-soft); }
.checklist li.missing .ico { background: var(--weak); }
.checklist li .btn-text { margin-left: auto; }

.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.form-grid .field-wide { grid-column: span 2; }
.report-form textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); resize: vertical; outline: none; font: inherit; }
.report-form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft-2); }
.summary-input { margin-top: 14px; min-height: 220px; line-height: 1.6; font-size: 16px !important; }
.form-errors { margin-bottom: 16px; padding: 14px 18px; border-radius: 13px; background: var(--danger-soft); color: var(--danger); border: 1px solid #f1c4bf; }
.form-errors ul { margin: 6px 0 0; padding-left: 20px; }
.draft-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; background: var(--gold-soft); border-color: #f0dca6; }
.player-search { position: relative; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow-pop); max-height: 400px; overflow-y: auto; }
.search-results li { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; cursor: pointer; }
.search-results li[aria-selected="true"], .search-results li:hover { background: var(--brand-soft); }
.search-results .sr-meta { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results .empty { color: var(--muted); cursor: default; padding: 12px; font-size: 14.5px; }
.picked-player { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 16px 18px; border-radius: 14px; background: var(--brand-soft); border: 1.5px solid var(--brand-soft-2); }
.picked-player strong { display: block; font-size: 19px; font-weight: 800; }
.picked-player small { display: block; color: var(--ink-2); }
.picked-player .btn { margin-left: auto; height: 40px; }
.snapshot { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 10px; }

.attr-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.scale-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: var(--soft); font-size: 13.5px; color: var(--ink-2); }
.scale-legend b { color: var(--ink); }
.attr-section { margin-top: 24px; }
.attr-section h3 { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.attr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 128px; align-items: center; gap: 12px 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.attr-row:last-child { border-bottom: 0; }
.attr-label { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; flex-wrap: wrap; }
.scale-value { font-size: 13.5px; font-weight: 700; color: var(--brand-dark); }
.scale-value.empty-value { color: var(--muted); font-weight: 500; }
.data-hint { font-size: 12px; font-weight: 750; padding: 2px 9px; border-radius: 999px; cursor: help; }
.v-strong-soft { background: var(--brand-soft); color: var(--brand-dark); }
.v-average-soft { background: var(--soft-2); color: var(--ink-2); }
.v-weak-soft { background: var(--weak-soft); color: var(--weak-ink); }

.scale { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.scale button { min-width: 42px; height: 42px; border: 1.5px solid var(--line-strong); border-radius: 11px; background: var(--card); font-weight: 800; font-size: 15px; color: var(--ink-2); cursor: pointer; transition: background .1s, border-color .1s, color .1s; }
.scale button:hover { border-color: var(--brand); color: var(--brand-dark); }
.scale button[aria-checked="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.scale .scale-clear { color: var(--muted); }
.scale .scale-clear[aria-checked="true"] { background: var(--soft-2); border-color: var(--line-strong); color: var(--ink-2); }

.grades-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 16px; }
.grade-block { padding: 18px 20px; border-radius: 16px; background: var(--soft); }
.grade-block h3 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.grade-block .scale button { min-width: 48px; height: 48px; font-size: 17px; }
.grade-caption { margin-top: 12px; font-weight: 700; color: var(--brand-dark); min-height: 1.5em; }
.grade-caption.empty-value { color: var(--muted); font-weight: 500; }
.level-guide { margin-top: 14px; color: var(--ink-2); font-size: 14.5px; }
.level-guide summary { cursor: pointer; color: var(--brand); font-weight: 700; }
.level-guide ul { margin: 8px 0 0; padding-left: 20px; }
.rec-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.rec { height: 48px; padding: 0 22px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--card); font-weight: 750; font-size: 15px; cursor: pointer; color: var(--ink-2); }
.rec:hover { border-color: var(--ink-2); }
.rec-strong[aria-checked="true"] { background: var(--strong); border-color: var(--strong); color: #fff; }
.rec-average[aria-checked="true"] { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.rec-weak[aria-checked="true"] { background: var(--weak-ink); border-color: var(--weak-ink); color: #fff; }

/* ---------------------------------------------------------------- report sheet (view + print) */
.report-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.report-toolbar .back { margin-bottom: 0; }
.report-sheet { padding: 34px 38px; }
.sheet-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 3px solid var(--brand); }
.sheet-brand { font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 6px; }
.sheet-head h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.025em; }
.sheet-head p { margin-top: 6px; }
.sheet-grades { display: flex; gap: 12px; }
.big-grade { display: flex; flex-direction: column; align-items: center; min-width: 155px; padding: 13px 16px; border-radius: 16px; background: var(--brand); color: #fff; text-align: center; }
.big-grade span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; opacity: .9; }
.big-grade strong { font-size: 42px; font-weight: 800; line-height: 1.1; }
.big-grade strong small { font-size: 16px; font-weight: 700; opacity: .85; }
.big-grade em { font-style: normal; font-size: 12.5px; font-weight: 600; max-width: 170px; }
.big-grade-pot { background: var(--gold-soft); color: var(--brand-dark); box-shadow: inset 0 0 0 2px var(--gold); }
.sheet-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.sheet-meta b { color: var(--ink); font-weight: 700; }
.sheet-section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.sheet-section h2 { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-dark); margin-bottom: 4px; }
.sheet-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.summary-text { margin-top: 10px; font-size: 16px; line-height: 1.7; }
.sheet-attrs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 36px; margin-top: 14px; }
.sheet-attr-group h3 { font-size: 13.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.sheet-attr { display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sheet-attr strong { text-align: right; font-variant-numeric: tabular-nums; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--soft-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.dots i.on { background: var(--brand); box-shadow: none; }
.sheet-foot { padding-top: 16px; font-size: 12.5px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .tabs a { padding: 0 13px; }
  .data-stamp { display: none; }
  .more-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more-filters .switch { grid-column: 1 / -1; }
  .level-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .topbar-inner { gap: 16px; }
  .tabs a { padding: 0 11px; white-space: nowrap; }
  .user-name { display: none; }
  .user-button { padding: 0 4px; }
  .bonus-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) and (min-width: 721px) {
  .tabs a svg { display: none; }
  .brand-name small { display: none; }
}
@media (max-width: 860px) {
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .fit-list, .bonus-list { grid-template-columns: minmax(0, 1fr); }
  .player-card { grid-template-columns: minmax(0, 1fr); }
  .grid-2-1 { grid-template-columns: minmax(0, 1fr); }
  .similar-grid { grid-template-columns: minmax(0, 1fr); }
  .grades-grid, .sheet-cols, .sheet-attrs { grid-template-columns: minmax(0, 1fr); }
  .filters-reports { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters-reports .field-search { grid-column: 1 / -1; }
  .report-sheet { padding: 24px 20px; }
  .attr-row { grid-template-columns: minmax(0, 1fr) auto; }
  .attr-row .scale-value { grid-column: 1 / -1; margin-top: -6px; }
}
/* Phones: navigation moves to a bar at the bottom of the screen, tables become lists. */
@media (max-width: 720px) {
  body { padding-bottom: 74px; font-size: 15px; }
  .fit-head { grid-template-columns: auto minmax(0, 1fr); }
  .fit-head .tag { grid-column: 2; justify-self: start; }  /* under the club name, so a long name never runs into it */
  .topbar-inner { padding: 0 16px; gap: 12px; height: 60px; }
  .brand-mark { width: 36px; height: 36px; font-size: 11.5px; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; gap: 0; height: 68px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 18px -10px rgba(20, 32, 27, .25); }
  .tabs a { flex: 1; flex-direction: column; justify-content: center; gap: 2px; height: 100%; padding: 0; border-radius: 12px; font-size: 12px; color: var(--muted); }
  .tabs a svg { width: 23px; height: 23px; }
  .tabs a:hover { background: none; color: var(--ink-2); }
  .tabs a.active { background: var(--brand-soft); color: var(--brand-dark); }
  .nav-count { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; font-size: 11px; }
  .page { padding: 20px 16px 40px; }
  .page-head h1 { font-size: 26px; }
  .page-head p { font-size: 15px; }
  .page-head > div:last-child:not(:first-child) { width: 100%; }
  .card-pad { padding: 18px; }
  .filter-block { padding: 16px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
  .chips.chips-wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .level-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .level-card { grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; padding: 10px 12px; }
  .level-card strong { font-size: 14.5px; line-height: 1.25; }
  .level-card .lc-count { grid-column: 2; font-size: 12.5px; }
  .level-card .lc-desc { display: none; }
  .hide-mobile { display: none !important; }
  .more-filters { grid-template-columns: minmax(0, 1fr); }
  .results-bar { margin-top: 22px; }
  .sort-field { width: 100%; }
  .sort-field select { flex: 1; min-width: 0; }
  .players-table { display: none; }
  .player-cards, .report-cards { display: block; }
  .reports-table { display: none; }
  .pager { justify-content: center; padding: 14px; }
  .pager-pages .page-num:not([aria-current="page"]) { display: none; }
  .pager-pages .page-gap { display: none; }
  .pager-size { display: none; }
  .player-card { padding: 18px; gap: 16px; }
  .pc-id h1 { font-size: 28px; }
  .pc-id { gap: 14px; }
  .pc-id > .face { width: 64px !important; height: 64px !important; }
  .sheet-who > .face { width: 56px !important; height: 56px !important; }
  .action-row .btn { flex: 1 1 140px; height: 48px; }
  .action-row .btn-save { flex-basis: 100%; height: 52px; }
  .action-row .btn:not(.btn-save) svg { display: none; }
  .stats-row.stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-4 .stat { border-bottom: 0 !important; border-right: 0 !important; padding: 8px 0; }
  .how-to-read > div { columns: 1; }
  .user-name { display: none; }
  .user-button { padding: 0 4px; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 14px 18px; }
  .stat:nth-child(3) { border-right: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .modal .row { grid-template-columns: minmax(0, 1fr); }
  .filters-reports { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; gap: 12px; }
  .filters-reports .field:last-child { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .field-wide { grid-column: auto; }
  .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .step { flex-direction: column; gap: 4px; padding: 8px 4px; text-align: center; }
  .step-text small { display: none; }
  .step-text strong { font-size: 12.5px; }
  .wizard-nav { bottom: 68px; }
  .wizard-nav .where { display: none; }
  .wizard-nav .btn { padding: 0 16px; }
  .attr-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .attr-row .scale { flex-wrap: nowrap; gap: 4px; }
  .attr-row .scale button { min-width: 0; width: calc((100vw - 32px - 36px - 28px) / 8); max-width: 42px; height: 42px; padding: 0; }
  .attr-row .scale-value { margin-top: -2px; }
  .grade-block .scale button { min-width: 0; width: calc((100vw - 32px - 36px - 40px - 30px) / 7); max-width: 48px; }
  .sheet-grades { width: 100%; }
  .big-grade { flex: 1; min-width: 0; }
  .brand-name small { display: none; }
}
@media print {
  @page { margin: 14mm; }
  body { background: #fff; padding: 0; }
  .topbar, .tabs, .filters, .star-btn, .no-print, .form-actions, .wizard-nav { display: none !important; }
  .card { box-shadow: none; }
  .page { padding: 0; max-width: none; }
  .report-sheet { border: 0; box-shadow: none; padding: 0; }
  .sheet-section, .sheet-attr-group { break-inside: avoid; }
  .sheet-section.sheet-cols { break-inside: auto; }  /* the player block with the pitch is tall: let it flow */
  .pitch-box, .info-list, .fit-card, .bonus { break-inside: avoid; }
  .fit-filter, .fit-more { display: none !important; }
  .big-grade, .dots i.on, .grade, .pitch, .pitch-box, .legend-num, .legend-other { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pulse { display: none; }
}
