/* Career Path. Site tokens from /styles.css, header from /site.css. */
.cp-in { max-width: 560px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.cp-strip { border-bottom: 1px solid var(--rule); background: var(--card); }
.cp-strip .cp-in { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.cp-strip h1 { margin: 0; font: 800 1.55rem/1 var(--f-display); text-transform: uppercase; }
.cp-date { margin-left: auto; font: 700 0.72rem/1 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cp-help { width: 44px; height: 44px; margin-right: -8px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.cp-help svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; }
.cp-main { display: grid; gap: 12px; padding-top: 14px; padding-bottom: 28px; }
.cp-note { margin: 0; font-size: 0.86rem; color: var(--muted); border-left: 3px solid var(--pin); padding: 4px 0 4px 10px; }
.cp-loading { color: var(--muted); }
/* score bug */
.cp-bug { display: flex; height: 48px; border-radius: 6px; overflow: hidden; color: #f3f6ef; font: 800 1.15rem/1 var(--f-display); }
.cp-bug .no { background: var(--brand); display: grid; place-items: center; padding: 0 10px; }
.cp-bug .mid { flex: 1; background: #16211b; display: flex; align-items: center; gap: 8px; padding: 0 10px; text-transform: uppercase; min-width: 0; }
.cp-bug .mult { padding: 4px 6px; border-radius: 4px; background: var(--pin); color: var(--on-pin); }
.cp-bug .tiles { margin-left: auto; display: flex; gap: 3px; }
.cp-bug .total { background: var(--pin); color: var(--on-pin); display: grid; place-content: center; justify-items: center; min-width: 62px; padding: 0 10px; font-size: 1.7rem; line-height: 0.9; }
.cp-bug .total small { font: 700 0.6rem/1 var(--f-body); letter-spacing: 0.12em; }
.tl { width: 11px; height: 11px; border-radius: 2px; background: #33433a; display: inline-block; }
.tl.g1 { background: #3fbd78; } .tl.g2 { background: #c9d630; } .tl.g3 { background: #e0a100; } .tl.x { background: #6b7a70; }
/* the career */
.cp-card { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.cp-card h2 { margin: 0; padding: 10px 14px; font: 800 1.1rem/1 var(--f-display); letter-spacing: 0.06em; text-transform: uppercase; background: var(--brand); color: #f3f6ef; display: flex; justify-content: space-between; }
.cp-rows { list-style: none; margin: 0; padding: 4px 0; }
.cp-rows li { display: grid; grid-template-columns: 6.6em 1fr; gap: 10px; align-items: baseline; padding: 7px 14px; border-bottom: 1px solid var(--rule-soft); }
.cp-rows li:last-child { border-bottom: 0; }
.cp-rows .yr { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.95rem; }
.cp-rows .cl { font: 800 1.3rem/1.1 var(--f-display); text-transform: uppercase; }
.cp-rows .loan .cl { font-size: 1.1rem; color: var(--muted); }
.cp-rows .loan .cl::before { content: "→ "; }
.cp-rows .loan .cl small { font: 600 0.75rem var(--f-body); text-transform: none; margin-left: 4px; }
/* clues */
/* guess */
.cp-guess { position: relative; display: grid; gap: 8px; }
.cp-guess input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 8px; border: 1.5px solid var(--rule); background: var(--card); color: var(--ink); font: 600 1.1rem var(--f-body); }
.cp-guess input:focus-visible { outline: 3px solid var(--pin); outline-offset: 1px; }
/* suggestions sit in the page (not floating over it), so normal page scrolling always works */
.cp-list { margin: -4px 0 0; padding: 4px; list-style: none; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; }
.cp-list li { padding: 9px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cp-list li b { font-weight: 700; }
.cp-list li small { color: var(--muted); font-size: 0.82rem; }
.cp-list li[aria-selected="true"], .cp-list li:hover { background: var(--sel-fill); }
.cp-tries { display: flex; gap: 6px; align-items: center; font-size: 0.88rem; color: var(--muted); }
.cp-wrong { margin: 0; padding: 0; list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }
.cp-wrong li { padding: 4px 10px; border-radius: 999px; background: #f6d2cc; color: #5a1a10; font-size: 0.85rem; font-weight: 600; text-decoration: line-through; }
.cp-btn { min-height: 50px; border: 0; border-radius: 6px; background: var(--brand); color: #f3f6ef; font: 800 1.35rem/1 var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; box-shadow: inset 0 -4px 0 var(--brand-deep); }
.cp-btn:disabled { opacity: .5; cursor: default; }
.cp-btn:focus-visible, .cp-help:focus-visible { outline: 3px solid var(--pin); outline-offset: 3px; }
/* reveal */
.cp-reveal { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--rule); }
.cp-reveal .v { font: 800 1.9rem/1 var(--f-display); text-transform: uppercase; }
.cp-reveal .v.ok { color: var(--good); } .cp-reveal .v.miss { color: #a3321f; }
.cp-reveal p { margin: 4px 0 0; color: var(--muted); font-weight: 600; }
.cp-reveal .pts { font: 800 2.4rem/1 var(--f-display); }
/* full time */
.cp-ft { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 16px; display: grid; gap: 12px; text-align: center; }
.cp-ft .k { margin: 0; font: 700 0.8rem var(--f-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cp-ft .tot { font: 800 4rem/0.9 var(--f-display); }
.cp-ft .tot small { display: block; font: 700 0.85rem var(--f-body); color: var(--muted); }
.cp-ft .rows { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cp-ft .rows div { display: grid; gap: 4px; justify-items: center; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.cp-ft .rows b { font: 800 1.1rem var(--f-display); color: var(--ink); }
.cp-ft .tl { width: 22px; height: 22px; border-radius: 4px; }
.cp-ft .who { font-size: 0.85rem; color: var(--muted); text-align: left; margin: 0; padding-left: 1.3em; }
.cp-ft .stats { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cp-ft .stats dd { margin: 0; font: 800 1.6rem var(--f-display); } .cp-ft .stats dt { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.cp-ft .stats div { display: flex; flex-direction: column-reverse; }
.cp-ft .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cp-ft .two a { display: grid; place-items: center; min-height: 44px; border-radius: 6px; border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; font: 800 1rem var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; }
.cp-ft .two a.y { background: var(--pin); border-color: var(--pin); color: var(--on-pin); }
.cp-ft .copied { margin: 0; min-height: 1.2em; color: var(--good); font-weight: 600; font-size: 0.9rem; }
.cp-dlg { width: min(440px, calc(100vw - 24px)); border: 0; border-radius: 10px; padding: 18px; background: var(--card); color: var(--ink); }
.cp-dlg::backdrop { background: rgba(8, 18, 12, .55); }
.cp-dlg h2 { margin: 0 0 8px; font: 800 1.6rem var(--f-display); text-transform: uppercase; }
.cp-dlg ol { padding-left: 1.2em; display: grid; gap: 6px; }
.cp-dlg .btn { border: 0; cursor: pointer; width: 100%; justify-content: center; }
.cp-empty h2 { font: 800 2rem/1 var(--f-display); text-transform: uppercase; margin: 0 0 6px; }
@media (prefers-reduced-motion: no-preference) { .cp-pop { animation: cpPop .35s ease; } }
@keyframes cpPop { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }

/* guess + skip */
.cp-acts { display: grid; grid-template-columns: 7em 1fr; gap: 8px; }
.cp-skip { min-height: 50px; border-radius: 6px; border: 1.5px solid var(--rule); background: transparent; color: var(--muted); font: 800 1.1rem var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.cp-skip:hover { border-color: var(--muted); color: var(--ink); }
/* full time: one line per player */
.cp-res { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.cp-res li { display: grid; grid-template-columns: 2.2em 1fr 1.6em 3.6em; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--paper); border-left: 4px solid var(--rule); }
.cp-res li.ok { border-left-color: var(--sel); } .cp-res li.no { border-left-color: #c0392b; }
.cp-res .r { font: 800 1rem var(--f-display); color: var(--muted); }
.cp-res .n { font-weight: 700; } .cp-res .n small { display: block; font-weight: 500; color: var(--muted); font-size: 0.8rem; }
.cp-res .mk { font-weight: 800; text-align: center; } .cp-res li.ok .mk { color: var(--good); } .cp-res li.no .mk { color: #c0392b; }
.cp-res b { font: 800 1.2rem var(--f-display); text-align: right; }

/* 18 Nov: feel. Sound switch, clubs dropping in, a shake for a wrong guess, clues flipping open, the reveal landing,
   points flying up, full time counting up. All of it off for reduced motion. */
.cp-snd { margin-right: -4px; }
.cp-snd svg { stroke-width: 2; }
.cp-snd[aria-pressed="false"] { color: var(--muted); }
.cp-card { transition: border-color .3s ease, box-shadow .3s ease; }
.cp-card.cp-won { border-color: var(--sel); box-shadow: 0 0 0 2px var(--sel); }
.cp-reveal.is-ok { border-color: var(--sel); background: var(--sel-fill); }
.cp-reveal.is-miss { border-color: #c0392b; }
.cp-reveal .pts { color: var(--good); }
.cp-reveal.is-miss .pts { color: var(--muted); }
.cp-bug .total { transition: transform .2s ease; }
@media (prefers-reduced-motion: no-preference) {
  .cp-intro .pf-tab tbody tr { animation: cpDrop .42s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(var(--i) * 90ms + 80ms); }
  .cp-shake { animation: cpShake .38s ease; }
  .cp-flip { animation: cpFlip .5s ease .3s both; }
  .cp-fly { animation: cpFly .7s cubic-bezier(.2, .9, .3, 1.3) .15s both; }
  .cp-reveal.is-ok .v { animation: cpStamp .45s cubic-bezier(.2, .9, .3, 1.4) both; }
  .cp-stagger li { animation: cpDrop .4s ease both; animation-delay: calc(var(--i) * 110ms + 500ms); }
  .cp-ft .tot { animation: cpStamp .5s cubic-bezier(.2, .9, .3, 1.4) .3s both; }
}
@keyframes cpDrop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes cpDot { 0% { transform: scale(0); } 70% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes cpShake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes cpFlip { from { transform: rotateX(90deg); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes cpFly { from { transform: translateY(14px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cpStamp { 0% { transform: scale(1.8); opacity: 0; } 60% { transform: scale(.94); opacity: 1; } 100% { transform: none; } }

/* 18 Nov: Option A, the matchday programme. Career Path is a player profile page: a big "?" squad number, the facts
   (clues) filling in, and the career as a stats table. */
.cp-prof { padding: 14px 14px 10px; display: grid; gap: 12px; }
.pf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 6px; border-bottom: 3px solid var(--ink); }
.pf-head h2 { margin: 0; padding: 0; background: none; color: var(--ink); font: 800 1.9rem/0.9 var(--f-display); letter-spacing: 0; text-transform: uppercase; display: block; }
.pf-head span { font: 700 0.72rem var(--f-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pf-top { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.pf-num { position: relative; height: 112px; border-radius: 8px; background: var(--brand); color: var(--chalk); display: grid; place-items: center; padding-bottom: 8px;
  font: 800 4.6rem/1 var(--f-display); box-shadow: inset 0 -5px 0 var(--brand-deep); transition: background .3s ease; }
.pf-num span { position: absolute; left: 6px; right: 6px; bottom: -9px; padding: 3px 0; border-radius: 4px; background: var(--pin); color: var(--on-pin);
  font: 800 0.74rem/1 var(--f-display); letter-spacing: 0.05em; text-align: center; text-transform: uppercase; white-space: nowrap; }
.cp-won .pf-num { background: var(--sel); color: var(--on-sel); box-shadow: inset 0 -5px 0 rgba(0,0,0,.18); }
.cp-lost .pf-num { background: #7d2a1c; box-shadow: inset 0 -5px 0 #5a1a10; }
.pf-facts { margin: 0; display: grid; gap: 0; }
.pf-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px dotted var(--rule); }
.pf-facts dt { font: 700 0.68rem var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pf-facts dd { margin: 0; font: 800 1.08rem/1.05 var(--f-display); text-transform: uppercase; text-align: right; }
.pf-facts dd small { font: 600 0.72rem var(--f-body); text-transform: none; color: var(--muted); }
.pf-facts .locked dd { display: inline-flex; align-items: center; gap: 4px; font: 600 0.82rem var(--f-body); text-transform: none; color: var(--muted); }
.pf-facts .locked svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pf-facts .on:not(:nth-child(n+3)) dd { color: var(--sel); }
.pf-tab { width: 100%; border-collapse: collapse; }
.pf-tab th { padding: 4px 4px 5px; border-bottom: 2px solid var(--ink); text-align: left; font: 700 0.68rem var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pf-tab th abbr { text-decoration: none; }
.pf-tab td { padding: 8px 4px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
.pf-tab tr:last-child td { border-bottom: 0; }
.pf-tab .cl { font: 800 1.2rem/1.05 var(--f-display); text-transform: uppercase; }
.pf-tab .yr { width: 6.2em; color: var(--muted); font-weight: 600; font-size: 0.88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-tab .n { width: 3.4em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-tab tr.loan td { padding-top: 5px; padding-bottom: 5px; }
.pf-tab tr.loan .cl { padding-left: 14px; font-size: 1rem; color: var(--muted); }
.pf-tab tr.loan .cl small { font: 700 0.62rem var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; background: var(--rule-soft); vertical-align: 2px; }
.pf-tab tr.loan td.n, .pf-tab tr.loan .yr { color: var(--muted); font-weight: 500; }
.cp-won .pf-tab tbody tr:not(.loan) .cl { color: var(--sel); }
.pf-src { margin: -6px 0 0; font-size: 0.72rem; color: var(--muted); text-align: right; }
@media (max-width: 380px) { .pf-top { grid-template-columns: 84px 1fr; gap: 12px; } .pf-num { height: 100px; font-size: 4rem; } .pf-tab .yr { width: 5.6em; font-size: 0.82rem; } .pf-tab .cl { font-size: 1.08rem; } }
@media (prefers-reduced-motion: no-preference) { .cp-won .pf-num, .cp-lost .pf-num { animation: cpStamp .45s cubic-bezier(.2, .9, .3, 1.4) both; } }
