/* KFT Flat — Wada 344 (trial branch flat-344, not live).
   Loaded last on every page, so it re-dresses the instrument design system without touching it:
   flat planes instead of bevels, and Sanzo Wada's combination No. 344 for colour.
     Black #111314 · Cinnamon Buff #fdc57e · Deep Lyons Blue #1c4286 · Aconite Violet #a36aa5
   Dark: warm black, gold for the one main action. Light: cream, deep blue for the main action.
   Selected / on is blue in dark and black in light. Violet is KFT Pro's alone.
   Fixture difficulty, good/bad, the pitch and chart series keep their meaning.
   The character lives in motion (lib/kft-feel.js): keys squash and spring, the main key bulges like a net,
   switches roll a football across, tabs pass a ball along, loaders do keepy-uppies. */

:root,[data-theme=dark]{
  color-scheme:dark;
  --ground:#111314; --ground-2:#181a1c; --raised:#202225; --well:#0b0c0d; --well-edge:#0b0c0d;
  --ink:#f4efe6; --ink-2:#d8d1c4; --muted:#a59d8f; --faint:#8f887b; --hair:#ffffff10; --hair-2:#ffffff1d;
  --accent:#fdc57e; --accent-ink:#1a1206; --accent-soft:#fdc57e1c;
  --good:#5fd6a0; --bad:#ff7b86; --warn:#f59e5b; --info:#8eaee6;
  --key-top:#26282c; --key-mid:#26282c; --key-bot:#26282c; --key-edge:#26282c; --key-lip:#26282c; --key-skirt:transparent; --key-ink:#f4efe6;
  --acc-top:#fdc57e; --acc-mid:#fdc57e; --acc-bot:#fdc57e; --acc-edge:#fdc57e; --acc-lip:#fdc57e; --acc-skirt:transparent;
  --sel-top:#2d5bb0; --sel-mid:#2d5bb0; --sel-bot:#2d5bb0; --sel-edge:#2d5bb0; --sel-lip:#2d5bb0; --sel-skirt:transparent; --sel-glow:#0000; --sel-ink:#ffffff;
  --tray:#0b0c0d; --tray-edge:#0b0c0d; --led:#3a3d42; --led-on:#fdc57e;
  --metal-1:#ffffff; --metal-2:#f1ece4; --metal-3:#ffffff; --metal-4:#e6e0d6; --metal-rim:#00000026;
  --track:#2a2c30; --track-edge:#2a2c30;
  --shadow:0 18px 40px -24px #000e;
  --fdr1:#1d7a52;--fdr2:#2c9064;--fdr3:#4f5660;--fdr4:#b5503e;--fdr5:#9c2734;--fdr-ink:#f4f7fb;
  --pitch:#16302a; --pitch-line:#e8e0d02a;
  --skel:#1d1f22; --skel-hi:#2c2b28;
  --pro:#c18ac3; --pro-soft:#a36aa52b;
  --air-1:#fdc57e0d;--air-2:#1c428626;--air-3:#a36aa514;--air-4:#fdc57e0a;--air-p:#fdc57e10;
  --f-ease:cubic-bezier(.2,.9,.3,1); --f-spring:cubic-bezier(.3,1.6,.5,1);
}
[data-theme=light]{
  color-scheme:light;
  --ground:#f4ede1; --ground-2:#fbf6ee; --raised:#ffffff; --well:#ebe2d3; --well-edge:#ebe2d3;
  --ink:#111314; --ink-2:#34312c; --muted:#665f53; --faint:#6b6458; --hair:#1113141a; --hair-2:#11131426;
  --accent:#1c4286; --accent-ink:#ffffff; --accent-soft:#1c428617;
  --good:#0b6844; --bad:#a6221b; --warn:#8f4d00; --info:#1c4286;
  --key-top:#e9dfcd; --key-mid:#e9dfcd; --key-bot:#e9dfcd; --key-edge:#e9dfcd; --key-lip:#e9dfcd; --key-skirt:transparent; --key-ink:#111314;
  --acc-top:#1c4286; --acc-mid:#1c4286; --acc-bot:#1c4286; --acc-edge:#1c4286; --acc-lip:#1c4286; --acc-skirt:transparent;
  --sel-top:#111314; --sel-mid:#111314; --sel-bot:#111314; --sel-edge:#111314; --sel-lip:#111314; --sel-skirt:transparent; --sel-glow:#0000; --sel-ink:#f4ede1;
  --tray:#e9dfcd; --tray-edge:#e9dfcd; --led:#cbbfa9; --led-on:#1c4286;
  --metal-1:#ffffff; --metal-2:#fbf7f0; --metal-3:#ffffff; --metal-4:#f1ebe0; --metal-rim:#11131433;
  --track:#e3d8c5; --track-edge:#e3d8c5;
  --shadow:0 18px 40px -26px #3b2f1e66;
  --fdr1:#2c9a6e;--fdr2:#6cc196;--fdr3:#cfc6b6;--fdr4:#e69a7e;--fdr5:#d6584f;--fdr-ink:#111314;
  --pitch:#2f6a52; --pitch-line:#ffffff40;
  --skel:#e9dfcd; --skel-hi:#fffaf1;
  --pro:#7a4a7d; --pro-soft:#a36aa520;
  --air-1:#ffffff99;--air-2:#fdc57e1f;--air-3:#ffffff80;--air-4:#a36aa50f;--air-p:#ffffffa0;
}

/* ---------- keys: flat planes that squash when pressed and spring back ---------- */
.key{border-radius:10px;border:0;box-shadow:none!important;text-shadow:none!important;
  transition:transform .32s var(--f-spring),background-color .15s,color .15s,filter .15s,opacity .15s}
[data-theme=light] .key:not(.accent):not([aria-pressed=true]){box-shadow:none!important}
.key:hover{filter:none;background:color-mix(in oklab,var(--key-mid) 88%,var(--ink))}
.key:active,.key.is-down,.key.kf-press{transform:scale(.93);transition-duration:.08s}
.key.accent{background:var(--accent);color:var(--accent-ink);font-weight:800}
.key.accent:hover{background:color-mix(in oklab,var(--accent) 86%,#fff)}
[data-theme=light] .key.accent:hover{background:color-mix(in oklab,var(--accent) 86%,#000)}
.key[aria-pressed=true],.key.on{transform:none;background:var(--sel-mid);color:var(--sel-ink)}
.key.step{color:var(--accent);background:var(--key-mid);border:0}
[data-theme=light] .key.step{color:var(--ink);background:var(--key-mid);border:0}
.key.step:hover{background:color-mix(in oklab,var(--key-mid) 85%,var(--ink))}
.key:disabled{opacity:.4;transform:none}
.key.sm{border-radius:8px}.key.lg{border-radius:12px}
.key.icon{border-radius:10px}

/* the main key bulges like a net when it is hit (lib/kft-feel.js draws the mesh) */
.kf-net{position:absolute;inset:0;border-radius:inherit;pointer-events:none;overflow:hidden}
.kf-net::before{content:"";position:absolute;inset:-40%;
  background:repeating-linear-gradient(45deg,currentColor 0 1px,transparent 1px 7px),repeating-linear-gradient(-45deg,currentColor 0 1px,transparent 1px 7px);
  -webkit-mask:radial-gradient(circle at var(--x) var(--y),#000 0,#000 var(--r),transparent calc(var(--r) + 14px));
  mask:radial-gradient(circle at var(--x) var(--y),#000 0,#000 var(--r),transparent calc(var(--r) + 14px));
  opacity:.38;animation:kf-net .55s var(--f-ease) forwards}
@property --r{syntax:'<length>';inherits:true;initial-value:0px}
@keyframes kf-net{0%{--r:0px;opacity:.5}70%{opacity:.3}100%{--r:180px;opacity:0}}
.key.kf-hit{animation:kf-bulge .42s var(--f-spring)}
@keyframes kf-bulge{0%{transform:scale(.93)}45%{transform:scale(1.045)}100%{transform:scale(1)}}

/* ---------- selector bank: a flat track; the chosen option is a pill that slides between options ---------- */
.bank{background:var(--tray);border:0;box-shadow:none!important;border-radius:12px;position:relative;isolation:isolate}
.bank button{border:0;box-shadow:none;background:transparent;color:var(--ink-2);border-radius:9px;transition:transform .3s var(--f-spring),color .15s}
.bank button:hover{color:var(--ink)}
.bank button[aria-pressed=true]{transform:none;background:var(--sel-mid);color:var(--sel-ink);box-shadow:none}
/* the chosen option's own fill steps aside for the sliding pill (lib/kft-feel.js marks it .kf-on) */
.kf-slide{position:relative;isolation:isolate}
.kf-slide>.kf-on:not(#kf-x){background:transparent!important;box-shadow:none!important;border-color:transparent!important;color:var(--sel-ink)!important}
.bank button:active{transform:scale(.93)}
.kf-pill{position:absolute;z-index:-1;border-radius:9px;background:var(--sel-mid);pointer-events:none;
  transition:left .38s var(--f-spring),width .38s var(--f-spring),top .38s var(--f-spring),height .38s var(--f-spring)}

/* ---------- switches: the knob is a football that rolls across when the switch flips ---------- */
.toggle .slot{background:var(--track);border:0;box-shadow:none}
.toggle .slot i{border:0;box-shadow:0 1px 3px #0005;transition:left .42s var(--f-spring),transform .42s var(--f-ease);
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 6.6l3.2 2.3-1.2 3.8H8l-1.2-3.8z' fill='%23111314'/%3E%3Cpath d='M10 6.6V2.3M13.2 8.9l4-1.4M12 12.7l2.5 3.5M8 12.7l-2.5 3.5M6.8 8.9l-4-1.4' stroke='%23111314' stroke-width='1.1'/%3E%3Cpath d='M8.2 1.2 10 2.3l1.8-1.1M17.2 7.5l1.6 1.6-.3 2.2M14.5 16.2l-1 1.9-2.2.6M5.5 16.2l1 1.9 2.2.6M2.8 7.5 1.2 9.1l.3 2.2' fill='none' stroke='%23111314' stroke-width='1.1'/%3E%3C/svg%3E") center/100% no-repeat}
.toggle[aria-checked=true] .slot i,.toggle input:checked+.slot i{transform:rotate(360deg)}
.toggle:not(#themeToggle) .slot,.kft-scenario-toggle input{background:var(--track)!important;border-color:transparent!important;box-shadow:none!important}
.toggle:not(#themeToggle)[aria-checked=true] .slot,.toggle:not(#themeToggle) input:checked+.slot,.kft-scenario-toggle input:checked{background:var(--good)!important;border-color:transparent!important;box-shadow:none!important}
[data-theme=dark] .toggle:not(#themeToggle)[aria-checked=true] .slot,[data-theme=dark] .toggle:not(#themeToggle) input:checked+.slot{background:#2f9e6e!important}
/* the day/night switch, in the 344 colours: dark is a raised black track with a gold knob, light a sand track with a blue one */
#themeToggle .slot,#themeToggle[aria-checked=true] .slot{border:0;box-shadow:none}
#themeToggle .slot{background:var(--raised)}
#themeToggle[aria-checked=true] .slot{background:#e9dfcd}
#themeToggle .slot i{background:#fdc57e;box-shadow:none}
#themeToggle .slot i::after{background:#1a1206;filter:none;opacity:1}
#themeToggle[aria-checked=true] .slot i{background:#1c4286}
#themeToggle[aria-checked=true] .slot i::after{background:#fff}
#themeToggle .slot::after{color:#a59d8f;opacity:.7}
#themeToggle[aria-checked=true] .slot::before{color:#665f53;opacity:.8}

/* ---------- faders and dials: flat track, gold (or blue) fill, plain white thumb ---------- */
.fader::-webkit-slider-runnable-track{height:6px;border:0;box-shadow:none;background:linear-gradient(90deg,var(--accent) var(--v),var(--track) var(--v))}
.fader::-moz-range-track{height:6px;border:0;background:linear-gradient(90deg,var(--accent) var(--v),var(--track) var(--v))}
.fader::-webkit-slider-thumb{width:22px;height:22px;margin-top:-8px;border-radius:50%;border:0;background:#fff;box-shadow:0 1px 4px #0006;transition:transform .25s var(--f-spring)}
.fader::-moz-range-thumb{width:20px;height:20px;border-radius:50%;border:0;background:#fff;box-shadow:0 1px 4px #0006}
.fader:active::-webkit-slider-thumb{transform:scale(1.25);box-shadow:0 0 0 7px var(--accent-soft),0 1px 4px #0006}
[data-theme=light] .fader::-webkit-slider-thumb{box-shadow:0 1px 4px #0004}
.dial{border:0;background:var(--key-mid);box-shadow:none}
.dial::before{background:var(--raised);border:0}
.dial::after{background:var(--accent)}

/* ---------- fields, readouts, bars: flat ---------- */
.field{border:1px solid transparent;box-shadow:none;border-radius:10px;transition:border-color .15s,box-shadow .2s}
.field:focus-within{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
.readout{border:0;box-shadow:none;border-radius:14px;background:var(--ground-2)}
.fdr{box-shadow:none}
.bar{box-shadow:none}
.bar i{background:var(--accent)}
:focus-visible{outline-color:var(--accent)}

/* ---------- loaders ---------- */
/* skeletons: a warm floodlight passing over the pitch */
.skel::after,.sk-bar::after{background:linear-gradient(100deg,transparent 20%,var(--skel-hi) 50%,transparent 80%)}
/* the three loading lamps become a ball doing keepy-uppies */
.boot i{width:7px;height:7px;background:var(--accent)!important;box-shadow:none!important;animation:kf-keepy .9s cubic-bezier(.3,0,.6,1) infinite!important}
.boot i:nth-child(2){animation-delay:.15s!important}.boot i:nth-child(3){animation-delay:.3s!important}
@keyframes kf-keepy{0%,100%{transform:translateY(0) scale(1.25,.75)}12%{transform:translateY(0) scale(1)}50%{transform:translateY(-9px) scale(.95,1.05)}88%{transform:translateY(0) scale(1)}}

/* ---------- Pro is violet ---------- */
/* (no glow: Pro shows as the violet badge alone) */

/* ---------- the tab line: a ball passed from tab to tab (lib/kft-feel.js) ---------- */
.wtabs{position:relative}
.wtabs a[aria-current=page]::after{background:var(--accent)}
.wtabs.kf-pass a[aria-current=page]::after{opacity:0}
.kf-line{position:absolute;z-index:2;bottom:-1px;height:2px;border-radius:2px;background:var(--accent);pointer-events:none;
  transition:left .5s var(--f-spring),width .5s var(--f-spring)}
.kf-ball{position:absolute;right:-4px;top:-3px;width:8px;height:8px;border-radius:50%;background:var(--accent);opacity:0;transition:opacity .2s}
.kf-line.moving .kf-ball{opacity:1;animation:kf-roll .5s linear}
@keyframes kf-roll{0%{transform:translateY(0)}30%{transform:translateY(-5px)}60%{transform:translateY(0)}80%{transform:translateY(-2px)}100%{transform:translateY(0)}}

/* ---------- numbers that change pulse once in the accent (lib/kft-feel.js) ---------- */
.kf-tick{animation:kf-tick .6s var(--f-ease)}
@keyframes kf-tick{0%{color:var(--accent);transform:translateY(-3px)}100%{transform:none}}

/* ---------- the page fades up as it lands ---------- */
@keyframes kf-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* ---------- quieter: no glows, no hover gradients, no decorative lines ---------- */
.list>li:hover,.list>li:focus-visible,.cap:hover,.cap:focus-visible,.radar li>button:hover,.range li>button:hover{background:var(--accent-soft)}
.map-wrap,.cmp-chart,.pchart,.cl-scope,.pf-scope svg{background:var(--well)}
.progress-track{background:var(--track)}
.pf-rank b{background:none}
.ed{box-shadow:none}
.pc.sub-ok .pn{box-shadow:0 0 0 2px var(--good)}
.pc.drop-on .pn{box-shadow:0 0 0 3px var(--good)}
.led{animation:none!important;box-shadow:none!important}
/* the page head: the tab bar already names the page, so the small label above each heading goes; text keeps a reading width */
.vhead>div:not(.gwclock)>.label,.wview .label:has(+h1),.wview .label:has(+h2){display:none}
.vhead p{max-width:64ch}

/* ---------- landing: no scroll rail; the next-section key is a flat gold key whose arrow only moves on hover ---------- */
.rail,.cd-rail{display:none!important}
.cd-key{background:var(--accent);border:0;box-shadow:none;transition:translate .25s var(--f-ease),transform .32s var(--f-spring)}
.cd-next:hover .cd-key{box-shadow:none;background:color-mix(in oklab,var(--accent) 86%,#fff)}
.cd-next:active .cd-key{transform:scale(.9);box-shadow:none}
.cd-key::after{background:color-mix(in oklab,var(--accent-ink) 55%,transparent)}
.cd-txt{box-shadow:none;background:var(--raised);backdrop-filter:none;-webkit-backdrop-filter:none}
.cd-arr,.cta-arrow svg,.fn-go-a svg,.nav-go svg{animation:none!important}
.cd-next:hover .cd-arrs,.cta-main:hover .cta-arrow svg,.fn-go:hover .fn-go-a svg{translate:0 0;animation:kf-nudge .5s var(--f-ease)!important}
.cd-next.up:hover .cd-arrs{animation:none!important}
@keyframes kf-nudge{40%{transform:translate(0,3px)}}
.cta-main:hover .cta-arrow svg,.fn-go:hover .fn-go-a svg{animation-name:kf-nudge-x!important}
@keyframes kf-nudge-x{40%{transform:translateX(3px)}}
.cta-arrow,.fn-go-a{background:color-mix(in oklab,var(--accent-ink) 14%,transparent);box-shadow:none}
.fn-go,.fn-go:hover,.fn-go:active{box-shadow:none}
.fn-go::before{display:none}

/* the picker: a small bank beside the switches */
.cardpick{display:inline-flex;gap:2px;padding:3px}
.cardpick button{min-height:30px;padding:0 10px;font:700 12px Manrope;cursor:pointer}

@media (prefers-reduced-motion:reduce){
  .key,.bank button,.kf-pill,.toggle .slot i,.kf-line{transition:none!important}
  .kf-net,.kf-ball{display:none}
  .key.kf-hit,.kf-tick,.boot i{animation:none!important}
}

/* phones: the card picker takes its own full-width row under the switches */
@media (max-width:560px){
  .cardpick{grid-column:1/-1;justify-self:stretch;display:flex}
  .cardpick button{flex:1}
}

/* leftover glows on status lights; long paragraphs (notes, the about text, the footer) keep a reading width */
.pr-led,.status-chip::before{box-shadow:none!important}
.gws-note,.seo-in p,.seo-in li,.sitefoot-in .fine,.wview p{max-width:72ch}

/* sunken / bevelled boxes left from the instrument look: flat planes */
:is(.cl-ro,.cl-mark,.cl-scope,.pf-ro,.pf-bar,.pf-scope,.ledger,.snotes,.notice,.content-note,.plan-price,.lv-strip,.kft-scenario-preview,.kft-scenario-derived,.pr-clock-face,.kft-dialog-input,.kft-scenario-input-wrap),
[data-theme=light] :is(.cl-ro,.cl-scope,.pf-ro,.pf-bar,.pf-scope,.ledger,.notice,.content-note,.plan-price,.kft-scenario-preview,.kft-scenario-derived,.pr-clock-face),
#rotationFinder :is(.kft-rot-picks,.kft-rot-strip),html #restDays .kft-rest-controls,.wview .kft-dock-bar,.kft-dock-bar.ctl,.wview .kft-ticker-metric-switch{box-shadow:none!important;border-color:transparent!important}
:is(.pf-ro,.cl-ro,.ledger,.notice,.content-note,.plan-price){background:var(--ground-2)!important}

/* ---------- no coloured light behind the pages ---------- */
.air{display:none!important}

/* ---------- landing: no numbered chapter labels (js/chapters.js still reads their text for the section names) ---------- */
.sc-copy>.label,.studio-copy>.label,.fn-stage>.label{display:none!important}
/* landing, dark: gold only for the keys that take you in; the drawings and highlighted words use Lyons blue, lifted for black */
html[data-theme=dark]:has(#lnav){--accent:#8eaee6;--accent-ink:#0b1430;--accent-soft:#8eaee61f;--led-on:#8eaee6}
html[data-theme=dark]:has(#lnav) :is(.key.accent,.cd-key,.fn-go,.lnav .key.accent){--accent:#fdc57e;--accent-ink:#1a1206;--accent-soft:#fdc57e1c}

/* ---------- every slider: a plain flat knob ---------- */
html input[type=range]::-webkit-slider-thumb{-webkit-appearance:none!important;appearance:none!important;width:20px!important;height:20px!important;margin-top:-7px!important;border-radius:50%!important;border:2px solid #fff!important;
  background:var(--knob)!important;border-color:var(--knob-ring)!important;box-shadow:0 1px 3px #0005!important;transition:transform .25s var(--f-spring)}
html input[type=range]::-moz-range-thumb{width:18px!important;height:18px!important;border-radius:50%!important;border:2px solid #fff!important;
  background:var(--knob)!important;border-color:var(--knob-ring)!important;box-shadow:0 1px 3px #0005!important}
html input[type=range]:active::-webkit-slider-thumb{transform:scale(1.15)}

/* the same, inside the studio layer, so bars styled there (fixtures controls, editors) also hand over to the pill */
@layer kft-studio{
  html body .kf-slide:not(#kf-x){background:var(--tray)!important;border-color:transparent!important;box-shadow:none!important}
  html body .kf-slide>:is(button,a,[role=tab]):not(.kf-on):not(#kf-x){background:transparent!important;box-shadow:none!important;border-color:transparent!important;color:var(--ink-2)!important}
  html body .kf-slide>.kf-on:not(#kf-x){background:transparent!important;box-shadow:none!important;border-color:transparent!important;color:var(--sel-ink)!important}
}

/* every other button family (fixtures, projections, editors, team view) on the same flat key: a surface that reads
   in both themes, no gradient, no lip, no line under it */
html :is(.wview,#tickerFdrEditor,.kft-edits-panel,.kft-team-view,.pmain-doc) :is(.kft-btn,.kft-dock-item):not(.kft-cell):not(.kf-on){background:var(--key-mid)!important;border-color:transparent!important;box-shadow:none!important;transform:none;color:var(--key-ink)!important}
[data-theme=light] :is(.wview,#tickerFdrEditor,.kft-edits-panel,.kft-team-view,.pmain-doc) :is(.kft-btn,.kft-dock-item):not(.kft-cell):not(.kf-on):not([aria-pressed=true]):not(.active){box-shadow:inset 0 0 0 1px #11131422!important}
html :is(.wview,#tickerFdrEditor,.kft-edits-panel,.kft-team-view,.pmain-doc) :is(.kft-btn.active,.kft-dock-item[aria-pressed=true],.kft-btn[aria-pressed=true]):not(.kf-on){background:var(--sel-mid)!important;color:var(--sel-ink)!important}
html :is(.wview,#tickerFdrEditor,.kft-edits-panel) .kft-btn-primary{background:var(--accent)!important;color:var(--accent-ink)!important;box-shadow:none!important}
html :is(.wview,#tickerFdrEditor,.kft-edits-panel,.kft-team-view) :is(.kft-btn,.kft-dock-item):not(.kft-cell):active{transform:scale(.94)}
html :is(.wview,#tickerFdrEditor,.kft-edits-panel) :is(.kft-btn,.kft-dock-item):disabled{opacity:.45}

/* close keys on popovers and menus: the cross in the key's own ink, so it reads on the light theme's white keys */
html .key.kft-x,html .kft-layer-x{color:var(--key-ink)!important}

/* ---------- the planner's look pickers: one tidy line under the switches ---------- */
.cardopts{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;flex-basis:100%;align-self:start}
.cardopts-l{font:700 11px Manrope;letter-spacing:.04em;color:var(--muted)}
.cardopts .cardpick{align-self:center}
.cardopts .cardpick button{min-height:28px;padding:0 10px;font-size:12px}
@media (max-width:560px){.cardopts{grid-column:1/-1}.cardopts .cardpick{flex:1 1 auto;display:flex}.cardopts .cardpick button{flex:1}}
/* undo the earlier phone rule that stretched a lone picker across the row */
@media (max-width:560px){.cardopts>.cardpick{grid-column:auto}}


/* ---------- fixture congestion skeleton: club, then a strip of days with match blocks and rest bars ---------- */
.kft-skel-cal{display:grid;gap:8px;padding:12px}
.kft-skel-cal-row{display:grid;grid-template-columns:120px 1fr;align-items:center;gap:10px}
.kft-skel-cal-row .kft-skel-team{display:flex;align-items:center;gap:8px}
.kft-skel-cal-days{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:4px;align-items:center}
.kft-skel-cal-match{width:100%!important;height:22px!important;border-radius:6px}
.kft-skel-cal-rest{height:6px;border-radius:3px;background:var(--skel)}
@media (max-width:560px){.kft-skel-cal-row{grid-template-columns:70px 1fr}.kft-skel-cal-row .kft-skel-team .kft-skel-bar:last-child{display:none}}

/* ---------- page change (lib/kft-feel.js): the page blurs, the KFT badge rolls in, slows to the middle, does one
   keepy-uppy bounce and rolls off the other side; the new page's skeletons are already underneath ---------- */
.kf-fly{position:fixed;inset:0;z-index:500;pointer-events:none;background:color-mix(in oklab,var(--ground) 30%,transparent);
  -webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);animation:kf-veil 1.3s ease forwards}
@keyframes kf-veil{0%{opacity:0}14%,80%{opacity:1}100%{opacity:0}}
.kf-fly-x{position:absolute;left:0;top:calc(50vh - 32px);animation:kf-fly-x 1.3s forwards}
@keyframes kf-fly-x{
  0%{transform:translateX(-90px);animation-timing-function:cubic-bezier(.2,.7,.3,1)}
  42%{transform:translateX(calc(50vw - 32px));animation-timing-function:linear}
  62%{transform:translateX(calc(50vw - 26px));animation-timing-function:cubic-bezier(.6,0,.9,.6)}
  100%{transform:translateX(calc(100vw + 40px))}}
.kf-fly-y{display:block;animation:kf-fly-y 1.3s forwards}
@keyframes kf-fly-y{
  0%,40%{transform:none}
  44%{transform:scale(1.12,.86) translateY(4px);animation-timing-function:cubic-bezier(.2,.8,.4,1)}
  53%{transform:translateY(-46px) scale(.96,1.05);animation-timing-function:cubic-bezier(.6,0,.8,.4)}
  61%{transform:scale(1.08,.9) translateY(3px)}
  66%,100%{transform:none}}
.kf-fly img{display:block;width:64px;height:64px;border-radius:50%;box-shadow:0 6px 16px #0006;animation:kf-spin 1.3s forwards}
@keyframes kf-spin{
  0%{transform:rotate(-240deg);animation-timing-function:cubic-bezier(.2,.7,.3,1)}
  42%{transform:rotate(0deg)}
  62%{transform:rotate(0deg);animation-timing-function:cubic-bezier(.6,0,.9,.6)}
  100%{transform:rotate(420deg)}}
.kf-fly-shadow{position:absolute;left:10px;right:10px;top:68px;height:9px;border-radius:50%;background:#00000059;animation:kf-shadow 1.3s forwards}
@keyframes kf-shadow{0%,40%{transform:none;opacity:1}53%{transform:scale(.55);opacity:.4}61%,100%{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.kf-fly{display:none}}
@media (max-width:560px){
  .cardopts{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:6px 10px}
  .cardopts .cardpick{display:flex;width:100%}
}

/* ---------- the workspace tabs: the same tray and sliding pill as every other bar; no underline, no rule under the header ---------- */
.wtop{border-bottom:0}
.wtabs{align-items:center;align-self:center;height:auto;gap:2px;padding:4px;border-radius:12px;background:var(--tray);isolation:isolate}
.wtabs a{height:32px;padding:0 12px;border-radius:9px;color:var(--ink-2);z-index:1;transition:color .2s}
.wtabs a:hover{color:var(--ink)}
.wtabs a[aria-current=page]{color:var(--sel-ink);background:var(--sel-mid)}
.wtabs a[aria-current=page]::after,.wtabs.kf-pass a[aria-current=page]::after{display:none}
.wtabs.kf-pass a[aria-current=page]{background:transparent}
.kf-line{z-index:0;bottom:auto;border-radius:9px;background:var(--sel-mid);transition:left .5s var(--f-spring),width .5s var(--f-spring)}
.kf-ball{display:none}
.wtabs-edge.l{background:linear-gradient(90deg,var(--tray) 45%,transparent)}
.wtabs-edge.r{background:linear-gradient(270deg,var(--tray) 45%,transparent)}
@media (max-width:760px){
  .wtabs{margin:6px 0 8px;padding:4px;border-top:0}
  .wtabs a{height:30px;padding:0 10px}
}

/* ---------- on/off switches (Hide xPts, Hide EO and the rest): the knob is the KFT badge, and it rolls across ---------- */
.toggle:not(#themeToggle) .slot i{background:#fff!important;box-shadow:0 1px 3px #0004!important}

/* Laptop widths: nine tabs plus the search, edits counter, team and theme don't fit on one line (they need ~1480px),
   so the tabs take their own row under the brand instead of hiding behind a scroll arrow. */
@media (min-width:761px) and (max-width:1500px){
  .wtop{flex-wrap:wrap;height:auto;row-gap:0;padding-top:10px}
  .brand{order:1}.wtop-r{order:2}
  .wtabs{order:3;flex:1 1 100%;margin:8px 0 10px}
}

/* Phones: a key's label stays on one line ("Fixture congestion", "Undo hidden GW" were breaking in two). A bar too
   long for the screen scrolls sideways under the sliding pill rather than squeezing its words. */
@media (max-width:560px){
  html :is(.bank,.seg,.kft-ticker-metric-switch,.kft-scenario-tabs,.kft-dock-bar)>:is(button,a,[role=tab]),
  html .kft-dock-bar :is(.kft-btn,button){white-space:nowrap!important}
  html :is(.bank.subtabs,.kft-ticker-metric-switch,.kft-scenario-tabs){display:flex!important;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;max-width:100%}
  html :is(.bank.subtabs,.kft-ticker-metric-switch,.kft-scenario-tabs)::-webkit-scrollbar{display:none}
  html :is(.bank.subtabs,.kft-ticker-metric-switch,.kft-scenario-tabs)>:is(button,a,[role=tab]){flex:1 0 auto;padding-inline:12px}
}
@layer kft-studio{@media (max-width:560px){
  html :is(.bank,.seg,.kft-ticker-metric-switch,.kft-scenario-tabs,.kft-dock-bar)>:is(button,a,[role=tab]),html .kft-dock-bar :is(.kft-btn,button){white-space:nowrap!important}
  html :is(.bank.subtabs,.kft-ticker-metric-switch,.kft-scenario-tabs){display:flex!important}
}}
/* Fixtures on phones: its own layered rules wrapped the sub-tab and reset labels; keep each on one line */
@layer kft-studio{@media (max-width:760px){
  html #v-fixtures .vhead .bank.subtabs{display:flex!important;overflow-x:auto;scrollbar-width:none;gap:2px!important}
  html #v-fixtures .vhead .bank.subtabs::-webkit-scrollbar{display:none}
  html #v-fixtures .vhead .bank.subtabs>button{flex:1 0 auto!important;white-space:nowrap!important;padding:0 9px!important;font-size:12.5px!important}
  html #v-fixtures #tcUndoTeam,html #v-fixtures #tcReset,html #v-fixtures #tcHardReset{white-space:nowrap!important;font-size:12px!important;padding-inline:4px!important}
  html #v-fixtures .kft-ticker-metric-switch>*{white-space:nowrap!important;flex:1 1 auto}
}}
/* Phones: the page's "?" key wrapped onto a row of its own under the tabs; it sits at the end of the title instead */
@media (max-width:760px){
  .vhead:has(>.help-key){position:relative}
  .vhead>.help-key{position:absolute;top:2px;right:0;margin:0}
  .vhead:has(>.help-key)>div:first-child :is(h1,h2){padding-right:44px}
}

/* ---------- Card shows (js/views/planner.js): what sits under a player's name, one or two picks ---------- */
/* EO's gameweek picker and note go when EO isn't on the cards: no empty space held under the pitch */
.lv-pick.off,.pc-eonote.off{display:none!important}
.cardshow{display:inline-flex;flex-wrap:wrap;gap:4px}
.cardshow button{min-height:28px;padding:0 10px;border:0;border-radius:8px;cursor:pointer;font:700 12px Manrope;color:var(--ink-2);background:var(--tray);transition:background .2s,color .2s,transform .2s var(--f-spring)}
.cardshow button:hover{color:var(--ink)}
.cardshow button:active{transform:scale(.94)}
.cardshow button[aria-pressed=true]{background:var(--sel-mid);color:var(--sel-ink)}
@media (max-width:560px){.cardopts .cardshow{grid-column:2}}

/* ---------- Planner GW bar: ‹ GW › sits in the middle on every screen ---------- */
@media (min-width:761px){
  .pbar{flex-wrap:wrap}
  .pbar>.gwdock,.pbar>.pstick>.gwdock{flex:1 1 100%;justify-content:center;gap:18px;margin-bottom:6px}
}
@media (max-width:760px){
  .pstick{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px}
  .pstick>.gwdock{grid-column:2;justify-content:center!important;gap:14px}
  .pstick>.pstick-x{grid-column:3;justify-self:end}
}
@media (max-width:760px){
  .pstick>.gwdock{gap:10px}
  .pstick .gwdock-mid{min-width:0}
  .pstick .gwdock-mid small{font-size:10.5px;line-height:1.3}
  .pstick>.pstick-x{flex-direction:column;align-items:flex-end!important;gap:0;white-space:nowrap}
  .pstick>.pstick-x small{font-size:10px!important;line-height:1.1}
}

/* plain flat knobs: buff on dark, Lyons blue on light, a thin ring of the ground around them */
:root{--knob:#fdc57e;--knob-ring:#111314}
[data-theme=light]{--knob:#1c4286;--knob-ring:#ffffff}

/* ---------- Profile and Prices readouts: one slim strip, not a wall of boxes ---------- */
html .pf-readouts:not(#kf-x){gap:0;padding:6px 2px;border-radius:12px;background:var(--ground-2);margin:0 0 18px}
html .pf-readouts:not(#kf-x) .pf-ro{gap:1px;padding:6px 14px;background:none!important;border:0!important;border-radius:0;box-shadow:none!important}
html .pf-readouts:not(#kf-x) .pf-ro small{font-size:10.5px;letter-spacing:.06em}
html .pf-readouts:not(#kf-x) .pf-ro b{font:700 17px/1.25 Manrope;letter-spacing:-.01em}
html .pf-readouts:not(#kf-x) .pf-ro em{display:none}
@media (max-width:760px){
  html .pf-readouts:not(#kf-x),html .pf-readouts.pf-six:not(#kf-x){grid-template-columns:repeat(3,minmax(0,1fr));row-gap:4px;padding:6px 0}
  html .pf-readouts:not(#kf-x) .pf-ro{padding:5px 10px}
  html .pf-readouts:not(#kf-x) .pf-ro small{font-size:10px;letter-spacing:.04em}
  html .pf-readouts:not(#kf-x) .pf-ro b{font-size:15px}
}
html .pr-strip:not(#kf-x),html .pr-team-result:not(#kf-x){display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:6px 2px;border-radius:12px;background:var(--ground-2)}
html :is(.pr-strip,.pr-team-result):not(#kf-x) .pf-ro{gap:1px;padding:6px 14px;background:none!important;border:0!important;border-radius:0;box-shadow:none!important}
html :is(.pr-strip,.pr-team-result):not(#kf-x) .pf-ro small{font-size:10.5px;letter-spacing:.06em}
html :is(.pr-strip,.pr-team-result):not(#kf-x) .pf-ro b{font:700 17px/1.25 Manrope}
html .pr-team-result:not(#kf-x){grid-template-columns:repeat(5,minmax(0,1fr))}
@media (max-width:760px){
  html :is(.pr-strip,.pr-team-result):not(#kf-x){grid-template-columns:repeat(3,minmax(0,1fr));row-gap:4px;padding:6px 0}
  html .pr-strip:not(#kf-x){grid-template-columns:repeat(2,minmax(0,1fr))}
  html :is(.pr-strip,.pr-team-result):not(#kf-x) .pf-ro{padding:5px 10px}
  html :is(.pr-strip,.pr-team-result):not(#kf-x) .pf-ro b{font-size:15px}
}

/* ---------- no glowing green / red lights: direction shows as an arrow, status as a tinted tag ---------- */
.pr-led{display:none!important}
.pr-ro.up small::after{content:" ↑";color:var(--good)}
.pr-ro.down small::after{content:" ↓";color:var(--bad)}
.status-chip::before,.pf-live::before{display:none!important}
.status-chip{padding:2px 8px;border-radius:6px;background:var(--tray)}
.status-chip:is(.rise-very,.rise-likely){background:color-mix(in oklab,var(--good) 16%,transparent)}
.status-chip:is(.drop-very,.drop-likely){background:color-mix(in oklab,var(--bad) 16%,transparent)}
.teamchip .led{display:none!important}
.lv-upd .led{width:auto!important;height:auto!important;padding:1px 6px;border-radius:5px;background:var(--accent)!important;box-shadow:none!important}
.lv-upd .led::before{content:"Live";font:800 10px/1.4 Manrope;letter-spacing:.06em;text-transform:uppercase;color:var(--accent-ink)}
html :is(.pr-strip,.pr-team-result):not(#kf-x)>.pf-ro{grid-column:auto!important;grid-row:auto!important}
@media (max-width:760px){html :is(.pr-strip,.pr-team-result,.pf-readouts):not(#kf-x) .pf-ro small{white-space:normal;line-height:1.25}}

/* ---------- free-edits counter and its card: a flat key with the count in a buff badge; the card reads as the rest of
   the site (Manrope, flat bars for what's left, no segment dial, no monospace) ---------- */
html .kd-chip:not(#kf-x){gap:8px;min-height:34px;padding:0 10px 0 4px;background:var(--key-mid);border:0;box-shadow:none;border-radius:10px}
[data-theme=light] .kd-chip:not(#kf-x){box-shadow:inset 0 0 0 1px #11131422}
.kft-allowance-control[open]>.kd-chip{transform:none!important;background:var(--sel-mid)!important;color:var(--sel-ink)}
.kd-mini{width:26px;height:26px;border-radius:8px;background:var(--accent);box-shadow:none}
.kd-mini .kd-dial{display:none}
.kd-mini b{color:var(--accent-ink);font-size:12px}
.kft-allowance-control[data-state=empty] .kd-mini{background:var(--tray)}.kft-allowance-control[data-state=empty] .kd-mini b{color:var(--muted)}
.kd-chip-t small{font:700 10.5px/1.15 Manrope;letter-spacing:.02em;text-transform:none;color:var(--muted)}
.kft-allowance-control[open]>.kd-chip .kd-chip-t :is(small,span){color:inherit}
.kd-card{border-radius:16px;border:0;background:var(--raised);box-shadow:0 18px 40px -18px #000b,0 0 0 1px var(--hair)}
.kd-top{font:700 12px/1 Manrope;letter-spacing:0;text-transform:none;color:var(--muted)}
.kd-top span:first-child{color:var(--ink)}
.kd-hero,[data-theme=light] .kd-hero{grid-template-columns:auto minmax(0,1fr);gap:20px;border-bottom:0;padding-bottom:6px}
.kd-big{width:auto;height:auto;padding:12px 16px;border-radius:12px;background:var(--accent);color:var(--accent-ink)}
.kd-big .kd-dial{display:none}
.kd-big b{font:800 38px/1 Manrope;letter-spacing:-.03em}
.kd-big small{color:inherit;opacity:.75;font:700 10.5px Manrope;letter-spacing:.04em}
.kd-row{grid-template-columns:minmax(0,1fr) auto;row-gap:6px}
.kd-row i{display:none}
.kd-row::after{content:"";grid-column:1/-1;height:5px;border-radius:3px;background:linear-gradient(90deg,var(--accent) calc(var(--p,0)*100%),var(--tray) 0)}
.kd-row.w::after{background:linear-gradient(90deg,var(--info) calc(var(--p,0)*100%),var(--tray) 0)}
.kd-n b{font:800 18px Manrope}
.kd-go{background:var(--accent)!important;border:0!important;box-shadow:none!important;border-radius:11px}
.kd-go:active{transform:scale(.97)}
.kd-pro{border-top:0;padding-top:4px}

/* My edits: the header key flat like every other key; the drawer flat, each edit its own quiet row, no rules between */
html .wtop-r .kft-edits-nav:not(#kf-x){background:var(--key-mid);border:0;box-shadow:none;min-height:34px}
[data-theme=light] .wtop-r .kft-edits-nav:not(#kf-x){box-shadow:inset 0 0 0 1px #11131422}
.wtop-r .kft-edits-nav:active{transform:scale(.95)}
.kft-edits-panel{background:var(--raised);border-left:0;box-shadow:-20px 0 50px -24px #000c}
.kft-edits-panel header,.kft-edits-panel footer{border:0}
.kft-edits-body h3{font:700 12px/1 Manrope;letter-spacing:0;text-transform:none;color:var(--muted)}
.kft-edits-list{display:grid;gap:8px}
.kft-edits-list>li{padding:12px 14px;border:0;border-radius:12px;background:var(--ground-2)}
.kft-edits-close{border:0;background:var(--key-mid)}

.cardopts-g{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
@media (max-width:560px){.cardopts-g{display:contents}}

/* ---------- Planner manager bar: one slim row (who, xPts, captain), and every look option behind one Display key ---------- */
.mbar{display:flex;align-items:center;gap:22px;flex:1 1 100%;min-width:0;margin:0 0 14px;padding:10px 12px 10px 16px;border-radius:12px;background:var(--ground-2)}
.mb-who{display:grid;flex:1 1 auto;min-width:0;line-height:1.25}
.mb-who b{font:800 15px Manrope;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mb-who small,.mb-s small{font:600 11.5px Manrope;color:var(--muted);white-space:nowrap}
.mb-s{display:grid;line-height:1.25;flex:none}
.mb-s b{font:800 15px Manrope;white-space:nowrap}
.mb-x b{color:var(--accent)}
.mb-best b i{font-style:normal;color:var(--muted);font-weight:700}
.disp{position:relative;flex:none}
.disp>summary{list-style:none;cursor:pointer}.disp>summary::-webkit-details-marker{display:none}
.disp[open]>summary{background:var(--sel-mid)!important;color:var(--sel-ink)!important}
.disp-card{position:absolute;right:0;top:calc(100% + 8px);z-index:30;width:max-content;max-width:min(560px,calc(100vw - 24px));padding:14px;border-radius:14px;background:var(--raised);box-shadow:0 18px 40px -18px #000b,0 0 0 1px var(--hair)}
.disp-card .cardopts{display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px 14px;margin:0}
.disp-card .cardopts-g{display:contents}
.disp-card .cardopts-l{font:700 12px Manrope;letter-spacing:0;color:var(--muted)}
.disp-card .cardpick{display:flex}
.disp-card .cardpick button{flex:1}
.disp-card .cardshow{display:flex;flex-wrap:wrap;gap:4px;max-width:470px}
@media (max-width:760px){
  .mbar{gap:14px;padding:8px 10px 8px 12px}
  .mb-x,.mb-best{display:none}
  .mb-who b,.mb-s b{font-size:14px}
  .disp-card{position:fixed;left:12px;right:12px;top:auto;bottom:max(12px,env(safe-area-inset-bottom));width:auto;max-width:none}
  .disp-card .cardshow{max-width:none}
}

/* ---------- player sheet: one flat surface, one strip of figures, a flat chart, one row of keys ---------- */
@layer kft-studio{
  html .pact:not(#kf-x){border:0!important;background:var(--raised)!important;box-shadow:0 18px 48px #0007!important}
  html .pact-head b{font:800 18px Manrope!important;letter-spacing:-.01em!important}
  html .pact-figs:not(#kf-x){margin:12px 0!important;padding:12px 14px!important;border-radius:12px!important;background:var(--ground-2)!important}
  html .pact-figs .pact-money:not(#kf-x),html .pact-figs .pact-stats:not(#kf-x){border-top:0!important;padding:0!important;margin:0!important}
  html .pact-figs>.fine{margin:6px 0 12px!important;font-size:12px!important;color:var(--muted)!important}
  html .pact-figs>.fine.same{display:none!important}
  html .pact-figs>.fine.same+.pact-stats{margin-top:12px!important}
  html .pact-money small,html .pact-stats small,html .pact-figs small{font:700 10.5px Manrope!important;letter-spacing:.06em!important;color:var(--muted)!important}
  html .pact-money b,html .pact-stats b,html .pact-figs b{font:800 16px Manrope!important;font-variant-numeric:tabular-nums!important}
  html .pact .pchart:not(#kf-x){border:0!important;box-shadow:none!important;background:var(--ground-2)!important}
  html .pact .pchart-read{border-bottom:0!important}
  html .pact .pchart .line{filter:none!important}
  html .pact-keys:not(#kf-x){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(96px,1fr))!important;gap:8px!important}
  html .pact-keys>.key{min-width:0!important;white-space:nowrap!important}
  html .pdock:not(#kf-x){border:0!important}
}
@media (max-width:720px){@layer kft-studio{
  html .pact-figs:not(#kf-x){padding:10px 12px!important}
  html .pact-figs>.fine{margin:-2px 0 0!important}
  html .pact-figs b{font-size:14px!important}
  html .pact-keys:not(#kf-x){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}}

/* ---------- Profile: no plates or tiles. The name sits on the page, the weeks sit in one flat surface ---------- */
@layer kft-studio{
  html .pf-plate:not(#kf-x){padding:6px 2px 4px!important;background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important}
  html .pf-plate:not(#kf-x)::before,html .pf-plate:not(#kf-x)::after{display:none!important}
  html .pf-card:not(#kf-x),html .pf-panel:not(#kf-x),html .pf-scope:not(#kf-x){background:var(--ground-2)!important;border:0!important;box-shadow:none!important;border-radius:12px!important}
  html .pf-card b{font:800 20px Manrope!important}
  html .pf-card small{font:700 10.5px Manrope!important;letter-spacing:.06em!important}
  html .gw-grid:not(#kf-x){gap:2px!important;padding:6px!important;border-radius:12px!important;background:var(--ground-2)!important;grid-template-columns:repeat(auto-fill,minmax(132px,1fr))!important}
  html .gw-tile:not(#kf-x){gap:2px!important;padding:10px 12px!important;border-radius:9px!important;background:none!important;border:0!important;box-shadow:none!important;filter:none!important;transform:none!important}
  html .gw-tile:not(#kf-x):hover{background:var(--raised)!important}
  html .gw-tile::after{display:none!important}
  html .gw-tile .gw-name{font:700 10.5px Manrope!important;letter-spacing:.06em!important}
  html .gw-tile .gw-points{font:800 22px/1.1 Manrope!important;letter-spacing:-.02em!important}
  html .gw-tile .gw-rank{font:600 12px Manrope!important;color:var(--muted)!important}
  html .gw-tile .gw-linknote{display:none!important}
  html .chip:not(#kf-x),html .league-table .compare-btn:not(#kf-x){background:var(--key-top)!important;border:0!important;box-shadow:none!important}
  html .league-table .compare-btn:not(#kf-x)[aria-pressed=true],html .league-table .compare-btn.active:not(#kf-x){background:var(--sel-mid)!important;color:var(--sel-ink)!important}
}
@media (max-width:640px){@layer kft-studio{html .gw-grid:not(#kf-x){grid-template-columns:repeat(3,minmax(0,1fr))!important}html .gw-tile .gw-points{font-size:19px!important}html .gw-tile:not(#kf-x){padding:8px 10px!important}}}

/* ---------- readouts: a row of figures is one flat strip, not a box per figure ---------- */
@layer kft-studio{
  html .readouts:not(#kf-x){gap:0!important;width:fit-content!important;max-width:100%!important;padding:2px 4px!important;border-radius:12px!important;background:var(--ground-2)!important}
  html .readouts:not(#kf-x)>.readout{background:none!important;border:0!important;box-shadow:none!important;padding:10px 14px!important}
  html .readout b{font-family:Manrope!important;font-weight:800!important}
  html .readout small{font:700 10.5px Manrope!important;letter-spacing:.06em!important}
  html .league-card:not(#kf-x){border:0!important;box-shadow:none!important;background:var(--ground-2)!important}
  html .kft-dock-bar:not(#kf-x),html .kft-rot-picks:not(#kf-x){border:0!important;box-shadow:none!important}
}
@media (max-width:560px){@layer kft-studio{html .readouts:not(#kf-x){width:auto!important}}}

/* ---------- the last gradient panels go flat ---------- */
@layer kft-studio{
  html .pr-team:not(#kf-x){padding:6px 0 0!important;background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important}
  html .pr-tablewrap:not(#kf-x),html .pf-panel:not(#kf-x){border:0!important}
  html #rotationFinder .kft-rot-result:not(#kf-x){background:var(--ground-2)!important;border:0!important;box-shadow:none!important;border-radius:12px!important}
  html .psheet:not(#kf-x){background:var(--raised)!important;border:0!important}
  html .kft-scenario-modal>header:not(#kf-x),html .kft-scenario-modal>footer:not(#kf-x){background:var(--raised)!important}
  html .cl-head:not(#kf-x){background:var(--ground-2)!important;border:0!important;box-shadow:none!important;border-radius:14px!important}
  html .cl-head:not(#kf-x)::before,html .cl-head:not(#kf-x)::after{display:none!important}
  html .list>li:hover,html .list>li:focus-visible,html .cap:hover,html .cap:focus-visible{background:var(--accent-soft)!important}
}

/* ---------- skeletons in the site's colours: fixture cells in faint FDR tones, shirts in the palette, the light warm ---------- */
:root{--sk-tint:22%!important}
[data-theme=light]{--sk-tint:30%!important}
.sk-bar::after,.kft-skel-bar::after{background:linear-gradient(100deg,transparent 20%,color-mix(in oklab,var(--accent) 16%,var(--skel-hi)) 50%,transparent 80%)!important}
/* number cells of a table / ticker take the difficulty colours, cycling like a real week */
.skt-row:not(.skt-head)>span:not(.skt-who) .sk-bar,.kft-skel-cell{background:color-mix(in oklab,var(--c1,var(--fdr2)) var(--sk-tint),var(--skel))!important}
.skt-row:not(.skt-head)>span:nth-child(5n+2) .sk-bar,.kft-skel-tr td:nth-child(5n+2) .kft-skel-cell{--c1:var(--fdr2)!important}
.skt-row:not(.skt-head)>span:nth-child(5n+3) .sk-bar,.kft-skel-tr td:nth-child(5n+3) .kft-skel-cell{--c1:var(--fdr4)!important}
.skt-row:not(.skt-head)>span:nth-child(5n+4) .sk-bar,.kft-skel-tr td:nth-child(5n+4) .kft-skel-cell{--c1:var(--fdr3)!important}
.skt-row:not(.skt-head)>span:nth-child(5n+5) .sk-bar,.kft-skel-tr td:nth-child(5n+5) .kft-skel-cell{--c1:var(--fdr1)!important}
.skt-row:not(.skt-head)>span:nth-child(5n+6) .sk-bar,.kft-skel-tr td:nth-child(5n+6) .kft-skel-cell{--c1:var(--fdr5)!important}
.skt-row:nth-child(3n+1)>span:nth-child(2n) .sk-bar{--c1:var(--fdr3)!important}
/* shirts: real kits of real clubs in the drawing in use, faded back so they read as loading */
.sk-shirt>svg.kft-kit,.kft-skel-shirt>svg.kft-kit{width:100%;height:auto;opacity:.4;filter:saturate(.6)}
.kft-skel-shirt>svg.kft-kit{width:38px;margin:0 auto}
[data-theme=light] :is(.sk-shirt,.kft-skel-shirt)>svg.kft-kit{opacity:.45}
/* on the grass a faded shirt goes muddy: pitch shirts stay brighter */
:is(.skp-pl,.kft-skel-pitch) :is(.sk-shirt,.kft-skel-shirt)>svg.kft-kit{opacity:.7!important;filter:saturate(.75)}
.kft-skel-shirt-body{background:var(--skel)!important}
/* a value at the end of a ranked list reads as the accent xPts chip */
.skl-row>.sk-bar:last-child{background:color-mix(in oklab,var(--accent) 26%,var(--skel))!important}
/* chart dots: blue and the accent */
.skc-dot:nth-child(odd),.kft-skel-dot:nth-child(odd){background:color-mix(in oklab,var(--info) 40%,var(--skel))!important}
.skc-dot:nth-child(even),.kft-skel-dot:nth-child(even){background:color-mix(in oklab,var(--accent) 40%,var(--skel))!important}
.kft-skel-cal-match{background:color-mix(in oklab,var(--accent) 24%,var(--skel))!important}
.skt-row:nth-child(even)>span:nth-child(3n+2) .sk-bar{--c1:var(--fdr3)!important}
.skt-row:nth-child(even)>span:nth-child(3n+3) .sk-bar{--c1:var(--fdr2)!important}
.skt-row:nth-child(4n)>span:nth-child(4n+1) .sk-bar{--c1:var(--fdr5)!important}

/* ---------- one inset for every strip and control bar: text starts 16px in on laptops, 12px in on phones ---------- */
@layer kft-studio{
  html .readouts:not(#kf-x){padding:2px!important}
  html .wview .kft-dock-bar:not(#kf-x),html .kft-dock-bar.ctl:not(#kf-x),html .pdock:not(#kf-x){padding-left:16px!important;padding-right:16px!important}
  html .pact-figs:not(#kf-x){padding-left:16px!important;padding-right:16px!important}
  html .gw-grid:not(#kf-x){padding:4px!important}
  html .pf-card:not(#kf-x){padding:14px 16px!important}
}
@media (max-width:760px){@layer kft-studio{
  html .readouts:not(#kf-x){padding:0!important}
  html .readouts:not(#kf-x)>.readout{padding:10px 12px!important}
  html .wview .kft-dock-bar:not(#kf-x),html .kft-dock-bar.ctl:not(#kf-x),html .pdock:not(#kf-x){padding-left:12px!important;padding-right:12px!important}
  html .mbar:not(#kf-x){padding-left:12px!important}
  html .pf-readouts:not(#kf-x),html .pf-readouts.pf-six:not(#kf-x){padding:6px 2px!important}
  html .pf-readouts:not(#kf-x) .pf-ro{padding:5px 10px!important}
  html .pact-figs:not(#kf-x){padding-left:12px!important;padding-right:12px!important}
  html .gw-tile:not(#kf-x){padding:8px!important}
  html .pf-card:not(#kf-x){padding:12px!important}
}}

/* ---------- every page title is the same size and starts at the same height ---------- */
@layer kft-studio{
  html .pr-hero:not(#kf-x){align-items:start!important}
  html .pr-hero h1,html .plan-head h1{font:600 clamp(28px,3vw,40px)/1.1 Sora!important;letter-spacing:-.035em!important}
}
@media (max-width:760px){@layer kft-studio{
  html .pr-hero h1{font-size:28px!important}
  html .ptop .plan-head h1{font-size:22px!important;line-height:1.15!important}
}}

/* ---------- Projections: a gameweek column opens the same menu as the Fixture ticker ---------- */
.ptable th.gwc{white-space:nowrap}
.ptable .kft-gw-menu-trigger{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:5px;padding:6px 10px;border-radius:7px;font:700 11.5px Manrope;letter-spacing:.04em;color:var(--ink-2)}
.ptable .kft-gw-menu-trigger span{font-size:10px;letter-spacing:1px;color:var(--muted)}
.ptable .kft-gw-menu-trigger:hover,.ptable th.sorted .kft-gw-menu-trigger,.ptable .kft-gw-menu-trigger[aria-expanded=true]{background:var(--hair);color:var(--ink)}
.ptable th.sorted .kft-gw-menu-trigger span{color:var(--accent);font-size:12px;letter-spacing:0}
.ptable .kft-gw-menu-trigger:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.ticker-gw-menu{z-index:1300!important;background:var(--raised)!important;border:0!important}
.ticker-gw-menu button[disabled]{opacity:.45;cursor:default}

/* each stat's own colour: the Display menu's key, and the fill for numbers that have no good or bad (EO, price, selected) */
:root{--swish:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 8' preserveAspectRatio='none'%3E%3Cpath d='M1.2 5.6C9 2.9 20.5 1.3 38.6 1.9c1 0 1.1 1.7.1 1.9C24 5 12.6 6.3 2.6 7.7 1 8 .3 6.1 1.2 5.6z'/%3E%3C/svg%3E")}
:root,[data-theme=dark]{--st-opp:#5b9dff;--st-xpts:#ffa62b;--st-form:#3ddc84;--st-eo:#ff6bb5;--st-price:#b48cff;--st-sel:#22d3ee}
[data-theme=light]{--st-opp:#1f5fd6;--st-xpts:#b35500;--st-form:#0b7a40;--st-eo:#b52a72;--st-price:#6a3dc4;--st-sel:#087489}

/* the swish lives only in the Display menu, as the key for each stat's colour */
.kf-swish{display:inline-block;flex:none;width:15px;height:6px;margin-right:7px;vertical-align:1px;background:var(--st,var(--accent));
  -webkit-mask:var(--swish) center/100% 100% no-repeat;mask:var(--swish) center/100% 100% no-repeat}
/* every other marker on the site: a short solid tab, plain and quiet */
.kf-flag{display:inline-block;flex:none;width:12px;height:4px;margin-right:7px;vertical-align:2px;border-radius:2px;background:var(--st,var(--accent))}
.cardshow button{display:inline-flex;align-items:center}

/* Display: a plain solid blue key, the same shape as every other key */
.disp-key{display:inline-flex!important;align-items:center;gap:8px;min-height:38px!important;padding:0 14px!important;font:800 13px Manrope!important;
  color:#fff!important;background:#2d5bb0!important;border:0!important;border-radius:10px!important;list-style:none;cursor:pointer}
[data-theme=light] .disp-key{background:#1c4286!important}
.disp-key:hover{filter:brightness(1.08)}
.disp-key::-webkit-details-marker{display:none}
.disp-key svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.disp-key svg circle{fill:currentColor}

/* ---------- markers: no glowing dots and no coloured side stripes. Every marker is the corner flag, in its own colour ---------- */
@layer kft-studio{
  html :is(.edited-dot,.lg-who .ed,.ptk .sq,.rd small i,.chip i,.sw,.workspace .led,.kft-allowance-dot,.boot i,.wview .led):not(#kf-x),
  html .lv-row.live .who small:not(#kf-x)::before{
    width:12px!important;height:4px!important;border-radius:2px!important;box-shadow:none!important;border:0!important;animation:none!important;-webkit-mask:none!important;mask:none!important}
  /* the planner card's "you edited this" marker: a flag planted at the kit's shoulder */
  html .pc .ed:not(#kf-x){width:12px!important;height:4px!important;border-radius:2px!important;box-shadow:none!important;-webkit-mask:none!important;mask:none!important}
  /* notes that used a coloured left stripe get a flag before the name instead */
  html .gwn li:not(#kf-x){border:0!important;position:relative;padding-left:30px!important}
  html .gwn li:not(#kf-x)::before{content:"";position:absolute;left:10px;top:20px;width:12px;height:4px;border-radius:2px;background:var(--warn)}
  html .gwn li:is(.i,.s,.u,.n):not(#kf-x)::before{background:var(--bad)}
  /* "you are here" on a strip: a flag on a short pole instead of a bare line */
  html .lv-strip .me:not(#kf-x){border-left-width:2px!important;margin-left:-1px!important}
  html .lv-strip .me:not(#kf-x)::after{content:"";position:absolute;left:0;top:-4px;width:10px;height:8px;background:var(--good);clip-path:polygon(0 0,100% 50%,0 100%)}
  html .lv-strip .me.down:not(#kf-x)::after{background:var(--bad)}
}

/* ---------- the KFT mark: two faint crests on the turf, one each side at the top, as a club paints its badge.
   Planner, Live and the Gameweek XI; nothing in the centre circle ---------- */
.pitch2::before,.pitch2::after{content:"";position:absolute;z-index:0;top:24px;width:clamp(56px,11%,96px);aspect-ratio:1;border-radius:50%;
  background:url("/img/KFT_newlogo-192.webp") center/cover no-repeat;filter:grayscale(1) contrast(1.2);opacity:.17;mix-blend-mode:screen;pointer-events:none}
.pitch2::before{left:5%}
.pitch2::after{right:5%}
/* Live and the Gameweek XI keep their EO picker in the top-right corner: the right mark drops below it */
.pitchbox:has(.lv-pick:not(.off)) .pitch2::after{top:64px}
@media (max-width:760px){.pitch2::before,.pitch2::after{top:14px;width:46px}.pitch2::before{left:12px}.pitch2::after{right:12px}.pitchbox:has(.lv-pick:not(.off)) .pitch2::after{top:52px}}

/* ---------- Player maps: tabs under the title, the GW dock centred, the map in one card with its own title and key ---------- */
:root,[data-theme=dark]{--pos-gk:#d29ad6;--pos-def:#6cc196;--pos-mid:#8eaee6;--pos-fwd:#fdc57e}
[data-theme=light]{--pos-gk:#7b3f7e;--pos-def:#0b6844;--pos-mid:#1c4286;--pos-fwd:#a35f00}
@layer kft-studio{
  html #v-maps .vbar.map-gw:not(#kf-x){display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px;margin:16px 0 14px!important}
  html #v-maps .vbar.map-gw>.gwdock{grid-column:2;justify-content:center}
  html #v-maps .vbar.map-gw>.vbar-r{grid-column:3;justify-self:end;display:flex;gap:8px}
  html .map-card:not(#kf-x){margin:14px 0 10px;padding:14px 16px 10px;border-radius:12px;background:var(--ground-2)}
  html .map-head:not(#kf-x){display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;margin:0 0 10px}
  html .map-title{display:grid;gap:2px;flex:1 1 260px;min-width:0}
  html .map-title b{font:800 15px Manrope;color:var(--ink)}
  html .map-title b span{font-weight:600;color:var(--muted)}
  html .map-title small{font:600 12px Manrope;color:var(--muted)}
  html .map-key{display:inline-flex;gap:14px;font:800 11.5px Manrope;letter-spacing:.04em;color:var(--ink-2)}
  html .map-key>span{display:inline-flex;align-items:center}
  html .map-card .map-wrap:not(#kf-x){padding:0!important;border:0!important;box-shadow:none!important;background:none!important;border-radius:0!important}
  html .map .dot:not(#kf-x){fill:var(--c,var(--accent))!important;fill-opacity:1!important;stroke:var(--ground-2)!important;stroke-width:1.5!important}
  html .map .dot:not(#kf-x):is(:hover,:focus){stroke:var(--ink)!important;stroke-width:2!important}
  html .map .dot.ed:not(#kf-x){stroke:var(--ink)!important;stroke-width:2.5!important}
  html .map .lbl:not(#kf-x){stroke:var(--ground-2)!important;font:800 11.5px Manrope!important}
  html .map .gl{stroke:var(--hair)!important;stroke-dasharray:2 6}
  html .map text{font-family:Manrope}
  html #v-maps .kft-dock-bar.ctl .price input{width:42px}
}
@media (max-width:760px){@layer kft-studio{
  html #v-maps .vbar.map-gw:not(#kf-x){grid-template-columns:1fr}
  html #v-maps .vbar.map-gw>.gwdock,html #v-maps .vbar.map-gw>.vbar-r{grid-column:1;justify-self:center}
  html .map-card:not(#kf-x){padding:12px 10px 8px}
}}

/* ---- the ? guide: one card walking through a tool's controls, the control it talks about outlined ---- */
.kf-tour-ring{position:fixed;z-index:1390;pointer-events:none;border:2px solid var(--accent);border-radius:12px;
  transition:left .28s cubic-bezier(.3,.7,.2,1),top .28s cubic-bezier(.3,.7,.2,1),width .28s cubic-bezier(.3,.7,.2,1),height .28s cubic-bezier(.3,.7,.2,1)}
.kf-tour{position:fixed;z-index:1400;width:min(330px,calc(100vw - 24px));padding:14px 16px 14px;border-radius:14px;background:var(--raised);border:0;
  box-shadow:0 0 0 1px var(--hair-2),0 14px 34px #0000004d;color:var(--ink);font-family:Manrope;opacity:0;translate:0 6px;transition:opacity .16s,translate .16s,left .28s,top .28s}
.kf-tour.open{opacity:1;translate:0 0}
.kf-tour.dock{left:12px!important;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));top:auto!important;width:auto}
.kf-tour-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.kf-tour-n{display:inline-flex;align-items:center;font:800 11px/1 Manrope;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.kf-tour-n .kf-flag{--st:var(--accent)}
.kf-tour-x{width:32px;height:32px;margin:-6px -8px -6px 0;border:0;background:none;color:var(--muted);font:600 22px/1 Manrope;cursor:pointer;border-radius:8px}
.kf-tour-x:hover{color:var(--ink);background:var(--ground-2,#ffffff10)}
.kf-tour h3{margin:0 0 4px;font:800 16px/1.25 Manrope;color:var(--ink)}
.kf-tour p{margin:0;font:500 13.5px/1.55 Manrope;color:var(--ink-2)}
.kf-tour-acts{display:flex;gap:12px;justify-content:flex-end;margin-top:14px}
.kf-tour-acts [data-t=back]{margin-right:auto}
.kf-tour-acts [hidden]{display:none!important}
@media (prefers-reduced-motion:reduce){.kf-tour,.kf-tour-ring{transition:none}}

/* ---------- Pro, quietly: a small lock in the accent beside the option instead of an orange PRO sticker.
   The word stays for screen readers ---------- */
.wview .kft-rot-pro{display:inline-block!important;width:9px!important;height:11px!important;margin:0 0 0 5px!important;padding:0!important;border-radius:0!important;
  background:var(--accent)!important;font-size:0!important;line-height:0!important;color:transparent!important;vertical-align:-1px;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2.6 5V3.6a2.4 2.4 0 0 1 4.8 0V5H8.4c.6 0 1 .4 1 1v5c0 .6-.4 1-1 1H1.6c-.6 0-1-.4-1-1V6c0-.6.4-1 1-1zm1.4 0h2V3.6a1 1 0 0 0-2 0z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2.6 5V3.6a2.4 2.4 0 0 1 4.8 0V5H8.4c.6 0 1 .4 1 1v5c0 .6-.4 1-1 1H1.6c-.6 0-1-.4-1-1V6c0-.6.4-1 1-1zm1.4 0h2V3.6a1 1 0 0 0-2 0z'/%3E%3C/svg%3E") center/contain no-repeat}
.wview .kft-ticker-metric-switch>.kft-btn:has(.kft-rot-pro){display:inline-flex!important;align-items:center}

/* ---------- Fixture congestion: your clubs get a tinted row and their name in the accent; the count of
   your players moves into the name's tooltip instead of a badge ---------- */
html #restDays .kft-rest-club.is-mine:not(#kf-x){box-shadow:none!important}
html #restDays .kft-rest-row:has(.kft-rest-club.is-mine){background:color-mix(in oklab,var(--accent) 7%,transparent)}
#restDays .kft-rest-club.is-mine .kft-rest-club-name{font-weight:800;color:var(--accent)}
#restDays .kft-rest-mine{display:none!important}
/* the planner's ticker marks your clubs the same way: a tinted row and the name in the accent, no side line */
.ptk tr.in-squad .kft-sticky-team{box-shadow:none!important}
.ptk tr.in-squad>*{background-color:color-mix(in oklab,var(--accent) 7%,var(--ground-2,transparent))}
html .ptk .sq:not(#kf-x){display:none!important}
.ptk tr.in-squad :is(.tn,.tn-s){font-weight:800;color:var(--accent)}
/* Gameweek fixtures: the key uses plain tabs */
.gwf-key i{width:12px!important;height:4px!important;border-radius:2px!important}
/* Projections: the top three in a gameweek are marked with a small rank figure in the cell's corner, not a medal */
.wview .rk{top:3px!important;right:5px!important;width:auto!important;height:auto!important;border-radius:0!important;background:none!important;box-shadow:none!important;
  font:800 9.5px/1 Manrope!important;color:var(--ink-2)!important;opacity:.85;white-space:nowrap;display:block!important}
.wview .rk::before{content:"#"}
.wview .rk.r1{color:var(--accent)!important;opacity:1}
/* Prices: your players get a tinted row and their name in the accent instead of a YOURS pill (the word stays for screen readers) */
.price-table .player-name strong:has(.owned-tag){color:var(--accent)}
.price-table tr:has(.owned-tag)>*{background-color:color-mix(in oklab,var(--accent) 6%,transparent)}
.price-table .owned-tag{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;padding:0!important;margin:0!important;border:0!important}

/* ---------- countdowns, one look everywhere (under the planner's GW, the Gameweek and Live deadline, the next price
   update): digits and units in plain type, no boxes, no warning colours. The one bit of fun: a digit that changes
   rolls up into place with a small bounce and tilt. The GW bar is a three-column grid so ‹ GW › sits dead centre
   and the xPts sits level with it on the right ---------- */
.gwdock-mid{row-gap:1px}
.cd{display:inline-flex;align-items:baseline;gap:7px;min-height:18px;margin-top:2px;font-variant-numeric:tabular-nums;white-space:nowrap}
.cd-t{display:inline-flex;align-items:baseline;gap:1px}
.cd-n{display:inline-flex}
.cd-t b{position:relative;display:inline-block;overflow:hidden;color:var(--ink);font:700 14px/1.2 Sora;letter-spacing:-.01em}
.cd-t b i{display:block;font-style:normal}
.cd-t b i.roll{animation:cdroll .32s cubic-bezier(.2,.7,.2,1)}
.cd-t small{color:var(--muted);font:700 10.5px/1 Manrope}
/* odometer: the new digit and the old one move up together by one full line, so they sit edge to edge and never overlap */
@keyframes cdroll{from{transform:translateY(100%)}}
.cd-t b i.out{position:absolute;left:0;top:0;animation:cdout .32s cubic-bezier(.2,.7,.2,1) forwards}
@keyframes cdout{to{transform:translateY(-100%)}}
.cd.gone{color:var(--muted);font:700 12px/1.3 Manrope}
@media (prefers-reduced-motion:reduce){.cd-t b i.roll,.cd-t b i.out{animation:none}.cd-t b i.out{display:none}.cd-big circle{transition:none}}
/* the Gameweek and Live deadline, and the next price update: label, digits, when, as plain type on the page */
.gwclock{display:grid;justify-items:center;justify-self:stretch;text-align:center;gap:6px;margin:22px 0 4px}
.gwclock .gc-when,.pr-clock em{color:var(--muted);font:600 13px/1.3 Manrope;font-style:normal}
.gwclock .gc-tbc{color:var(--ink);font:600 22px/1.2 Sora}
.gwclock .gc-keys{display:flex;gap:12px;margin-top:6px}.gwclock .gc-keys .key{width:40px;min-height:40px;padding:0;font-size:16px}
.pr-clock{position:static;display:grid;justify-items:center;justify-self:center;gap:6px;width:auto;aspect-ratio:auto;border-radius:0;background:none;box-shadow:none;text-align:center}
@media (max-width:760px){
  .cd{gap:5px}
  .cd-t b{font-size:12.5px}
  .cd-t small{font-size:9.5px}
  .pstick .gwdock-mid>small{font-size:10.5px}
  .pr-clock{justify-items:center;width:auto;text-align:center}
}
.pstick{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;column-gap:10px}
.pstick>.gwdock{grid-column:2;justify-content:center!important;margin-bottom:0}
.pstick>.pstick-x{grid-column:3;justify-self:end;align-self:center}


/* the big countdown as a stadium scoreboard: dot-matrix digits, lit dots in the accent (gold on the dark page, navy on
   cream), unlit dots faint, the unit in small caps under each pair, a two-dot colon between. Flat: no glow, no box */
.cd-big{--dot:clamp(6px,.7vw,8px);display:inline-flex;align-items:flex-start;gap:calc(var(--dot) * 1.6);min-height:0;margin:2px 0 0;color:var(--accent)}
.cd-big .cd-t{display:grid;justify-items:center;gap:7px}
.cd-big .cd-n{gap:calc(var(--dot) * .9)}
.cd-big .cd-t b{display:block;overflow:hidden;font:inherit;color:inherit}
.cd-big .cd-t b i{display:block}
.cd-big svg{display:block;width:calc(var(--dot) * 5);height:calc(var(--dot) * 7)}
.cd-big circle{fill:currentColor;opacity:.07;transition:opacity .22s ease}
.cd-big circle.on{opacity:1}
.cd-big .cd-t small{color:var(--muted);font:800 10.5px/1 Manrope;letter-spacing:.14em;text-transform:uppercase}
.cd-big .cd-colon{display:grid;align-content:center;gap:calc(var(--dot) * 1.6);height:calc(var(--dot) * 7)}
.cd-big .cd-colon::before,.cd-big .cd-colon::after{content:"";width:calc(var(--dot) * .8);height:calc(var(--dot) * .8);border-radius:50%;background:currentColor}
.cd-big.gone{color:var(--ink);font:600 22px/1.2 Sora;letter-spacing:-.02em}
@media (max-width:760px){.cd-big{--dot:5.5px}.cd-big .cd-t small{font-size:9.5px}}
/* the Gameweek deadline gets its own centred row under the heading (before the readouts on phones, after them on wider screens) */
.vhead>.gwclock{flex:1 1 100%;margin:4px 0 0}
@media (min-width:761px){.vhead>.gwclock{order:3}}
.pr-hero>.pr-clock{grid-column:1/-1;justify-self:center}
/* ---------- planner player cards: one frame, three flat styles (Classic = compact, Compact = minimal, Modern = coin) ----------
   Every style: a big shirt, a small name, small numbers, and no box behind the numbers. Cards shrink with their row,
   so a five-player row always fits the pitch. */
:root,[data-theme=dark]{--pc-card:#1c1e21;--pc-ink:#f4efe6}
[data-theme=light]{--pc-card:#fbf6ee;--pc-ink:#111314}
/* the quality scale for graded numbers (xPts, form): every step has a colour, none is grey */
:root{--q1:#2fb36b;--q2:#8fd19e;--q3:#f2d46b;--q4:#f5a05a;--q5:#ef6b5f;--q-ink:#111314}
[data-k=xpts]{--st:var(--st-xpts)}[data-k=form]{--st:var(--st-form)}[data-k=eo]{--st:var(--st-eo)}
[data-k=price]{--st:var(--st-price)}[data-k=sel]{--st:var(--st-sel)}[data-k=opp]{--st:var(--st-opp)}
.sc[data-g="0"]{--gb:var(--st)}.sc[data-g="1"]{--gb:var(--q1)}.sc[data-g="2"]{--gb:var(--q2)}.sc[data-g="3"]{--gb:var(--q3)}.sc[data-g="4"]{--gb:var(--q4)}.sc[data-g="5"]{--gb:var(--q5)}

.prow>.pc,.brow>.pc{flex:0 1 92px;width:auto;min-width:0}
.pc{--kh:clamp(46px,12.5vw,62px);gap:0;transition:transform .3s var(--f-spring)}
.pc .kit{position:relative;height:var(--kh);place-items:end center}
.pc .kit svg{width:calc(var(--kh) * .92);height:auto;filter:none}
.pc .kit::after{content:"";position:absolute;left:50%;bottom:-3px;width:62%;height:6px;translate:-50% 0;border-radius:50%;background:#0000004d;z-index:-1}
.pc .pn{width:auto;max-width:100%;margin-top:4px;padding:0 6px;border-radius:5px;background:var(--pc-card);color:var(--pc-ink);font:800 clamp(10px,2.7vw,11.5px)/1.6 Manrope;box-shadow:none}
.pc.pos1 .pn,.pc.pos2 .pn,.pc.pos3 .pn,.pc.pos4 .pn{box-shadow:none}
.pc.bought .pn{box-shadow:inset 0 -2px var(--good)}
.pc .pb{position:static;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:2px 3px;width:auto;max-width:100%;margin-top:3px;padding:0;
  background:none;border-radius:0;overflow:visible;white-space:normal}
.pc .pb:empty{display:none}
.pc .pb>*{white-space:nowrap}
.pc .pb .fixture-pill,.pc .pb .pfx{padding:0 4px;border-radius:3px;font:800 9.5px/1.6 Manrope;letter-spacing:.01em}
.pc .pb em.sc{display:inline-flex;align-items:baseline;gap:2px;flex:none;padding:0 4px;border-radius:3px;background:var(--gb);color:var(--q-ink);
  font:800 10px/1.6 Manrope;font-style:normal;font-variant-numeric:tabular-nums;box-shadow:none}
.pc .pb em.sc i{padding:0;background:none;color:inherit;opacity:.62;font:800 8.5px/1 Manrope;font-style:normal}
.pc .pb em.sc b{padding:0;background:none;color:inherit;font:inherit}
.pc .pc-eo,.pc .pb:has(+.pc-eo:not(.off)){border-radius:0}
.pc .pc-eo{width:auto;margin-top:2px;padding:0;border:0;background:none;color:#ffffffbf;font:700 9.5px/1.4 Manrope}
.pc .pc-eo.off{display:none}
.pc .eo-l{font-style:normal;opacity:.8}
.pc .arm{top:-2px;right:calc(50% - var(--kh) * .62)}
.arm{background:var(--accent);box-shadow:none}
.arm.v{background:var(--pc-card);color:var(--pc-ink)}
.pfx{border-radius:3px}
.pc-eonote{background:color-mix(in oklab,var(--pitch) 60%,#000);border-top:0}

/* Compact: no plate at all, the name sits on the grass */
html[data-cards=minimal] .pc .pn{padding:0 2px;background:none;color:#fff;text-shadow:0 1px 2px #000b}
/* Modern: xPts is a coin on the shirt, filled with its grade; the name sits plainly underneath */
html[data-cards=coin] .pc .pn{padding:0 2px;background:none;color:#fff;text-shadow:0 1px 2px #000b}
html[data-cards=coin] .pc .pb em.px{position:absolute;z-index:2;top:calc(var(--kh) - 24px);left:calc(50% + var(--kh) * .16);display:grid;place-items:center;
  width:26px;height:26px;padding:0;border-radius:50%;font-size:10.5px;box-shadow:0 2px 4px #0006}
html[data-cards=coin] .pc .pb em.px i{display:none}
@media (max-width:560px){html[data-cards=coin] .pc .pb em.px{width:23px;height:23px;font-size:9.5px;top:calc(var(--kh) - 20px)}}
/* Live cards follow the same frame: EO is a quiet line on the grass, not a box, so five shirts fit even at 320px */
.lv-pitch .pc .lv-ceo{width:auto;max-width:100%;margin-top:2px;padding:0;border-radius:0;background:none;color:#ffffffbf;font:700 9.5px/1.4 Manrope;overflow:hidden;text-overflow:ellipsis}
.lv-pitch .pc .pb:has(+.lv-ceo){border-radius:0}
/* the GW switcher (‹ GW + countdown ›) sits in the middle of its bar on every page: Projections' tabs, Maps */
.vbar{flex-wrap:wrap}
.vbar>.gwdock{flex:1 1 100%;justify-content:center}
.gwdock-mid{text-align:center}
/* a tab row inside a page header never outgrows the phone: the tabs scroll sideways instead */
.vhead>.vtabs{min-width:0;max-width:100%}
/* header: wide screens name the team; phones name the manager (first name) */
.teamchip .fn{display:none}
/* phones: logo and every control share ONE row (never logo above, controls below), and the header stays short.
   The right group may shrink; the name chip gives way first (ellipsis), sign in is a person icon and the
   day/night switch is one round key showing the current mode. */
@media (max-width:760px){
  html .wtop{flex-wrap:wrap;row-gap:0;column-gap:8px;padding:6px 12px 0}
  html .wtop>.brand{flex:none}
  html .wtop>.wtop-r{flex:1 1 0;min-width:0;justify-content:flex-end;gap:6px;margin-left:0}
  html .wtabs{height:40px;margin:6px -12px 0}
  .wtop-r>*{flex:none}
  .wtop-r>.teamctl{flex:0 1 auto;min-width:0}
  .teamchip{max-width:100%;min-width:0}
  .teamchip .tn{display:none}
  .teamchip .fn{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  html #clerk-sign-in{width:34px;min-width:34px;padding:0;font-size:0;display:inline-grid;place-items:center}
  html #clerk-sign-in[hidden]{display:none}
  #clerk-sign-in::before{content:"";width:17px;height:17px;background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.2-4 4.3-6 8-6s6.8 2 8 6'/%3E%3C/svg%3E") center/contain no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.2-4 4.3-6 8-6s6.8 2 8 6'/%3E%3C/svg%3E") center/contain no-repeat}
  html #themeToggle .slot{width:30px}
  html #themeToggle .slot::before,html #themeToggle .slot::after{display:none}
  html #themeToggle .slot i,html #themeToggle[aria-checked=true] .slot i{left:4px}
  html .wtop-r .search{width:34px;min-width:34px;padding:0;justify-content:center}
}
/* planner: the squad strip across the top of the pitch (bank, FT, team value, hit, chip), centred between the crests,
   so one screenshot of the team says everything. The EO tier picker lives on the bench's label row instead. */
.pstrip{position:absolute;z-index:2;top:12px;left:50%;translate:-50% 0;max-width:66%;display:flex;align-items:baseline;justify-content:center;gap:5px;white-space:nowrap;overflow:hidden;font:600 11px/1.3 Manrope;color:#ffffffb8;pointer-events:none}
.pstrip b{color:#fff;font-weight:800}
.pstrip>i{font-style:normal;opacity:.45}
.pstrip>span{flex:none}
.pstrip .ps-who{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
.pstrip .neg,.pstrip .neg b{color:#ff9a8f}
.pstrip .ps-chip{padding:0 5px;border-radius:3px;background:var(--accent);color:var(--accent-ink);font-weight:800}
#v-planner .pitchbox .pitch2:has(>.pstrip){padding-top:38px}
#v-planner .pitchbox:has(.lv-pick:not(.off)) .pitch2::after{top:24px}
#v-planner .dugout>.lv-pick{top:8px;right:8px}
@media (max-width:760px){
  .pstrip{top:9px;max-width:calc(100% - 128px);gap:4px;font-size:10px}
  #v-planner .pitchbox:has(.lv-pick:not(.off)) .pitch2::after{top:14px}
}
/* phones: the whole XI, the bench and the strip fit one screen under the sticky GW bar (a screenshot is the team).
   Rows sit closer, the bench label row is only as tall as its picker, and on short phones the shirts shrink a
   little with the screen height so the bench is never cut off. */
@media (max-width:560px){
  #v-planner .pitchbox .pitch2:has(>.pstrip){padding-top:30px}
  #v-planner .pitch2{gap:6px;padding-bottom:12px}
  #v-planner .dugout{padding-top:40px;padding-bottom:8px}
  #v-planner .dugout>.label{top:8px}
  #v-planner .dugout>.lv-pick{top:5px;right:6px}
  #v-planner .dugout:has(>.lv-pick:not(.off)){padding-top:50px}
  #v-planner .dugout:has(>.lv-pick:not(.off))>.label{top:12px}
  #v-planner .pc{--kh:clamp(34px,min(12.5vw,(100svh - var(--wtop,88px) - 400px) / 5),62px)}
}
/* sign in / sign up dialog (Clerk): the site's palette, readable in both themes. Literal colours, because Clerk sets
   its own --accent and friends inside the dialog (var(--accent) there is Clerk's green), and inside the layer,
   because the site's own layered button rules were bleeding in (the Google button had faded to grey text on nothing). */
@layer kft-studio{
  html :is(.cl-cardBox){border:1px solid #ffffff1f!important;box-shadow:0 30px 70px -20px #000c!important}
  html .cl-card{border:0!important;box-shadow:none!important}
  html .cl-footer{border-top:1px solid #ffffff14!important}
  html .cl-footer *{background-image:none!important}
  html :is(.cl-socialButtonsBlockButton,.cl-formFieldInput,.cl-formButtonPrimary){min-height:46px!important}
  html .cl-formButtonPrimary{font-weight:800!important}
  html .cl-formButtonPrimary::after{display:none!important}
  html :is(.cl-cardBox,.cl-card,.cl-footer){background:#181a1c!important;background-image:none!important;color:#f4efe6!important}
  html :is(.cl-headerTitle,.cl-formFieldLabel,.cl-identityPreviewText){color:#f4efe6!important}
  html :is(.cl-headerSubtitle,.cl-dividerText,.cl-footerActionText,.cl-formFieldHintText,.cl-formFieldInfoText){color:#d8d1c4!important;opacity:1!important}
  html .cl-dividerLine{background:#ffffff2e!important}
  html :is(.cl-socialButtonsBlockButton,.cl-alternativeMethodsBlockButton){background:#202225!important;background-image:none!important;border:1px solid #ffffff2e!important;box-shadow:none!important;opacity:1!important}
  html :is(.cl-socialButtonsBlockButton,.cl-alternativeMethodsBlockButton,.cl-socialButtonsBlockButton *){color:#f4efe6!important;opacity:1!important}
  html :is(.cl-formFieldInput,.cl-otpCodeFieldInput){background:#111314!important;color:#f4efe6!important;border:1px solid #ffffff2e!important;box-shadow:none!important}
  html .cl-formFieldInput::placeholder{color:#a59d8f!important;opacity:1!important}
  html .cl-formFieldInput:focus{border-color:#fdc57e!important;box-shadow:0 0 0 3px #fdc57e33!important}
  html .cl-formButtonPrimary{background:#fdc57e!important;background-image:none!important;border:0!important;box-shadow:none!important;text-shadow:none!important}
  html :is(.cl-formButtonPrimary,.cl-formButtonPrimary *){color:#1a1206!important}
  html :is(.cl-footerActionLink,.cl-formResendCodeLink,.cl-identityPreviewEditButton,.cl-formFieldAction){color:#fdc57e!important;opacity:1!important}
  html .cl-modalCloseButton{color:#d8d1c4!important;opacity:1!important}
  html[data-theme=light] :is(.cl-cardBox,.cl-card,.cl-footer){background:#fbf7f0!important;background-image:none!important;color:#111314!important}
  html[data-theme=light] :is(.cl-headerTitle,.cl-formFieldLabel,.cl-identityPreviewText){color:#111314!important}
  html[data-theme=light] :is(.cl-headerSubtitle,.cl-dividerText,.cl-footerActionText,.cl-formFieldHintText,.cl-formFieldInfoText){color:#3d3830!important;opacity:1!important}
  html[data-theme=light] .cl-dividerLine{background:#11131433!important}
  html[data-theme=light] :is(.cl-socialButtonsBlockButton,.cl-alternativeMethodsBlockButton){background:#ffffff!important;background-image:none!important;border:1px solid #11131433!important;box-shadow:none!important;opacity:1!important}
  html[data-theme=light] :is(.cl-socialButtonsBlockButton,.cl-alternativeMethodsBlockButton,.cl-socialButtonsBlockButton *){color:#111314!important;opacity:1!important}
  html[data-theme=light] :is(.cl-formFieldInput,.cl-otpCodeFieldInput){background:#ffffff!important;color:#111314!important;border:1px solid #11131433!important;box-shadow:none!important}
  html[data-theme=light] .cl-formFieldInput::placeholder{color:#6b6458!important;opacity:1!important}
  html[data-theme=light] .cl-formFieldInput:focus{border-color:#1c4286!important;box-shadow:0 0 0 3px #1c428633!important}
  html[data-theme=light] .cl-formButtonPrimary{background:#1c4286!important;background-image:none!important;border:0!important;box-shadow:none!important;text-shadow:none!important}
  html[data-theme=light] :is(.cl-formButtonPrimary,.cl-formButtonPrimary *){color:#ffffff!important}
  html[data-theme=light] :is(.cl-footerActionLink,.cl-formResendCodeLink,.cl-identityPreviewEditButton,.cl-formFieldAction){color:#1c4286!important;opacity:1!important}
  html[data-theme=light] .cl-modalCloseButton{color:#3d3830!important;opacity:1!important}
  html[data-theme=light] .cl-cardBox{border-color:#11131426!important}
  html[data-theme=light] .cl-footer{border-top-color:#11131414!important}
}
/* phones: a dropdown in a control bar never outgrows the screen (Player maps' Metric list sized itself to its
   longest option and pushed the page 20px wider at 320) */
@media (max-width:560px){
  .kft-dock-bar>label.field{min-width:0;max-width:100%}
  .kft-dock-bar>label.field select{min-width:0;max-width:100%;text-overflow:ellipsis}
}
/* Gameweek: every section opens its tool (js/views/home.js asks first), so it reads as tappable */
#v-home :is(.section,.grid2>div):has(>h2,>.gws-head,>div>h2.gw-team-h){cursor:pointer}
/* dialogs: no status dot before the title (a coloured dot read as a glowing light) */
@layer kft-studio{html .kft-dialog-mark{display:none!important}}
/* planner name bar on phones: name and rank shorten with an ellipsis instead of running under Captain; Best captain
   (when shown) takes its own line; on narrow phones Display is its icon alone */
.mb-who{grid-template-columns:minmax(0,1fr)}
.mb-who small{overflow:hidden;text-overflow:ellipsis}
.mb-s{flex:none;min-width:0}
@media (max-width:560px){
  .mbar{flex-wrap:wrap;row-gap:6px}
  .mbar>.mb-who{flex:1 1 0}
  .mbar>.mb-best{order:9;flex:1 1 100%;display:flex;align-items:baseline;gap:6px;padding-top:6px;border-top:1px solid var(--hair)}
}
@media (max-width:400px){
  .mbar{gap:12px}
  html .disp-key{font-size:0!important;gap:0;padding:0 11px!important}
  .disp-key svg{width:18px;height:18px}
  /* the squad strip gets the room: smaller crests closer to the edge */
  .pitch2::before,.pitch2::after{width:34px;top:10px}
  .pitch2::before{left:8px}.pitch2::after{right:8px}
  #v-planner .pitchbox:has(.lv-pick:not(.off)) .pitch2::after{top:10px}
  .pstrip{max-width:calc(100% - 92px);gap:3px;font-size:9.5px}
}
/* planner plan panel on narrow phones: Bank, Team value, Sell value and Hit sit two by two (four across ran their
   labels into each other at 320), and the Free transfers label fits its slot */
@media (max-width:400px){
  #v-planner .pdock>.pd:nth-child(n+2):nth-child(-n+5){grid-column:span 6}
  #v-planner .pdock>.pd:first-child>small{font-size:9.5px;letter-spacing:.01em;white-space:nowrap}
  #v-planner .pdock .ftstep{gap:4px}
  #v-planner .pdock .ftstep>.key{width:28px;min-width:28px}
}

/* narrow phones: a card's fixture and number pills sit a little tighter, so a row of cards either all fit on one
   line or all stack, never a mix (4-across rows at 320 had some wrapping and some not) */
@media (max-width:400px){
  .pc .pb{column-gap:2px}
  .pc .pb>.fixture-pill,.pc .pb>em{padding-inline:3px!important}
}

/* Prices direction filter: each key as wide as its label, long labels wrap onto two lines instead of running into the next key */
@layer kft-studio{
  html #v-prices .pr-tools>.bank:not(#kf-x){grid-auto-columns:auto!important}
  html #v-prices .pr-tools>.bank>button:not(#kf-x){white-space:normal!important;line-height:1.1!important;padding-inline:6px!important;overflow-wrap:normal!important}
}

/* Five-across rows on phones: fixture + xP stay on one line on every card, so no card in the row breaks while its neighbours don't */
@media (max-width:480px){
  :is(#v-planner,#v-home,#v-live) .prow:has(>.pc:nth-child(5)) .pc .pb{column-gap:1px}
  :is(#v-planner,#v-home,#v-live) .prow:has(>.pc:nth-child(5)) .pc .pb>.fixture-pill,
  :is(#v-planner,#v-home,#v-live) .prow:has(>.pc:nth-child(5)) .pc .pb>em{padding-inline:2px!important;gap:1px!important}
}
@media (max-width:340px){
  :is(#v-planner,#v-home,#v-live) .prow:has(>.pc:nth-child(5)) .pc .pb{flex-direction:column;align-items:center;row-gap:2px}
}

/* Landing finale key: flat accent with dark ink like every other accent key (white on amber was hard to read) */
.fn-go,.fn-go:hover,.fn-go:active{background:var(--accent);color:var(--accent-ink);border-color:transparent}
