/* ==========================================================================
   WINGSPAN — Self-hosted fonts
   Archivo + Archivo Narrow, self-hosted so the standalone build's CSP can
   say font-src 'self' without allowing fonts.gstatic.com. Same families,
   same weights, same @font-face shape Google Fonts serves — pulled straight
   from https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700
   &family=Archivo+Narrow:wght@400;600;700&display=swap, latin + latin-ext
   subsets only (player names include accented Latin characters; vietnamese
   and the rest are dropped). Both are variable fonts — one woff2 per family
   per subset covers the whole 400-700 weight range. See build.py, standalone
   branch, for how this gets inlined into app.<hash>.css. License: OFL.txt.
   ========================================================================== */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo Narrow';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/archivo-narrow-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo Narrow';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/archivo-narrow-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ==========================================================================
   WINGSPAN — Design tokens
   Derived from wingspanscouting.com. See ../brand/BRAND.md for rationale.
   Framework-agnostic on purpose: stack is not yet chosen.
   ========================================================================== */

:root {
  /* --- Brand ------------------------------------------------------------ */
  --ws-ink:        #0D0D0D;  /* ground. NOT #000 — 5% lightness             */
  --ws-bone:       #FAFAF7;  /* warm off-white. NOT #FFF                    */
  --ws-gold:       #FFCC00;  /* emphasis. ONLY ever on ink                  */
  --ws-flare:      #FF2B00;  /* live / gap / attention. Used sparingly      */

  /* --- Surface ladder --------------------------------------------------- */
  --ws-ink-900:    #000000;  /* recessed wells, inputs, table gutters       */
  --ws-ink-800:    #0D0D0D;  /* app ground                                  */
  --ws-ink-700:    #161616;  /* cards, panels                               */
  --ws-ink-600:    #212121;  /* raised / hover                              */
  --ws-ink-500:    #2E2E2E;  /* borders, dividers                           */
  --ws-ink-400:    #3D3D3D;  /* stronger borders                            */

  /* --- Text on ink ------------------------------------------------------ */
  --ws-text:       #FAFAF7;
  --ws-text-dim:   rgba(250, 250, 247, 0.62);
  --ws-text-mut:   rgba(250, 250, 247, 0.50);  /* 0.38 measured ~3.4:1 on ink-700; 0.50 clears 4.5:1 for 11px micro text */
  --ws-text-ghost: rgba(250, 250, 247, 0.20);

  /* --- Signal taxonomy (spec §4.8) -------------------------------------- */
  /* Four signal types, four colours. The palette does not grow past this.  */
  --ws-signal-strong:   var(--ws-gold);      /* evidence supports it        */
  --ws-signal-early:    var(--ws-text-dim);  /* pattern visible, thin data  */
  --ws-signal-gap:      var(--ws-flare);     /* below target range          */
  --ws-signal-evidence: transparent;         /* unknown — drawn as absence  */

  --ws-positive:   #4ADE80;  /* verified / above benchmark                  */

  /* --- Type -------------------------------------------------------------
     Display resolves to Tablet Gothic Compressed once licensed for self-
     hosting; Archivo Narrow stands in until then. Single swap point.      */
  --ws-display: "Tablet Gothic Compressed", "Archivo Narrow", "Helvetica Neue Condensed", sans-serif;
  --ws-body:    "Archivo", "Tablet Gothic", system-ui, -apple-system, sans-serif;
  --ws-mono:    ui-monospace, "SF Mono", Menlo, monospace;

  --ws-lh-display: 0.68;   /* the signature. Lines interlock.               */
  --ws-lh-tight:   1.15;
  --ws-lh-body:    1.5;
  --ws-lh-read:    1.6;    /* long-form drafts a scout reads top to bottom  */

  /* Reading measure for generated prose (AI drafts, report fields). A wide
     desktop column otherwise runs a paragraph 150+ characters to a line.   */
  --ws-measure:    68ch;
  --ws-fs-read:    1rem;     /* 16 — draft body text, one step over UI body */
  --ws-fs-statline: 0.875rem; /* 14 — his one-line stat format, monospace   */

  /* Display scale — never below 28px, always uppercase, always 700 */
  --ws-fs-display-xl: clamp(3rem, 7vw, 6rem);
  --ws-fs-display-l:  clamp(2.25rem, 5vw, 4rem);
  --ws-fs-display-m:  1.75rem;
  --ws-fs-display-s:  1.25rem;

  /* UI scale */
  --ws-fs-body:   0.9375rem;  /* 15 */
  --ws-fs-small:  0.8125rem;  /* 13 */
  --ws-fs-micro:  0.6875rem;  /* 11 — labels, source tags */

  --ws-ls-micro:  0.08em;
  --ws-ls-label:  0.04em;

  /* --- Geometry --------------------------------------------------------- */
  --ws-radius:    2px;        /* squared. The dot is the only circle.       */
  --ws-radius-pill: 999px;    /* dots and the mark only                     */
  --ws-border:    1px solid var(--ws-ink-500);
  --ws-border-strong: 1px solid var(--ws-ink-400);

  /* --- Space (4px base) -------------------------------------------------- */
  --ws-1: 0.25rem;  --ws-2: 0.5rem;   --ws-3: 0.75rem;  --ws-4: 1rem;
  --ws-5: 1.5rem;   --ws-6: 2rem;     --ws-7: 3rem;     --ws-8: 4rem;
  --ws-9: 6rem;

  /* Touch floor. Every control the scout hits courtside, at every width
     (a tablet is wider than the phone query but just as thumb-driven).    */
  --ws-touch:     44px;

  /* --- Motion — fades only. No spring, no parallax. ---------------------- */
  --ws-ease:      200ms cubic-bezier(0.2, 0, 0.2, 1);
  --ws-ease-slow: 400ms cubic-bezier(0.2, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ==========================================================================
   WINGSPAN — Components
   Depends on tokens.css. See ../brand/BRAND.md.
   Rules enforced here:
     · gold only ever on ink        · flat — no gradients, no glows
     · squared — radius 0-2px       · the dot is the only circle
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

/* The `hidden` attribute must always win, no matter what inline style="..."
   an element also carries — see gen_prototype.py's SB_HTML markers for the
   history (a "hidden" roster filter row and a sign-in password row both
   used to render anyway because an inline display value outranks the UA
   [hidden] rule). Elements toggled with `hidden` now use a class
   (.ws-inline-flex / .ws-block) for their shown-state layout instead of an
   inline display, and this !important is the belt-and-suspenders backstop. */
[hidden] { display: none !important; }

body.ws {
  margin: 0;
  color: var(--ws-text);
  font-family: var(--ws-body);
  font-size: var(--ws-fs-body);
  line-height: var(--ws-lh-body);
  -webkit-font-smoothing: antialiased;
  /* The app ground carries the same pebble crop as the locked screen
     (see body[data-locked] near the end of this file) but far fainter and
     with no vignette — a near-opaque ink veil (rgba matches --ws-ink-800's
     own #0D0D0D) over the image, ~3-4% show-through everywhere, so the
     brand surface reads through the whole signed-in app rather than just
     the sign-in screen. body[data-locked] overrides this with its own
     stronger, vignetted version at equal selector specificity, later in
     this file. */
  background-color: var(--ws-ink-800);
  background-image:
    linear-gradient(rgba(13, 13, 13, 0.965), rgba(13, 13, 13, 0.965)),
    url("/assets/texture-pebble.png");
  background-size: cover, cover;
  background-position: 50% 40%, 50% 40%;
  background-repeat: no-repeat, no-repeat;
}
@media (min-width: 641px) {
  body.ws { background-attachment: fixed; }
}

/* A bare <a> had no rule anywhere in this file — every genuine link (.ws-btn,
   .ws-footer-link, a roster/table row's own name cell) already
   sets its own color, but a plain inline link with no class (a session name,
   an event card title, a "needs attention" row, a footer "Prompts" link)
   fell through to the browser default: blue, purple once visited. This is
   the one base rule that catches all of those — bone text, underlined so it
   still reads as a link, gold only on hover/focus (gold is a scalpel, not
   the resting state of every link on the page). Any more specific class
   above already wins on specificity and is untouched by this. */
a { color: var(--ws-text); text-decoration-color: var(--ws-text-mut); text-underline-offset: 2px; }
a:visited { color: var(--ws-text); }
a:hover { color: var(--ws-gold); text-decoration-color: var(--ws-gold); }
a:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }

/* --- Display type ---------------------------------------------------------
   The signature: compressed, 700, uppercase, line-height 0.68 so lines
   interlock. Word-per-line stacking is the house style — see .ws-stack.     */

.ws-display {
  font-family: var(--ws-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: var(--ws-lh-display);
  letter-spacing: -0.005em;
  margin: 0;
}
.ws-display--xl { font-size: var(--ws-fs-display-xl); }
.ws-display--l  { font-size: var(--ws-fs-display-l); }
.ws-display--m  { font-size: var(--ws-fs-display-m); line-height: 0.78; }
.ws-display--s  { font-size: var(--ws-fs-display-s); line-height: 0.85; }
.ws-display--gold { color: var(--ws-gold); }

/* One word per line. The headline reads as a wall, not a sentence. */
.ws-stack > span { display: block; }

/* --- Labels ---------------------------------------------------------------
   Compressed uppercase. Wraps onto two lines rather than shrinking or
   truncating — the stacked-label habit is part of the voice.               */

.ws-label {
  font-family: var(--ws-display);
  font-weight: 700;
  font-size: var(--ws-fs-small);
  text-transform: uppercase;
  letter-spacing: var(--ws-ls-label);
  line-height: 1.05;
  color: var(--ws-text);
  margin: 0;
}
.ws-label--dim { color: var(--ws-text-dim); }

/* Provenance, not quality. Never a coloured pill — pills imply ranking. */
.ws-micro,
.ws-source {
  font-family: var(--ws-body);
  font-size: var(--ws-fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--ws-ls-micro);
  color: var(--ws-text-mut);
  line-height: 1.4;
}
.ws-source--verified { color: var(--ws-text-dim); }
.ws-source--unverified { color: var(--ws-text-mut); font-style: italic; letter-spacing: var(--ws-ls-micro); }

/* --- The mark -------------------------------------------------------------
   Five dots: three small above, two large below. Arm span, and a cluster of
   observations. The only circle in the system.                              */

.ws-mark { display: block; height: 1.5rem; width: auto; }
.ws-mark path, .ws-mark circle { fill: currentColor; }

/* --- Confidence track -----------------------------------------------------
   EARLY / DEVELOPING / STRONGER (spec §4.8) rendered against five dots —
   the same five as the mark. A fully-evidenced player IS the logo.
   Linear here because it sorts and scans in a table; the cluster
   arrangement is reserved for the profile-strength hero.                    */

.ws-conf { display: inline-flex; gap: 4px; align-items: center; vertical-align: middle; }
.ws-conf i {
  width: 7px; height: 7px;
  border-radius: var(--ws-radius-pill);
  border: 1px solid var(--ws-ink-400);
  background: transparent;
  display: block;
}
.ws-conf[data-level="early"]      i:nth-child(-n+1),
.ws-conf[data-level="developing"] i:nth-child(-n+3),
.ws-conf[data-level="stronger"]   i:nth-child(-n+5) {
  background: var(--ws-gold);
  border-color: var(--ws-gold);
}
.ws-conf-text {
  font-family: var(--ws-display);
  font-weight: 700;
  font-size: var(--ws-fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--ws-ls-micro);
  color: var(--ws-text-dim);
  margin-left: var(--ws-2);
}

/* --- Signals --------------------------------------------------------------
   Four types, four treatments. Evidence gaps are drawn as ABSENCE — a hollow
   ring, no fill, no colour. Missing data must look missing.                 */

.ws-signal {
  display: flex; gap: var(--ws-3);
  align-items: flex-start;
  padding: var(--ws-3) 0;
  border-bottom: 1px solid var(--ws-ink-700);
}
.ws-signal:last-child { border-bottom: 0; }
.ws-signal::before {
  content: "";
  flex: 0 0 auto;
  width: 9px; height: 9px;
  margin-top: 0.45em;
  border-radius: var(--ws-radius-pill);
  border: 1px solid transparent;
}
.ws-signal--strong::before   { background: var(--ws-gold); }
.ws-signal--early::before    { background: var(--ws-text-dim); }
.ws-signal--gap::before      { background: var(--ws-flare); }
.ws-signal--evidence::before { background: transparent; border-color: var(--ws-ink-400); }

.ws-signal--early    .ws-signal-text { color: var(--ws-text-dim); }
.ws-signal--evidence .ws-signal-text { color: var(--ws-text-mut); }
.ws-signal-text { margin: 0; font-size: var(--ws-fs-body); }
.ws-signal-note { display: block; margin-top: 2px; }

/* Legend */
.ws-legend { display: flex; flex-wrap: wrap; gap: var(--ws-4); }
.ws-legend-item { display: flex; align-items: center; gap: var(--ws-2); }
.ws-legend-dot {
  width: 9px; height: 9px; border-radius: var(--ws-radius-pill);
  border: 1px solid transparent; flex: 0 0 auto;
}

/* --- Stat cell ------------------------------------------------------------
   Big number in the display face does the work. No card needed.             */

.ws-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ws-stat-value {
  font-family: var(--ws-display);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  color: var(--ws-text);
}
.ws-stat-value--gold { color: var(--ws-gold); }
.ws-stat-unit {
  font-size: var(--ws-fs-small);
  color: var(--ws-text-dim);
  font-family: var(--ws-body);
  letter-spacing: 0;
  text-transform: none;
}
.ws-stat--sm .ws-stat-value { font-size: 1.5rem; }

/* --- Competition level ----------------------------------------------------
   Levels 1-5 (spec §8.4), where 1 is the TOP. Position is marked, never
   "filled up to" — filling would imply 5 is best. Numeral always shown.     */

.ws-level { display: flex; flex-direction: column; gap: var(--ws-2); }
.ws-level-track { display: flex; gap: 3px; }
.ws-level-track span {
  height: 3px; flex: 1 1 0;
  background: var(--ws-ink-500);
}
.ws-level-track span[data-current] { background: var(--ws-gold); }
.ws-level-caption { display: flex; gap: var(--ws-2); align-items: baseline; }

/* --- Panels --------------------------------------------------------------- */

.ws-panel {
  background: var(--ws-ink-700);
  border: var(--ws-border);
  border-radius: var(--ws-radius);
  padding: var(--ws-5);
}
.ws-panel--flush { padding: 0; }
.ws-panel--well  { background: var(--ws-ink-900); }

/* The single emphasis block per screen. Gold is a scalpel. */
.ws-callout {
  border: 1px solid var(--ws-gold);
  border-radius: var(--ws-radius);
  padding: var(--ws-4) var(--ws-5);
  display: flex; gap: var(--ws-4); align-items: flex-start;
  background: var(--ws-ink-700);
}
.ws-callout-rule { width: 2px; align-self: stretch; background: var(--ws-gold); flex: 0 0 auto; }

/* Drop's full-screen chat (081, drop_ui.py DROP_VIEW_HTML). No
   --ws-surface-2 token exists in this system; --ws-ink-600 ("raised /
   hover") is the closest existing token to a user bubble's background. */

/* --- The view: fills the viewport below the topbar, no page scroll -------- */
#view-drop.ws-shell { max-width: none; margin: 0; padding: 0; }
.ws-drop-view {
  display: flex; flex-direction: column;
  height: calc(100dvh - var(--ws-drop-top-h, 0px) - var(--ws-kb, 0px));
  min-height: 0;
}
/* The one view that owns its own scroll (.ws-drop-thread-pane below) — the
   page itself must not also scroll, or the composer drifts off a short
   viewport. :has() is already used elsewhere in this file (.ws-table-wrap). */
body.ws:has(#view-drop:not([hidden])) { overflow: hidden; }

/* One compact row — title, subtitle and the two actions all on the same
   baseline, not a tall stacked block (081 polish pass). */
.ws-drop-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--ws-4); flex: 0 0 auto; flex-wrap: wrap;
  padding: var(--ws-3) var(--ws-6);
  border-bottom: var(--ws-border);
}
.ws-drop-head-title { display: flex; align-items: baseline; gap: var(--ws-3); flex-wrap: wrap; min-width: 0; }
.ws-drop-head-title h1 { flex: 0 0 auto; }
.ws-drop-head-title p { margin: 0; }
.ws-drop-head-actions { display: flex; align-items: center; gap: var(--ws-3); flex: 0 0 auto; }
/* A smaller .ws-btn for a row this compact — same border/radius/hover, just
   less padding and the micro type size instead of small. */
.ws-btn--sm { padding: var(--ws-1) var(--ws-3); font-size: var(--ws-fs-micro); }

.ws-drop-thread-pane {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: var(--ws-5) var(--ws-6);
}
.ws-drop-thread-col { max-width: 760px; margin: 0 auto; }

/* --- Welcome state: no messages yet (081 §3) ------------------------------- */
/* padding-bottom here, not just the thread pane's own — the composer is a
   flex sibling, never overlapping this, but the last row of cards still
   wants clear air under it rather than sitting flush on the scrollable
   edge (081 polish pass). */
.ws-drop-welcome { display: flex; flex-direction: column; justify-content: center; min-height: calc(100% - var(--ws-5)); gap: var(--ws-4); padding-bottom: var(--ws-6); }
.ws-drop-welcome-intro { max-width: 68ch; }
.ws-drop-welcome-intro h2 { margin: 0 0 var(--ws-2); }
.ws-drop-welcome-list { margin: var(--ws-2) 0 0; padding-left: var(--ws-4); }
.ws-drop-welcome-list li { margin-top: var(--ws-1); }
/* Three cards (Find, Ask, Stats): one row from 720px up, stacked on phones. */
.ws-drop-welcome-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ws-2); }
@media (min-width: 720px) {
  .ws-drop-welcome-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ws-drop-suggestion {
  display: block; width: 100%; text-align: left;
  background: var(--ws-ink-700); border: var(--ws-border); border-radius: var(--ws-radius);
  padding: var(--ws-3); cursor: pointer; color: var(--ws-text);
  transition: border-color var(--ws-ease), background var(--ws-ease);
}
.ws-drop-suggestion:hover { background: var(--ws-ink-600); border-color: var(--ws-text-mut); }
.ws-drop-suggestion:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
/* The category, inline with the title rather than its own line above it —
   one compact line, not two. */
.ws-drop-suggestion-title { display: block; font-family: var(--ws-display); font-weight: 700; font-size: var(--ws-fs-small); text-transform: uppercase; letter-spacing: var(--ws-ls-label); }
.ws-drop-suggestion-group {
  display: inline; margin-right: var(--ws-2);
  font-family: var(--ws-body); font-weight: 400; color: var(--ws-text-mut);
}
/* Forced to one line — the example is a hint, not a second sentence, and a
   3-column card at this width has no room for it to wrap. */
.ws-drop-suggestion-example {
  display: block; margin-top: 2px; color: var(--ws-text-dim); text-transform: none; letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-drop-ideas { display: flex; flex-wrap: wrap; gap: var(--ws-2); }

/* --- Bubbles ---------------------------------------------------------------- */
.ws-drop-chat { display: flex; flex-direction: column; gap: var(--ws-4); }
.ws-drop-msg-row { display: flex; flex-direction: column; gap: 2px; }
.ws-drop-msg-row--user { align-self: flex-end; align-items: flex-end; max-width: 85%; }
.ws-drop-msg-row--assistant { flex-direction: row; align-self: flex-start; align-items: flex-start; gap: var(--ws-3); max-width: 100%; }
.ws-drop-msg-col { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.ws-drop-msg--user {
  background: var(--ws-ink-600);
  border-radius: var(--ws-radius);
  padding: var(--ws-3) var(--ws-4);
  overflow-wrap: break-word;
}
/* A pasted table's own disclosure (dropChatUserBubbleHtml's <details><pre>)
   had no rule of its own: a <pre>'s UA default (white-space: pre, no wrap)
   let one long row of a stats-table paste overflow the bubble's box — which
   defaults to overflow: visible — and sit, unclipped, on top of whatever the
   page rendered below it. */
.ws-drop-msg--user pre {
  white-space: pre-wrap; word-break: break-word; overflow-x: auto; max-width: 100%;
}
.ws-drop-avatar {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: var(--ws-radius-pill);
  color: var(--ws-gold);
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
/* The mark is the basketball-and-spark itself, no disc behind it. */
.ws-drop-avatar svg { width: 24px; height: 24px; overflow: visible; stroke: currentColor; stroke-width: 8; fill: none; stroke-linecap: square; stroke-linejoin: miter; }
.ws-drop-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ws-drop-msg-name .ws-drop-msg-time { margin-left: 0; }
.ws-assist-ic svg { width: 1em; height: 1em; stroke: currentColor; stroke-width: 7; fill: none; stroke-linecap: square; vertical-align: -0.1em; margin-right: 0.35em; }
.tm { font-size: 0.6em; line-height: 0; vertical-align: super; }

/* "Wingspan Assist" wordmark. Text-based (currentColor), Archivo 700 with wide
   tracking to echo the extended logo; small WINGSPAN eyebrow in the logo's
   lighter weight; the four-point star from the Assist mark sits off the final T
   in gold. lg = stacked (page heading, chat welcome); md/sm = inline in copy. */
.ws-wm { font-family: var(--ws-body); text-transform: uppercase; color: inherit; font-style: normal; }
.ws-wm-word { font-weight: 700; letter-spacing: 0.16em; white-space: nowrap; }
.ws-wm-eyebrow { font-weight: 400; letter-spacing: 0.34em; }
.ws-wm-t { position: relative; display: inline-block; }
.ws-wm-star path { fill: currentColor; }
.ws-wm-star { position: absolute; left: 100%; top: -0.1em; width: 0.36em; height: 0.36em; margin-left: -0.06em; color: var(--ws-gold); transform-origin: 50% 50%; overflow: visible; }
.ws-wm-tm { font-size: 0.28em; font-weight: 400; letter-spacing: 0; vertical-align: super; line-height: 0; margin-left: 0.9em; text-transform: none; }
.ws-wm--lg { display: inline-flex; flex-direction: column; align-items: flex-start; font-size: clamp(1.9rem, 9vw, 2.6rem); line-height: 1; padding-right: 0.55em; }
.ws-wm--lg .ws-wm-eyebrow { font-size: 0.3em; line-height: 1; margin-bottom: 0.35em; opacity: 0.85; }
.ws-wm--lg .ws-wm-word { line-height: 0.9; }
.ws-wm--md, .ws-wm--sm { display: inline; white-space: nowrap; }
.ws-wm--md .ws-wm-eyebrow { font-size: 0.78em; letter-spacing: 0.2em; opacity: 0.8; }
.ws-wm--md .ws-wm-word { letter-spacing: 0.12em; padding-right: 0.35em; }
.ws-wm--md .ws-wm-star { width: 0.5em; height: 0.5em; top: -0.18em; margin-left: -0.02em; }
.ws-wm--sm .ws-wm-eyebrow { font-size: 0.74em; letter-spacing: 0.14em; opacity: 0.75; }
.ws-wm--sm .ws-wm-word { letter-spacing: 0.09em; padding-right: 0.3em; }
.ws-wm--sm .ws-wm-star { width: 0.5em; height: 0.5em; top: -0.18em; margin-left: -0.02em; }
.ws-drop-welcome-intro h2 .ws-wm, .ws-drop-head-title h1 .ws-wm { vertical-align: top; }
/* The four-point star (the .ws-star path of NAV_ICON.assist and of the wordmark) twinkles everywhere it
   appears: a 3s cycle of scale 1 > 1.18 > 1, a small turn and an opacity pulse. transform and opacity only,
   so nothing reflows; instances are offset by position so they do not blink together. No motion on request. */
@media (prefers-reduced-motion: no-preference) {
  .ws-star { transform-box: fill-box; transform-origin: 50% 50%; animation: ws-twinkle 3s ease-in-out infinite; }
  :nth-child(3n+2) .ws-star { animation-delay: -1s; }
  :nth-child(3n) .ws-star { animation-delay: -2s; }
  :nth-child(5n+4) .ws-star { animation-delay: -0.5s; }
}
@keyframes ws-twinkle {
  0%, 100% { opacity: 0.78; transform: scale(1) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.18) rotate(15deg); }
}
@media (prefers-reduced-motion: no-preference) {
  .ws-wm-star { transition: transform 0.5s ease; }
  a:hover .ws-wm-star, button:hover .ws-wm-star, .ws-wm:hover .ws-wm-star { transform: rotate(90deg) scale(1.15); }
}
.ws-drop-msg-name {
  margin: 0;
  font-family: var(--ws-display); font-weight: 700; font-size: var(--ws-fs-small);
  text-transform: uppercase; letter-spacing: var(--ws-ls-label); color: var(--ws-text-dim);
}
/* Quiet until the row is hovered or something in it has focus (081 §4). */
.ws-drop-msg-time {
  margin-left: var(--ws-2); font-family: var(--ws-body); text-transform: none; letter-spacing: 0;
  opacity: 0; transition: opacity var(--ws-ease);
}
.ws-drop-msg-row:hover .ws-drop-msg-time, .ws-drop-msg-row:focus-within .ws-drop-msg-time { opacity: 1; }
.ws-drop-msg--assistant h3 {
  font-family: var(--ws-display); font-weight: 700; font-size: var(--ws-fs-display-s);
  text-transform: uppercase; line-height: var(--ws-lh-tight); margin: var(--ws-3) 0 var(--ws-1);
}
.ws-drop-msg--assistant code { font-family: var(--ws-mono); font-size: 0.9em; background: var(--ws-ink-900); padding: 0 3px; border-radius: var(--ws-radius); }
.ws-drop-msg--system { align-self: center; text-align: center; }
/* .ws-drop-msg--system carries no rule of its own beyond that — the markup
   also carries "ws-micro ws-dim" (existing utility classes), which is what
   the spec meant by "is ws-micro ws-dim". */
.ws-drop-chat-list { margin: 0; padding-left: var(--ws-4); }
/* Quick-reply chips under an assistant message that asked a clarifying
   question (ask tool) — same row/gap rule as .ws-wf-notes-opp-chips above. */
.ws-drop-chat-chips { display: flex; gap: var(--ws-2); flex-wrap: wrap; margin-top: var(--ws-2); }
.ws-drop-chat-chips .ws-chip { min-height: var(--ws-touch); }
/* Assist's results card (show_players): a compact table in the thread. */
.ws-drop-assist-card { margin-top: var(--ws-2); }
.ws-drop-assist-card .ws-table th, .ws-drop-assist-card .ws-table td { padding: var(--ws-1) var(--ws-2); white-space: nowrap; }
/* A long result (up to 150 rows) scrolls inside the card; the header stays put. Rows are laid out once, with no per-row work. */
.ws-drop-assist-card .ws-table-wrap { max-height: 28rem; overflow-y: auto; }
.ws-drop-assist-actions { display: flex; gap: var(--ws-2); flex-wrap: wrap; margin-top: var(--ws-2); }

/* The working status line is a typing indicator: a small basketball bouncing
   on a floor line, the status text beside it. Ease-in on the fall, ease-out
   on the rise, a squash on contact, and a shadow that shrinks as it rises. */
.ws-drop-typing { display: flex; align-items: center; gap: var(--ws-2); margin: 0; }
.ws-drop-ball {
  position: relative; flex: 0 0 auto; display: block; width: 26px; height: 24px;
  border-bottom: 2px solid var(--ws-text-dim); color: var(--ws-gold);
}
.ws-drop-ball svg {
  position: absolute; left: 5px; bottom: 0; width: 16px; height: 16px;
  stroke: currentColor; stroke-width: 9; fill: none; stroke-linecap: square;
  transform-origin: 50% 100%;
  animation: ws-drop-bounce 0.8s infinite;
}
.ws-drop-ball::after {
  content: ""; position: absolute; left: 5px; right: 5px; bottom: -3px; height: 3px;
  border-radius: 50%; background: var(--ws-text-dim);
  transform-origin: 50% 50%; animation: ws-drop-shadow 0.8s infinite;
}
@keyframes ws-drop-bounce {
  0%   { transform: translateY(-8px) scale(1, 1); animation-timing-function: cubic-bezier(0.5, 0, 1, 0.6); }
  46%  { transform: translateY(0) scale(1, 1); animation-timing-function: linear; }
  50%  { transform: translateY(0) scale(1.18, 0.8); animation-timing-function: cubic-bezier(0, 0.4, 0.5, 1); }
  54%  { transform: translateY(0) scale(1, 1); animation-timing-function: cubic-bezier(0, 0.4, 0.5, 1); }
  100% { transform: translateY(-8px) scale(1, 1); }
}
@keyframes ws-drop-shadow {
  0%, 100% { transform: scaleX(0.5); opacity: 0.2; }
  50% { transform: scaleX(1); opacity: 0.5; }
}
@media (prefers-reduced-motion: reduce) {
  .ws-drop-ball svg, .ws-drop-ball::after { animation: none; }
  .ws-drop-ball::after { transform: none; opacity: 0.4; }
}
/* The one thinking row after the thread: fixed height so nothing jumps when it comes and goes. */
.ws-drop-thinking { display: flex; align-items: center; gap: var(--ws-3); min-height: 32px; }
.ws-drop-thinking[hidden] { display: none; }

/* --- Proposal cards + the done panel, inline at the end of the thread ------ */
#drop-proposal, #drop-done { margin-top: var(--ws-4); }
/* The done panel: one row per team with its own links, then the drop-wide
   actions. Both are flex rows that wrap, so a .ws-btn anchor (inline by
   default, with padding that does not hold a line open) can never overlap the
   row below it. */
.ws-drop-done-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ws-1) var(--ws-3); padding: var(--ws-2) 0; border-top: var(--ws-border); }
.ws-drop-done-links { display: flex; flex-wrap: wrap; gap: var(--ws-2); }
.ws-drop-done-actions { display: flex; flex-wrap: wrap; gap: var(--ws-2); margin-top: var(--ws-3); padding-top: var(--ws-3); border-top: var(--ws-border); }
.ws-drop-done-row .ws-btn, .ws-drop-done-actions .ws-btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; }

/* --- Sticky "Review & approve" bar, just above the composer ---------------- */
.ws-drop-approve-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: var(--ws-4);
  padding: var(--ws-3) var(--ws-6); border-top: var(--ws-border); background: var(--ws-ink-700);
}
.ws-drop-approve-count { flex: 1 1 auto; }

/* --- Composer (081 §2) ------------------------------------------------------ */
.ws-drop-composer-wrap { flex: 0 0 auto; padding: var(--ws-4) var(--ws-6) calc(var(--ws-4) + env(safe-area-inset-bottom, 0px)); }
.ws-drop-composer-col { max-width: 760px; margin: 0 auto; }
/* One seamless box: the textarea itself carries no border or background of
   its own (unlike .ws-input's base), so the panel it sits in reads as the
   one surface — textarea on top, the +/Send row (.ws-drop-composer-row)
   underneath it, in the same box. */
.ws-drop-box--chat { position: relative; padding: var(--ws-3); }
.ws-drop-textarea {
  resize: none; overflow-y: hidden; min-height: var(--ws-touch);
  font-family: var(--ws-body);
  border: 0; background: transparent; padding: var(--ws-2) 0;
}
.ws-drop-textarea:focus { outline: none; border: 0; }
.ws-drop-composer-row { display: flex; align-items: center; justify-content: space-between; gap: var(--ws-2); margin-top: var(--ws-1); }
.ws-drop-composer-actions { display: flex; align-items: center; gap: var(--ws-2); }
.ws-drop-send-btn, .ws-drop-menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--ws-touch); min-height: var(--ws-touch);
  background: none; border: 1px solid var(--ws-ink-400); border-radius: var(--ws-radius-pill);
  color: var(--ws-text); cursor: pointer; flex: 0 0 auto;
}
.ws-drop-send-btn svg, .ws-drop-menu-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 8; fill: none; stroke-linecap: square; }
.ws-drop-send-btn:hover, .ws-drop-menu-btn:hover { color: var(--ws-gold); border-color: var(--ws-gold); }
.ws-drop-send-btn:focus-visible, .ws-drop-menu-btn:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
.ws-drop-send-btn--primary { background: var(--ws-gold); border-color: var(--ws-gold); color: var(--ws-ink); }
.ws-drop-send-btn--primary:hover { background: #FFD633; border-color: #FFD633; color: var(--ws-ink); }
.ws-drop-send-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ws-drop-menu-wrap { position: relative; }
/* Opens downward where the composer sits near the top of a page (Home, an
   event page, a team page); upward in /scout/drop, where it is pinned to
   the bottom of the screen. */
.ws-drop-menu {
  position: absolute; top: calc(100% + var(--ws-2)); left: 0; z-index: 5;
  min-width: 220px; background: var(--ws-ink-800); border: var(--ws-border); border-radius: var(--ws-radius);
  padding: var(--ws-2); display: flex; flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.ws-drop-composer-col .ws-drop-menu { top: auto; bottom: calc(100% + var(--ws-2)); }
.ws-drop-menu-item {
  display: flex; align-items: center; width: 100%; min-height: var(--ws-touch);
  background: none; border: 0; padding: var(--ws-2) var(--ws-3); border-radius: var(--ws-radius);
  color: var(--ws-text); text-align: left; cursor: pointer; font-family: var(--ws-body); font-size: var(--ws-fs-small);
}
.ws-drop-menu-item:hover { background: var(--ws-ink-600); }
.ws-drop-menu-item:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: -2px; }
.ws-drop-menu-sep { height: 1px; background: var(--ws-ink-500); margin: var(--ws-2) 0; }
.ws-drop-hint { margin: var(--ws-2) 0 0; text-align: center; }
.ws-drop-hint--short { display: none; }

/* Drag-and-drop: a full-pane overlay over the composer box while a file is
   dragged over it (dropShowDropzone, DROP_SB_JS) — pointer-events: none so
   the drag/drop events themselves still land on the box underneath it. */
.ws-drop-dropzone-overlay {
  position: absolute; inset: 0; z-index: 6; pointer-events: none;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--ws-ink-800); opacity: 0.92;
  border: 2px dashed var(--ws-gold); border-radius: var(--ws-radius);
  font-family: var(--ws-display); font-weight: 700; text-transform: uppercase; letter-spacing: var(--ws-ls-label);
  color: var(--ws-gold);
}

/* 080: attached images — a tray of thumbnails above the textarea (each with
   its remove button) until Send, then small in the scout's bubble and on a
   photo card. */
.ws-drop-attach-tray { display: flex; gap: var(--ws-2); flex-wrap: wrap; margin: 0 0 var(--ws-2); }
.ws-drop-thumbs { display: inline-flex; gap: var(--ws-2); flex-wrap: wrap; }
.ws-drop-thumb-wrap { position: relative; display: inline-block; }
.ws-drop-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: var(--ws-radius); display: block; }
.ws-drop-thumb--card { width: 96px; height: 96px; }
.ws-drop-thumb-remove {
  position: absolute; top: -8px; right: -8px;
  min-width: var(--ws-touch); min-height: var(--ws-touch);
  display: inline-flex; align-items: flex-start; justify-content: flex-end;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--ws-text);
  font-size: 18px; line-height: 1;
}
[data-drop-attach-label] { position: relative; }

/* --- Mobile: full viewport, safe-area padding, one column (081 §8) --------- */
@media (max-width: 640px) {
  .ws-drop-head { padding: var(--ws-3) var(--ws-4); gap: var(--ws-2); }
  .ws-drop-head-title { gap: var(--ws-2); }
  .ws-drop-thread-pane { padding: var(--ws-4); }
  .ws-drop-approve-bar { padding: var(--ws-3) var(--ws-4); flex-wrap: wrap; }
  .ws-drop-composer-wrap { padding: var(--ws-3) var(--ws-4) calc(var(--ws-3) + env(safe-area-inset-bottom, 0px)); }
  .ws-drop-welcome-cards { grid-template-columns: minmax(0, 1fr); }
  .ws-drop-msg-row--user, .ws-drop-msg-row--assistant { max-width: 94%; }
  /* The full hint reads as clutter this narrow — just the one clause that
     matters (081 polish pass). */
  .ws-drop-hint--full { display: none; }
  .ws-drop-hint--short { display: block; }
}

.ws-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--ws-4);
  padding-bottom: var(--ws-3);
  margin-bottom: var(--ws-4);
  border-bottom: var(--ws-border);
}

/* --- Record field ---------------------------------------------------------
   Every fact carries its provenance. Value, then source, then date.         */

.ws-field { padding: var(--ws-3) 0; border-bottom: 1px solid var(--ws-ink-700); }
.ws-field:last-child { border-bottom: 0; }
.ws-field-value {
  font-size: var(--ws-fs-body);
  margin: 2px 0 0;
  font-variant-numeric: tabular-nums;
}
.ws-field-value--empty { color: var(--ws-text-ghost); font-style: italic; }
.ws-field-meta { display: flex; gap: var(--ws-2); margin-top: 3px; flex-wrap: wrap; }

.ws-grid { display: grid; gap: var(--ws-4) var(--ws-6); }
.ws-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ws-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ws-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* The player record's own field grid (its identity fields and "Basketball
   context") — wide enough on a real monitor that a fixed 3/4-column grid
   left most of the screen empty. 5 columns at >=1280px, 3 down to tablet,
   2 on a phone — not the shared .ws-grid--4's 2-then-1 taper, which was
   built for narrower panels (e.g. a drawer). */
.ws-grid--fields { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1279.98px) {
  .ws-grid--fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .ws-grid--fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Table ----------------------------------------------------------------
   Dense on purpose. This is a professional tool for comparing many players;
   density is on-brand. Do not inflate rows into cards.                      */

.ws-table-wrap { overflow-x: auto; }
.ws-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ws-table th {
  text-align: left;
  font-family: var(--ws-display);
  font-weight: 700;
  font-size: var(--ws-fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--ws-ls-micro);
  color: var(--ws-text-mut);
  padding: var(--ws-2);
  border-bottom: var(--ws-border-strong);
  white-space: nowrap;
  position: sticky; top: 0;
  background: var(--ws-ink-800);
}
.ws-table td {
  /* Tightened from var(--ws-3) — the sidebar (components.css's .ws-sidebar)
     leaves less width for a wide table than the old full-bleed topbar did,
     and "dense on purpose" above already covers a smaller padding floor. */
  padding: var(--ws-2);
  border-bottom: 1px solid var(--ws-ink-700);
  font-size: var(--ws-fs-small);
  white-space: nowrap;
}
.ws-table tbody tr:hover { background: var(--ws-ink-700); cursor: pointer; }
.ws-table tbody tr:focus-visible { outline: 1px solid var(--ws-gold); outline-offset: -1px; }
.ws-table .ws-num { text-align: right; }
.ws-id { font-family: var(--ws-mono); font-size: var(--ws-fs-micro); color: var(--ws-text-mut); }
/* Roster's free-text-length columns — a role list, a club name or a
   grade/track/follow-up combo can each run long enough on their own to be
   most of the wrap's own overflow (see the sidebar/table note above
   .ws-table-wrap). Ellipsis, not the plain nowrap every other column keeps,
   so a long value reads as "there is more" rather than getting sliced
   mid-glyph at the wrap's own edge; rosterRow() puts the untruncated text in
   a title attribute so it is still reachable without a horizontal scroll. */
.ws-table td[data-l="Roles"] { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.ws-table td[data-l="Scout-only"] { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.ws-table td[data-l="Team"] { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
/* ID and Height are compact, fixed-shape values (a code, a measurement) —
   the two columns the owner's fix explicitly named as safe to lose padding
   on, since nothing in them ever needs the same breathing room as a name. */
.ws-table td[data-l="ID"], .ws-table td[data-l="Height"] { padding-left: var(--ws-1); padding-right: var(--ws-1); }
.ws-name { font-weight: 600; color: var(--ws-text); }

/* --- Controls ------------------------------------------------------------- */

.ws-btn {
  font-family: var(--ws-display);
  font-weight: 700;
  font-size: var(--ws-fs-small);
  text-transform: uppercase;
  letter-spacing: var(--ws-ls-label);
  padding: var(--ws-3) var(--ws-5);
  border-radius: var(--ws-radius);
  border: 1px solid var(--ws-ink-400);
  background: transparent;
  color: var(--ws-text);
  text-decoration: none; /* an <a class="ws-btn"> reads as a button, never a link */
  cursor: pointer;
  transition: background var(--ws-ease), border-color var(--ws-ease), color var(--ws-ease);
}
.ws-btn:hover { background: var(--ws-ink-600); border-color: var(--ws-text-mut); }
.ws-btn:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
/* Gold on ink only. One primary per screen. */
.ws-btn--primary { background: var(--ws-gold); border-color: var(--ws-gold); color: var(--ws-ink); }
.ws-btn--primary:hover { background: #FFD633; border-color: #FFD633; }
/* a:visited (0,1,1) outranks a single button class, so a visited <a class="ws-btn">
   would take the light link colour, which is unreadable on gold. Pin each variant. */
a.ws-btn:visited { color: var(--ws-text); }
a.ws-btn--primary:link, a.ws-btn--primary:visited { color: var(--ws-ink); }

.ws-chip {
  font-size: var(--ws-fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--ws-ls-micro);
  padding: var(--ws-1) var(--ws-3);
  border: 1px solid var(--ws-ink-500);
  border-radius: var(--ws-radius);
  background: transparent;
  color: var(--ws-text-dim);
  cursor: pointer;
  font-family: var(--ws-body);
  transition: all var(--ws-ease);
}
.ws-chip:hover { border-color: var(--ws-text-mut); color: var(--ws-text); }
.ws-chip[aria-pressed="true"] { border-color: var(--ws-gold); color: var(--ws-gold); }
.ws-chip:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }

.ws-input {
  background: var(--ws-ink-900);
  border: var(--ws-border);
  border-radius: var(--ws-radius);
  color: var(--ws-text);
  font-family: var(--ws-body);
  font-size: var(--ws-fs-small);
  padding: var(--ws-2) var(--ws-3);
  width: 100%;
}
.ws-input::placeholder { color: var(--ws-text-mut); }
.ws-input:focus { outline: none; border-color: var(--ws-gold); }
/* <select> and <textarea> take the same dark-well treatment as-is — no
   separate rule needed, other than letting a textarea grow. */
textarea.ws-input { resize: vertical; }

/* A single boolean, e.g. "year only" on date of birth. Nothing else in the
   system needed a lone checkbox until now — everywhere else is a toggle
   chip or a button group. */
.ws-checkbox { display: inline-flex; align-items: center; gap: var(--ws-2); cursor: pointer; }
.ws-checkbox input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--ws-gold); cursor: pointer; }

/* Button-styled checkbox group — visually the .ws-opt idiom, but data-entry
   groups (Position, Roles, Follow-up) must NOT run through the questionnaire's
   max-selection logic, so they get their own class and their own handler. */
.ws-checkgroup { display: flex; flex-wrap: wrap; gap: var(--ws-2); }
.ws-check {
  font-family: var(--ws-body);
  font-size: var(--ws-fs-small);
  padding: var(--ws-2) var(--ws-4);
  border: var(--ws-border);
  border-radius: var(--ws-radius);
  background: transparent;
  color: var(--ws-text-dim);
  cursor: pointer;
  transition: all var(--ws-ease);
}
.ws-check:hover { border-color: var(--ws-text-mut); color: var(--ws-text); }
.ws-check[aria-pressed="true"] { background: var(--ws-gold); border-color: var(--ws-gold); color: var(--ws-ink); font-weight: 600; }
.ws-check:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }

/* --- Navigation -----------------------------------------------------------
   Flare (#FF2B00) appears exactly once on the marketing site: the active
   nav underline — here it marks the active sidebar/drawer row instead (a
   left edge, not an underline; see .ws-nav button[aria-current] below), same
   job either way. Left sidebar, not a topbar row — scales better as items
   grow, especially on mobile (owner). Persistent ≥900px, a slide-in drawer
   under it (see .ws-sidebar's own media queries, and navOpenDrawer()/
   navCloseDrawer() in gen_prototype.py, which reuse the evaluation drawer's
   mechanics: focus trap, Escape, a scrim click). #main-nav (inside) is the
   one nav list at every width — applyRoute() fills it from NAV_ITEMS.     */

.ws-topbar {
  display: flex; align-items: center; gap: var(--ws-6);
  padding: var(--ws-4) var(--ws-6);
  border-bottom: var(--ws-border);
  background: var(--ws-ink-800);
  position: sticky; top: 0; z-index: 10;
}
.ws-nav-toggle {
  display: none; /* ≥900px: turned back on by the sidebar's own <900px query below */
  min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--ws-ink-400); border-radius: var(--ws-radius);
  color: var(--ws-text); cursor: pointer;
}
.ws-nav-toggle svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 7; fill: none; stroke-linecap: square; }
.ws-nav-toggle:hover { color: var(--ws-gold); border-color: var(--ws-gold); }
.ws-nav-toggle:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
/* Phone-width logo in the topbar: the way back to Home (there is no Home nav
   item). >=900px the sidebar's own lockup does the same job. */
.ws-topbar-lockup { display: inline-flex; align-items: center; margin-left: var(--ws-3); }
.ws-topbar-lockup img { height: 22px; width: auto; display: block; }

.ws-sidebar-scrim { position: fixed; inset: 0; z-index: 59; background: rgba(13, 13, 13, 0.72); }
.ws-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 20;
  /* 200px, not 220 — narrowed one pass in: a wide table (roster) needs
     every spare pixel of the content column it competes with at 1280/1440
     (see .ws-shell's own table-bearing-screen override below). */
  width: 200px;
  display: flex; flex-direction: column; gap: var(--ws-6);
  padding: var(--ws-5) var(--ws-4);
  background: var(--ws-ink-800); border-right: var(--ws-border);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
/* The lockup is a wide horizontal mark in a 200px column: let it scale to the
   column rather than keeping a fixed height it cannot fit (it overflowed when
   the sidebar narrowed from 220 to 200). No extra side padding — the sidebar's
   own var(--ws-4) is the gutter. */
.ws-sidebar-lockup { display: block; padding: 0; flex: 0 0 auto; max-width: 100%; }
.ws-sidebar-lockup img { display: block; width: 100%; max-width: 148px; height: auto; }
.ws-nav { display: flex; flex-direction: column; gap: var(--ws-2); }
/* The nav takes the spare height and scrolls if it must; Take notes and the account block stay pinned below it. */
.ws-sidebar > .ws-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.ws-sidebar > .ws-sidebar-account { flex: 0 0 auto; }
.ws-sidebar-takenotes { flex: 0 0 auto; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: var(--ws-2); }
.ws-sidebar-takenotes svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 7; fill: none; stroke-linecap: square; flex: 0 0 auto; }
.ws-nav button {
  display: flex; align-items: center; gap: var(--ws-4);
  width: 100%; min-height: 44px;
  background: none; border: 0; border-left: 2px solid transparent;
  padding: var(--ws-2) var(--ws-3);
  font-family: var(--ws-display); font-weight: 700;
  font-size: var(--ws-fs-small); text-transform: uppercase;
  letter-spacing: var(--ws-ls-label); text-align: left;
  color: var(--ws-text-dim); cursor: pointer;
  transition: color var(--ws-ease), background var(--ws-ease);
}
.ws-nav button svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 7; fill: none; stroke-linecap: square; flex: 0 0 auto; }
.ws-nav button:hover { color: var(--ws-text); background: var(--ws-ink-700); }
.ws-nav button[aria-current="page"] { color: var(--ws-text); background: var(--ws-ink-700); border-left-color: var(--ws-flare); }
.ws-nav button:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: -2px; }
/* The account block: pinned to the bottom of the sidebar, and of the menu sheet on a phone. */
.ws-sidebar-account {
  margin-top: auto; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center;
  column-gap: var(--ws-3); row-gap: 0; padding-top: var(--ws-4); border-top: var(--ws-border);
}
.ws-avatar {
  grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ws-ink-700); border: var(--ws-border-strong); color: var(--ws-gold);
  font-family: var(--ws-display); font-weight: 700; font-size: var(--ws-fs-micro);
}
.ws-sidebar-account-name { font-size: var(--ws-fs-small); color: var(--ws-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-sidebar-signout { justify-self: start; min-height: 0; padding: 0; text-align: left; color: var(--ws-text-mut); }
.ws-sidebar-signout:hover { color: var(--ws-text); }
@media (max-width: 899.98px) { .ws-sidebar-signout { min-height: 36px; } }

@media (min-width: 900px) {
  body.ws { padding-left: 200px; }
  .ws-sidebar-scrim, .ws-nav-toggle, .ws-topbar-lockup { display: none !important; }
}
@media (max-width: 899.98px) {
  .ws-sidebar {
    width: 85vw; z-index: 60; /* above .ws-sidebar-scrim (59) */
    transform: translateX(-100%); transition: transform var(--ws-ease);
    padding-bottom: calc(var(--ws-5) + env(safe-area-inset-bottom, 0px));
  }
  .ws-sidebar.is-open { transform: translateX(0); }
  .ws-nav-toggle { display: inline-flex; }
  .ws-nav button { min-height: 48px; }
}

/* --- Player shell -----------------------------------------------------------
   view-player — a persistent header + a tab strip, one panel visible at a
   time (see
   applyRoute/paintPlayerShellTabs, gen_prototype.py). Nested experience over
   separate pages: switching tabs never re-renders .player-shell-head. */
.player-shell-head {
  display: flex; gap: var(--ws-5); align-items: flex-start;
  padding-bottom: var(--ws-5); margin-bottom: var(--ws-5);
  border-bottom: var(--ws-border);
}
.ws-tabs {
  display: flex; flex-wrap: wrap; gap: var(--ws-2);
  margin-bottom: var(--ws-6); border-bottom: var(--ws-border);
}
.ws-tab {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: var(--ws-3) var(--ws-4);
  font-family: var(--ws-display); font-weight: 700;
  font-size: var(--ws-fs-small); text-transform: uppercase;
  letter-spacing: var(--ws-ls-label);
  color: var(--ws-text-dim); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; transition: color var(--ws-ease), border-color var(--ws-ease);
}
.ws-tab:hover { color: var(--ws-text); }
.ws-tab[aria-selected="true"] { color: var(--ws-text); border-bottom-color: var(--ws-flare); }
.ws-tab:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
/* The hero, in three parts: who he is (.psh-id), what to do (.psh-actions:
   Edit player, Add to shortlist, More), and the lists he is on (.psh-lists).
   Facts are a line of text, never boxed like a button. */
#player-shell-identity { min-width: 0; flex: 1 1 auto; }
.psh-facts { margin: var(--ws-2) 0 0; }
.psh-facts .psh-wsp { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.psh-hidden {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--ws-3);
  margin: 0 0 var(--ws-4); padding: var(--ws-3) var(--ws-4);
  border: 1px solid var(--ws-ink-500); border-left: 3px solid var(--ws-gold); background: var(--ws-ink-800, var(--ws-ink-900));
}
.psh-hidden .ws-micro { flex: 1 1 16rem; text-transform: none; letter-spacing: 0; }
.psh-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--ws-2); margin-top: var(--ws-4); }
.psh-actions > span:has([data-players-sl-open]) { position: relative; }
.psh-actions [data-players-sl-box]:not([hidden]) {
  position: absolute; top: calc(100% + var(--ws-2)); left: 0; z-index: 30;
  display: flex; flex-direction: column; gap: var(--ws-2); width: max-content; max-width: min(92vw, 34rem);
  padding: var(--ws-3); background: var(--ws-ink-900); border: 1px solid var(--ws-ink-500);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.psh-more { position: relative; }
.psh-more-dots { display: none; font-size: 1.25rem; line-height: 1; }
.psh-menu {
  position: absolute; top: calc(100% + var(--ws-2)); right: 0; z-index: 30; min-width: 13rem;
  display: flex; flex-direction: column; padding: var(--ws-1) 0;
  background: var(--ws-ink-900); border: 1px solid var(--ws-ink-500); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.psh-menu[hidden] { display: none; }
.psh-menu-item {
  display: block; width: 100%; min-height: 40px; padding: var(--ws-2) var(--ws-4); text-align: left;
  background: none; border: 0; color: var(--ws-text); font: inherit; font-size: var(--ws-fs-small); cursor: pointer;
}
.psh-menu-item:hover, .psh-menu-item:focus-visible { background: var(--ws-ink-700); outline: none; }
.psh-status { align-self: center; }
.psh-status:empty { display: none; }
.psh-lists { margin-top: var(--ws-3); }
.psh-lists .ws-sl-on { gap: var(--ws-2); }
.psh-lists .ws-sl-on-item { border-color: transparent; background: var(--ws-ink-700); border-radius: 999px; padding-left: var(--ws-3); }
.psh-lists .ws-sl-on-rm { min-width: 32px; min-height: 32px; background: none; color: var(--ws-text-dim); }
.psh-lists .ws-sl-on-rm:hover { color: var(--ws-flare); }
@media (max-width: 640px) {
  /* A phone: photo and name side by side, then the actions and lists across
     the full width under both. */
  .player-shell-head { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: var(--ws-4); row-gap: 0; align-items: start; }
  .player-shell-head > div:first-child, #player-shell-identity { display: contents; }
  .player-shell-head > div:first-child > * { grid-column: 1; }
  .player-shell-head #record-photo-panel, .player-shell-head #record-photo-alert,
  .player-shell-head #record-photo-consent { grid-column: 1 / -1; max-width: none; }
  .player-shell-head #record-photo-toggle { justify-content: flex-start; padding-inline: 0; }
  .player-shell-head #record-photo { grid-column: 1; grid-row: 1; width: 96px; }
  .psh-id { grid-column: 2; grid-row: 1 / span 3; min-width: 0; }
  .psh-actions, .psh-lists, .ws-player-assist, #player-shell-identity > p { grid-column: 1 / -1; }
  .psh-actions > .ws-btn--primary, .psh-actions > span:has([data-players-sl-open]) { flex: 1 1 0; }
  .psh-actions > span:has([data-players-sl-open]) .ws-btn { width: 100%; }
  .psh-actions .ws-btn { padding-inline: var(--ws-3); white-space: nowrap; }
  .psh-more-label { display: none; }
  .psh-more-dots { display: inline; }
  .psh-more-btn { min-width: 48px; }
  .psh-lists .ws-sl-on-rm { min-width: 44px; min-height: 44px; }
}
@media (max-width: 640px) {
  .player-shell-head { column-gap: var(--ws-4); }
  .ws-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ws-tab { flex: 0 0 auto; }
}

/* --- Utility --------------------------------------------------------------- */
.ws-shell { max-width: 1400px; margin: 0 auto; padding: var(--ws-6); }
/* The 1400px cap predates the sidebar and made sense when it was the only
   thing keeping a wide table off an ultrawide monitor's full width — the
   sidebar already limits the content column now, and every prose block on
   these screens already carries its own ch-based max-width (e.g. the
   questionnaire disclaimer), so nothing here gets harder to
   read. Scoped to the screens that actually hold a wide table rather than
   raised sitewide. */
#view-roster.ws-shell, #view-event.ws-shell,
#view-combines.ws-shell, #view-combine.ws-shell, #view-history.ws-shell {
  max-width: none;
}
.ws-dim { color: var(--ws-text-dim); }
.ws-mut { color: var(--ws-text-mut); }
.ws-gold { color: var(--ws-gold); }
.ws-flare { color: var(--ws-flare); }
.ws-rule { border: 0; border-top: var(--ws-border); margin: var(--ws-6) 0; }
/* A search snippet's matched words — server-marked, never raw markup. See
   renderSnippet() in the roster search block: esc() runs first, this is only
   ever applied to the two literal marker characters after that. */
mark { background: rgba(255, 204, 0, 0.28); color: inherit; border-radius: var(--ws-radius); padding: 0 2px; }
.ws-vis-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
/* Shown-state layout for elements toggled with the `hidden` attribute — see
   the [hidden] rule above. Never combine `hidden` with an inline display. */
.ws-inline-flex { display: flex; }
.ws-block { display: block; }

/* Bug fix: the form's save button measured 43px tall — 1px under the
   44px minimum tap target. It is one Done button now; the floor stays. */
#sub-save { min-height: 44px; }

@media (max-width: 900px) {
  .ws-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .ws-grid--2, .ws-grid--3, .ws-grid--4 { grid-template-columns: minmax(0, 1fr); }
  .ws-shell { padding: var(--ws-4); }
  .ws-topbar { padding: var(--ws-3) var(--ws-4); gap: var(--ws-4); flex-wrap: wrap; }
  /* Bug fix: #view-event's own header (title + "Edit event"/"All events")
     overflowed ~20px at 375-390px — the title block and the button pair
     never wrapped onto their own rows. Scoped to this one header, not every
     .ws-section-head (most are a single button and already fit). */
  #view-event > .ws-section-head { flex-wrap: wrap; }
}

/* --- Player photograph ----------------------------------------------------
   Stored clean, shown clean. The halftone is a brand treatment for marketing
   surfaces — a coach evaluating a prospect needs to see the player.

   The empty state is not a generic avatar. It says WHY there is no image,
   because "no photo on file" and "consent not granted" are different facts and
   a scout needs to know which one they are looking at.                       */

.ws-photo {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--ws-ink-900);
  border: var(--ws-border);
  border-radius: var(--ws-radius);
  overflow: hidden;
  flex: 0 0 auto;
}
.ws-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ws-photo--empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--ws-3);
  padding: var(--ws-4);
  text-align: center;
}
.ws-photo--empty .ws-mark { color: var(--ws-ink-400); height: 1.25rem; }
/* Withheld for consent, not merely absent — flare marks it as actionable. */
.ws-photo--withheld { border-color: var(--ws-flare); }
.ws-photo--withheld .ws-mark { color: var(--ws-flare); }

/* Provenance sits under the image like any other fact. */
.ws-photo-meta { display: flex; flex-direction: column; gap: 2px; margin-top: var(--ws-2); }

.ws-photo--thumb {
  aspect-ratio: 1 / 1;
  width: 40px;
  border-radius: var(--ws-radius);
}
.ws-photo--thumb.ws-photo--empty { padding: 0; }
.ws-photo--thumb .ws-mark { height: 0.5rem; }

.ws-photo--sm { width: 72px; }
.ws-photo--lg { width: 180px; }

@media (max-width: 600px) { .ws-photo--lg { width: 128px; } }

/* A FIBA headshot, hotlinked (schema/049): the link to his FIBA page fills
   the box. When FIBA has none, the box falls back to the empty state above
   with the link kept, so the link lays its mark out the same way. */
.ws-fiba-photo-link { display: block; width: 100%; height: 100%; color: inherit; }
.ws-photo--empty > .ws-fiba-photo-link {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--ws-3);
}
.ws-fiba-credit { margin: var(--ws-1) 0 0; }

/* A club logo (schema/051, clubLogosHtml) or a national team's FIBA logo /
   flag-emoji fallback (teamLogoOrFlagHtml) — small, inline, before the
   name it belongs to, never its own box like .ws-photo. Two combined clubs
   (the " . " split) just render two of these side by side. */
.ws-inline-logo {
  height: 1.1em; width: auto; max-width: 2.4em;
  vertical-align: -0.2em;
  margin-right: 4px;
  display: inline-block;
  object-fit: contain;
}
.ws-inline-logo--flag { font-size: 1em; }

/* --- Pebble texture -------------------------------------------------------
   Cropped from the ball in the site hero. A surface texture at low opacity,
   never decoration in its own right — if you can see it as an image, it is
   turned up too far.                                                         */

.ws-textured { position: relative; isolation: isolate; }
.ws-textured::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: url("/assets/texture-pebble.png");
  background-size: cover;          /* one large crop — never tiled */
  background-position: 50% 40%;
  opacity: 0.055;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* --- Scout byline ---------------------------------------------------------- */

.ws-byline { display: flex; gap: var(--ws-4); align-items: center; }
.ws-byline img {
  width: 48px; height: 48px; object-fit: cover; object-position: 50% 18%;
  border-radius: var(--ws-radius); border: var(--ws-border); flex: 0 0 auto;
}
.ws-report-section { margin-top: var(--ws-5); }
.ws-report-section p { margin: var(--ws-2) 0 0; color: var(--ws-text-dim); max-width: 70ch; }

/* --- Competition badge ----------------------------------------------------
   A monogram, not a league logo. Real federation and league marks are
   trademarks belonging to those bodies; they are not ours to bundle into a
   deployed build. Licence them per competition, then swap this for the art.  */

.ws-comp {
  display: inline-flex; align-items: center; gap: var(--ws-2);
  min-width: 0;
}
.ws-comp-badge {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ws-ink-400);
  border-radius: var(--ws-radius);
  background: var(--ws-ink-900);
  font-family: var(--ws-display); font-weight: 700;
  font-size: 9px; letter-spacing: 0.02em;
  color: var(--ws-text-dim);
  text-transform: uppercase;
}
.ws-comp-badge[data-tier="1"], .ws-comp-badge[data-tier="2"] { color: var(--ws-gold); border-color: var(--ws-gold); }

/* --- Footer ---------------------------------------------------------------- */

.ws-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--ws-4); flex-wrap: wrap;
  max-width: 1400px; margin: var(--ws-9) auto 0;
  padding: var(--ws-5) var(--ws-6) calc(var(--ws-6) + env(safe-area-inset-bottom, 0px));
  border-top: var(--ws-border);
}
.ws-footer-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--ws-display); font-weight: 700;
  font-size: var(--ws-fs-micro); text-transform: uppercase;
  letter-spacing: var(--ws-ls-micro);
  color: var(--ws-text-mut); border-bottom: 1px solid transparent;
}
.ws-footer-link:hover { color: var(--ws-text); border-bottom-color: var(--ws-ink-400); }
.ws-footer-link:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 3px; }

/* --- Leave-without-saving confirm (§2) ---------------------------------------
   A small overlay dialog, every width — see confirmLeave()/formIsDirty() in
   the script. Not a phone-only "sheet" (§ mobile pass, below); this guards
   the submission form on desktop too. */
#leave-confirm {
  display: none; position: fixed; inset: 0; z-index: 60;
  align-items: center; justify-content: center;
  padding: var(--ws-4);
  background: rgba(10, 10, 10, 0.6);
}
#leave-confirm:not([hidden]) { display: flex; }
#leave-confirm-panel { max-width: 360px; width: 100%; }

/* --- WS360 rating ---------------------------------------------------------
   Headline number plus the four subscores that produce it. The composite is
   never shown without its decomposition — a number you cannot take apart is
   the thing the spec calls a black box.

   Evidence sits below the rule because it qualifies the rating rather than
   feeding it: thin evidence means "we do not know yet", not "not good".      */

.ws-score {
  background: var(--ws-ink-700);
  border: var(--ws-border);
  border-radius: var(--ws-radius);
  padding: var(--ws-4) var(--ws-5) var(--ws-5);
  min-width: 260px;
}
.ws-score-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ws-3); }
.ws-score-mark {
  font-family: var(--ws-display); font-weight: 700;
  font-size: var(--ws-fs-micro); text-transform: uppercase;
  letter-spacing: var(--ws-ls-micro); color: var(--ws-text-dim);
}
.ws-score-mark { display: block; color: var(--ws-text); }
.ws-score-mark sup { font-size: 0.65em; vertical-align: super; letter-spacing: 0; color: var(--ws-text-mut); }

.ws-score-value {
  font-family: var(--ws-display); font-weight: 700;
  font-size: 4.25rem; line-height: 0.78;
  font-variant-numeric: tabular-nums;
  color: var(--ws-gold);
  display: block; margin-top: var(--ws-2);
}
/* Provisional ratings are never gold. Gold means the evidence is there. */
.ws-score[data-provisional] .ws-score-value { color: var(--ws-text); }
.ws-score-margin { font-size: var(--ws-fs-small); color: var(--ws-text-mut); font-variant-numeric: tabular-nums; }
.ws-score-target { display: block; margin-top: var(--ws-2); }

.ws-score-flag {
  display: inline-block; margin-top: var(--ws-2);
  font-family: var(--ws-display); font-weight: 700;
  font-size: var(--ws-fs-micro); text-transform: uppercase;
  letter-spacing: var(--ws-ls-micro);
  color: var(--ws-flare);
}

.ws-sub { display: flex; flex-direction: column; gap: var(--ws-2); margin-top: var(--ws-4); }
.ws-sub-row { display: grid; grid-template-columns: 1fr 34px; gap: var(--ws-3); align-items: center; }
.ws-sub-row > span:first-child { min-width: 0; }
.ws-sub-label {
  font-family: var(--ws-display); font-weight: 700;
  font-size: var(--ws-fs-micro); text-transform: uppercase;
  letter-spacing: var(--ws-ls-micro); color: var(--ws-text-dim);
  display: block; margin-bottom: 3px;
}
.ws-sub-bar { display: block; height: 3px; background: var(--ws-ink-500); position: relative; }
.ws-sub-bar i { position: absolute; inset: 0 auto 0 0; background: var(--ws-text-dim); display: block; }
/* Only a subscore clearing the target band earns gold. */
.ws-sub-bar[data-clears] i { background: var(--ws-gold); }
.ws-sub-num {
  font-family: var(--ws-display); font-weight: 700; font-size: var(--ws-fs-small);
  font-variant-numeric: tabular-nums; text-align: right; color: var(--ws-text);
}
.ws-sub-num[data-null] { color: var(--ws-text-ghost); }

.ws-score-evidence {
  display: flex; align-items: center; gap: var(--ws-2);
  margin-top: var(--ws-4); padding-top: var(--ws-3);
  border-top: 1px solid var(--ws-ink-500);
}

/* Compact form for the roster column. */
.ws-score-mini { display: flex; align-items: baseline; gap: 4px; justify-content: flex-end; }
.ws-score-mini b {
  font-family: var(--ws-display); font-weight: 700; font-size: 1rem;
  font-variant-numeric: tabular-nums; color: var(--ws-gold);
}
.ws-score-mini[data-provisional] b { color: var(--ws-text-dim); }
.ws-score-mini span { font-size: var(--ws-fs-micro); color: var(--ws-text-mut); }

/* --- Observation history --------------------------------------------------
   Every time this player was looked at, what it produced, and what it moved.
   The point is auditability: a rating nobody can trace back to a date, a place
   and a named observer is exactly the black box the spec forbids.            */

.ws-timeline { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ws-timeline th {
  text-align: left;
  font-family: var(--ws-display); font-weight: 700;
  font-size: var(--ws-fs-micro); text-transform: uppercase;
  letter-spacing: var(--ws-ls-micro); color: var(--ws-text-mut);
  padding: var(--ws-2) var(--ws-3); border-bottom: var(--ws-border-strong);
  white-space: nowrap;
}
.ws-timeline td {
  padding: var(--ws-3); border-bottom: 1px solid var(--ws-ink-700);
  font-size: var(--ws-fs-small); vertical-align: top;
}
.ws-timeline tbody tr:hover { background: var(--ws-ink-700); }
.ws-timeline .ws-num { text-align: right; white-space: nowrap; }

/* A marker in the date cell, so the column reads as a spine. */
.ws-tl-date { display: flex; gap: var(--ws-3); align-items: baseline; white-space: nowrap; }
.ws-tl-date::before {
  content: ""; width: 7px; height: 7px; border-radius: var(--ws-radius-pill);
  background: var(--ws-ink-400); flex: 0 0 auto; transform: translateY(-2px);
}
/* Verified live observation is the highest-value kind. Mark it. */
.ws-timeline tr[data-kind="live"] .ws-tl-date::before { background: var(--ws-gold); }
.ws-timeline tr[data-kind="combine"] .ws-tl-date::before { background: var(--ws-gold); }
.ws-timeline tr[data-kind="player"] .ws-tl-date::before { background: transparent; border: 1px solid var(--ws-ink-400); }

.ws-tl-kind {
  font-family: var(--ws-display); font-weight: 700;
  font-size: var(--ws-fs-micro); text-transform: uppercase;
  letter-spacing: var(--ws-ls-micro); color: var(--ws-text-dim);
  white-space: nowrap;
}
.ws-delta { font-size: var(--ws-fs-micro); letter-spacing: var(--ws-ls-micro); }
.ws-delta[data-dir="up"]   { color: var(--ws-gold); }
.ws-delta[data-dir="down"] { color: var(--ws-flare); }
.ws-delta[data-dir="flat"] { color: var(--ws-text-mut); }

/* --- Country flag ----------------------------------------------------------
   Regional indicator characters, not image files — 24 territories and
   counting. The one place colour enters a four-colour palette, so it is kept
   small and always paired with the ISO code, which is what actually carries
   the meaning if the glyph does not render (Windows shows the letters).      */

.ws-flag {
  font-size: 0.95em;
  margin-right: var(--ws-2);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  line-height: 1;
}

/* --- WS360 badge ----------------------------------------------------------
   The mark and the data visualisation are the same object.

   · The arc is literally the 360 — the composite swept as degrees.
   · Five dots sit on the ring, echoing the parent mark's five, one per
     domain. Gold when that domain clears the target band, dim when it does
     not, hollow when it was never measured.
   · The number sits in the middle, in the display face.

   Hollow means "not measured", the same as everywhere else in the system.
   It is the one circle the brand allows, and it earns it.                    */

.ws-badge { display: block; flex: 0 0 auto; }
.ws-badge-track  { fill: none; stroke: var(--ws-ink-500); stroke-width: 3; }
.ws-badge-arc    { fill: none; stroke: var(--ws-gold); stroke-width: 3; stroke-linecap: butt;
                   transition: stroke-dashoffset var(--ws-ease-slow); }
.ws-badge-num    { font-family: var(--ws-display); font-weight: 700; font-size: 40px;
                   fill: var(--ws-gold); text-anchor: middle; dominant-baseline: central;
                   font-variant-numeric: tabular-nums; }
.ws-badge-cap    { font-family: var(--ws-display); font-weight: 700; font-size: 11px;
                   fill: var(--ws-text-mut); text-anchor: middle; letter-spacing: 1.2px; }
/* The badge's own internal caption text splits the same way the inline
   lockup does (below) — "360" gold, "WS" not — so the chart still reads as
   part of the same identity as the mark beside it. */
.ws-badge-cap-360 { fill: var(--ws-gold); }

/* Dots punch through the ring: the halo stroke is the panel colour. */
.ws-badge-back { fill: var(--ws-ink-700); stroke: none; }
.ws-badge-dot { stroke: none; fill: var(--ws-gold); }
.ws-badge-dot[data-state="under"]  { fill: var(--ws-text-dim); }
.ws-badge-dot[data-state="absent"] { fill: var(--ws-ink-700); stroke: var(--ws-ink-400); stroke-width: 2; }
/* The badge also sits on the well surface in some contexts. */
.ws-panel--well .ws-badge-back { fill: var(--ws-ink-900); }

/* Provisional: nothing in the badge is allowed to be gold. */
.ws-score[data-provisional] .ws-badge-arc { stroke: var(--ws-text-dim); stroke-dasharray: 5 4; }
.ws-score[data-provisional] .ws-badge-num { fill: var(--ws-text); }
.ws-score[data-provisional] .ws-badge-dot { fill: var(--ws-text-dim); }
.ws-score[data-provisional] .ws-badge-dot[data-state="absent"] { fill: var(--ws-ink-700); }

.ws-score-top { display: flex; gap: var(--ws-4); align-items: flex-start; }
.ws-score-meta { min-width: 0; padding-top: var(--ws-2); }

/* --- Filter states ---------------------------------------------------------
   A filter that changes nothing is worse than no filter — it teaches people
   the tool is broken. Every chip drives a real query, the count updates, and
   an empty result says so rather than showing an empty box.                  */

.ws-chip--clear { border-style: dashed; color: var(--ws-text-mut); }
.ws-chip--clear:hover { border-color: var(--ws-flare); color: var(--ws-flare); }

.ws-empty {
  margin: 0; padding: var(--ws-7) var(--ws-4);
  text-align: center; color: var(--ws-text-mut);
  font-size: var(--ws-fs-small);
}

/* Not every column is meaningfully sortable — see the WS360 note. */
.ws-table th[data-sort] { cursor: pointer; user-select: none; }
.ws-table th[data-sort]:hover { color: var(--ws-text); }
.ws-table th[data-sort]::after { content: ""; margin-left: 4px; opacity: 0; }
.ws-table th[data-sort][aria-sort="ascending"]::after  { content: "\2191"; opacity: 1; color: var(--ws-gold); }
.ws-table th[data-sort][aria-sort="descending"]::after { content: "\2193"; opacity: 1; color: var(--ws-gold); }
.ws-table th[data-nosort] { cursor: help; }

/* --- Questionnaire --------------------------------------------------------
   "I am not sure" is a real answer, not a failure to give one. The spec
   requires it on every subjective question, so it is styled as a legitimate
   choice — dashed rather than dimmed into looking broken.                    */

.ws-q { padding: var(--ws-5) 0; border-bottom: var(--ws-border); }
.ws-q:last-child { border-bottom: 0; }
.ws-q-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ws-4); }
.ws-q-prompt { font-size: 1.0625rem; margin: 0; }
.ws-q-hint { white-space: nowrap; }
.ws-q-opts { display: flex; flex-wrap: wrap; gap: var(--ws-2); margin-top: var(--ws-4); }

.ws-opt {
  font-family: var(--ws-body); font-size: var(--ws-fs-small);
  padding: var(--ws-2) var(--ws-4);
  border: var(--ws-border); border-radius: var(--ws-radius);
  background: transparent; color: var(--ws-text-dim);
  cursor: pointer; transition: all var(--ws-ease);
}
.ws-opt:hover { border-color: var(--ws-text-mut); color: var(--ws-text); }
.ws-opt[aria-pressed="true"] { background: var(--ws-gold); border-color: var(--ws-gold); color: var(--ws-ink); font-weight: 600; }
.ws-opt[data-unsure] { border-style: dashed; }
.ws-opt[data-unsure][aria-pressed="true"] { background: transparent; color: var(--ws-text); border-color: var(--ws-text-mut); }
.ws-opt:disabled { opacity: 0.35; cursor: not-allowed; }
.ws-opt:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }

.ws-q[data-answered] .ws-q-prompt::after {
  content: "\2713"; color: var(--ws-gold); margin-left: var(--ws-2); font-size: 0.9em;
}

.ws-progress { display: flex; align-items: center; gap: var(--ws-4); flex-wrap: wrap; }
.ws-progress-bar { flex: 1 1 200px; height: 3px; background: var(--ws-ink-500); min-width: 140px; }
.ws-progress-bar i { display: block; height: 100%; background: var(--ws-gold); transition: width var(--ws-ease); }

/* A wait with no progress events of its own — the bar sweeps instead of
   filling. */
.ws-progress-bar--indeterminate i { width: 40%; animation: ws-intake-sweep 1.1s ease-in-out infinite; }
@keyframes ws-intake-sweep {
  0%   { margin-left: 0%; }
  50%  { margin-left: 60%; }
  100% { margin-left: 0%; }
}

/* --- Prefilled fields --------------------------------------------------------
   A field the prefill ("Create player from #NN") touched. Outline, not colour alone — the note beside
   it (wired through aria-describedby, see markControl() in the auth/RPC
   block) says which one it is even without colour. Gold/flare match the
   same evidence-vs-gap taxonomy the signal dots use elsewhere.             */
.ws-intake-filled    { outline: 2px solid var(--ws-gold);  outline-offset: 2px; }
.ws-intake-uncertain { outline: 2px solid var(--ws-flare); outline-offset: 2px; }

/* --- Trajectory ----------------------------------------------------------- */

.ws-traj { display: grid; gap: var(--ws-4); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ws-traj-card { border: var(--ws-border); border-radius: var(--ws-radius); padding: var(--ws-4); background: var(--ws-ink-700); }
.ws-traj-dir {
  font-family: var(--ws-display); font-weight: 700;
  font-size: var(--ws-fs-micro); text-transform: uppercase;
  letter-spacing: var(--ws-ls-micro);
}
.ws-traj-dir[data-d="improving"]    { color: var(--ws-gold); }
.ws-traj-dir[data-d="stable"]       { color: var(--ws-gold); }
.ws-traj-dir[data-d="volatile"]     { color: var(--ws-flare); }
.ws-traj-dir[data-d="declining"]    { color: var(--ws-flare); }
.ws-traj-dir[data-d="insufficient"] { color: var(--ws-text-mut); }
/* How many clubs a metric survived is the scout-relevant number. */
.ws-traj-clubs { display: flex; gap: 3px; align-items: center; }
.ws-traj-clubs i { width: 6px; height: 6px; border-radius: var(--ws-radius-pill); background: var(--ws-gold); display: block; }

/* --- Roster on a phone -----------------------------------------------------
   A scout works this list standing in a gym. Twelve columns behind a
   horizontal scrollbar is the wrong shape for that, so below 760px each row
   becomes a card: the six fields that matter for a decision, and the rest
   folded away rather than pushed off-screen.
   Scoped to .ws-roster-table (the /roster screen's own table, gen_prototype.py)
   — a bare .ws-table selector here used to also catch every workflow ledger
   (event roster, team sheet, events/games/sessions lists — workflow_ui.py's
   .ws-wf-table), none of which carry the data-l labels this transform keys
   off, so their cells inherited width:100% from the first rule below with no
   grid-area to land in — overlapping, clipped rows and a shrunk checkbox. See
   .ws-wf-table's own phone treatment further down this file. */

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .ws-roster-table thead { display: none; }
  .ws-roster-table, .ws-roster-table tbody, .ws-roster-table tr, .ws-roster-table td { display: block; width: 100%; }

  .ws-roster-table tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "photo name  score"
      "photo meta  score"
      "photo comp  conf";
    gap: var(--ws-1) var(--ws-3);
    align-items: center;
    padding: var(--ws-4) 0;
    border-bottom: 1px solid var(--ws-ink-700);
  }
  .ws-roster-table tbody tr:hover { background: transparent; }

  .ws-roster-table td { padding: 0; border: 0; white-space: normal; }
  .ws-roster-table td:first-child            { grid-area: photo; }
  .ws-roster-table td[data-l="Player"]       { grid-area: name; font-size: var(--ws-fs-body); }
  .ws-roster-table td[data-l="Role"]         { grid-area: meta; color: var(--ws-text-dim); }
  .ws-roster-table td[data-l="Competition"]  { grid-area: comp; }
  .ws-roster-table td[data-l="WS360"]        { grid-area: score; text-align: right; }
  .ws-roster-table td[data-l="Confidence"]   { grid-area: conf; justify-self: end; }

  /* Folded away, not deleted — the detail view still carries them. */
  .ws-roster-table td[data-l="ID"],
  .ws-roster-table td[data-l="Age"],
  .ws-roster-table td[data-l="Country"],
  .ws-roster-table td[data-l="Position"],
  .ws-roster-table td[data-l="Level"],
  .ws-roster-table td[data-l="Last seen"] { display: none; }

  .ws-roster-table .ws-photo--thumb { width: 44px; }
  .ws-table-wrap:has(.ws-roster-table) { overflow-x: visible; }

  /* The observation timeline keeps its columns and scrolls — it is a ledger,
     and a ledger with rows folded away is not a ledger. */
  .ws-timeline, .ws-timeline thead, .ws-timeline tbody,
  .ws-timeline tr, .ws-timeline td { display: revert; }
  .ws-timeline { display: table; min-width: 680px; }
  .ws-table-wrap:has(.ws-timeline) { overflow-x: auto; }
}

@media (max-width: 760px) {
  .ws-score { min-width: 0; }
  .ws-score-top { flex-wrap: wrap; }
  .ws-shell { padding-inline: var(--ws-4); }
}

/* ============================================================================
   MOBILE PASS — phones, defined as max-width: 640px throughout this file.
   Everything from here down either (a) only takes effect inside that media
   query, or (b) is a component new to this pass that renders nothing until
   gen_prototype.py's markup/JS puts it to use (cards, sheets, the accordion,
   the sticky action bar, the FAB, text clamping). Desktop/tablet
   (≥641px) is unchanged below this point except where a rule is explicitly
   NOT scoped to the media query — paging and text clamping are the same at
   every width by design (see §C/§D of the brief this implements).
   ============================================================================ */

/* --- Roster cards -----------------------------------------------------------
   Same data as the table (rosterRow/rosterCard render the same fields from
   the same esc()'d strings) — the table stays the source of truth and stays
   on desktop; this is a second rendering of it for a single ≥64px tap
   target per player, not a second source of the data.                       */
.ws-roster-cards { display: none; flex-direction: column; gap: var(--ws-3); }
.ws-roster-card {
  display: block; width: 100%; text-align: left;
  background: var(--ws-ink-700); border: var(--ws-border); border-radius: var(--ws-radius);
  padding: var(--ws-4); min-height: 64px; cursor: pointer;
}
.ws-roster-card p { margin: 3px 0 0; }
.ws-roster-card p:first-child { margin-top: 0; }
.ws-roster-card:hover { border-color: var(--ws-text-mut); }
.ws-roster-card:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: -2px; }
/* Thumbnail + text stack, added once photo_url exists (the backend
   sends none yet — see .ws-photo--thumb's own
   empty-state dot, which is what the other 55 thin rows keep showing). */
.ws-roster-card-row { display: flex; gap: var(--ws-3); align-items: flex-start; }
.ws-roster-card-body { min-width: 0; flex: 1 1 auto; }
/* A linked name cell with its thumbnail — event roster rows and combine
   entry rows (workflow_ui.py's wfRosterRow/wfCombineEntryRow); both are
   plain data-grid rows with no room for a photo column of their own. */
.ws-wf-name-cell { display: inline-flex; gap: var(--ws-2); align-items: center; }
.ws-wf-name-cell .ws-photo--thumb { width: 32px; flex: 0 0 auto; }
/* The team page's season picker (schema/081), part of the heading:
   "U18 London Lions · 2026-27 ▾". The native select keeps its own arrow. */
.ws-wf-team-season { white-space: nowrap; }
.ws-wf-team-season-select {
  font: inherit; color: inherit; background: transparent; border: none;
  border-bottom: var(--ws-border); padding: 0 var(--ws-1); cursor: pointer;
}
.ws-wf-team-season-select:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
.ws-wf-team-season-select option { background: var(--ws-ink-900); color: var(--ws-text); font-size: var(--ws-fs-small); }
.ws-roster-card-body p:first-child { margin-top: 0; }

/* --- Scout home (/scout) ---------------------------------------------------
   "Start something"'s four cards, the recent-players strip, the event cards
   and each "needs attention" row all reuse .ws-panel/.ws-btn/.ws-grid — these
   are the few genuinely new shapes: a big square action card, a small
   avatar+name chip, and a left-rule attention row (same rule .ws-callout
   already uses elsewhere for "something needs a look"). */
.ws-wf-home-card { min-height: 72px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; white-space: normal; }
.ws-wf-home-card span { font-size: var(--ws-fs-micro); font-weight: 400; opacity: .75; }
/* Home's one big action (Take notes) — full width, thumb-sized. */
.ws-wf-home-players { display: flex; flex-wrap: wrap; gap: var(--ws-3); }
/* Row/card links group several unrelated pieces of text (a title, a team,
   a date) under one clickable target — an underline running the length of
   all of it reads as broken, not as a link, so these three turn it off at
   the container and put it back only on the one phrase that should look
   named/clickable (.ws-wf-home-linktext) via a nested span. */
.ws-wf-home-player { display: inline-flex; align-items: center; gap: var(--ws-2); min-height: 44px; padding: var(--ws-1) var(--ws-2); text-decoration: none; color: var(--ws-text); }
.ws-wf-home-player:hover { color: var(--ws-gold); }
.ws-wf-home-player .ws-photo--thumb { width: 32px; flex: 0 0 auto; }
.ws-wf-home-row { display: flex; align-items: center; justify-content: space-between; gap: var(--ws-3); min-height: 44px; padding: var(--ws-2) 0; border-bottom: var(--ws-border); text-decoration: none; color: var(--ws-text); }
.ws-wf-home-row:last-child { border-bottom: none; }
.ws-wf-home-row:hover .ws-wf-home-linktext { color: var(--ws-gold); }
.ws-wf-home-linktext { text-decoration: underline; text-decoration-color: var(--ws-text-mut); }
.ws-wf-home-attn { border-left: 2px solid var(--ws-flare); padding-left: var(--ws-3); margin: 0 0 var(--ws-3); }
.ws-wf-home-event-card { display: block; text-decoration: none; color: var(--ws-text); }
.ws-wf-home-event-card:hover .ws-wf-home-linktext { color: var(--ws-gold); }
/* Home cockpit: search first, quick actions, then the three cards. */
.ws-wf-home-cockpit { margin: 0 0 var(--ws-6); }
.ws-wf-home-search { display: flex; gap: var(--ws-2); flex-wrap: wrap; align-items: stretch; }
.ws-wf-home-search .ws-input { flex: 1 1 260px; min-width: 0; min-height: 48px; font-size: var(--ws-fs-body); }
.ws-wf-home-search .ws-btn { min-height: 48px; }
.ws-wf-home-actions { display: flex; gap: var(--ws-2); flex-wrap: wrap; margin: var(--ws-4) 0 0; }
.ws-wf-home-actions .ws-wf-home-card { min-height: 0; flex-direction: row; align-items: center; }
.ws-wf-home-actions .ws-wf-home-card span { display: none; }
.ws-wf-home-stats { display: grid; gap: var(--ws-3); margin-top: var(--ws-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .ws-wf-home-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
.ws-wf-home-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: var(--ws-4); background: var(--ws-ink-700); border: var(--ws-border); border-radius: var(--ws-radius); color: var(--ws-text); text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.ws-wf-home-tile:hover { border-color: var(--ws-gold); }
.ws-wf-home-tile-label { font-size: var(--ws-fs-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--ws-text-mut); }
.ws-wf-home-tile-value { font-size: 2rem; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.ws-wf-home-tile-sub { font-size: var(--ws-fs-micro); color: var(--ws-text-mut); overflow-wrap: anywhere; }
.ws-wf-home-leaders { margin: 0 0 var(--ws-6); }
.ws-wf-home-leaders-grid { display: grid; gap: var(--ws-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .ws-wf-home-leaders-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ws-wf-home-leaders-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ws-wf-home-leader-qual { margin: 0 0 var(--ws-2); }
.ws-wf-home-leader-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--ws-3); margin-bottom: var(--ws-2); }
.ws-shell a.ws-wf-home-leader-row { display: grid; grid-template-columns: 1.5em minmax(0, 1fr) 72px; align-items: center; gap: var(--ws-2); min-height: 48px; padding: var(--ws-1) 0; border-bottom: var(--ws-border); color: var(--ws-text); text-decoration: none; }
.ws-wf-home-leader-row:last-child { border-bottom: none; }
.ws-wf-home-leader-row:hover .ws-wf-home-linktext { color: var(--ws-gold); }
.ws-wf-home-leader-rank { font-size: var(--ws-fs-micro); color: var(--ws-text-mut); font-variant-numeric: tabular-nums; }
.ws-wf-home-leader-who { display: flex; flex-direction: column; min-width: 0; }
.ws-wf-home-leader-who .ws-field-value, .ws-wf-home-leader-who .ws-micro { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-wf-home-leader-val { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-variant-numeric: tabular-nums; }
.ws-wf-home-leader-val b { font-size: var(--ws-fs-body); }
.ws-wf-home-leader-bar { display: block; width: 100%; height: 4px; background: color-mix(in srgb, var(--ws-text) 14%, transparent); }
.ws-wf-home-leader-bar i { display: block; height: 100%; background: var(--ws-gold); }
.ws-wf-home-bars { margin: 0 0 var(--ws-6); }
.ws-wf-home-bars-grid { display: grid; gap: var(--ws-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .ws-wf-home-bars-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ws-wf-home-bar { display: grid; grid-template-columns: minmax(64px, 30%) minmax(0, 1fr) auto; align-items: center; gap: var(--ws-3); min-height: 36px; color: var(--ws-text); text-decoration: none; }
.ws-wf-home-bar:hover .ws-wf-home-bar-name { color: var(--ws-gold); }
.ws-wf-home-bar-name { font-size: var(--ws-fs-micro); overflow-wrap: anywhere; }
.ws-wf-home-bar-track { height: 12px; background: color-mix(in srgb, var(--ws-text) 14%, transparent); }
.ws-wf-home-bar-track i { display: block; height: 100%; background: var(--ws-gold); }
.ws-wf-home-bar-n { font-size: var(--ws-fs-micro); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.ws-wf-home-cards { margin: 0 0 var(--ws-6); align-items: start; display: grid; gap: var(--ws-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .ws-wf-home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ws-wf-home-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* The mobile rule a[href] { display: inline-flex } would win over the classes above; these keep each link's own layout. */
.ws-shell a.ws-wf-home-bar { display: grid; align-items: center; }
.ws-shell a.ws-wf-home-tile { display: flex; align-items: stretch; }
.ws-shell a.ws-wf-home-event-card { display: block; }
.ws-shell a.ws-wf-home-row { display: flex; align-items: center; }
.ws-shell a.ws-wf-home-row--stack { flex-direction: column; align-items: flex-start; }
.ws-wf-home-row--stack { flex-direction: column; align-items: flex-start; gap: 2px; justify-content: center; }
.ws-shell a.ws-wf-home-row--stack .ws-micro, .ws-shell a.ws-wf-home-row--stack .ws-wf-home-linktext { text-align: left; align-self: flex-start; }
.ws-wf-home-events-grid { display: grid; gap: var(--ws-4); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ws-wf-home-rowbtn { width: 100%; background: none; border: 0; border-bottom: var(--ws-border); font: inherit; text-align: left; cursor: pointer; }
.ws-wf-home-row .ws-wf-home-linktext { min-width: 0; overflow-wrap: anywhere; }
.ws-wf-home-row { min-width: 0; }
.ws-wf-home-row .ws-micro { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; text-align: right; }
.ws-wf-home-disclosure summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.ws-wf-home-disclosure summary::-webkit-details-marker { display: none; }
#home-attention-summary::after { content: "\25BE"; margin-left: var(--ws-2); }
#home-attention details[open] > #home-attention-summary::after { content: "\25B4"; }

/* --- Paging — "Show 25 more", both breakpoints (§C) ------------------------- */
.ws-pager { display: flex; align-items: center; justify-content: space-between; gap: var(--ws-4); margin-top: var(--ws-4); flex-wrap: wrap; }

/* --- FAB: add a player from a photo, phones only ---------------------------- */
.ws-fab {
  display: none;
  position: fixed; z-index: 20;
  right: var(--ws-4);
  bottom: calc(var(--ws-4) + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: var(--ws-radius-pill);
  background: var(--ws-gold); color: var(--ws-ink); border: 0; cursor: pointer;
  align-items: center; justify-content: center;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.ws-fab svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 7; fill: none; stroke-linecap: square; }
.ws-fab:focus-visible { outline: 2px solid var(--ws-text); outline-offset: 2px; }

/* --- Sheets ------------------------------------------------------------------
   A full-screen dialog on phones; above 640px this is nothing more than the
   plain in-page disclosure it always was (see #search-filters-panel /
   #role-sheet in gen_prototype.py — same `hidden` toggle either way, this
   only changes what "not hidden" looks like). openSheet()/closeSheet() add
   role="dialog"'s behaviour: initial focus, Escape, a Back press, and a
   click on the scrim or the close button all close it; body scroll is
   locked via body.ws-sheet-locked below. */
.ws-sheet-head, .ws-sheet-foot { display: none; }
body.ws-sheet-locked { overflow: hidden; }

/* --- Drawer: a detail of what you're already looking at, not a new screen --
   Right-side panel on desktop, bottom sheet on phones. One generic shell
   (gen_prototype.py's wfOpenDrawer/wfCloseDrawer), reused for the
   evaluation/player/prompt drawers alike — reuses body.ws-sheet-locked
   above rather than a second scroll-lock class. */
.ws-drawer { position: fixed; inset: 0; z-index: 60; }
.ws-drawer-scrim { position: absolute; inset: 0; background: rgba(13, 13, 13, 0.72); }
.ws-drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(620px, 92vw); max-width: 92vw;
  background: var(--ws-ink-800); border-left: var(--ws-border);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform var(--ws-ease);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.ws-drawer:not([hidden]) .ws-drawer-panel { transform: translateX(0); }
.ws-drawer-header {
  position: sticky; top: 0; z-index: 1; background: var(--ws-ink-800);
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--ws-4);
  padding: var(--ws-5) var(--ws-6); border-bottom: var(--ws-border);
}
/* The player drawer's own photo (set via setPhoto/setFibaPhoto on
   #ws-drawer-photo, same precedence as the record header) sits beside the
   name/team/position/age text rather than above it — the "popout view
   isn't using space very well" fix. Hidden (and empty) for every other
   drawer type (evaluation, prompt), which never populates it. */
.ws-drawer-head-ident { display: flex; gap: var(--ws-4); align-items: flex-start; min-width: 0; flex: 1 1 auto; }
#ws-drawer-photo.ws-photo--sm { flex: 0 0 auto; }
.ws-drawer-close {
  min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--ws-ink-400); border-radius: var(--ws-radius);
  color: var(--ws-text); cursor: pointer; font-size: 1.4rem; line-height: 1; flex: 0 0 auto;
}
.ws-drawer-close:hover { color: var(--ws-gold); border-color: var(--ws-gold); }
.ws-drawer-close:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
.ws-drawer-body { padding: var(--ws-6); flex: 1 1 auto; }
/* The evaluation view, moved wholesale into #ws-drawer-mount while the
   drawer is open (see wfOpenEvalDrawer) — its own .ws-shell width/padding
   would fight the drawer's, so both are neutralised only in that context. */
.ws-drawer-body .ws-shell { max-width: none; padding: 0; margin: 0; }
/* Container-driven, not viewport-driven: the panel is always narrow
   (min(620px, 92vw), see .ws-drawer-panel above) no matter the surrounding
   viewport, so the record field grid / WS360 part rows and metric tables /
   measurements / data-rights grids the full-page player shell (and the
   evaluation view's own compact WS360 block, #eval-ws360) share with this
   drawer never hit the 900px/640px viewport queries above at desktop
   widths — labels and values overlap instead of collapsing. [data-narrow]
   (set once, permanently, on #ws-drawer — see workflow_ui.py's
   WORKFLOW_SB_HTML) collapses every one of those grids single-column
   unconditionally, the same shape those viewport queries already give
   phones, so nothing here ever needs to widen the drawer to fit them. */
.ws-drawer[data-narrow] .ws-grid--2,
.ws-drawer[data-narrow] .ws-grid--3,
.ws-drawer[data-narrow] .ws-grid--4 { grid-template-columns: minmax(0, 1fr); }
/* Fields specifically get two columns, not one — the drawer's ~620px
   desktop width (.ws-drawer-panel above) has room, and one column per field
   was leaving long empty areas down the panel (the product owner's own
   complaint). Collapses to one column only once the drawer itself goes
   full-screen (the same <=600px breakpoint .ws-drawer-panel uses below),
   where a phone-width column is too narrow for label + value side by side. */
.ws-drawer[data-narrow] .ws-grid--fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) {
  .ws-drawer[data-narrow] .ws-grid--fields { grid-template-columns: minmax(0, 1fr); }
}
.ws-drawer[data-narrow] .ws-360-part-toggle,
.ws-drawer[data-narrow] .ws-360-part-toggle--static { grid-template-columns: 1fr; gap: 2px; }
@media (max-width: 600px) {
  .ws-drawer-panel {
    top: auto; right: 0; left: 0; height: 92vh; width: 100%; max-width: 100%;
    border-left: none; border-top: var(--ws-border); border-radius: var(--ws-radius) var(--ws-radius) 0 0;
    transform: translateY(100%);
  }
  .ws-drawer:not([hidden]) .ws-drawer-panel { transform: translateY(0); }
}
@media print { .ws-drawer { display: none !important; } }
/* The chips-and-button summary is a phone-only stand-in for the plain
   filter box + checkgroup desktop still shows inline — see gen_prototype.py's
   #role-summary/#role-sheet-open and syncRoleSheetForViewport(). */
#role-summary, #role-sheet-open { display: none; }

/* --- Text clamp — long report text, both breakpoints (§D) ------------------- */
.ws-clamp {
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ws-clamp.is-expanded { display: block; -webkit-line-clamp: unset; overflow: visible; }
.ws-clamp-toggle { margin-top: var(--ws-2); }

/* --- Sticky bottom action bar, phones only — applied straight to the
   submission form's existing Done row (.ws-actionbar), not a duplicate
   button, so #sub-save stays the one real control at every width. --------------------------------- */

/* --- Private intel disclosure (record view) ---------------------------------- */
.ws-private-toggle { display: none; }

/* The accordion chevron and "n of m filled" count are added to every section
   head unconditionally (see initFormAccordion()/updateAccordionCounts() in
   gen_prototype.py) because the collapsing itself is what is phone-only —
   these two are hidden above 640px so desktop's section heads render
   exactly as before. */
.ws-accordion-chevron, .ws-accordion-count { display: none; }

@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  /* The max-width alone only ever caught a phone held upright — turned
     sideways it's ~844px wide and fell through to every rule below, back to
     13px inputs (iOS zooms the page), sub-44px targets and the full desktop
     form. The second query is landscape's own floor: (pointer: coarse) is
     true only on touch hardware (a mouse-driven desktop never matches, even
     one resized to a short window), and max-height:500px is short enough to
     catch a phone turned sideways without catching a touchscreen laptop. */

  /* Body text ≥14px everywhere (§E) — every consumer of these two tokens
     (labels, chips, table/roster cells, nav, badges, the footer) grows by
     the same amount rather than each getting its own override. The roster
     alone measured 344 instances under 14px before this. */
  :root { --ws-fs-micro: 0.875rem; --ws-fs-small: 0.9375rem; }

  /* Inputs never below 16px (iOS zooms the page on focus below that) and
     never under the 44px tap-target floor (§B). */
  .ws-input { font-size: 16px; min-height: 44px; }
  textarea.ws-input { min-height: 88px; }
  .ws-checkbox input[type="checkbox"] { width: 20px; height: 20px; }

  /* 44×44 minimum on every interactive control (§E), buttons vertically
     centred rather than just taller. Chips/checks keep their compact look
     but grow to the floor. */
  /* .ws-nav button is exempt from this list — its own rules (above) already
     cover the 44/48px floor at every width, left-aligned with its icon, not
     centred like these. */
  .ws-btn, .ws-chip, .ws-check, .ws-opt, .ws-footer-link, .ws-fab {
    min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  /* .ws-footer-link carries no padding of its own (it reads as a bare
     underlined word, not a button) — short labels like Reset measured
     under the 44px floor on width alone. */
  .ws-footer-link { min-width: 44px; padding-inline: var(--ws-2); }
  .ws-checkbox { min-height: 44px; }
  .ws-checkgroup { gap: var(--ws-3); }
  a[href] { min-height: 44px; display: inline-flex; align-items: center; }

  /* --- Roster: cards replace the table, sticky search, FAB ------------------
     Scoped to #view-roster on purpose — .ws-table-wrap is a generic wrapper
     used all over the scouting-workflow screens (event roster, team sheet,
     combine entries, reference bands...), none of which have a card
     alternative to fall back to; a bare `.ws-table-wrap { display: none; }`
     here silently hid every one of those tables on a phone, roster's own
     card swap included them all by accident. */
  #view-roster .ws-table-wrap { display: none; }
  .ws-roster-cards { display: flex; }
  #roster-legacy-filters {
    position: sticky; top: var(--ws-topbar-h, 0px); z-index: 5;
    background: var(--ws-ink-800); padding-top: var(--ws-3); margin-left: calc(var(--ws-4) * -1);
    margin-right: calc(var(--ws-4) * -1); padding-left: var(--ws-4); padding-right: var(--ws-4);
  }
  .ws-fab { display: inline-flex; }

  /* --- Role picker: chips + "Choose roles" opening the same sheet treatment.
     The roster's own role filter lives inside #search-filters-panel above,
     so it already gets the sheet treatment as part of that panel — this
     block is the submission form's dedicated Roles field only. */
  .ws-rolerow { display: flex; flex-wrap: wrap; gap: var(--ws-2); margin-bottom: var(--ws-3); }
  #role-sheet-open { display: inline-flex; }
  #role-sheet:not([hidden]) {
    position: fixed; inset: 0; z-index: 50;
    background: var(--ws-ink-800); overflow-y: auto;
    padding: calc(var(--ws-4) + env(safe-area-inset-top, 0px)) var(--ws-4) calc(88px + env(safe-area-inset-bottom, 0px));
    margin: 0; border: 0;
  }
  #role-sheet .ws-sheet-head {
    display: flex; align-items: center; gap: var(--ws-3);
    margin: calc(var(--ws-4) * -1) calc(var(--ws-4) * -1) var(--ws-4);
    padding: var(--ws-4); border-bottom: var(--ws-border);
    position: sticky; top: calc(var(--ws-4) * -1); background: var(--ws-ink-800); z-index: 1;
  }
  #role-sheet .ws-sheet-head .ws-input { flex: 1; margin: 0; }
  #role-sheet .ws-sheet-foot {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
    padding: var(--ws-3) var(--ws-4) calc(var(--ws-3) + env(safe-area-inset-bottom, 0px));
    background: var(--ws-ink-800); border-top: var(--ws-border);
  }
  #role-sheet .ws-sheet-foot .ws-btn { flex: 1; }
  #role-sheet .ws-check { min-height: 48px; width: 100%; justify-content: flex-start; }
  #role-sheet .ws-checkgroup { flex-direction: column; }

  /* --- Form: accordion sections -----------------------------------------------
     No wrapper element around "everything after the heading" — collapsing
     hides every direct child of the section except .ws-section-head itself,
     the same pattern the player record's accordion (below) uses. */
  #submission-form > section {
    padding: 0; overflow: hidden;
  }
  #submission-form > section > .ws-section-head {
    display: flex; flex-wrap: wrap; width: 100%; min-height: 48px;
    align-items: center; justify-content: space-between; row-gap: var(--ws-2);
    background: none; border: 0; border-bottom: var(--ws-border);
    padding: var(--ws-4); margin: 0 0 var(--ws-4); cursor: pointer; color: var(--ws-text);
    font-family: var(--ws-body); text-align: left;
  }
  /* Title + "Scout-only" badge share one line when they fit; the badge is
     its own flex item (not just an inline span) so it wraps to a clean
     second line under the title instead of breaking mid-word ("Scout-
     " / "only") when they don't. */
  #submission-form > section > .ws-section-head > h2 {
    flex: 1 1 auto; min-width: 0; margin: 0;
    display: flex; flex-wrap: wrap; align-items: baseline;
    row-gap: var(--ws-1); column-gap: var(--ws-3);
  }
  #submission-form > section > .ws-section-head > h2 .ws-flare { white-space: nowrap; }
  /* The "N of M filled" count and chevron never wrap or shrink — they stay
     right-aligned, and the title/badge give up width to them instead. */
  #submission-form > section > .ws-section-head > .ws-accordion-count {
    white-space: nowrap; flex: 0 0 auto;
  }
  #submission-form > section > .ws-section-head > .ws-accordion-chevron { flex: 0 0 auto; }
  /* Measurements' ft·in/lb ↔ cm/kg toggle: its own full-width row under
     title/count/chevron, compact, instead of squeezing them. */
  #submission-form > section > .ws-section-head > #f-units-toggle {
    order: 10; flex: 1 1 100%;
  }
  #submission-form > section > .ws-section-head > #f-units-toggle .ws-chip {
    padding: var(--ws-1) var(--ws-2); font-size: var(--ws-fs-micro);
  }
  /* Private intel's bespoke flare-callout head (see [data-section-head] in
     the markup) gets the same "count never wraps, stays at the right" fix,
     via an auto margin rather than space-between — its own row.must keep
     its flex-start layout. */
  #submission-form > section > [data-section-head] > .ws-accordion-count {
    white-space: nowrap; flex: 0 0 auto; margin-left: auto;
  }
  #submission-form > section > [data-section-head] > .ws-accordion-chevron { flex: 0 0 auto; }
  #submission-form > section > *:not(.ws-section-head):not([data-section-head]) {
    margin-left: var(--ws-4); margin-right: var(--ws-4);
  }
  #submission-form > section > *:last-child { margin-bottom: var(--ws-4); }
  #submission-form > section[data-collapsed] > *:not(.ws-section-head):not([data-section-head]) { display: none; }
  /* Collapsed: just the header row — its own bottom margin (set above, for
     the space before the body) would otherwise leave an empty strip below
     it once every other child is display:none. [data-section-head]'s
     margin-bottom is inline (its layout must not otherwise change — see the
     markup comment), so beating it here needs !important. */
  #submission-form > section[data-collapsed] > .ws-section-head { margin-bottom: 0; }
  #submission-form > section[data-collapsed] > [data-section-head] { margin-bottom: 0 !important; }
  .ws-accordion-chevron, .ws-accordion-count { display: inline-block; }
  #submission-form > section .ws-accordion-chevron { transition: transform var(--ws-ease); }
  #submission-form > section[data-collapsed] .ws-accordion-chevron { transform: rotate(-90deg); }

  /* --- Form: sticky bottom action bar ----------------------------------------- */
  /* Fixed to the very bottom of the screen (the tab bar it used to stack
     above is retired — see the left sidebar/drawer nav further down). The
     form's own bottom padding covers the bar's own height + safe-area so the
     last field is never hidden behind it. */
  #submission-form { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .ws-actionbar {
    display: flex; gap: var(--ws-3);
    position: fixed; left: 0; right: 0; bottom: env(safe-area-inset-bottom, 0px); z-index: 30;
    padding: var(--ws-3) var(--ws-4);
    background: var(--ws-ink-800); border-top: var(--ws-border);
  }
  .ws-actionbar .ws-btn { flex: 1; min-height: 48px; }
  #view-submission.view { padding-bottom: 0; }

  /* --- Player record: collapsible sections, private intel closed ------------- */
  #view-record > section, #view-record > .record-head {
    padding: 0; overflow: hidden;
  }
  #view-record > section > .ws-section-head {
    display: flex; width: 100%; min-height: 48px;
    align-items: center; justify-content: space-between;
    cursor: pointer; padding: var(--ws-4) 0;
  }
  #view-record > section[data-collapsed] > *:not(.ws-section-head) { display: none; }
  #view-record > section .ws-accordion-chevron { transition: transform var(--ws-ease); }
  #view-record > section[data-collapsed] .ws-accordion-chevron { transform: rotate(-90deg); }
  .ws-private-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: var(--ws-4);
    width: 100%; min-height: 48px;
  }
  #record-private[data-closed] > *:not(.ws-private-toggle-wrap) { display: none; }

  /* --- Event detail: one collapsible team per section ------------------------
     Each team's roster is a full table — on a phone, two or three of them
     back to back is most of the screen's own scroll (wfInitEventRosterAccordion(),
     workflow_ui.py). Same pattern as the player record above: the panel
     keeps its own padding (it's a visible card, unlike a plain section), only
     its non-head children hide while collapsed. */
  #event-rosters > .ws-panel > .ws-section-head { cursor: pointer; }
  #event-rosters > .ws-panel[data-collapsed] > *:not(.ws-section-head) { display: none; }
  #event-rosters > .ws-panel .ws-accordion-chevron { transition: transform var(--ws-ease); }
  #event-rosters > .ws-panel[data-collapsed] .ws-accordion-chevron { transform: rotate(-90deg); }

  /* Same again for the Statistics section's own one-panel-per-team layout
     (wfInitEventStatsAccordion(), workflow_ui.py) — a team sheet is a full
     stat line per player, the other half of the same "34 screens" page. */
  #event-stats-body > .ws-panel > .ws-section-head { cursor: pointer; }
  #event-stats-body > .ws-panel[data-collapsed] > *:not(.ws-section-head) { display: none; }
  #event-stats-body > .ws-panel .ws-accordion-chevron { transition: transform var(--ws-ease); }
  #event-stats-body > .ws-panel[data-collapsed] .ws-accordion-chevron { transform: rotate(-90deg); }

  /* Every screen below the topbar gets the same top offset the sticky
     search bar uses, so nothing here needs its own special case. */
  .ws-topbar { flex-wrap: nowrap; }
}

/* ============================================================================
   WORKFLOW — events / event / notes screens (scout role), new in this pass.
   Every class below is prefixed .ws-wf- and built only from tokens.css — no
   new colours, nothing hard-coded. See workflow_ui.py. Everywhere else in
   this file already gives .ws-btn/.ws-chip/.ws-input/etc. their 44px floor
   (the phone-width pass above), so these screens reuse those classes rather
   than redefining touch targets here.
   ============================================================================ */

/* These are plain ledgers (teams, games, roster rows, team sheets), not
   player cards — the roster-specific "table becomes a card" transform above
   is scoped to .ws-roster-table and never reaches them. Their own phone
   treatment: scroll sideways rather than squeeze, with the leading column
   (jersey number / date / title) pinned so a scrolled-right row still reads
   against who or what it is. */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .ws-wf-table { display: table; min-width: 560px; }
  .ws-table-wrap:has(.ws-wf-table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .ws-wf-table th:first-child, .ws-wf-table td:first-child {
    position: sticky; left: 0; z-index: 1;
    background: var(--ws-ink-800); box-shadow: 1px 0 0 var(--ws-ink-700);
  }
  .ws-wf-table tbody tr:hover td:first-child { background: var(--ws-ink-700); }

  /* The statistics line is the one cell whose content is long enough to
     drag the whole row wide on its own (schema/024, wfTeamTotalsLine/
     p.stat_line) — a max-width keeps it wrapping inside its own column
     instead of stretching the table (and clipping) to fit one long line.
     Always a <pre> (workflow_ui.py's renderTeamStatsPanel/wfRosterRow),
     never the class straight on a <td> — a table-cell's own max-width is a
     sizing suggestion the auto-layout column width can still override,
     where a block element's is a hard cap. white-space is repeated here
     only as a floor against .ws-table td's unscoped white-space:nowrap
     (two classes + an element) outranking .ws-wf-statline-text alone. */
  .ws-wf-table .ws-wf-statline-text { max-width: 220px; white-space: pre-wrap; }

  /* The event roster's starter checkbox (workflow_ui.py's wfRosterRow) is a
     bare <input>, not a .ws-checkbox — the only control on these ledgers
     that fell under the 44px floor other screens already get. */
  .ws-wf-table td:has(> input[type="checkbox"]) { min-width: 44px; text-align: center; }
  .ws-wf-table input[type="checkbox"] { width: 24px; height: 24px; }
}

/* --- Event roster: inline "Link" search results ---------------------------- */
.ws-wf-linkresults { display: flex; flex-direction: column; gap: var(--ws-1); margin-top: var(--ws-2); max-width: 260px; }

/* --- Event page: rows, folded sections, phone columns ----------------------
   A saved roster row opens its evaluation on a tap anywhere outside its
   inputs (workflow_ui.py's event-rosters click handler). Games and Note
   sessions fold behind a summary line. An empty, expanded team shows only
   the empty state's own primary Import roster, not the head's as well. */
.ws-wf-row-link { cursor: pointer; }
.ws-wf-col-phone { display: none; }
.ws-wf-disclosure > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: var(--ws-3); min-height: 44px; cursor: pointer;
}
.ws-wf-disclosure > summary::-webkit-details-marker { display: none; }
.ws-wf-disclosure > summary h2 { margin: 0; }
.ws-wf-disclosure-chevron { transition: transform var(--ws-ease); }
.ws-wf-disclosure:not([open]) .ws-wf-disclosure-chevron { transform: rotate(-90deg); }
#event-rosters > .ws-panel:not([data-collapsed]):has([data-wf-roster-empty]) [data-wf-head-import] { display: none; }

/* --- Add players: One player / A whole team ------------------------------- */
.ws-sub-mode { display: flex; gap: var(--ws-2); margin-bottom: var(--ws-5); }
.ws-sub-mode .ws-chip { flex: 1 1 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
#view-submission[data-sub-mode="team"] #submission-form,
#view-submission[data-sub-mode="team"] #sub-alert,
#view-submission[data-sub-mode="team"] #submission-view-sub { display: none !important; }

/* "Check the team" preview (wfRiTable, workflow_ui.py): the Height cell's
   cm input with its ft/in readout beside it (heightFtIn, gen_prototype.py).
   The readout's text length varies by row — 6'7" vs 6'11.5" vs 7'1.5" — and
   the cell is .ws-num (right-aligned), so an auto-width label shifted the
   cm input left/right row to row ("wavy" column). Fixed-width, left-aligned
   and flush against the input instead: every row's input lands at the same
   x, the group's total width stays constant, and the column's right edge
   (and the HEIGHT header above it) hold where they already were. Wide
   enough for the widest realistic value, 7'11.5". */
.ws-wf-height-ftin {
  display: inline-block;
  width: 7ch;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

/* Drop's merged Player column (dropRowPlayerCellHtml, drop_ui.py): the
   sheet's own name on top, the Wingspan match select beneath it. Stacks the
   same way on phones — no extra rule needed, the table itself stays
   horizontally scrollable (.ws-table-wrap). */
.ws-wf-player-cell { display: flex; flex-direction: column; gap: var(--ws-1); }
.ws-wf-player-match { display: flex; align-items: center; gap: var(--ws-1); flex-wrap: wrap; }

/* Phones: the events list is cards (#events-cards, .ws-roster-cards), and an
   event roster shows only # · Name · Notes · › — the row itself is the way
   into everything else. */
@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  #events-table-wrap { display: none; }
  .ws-wf-roster-table.ws-wf-table { min-width: 0; width: 100%; }
  .ws-wf-roster-table .ws-wf-col-wide { display: none; }
  .ws-wf-roster-table .ws-wf-col-phone { display: inline; }
  .ws-wf-roster-table th, .ws-wf-roster-table td { padding-left: var(--ws-2); padding-right: var(--ws-2); }
  .ws-wf-roster-table input[data-f="jersey_number"] { width: 52px !important; }
  .ws-wf-roster-table { table-layout: fixed; }
  .ws-wf-roster-table th:first-child { width: 68px; }
  .ws-wf-roster-table th.ws-num { width: 60px; }
  .ws-wf-roster-table th:last-child { width: 56px; }
  .ws-wf-roster-table td[data-name-cell] { white-space: normal; }
  [data-wf-remove-slot]:empty { display: none; }
  .ws-wf-roster-table td[data-name-cell] .ws-input { width: 100%; min-width: 0; }
  .ws-wf-roster-table .ws-btn { padding-left: var(--ws-2); padding-right: var(--ws-2); min-width: 44px; }
  /* A team's head: name (and chevron) on one line, its buttons on the next. */
  #event-rosters > .ws-panel > .ws-section-head { flex-wrap: wrap; }
  #event-rosters > .ws-panel > .ws-section-head > div { order: 3; flex: 1 1 100%; }
  #event-rosters > .ws-panel > .ws-section-head > h3 { flex: 1 1 0; min-width: 0; }
  /* Buttons share a row while they fit and wrap when they don't (a team with
     "Remove from event" has three, which never fit one 390px row). */
  #event-rosters > .ws-panel > .ws-section-head > div { flex-wrap: wrap !important; }
  #event-rosters > .ws-panel > .ws-section-head .ws-btn { flex: 1 1 auto; white-space: nowrap; padding-left: var(--ws-2); padding-right: var(--ws-2); }
}

/* --- Notes: phone-first capture --------------------------------------------
   One tall textarea above a horizontally-scrolling number strip. Sized
   against the viewport (wfFitNotesTextarea(), workflow_ui.py's WORKFLOW_JS)
   so the on-screen keyboard never covers the Save button or the strip. */
.ws-wf-notes-view { display: flex; flex-direction: column; }
.ws-wf-notes-header { display: flex; flex-direction: column; gap: var(--ws-3); margin-bottom: var(--ws-3); }
.ws-wf-notes-header-row { display: flex; gap: var(--ws-3); flex-wrap: wrap; align-items: center; }
.ws-wf-notes-header-row .ws-input { flex: 1 1 160px; min-width: 0; }
/* The event/team/game summary line: reads as a line of text, opens the selects. */
.ws-wf-notes-context-toggle { display: flex; width: 100%; justify-content: flex-start; text-align: left; text-transform: none; letter-spacing: normal; font-size: var(--ws-fs-body); }

/* Dictation — sits above the textarea (workflow_ui.py's WORKFLOW_VIEWS_HTML,
   notes view). ws-wf-mic-btn is deliberately bigger than the system's usual
   44px minimum: the mic is the one control a scout has to hit one-handed,
   without looking down. The dot is otherwise only ever a circle in the
   WS360 badge (tokens.css: "the dot is the only circle") — same allowance
   here, same reason: a live/attention signal, not chrome. */
.ws-wf-dictate-row { display: flex; align-items: center; gap: var(--ws-3); margin-bottom: var(--ws-3); }
.ws-wf-mic-btn { min-height: 48px; min-width: 48px; display: inline-flex; align-items: center; gap: var(--ws-2); flex: 0 0 auto; }
.ws-wf-mic-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ws-text-dim); display: inline-block; }
.ws-wf-mic-btn[data-state="listening"] .ws-wf-mic-dot { background: var(--ws-gold); animation: ws-wf-mic-pulse 1.1s ease-in-out infinite; }
.ws-wf-mic-btn[data-state="error"] .ws-wf-mic-dot { background: var(--ws-flare); animation: none; }
@keyframes ws-wf-mic-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.ws-wf-notes-textarea {
  display: block; width: 100%; min-height: 50dvh; resize: vertical;
  font-family: var(--ws-mono); font-size: 16px; line-height: var(--ws-lh-tight);
  background: var(--ws-ink-900); color: var(--ws-text);
  border: var(--ws-border); border-radius: var(--ws-radius); padding: var(--ws-3);
}

.ws-wf-notes-chips {
  display: flex; gap: var(--ws-2); overflow-x: auto; padding: var(--ws-3) 0;
  -webkit-overflow-scrolling: touch;
}
.ws-wf-notes-chip {
  flex: 0 0 auto; min-height: 44px; display: inline-flex; flex-direction: column;
  align-items: flex-start; justify-content: center; gap: 2px;
  padding: var(--ws-2) var(--ws-3); border: var(--ws-border); border-radius: var(--ws-radius);
  background: var(--ws-ink-700); color: var(--ws-text); cursor: pointer;
}
.ws-wf-notes-chip:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
.ws-wf-notes-chip[data-unlinked] { border-style: dashed; color: var(--ws-text-dim); }

.ws-wf-bygroup { margin-top: var(--ws-4); }

/* --- Notes: focused on a phone ----------------------------------------------
   wfSetNotesCompact() (workflow_ui.py) toggles this on body when
   #notes-textarea has focus. Courtside, with the keyboard up, the chrome
   above the textarea (role banner, utility strip, dictation row) was eating
   enough of the visible area to push the caret and the number strip under
   the keyboard — this frees that room back up rather than fighting the
   keyboard for it. Scoped to the same phone/landscape-phone query as the
   rest of this file's touch-target pass; a mouse-driven desktop never
   focuses this textarea under those conditions anyway. */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  body.ws-notes-focused .ws-wf-notes-textarea { min-height: 0; }

  /* The sign-out/account controls go, collapsing the strip to one line. */
  body.ws-notes-focused #ws-utility-strip { padding-top: var(--ws-2); padding-bottom: var(--ws-2); min-height: 0; }
  body.ws-notes-focused .ws-utilitystrip-account { display: none; }

  /* The mic stays full-size and reachable (one-handed, without looking
     down) — only the preview line and the keyboard-mic hint under it fold
     away, so the row takes less height without losing the control itself. */
  body.ws-notes-focused .ws-wf-dictate-row { margin-bottom: var(--ws-1); }
  body.ws-notes-focused #notes-dictate-preview,
  body.ws-notes-focused #notes-dictate-hint { display: none; }
}

/* Quick capture (schema/024): the Unmatched captures rows on Home/Events and
   the Match to event panel on the notes screen. Rows wrap rather than scroll
   at phone width; every control keeps the 44px floor. */
.ws-wf-capture-row {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: var(--ws-3); min-height: 44px; padding: var(--ws-2) 0; border-bottom: var(--ws-border);
}
.ws-wf-capture-row:last-child { border-bottom: none; }
.ws-wf-match-new { margin-top: var(--ws-4); padding-top: var(--ws-3); border-top: var(--ws-border); }
.ws-wf-match-number { padding: var(--ws-2) 0; border-bottom: var(--ws-border); }
.ws-wf-match-number:last-child { border-bottom: none; }
.ws-wf-match-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--ws-3); }
.ws-wf-match-row .ws-input { flex: 0 1 220px; min-width: 0; }
.ws-wf-match-lines { display: flex; flex-direction: column; gap: var(--ws-2); padding: var(--ws-3) 0 var(--ws-2) var(--ws-4); }
.ws-wf-match-lines .ws-checkbox { align-items: flex-start; min-height: 44px; }

/* --- Document blocks (wfDocBlock) -------------------------------------------
   One reusable component behind every generated report (strengths &
   weaknesses, team analysis, player impact, stat commentary, consistency,
   deep evaluation) on the evaluation and event screens. */
.ws-wf-bullets { margin: 0; padding-left: 1.1em; }
.ws-wf-bullets li { font-size: var(--ws-fs-body); margin: 2px 0; }
.ws-wf-toppick { padding: var(--ws-2) 0; border-bottom: 1px solid var(--ws-ink-700); }
.ws-wf-toppick:last-child { border-bottom: 0; }
.ws-wf-uncertain { outline: 2px solid var(--ws-flare); outline-offset: 1px; }

/* --- Statistics: the one-line stat line, monospace, everywhere it appears -- */
.ws-wf-statline-text {
  font-family: var(--ws-mono); font-size: var(--ws-fs-small); white-space: pre-wrap;
  margin: 0 0 var(--ws-2); color: var(--ws-text);
}

/* --- Roster status column: notes · stats · S&W · deep eval, at a glance -- */
.ws-wf-status { display: inline-flex; gap: var(--ws-2); }
.ws-wf-status-dot {
  font-family: var(--ws-display); font-size: var(--ws-fs-micro); font-weight: 700;
  color: var(--ws-text-ghost); letter-spacing: var(--ws-ls-micro);
}
.ws-wf-status-dot--draft { color: var(--ws-text-dim); }
.ws-wf-status-dot--final { color: var(--ws-gold); }

/* --- Evaluation screen: sticky action bar, collapsed supporting detail ----
   The bar sticks to the top of the viewport (the topbar scrolls away) so
   Finalize/Print/Share never need a scroll to the bottom of a long page;
   inside the drawer, renderEvaluationShell sets an inline top equal to the
   drawer's own sticky header instead. */
.ws-wf-eval-actions {
  position: sticky; top: 0; z-index: 6;
  background: var(--ws-ink-800); border-bottom: var(--ws-border);
  padding: var(--ws-3) 0; margin: 0 0 var(--ws-5);
}
.ws-wf-eval-actions-row { display: flex; gap: var(--ws-2); flex-wrap: wrap; align-items: center; }
.ws-wf-eval-actions .ws-btn { padding: var(--ws-3) var(--ws-4); }
@media (max-width: 600px) {
  .ws-wf-eval-actions .ws-btn { padding: var(--ws-3); }
}
.ws-wf-eval-actions p { margin: var(--ws-2) 0 0; }
.ws-wf-eval-actions p:empty { display: none; }
.ws-wf-eval-more { position: relative; }
.ws-wf-eval-more > summary { list-style: none; }
.ws-wf-eval-more > summary::-webkit-details-marker { display: none; }
.ws-wf-eval-more-menu {
  position: absolute; right: 0; top: calc(100% + var(--ws-1)); z-index: 7;
  display: flex; flex-direction: column; gap: var(--ws-2); min-width: 160px;
  padding: var(--ws-2); background: var(--ws-ink-700); border: var(--ws-border);
}
/* The event page's More (Merge into another event): one line wide; on a phone
   the header wraps it to the left edge, so its menu opens rightwards. */
#event-more .ws-wf-eval-more-menu { min-width: 240px; }
@media (max-width: 640px) { #event-more .ws-wf-eval-more-menu { left: 0; right: auto; } }
.ws-wf-eval-disclosure { margin-top: var(--ws-4); border-top: var(--ws-border); }
.ws-wf-eval-disclosure > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
/* The document block inside already sits under this summary's title. */
.ws-wf-eval-disclosure .ws-panel > .ws-section-head { display: none; }
.ws-wf-doc-about { margin: 0 0 var(--ws-2); }
.ws-wf-doc-about > summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
/* The opposite of .ws-wf-doc-meta below: never shown on screen (the on-
   screen "Draft"/"Final" badge inside the document body already covers it),
   only in a printed/PDF copy, per document — see wfDocBlockHtml(). */
.ws-wf-doc-print-status { display: none; }

/* --- Utility strip: Live / Empty / Sample + account (standalone build only)
   One shared bar directly under the topbar, identical on every route once
   signed in as a scout — scout screens AND player-preview, since the
   preview is still the scout's own session (renderAuthPanel() owns showing
   and hiding it, via body[data-locked] below). Sample mode's gold
   border-bottom is the one thing on screen that cannot be mistaken for a
   live app; Empty gets a dim one; Live a plain hairline. The print
   watermark below covers the case where a screen gets printed while
   Sample is on. */
.ws-utilitystrip {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--ws-2) var(--ws-4);
  min-height: 48px;
  padding: var(--ws-2) var(--ws-6);
  background: var(--ws-ink-900);
  border-bottom: 1px solid var(--ws-ink-500);
}
.ws-utilitystrip-account { flex: 0 0 auto; display: flex; align-items: center; gap: var(--ws-4); }

@media (max-width: 600px) {
  .ws-utilitystrip { padding: var(--ws-3) var(--ws-4); }
}

.ws-segmented {
  display: inline-flex;
  border: var(--ws-border);
  border-radius: 4px;
  overflow: hidden;
}
.ws-segmented button {
  min-height: 44px; min-width: 44px;
  padding: 0 var(--ws-4);
  background: transparent;
  border: none;
  border-left: var(--ws-border);
  color: var(--ws-text-dim);
  font-family: var(--ws-display);
  font-size: var(--ws-fs-micro);
  letter-spacing: var(--ws-ls-micro);
  text-transform: uppercase;
  cursor: pointer;
}
.ws-segmented button:first-child { border-left: none; }
.ws-segmented button[aria-pressed="true"] { background: var(--ws-ink-700); color: var(--ws-gold); }
.ws-segmented button:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: -2px; }
/* The strip's copy of the control: same 44px targets everywhere (the
   mobile audit's hard assertion allows no exception for a compact context) —
   only the horizontal padding shrinks so it still fits the slim bar. */
.ws-segmented--sm button { padding: 0 var(--ws-2); }

@media print {
  /* FIBA headshots (049) are hotlinked for scout screens only: never on paper
     or in a PDF, whichever page is printed. */
  .ws-photo:has(> .ws-fiba-photo-link), .ws-photo:has(> img[data-fiba-photo]), .ws-fiba-credit { display: none !important; }
  /* 080: a photo a scout saved through Drop with no consent never prints. */
  .ws-photo[data-scout-only] { display: none !important; }
  /* Club logos and FIBA team logos/flags (051): scout screens only, same
     reasoning — #eval-header is already .ws-wf-print-hide below, so this is
     defense in depth for the one surface that is not (the Roster list). */
  .ws-inline-logo { display: none !important; }
  /* .ws-footer: the app's own footer (build.py) sits after every view, and on
     a printed report it was the whole of a near-blank last page (feedback1,
     item 15). The two reports carry their own footer on every sheet. */
  #ws-sidebar, #ws-sidebar-scrim, #nav-toggle, .ws-topbar, #sb-auth-wrap, #ws-utility-strip,
  .sample-banner, .ws-footer,
  .ws-wf-print-hide, .ws-wf-doc-toolbar, .ws-wf-doc-meta, .ws-wf-doc-callout,
  .ws-wf-doc-history, .ws-wf-doc-edit {
    display: none !important;
  }
  /* The sidebar's reserved column (body.ws padding-left, ≥900px) would
     otherwise leave a blank strip down a printed page's left edge now that
     the sidebar above is hidden. */
  body.ws { padding-left: 0 !important; }
  /* Pure white, not --ws-bone's warm off-white — paper reads cleaner flat
     white than the product's own ground tint (explicit call, overrides
     BRAND.md §2's usual "never substitute #FFF", scoped to this one
     stylesheet context). */
  body, .ws-shell { background: #fff !important; color: var(--ws-ink) !important; }
  .ws-panel {
    background: #fff !important; border: 1px solid var(--ws-ink);
    break-inside: avoid; page-break-inside: avoid;
  }
  a { color: var(--ws-ink) !important; text-decoration: underline; }
  .ws-label, .ws-label--dim, .ws-field-value, .ws-micro { color: var(--ws-ink) !important; }
  /* --ws-text-mut is near-white at low opacity, built for the dark ground
     — an unlinked/sparse entry's "Not generated yet." (deep evaluation,
     stats) would otherwise print as a near-invisible smudge instead of a
     muted but legible line. */
  .ws-empty { color: rgba(13, 13, 13, 0.5) !important; }
  /* No heading left stranded at the foot of a page — the deep evaluation's
     five sections are each a .ws-field wrapping a .ws-label--dim heading
     (wfDocReadField, WORKFLOW_SB_JS), same shape as every other document.
     orphans/widows: a heading's first paragraph never leaves just one or
     two lines stranded at a page break either. */
  .ws-label, .ws-label--dim { break-after: avoid; page-break-after: avoid; }
  .ws-field { break-inside: avoid; page-break-inside: avoid; }
  .ws-field-value { orphans: 3; widows: 3; }
  /* Quiet metadata, not a second headline — the document's own "Deep
     evaluation" section heading (and the player block above it) already
     carry the visual weight on this page. */
  .ws-wf-doc-print-status {
    display: block !important; font-size: var(--ws-fs-micro);
    letter-spacing: var(--ws-ls-micro); color: rgba(13, 13, 13, 0.55) !important;
    margin: 0 0 var(--ws-3);
  }

  /* WS360 profile block (COMBINE.md §4): its own text classes sit outside
     the .ws-label/.ws-field-value/.ws-micro sweep above. Dead code now that
     #eval-ws360-section is ws-wf-print-hide (S7 dropped the widget from the
     printed report entirely — see the view markup's own comment) but left
     in place rather than deleted, since ws360Block() is shared with other,
     still-printable surfaces (the record page has no print stylesheet of
     its own yet, but nothing stops one reusing this block later). */
  .ws-360-headline, .ws-360-part-name, .ws-360-part-band, .ws-360-part-coverage,
  .ws-360-part-source, .ws-360-part-notes, .ws-360-metric-row p,
  .ws-360-derived p, .ws-360-missing, .ws-360-comment, .ws-360-unverified,
  .ws-conf-text {
    color: var(--ws-ink) !important;
  }
  /* The inline mark reads onlight on paper regardless of the data-variant
     it was authored with — gold text fails on bone (BRAND.md's hard color
     rule), so the "360" drops to ink along with everything else here. */
  .ws-360-lockup, .ws-360-360 { color: var(--ws-ink) !important; }
}

/* Any other screen printed as it is: both paper sizes are fine — size:auto
   defers to whatever the print dialog/PDF target already has set. The two
   reports bring their own page (margin 0, sheets of their own; see
   "Reports" below and wsRptPrepare, report_ui.py). */
@page {
  size: auto;
  margin: 15mm 14mm 20mm 14mm;
}

/* --- Record → Scouting work: two kinds of report (schema/025) -------------
   A tag above each heading says which kind you are looking at — the player
   report (all events, gold on ink) or an event report (one per event,
   muted) — so on a phone, where the two stack, they can never be confused.
   The event reports are a list of rows, not a table: nothing to scroll
   sideways at 390px. */
.ws-wf-kind-tag {
  display: inline-block; margin: 0 0 var(--ws-2); padding: 2px var(--ws-2);
  font-family: var(--ws-display); font-size: var(--ws-fs-micro); font-weight: 700;
  letter-spacing: var(--ws-ls-micro); text-transform: uppercase; line-height: 1.4;
  color: var(--ws-text-dim); border: 1px solid var(--ws-ink-500); border-radius: var(--ws-radius);
}
.ws-wf-kind-tag--player { color: var(--ws-gold); border-color: var(--ws-gold); }
.ws-wf-evlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--ws-3); }
.ws-wf-evrow {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ws-3) var(--ws-4);
  padding: var(--ws-4); border: var(--ws-border); border-radius: var(--ws-radius);
}
.ws-wf-evrow-main { flex: 1 1 260px; min-width: 0; }
.ws-wf-evrow .ws-wf-kind-tag { margin-bottom: var(--ws-1); }

/* --- Auth gate: locked until sign-in (standalone build only) --------------
   [data-locked] is set on <body> by default in the raw standalone HTML (see
   build.py) and toggled from there on by applyAuthGate() (gen_prototype.py,
   SB JS block) — "you shouldn't be able to see anything until you sign in",
   for every route and both preview roles. Nothing here ever matches in the
   artifact build: its <body> carries neither the attribute nor the JS that
   would ever set it, and #sb-auth-wrap does not exist in its markup at all
   (SB HTML markers strip it) — see gen_prototype.py's renderAuthPanel(). */
body[data-locked] #ws-sidebar,
body[data-locked] #ws-sidebar-scrim,
body[data-locked] #nav-toggle,
body[data-locked] #ws-utility-strip,
body[data-locked] .view,
body[data-locked] .ws-footer {
  display: none !important;
}
/* Centred, phone-first — the one thing on screen, not the roster/topbar
   layout it normally sits inside. */
body[data-locked] #sb-auth-wrap {
  display: flex !important;
  align-items: center; justify-content: center;
  min-height: calc(100vh - var(--ws-topbar-h, 0px));
  padding: var(--ws-4) !important;
}
body[data-locked] #sb-auth-panel {
  width: 100%; max-width: 420px;
}

/* One CTA per screen (§ owner note): every state renderAuthPanel() can put
   on the locked screen — signed_out's two modes, checking, no_access,
   recovery — shares this one stacked, full-width, centred layout so the
   panel never resizes or reflows switching between them. */
.ws-auth-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ws-4);
  text-align: center;
}
.ws-auth-logo { height: 32px; width: auto; display: block; }
.ws-auth-stack .ws-input,
.ws-auth-stack .ws-btn {
  width: 100%;
  min-height: 44px;
  font-size: 16px; /* never below 16px — iOS zooms the page on focus under that */
}
.ws-auth-stack #sb-signin-msg { margin: 0; }
.ws-auth-links-row {
  display: flex;
  justify-content: center;
  gap: var(--ws-5);
  flex-wrap: wrap;
  width: 100%;
}
/* A plain text link, not a second button box next to the one primary CTA
   above it — "Have a password? Sign in with it", "Forgot password?", "Use a
   sign-in link instead". Muted until hovered/focused, 44px tap height via
   padding rather than a border or fill. */
.ws-link-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--ws-2) 0;
  font-family: var(--ws-body);
  font-size: var(--ws-fs-small);
  color: var(--ws-text-mut);
  text-decoration: none;
}
.ws-link-quiet:hover { color: var(--ws-text); text-decoration: underline; }
.ws-link-quiet:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }

/* --- Locked-screen ground: the pebble texture, faint --------------------
   Same crop as .ws-textured above, layered as a background rather than an
   ::before so a radial vignette can dampen it further: a semi-opaque ink
   veil (rgba below matches --ws-ink-800's own #0D0D0D) painted over the
   image, near-opaque at the edges and at its most transparent — still only
   ~10% show-through, never a literal 0% cutout — at the centre. That caps
   the visible strength (target ~8-10% show-through) without a background
   layer's non-existent opacity. background-attachment: fixed is desktop
   only below — iOS ignores it outright, and on phones that do honour it,
   fixed can repaint/jank while scrolling a full-height locked screen; plain
   scroll still covers via background-size: cover either way. */
body[data-locked] {
  /* No sidebar on screen while locked — its reserved column (body.ws
     padding-left, ≥900px) would otherwise leave the centred auth panel
     below off-centre. */
  padding-left: 0 !important;
  background-color: var(--ws-ink-800);
  background-image:
    radial-gradient(circle at 50% 40%, rgba(13, 13, 13, 0.90) 0%, var(--ws-ink-800) 75%),
    url("/assets/texture-pebble.png");
  background-size: cover, cover;
  background-position: 50% 40%, 50% 40%;
  background-repeat: no-repeat, no-repeat;
}
@media (min-width: 641px) {
  body[data-locked] { background-attachment: fixed; }
}

/* ============================================================================
   WS360 profile block + Combines/Combine — new in this pass. ws360Block() /
   wsBadgeSvg() live in workflow_ui.py (WORKFLOW_JS/WORKFLOW_SB_JS); the
   combines/combine screens are markup + WORKFLOW_SB_JS. Prefixed .ws-360-
   for the profile block, .ws-wf- (joining the WORKFLOW section above) for
   everything else — built only from tokens.css, same rule as that section.
   See COMBINE.md §4.
   ============================================================================ */

.ws-360-block { display: block; }

.ws-360-headline-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--ws-3); flex-wrap: wrap; margin-bottom: var(--ws-4);
}
.ws-360-headline {
  font-family: var(--ws-display); font-weight: 700; font-size: var(--ws-fs-body);
  text-transform: uppercase; letter-spacing: var(--ws-ls-micro); color: var(--ws-text);
  margin: 0;
}
.ws-360-block--compact .ws-360-headline { font-size: var(--ws-fs-small); }
.ws-360-evidence { display: flex; align-items: center; gap: var(--ws-2); flex: 0 0 auto; }
/* confidence.dots (COMBINE.md §3) is an independent count from
   confidence.level — the fixed early=1/developing=3/stronger=5 cascade
   .ws-conf[data-level] alone gives (see the Confidence track section,
   above) cannot always be trusted, so ws360Block sets this per-dot
   attribute directly; it wins whenever it is present. */
.ws-conf i[data-on] { background: var(--ws-gold); border-color: var(--ws-gold); }

.ws-360-top { display: flex; gap: var(--ws-5); align-items: flex-start; flex-wrap: wrap; }
.ws-360-parts { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: var(--ws-2); }

.ws-360-part { border-bottom: 1px solid var(--ws-ink-700); padding-bottom: var(--ws-2); }
.ws-360-part:last-child { border-bottom: 0; }
.ws-360-part-toggle {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: var(--ws-3);
  align-items: baseline; width: 100%; min-height: 44px; text-align: left;
  background: none; border: 0; color: var(--ws-text); cursor: pointer; padding: var(--ws-2) 0;
  font-family: var(--ws-body); font-size: var(--ws-fs-small);
}
.ws-360-part-toggle:disabled { cursor: default; }
.ws-360-part-toggle--static { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: var(--ws-3); align-items: baseline; padding: var(--ws-2) 0; }
.ws-360-part-name {
  font-family: var(--ws-display); font-weight: 700; font-size: var(--ws-fs-micro);
  text-transform: uppercase; letter-spacing: var(--ws-ls-micro); color: var(--ws-text-dim);
}
.ws-360-part-band { color: var(--ws-text); }
.ws-360-part-coverage, .ws-360-part-source { color: var(--ws-text-mut); font-size: var(--ws-fs-micro); }
/* Sentence case, deliberately not .ws-micro's uppercase treatment — this is
   a written sentence from the founder's own words (COMBINE.md §3's `notes`),
   not a short meta tag. */
.ws-360-part-notes {
  font-family: var(--ws-body); font-size: var(--ws-fs-micro); line-height: 1.4;
  margin: 0 0 var(--ws-2); color: var(--ws-text-mut);
}
.ws-360-part-detail { padding: var(--ws-2) 0 var(--ws-3); }
.ws-360-metric-row { padding: var(--ws-2) 0; border-top: 1px solid var(--ws-ink-800); }
.ws-360-metric-row:first-child { border-top: 0; }

.ws-360-derived, .ws-360-unverified, .ws-360-next { margin-top: var(--ws-4); padding-top: var(--ws-3); border-top: var(--ws-border); }
.ws-360-missing { margin-top: var(--ws-3); }
.ws-360-comment { margin-top: var(--ws-3); font-style: italic; }

@media (max-width: 640px) {
  .ws-360-part-toggle, .ws-360-part-toggle--static { grid-template-columns: 1fr; gap: 2px; }
}

/* Provisional (confidence.level === "early"): nothing in the badge is gold
   and the arc goes dashed — the same rule the older .ws-score[data-provisional]
   pattern applies (WS360 rating section, above), restated directly on
   .ws-badge since ws360Block never wraps its badge in a .ws-score panel. */
.ws-badge[data-provisional] .ws-badge-arc { stroke: var(--ws-text-dim); stroke-dasharray: 5 4; }
.ws-badge[data-provisional] .ws-badge-dot { fill: var(--ws-text-dim); }
.ws-badge[data-provisional] .ws-badge-dot[data-state="absent"] { fill: var(--ws-ink-700); }
/* Combines/combine's three tables (combines list, entries, reference bands)
   already carry .ws-wf-table (see the phone-width table rule earlier in the
   WORKFLOW section) — no separate rule needed here. */

/* ============================================================================
   Inline WS360 mark — brand/BRAND.md §10b "Inline mark". The identity
   lockup, not the coverage chart above: same 72°-apart, half-step-offset
   ring as .ws-badge (R=46 on a 0 0 120 120 viewBox — see WS360_MARK_SYMBOL,
   gen_marketing.py / gen_prototype.py), drawn once as <symbol id="ws360-
   mark"> and referenced everywhere with <use>. No arc, no number, no
   per-dot state — solid dots, hairline ring, always. Never interactive, so
   the 44px target-size rule does not apply.
   ============================================================================ */

.ws-360-lockup {
  display: inline-flex; align-items: baseline; gap: 0.3em;
  vertical-align: baseline; white-space: nowrap; color: inherit;
}
.ws-360-mark {
  align-self: center; color: currentColor; vertical-align: -0.1em;
}
.ws-360-mark-ring { fill: none; stroke: currentColor; stroke-width: 1.5; opacity: 0.6; }
.ws-360-mark-dot  { fill: currentColor; stroke: none; }

.ws-360-word {
  font-family: var(--ws-display); font-weight: 700; text-transform: uppercase;
  letter-spacing: -0.01em; line-height: 1;
}
/* The only gold in a lockup. Never on a light ground — see [data-variant]
   below and the @media print override, which both drop it to currentColor. */
.ws-360-360 { color: var(--ws-gold); }
.ws-360-lockup[data-variant="onlight"] .ws-360-360 { color: inherit; }

/* sm: cap-height of the surrounding text, wordmark only — no font-size of
   its own, and no ring+dots (they read as specks at this size; the
   ws360_lockup()/ws360Lockup() helpers omit the <svg> entirely at sm).
   md: section/card heading, with the ring. lg: hero/page heading, with the
   ring. */
.ws-360-lockup--md { font-size: var(--ws-fs-display-m); }
.ws-360-lockup--md .ws-360-mark { width: 0.78em; height: 0.78em; }
.ws-360-lockup--lg { font-size: var(--ws-fs-display-l); }
.ws-360-lockup--lg .ws-360-mark { width: 0.72em; height: 0.72em; }

/* ============================================================================
   FOUNDER FLOW — design pass over the screens he works through in order:
   team import → event → player form → player record → evaluation → notes.
   Tokens only (tokens.css: --ws-measure, --ws-fs-read, --ws-lh-read,
   --ws-fs-statline, --ws-touch). Screen rules sit in @media screen wherever
   the same markup also prints (the evaluation's branded report keeps its
   own @media print treatment above, untouched).
   ============================================================================ */

/* Native checkboxes take the brand accent: the team import's Import column,
   Apply's field ticks, Run all's Redo. Never browser blue on ink. */
input[type="checkbox"], input[type="radio"] { accent-color: var(--ws-gold); }
summary:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }

/* --- Outline button: a secondary action that still reads as "the next
   step" without becoming a second gold slab. Gold text on ink only. ------- */
.ws-btn--outline { border-color: var(--ws-gold); color: var(--ws-gold); }
.ws-btn--outline:hover { background: var(--ws-ink-600); border-color: var(--ws-gold); color: var(--ws-gold); }
a.ws-btn--outline:link, a.ws-btn--outline:visited { color: var(--ws-gold); }
.ws-btn:disabled, .ws-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.ws-btn--primary:disabled:hover { background: var(--ws-gold); border-color: var(--ws-gold); }
/* Waiting on something first (schema/043: his confirmed position): looks
   disabled and is never a gold slab, but still takes the click, which goes
   to what it is waiting on. */
.ws-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.ws-btn--primary[aria-disabled="true"],
.ws-btn--primary[aria-disabled="true"]:hover { background: transparent; border-color: var(--ws-gold); color: var(--ws-gold); }
.ws-wf-position-chip { margin: 0 0 var(--ws-2); }
.ws-wf-position-chip .ws-wf-doc-tag { white-space: normal; }
.ws-wf-position-gate { margin: var(--ws-2) 0; }

/* --- Save state: a dot and the words, calm. Set by wsStatusTone() ---------
   saved = positive, busy = a slow breathe, warn = flare (attention). */
.ws-wf-savestate { display: inline-flex; align-items: center; gap: var(--ws-2); }
.ws-wf-savestate[data-tone]::before {
  content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ws-text-mut); transition: background var(--ws-ease);
}
.ws-wf-savestate[data-tone="saved"] { color: var(--ws-text-dim); }
.ws-wf-savestate[data-tone="saved"]::before { background: var(--ws-positive); }
.ws-wf-savestate[data-tone="busy"]::before { animation: ws-wf-breathe 1.2s ease-in-out infinite; }
.ws-wf-savestate[data-tone="warn"] { color: var(--ws-flare); }
.ws-wf-savestate[data-tone="warn"]::before { background: var(--ws-flare); }
@keyframes ws-wf-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

@media screen {
  /* --- Document blocks: scannable AI drafts --------------------------------
     Title + status tag on one line, labelled sections at a reading measure,
     dot bullets (the brand's one circle), a hairline above the tools. */
  .ws-wf-doc { padding: var(--ws-5) var(--ws-5) var(--ws-4); }
  .ws-wf-doc-head { align-items: center; margin-bottom: var(--ws-2); }
  .ws-wf-doc-tag {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; white-space: nowrap;
    font-family: var(--ws-body); font-size: var(--ws-fs-micro); text-transform: uppercase;
    letter-spacing: var(--ws-ls-micro); color: var(--ws-text-dim);
  }
  .ws-wf-doc-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .ws-wf-doc-tag[data-tone="empty"] { color: var(--ws-text-mut); }
  .ws-wf-doc-tag[data-tone="empty"]::before { background: transparent; box-shadow: inset 0 0 0 1px var(--ws-text-mut); }
  .ws-wf-doc-tag[data-tone="busy"] { color: var(--ws-text); }
  .ws-wf-doc-tag[data-tone="busy"]::before { background: var(--ws-flare); animation: ws-wf-breathe 1.2s ease-in-out infinite; }
  .ws-wf-doc-tag[data-tone="final"] { color: var(--ws-gold); }
  .ws-wf-doc-tag[data-tone="warn"] { color: var(--ws-flare); }

  .ws-wf-doc .ws-wf-doc-about { margin: 0; }
  .ws-wf-doc .ws-wf-doc-about > summary { min-height: 32px; color: var(--ws-text-mut); }
  .ws-wf-doc .ws-field { padding: var(--ws-3) 0; border-bottom: 0; }
  .ws-wf-doc .ws-field > .ws-label { margin-bottom: var(--ws-1); }
  .ws-wf-doc .ws-field-value,
  .ws-wf-doc .ws-wf-bullets li {
    font-size: var(--ws-fs-read); line-height: var(--ws-lh-read);
    max-width: var(--ws-measure); color: var(--ws-text);
  }
  .ws-wf-doc .ws-wf-bullets { list-style: none; padding-left: 0; }
  .ws-wf-doc .ws-wf-bullets li { position: relative; padding-left: 1.1em; margin: 3px 0; }
  .ws-wf-doc .ws-wf-bullets li::before {
    content: ""; position: absolute; left: 0.1em; top: 0.72em;
    width: 5px; height: 5px; border-radius: 50%; background: var(--ws-text-mut);
  }
  /* Strengths read as evidence (gold), weaknesses as gaps (flare) — the
     signal taxonomy's own two colours (tokens.css §Signal). */
  .ws-wf-doc [data-field="strengths"] .ws-wf-bullets li::before { background: var(--ws-signal-strong); }
  .ws-wf-doc [data-field="weaknesses"] .ws-wf-bullets li::before,
  .ws-wf-doc [data-field="concerns"] .ws-wf-bullets li::before { background: var(--ws-signal-gap); }
  /* The one-liners a scout quotes: projection, impact headline, deep
     evaluation's projection. A notch larger, a rule beside them. */
  .ws-wf-doc [data-field="projection"] .ws-field-value,
  .ws-wf-doc [data-field="headline"] .ws-field-value,
  .ws-wf-doc [data-field="overall_projection"] .ws-field-value,
  .ws-wf-doc [data-field="identity"] .ws-field-value {
    font-size: 1.125rem; line-height: 1.45; padding-left: var(--ws-3);
    border-left: 2px solid var(--ws-ink-400);
  }
  .ws-wf-doc [data-field="paragraphs"] .ws-field-value + .ws-field-value { margin-top: var(--ws-2) !important; }
  .ws-wf-doc .ws-empty { padding: var(--ws-3) 0; text-align: left; }

  .ws-wf-doc-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--ws-2);
    margin-top: var(--ws-4); padding-top: var(--ws-3); border-top: 1px solid var(--ws-ink-600);
  }
  .ws-wf-doc-toolbar .ws-btn { min-height: var(--ws-touch); padding: var(--ws-2) var(--ws-4); }
  .ws-wf-doc-edit .ws-input { font-size: var(--ws-fs-read); line-height: 1.5; }

  /* Team analysis top players: the facts were micro caps — sentences now. */
  .ws-wf-toppick { padding: var(--ws-3) 0; }
  .ws-wf-toppick > .ws-field-value:first-child { font-weight: 600; }
  .ws-wf-toppick .ws-micro {
    text-transform: none; letter-spacing: normal; font-size: var(--ws-fs-small);
    line-height: 1.5; color: var(--ws-text-dim); margin: 2px 0; max-width: var(--ws-measure);
  }
  .ws-wf-toppick .ws-wf-statline-text { margin: var(--ws-1) 0; }

  /* --- Evaluation: headline, one primary, two columns when there's room --- */
  #view-evaluation { container: wseval / inline-size; }
  #eval-title { font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 0.8; }
  .ws-wf-eval-jersey { color: var(--ws-gold); margin-right: 0.12em; }
  #eval-meta { margin-top: var(--ws-3) !important; }
  #eval-header { align-items: flex-start; border-bottom: 0; padding-bottom: 0; }
  /* The FIBA headshot beside the headline (049). Scout workspace only: gone
     the moment the Report view is up, as well as from print. */
  .ws-wf-eval-head-ident { display: flex; gap: var(--ws-4); align-items: flex-start; min-width: 0; }
  #eval-photo:empty { display: none; }
  #view-evaluation:has(#eval-report:not([hidden])) #eval-photo { display: none; }

  /* One gold button at a time. Before any deep evaluation exists Run all is
     the next step; once Finalize shows in the bar, Run all steps back. The
     blocks' own Generate/Finalize defer to both. */
  #view-evaluation:has(#eval-finalize:not([hidden])) #eval-runall,
  #view-evaluation .ws-wf-doc [data-wf-doc-generate].ws-btn--primary,
  #view-evaluation .ws-wf-doc [data-wf-doc-finalize].ws-btn--primary {
    background: transparent; border-color: var(--ws-gold); color: var(--ws-gold);
  }
  #view-evaluation:has(#eval-finalize:not([hidden])) #eval-runall:hover,
  #view-evaluation .ws-wf-doc [data-wf-doc-generate].ws-btn--primary:hover,
  #view-evaluation .ws-wf-doc [data-wf-doc-finalize].ws-btn--primary:hover { background: var(--ws-ink-600); }
  .ws-wf-eval-actions-row .ws-btn { min-height: var(--ws-touch); }

  /* Section titles inside the report column: a step up from field labels. */
  .ws-wf-eval-main > section > .ws-section-head .ws-label { font-size: var(--ws-fs-display-s); line-height: 0.9; }
  /* S&W and the deep evaluation are one block each — their block's own
     title is the section title (the outer h2 still prints). */
  #eval-sw-section > .ws-section-head, #eval-deepeval-section > .ws-section-head { display: none; }
  #eval-sw-section > div > .ws-wf-doc > .ws-wf-doc-head .ws-label,
  #eval-deepeval-section > div > .ws-wf-doc > .ws-wf-doc-head .ws-label { font-size: var(--ws-fs-display-s); line-height: 0.9; }

  .ws-wf-eval-rail > section { margin-bottom: var(--ws-4) !important; }
  .ws-wf-eval-rail > section:not(.ws-panel) { padding: 0 var(--ws-1); }
  #eval-player-panel { padding: var(--ws-4) var(--ws-5); }
  #eval-player-panel .ws-field-value { font-size: var(--ws-fs-read); margin: 0; }

  @container wseval (min-width: 1000px) {
    .ws-wf-eval-layout {
      display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
      gap: var(--ws-6); align-items: start;
    }
    .ws-wf-eval-main { grid-column: 1; grid-row: 1; min-width: 0; }
    /* The rail stays in view while drafts fill in on the left — Run all's
       progress is always on screen. */
    .ws-wf-eval-rail {
      grid-column: 2; grid-row: 1; position: sticky; top: 7.5rem;
      max-height: calc(100vh - 8.5rem); overflow-y: auto; overscroll-behavior: contain;
      scrollbar-width: thin; scrollbar-color: var(--ws-ink-400) transparent;
    }
  }

  /* --- Run all: the button, then a checklist with one dot per report ------ */
  .ws-wf-runall-actions { display: flex; flex-direction: column; align-items: stretch; gap: var(--ws-2); }
  #eval-runall { min-height: 48px; transition: none; }
  .ws-wf-runall-redo { min-height: var(--ws-touch); font-size: var(--ws-fs-small); color: var(--ws-text-dim); }
  .ws-wf-runall-steps { list-style: none; margin: var(--ws-3) 0 0; padding: 0; }
  .ws-wf-runall-steps:empty { display: none; }
  .ws-wf-runall-steps li {
    position: relative; padding: var(--ws-2) 0 var(--ws-2) 18px;
    border-top: 1px solid var(--ws-ink-600); font-size: var(--ws-fs-small); line-height: 1.4;
    color: var(--ws-text-mut);
  }
  .ws-wf-runall-steps li::before {
    content: ""; position: absolute; left: 1px; top: calc(var(--ws-2) + 0.42em);
    width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ws-ink-400);
    transition: background var(--ws-ease), box-shadow var(--ws-ease);
  }
  .ws-wf-runall-name { color: var(--ws-text-dim); }
  .ws-wf-runall-steps li[data-state="running"] .ws-wf-runall-name,
  .ws-wf-runall-steps li[data-state="done"] .ws-wf-runall-name { color: var(--ws-text); }
  .ws-wf-runall-steps li[data-state="running"]::before { background: var(--ws-flare); box-shadow: none; animation: ws-wf-breathe 1.2s ease-in-out infinite; }
  .ws-wf-runall-steps li[data-state="done"]::before { background: var(--ws-positive); box-shadow: none; }
  .ws-wf-runall-steps li[data-state="kept"]::before { background: var(--ws-text-dim); box-shadow: none; }
  .ws-wf-runall-steps li[data-state="failed"], .ws-wf-runall-steps li[data-state="failed"] .ws-wf-runall-name { color: var(--ws-flare); }
  .ws-wf-runall-steps li[data-state="failed"]::before { background: var(--ws-flare); box-shadow: none; }

  /* --- Stat line: his one-line format, set as a ticker with a gold rule --- */
  #eval-statline:not(:empty) {
    display: flex; align-items: flex-start; gap: var(--ws-4);
    background: var(--ws-ink-900); border: var(--ws-border); border-left: 2px solid var(--ws-gold);
    border-radius: var(--ws-radius); padding: var(--ws-4) var(--ws-4) var(--ws-4) var(--ws-5);
  }
  #eval-statline .ws-wf-statline-text {
    flex: 1 1 auto; min-width: 0; margin: 0;
    font-size: var(--ws-fs-statline); line-height: 1.7; color: var(--ws-text);
  }
  #eval-statline .ws-btn { flex: 0 0 auto; min-height: var(--ws-touch); padding: var(--ws-2) var(--ws-4); }

  /* --- Instagram caption: a post preview --------------------------------- */
  .ws-wf-igpost {
    max-width: 480px; background: var(--ws-ink-900);
    border: var(--ws-border); border-radius: var(--ws-radius);
  }
  .ws-wf-igpost-head {
    display: flex; align-items: center; gap: var(--ws-3);
    padding: var(--ws-3) var(--ws-4); border-bottom: var(--ws-border);
  }
  .ws-wf-igpost-head .ws-micro { margin: 0; }
  .ws-wf-igpost-mark { width: 34px; height: 16px; fill: var(--ws-gold); flex: 0 0 auto; }
  .ws-wf-igpost-first {
    margin: 0; padding: var(--ws-4) var(--ws-4) 0;
    font-weight: 700; font-size: var(--ws-fs-body); line-height: 1.45; letter-spacing: 0.01em;
  }
  .ws-wf-igpost .ws-wf-doc { background: transparent; border: 0; padding: var(--ws-1) var(--ws-4) var(--ws-3); }
  .ws-wf-igpost .ws-wf-doc-head { display: none; }
  .ws-wf-igpost .ws-wf-doc .ws-field { padding: var(--ws-1) 0; }
  .ws-wf-igpost .ws-wf-doc .ws-field > p.ws-label { display: none; }
  .ws-wf-igpost .ws-wf-doc .ws-field-value { font-size: var(--ws-fs-body); line-height: 1.55; }
  .ws-wf-igpost .ws-wf-doc .ws-wf-bullets { display: flex; flex-wrap: wrap; gap: 0 0.55em; }
  .ws-wf-igpost .ws-wf-doc .ws-wf-bullets li { padding: 0; margin: 0; color: var(--ws-text-dim); font-size: var(--ws-fs-body); }
  .ws-wf-igpost .ws-wf-doc .ws-wf-bullets li::before { display: none; }
  .ws-wf-igpost .ws-wf-doc-toolbar { margin-top: var(--ws-3); }
  .ws-wf-igpost-foot {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--ws-3);
    padding: var(--ws-3) var(--ws-4); border-top: var(--ws-border);
  }
  .ws-wf-igpost-foot p { margin: 0; }
  #eval-copy-ig-inline { border-color: var(--ws-gold); color: var(--ws-gold); min-height: var(--ws-touch); }
  #eval-copy-ig-inline:disabled { border-color: var(--ws-ink-400); color: var(--ws-text-mut); }

  /* --- Apply to player record: now vs. after, the button always in reach -- */
  #eval-apply-panel { border-color: var(--ws-ink-400); }
  #eval-apply-fields [data-apply-key] {
    background: var(--ws-ink-800); border: var(--ws-border); border-radius: var(--ws-radius);
    padding: var(--ws-4); margin-bottom: var(--ws-3) !important; transition: opacity var(--ws-ease);
  }
  #eval-apply-fields [data-apply-key]:has(input[type="checkbox"]:not(:checked)) { opacity: 0.55; }
  #eval-apply-fields [data-apply-key] > label { min-height: var(--ws-touch); cursor: pointer; }
  #eval-apply-fields [data-apply-key] > label input { width: 20px; height: 20px; }
  #eval-apply-fields [data-apply-key] p.ws-field-value {
    color: var(--ws-text-dim); font-size: var(--ws-fs-small); line-height: 1.55;
    max-height: 13.5em; overflow-y: auto; margin-top: var(--ws-2);
  }
  #eval-apply-fields textarea { margin-top: var(--ws-2); line-height: 1.5; }
  #eval-apply-panel > .ws-wf-doc-toolbar {
    position: sticky; bottom: 0; z-index: 2; background: var(--ws-ink-700);
    margin: var(--ws-3) calc(var(--ws-5) * -1) calc(var(--ws-5) * -1); padding: var(--ws-3) var(--ws-5);
    border-top: var(--ws-border);
  }

  @media (max-width: 600px) {
    #eval-statline:not(:empty) { flex-direction: column; gap: var(--ws-3); }
    .ws-wf-doc { padding: var(--ws-4); }
    #eval-apply-panel > .ws-wf-doc-toolbar { margin: var(--ws-3) calc(var(--ws-4) * -1) calc(var(--ws-4) * -1); padding: var(--ws-3) var(--ws-4); }
  }
}

/* --- Player form: the 53 roles in five rows by kind of player -------------
   Name on the left, chips flowing right; a filter that empties a group
   hides its row. On a phone the sheet shows them two to a row. */
#role-group.ws-rolegroups { display: flex; flex-direction: column; gap: 0; }
.ws-rolegroup {
  display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: var(--ws-3);
  align-items: start; padding: var(--ws-3) 0; border-top: 1px solid var(--ws-ink-600);
}
.ws-rolegroup:first-child { border-top: 0; padding-top: 0; }
.ws-rolegroup-name { padding-top: 0.7em; }
.ws-rolegroup-items { display: flex; flex-wrap: wrap; gap: var(--ws-2); }
.ws-rolegroup-items .ws-check { padding: var(--ws-2) var(--ws-3); min-height: 36px; }
.ws-rolegroup:not(:has(.ws-check:not([hidden]))) { display: none; }
@media (max-width: 900px) {
  .ws-rolegroup { grid-template-columns: minmax(0, 1fr); gap: var(--ws-2); }
  .ws-rolegroup-name { padding-top: 0; }
  .ws-rolegroup-items .ws-check { min-height: var(--ws-touch); }
}
@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  #role-sheet .ws-rolegroup { position: relative; }
  #role-sheet .ws-rolegroup-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ws-2); }
  #role-sheet .ws-rolegroup-items .ws-check { min-height: 48px; width: 100%; white-space: normal; text-align: left; line-height: 1.25; }
}
/* Position: the same chip, a touch larger — it is one tap, every player. */
[data-field-for="group:position"] .ws-check { min-height: var(--ws-touch); padding: var(--ws-2) var(--ws-4); }

/* Done and the save line ride along at the foot of the long form on every
   width (phones already pin it, above), so "Saved 16:18" is always in view. */
@media (min-width: 641px) {
  #view-submission .ws-actionbar {
    position: sticky; bottom: 0; z-index: 5; background: var(--ws-ink-800);
    padding-bottom: var(--ws-4); margin-top: var(--ws-5);
  }
}
#sub-save-status { font-size: var(--ws-fs-small); text-transform: none; letter-spacing: normal; }

/* --- Player record: the report reads like a report --------------------------- */
.ws-reportblock .ws-field-value { font-size: var(--ws-fs-read); line-height: var(--ws-lh-read); max-width: var(--ws-measure); }
.ws-reportblock .ws-label--dim { margin-bottom: var(--ws-1); }

/* --- Notes: thumb-sized everywhere a tablet can reach -------------------------
   The phone query gives 44px floors under 760px; a tablet in his hand is
   wider than that and just as touch-driven, so these controls carry the
   floor at every width. */
.ws-wf-notes-save { margin-left: auto; display: flex; align-items: center; gap: var(--ws-3); }
.ws-wf-notes-save .ws-wf-savestate { margin: 0; text-transform: none; letter-spacing: normal; font-size: var(--ws-fs-small); }
.ws-wf-notes-savebtn { min-height: var(--ws-touch); padding: var(--ws-2) var(--ws-4); }
#view-notes .ws-wf-notes-header-row .ws-chip {
  min-height: var(--ws-touch); padding: var(--ws-2) var(--ws-4);
  display: inline-flex; align-items: center; font-size: var(--ws-fs-small);
}
#view-notes .ws-wf-notes-context-toggle { min-height: var(--ws-touch); }
.ws-wf-notes-textarea { line-height: 1.55; padding: var(--ws-4); caret-color: var(--ws-gold); }
.ws-wf-notes-textarea:focus { outline: none; border-color: var(--ws-gold); }
.ws-wf-notes-textarea::placeholder { color: var(--ws-text-mut); }
.ws-wf-notes-chip { min-height: 52px; min-width: 64px; }
.ws-wf-notes-chip:hover { border-color: var(--ws-text-mut); }
@media (min-width: 600px) and (pointer: coarse), (min-width: 761px) {
  .ws-wf-notes-textarea { font-size: 17px; }
}
@media screen {
  /* Consistency's one field is "Paragraphs" — a label that says nothing. */
  .ws-wf-doc [data-field="paragraphs"] > p.ws-label { display: none; }
}
@media screen {
  /* In the post preview, provenance and tools follow the caption, so the
     header line runs straight into the text as it will on Instagram. */
  .ws-wf-igpost .ws-wf-doc { display: flex; flex-direction: column; }
  .ws-wf-igpost .ws-wf-doc > .ws-wf-doc-about { order: 1; margin-top: var(--ws-2); }
  .ws-wf-igpost .ws-wf-doc > .ws-wf-doc-toolbar { order: 2; }
}
@media screen {
  /* Running…: the checklist below carries the progress; the button just
     steps back rather than sitting there as a muddy half-gold slab. */
  #eval-runall:disabled { background: transparent; border-color: var(--ws-ink-400); color: var(--ws-text-dim); opacity: 1; }
}
@media screen {
  /* Opening Apply scrolls the panel to the top of the view — clear of the
     sticky action bar, so its heading is not hidden underneath it. */
  #eval-apply-panel { scroll-margin-top: 7.5rem; }
}
@media screen {
  /* The evaluation's explanatory lines are sentences, not labels: sentence
     case reads faster than three lines of tracked capitals. */
  #view-evaluation section > p.ws-micro:not([role]) {
    text-transform: none; letter-spacing: normal; font-size: var(--ws-fs-small); line-height: 1.5;
    color: var(--ws-text-dim); max-width: var(--ws-measure);
  }
  #eval-back-event { white-space: nowrap; flex: 0 0 auto; }
  @media (max-width: 600px) { #eval-back-event { padding: var(--ws-2) var(--ws-3); } }
}
[data-field-for="group:role"] { margin-top: var(--ws-5); }
[data-field-for="group:role"] > .ws-label { margin-bottom: var(--ws-3) !important; }
/* Phone: Live · Video · Mic · Save on one row; the save line only takes
   room once it has something to say. */
.ws-wf-notes-save .ws-wf-savestate:not([data-tone]) { display: none; }
/* Not saved (feedback1, item 1): a framed line he cannot miss, not just a
   coloured word. It may be long ("kept on this device…"), so the row wraps
   rather than pushing Save off a phone. */
.ws-wf-notes-save { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.ws-wf-notes-save .ws-wf-savestate { max-width: 100%; }
.ws-wf-notes-save .ws-wf-savestate[data-tone="warn"] {
  padding: 2px var(--ws-2); border: 1px solid var(--ws-flare); border-radius: var(--ws-radius); font-weight: 600;
}
@media (max-width: 480px) {
  .ws-wf-notes-header-row { gap: var(--ws-2); }
  #view-notes .ws-wf-notes-header-row .ws-chip { padding: var(--ws-2) var(--ws-3); }
  #view-notes .ws-wf-mic-btn { padding-left: var(--ws-3); padding-right: var(--ws-3); }
  .ws-wf-notes-savebtn { padding: var(--ws-2) var(--ws-3); }
}

/* --- Round 5 (the founder's first real session, feedback1) ------------------
   A row's Open and Remove side by side (Remove only on an empty-looking
   row); the evaluation rail's one-line forms (position wording); a document
   card's subtitle; and a spinner for every wait longer than a blink —
   imports, Run all, generation, Organize all notes (items 5 and 12). */
.ws-wf-row-actions { display: inline-flex; gap: var(--ws-2); flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.ws-wf-inline-form { display: flex; gap: var(--ws-2); align-items: center; }
.ws-wf-inline-form .ws-input { flex: 1 1 auto; min-width: 0; }
.ws-wf-doc-subtitle { margin: calc(-1 * var(--ws-1)) 0 var(--ws-2); color: var(--ws-text-dim); max-width: var(--ws-measure); }
.ws-spin {
  display: inline-block; flex: 0 0 auto; width: 0.95em; height: 0.95em; margin-right: var(--ws-2);
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  vertical-align: -0.15em; animation: ws-spin 0.8s linear infinite;
}
@keyframes ws-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ws-spin { animation-duration: 2.4s; } }
/* A long wait's line: spinner, words, and a bar under them (filling when the
   count is known, sweeping when it is not). */
.ws-wf-busy { display: grid; gap: var(--ws-2); margin: var(--ws-3) 0 0; }
.ws-wf-busy-text { display: flex; align-items: center; margin: 0; }
.ws-wf-busy .ws-progress-bar { flex: none; width: 100%; min-width: 0; overflow: hidden; }
@media print { .ws-spin, .ws-wf-busy { display: none !important; } }

/* ==========================================================================
   Reports — the event report and the player report (schema/044, report_ui.py)
   ==========================================================================
   A report is a stack of sheets, 210 × 279 mm (it fits A4 and Letter alike),
   the same on screen and on paper: a light page, the ink header band with
   its gold rule, a footer on every sheet. Paper is pure white, as the printed
   report has always been; gold is a rule or a fill behind ink text, never
   text itself (BRAND.md §2). report_ui.py lays blocks into sheets by
   measuring them, so nothing here may change a block's height between the
   measuring host and the screen or paper. */
.ws-rpt-page {
  --ws-rpt-dim: rgba(13, 13, 13, 0.64);
  --ws-rpt-rule: rgba(13, 13, 13, 0.14);
  --ws-rpt-tint: #F2F2EE;
  --ws-rpt-gold-tint: #FFF3C2;
  --ws-rpt-gold-soft: #FFF8DE;
  --ws-rpt-pad: 13mm;
  box-sizing: border-box; width: 210mm; height: 279mm; overflow: hidden;
  display: flex; flex-direction: column;
  background: #fff; color: var(--ws-ink);
  font-family: var(--ws-body); font-size: 12.5px; line-height: 1.5;
  text-align: left;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.ws-rpt-page *, .ws-rpt-page *::before, .ws-rpt-page *::after {
  box-sizing: border-box;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.ws-rpt-page p { margin: 0 0 6px; }
.ws-rpt-page a { color: var(--ws-ink); text-decoration: underline; text-underline-offset: 2px; }
.ws-rpt-page i { font-style: normal; color: var(--ws-rpt-dim); padding: 0 0.35em; }

/* Header band: the lockup, the setting under it; the kind of report and its
   date on the right. Ink, with the gold rule under it. */
.ws-rpt-band {
  flex: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 8mm var(--ws-rpt-pad) 5.5mm;
  background: var(--ws-ink); border-bottom: 3px solid var(--ws-gold); color: var(--ws-bone);
}
.ws-rpt-band-logo { display: block; height: 22px; width: auto; }
.ws-rpt-band-sub { margin: 20px 0 0; font-size: 12px; color: rgba(250, 250, 247, 0.82); }
.ws-rpt-band-side { text-align: right; }
.ws-rpt-band-kicker {
  margin: 0; font-family: var(--ws-display); font-weight: 700; font-size: 19px; line-height: 1;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ws-bone);
}
.ws-rpt-band-date { margin: 7px 0 0; font-size: 11px; color: rgba(250, 250, 247, 0.7); }

.ws-rpt-body { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 7mm var(--ws-rpt-pad) 3mm; }
.ws-rpt-body > :last-child { margin-bottom: 0; }

.ws-rpt-foot {
  flex: none; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 0 var(--ws-rpt-pad); padding: 3mm 0 7mm;
  border-top: 1.5px solid var(--ws-gold);
  font-size: 10px; color: var(--ws-rpt-dim);
}

/* The player: name in the display face, then who and where, then vitals. */
.ws-rpt-name { margin: 0 0 12px; }
.ws-rpt-name h1, .ws-rpt-title h1 {
  margin: 0 0 6px; font-family: var(--ws-display); font-weight: 700; font-size: 34px; line-height: 1;
  letter-spacing: 0.01em; text-transform: uppercase; color: var(--ws-ink);
}
.ws-rpt-id { margin: 0 0 3px; font-family: var(--ws-display); font-weight: 700; font-size: 17px; letter-spacing: 0.02em; }
.ws-rpt-vitals { margin: 0 0 2px; font-size: 13px; }
.ws-rpt-vitals--lead { font-size: 14px; }
/* His own photo, top right of the name (event report, 2026-11-19). */
.ws-rpt-head { display: flex; align-items: flex-start; gap: 18px; margin: 0 0 14px; }
.ws-rpt-head-main { flex: 1 1 auto; min-width: 0; }
.ws-rpt-head-main > :last-child { margin-bottom: 0; }
.ws-rpt-photo { flex: none; display: block; width: 28mm; height: 34mm; object-fit: cover; object-position: center top; border: 1.5px solid var(--ws-gold); }
/* The about line above the footer of sheets 1 and 2. */
.ws-rpt-about {
  flex: none; margin: 0 var(--ws-rpt-pad); padding: 2.5mm 0;
  border-top: 1px solid var(--ws-rpt-rule, #e4e2dc);
  font-size: 9.5px; line-height: 1.45; color: var(--ws-rpt-dim);
}
.ws-rpt-about b { color: var(--ws-ink); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.3em; }
.ws-rpt-meta { margin: 6px 0 0; font-size: 11px; font-style: italic; color: var(--ws-rpt-dim); }
.ws-rpt-title { margin: 0 0 14px; padding-bottom: 6px; border-bottom: 2px solid var(--ws-gold); }
.ws-rpt-title h1 { margin: 0; font-size: 28px; }
.ws-rpt-title h1 span { font-size: 22px; }

/* Sections: a display-face heading on a gold rule. */
.ws-rpt-sec { margin: 0 0 15px; }
.ws-rpt-sub { margin: 0 0 10px; }
.ws-rpt-h {
  margin: 0 0 7px; padding-bottom: 4px; border-bottom: 1.5px solid var(--ws-gold);
  font-family: var(--ws-display); font-weight: 700; font-size: 15px; line-height: 1.15;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ws-ink);
}
.ws-rpt-h[data-cont]::after { content: ", continued"; text-transform: none; font-weight: 400; color: var(--ws-rpt-dim); }
.ws-rpt-h3 {
  margin: 8px 0 4px; padding: 0; border: 0;
  font-family: var(--ws-display); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
}
.ws-rpt-sub > .ws-rpt-h3 { margin-top: 0; }
.ws-rpt-subhead { margin: -2px 0 8px; font-size: 12px; color: var(--ws-rpt-dim); }
.ws-rpt-list { margin: 0; padding: 0 0 0 16px; }
.ws-rpt-list li { margin: 0 0 3px; padding-left: 2px; }
.ws-rpt-none { color: var(--ws-rpt-dim); font-style: italic; }
.ws-rpt-dim { color: var(--ws-rpt-dim); font-weight: 400; }
.ws-rpt-k {
  margin: 0 0 5px; font-family: var(--ws-display); font-weight: 700; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ws-rpt-dim);
}

/* Roles (chips, squared) and the projected level (a gold fill behind ink). */
.ws-rpt-rolelevel { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 28px; margin: 0 0 14px; }
.ws-rpt-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.ws-rpt-chips li {
  padding: 2px 8px; border: 1px solid var(--ws-ink); border-radius: var(--ws-radius);
  font-size: 11.5px; font-weight: 600; line-height: 1.4;
}
.ws-rpt-levelbox { flex: none; text-align: right; }
.ws-rpt-level { margin: 0; font-size: 13px; }
.ws-rpt-grade {
  display: inline-block; padding: 1px 6px; background: var(--ws-gold); color: var(--ws-ink);
  font-family: var(--ws-display); font-size: 16px; letter-spacing: 0.02em;
}

/* The overall evaluation: pale gold, a step larger. The assessment update
   uses the softer tint. */
.ws-rpt-box { margin: 0 0 14px; padding: 11px 16px 8px; background: var(--ws-rpt-gold-tint); }
.ws-rpt-box .ws-rpt-h { border-bottom: 0; padding-bottom: 0; margin-bottom: 6px; font-size: 16px; }
.ws-rpt-box .ws-rpt-h--next { margin-top: 10px; }
.ws-rpt-box p { font-size: 13.5px; line-height: 1.5; }
.ws-rpt-box--soft { background: var(--ws-rpt-gold-soft); }
.ws-rpt-box--soft p { font-size: 12.5px; }

/* Statistical snapshot: eight tiles, then the rest in two compact rows. */
.ws-rpt-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 6px; }
.ws-rpt-tile { padding: 8px 6px 7px; background: var(--ws-rpt-tint); text-align: center; }
.ws-rpt-tile b { display: block; font-family: var(--ws-display); font-weight: 700; font-size: 21px; line-height: 1.05; }
.ws-rpt-tile span {
  display: block; margin-top: 3px; font-family: var(--ws-display); font-weight: 700; font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ws-rpt-dim);
}
.ws-rpt-statrow { margin: 0 0 5px; padding: 5px 8px; background: var(--ws-rpt-tint); text-align: center; font-size: 12px; }
.ws-rpt-statrow b { font-family: var(--ws-display); font-weight: 700; letter-spacing: 0.04em; margin-right: 3px; }
.ws-rpt-stats { margin-bottom: 14px; }

/* Two columns: strengths | areas for development, and the like. */
.ws-rpt-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; }

/* The event report's detailed analysis (045): one sheet, a step smaller. */
.ws-rpt-detail.ws-rpt-sec { margin-bottom: 12px; }
.ws-rpt-detail p, .ws-rpt-detail li { font-size: 12px; line-height: 1.45; }
.ws-rpt-detail .ws-rpt-list li { margin-bottom: 2px; }

.ws-rpt-pointer { margin: 14px 0 0; font-size: 12px; }
.ws-rpt-pointer b { font-family: var(--ws-display); letter-spacing: 0.04em; text-transform: uppercase; }
.ws-rpt-arrow {
  display: inline-block; width: 18px; margin-right: 6px; background: var(--ws-gold); color: var(--ws-ink);
  text-align: center; font-weight: 700;
}

/* Role & level (player report): label, then the line. */
.ws-rpt-dl { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 12px; line-height: 1.45; }
.ws-rpt-dl dt { font-weight: 700; }
.ws-rpt-dl dd { margin: 0; }

/* Stats by setting. */
.ws-rpt-table { width: 100%; border-collapse: collapse; font-size: 11.5px; line-height: 1.35; }
.ws-rpt-table th {
  padding: 5px 6px; background: var(--ws-rpt-tint); text-align: left; white-space: nowrap;
  font-family: var(--ws-display); font-weight: 700; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
}
.ws-rpt-table td { padding: 6px; border-bottom: 1px solid var(--ws-rpt-rule); vertical-align: top; }
.ws-rpt-table .ws-rpt-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ws-rpt-note { margin: 6px 0 0 !important; font-size: 10.5px; font-style: italic; color: var(--ws-rpt-dim); }

/* Timeline: the dot, on a gold line — dated from SQL, never the model. */
.ws-rpt-timeline { list-style: none; position: relative; margin: 2px 0 0; padding: 0 0 0 24px; }
.ws-rpt-timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 10px; width: 1.5px; background: var(--ws-gold); }
.ws-rpt-timeline li { position: relative; margin: 0 0 11px; }
.ws-rpt-timeline li::before {
  content: ""; position: absolute; left: -23px; top: 2px; width: 12px; height: 12px;
  border-radius: var(--ws-radius-pill); background: var(--ws-gold); border: 1.5px solid var(--ws-ink);
}
.ws-rpt-timeline p { margin: 0; }
.ws-rpt-when { font-family: var(--ws-display); font-weight: 700; font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase; }
.ws-rpt-when .ws-rpt-dim { font-family: var(--ws-body); letter-spacing: 0; text-transform: none; font-size: 11.5px; margin-left: 4px; }

/* Original reports (and film, where there is some). */
.ws-rpt-links { list-style: none; margin: 0; padding: 0; }
.ws-rpt-links li {
  display: flex; justify-content: space-between; gap: 12px; padding: 6px 2px;
  border-bottom: 1px solid var(--ws-rpt-rule);
}
.ws-rpt-linkset { display: flex; gap: 14px; white-space: nowrap; }

/* On screen: the sheets down the column, shrunk to fit it (report_ui.py sets
   --ws-rpt-scale), on the app's own ground. The measuring host lays them out
   at full size where nobody sees it. */
.ws-rpt-view { display: flex; flex-direction: column; align-items: center; gap: var(--ws-5); margin: 0 0 var(--ws-6); }
.ws-rpt-view[hidden] { display: none; }
.ws-rpt-sheet {
  flex: none; overflow: hidden;
  width: calc(210mm * var(--ws-rpt-scale, 1)); height: calc(279mm * var(--ws-rpt-scale, 1));
  outline: 1px solid var(--ws-ink-500);
}
.ws-rpt-sheet > .ws-rpt-page { transform: scale(var(--ws-rpt-scale, 1)); transform-origin: 0 0; }
.ws-rpt-measure { position: absolute; left: -10000px; top: 0; width: 210mm; visibility: hidden; pointer-events: none; }
.ws-wf-doc .ws-rpt-view { margin: var(--ws-4) 0; }

/* On paper: the report being printed and nothing else (wsRptPrepare marks
   it, and sets the page margin to 0). Its ancestors stay, flattened to plain
   blocks; everything beside them goes. */
@media print {
  body.ws-rpt-print-mode :not(:has(.ws-rpt-printing)):not(.ws-rpt-printing):not(.ws-rpt-printing *) { display: none !important; }
  body.ws-rpt-print-mode, body.ws-rpt-print-mode :has(.ws-rpt-printing) {
    display: block !important; position: static !important; transform: none !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; outline: 0 !important;
    width: auto !important; max-width: none !important; min-height: 0 !important; height: auto !important;
    background: #fff !important; overflow: visible !important; box-shadow: none !important;
  }
  .ws-rpt-printing { display: block !important; margin: 0 !important; padding: 0 !important; }
  .ws-rpt-printing .ws-rpt-sheet {
    width: 210mm !important; height: 279mm !important; outline: 0 !important; margin: 0 auto !important;
    break-after: page; page-break-after: always; break-inside: avoid; page-break-inside: avoid;
  }
  .ws-rpt-printing .ws-rpt-sheet:last-child { break-after: auto; page-break-after: auto; }
  .ws-rpt-printing .ws-rpt-page { transform: none !important; }
  .ws-rpt-measure { display: none !important; }
}

/* --- UX pass 2 (schema/057 and the founder's walkthrough) --------------------
   Position as a review callout, previous / next player, the Next player
   button and the Finalize toast, Write all 3 posts, Review positions on the
   event page, the roster-entry form's sticky Done bar. */
.ws-wf-eval-head-actions { display: flex; gap: var(--ws-3); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ws-wf-eval-nav { display: inline-flex; align-items: center; gap: var(--ws-2); }
.ws-wf-eval-nav:empty { display: none; }
.ws-wf-eval-nav-btn {
  min-width: var(--ws-touch); min-height: var(--ws-touch); justify-content: center;
  font-size: 1.35rem; line-height: 1; padding: 0 var(--ws-3);
}
.ws-wf-eval-nav-btn[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }
.ws-wf-eval-nav-pos { white-space: nowrap; }
#ws-drawer-nav { margin-top: var(--ws-3); }
#eval-next-cta { margin-top: var(--ws-2); }
#eval-next-cta[hidden] { display: none; }

/* The position: a review, never a gate. Gold rule while it waits for him,
   quiet once confirmed. */
.ws-wf-position-review { align-items: stretch; margin: 0; }
.ws-wf-position-review[data-state="confirmed"] .ws-callout-rule { background: var(--ws-ink-400); }
#eval-position-value { font-size: var(--ws-fs-read); }
.ws-wf-position-review .ws-wf-doc-toolbar { margin-top: var(--ws-2); }
#eval-position-edit { margin: 0 0 var(--ws-2); }
/* One gold button at a time on the evaluation (above): Confirm and Write all
   3 posts are outlined, like the blocks' own Generate. */
#view-evaluation #eval-position-confirm.ws-btn--primary,
#view-evaluation #eval-social-write.ws-btn--primary,
#view-evaluation #eval-replace-go.ws-btn--primary {
  background: transparent; border-color: var(--ws-gold); color: var(--ws-gold);
}
#view-evaluation #eval-position-confirm.ws-btn--primary:hover,
#view-evaluation #eval-social-write.ws-btn--primary:hover,
#view-evaluation #eval-replace-go.ws-btn--primary:hover { background: var(--ws-ink-600); }
#eval-replace-panel[hidden], #eval-social-panel[hidden] { display: none; }
#eval-social-panel .ws-wf-runall-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }

/* "Review positions": a list to work through, never a blocker. */
.ws-wf-review-positions { display: block; }
details.ws-wf-review-positions > summary { cursor: pointer; list-style: none; min-height: var(--ws-touch); display: flex; align-items: center; gap: var(--ws-2); }
details.ws-wf-review-positions > summary::-webkit-details-marker { display: none; }
.ws-wf-review-positions a { white-space: nowrap; }
div.ws-wf-review-positions { display: flex; }

/* A short confirmation, bottom centre, out of the way. */
.ws-wf-toast {
  position: fixed; left: 50%; bottom: var(--ws-5); transform: translateX(-50%); z-index: 60;
  display: flex; gap: var(--ws-2); align-items: center; flex-wrap: wrap; justify-content: center;
  max-width: min(92vw, 560px); padding: var(--ws-3) var(--ws-4);
  background: var(--ws-ink-700); color: var(--ws-text); border: 1px solid var(--ws-gold); border-radius: var(--ws-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.ws-wf-toast[hidden] { display: none; }
.ws-wf-toast .ws-btn { min-height: 40px; }
@media (max-width: 640px) { .ws-wf-toast { bottom: calc(var(--ws-touch) + var(--ws-6)); } }

/* The player form opened from a roster entry: no One player / A whole
   team, and the banner is the sticky bar with Done. */
#view-submission[data-roster-form] #sub-mode,
#view-submission[data-roster-form] #sub-team,
#view-submission[data-roster-form] #submission-view-sub { display: none !important; }
.ws-sub-roster-bar:not([hidden]) {
  position: sticky; top: 0; z-index: 6;
  display: flex; gap: var(--ws-3); align-items: center; flex-wrap: wrap; justify-content: space-between;
}
.ws-sub-roster-bar #sub-from-roster-text { flex: 1 1 260px; }
.ws-sub-roster-bar .ws-btn { min-height: var(--ws-touch); }

/* --- Progress strip (schema/058): Notes · Drafted · Final · Profile ·
   Applied · Posted, done / started / to do. Phones keep it as a compact strip
   of short labels. */
.ws-wf-pipe { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: nowrap; }
.ws-wf-pipe li {
  font-size: 0.6875rem; line-height: 1; letter-spacing: 0.02em; white-space: nowrap;
  padding: 4px 6px; border: 1px solid var(--ws-ink-400); color: var(--ws-text-mut); border-radius: 2px;
}
.ws-wf-pipe li[data-state="done"] { background: var(--ws-gold); border-color: var(--ws-gold); color: var(--ws-ink-900); }
.ws-wf-pipe li[data-state="part"] { border-color: var(--ws-gold); color: var(--ws-gold); }
.ws-wf-pipe-short { display: none; }
@media (max-width: 1100px) {
  .ws-wf-pipe-full { display: none; }
  .ws-wf-pipe-short { display: inline; }
  .ws-wf-pipe li { padding: 4px 4px; min-width: 1.6em; text-align: center; }
}
.ws-wf-teamrun-row { margin: var(--ws-1) 0 0; white-space: nowrap; }
.ws-wf-teamrun-row[data-state="running"] { color: var(--ws-text); }

/* Run all for this team: one row under the team's head. */
.ws-wf-teamrun { margin: var(--ws-2) 0 var(--ws-3); padding: var(--ws-3) 0; border-top: var(--ws-border); }
.ws-wf-teamrun-actions { display: flex; gap: var(--ws-3); align-items: center; flex-wrap: wrap; }
.ws-wf-teamrun .ws-btn { min-height: var(--ws-touch); }
/* The players being written now, one line each. */
.ws-wf-teamrun-now { list-style: none; margin: var(--ws-1) 0 0; padding: 0; }
.ws-wf-teamrun-now li { margin: 2px 0 0; color: var(--ws-text); }

/* Home: Continue. */
.ws-wf-home-continue-link { display: block; margin: 0 0 var(--ws-2); text-decoration: none; }
.ws-wf-home-continue-link .ws-field-value { font-size: var(--ws-fs-read); }

/* Notes: vs whom. */
.ws-wf-notes-opponent { align-items: center; flex-wrap: wrap; }
.ws-wf-notes-opp-chips { display: flex; gap: var(--ws-2); flex-wrap: wrap; }
.ws-wf-notes-opp-chips .ws-chip { min-height: var(--ws-touch); }
#notes-opponent-input { max-width: 220px; flex: 1 1 140px; }
#notes-opponent-row[hidden] { display: none; }

/* Phones: the strip is six small squares in order (Notes, Drafted, Final,
   Profile, Applied, Posted); its aria-label and titles say which is which. */
@media (max-width: 640px) {
  .ws-wf-pipe { gap: 3px; }
  .ws-wf-pipe li { padding: 0; min-width: 0; width: 9px; height: 9px; border-radius: 1px; }
  .ws-wf-pipe-full, .ws-wf-pipe-short { display: none !important; }
  .ws-wf-teamrun-row { white-space: normal; font-size: 0.6875rem; }
}

/* The phone filters sheet covers the page; the Add FAB must not float over it. */
body:has(#search-filters-panel:not([hidden])) .ws-fab { display: none; }

/* --- Search (085) -------------------------------------------------------------
   The Players page's search box is the hero: a larger input, the placeholder
   that cycles through real queries, a "/" hint, and a thin bar under it while
   a search is in flight (the rows below stay, dimmed — never an empty list).
   Then what was understood as chips, the facet strip, the one-line reason
   under a row, the sticky selection bar and the Cmd/Ctrl+K jump dialog. */
.ws-searchbox { position: relative; margin-bottom: var(--ws-3); }
.ws-searchbox-input { padding-right: var(--ws-7); }
.ws-searchbox-input::placeholder { transition: opacity var(--ws-ease); }
.ws-searchbox-input.is-swapping::placeholder { opacity: 0; }
.ws-searchbox-hint {
  position: absolute; right: var(--ws-4); top: 50%; transform: translateY(-50%);
  padding: 0 var(--ws-2); border: var(--ws-border-strong); border-radius: var(--ws-radius); pointer-events: none;
}
.ws-searchbox-input:focus ~ .ws-searchbox-hint, .ws-searchbox-input:not(:placeholder-shown) ~ .ws-searchbox-hint { display: none; }
.ws-searchbox-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; overflow: hidden; opacity: 0; transition: opacity var(--ws-ease); pointer-events: none; }
.ws-searchbox-bar::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: var(--ws-gold);
  animation: ws-search-sweep 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes ws-search-sweep { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
#roster-search-panel[data-busy="true"] .ws-searchbox-bar { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .ws-searchbox-bar::after { animation: none; width: 100%; opacity: 0.5; }
}
/* The old rows wait, dimmed, for the new ones. The delay keeps a fast answer from flickering. */
#view-roster[data-searching="true"] #roster-body, #view-roster[data-searching="true"] #roster-cards,
#view-roster[data-searching="true"] #roster-facets { opacity: 0.5; transition: opacity var(--ws-ease) 150ms; }
#roster-body, #roster-cards, #roster-facets { transition: opacity var(--ws-ease); }

.ws-understood { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ws-2); margin-bottom: var(--ws-3); }
.ws-understood[hidden] { display: none; }
.ws-understood-text { font-size: var(--ws-fs-small); color: var(--ws-text); }
.ws-understood-note { margin: 0; font-size: var(--ws-fs-small); color: var(--ws-text-dim); }
.ws-understood-note b { color: var(--ws-text); font-weight: 600; }

.ws-facets { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ws-2) var(--ws-5); margin-bottom: var(--ws-4); }
.ws-facets-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ws-2); }
.ws-facets .ws-chip b { font-weight: 600; margin-left: var(--ws-1); color: var(--ws-text-dim); }

.ws-reason { color: var(--ws-text-dim); font-size: var(--ws-fs-small); white-space: normal; }
.ws-reason-row td { padding-top: 0; }
.ws-roster-card + .ws-reason { margin: calc(var(--ws-2) * -1) 0 0; padding: 0 var(--ws-3); }
.ws-roster-table tbody tr[data-wf-player-drawer]:focus-visible { outline-width: 2px; background: var(--ws-ink-700); }
.ws-roster-card:focus-visible { background: var(--ws-ink-700); }
.ws-pick { display: inline-flex; align-items: center; justify-content: center; min-width: var(--ws-touch); min-height: var(--ws-touch); }
.ws-pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--ws-gold); cursor: pointer; }
.ws-pick-all { margin-bottom: var(--ws-2); }
.ws-empty-try { text-align: center; padding: var(--ws-6) var(--ws-4); }
.ws-empty-try .ws-empty { padding: 0 0 var(--ws-4); }
.ws-empty-try .ws-checkgroup { justify-content: center; margin-top: var(--ws-2); }
.ws-empty-try p { margin: 0 0 var(--ws-3); }

/* The selection bar rides the foot of the screen while anything is ticked. */
.ws-bulkbar {
  position: sticky; bottom: var(--ws-3); z-index: 15;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--ws-3);
  margin-top: var(--ws-4); padding: var(--ws-3) var(--ws-4);
  background: var(--ws-ink-700); border: 1px solid var(--ws-gold); border-radius: var(--ws-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.ws-bulkbar[hidden] { display: none; }
.ws-bulkbar > .ws-micro { color: var(--ws-text); }
body:has(#players-bulk:not([hidden])) .ws-fab { display: none; }

/* Quick jump: a centred dialog over everything, the box on top, results grouped. */
.ws-jump { position: fixed; inset: 0; z-index: 70; display: flex; justify-content: center; align-items: flex-start; padding: 12vh var(--ws-4) var(--ws-4); }
.ws-jump[hidden] { display: none; }
.ws-jump-scrim { position: absolute; inset: 0; background: rgba(13, 13, 13, 0.72); }
.ws-jump-panel { position: relative; width: min(600px, 100%); max-height: 76vh; display: flex; flex-direction: column; margin: 0; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6); }
.ws-jump-head { display: flex; gap: var(--ws-2); }
.ws-jump-list { overflow-y: auto; margin-top: var(--ws-3); transition: opacity var(--ws-ease); }
.ws-jump-list[data-loading="true"] { opacity: 0.6; }
.ws-jump-group { margin: var(--ws-3) 0 var(--ws-1); }
.ws-jump-item { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ws-3); padding: var(--ws-2) var(--ws-3); border-radius: var(--ws-radius); cursor: pointer; border: 1px solid transparent; }
.ws-jump-item[aria-selected="true"] { background: var(--ws-ink-600); border-color: var(--ws-gold); }
.ws-jump-label { color: var(--ws-text); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.ws-jump-sub { color: var(--ws-text-mut); font-size: var(--ws-fs-small); text-align: right; flex: 0 1 auto; }
.ws-jump-note { margin: var(--ws-3) var(--ws-3) 0; }
.ws-jump-foot { margin: var(--ws-3) 0 0; }
@media (max-width: 640px) {
  .ws-jump { padding-top: var(--ws-4); }
  .ws-jump-item { flex-direction: column; align-items: flex-start; gap: 2px; min-height: var(--ws-touch); }
  .ws-jump-sub { text-align: left; }
  .ws-jump-key, .ws-jump-foot { display: none; }
  /* The selection bar: two buttons a row, not a wall. */
  .ws-bulkbar { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ws-2); padding: var(--ws-3); bottom: var(--ws-2); }
  .ws-bulkbar > .ws-btn, .ws-bulkbar > span > .ws-btn { width: 100%; }
  .ws-bulkbar > .ws-micro { order: 1; }
  #players-bulk-clear { order: 2; }
  #players-bulk-main { order: 3; }
  #players-bulk-archive { order: 4; }
  #players-bulk-shortlist { order: 5; }
  #players-bulk-compare { order: 6; }
  #players-bulk-shortlist:has([data-players-sl-box]:not([hidden])) { grid-column: 1 / -1; }
  /* 088: a roster's selection bar. Count and Clear on one row, Add to shortlist under them. */
  .ws-pickbar [data-pick-shortlist] { grid-column: 1 / -1; order: 2; }
  .ws-pickbar [data-pick-shortlist] > span { display: flex !important; width: 100%; }
  .ws-pickbar [data-pick-shortlist] .ws-btn { width: 100%; }
}

/* --- Shortlist board (088) ---------------------------------------------------------------
   The Shortlists page's members grouped by priority, the priority control
   (.ws-segmented, 44px targets), the private note edited in place, the lists
   a player is on beside his record's Add to shortlist, and the print sheet. */
/* A list's name is a headline (the page-title face one step down); its meta sits under it. The row's actions
   line up with the name's first line (--sl-lh is the name's line height). */
.ws-sl-head { --sl-lh: 33px; align-items: flex-start; flex-wrap: wrap; }
.ws-sl-titlebox { flex: 1 1 260px; min-width: 0; }
.ws-sl-name { margin: 0; }
.ws-sl-toggle {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 100%;
  overflow-wrap: anywhere; background: none; border: 0; padding: 0; min-height: 0;
  color: inherit; cursor: pointer; text-align: left;
  font-family: var(--ws-display); font-weight: 700; font-size: 1.875rem; line-height: 1.1; text-transform: uppercase; letter-spacing: -0.005em;
}
.ws-sl-meta { margin: var(--ws-2) 0 0; }
.ws-sl-actions { display: flex; gap: var(--ws-2); flex-wrap: wrap; margin-top: calc((var(--sl-lh) - 40px) / 2); }
@media (max-width: 600px) {
  .ws-sl-head { --sl-lh: 25px; }
  .ws-sl-toggle { font-size: 1.4375rem; }
  .ws-sl-actions { margin-top: 0; }
}
.ws-sl-toggle:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
.ws-sl-new { margin-left: var(--ws-2); cursor: default; }
/* The ghost row after the last list: a new list is made by typing its name in place. Same panel and headline as a list row. */
.ws-sl-ghost { border-style: dashed; background: transparent; cursor: pointer; }
.ws-sl-ghost[role="button"]:hover { border-color: var(--ws-text-mut); }
.ws-sl-ghost[role="button"]:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
.ws-sl-ghost.is-editing { border-style: solid; border-color: var(--ws-gold); cursor: text; }
.ws-sl-ghost-name, .ws-sl-ghost-input {
  font-family: var(--ws-display); font-weight: 700; font-size: 1.875rem; line-height: 1.1; text-transform: uppercase; letter-spacing: -0.005em;
  color: var(--ws-text-mut);
}
.ws-sl-ghost-input { display: block; width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ws-text); outline: none; }
.ws-sl-ghost-input::placeholder { color: var(--ws-text-mut); }
@media (max-width: 600px) { .ws-sl-ghost-name, .ws-sl-ghost-input { font-size: 1.4375rem; } }
.ws-sl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ws-2); margin-bottom: var(--ws-3); }
/* Compare, inside Shortlists: a list's Compare mode and the unsaved Comparison. The table scrolls inside its
   wrap (never the page); the label column stays pinned, on a phone most of all. */
.ws-sl-cmp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ws-3); margin-bottom: var(--ws-3); }
.ws-sl-cmp-pick { display: flex; flex-wrap: wrap; gap: var(--ws-2); margin-bottom: var(--ws-3); }
.ws-sl-cmp-chip {
  display: inline-flex; align-items: center; gap: var(--ws-2); min-height: var(--ws-touch); padding: 0 var(--ws-3);
  border: 1px solid var(--ws-ink-500); border-radius: var(--ws-radius); font-size: var(--ws-fs-small); cursor: pointer;
}
.ws-sl-cmp-chip input { width: 18px; height: 18px; margin: 0; accent-color: var(--ws-gold); }
.ws-sl-adhoc-title { font-family: var(--ws-display); font-weight: 700; font-size: 1.875rem; line-height: 1.1; text-transform: uppercase; letter-spacing: -0.005em; }
@media (max-width: 600px) { .ws-sl-adhoc-title { font-size: 1.4375rem; } }
.ws-cmp-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
.ws-cmp-table { width: auto; min-width: 100%; }
.ws-cmp-table th[data-compare-player] { min-width: 170px; vertical-align: top; white-space: normal; }
.ws-cmp-table td { vertical-align: top; min-width: 170px; max-width: 280px; white-space: normal; }
.ws-cmp-table tbody tr:hover { cursor: default; }
.ws-cmp-table th:first-child, .ws-cmp-table td:first-child {
  position: sticky; left: 0; min-width: 0; width: 7.5rem; z-index: 1;
  background: var(--ws-ink-800); box-shadow: 1px 0 0 var(--ws-ink-700);
}
.ws-cmp-table thead th:first-child { z-index: 3; }
.ws-cmp-table tbody th[scope="row"] { top: auto; white-space: normal; vertical-align: top; }
.ws-cmp-table tbody tr:hover th:first-child { background: var(--ws-ink-700); }
.ws-cmp-rm { min-height: 32px; padding: 0 var(--ws-2); margin-top: var(--ws-2); font-size: var(--ws-fs-micro); }
@media (max-width: 600px) { .ws-cmp-table th:first-child, .ws-cmp-table td:first-child { width: 5.5rem; } }
.ws-sl-table .ws-sl-group th {
  position: static; background: transparent; color: var(--ws-text);
  padding-top: var(--ws-4); border-bottom: 1px solid var(--ws-ink-500);
}
.ws-sl-table tbody tr.ws-sl-group:hover { background: transparent; cursor: default; }
.ws-sl-table tbody tr[data-sl-member]:hover { cursor: default; }
.ws-sl-table td.ws-sl-pick { width: var(--ws-touch); padding: 0; }
.ws-sl-table td.ws-sl-notecell { white-space: normal; min-width: 200px; max-width: 360px; }
.ws-sl-note {
  display: block; width: 100%; min-height: var(--ws-touch); padding: var(--ws-2);
  background: none; border: 1px dashed transparent; border-radius: var(--ws-radius);
  color: var(--ws-text); font: inherit; text-align: left; cursor: text; overflow-wrap: anywhere;
}
.ws-sl-note:hover { border-color: var(--ws-ink-400); }
.ws-sl-note:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
.ws-sl-note-input { min-height: var(--ws-touch); }
.ws-sl-notecell [data-sl-note-state] { display: block; margin-top: 2px; }
.ws-sl-notecell [data-sl-note-state]:empty { display: none; }
.ws-sl-on { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--ws-2); }
.ws-sl-on:empty { display: none; }
.ws-sl-on-item {
  display: inline-flex; align-items: center; gap: var(--ws-1); padding-left: var(--ws-3);
  border: 1px solid var(--ws-ink-500); border-radius: var(--ws-radius); font-size: var(--ws-fs-small);
}
.ws-sl-on-name { min-width: 0; overflow-wrap: anywhere; }
.ws-sl-on-rm { flex: 0 0 auto; border: 0; min-width: var(--ws-touch); min-height: var(--ws-touch); padding: 0; font-size: 1.1rem; }
.ws-sl-print { display: none; }
@media (max-width: 640px) {
  /* A phone: each member is a block, the tick box down the left, the rest stacked. */
  .ws-sl-table thead { display: none; }
  .ws-sl-table, .ws-sl-table tbody, .ws-sl-table tr, .ws-sl-table th, .ws-sl-table td { display: block; }
  .ws-sl-table tr[data-sl-member] {
    display: grid; grid-template-columns: var(--ws-touch) minmax(0, 1fr); column-gap: var(--ws-2);
    padding: var(--ws-2) 0; border-bottom: 1px solid var(--ws-ink-700);
  }
  .ws-sl-table tr[data-sl-member] > td { grid-column: 2; border: 0; padding: 2px 0; white-space: normal; max-width: none; }
  .ws-sl-table tr[data-sl-member] > td.ws-sl-pick { grid-column: 1; grid-row: 1 / span 9; }
  .ws-sl-table td[data-l="Born"]::before, .ws-sl-table td[data-l="Position"]::before,
  .ws-sl-table td[data-l="Team"]::before, .ws-sl-table td[data-l="Added"]::before {
    content: attr(data-l) ": "; color: var(--ws-text-mut); font-size: var(--ws-fs-micro);
  }
  .ws-sl-table td.ws-sl-notecell { min-width: 0; max-width: none; }
}
/* On paper: the list being printed and nothing else (playersSlPrint marks it).
   Its ancestors stay, flattened to plain blocks; everything beside them goes. */
@media print {
  body.ws-sl-print-mode :not(:has(.ws-sl-printing)):not(.ws-sl-printing):not(.ws-sl-printing *) { display: none !important; }
  body.ws-sl-print-mode, body.ws-sl-print-mode :has(.ws-sl-printing) {
    display: block !important; position: static !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; background: #fff !important; box-shadow: none !important; overflow: visible !important;
    width: auto !important; max-width: none !important; min-height: 0 !important;
  }
  .ws-sl-printing { display: block !important; color: #000; font-family: var(--ws-body); font-size: 9pt; }
  .ws-sl-printing h1 { font-family: var(--ws-display); font-size: 15pt; margin: 0 0 2pt; color: #000; }
  .ws-sl-print-meta { margin: 0 0 8pt; font-size: 8.5pt; }
  .ws-sl-printing h2 { font-family: var(--ws-display); font-size: 10.5pt; margin: 8pt 0 3pt; color: #000; }
  .ws-sl-printing h2 span { font-weight: 400; }
  .ws-sl-printing table { width: 100%; border-collapse: collapse; }
  .ws-sl-printing th, .ws-sl-printing td {
    text-align: left; vertical-align: top; padding: 2pt 4pt; font-size: 8.5pt;
    border-bottom: 0.5pt solid #999; color: #000; background: #fff;
  }
  .ws-sl-printing td:last-child { width: 40%; overflow-wrap: anywhere; }
  .ws-sl-printing tr { break-inside: avoid; page-break-inside: avoid; }
}

/* --- Share in one tap (098) --------------------------------------------------------------
   The compact share icon on every player row and card, the toast with Add note and Options
   (it reuses .ws-wf-toast), the clipboard fallback popover, and the record's Sharing section.
   Colours come from the tokens, so light and dark follow the theme. */
.ws-btn.ws-ps-icon {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; margin-left: var(--ws-2); flex: 0 0 auto;
}
.ws-ps-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ws-ps-icon[disabled] { opacity: 0.45; cursor: not-allowed; }
.ws-ps-icon[aria-busy="true"], .ws-btn[aria-busy="true"][data-ps-quick] { opacity: 0.6; cursor: progress; }
.ws-roster-card-row .ws-btn.ws-ps-icon { margin-left: auto; align-self: flex-start; }
.ws-wf-name-cell .ws-btn.ws-ps-icon { margin-left: var(--ws-1); }
.ws-ps-toast { z-index: 70; }
.ws-ps-toast-text { font-size: var(--ws-fs-small); }
.ws-ps-toast .ws-ps-toast-x { min-width: 40px; padding: 0 var(--ws-2); }
.ws-ps-toast--edit { flex-direction: column; align-items: stretch; justify-content: flex-start; width: min(92vw, 560px); }
.ws-ps-note { display: flex; flex-direction: column; gap: var(--ws-2); width: 100%; }
.ws-ps-note .ws-input { min-height: var(--ws-touch); }
.ws-ps-note-actions { display: flex; gap: var(--ws-2); flex-wrap: wrap; }
.ws-ps-pop {
  position: fixed; left: 50%; bottom: calc(var(--ws-5) + 88px); transform: translateX(-50%); z-index: 75;
  width: min(92vw, 560px); padding: var(--ws-3) var(--ws-4);
  background: var(--ws-ink-700); color: var(--ws-text); border: 1px solid var(--ws-gold); border-radius: var(--ws-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.ws-ps-pop .ws-input, .ws-ps-pop .ws-btn { min-height: var(--ws-touch); }
@media (max-width: 640px) {
  .ws-ps-pop { bottom: calc(var(--ws-touch) + var(--ws-6) + 88px); }
  .ws-btn.ws-ps-icon { width: var(--ws-touch); min-width: var(--ws-touch); height: var(--ws-touch); min-height: var(--ws-touch); }
}
@media (prefers-color-scheme: light) {
  .ws-ps-pop, .ws-ps-toast { box-shadow: 0 8px 24px rgba(13, 13, 13, 0.18); }
}
.ws-ps-sharing-head { display: flex; align-items: center; justify-content: space-between; gap: var(--ws-3); margin-bottom: var(--ws-3); }
.ws-ps-send { display: flex; flex-wrap: wrap; gap: var(--ws-2); margin-top: var(--ws-2); }
.ws-ps-send .ws-btn { text-decoration: none; display: inline-flex; align-items: center; }
.ws-ps-sees { margin-top: var(--ws-3); }
.ws-ps-scout { border: 1px solid var(--ws-border-color, var(--ws-ink-500)); margin: var(--ws-4) 0 0; padding: var(--ws-3); min-width: 0; }
.ws-ps-switch { display: flex; gap: var(--ws-3); align-items: flex-start; min-height: var(--ws-touch); padding: var(--ws-1) 0; cursor: pointer; }
.ws-ps-switch input { appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 24px; margin: 2px 0 0; border-radius: 12px; border: 1px solid var(--ws-text-mut);
  background: transparent; position: relative; cursor: pointer; }
.ws-ps-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ws-text-mut); transition: transform 120ms; }
.ws-ps-switch input:checked { background: var(--ws-gold); border-color: var(--ws-gold); }
.ws-ps-switch input:checked::after { transform: translateX(16px); background: var(--ws-ink, #0D0D0D); }
.ws-ps-switch input:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
.ws-ps-switch input:disabled { opacity: 0.5; cursor: not-allowed; }
.ws-ps-switch > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.ws-ps-switch--sub { margin-left: var(--ws-5); }
.ws-ps-bullets { margin: var(--ws-1) 0 var(--ws-2); padding-left: var(--ws-4); }
.ws-ps-bullets li { margin: 2px 0; overflow-wrap: anywhere; }
.ws-ps-switch-name { font-weight: 600; }
.ws-ps-tagrows { display: flex; flex-wrap: wrap; gap: var(--ws-2); }
.ws-ps-tagrow { display: inline-flex; gap: var(--ws-1); align-items: center; }
.ws-ps-tagrow .ws-input { width: 14rem; max-width: 100%; min-height: var(--ws-touch); }
.ws-ps-cands { display: flex; flex-wrap: wrap; gap: var(--ws-2); }
.ws-ps-cands .ws-chip { min-height: var(--ws-touch); text-align: left; }
.ws-ps-cands .ws-chip[disabled] { opacity: 0.45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .ws-ps-switch input::after { transition: none; } }
.ws-ps-sees > summary { cursor: pointer; min-height: var(--ws-touch); display: flex; align-items: center; }
@media (max-width: 640px) { .ws-ps-send .ws-btn { flex: 1 1 0; justify-content: center; } }

/* --- Share a list by private link (089) -------------------------------------------------
   The Share panel under a list: who will be shown, the form, the link made
   (shown once), and the list's links with Cancel link. 44px targets. */
.ws-sl-share { margin-top: var(--ws-3); padding-top: var(--ws-3); border-top: 1px solid var(--ws-ink-500); }
.ws-sl-share .ws-btn, .ws-sl-share .ws-input { min-height: var(--ws-touch); }
.ws-sl-share-held { margin: 0 0 var(--ws-2); padding-left: var(--ws-4); font-size: var(--ws-fs-small); }
.ws-sl-share-form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ws-3);
  margin: var(--ws-3) 0 0; max-width: 760px;
}
.ws-sl-share-field { display: flex; flex-direction: column; gap: var(--ws-1); min-width: 0; }
.ws-sl-share-wide, .ws-sl-share-days, .ws-sl-share-actions { grid-column: 1 / -1; }
.ws-sl-share-days { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--ws-3); align-items: center; }
.ws-sl-share-days legend { padding: 0; margin-bottom: var(--ws-1); }
.ws-sl-share-day { display: inline-flex; align-items: center; gap: var(--ws-2); min-height: var(--ws-touch); padding-right: var(--ws-3); cursor: pointer; }
.ws-sl-share-day input { width: 20px; height: 20px; margin: 0; accent-color: var(--ws-gold); }
.ws-sl-share-actions { display: flex; flex-wrap: wrap; gap: var(--ws-3); align-items: center; }
.ws-sl-share-made { margin-top: var(--ws-4); padding: var(--ws-3); border: 1px solid var(--ws-gold); border-radius: var(--ws-radius); max-width: 760px; }
.ws-sl-share-urlrow { display: flex; gap: var(--ws-2); margin-top: var(--ws-1); }
.ws-sl-share-urlrow .ws-input { flex: 1 1 auto; min-width: 0; font-family: var(--ws-mono); }
.ws-sl-share-warn { color: var(--ws-text); font-size: var(--ws-fs-small); }
.ws-sl-links td.ws-sl-links-act { white-space: normal; }
.ws-sl-links td.ws-sl-links-act .ws-btn { margin: 2px var(--ws-1) 2px 0; }
@media (max-width: 640px) {
  .ws-sl-share-form { grid-template-columns: minmax(0, 1fr); }
  .ws-sl-share-urlrow { flex-wrap: wrap; }
  .ws-sl-share-urlrow .ws-input { flex-basis: 100%; }
  .ws-sl-share-urlrow .ws-btn { flex: 1 1 0; }
  /* A phone: each link is a block. */
  .ws-sl-links thead { display: none; }
  .ws-sl-links, .ws-sl-links tbody, .ws-sl-links tr, .ws-sl-links td { display: block; }
  .ws-sl-links tr { padding: var(--ws-2) 0; border-bottom: 1px solid var(--ws-ink-700); }
  .ws-sl-links td { border: 0; padding: 2px 0; white-space: normal; }
  .ws-sl-links td[data-l]::before { content: attr(data-l) ": "; color: var(--ws-text-mut); font-size: var(--ws-fs-micro); }
}

/* --- Tickable dropdown (.ws-tick): a button with a count badge that opens a panel of checkboxes.
   Used by the Players page's Country, Born and List filters. Built on the system's tokens only.
   Desktop: the panel floats under the button. Phone: it opens in the flow, full width, so it can
   never push the page sideways or be clipped by the filters sheet. */
.ws-tick { position: relative; display: inline-block; max-width: 100%; }
.ws-tick-btn {
  display: inline-flex; align-items: center; gap: var(--ws-1); min-height: 40px; max-width: 100%;
  font-family: var(--ws-body); font-size: var(--ws-fs-small);
  padding: var(--ws-2) var(--ws-4);
  border: var(--ws-border); border-radius: var(--ws-radius);
  background: var(--ws-ink-900); color: var(--ws-text-dim); cursor: pointer;
  transition: all var(--ws-ease);
}
.ws-tick-btn:hover { border-color: var(--ws-text-mut); color: var(--ws-text); }
.ws-tick-btn.is-on, .ws-tick-btn[aria-expanded="true"] { border-color: var(--ws-gold); color: var(--ws-gold); }
.ws-tick-btn:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
.ws-tick-chev { margin-left: var(--ws-2); font-size: 0.8em; }
.ws-tick-panel {
  position: fixed; top: 0; left: 0; z-index: 40; /* placed under its button by wsTickPlace(); a bottom sheet on phones */
  width: 300px; max-width: calc(100vw - 32px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--ws-ink-800); border: var(--ws-border); border-radius: var(--ws-radius);
  padding: var(--ws-2); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.ws-tick-panel[hidden] { display: none; }
.ws-tick-search { margin-bottom: var(--ws-2); }
.ws-tick-list { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; }
.ws-tick-opt {
  display: flex; align-items: center; gap: var(--ws-3); min-height: 40px;
  padding: var(--ws-1) var(--ws-3); border-radius: var(--ws-radius);
  color: var(--ws-text); font-size: var(--ws-fs-small); cursor: pointer;
}
.ws-tick-opt:hover { background: var(--ws-ink-600); }
.ws-tick-opt input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: var(--ws-gold); cursor: pointer; }
.ws-tick-opt:focus-within { outline: 2px solid var(--ws-gold); outline-offset: -2px; }
.ws-tick-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ws-tick-ct { color: var(--ws-text-dim); font-size: var(--ws-fs-micro); }
.ws-tick-none { padding: var(--ws-3); }
.ws-tick-foot {
  display: flex; justify-content: space-between; gap: var(--ws-2);
  margin-top: var(--ws-2); padding-top: var(--ws-2); border-top: 1px solid var(--ws-ink-500);
}
.ws-tick-clear, .ws-tick-done {
  min-height: 40px; padding: var(--ws-2) var(--ws-4); border-radius: var(--ws-radius);
  font-family: var(--ws-body); font-size: var(--ws-fs-small); cursor: pointer;
  background: transparent; border: 1px solid var(--ws-ink-400); color: var(--ws-text);
}
.ws-tick-clear:hover:not(:disabled), .ws-tick-done:hover { background: var(--ws-ink-600); }
.ws-tick-clear:disabled { opacity: 0.45; cursor: not-allowed; }
.ws-tick-clear:focus-visible, .ws-tick-done:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }

/* --- Search field (.ws-search-field) -------------------------------------------
   The one search input: near-white with dark text whatever the page theme, so it
   is unmistakably the thing you type in. Search icon on the left, a clear border,
   a brand-yellow focus ring. Used by the Players bar and Home. */
.ws-search-field, .ws-input.ws-search-field {
  display: block; width: 100%; box-sizing: border-box; min-height: 44px;
  background-color: #FFFFFF; color: #111111; caret-color: #111111;
  border: 1px solid #B8B8B2; border-radius: var(--ws-radius);
  font-family: var(--ws-body); font-size: 16px; line-height: 1.25;
  padding: 10px 14px 10px 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 15px 50%; background-size: 18px 18px;
  -webkit-appearance: none; appearance: none;
}
.ws-search-field::placeholder { color: #5E5E58; opacity: 1; }
.ws-search-field:hover { border-color: #8E8E88; }
.ws-search-field:focus, .ws-input.ws-search-field:focus {
  outline: none; border-color: var(--ws-gold); box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.55);
}
@media (prefers-color-scheme: light) { .ws-search-field, .ws-input.ws-search-field { border-color: #8E8E88; } }

/* --- Ask-Assist search (.ws-asksearch) -----------------------------------------
   Every search box wears the Wingspan Assist composer's look: its dark fill,
   border, radius and type, with the Assist mark (basketball + star, NAV_ICON.assist)
   in brand gold inside the left edge. Text that reads as a question also shows
   .ws-asksearch-row beneath the field: one tap (or Shift+Enter) asks Assist. */
.ws-input.ws-asksearch, .ws-asksearch {
  display: block; width: 100%; box-sizing: border-box; min-height: var(--ws-touch);
  background-color: var(--ws-ink-700); color: var(--ws-text); caret-color: var(--ws-gold);
  border: var(--ws-border); border-radius: var(--ws-radius);
  font-family: var(--ws-body); font-size: 16px; line-height: 1.25;
  padding: var(--ws-3) var(--ws-3) var(--ws-3) 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23FFCC00' stroke-width='7' stroke-linecap='square'%3E%3Ccircle cx='42' cy='58' r='34'/%3E%3Cpath d='M42 28 V88 M12 58 H72'/%3E%3Cpath d='M19 36 C30 47 30 69 19 80 M65 36 C54 47 54 69 65 80'/%3E%3C/g%3E%3Cpath d='M76 6 L81 19 L94 24 L81 29 L76 42 L71 29 L58 24 L71 19 Z' fill='%23FFCC00'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px 50%; background-size: 24px 24px;
  -webkit-appearance: none; appearance: none;
}
.ws-input.ws-asksearch::placeholder { color: var(--ws-text-mut); opacity: 1; }
.ws-input.ws-asksearch:hover { border-color: var(--ws-text-mut); }
.ws-input.ws-asksearch:focus { outline: none; border-color: var(--ws-gold); box-shadow: 0 0 0 1px var(--ws-gold); }
.ws-asksearch-slot { min-width: 0; }
.ws-asksearch-slot:empty { display: none; }
.ws-asksearch-row {
  display: flex; align-items: baseline; gap: var(--ws-3); width: 100%; box-sizing: border-box; min-height: var(--ws-touch);
  margin-top: var(--ws-2); padding: var(--ws-2) var(--ws-3); text-align: left; cursor: pointer;
  background: var(--ws-ink-700); color: var(--ws-text); border: 1px solid var(--ws-gold); border-radius: var(--ws-radius);
  font-family: var(--ws-body); font-size: var(--ws-fs-small);
}
.ws-asksearch-row:hover { background: var(--ws-ink-600); }
.ws-asksearch-row:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
.ws-asksearch-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ws-asksearch-key { flex: 0 0 auto; color: var(--ws-gold); }
.ws-fbar .ws-asksearch-row { margin-top: 0; }
.ws-wf-home-search .ws-asksearch-slot, #roster-legacy-filters .ws-asksearch-slot { flex: 1 0 100%; }
.ws-tick-search.ws-asksearch { margin-bottom: var(--ws-2); }
.ws-asksearch-row.ws-player-assist { width: auto; max-width: 100%; margin-top: var(--ws-3); }
.ws-player-assist .ws-assist-ic { color: var(--ws-gold); flex: 0 0 auto; }
.ws-player-assist .ws-assist-ic svg { width: 1.4em; height: 1.4em; margin-right: 0; vertical-align: middle; }

/* --- Players filter bar (pinned) ------------------------------------------------
   Row 1 search, row 2 pills + More filters, row 3 chips (when any) and the count
   and sort. Sticky under the top bar; every popover is a fixed overlay, so nothing
   here ever moves the list. */
.ws-fbar {
  --fbar-gut: var(--ws-6);
  position: sticky; top: 0; z-index: 12; /* the top bar scrolls away on every width, so the bar pins to the screen's top */
  display: flex; flex-direction: column; gap: var(--ws-2);
  margin: 0 calc(var(--fbar-gut) * -1) var(--ws-3); padding: var(--ws-3) var(--fbar-gut) var(--ws-2);
  background: var(--ws-ink-800); border-bottom: 1px solid var(--ws-ink-500);
}
.ws-fbar .ws-searchbox { margin: 0; }
.ws-searchbox-hint {
  right: 14px; padding: 0 7px; font-size: 12px; line-height: 20px; color: #55554F;
  background: #F2F2EE; border: 1px solid #C9C9C2;
}
.ws-fbar-row { display: flex; align-items: center; gap: var(--ws-3); min-width: 0; }
.ws-fpills { display: flex; align-items: center; gap: var(--ws-2); flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 1px 0; }
.ws-fpills::-webkit-scrollbar { display: none; }
.ws-fpills .ws-tick { flex: 0 0 auto; display: block; }
.ws-fbar .ws-tick-btn {
  height: 36px; min-height: 36px; padding: 0 var(--ws-3); gap: 0; white-space: nowrap;
  font-size: 13px; background: var(--ws-ink-700); border: 1px solid var(--ws-ink-500); color: var(--ws-text-dim);
}
.ws-fbar .ws-tick-btn:hover { border-color: var(--ws-ink-400); color: var(--ws-text); background: var(--ws-ink-600); }
.ws-fbar .ws-tick-n { color: var(--ws-text); padding-left: 5px; }
.ws-fbar .ws-tick-n[hidden] { display: none; }
.ws-fbar .ws-tick-chev { margin-left: 7px; font-size: 11px; line-height: 1; opacity: 0.7; }
.ws-fbar .ws-tick-btn.is-on { background: rgba(255, 204, 0, 0.10); border-color: rgba(255, 204, 0, 0.6); color: var(--ws-gold); }
.ws-fbar .ws-tick-btn.is-on .ws-tick-n { color: var(--ws-gold); }
.ws-fbar .ws-tick-btn[aria-expanded="true"] { border-color: var(--ws-gold); color: var(--ws-gold); }
.ws-fmore { flex: 0 0 auto; }
.ws-fmore::before {
  content: ""; width: 14px; height: 14px; margin-right: 7px; 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.4' stroke-linecap='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h2M10 17h10'/%3E%3Ccircle cx='16' cy='7' r='2.2'/%3E%3Ccircle cx='8' cy='17' r='2.2'/%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.4' stroke-linecap='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h2M10 17h10'/%3E%3Ccircle cx='16' cy='7' r='2.2'/%3E%3Ccircle cx='8' cy='17' r='2.2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ws-fbar-row--meta { min-height: 28px; }
.ws-fchips { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ws-fchips::-webkit-scrollbar { display: none; }
.ws-fchips[hidden] { display: none; }
.ws-fchips > .ws-understood, .ws-fchips > .ws-fchips-active { display: contents; margin: 0; }
.ws-fchips > .ws-understood[hidden] { display: none; }
.ws-fbar .ws-fchips .ws-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; height: 26px; min-height: 26px;
  padding: 0 9px; font-size: 12px; text-transform: none; letter-spacing: 0; white-space: nowrap;
  border-color: rgba(255, 204, 0, 0.45); background: rgba(255, 204, 0, 0.08); color: var(--ws-text);
}
.ws-fbar .ws-fchips .ws-chip:hover { border-color: var(--ws-gold); }
.ws-fbar .ws-fchips .ws-chip span { margin-left: 4px; color: var(--ws-text-dim); }
.ws-fbar .ws-fchips .ws-chip--clear { border-color: transparent; background: transparent; color: var(--ws-text-dim); text-decoration: underline; padding: 0 4px; }
.ws-fchips .ws-understood-note, .ws-fchips .ws-understood-text, .ws-fchips .ws-micro { flex: 0 0 auto; margin: 0; white-space: nowrap; }
.ws-fmeta .ws-micro { text-transform: none; letter-spacing: 0; font-size: 12px; }
.ws-fmeta { display: flex; align-items: center; gap: var(--ws-2); margin-left: auto; flex: 0 0 auto; white-space: nowrap; }
.ws-fsort {
  height: 28px; padding: 0 22px 0 8px; font-family: var(--ws-body); font-size: 12px;
  background-color: transparent; color: var(--ws-text); border: 1px solid var(--ws-ink-500); border-radius: var(--ws-radius);
}
.ws-fsort:focus-visible, .ws-fsort-dir:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
.ws-fsort { color-scheme: dark; }
.ws-fsort option { background: var(--ws-ink-700); color: var(--ws-text); }
.ws-fsort-dir {
  width: 28px; height: 28px; padding: 0; font-size: 14px; cursor: pointer;
  background: transparent; color: var(--ws-text); border: 1px solid var(--ws-ink-500); border-radius: var(--ws-radius);
}
.ws-fsort-dir:disabled { opacity: 0.4; cursor: not-allowed; }

/* Popover contents. Overlay panels sit under their pill (fixed, shadowed, scroll inside). */
.ws-fbar .ws-tick-panel { border-color: var(--ws-ink-400); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); }
.ws-fbar .ws-tick-opt { min-height: 34px; }
.ws-fpop-sec { margin: 0 0 var(--ws-3); padding: 0 var(--ws-1); }
.ws-fpop-h { margin: var(--ws-1) 0 var(--ws-2); font-size: 12px; color: var(--ws-text-dim); }
.ws-fpop-ft { display: flex; align-items: center; gap: 6px; }
.ws-fpop-ft .ws-input { width: 64px; }
.ws-fpop-sec > .ws-input { margin-bottom: var(--ws-2); }
.ws-fpop-sec .ws-checkgroup { gap: var(--ws-2); }
.ws-fpop-sec .ws-check, .ws-fpop-sec .ws-chip { min-height: 32px; font-size: 12px; }
.ws-fpop-sec .ws-facets { margin: 0; gap: var(--ws-2); }
.ws-fpop-sec .ws-facets[hidden] { display: none; }
.ws-fpop-sec .ws-facets .ws-chip { text-transform: none; letter-spacing: 0; }

/* Players toolbar under the bar (stats season, Columns, Views, Export): small and quiet. */
#players-toolbar { gap: var(--ws-2); margin-bottom: var(--ws-3); }
#players-toolbar .ws-btn, #players-toolbar .ws-input { min-height: 32px; height: 32px; padding: 0 var(--ws-3); font-size: 12px; }

/* More filters drawer: right-hand on desktop, a full-screen sheet on phones. */
.ws-fdrawer { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; background: rgba(13, 13, 13, 0.72); }
.ws-fdrawer[hidden] { display: none; }
.ws-fdrawer-card {
  display: flex; flex-direction: column; width: min(460px, 100%); height: 100%;
  background: var(--ws-ink-800); border-left: 1px solid var(--ws-ink-400); box-shadow: -16px 0 40px rgba(0, 0, 0, 0.5);
}
.ws-fdrawer .ws-sheet-head {
  display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto;
  padding: var(--ws-3) var(--ws-5); border-bottom: var(--ws-border);
}
.ws-fdrawer-title { margin: 0; font-size: 1rem; font-weight: 600; color: var(--ws-text); }
.ws-fdrawer .ws-sheet-head .ws-btn { min-height: 36px; min-width: 36px; padding: 0 var(--ws-3); font-size: 1.25rem; line-height: 1; }
.ws-fdrawer-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: var(--ws-2) var(--ws-5) var(--ws-5); }
.ws-fdrawer .ws-sheet-foot {
  display: flex; gap: var(--ws-3); flex: 0 0 auto;
  padding: var(--ws-3) var(--ws-5) calc(var(--ws-3) + env(safe-area-inset-bottom, 0px)); border-top: var(--ws-border); background: var(--ws-ink-800);
}
.ws-fdrawer .ws-sheet-foot .ws-btn { flex: 1; min-height: 40px; }
.ws-fdrawer details.ws-panel {
  background: none; border: 0; border-bottom: 1px solid var(--ws-ink-500); border-radius: 0;
  padding: var(--ws-3) 0; margin: 0 !important;
}
.ws-fdrawer details.ws-panel:last-child { border-bottom: 0; }
.ws-fdrawer summary h2.ws-label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 0.9375rem; font-weight: 600; color: var(--ws-text); }
.ws-fdrawer summary h2.ws-label .ws-micro { margin-left: var(--ws-2); color: var(--ws-gold); }
.ws-fdrawer .ws-grid--2 { grid-template-columns: minmax(0, 1fr); gap: var(--ws-4) !important; }
.ws-fdrawer .ws-label--dim { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ws-text-dim); }
.ws-fdrawer .ws-checkgroup { gap: var(--ws-2); }
.ws-fdrawer .ws-check { min-height: 34px; font-size: 13px; }
.ws-fdrawer .ws-input { min-height: 36px; }

@media (max-width: 640px) {
  .ws-fbar { --fbar-gut: var(--ws-4); padding-top: var(--ws-2); }
  .ws-fbar .ws-tick-btn { height: 40px; min-height: 40px; }
  .ws-fpills { padding-right: var(--ws-2); }
  .ws-fbar-row--meta { flex-wrap: wrap; row-gap: var(--ws-1); }
  .ws-fmeta { margin-left: 0; width: 100%; justify-content: flex-start; order: -1; }
  .ws-fmeta label { margin-left: auto; }
  .ws-fchips { flex: 1 1 100%; }
  .ws-fsort, .ws-fsort-dir { height: 32px; }
  /* Popovers become bottom sheets; the page behind dims. */
  .ws-fbar .ws-tick-panel {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: 100%; max-height: 72vh;
    border: 0; border-top: 1px solid var(--ws-ink-400); border-radius: 12px 12px 0 0;
    padding: var(--ws-3) var(--ws-4) calc(var(--ws-3) + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.6); z-index: 70;
  }
  .ws-fbar .ws-tick-list { max-height: 44vh; }
  .ws-fbar .ws-tick-opt { min-height: 44px; }
  .ws-fpop-sec .ws-check, .ws-fpop-sec .ws-chip { min-height: 40px; }
  .ws-fpop-ft .ws-input { width: 80px; min-height: 44px; }
  .ws-fdrawer-card { width: 100%; border-left: 0; }
  .ws-fdrawer-body { padding-left: var(--ws-4); padding-right: var(--ws-4); }
  .ws-fdrawer .ws-sheet-head { padding: var(--ws-3) var(--ws-4) var(--ws-3) var(--ws-4); padding-top: calc(var(--ws-3) + env(safe-area-inset-top, 0px)); }
  .ws-fdrawer .ws-sheet-foot { padding-left: var(--ws-4); padding-right: var(--ws-4); }
  #players-toolbar .ws-btn, #players-toolbar .ws-input { min-height: 36px; height: 36px; }
}
body:has(.ws-tick-btn[aria-expanded="true"]) .ws-fab { display: none; }
.ws-fdrawer summary .ws-flare { font-size: 10px; margin-left: var(--ws-2) !important; }

/* --- Assist's player preview card (drop_ui.py: dropHcOpen) --------------------
   Opens beside a player's name in the thread: slides out from the link's side
   (about 180ms of translate and fade), a bottom sheet on a phone. Fixed to the
   body so no scroll box in the thread clips it. */
.ws-hc {
  position: fixed; z-index: 40; width: 320px; max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px); overflow-y: auto;
  background: var(--ws-ink-700); border: var(--ws-border-strong); border-top: 2px solid var(--ws-gold);
  border-radius: var(--ws-radius); padding: var(--ws-3) var(--ws-4) var(--ws-3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column; gap: var(--ws-2);
  opacity: 0; pointer-events: none;
  transition: opacity 180ms cubic-bezier(0.2, 0, 0.2, 1), transform 180ms cubic-bezier(0.2, 0, 0.2, 1);
}
.ws-hc.is-open { opacity: 1; transform: none; pointer-events: auto; }
.ws-hc[data-hc-mode="right"] { transform: translateX(-12px); }
.ws-hc[data-hc-mode="left"] { transform: translateX(12px); }
.ws-hc[data-hc-mode="below"] { transform: translateY(-12px); }
.ws-hc[data-hc-mode="above"] { transform: translateY(12px); }
.ws-hc.ws-hc--sheet {
  left: 0; right: 0; width: auto; max-width: none; max-height: 60vh; overflow-y: auto;
  border-radius: var(--ws-radius) var(--ws-radius) 0 0; transform: translateY(16px);
}
.ws-hc.is-open[data-hc-mode] { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ws-hc, .ws-hc[data-hc-mode] { transform: none; transition: opacity 180ms linear; }
}
.ws-hc-mark { position: absolute; top: var(--ws-2); right: var(--ws-2); width: 18px; height: 18px; color: var(--ws-gold); }
.ws-hc-mark svg { width: 18px; height: 18px; overflow: visible; stroke: currentColor; stroke-width: 8; fill: none; stroke-linecap: square; stroke-linejoin: miter; }
.ws-hc-head { display: flex; gap: var(--ws-3); align-items: center; padding-right: 22px; }
.ws-hc-head .ws-photo--sm { width: 56px; }
.ws-hc-initials {
  flex: 0 0 auto; width: 56px; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center;
  background: var(--ws-ink-900); border: var(--ws-border); border-radius: var(--ws-radius);
  font-family: var(--ws-display); font-weight: 700; font-size: var(--ws-fs-display-s); color: var(--ws-gold);
}
.ws-hc-ident { min-width: 0; }
.ws-hc-name { margin: 0; font-family: var(--ws-display); font-weight: 700; font-size: var(--ws-fs-display-s); text-transform: uppercase; line-height: var(--ws-lh-tight); overflow-wrap: anywhere; }
.ws-hc-id { margin: 2px 0 0; font-family: var(--ws-mono); font-size: 11px; color: var(--ws-text-mut); }
.ws-hc-facts { margin: 0; font-size: var(--ws-fs-small); color: var(--ws-text-dim); }
.ws-hc-rows { display: flex; flex-direction: column; gap: var(--ws-2); }
.ws-hc-row { display: flex; flex-direction: column; gap: 1px; font-size: var(--ws-fs-small); border-top: var(--ws-border); padding-top: var(--ws-2); }
.ws-hc-label { font-family: var(--ws-display); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: var(--ws-ls-label); color: var(--ws-text-mut); }
.ws-hc-grade { color: var(--ws-gold); }
.ws-hc-actions { display: flex; gap: var(--ws-2); flex-wrap: wrap; margin-top: var(--ws-1); }
.ws-hc-skel { background: var(--ws-ink-600); animation: ws-hc-pulse 1.1s ease-in-out infinite alternate; }
.ws-hc-skel-lines { display: flex; flex-direction: column; gap: var(--ws-2); }
.ws-hc-skel-lines .ws-hc-skel { height: 12px; border-radius: var(--ws-radius); }
.ws-hc-skel-lines .ws-hc-skel:nth-child(2) { width: 70%; }
.ws-hc-skel-lines .ws-hc-skel:nth-child(3) { width: 85%; }
@keyframes ws-hc-pulse { from { opacity: 0.45; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ws-hc-skel { animation: none; } }
@media print { .ws-hc { display: none; } }

/* Assist entry points on Shortlists, Events, Teams and the event/team composer mounts: a button and an offer
   card carrying the basketball-and-star mark (NAV_ICON.assist, drop_ui.py assistButtonHtml/assistOfferHtml). */
.ws-assist-btn { display: inline-flex; align-items: center; gap: var(--ws-2); }
.ws-assist-btn .ws-assist-ic { color: var(--ws-gold); display: inline-flex; flex: 0 0 auto; }
.ws-assist-btn .ws-assist-short { display: none; }
@media (max-width: 600px) { .ws-assist-btn .ws-assist-full { display: none; } .ws-assist-btn .ws-assist-short { display: inline; } }
.ws-assist-btn .ws-assist-ic svg, .ws-assist-offer-title .ws-assist-ic svg, .ws-assist-ctx-title .ws-assist-ic svg { width: 1.3em; height: 1.3em; margin-right: 0; vertical-align: middle; overflow: visible; }
.ws-assist-offer { margin-bottom: var(--ws-4); padding-top: var(--ws-3); padding-bottom: var(--ws-3); }
.ws-assist-offer--empty { padding-top: var(--ws-5); padding-bottom: var(--ws-5); }
.ws-assist-offer-title, .ws-assist-ctx-title { display: flex; align-items: center; gap: var(--ws-2); margin: 0 0 var(--ws-2); }
.ws-assist-offer-title .ws-assist-ic, .ws-assist-ctx-title .ws-assist-ic { color: var(--ws-gold); display: inline-flex; }
.ws-assist-offer-blurb { margin: 0 0 var(--ws-3); }
.ws-assist-starters { display: flex; flex-wrap: wrap; gap: var(--ws-2); }
.ws-assist-starters .ws-chip { min-height: var(--ws-touch); }
.ws-assist-ctx { margin-bottom: var(--ws-3); }

/* ============================================================================
   PAGE HEADER SYSTEM, ASK ASSIST ENTRIES, BUTTON SCALE (one rule per role)
   Every top-level nav page (Home, Players, Shortlists, Teams, Assist, Events,
   How it works) uses .ws-page-head: a title row, a one-line subtitle slot that
   is always reserved, and an actions slot at the right. Same top offset, size,
   line-height, height and divider on every page, so switching tabs moves
   nothing. Page tools (.ws-page-tools) sit in a row below the divider.
   ========================================================================= */
html { scrollbar-gutter: stable; }
.ws-page-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 40px 20px;
  column-gap: var(--ws-4); align-items: start;
  box-sizing: border-box; height: 77px; padding: 0 0 var(--ws-3); margin: 0 0 var(--ws-4);
  border-bottom: var(--ws-border);
}
.ws-page-title { display: contents; }
.ws-page-head h1 {
  grid-column: 1; grid-row: 1; min-width: 0; margin: 0; height: 40px;
  font-size: var(--ws-fs-display-m); line-height: 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-page-head .ws-page-sub {
  grid-column: 1; grid-row: 2; min-width: 0; margin: 0; height: 20px; line-height: 20px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-page-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: var(--ws-3); height: 40px; flex-wrap: nowrap; }
.ws-page-assist { display: inline-flex; }
.ws-page-tools { display: flex; align-items: center; flex-wrap: wrap; gap: var(--ws-3); margin: 0 0 var(--ws-4); }
.ws-page-tools .ws-input { max-width: 240px; }
/* Assist is full-bleed, so it takes the gutter the other views get from .ws-shell on its own header. */
#view-drop.ws-shell { padding-top: var(--ws-6); }
#view-drop > .ws-drop-head.ws-page-head { margin: 0 var(--ws-6) var(--ws-4); padding-inline: 0; }
#view-drop .ws-drop-head h1 { overflow: visible; }
.ws-btn-label { display: inline; }
@media (max-width: 600px) {
  .ws-page-head { grid-template-rows: 44px; height: 57px; }
  .ws-page-head h1 { height: 44px; line-height: 44px; }
  .ws-page-head .ws-page-sub { display: none; }
  .ws-page-actions { height: 44px; gap: var(--ws-2); }
  #view-drop.ws-shell { padding-top: var(--ws-4); }
  #view-drop > .ws-drop-head.ws-page-head { margin-inline: var(--ws-4); }
  /* "Wingspan Assist" plus Answers, History and New is wider than a 360-430px phone: the title overlapped the
     buttons and swallowed their taps. The welcome below already says "Wingspan Assist", so the header keeps "Assist". */
  #view-drop .ws-drop-head h1 .ws-wm-eyebrow { display: none; }
  .ws-page-tools { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ws-page-tools > * { flex: 0 0 auto; }
  .ws-page-tools .ws-btn, .ws-page-actions .ws-btn { white-space: nowrap; }
  .ws-icon-btn .ws-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ws-icon-btn { min-width: 44px; padding-inline: 0; }
  .ws-page-assist .ws-assist-btn { padding-inline: var(--ws-3); }
}
.ws-icon-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 7; fill: none; stroke-linecap: square; flex: 0 0 auto; }
.ws-icon-btn { gap: var(--ws-2); }

/* The top bar and the utility strip are the same height on every page. */
.ws-utilitystrip { height: 48px; min-height: 48px; box-sizing: border-box; padding-block: 0; flex-wrap: nowrap; }

/* One button scale. Primary (yellow, one per page at most), secondary (outline, the default .ws-btn) and
   ghost (.ws-btn--ghost, a quiet link-like button). Same height, padding, case and tracking for all. */
.ws-btn, .ws-btn--sm {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ws-2);
  min-height: 40px; padding: 0 var(--ws-4); line-height: 1.15; padding-block: var(--ws-2);
  font-size: var(--ws-fs-small); text-transform: uppercase; letter-spacing: var(--ws-ls-label);
}
.ws-btn--sm { padding: var(--ws-1) var(--ws-3); }
.ws-btn--ghost { border-color: transparent; color: var(--ws-text-dim); }
.ws-btn--ghost:hover { color: var(--ws-text); }
@media (max-width: 600px), (pointer: coarse) { .ws-btn, .ws-btn--sm { min-height: 44px; } }
/* Ask Assist: the header action button and the inline Ask row are the only two entries. */
.ws-assist-btn .ws-assist-ic { color: var(--ws-gold); }

/* --- Assist: tables in replies, folded older answers, the Answers list, phone layout ------------------ */
.ws-drop-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: var(--ws-2) 0; max-width: 100%; border: var(--ws-border); border-radius: var(--ws-radius); }
.ws-drop-md-table { width: 100%; border-collapse: collapse; }
.ws-drop-md-table th, .ws-drop-md-table td { padding: var(--ws-1) var(--ws-3); white-space: nowrap; text-align: left; }
@media (max-width: 600px) {
  .ws-drop-md-table th:first-child, .ws-drop-md-table td:first-child { position: sticky; left: 0; background: var(--ws-ink-800); z-index: 1; box-shadow: 1px 0 0 var(--ws-ink-500); }
}
.ws-drop-clamp.is-clamped { max-height: calc(var(--ws-lh-body, 1.5) * 1em * 6); overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.ws-drop-clamp-toggle { margin-top: var(--ws-1); }
.ws-drop-msg-row.is-found { outline: 1px solid var(--ws-gold); outline-offset: 4px; }
.ws-drop-answers {
  position: absolute; z-index: 30; top: 0; right: var(--ws-6); width: min(420px, calc(100% - var(--ws-8, 32px)));
  max-height: 60%; display: flex; flex-direction: column; background: var(--ws-ink-700); border: var(--ws-border-strong); border-top: 2px solid var(--ws-gold);
  border-radius: var(--ws-radius); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); margin-top: 101px;
}
#view-drop { position: relative; }
.ws-drop-answers-head { display: flex; gap: var(--ws-2); padding: var(--ws-3); border-bottom: var(--ws-border); }
.ws-drop-answers-head .ws-input { flex: 1 1 auto; min-width: 0; }
.ws-drop-answers-list { list-style: none; margin: 0; padding: var(--ws-2); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ws-drop-answers-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: none; border: 0; border-radius: var(--ws-radius); padding: var(--ws-2) var(--ws-3); color: var(--ws-text); cursor: pointer; min-height: 44px; }
.ws-drop-answers-item:hover { background: var(--ws-ink-600); }
.ws-drop-answers-first { font-size: var(--ws-fs-small); }
.ws-hc-close { display: none; }
@media (max-width: 600px) {
  .ws-drop-answers { left: var(--ws-4); right: var(--ws-4); width: auto; margin-top: 57px; max-height: 70%; }
  /* The header steps away while reading down. */
  #view-drop.is-head-away > .ws-drop-head { margin-top: -57px; margin-bottom: 0; opacity: 0; pointer-events: none; }
  #view-drop > .ws-drop-head { transition: margin-top 200ms ease, opacity 200ms ease; }
  /* Chips: one horizontal strip. */
  .ws-drop-chat-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--ws-1); }
  .ws-drop-chat-chips .ws-chip { flex: 0 0 auto; white-space: nowrap; }
  /* The welcome scrolls inside the pane, above the composer, never under it. */
  .ws-drop-welcome { min-height: 0; justify-content: flex-start; padding-bottom: var(--ws-4); }
  .ws-drop-thread-pane { scroll-padding-bottom: var(--ws-4); }
  /* The preview card: a 60% bottom sheet with a close button. */
  .ws-hc.ws-hc--sheet { height: 60dvh; max-height: 60dvh; z-index: 45; }
  .ws-hc--sheet .ws-hc-mark { display: none; }
  .ws-hc--sheet .ws-hc-close {
    display: inline-flex; align-items: center; justify-content: center; position: absolute; top: var(--ws-1); right: var(--ws-1);
    width: 44px; height: 44px; background: none; border: 0; color: var(--ws-text); font-size: 28px; line-height: 1; cursor: pointer;
  }
  .ws-hc--sheet .ws-hc-head { padding-right: 44px; }
}
@media (hover: none) { .ws-hc.ws-hc--sheet .ws-hc-close { display: inline-flex; } }
.ws-wf-home-today { margin-bottom: var(--ws-6); min-height: 132px; }
@media (max-width: 600px) {
  .ws-btn.ws-icon-btn { min-width: 44px; padding-inline: 0; }
  .ws-btn.ws-icon-btn .ws-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* A whole row is the link: the name's anchor stretches over its row (or card). Middle-click and "open in a new tab" work. */
.ws-row-linked { position: relative; }
.ws-row-link { color: inherit; text-decoration: none; }
.ws-row-link::after { content: ""; position: absolute; inset: 0; }
.ws-row-link:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }

/* --- Teams page filters (#teams-fbar, #teams-filters-panel) ------------------------
   The Players bar and drawer, reused as they are (.ws-fbar, .ws-tick, .ws-fdrawer, .ws-fsort).
   Only what is new is here: the sortable table headings, the "loosen" hints in the empty
   state, and 44px tap targets on phones. */
.ws-th-sort { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.ws-th-sort:focus-visible { outline: 2px solid var(--ws-gold); outline-offset: 2px; }
body:has(#teams-filters-panel:not([hidden])) .ws-fab { display: none; }
#teams-chips-row .ws-chip b { color: var(--ws-gold); }
@media (max-width: 640px) {
  #teams-fbar .ws-tick-btn { height: 44px; min-height: 44px; }
  #teams-fbar .ws-fsort, #teams-fbar .ws-fsort-dir { height: 44px; min-height: 44px; }
  #teams-fbar .ws-fsort-dir { min-width: 44px; }
  #teams-fbar .ws-fchips .ws-chip { min-height: 44px; }
  #teams-fbar .ws-tick-foot button { min-height: 44px; }
  #teams-fbar .ws-tick-search { min-height: 44px; }
  #teams-filters-panel .ws-check, #teams-filters-panel .ws-input, #teams-filters-panel .ws-sheet-foot .ws-btn,
  #teams-filters-panel .ws-sheet-head .ws-btn { min-height: 44px; }
  #teams-filters-panel .ws-sheet-head .ws-btn { min-width: 44px; }
  #teams-filters-panel summary { min-height: 44px; }
  #view-teams .ws-th-sort { min-height: 44px; min-width: 44px; }
  #view-teams .ws-empty-try .ws-chip, #view-teams .ws-empty-try .ws-btn { min-height: 44px; }
}

/* --- Teams: the slide-out panel (workflow_ui.py: teamsPanelOpen) ----------------
   A tap on a Teams row slides this in from the right over the list (no reflow);
   a bottom sheet with a close x on a phone. The slide is the player card's (.ws-hc). */
#teams-body tr.is-open { background: var(--ws-ink-700); box-shadow: inset 3px 0 0 var(--ws-gold); }
.ws-tsp-scrim { display: none; }
.ws-tsp {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: 420px; max-width: 100vw;
  background: var(--ws-ink-700); border-left: var(--ws-border-strong); border-top: 2px solid var(--ws-gold);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.55); overflow-y: auto; overscroll-behavior: contain;
  padding: var(--ws-4); display: flex; flex-direction: column; gap: var(--ws-3);
  opacity: 0; transform: translateX(24px); pointer-events: none;
  transition: opacity 180ms cubic-bezier(0.2, 0, 0.2, 1), transform 180ms cubic-bezier(0.2, 0, 0.2, 1);
}
.ws-tsp[hidden] { display: none; }
.ws-tsp.is-open { opacity: 1; transform: none; pointer-events: auto; }
.ws-tsp:focus { outline: none; }
.ws-tsp-head { display: flex; gap: var(--ws-3); align-items: flex-start; justify-content: space-between; }
.ws-tsp-ident { display: flex; gap: var(--ws-3); align-items: center; min-width: 0; }
.ws-tsp-who { min-width: 0; }
.ws-tsp-who .ws-hc-name { margin: 0; }
.ws-tsp-facts, .ws-tsp-src { margin: var(--ws-1) 0 0; }
.ws-tsp-src { margin: 0; }
.ws-tsp-close {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  margin: calc(var(--ws-1) * -1) calc(var(--ws-1) * -1) 0 0; background: none; border: 0; color: var(--ws-text);
  font-size: 28px; line-height: 1; cursor: pointer;
}
.ws-tsp-actions { display: flex; gap: var(--ws-2); flex-wrap: wrap; }
.ws-tsp-actions .ws-btn { min-height: 44px; }
.ws-tsp-body { display: flex; flex-direction: column; gap: var(--ws-2); min-width: 0; }
.ws-tsp-body .ws-label { margin: var(--ws-2) 0 0; }
.ws-tsp-list { list-style: none; margin: 0; padding: 0; }
.ws-tsp-row {
  display: flex; gap: var(--ws-3); align-items: center; min-height: 44px; padding: var(--ws-1) 0;
  border-top: var(--ws-border); color: var(--ws-text); text-decoration: none; min-width: 0;
}
a.ws-tsp-row:hover { background: var(--ws-ink-600); }
.ws-tsp-num { flex: 0 0 2.5em; font-family: var(--ws-mono); font-size: var(--ws-fs-small); color: var(--ws-text-mut); text-align: right; }
.ws-tsp-pname { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.ws-tsp-list .ws-tsp-row > .ws-tsp-pname:first-child { padding-left: var(--ws-1); }
@media (prefers-reduced-motion: reduce) {
  .ws-tsp { transform: none; transition: opacity 180ms linear; }
}
@media (max-width: 640px) {
  .ws-tsp-scrim { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(13, 13, 13, 0.72); }
  .ws-tsp-scrim[hidden] { display: none; }
  .ws-tsp {
    top: auto; left: 0; width: auto; height: 85dvh; max-height: 85dvh; border-left: 0;
    border-radius: var(--ws-radius) var(--ws-radius) 0 0; transform: translateY(24px);
    padding-bottom: calc(var(--ws-4) + env(safe-area-inset-bottom, 0px));
  }
}
/* --- Responsive sweep: phone and tablet fixes ---------------------------------------------------------- */
/* A long link or id in a reply wraps inside the bubble instead of running off the column. */
.ws-drop-msg--assistant, .ws-drop-msg--user { overflow-wrap: anywhere; }
.ws-drop-msg--assistant pre, .ws-drop-msg--user pre { max-width: 100%; overflow-x: auto; }
/* The event page's More menu is never wider than the screen; the toggle handler in gen_prototype.py slides it back inside. */
@media (max-width: 640px) {
  #event-more .ws-wf-eval-more-menu { min-width: min(240px, calc(100vw - 2 * var(--ws-4))); max-width: calc(100vw - 2 * var(--ws-4)); }
}
/* Touch: 44px targets for the small controls the base sizes leave at 15-40px. Text links keep their look: the
   padding is cancelled by a matching negative margin, so nothing around them moves. (Phones already get this for
   links, chips and buttons from the 600px block above; tablets did not.) */
@media (min-width: 601px) and (pointer: coarse), (max-height: 500px) and (max-width: 950px) and (min-width: 601px) {
  .ws-footer-link { padding: 14px 6px; margin: -14px -6px; }
  .ws-chip { min-height: 44px; display: inline-flex; align-items: center; }
  .ws-topbar-lockup { padding-block: 11px; }
}
@media (max-width: 600px), (pointer: coarse), (max-height: 500px) and (max-width: 950px) {
  .ws-tick-btn, .ws-fbar .ws-tick-btn { height: auto; min-height: 44px; }
  .ws-fpop-sec .ws-check, .ws-fpop-sec .ws-chip, .ws-fdrawer .ws-check { min-height: 44px; }
  .ws-fdrawer .ws-input, #players-toolbar .ws-btn, #players-toolbar .ws-input { min-height: 44px; height: auto; }
  .ws-fdrawer .ws-sheet-head .ws-btn { min-height: 44px; min-width: 44px; }
  .ws-fdrawer .ws-sheet-foot .ws-btn { min-height: 44px; height: auto; }
  .ws-fsort { height: 44px; font-size: 14px; padding-left: 12px; }
  .ws-fsort-dir { width: 44px; height: 44px; }
  .ws-wf-home-bar { min-height: 44px; }
  .ws-section-head.ws-accordion-head { min-height: 44px; }
}
/* A phone on its side (844x390): the 77px bar, the 48px Jump strip, a 77px page head with a subtitle, and a 200px
   composer left Assist's thread about 15px tall. Tighten each, and let the head step away on scroll as it does
   in portrait. */
@media (max-height: 500px) and (orientation: landscape) {
  .ws-topbar { padding-block: var(--ws-1); }
  .ws-page-head { grid-template-rows: 44px; height: 57px; }
  .ws-page-head h1 { height: 44px; line-height: 44px; }
  .ws-page-head .ws-page-sub { display: none; }
  #view-drop.ws-shell { padding-top: var(--ws-2); }
  #view-drop > .ws-drop-head.ws-page-head { margin-bottom: var(--ws-2); }
  #view-drop #drop-chat-composer ~ .ws-drop-hint, #view-drop .ws-drop-hint { display: none; }
  .ws-drop-composer-wrap { padding-block: var(--ws-2); }
  .ws-drop-box--chat { padding: var(--ws-2); }
  textarea.ws-drop-textarea { min-height: 44px; }
  .ws-drop-thumb { width: 44px; height: 44px; }
  #view-drop.is-head-away > .ws-drop-head { margin-top: -57px; margin-bottom: 0; opacity: 0; pointer-events: none; }
  #view-drop > .ws-drop-head { transition: margin-top 200ms ease, opacity 200ms ease; }
}
/* The Answers panel's close button is 44 wide like every other icon button. */
.ws-drop-answers-head .ws-btn { min-width: 44px; }
/* Body-size text on a phone is 14px or more: these three read at 12-13.3px. */
@media (max-width: 600px), (max-height: 500px) and (max-width: 950px) {
  .ws-tick-name, #roster-count, .ws-drop-suggestion-example { font-size: 14px; }
}


/* --- Guide (help_ui.py) ---------------------------------------------------
   One topic at a time beside a secondary nav (a sticky sidebar from 900px,
   a sticky sideways strip below). gx-* is the drawn mock-up vocabulary:
   plain boxes, never real controls. Gold dots number the mock-up; the step
   cards beside it carry the same numbers. */
.ws-guide-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--ws-6); align-items: start; }
.ws-guide-nav { position: sticky; top: var(--ws-4); display: flex; flex-direction: column; gap: 2px; }
.gx-nav-group { font-size: var(--ws-fs-micro); text-transform: uppercase; letter-spacing: var(--ws-ls-micro); color: var(--ws-text-mut); margin: var(--ws-4) 0 var(--ws-1); }
.gx-nav-group:first-child { margin-top: 0; }
.gx-nav-item {
  display: flex; align-items: center; gap: var(--ws-2); text-align: left; cursor: pointer;
  background: transparent; border: 0; border-left: 2px solid transparent; color: var(--ws-text-dim);
  font: inherit; font-size: var(--ws-fs-small); padding: var(--ws-2) var(--ws-3); border-radius: 0 var(--ws-radius) var(--ws-radius) 0;
}
.gx-nav-item:hover { color: var(--ws-text); background: var(--ws-ink-700); }
.gx-nav-item[aria-current="page"] { color: var(--ws-text); background: var(--ws-ink-700); border-left-color: var(--ws-gold); }
.gx-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.ws-guide-main { min-width: 0; }

.gx-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--ws-4); margin-bottom: var(--ws-5); }
.gx-title { font-family: var(--ws-display); font-size: var(--ws-fs-display-s); text-transform: uppercase; line-height: 1; margin: var(--ws-1) 0 var(--ws-2); }
.gx-lead { margin: 0; color: var(--ws-text-dim); font-size: var(--ws-fs-read); line-height: var(--ws-lh-read); max-width: 60ch; }
.gx-subhead { font-family: var(--ws-display); font-size: var(--ws-fs-small); text-transform: uppercase; letter-spacing: var(--ws-ls-label); color: var(--ws-text-dim); margin: var(--ws-6) 0 var(--ws-3); }

/* picture + steps */
.gx-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--ws-5); align-items: start; }
.gx-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--ws-2); }
.gx-step { display: flex; gap: var(--ws-3); background: var(--ws-ink-700); border: var(--ws-border); border-radius: var(--ws-radius); padding: var(--ws-3); }
.gx-step-n, .gx-dot {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--ws-gold); color: var(--ws-ink); font-weight: 700; font-family: var(--ws-body);
}
.gx-step-n { width: 26px; height: 26px; font-size: 13px; }
.gx-dot { width: 20px; height: 20px; font-size: 11px; box-shadow: 0 0 0 3px rgba(0,0,0,.55); }
.gx-step-t { margin: 2px 0 2px; font-weight: 600; color: var(--ws-text); }
.gx-step-d { margin: 0; color: var(--ws-text-dim); font-size: var(--ws-fs-small); line-height: 1.45; }

/* the drawn screen */
.gx-mock { background: var(--ws-ink-900); border: 1px solid var(--ws-ink-500); border-radius: 10px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.gx-mock--phone { max-width: 330px; margin: 0 auto; border-radius: 22px; border-width: 6px; border-color: var(--ws-ink-600); }
.gx-mock-bar { display: flex; align-items: center; gap: 5px; padding: 8px 12px; background: var(--ws-ink-700); border-bottom: 1px solid var(--ws-ink-600); }
.gx-mock-bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--ws-ink-500); }
.gx-mock-bar em { font-style: normal; margin-left: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: var(--ws-ls-micro); color: var(--ws-text-mut); }
.gx-mock-body { padding: var(--ws-4); display: flex; flex-direction: column; gap: var(--ws-3); font-size: 13px; }
.gx-row { display: flex; align-items: center; gap: var(--ws-2); min-width: 0; }
.gx-wrap { flex-wrap: wrap; }
.gx-grow { flex: 1; }
.gx-pad { padding: var(--ws-2) var(--ws-3); }
.gx-h { margin: 0; font-family: var(--ws-display); text-transform: uppercase; font-size: 18px; }
.gx-small { font-size: 12px; color: var(--ws-text-dim); line-height: 1.35; }
.gx-strong { font-weight: 600; color: var(--ws-text); }
.gx-stack { display: flex; flex-direction: column; gap: 2px; }
.gx-btn { display: inline-flex; align-items: center; white-space: nowrap; border: 1px solid var(--ws-ink-400); border-radius: var(--ws-radius); padding: 5px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--ws-text); background: var(--ws-ink-700); }
.gx-btn--sm { padding: 3px 8px; font-size: 10px; }
.gx-btn--gold { background: var(--ws-gold); border-color: var(--ws-gold); color: var(--ws-ink); }
.gx-btn--ghost { background: transparent; color: var(--ws-text-dim); }
.gx-chip { display: inline-flex; white-space: nowrap; border: 1px solid var(--ws-ink-500); border-radius: var(--ws-radius); padding: 3px 8px; font-size: 11px; color: var(--ws-text-dim); }
.gx-chip--on { border-color: var(--ws-gold); color: var(--ws-gold); }
.gx-input { flex: 1; min-width: 0; border: 1px solid var(--ws-ink-500); border-radius: var(--ws-radius); padding: 6px 10px; font-size: 12px; color: var(--ws-text); background: var(--ws-ink-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-input--ph { color: var(--ws-text-mut); }
.gx-tick { flex: none; width: 13px; height: 13px; border: 1px solid var(--ws-ink-400); border-radius: 2px; }
.gx-tick--on { background: var(--ws-gold); border-color: var(--ws-gold); box-shadow: inset 0 0 0 2px var(--ws-ink-900); }
.gx-tag { display: inline-flex; white-space: nowrap; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: var(--ws-radius-pill); background: var(--ws-ink-600); color: var(--ws-text-dim); }
.gx-tag--gold { background: var(--ws-gold); color: var(--ws-ink); }
.gx-tag--warn { background: transparent; border: 1px solid var(--ws-signal-gap); color: var(--ws-signal-gap); }
.gx-card { background: var(--ws-ink-700); border: 1px solid var(--ws-ink-600); border-radius: var(--ws-radius); padding: var(--ws-3); display: flex; flex-direction: column; gap: var(--ws-2); }
.gx-card--warn { border-color: var(--ws-signal-gap); }
.gx-card--tip { border-left: 3px solid var(--ws-gold); margin-top: var(--ws-5); flex-direction: row; flex-wrap: wrap; align-items: baseline; }
.gx-card--ok { border-top: 3px solid var(--ws-positive); }
.gx-card--no { border-top: 3px solid var(--ws-signal-gap); }
.gx-bar { background: var(--ws-ink-700); border: 1px solid var(--ws-ink-600); border-radius: var(--ws-radius); padding: var(--ws-2) var(--ws-3); }
.gx-composer { border-top: 1px solid var(--ws-ink-600); padding-top: var(--ws-3); }
.gx-bubble { align-self: flex-end; max-width: 85%; background: var(--ws-ink-600); border-radius: 12px 12px 2px 12px; padding: 6px 10px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-mini-table { display: flex; flex-direction: column; gap: 6px; }
.gx-mini-table .gx-row { gap: var(--ws-3); }
.gx-th .gx-small, .gx-th { color: var(--ws-text-mut); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.gx-skel { height: 8px; border-radius: 4px; background: var(--ws-ink-600); }
.gx-skel--s { width: 60%; }
.gx-notes { position: relative; background: var(--ws-ink-800); border: 1px solid var(--ws-ink-500); border-radius: var(--ws-radius); padding: var(--ws-3); font-family: var(--ws-mono); font-size: 12px; line-height: 1.8; }
.gx-notes b { color: var(--ws-gold); }
.gx-notes .gx-dot { position: absolute; right: 8px; top: 8px; }
.gx-photo { width: 44px; height: 44px; border-radius: 50%; background: var(--ws-ink-600); flex: none; }
.gx-abc { display: inline-flex; border: 1px solid var(--ws-ink-500); border-radius: var(--ws-radius); overflow: hidden; }
.gx-abc i { font-style: normal; font-size: 10px; padding: 2px 6px; color: var(--ws-text-mut); }
.gx-abc i.on { background: var(--ws-gold); color: var(--ws-ink); font-weight: 700; }
.gx-prog { display: inline-flex; gap: 2px; }
.gx-prog i { width: 12px; height: 6px; border-radius: 2px; background: var(--ws-ink-600); }
.gx-prog i.on { background: var(--ws-gold); }
.gx-pages { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--ws-3); }
.gx-pages > .gx-dot { position: absolute; right: -6px; top: -6px; }
.gx-page { aspect-ratio: 210 / 279; background: var(--ws-bone); color: var(--ws-ink); border-radius: 3px; padding: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 11px; }
.gx-page .gx-skel { background: #d8d4cb; }
.gx-page .gx-small { color: #6b6760; margin-top: auto; }
.gx-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--ws-2); }
.gx-post { background: var(--ws-ink-700); border: 1px solid var(--ws-ink-600); border-radius: var(--ws-radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 11px; align-items: flex-start; }
.gx-post .gx-skel { width: 100%; }
/* app shell mock */
.gx-shell { display: grid; grid-template-columns: 120px 1fr; min-height: 220px; margin: calc(-1 * var(--ws-4)); }
.gx-side { background: var(--ws-ink-800); border-right: 1px solid var(--ws-ink-600); padding: var(--ws-3); display: flex; flex-direction: column; gap: 6px; }
.gx-logo { font-family: var(--ws-display); font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.gx-navi { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ws-text-dim); padding: 3px 6px; border-left: 2px solid transparent; }
.gx-navi--on { color: var(--ws-text); border-left-color: var(--ws-gold); background: var(--ws-ink-700); }
.gx-main { padding: var(--ws-3); display: flex; flex-direction: column; gap: var(--ws-3); }
.gx-row--top { border-bottom: 1px solid var(--ws-ink-600); padding-bottom: var(--ws-3); }

/* other visuals */
.gx-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--ws-3); }
.gx-task {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--ws-2); text-align: left; cursor: pointer; font: inherit;
  background: var(--ws-ink-700); border: var(--ws-border); border-top: 3px solid var(--ws-gold); border-radius: var(--ws-radius); padding: var(--ws-4); color: var(--ws-text);
}
.gx-task:hover { background: var(--ws-ink-600); }
.gx-task .gx-icon { width: 28px; height: 28px; color: var(--ws-gold); }
.gx-task-t { font-family: var(--ws-display); text-transform: uppercase; font-weight: 700; font-size: var(--ws-fs-body); }
.gx-task-d { font-size: var(--ws-fs-small); color: var(--ws-text-dim); line-height: 1.4; }
.gx-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--ws-3); }
.gx-trio--2 { grid-template-columns: repeat(2, 1fr); margin-top: var(--ws-3); }
.gx-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--ws-2); margin-bottom: var(--ws-5); }
.gx-kind { display: flex; flex-direction: column; gap: 3px; background: var(--ws-ink-700); border: var(--ws-border); border-radius: var(--ws-radius); padding: var(--ws-3); font-size: var(--ws-fs-small); }
.gx-codes { display: flex; flex-wrap: wrap; gap: var(--ws-2); }
.ws-guide code, .ws-guide kbd { font-family: var(--ws-mono); font-size: 12px; background: var(--ws-ink-900); border: 1px solid var(--ws-ink-500); border-radius: var(--ws-radius); padding: 3px 8px; color: var(--ws-text); overflow-wrap: anywhere; }
.gx-flow { display: flex; flex-direction: column; gap: var(--ws-2); }
.gx-flow-row { display: flex; align-items: center; gap: var(--ws-3); flex-wrap: wrap; }
.gx-arrow { color: var(--ws-gold); font-weight: 700; }
.gx-pipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; counter-reset: pipe; }
.gx-pipe-step { position: relative; display: flex; flex-direction: column; gap: 3px; background: var(--ws-ink-700); border: var(--ws-border); padding: var(--ws-3) var(--ws-4) var(--ws-3) var(--ws-3); font-size: var(--ws-fs-small); }
.gx-pipe-step + .gx-pipe-step { border-left: 0; }
.gx-pipe-step:not(:last-child)::after { content: "›"; position: absolute; right: -7px; top: 50%; transform: translateY(-50%); z-index: 1; color: var(--ws-gold); font-weight: 700; font-size: 18px; background: var(--ws-ink-900); line-height: 1; padding: 0 2px; }
.gx-life { display: flex; align-items: center; gap: var(--ws-2); flex-wrap: wrap; }
.gx-life-note { display: inline-flex; align-items: center; gap: var(--ws-2); margin-left: var(--ws-4); }
.gx-who { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--ws-3); }
.gx-who .gx-card .gx-small::before { content: "· "; color: var(--ws-gold); }
.gx-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--ws-3); }
.gx-key { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; background: var(--ws-ink-700); border: var(--ws-border); border-radius: var(--ws-radius); padding: var(--ws-3); }
.gx-key kbd { font-size: 14px; padding: 4px 10px; margin-bottom: 4px; border-bottom-width: 3px; }
.gx-faq { display: flex; flex-direction: column; gap: var(--ws-2); }
.gx-more { margin-top: var(--ws-5); background: var(--ws-ink-700); border: var(--ws-border); border-radius: var(--ws-radius); }
.gx-faq .gx-more { margin-top: 0; }
.gx-more summary { cursor: pointer; padding: var(--ws-3) var(--ws-4); font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.gx-more summary::-webkit-details-marker { display: none; }
.gx-more summary::after { content: "+"; color: var(--ws-gold); font-weight: 700; }
.gx-more[open] summary::after { content: "–"; }
.gx-more ul, .gx-more p { margin: 0; padding: 0 var(--ws-4) var(--ws-4) calc(var(--ws-4) + 1.1em); color: var(--ws-text-dim); line-height: 1.55; font-size: var(--ws-fs-small); }
.gx-more p { padding-left: var(--ws-4); }
.gx-more li { margin: var(--ws-1) 0; }
.gx-more b { color: var(--ws-text); }
.gx-pager { display: flex; justify-content: space-between; gap: var(--ws-3); margin-top: var(--ws-7); padding-top: var(--ws-4); border-top: 1px solid var(--ws-ink-600); }
.gx-pager-btn { display: flex; flex-direction: column; gap: 2px; font: inherit; font-weight: 600; color: var(--ws-text); background: transparent; border: var(--ws-border); border-radius: var(--ws-radius); padding: var(--ws-2) var(--ws-4); cursor: pointer; text-align: left; }
.gx-pager-btn small { font-size: var(--ws-fs-micro); text-transform: uppercase; letter-spacing: var(--ws-ls-micro); color: var(--ws-text-mut); font-weight: 400; }
.gx-pager-btn--next { text-align: right; margin-left: auto; }
.gx-pager-btn:hover { border-color: var(--ws-gold); }

@media (min-width: 1280px) {
  .gx-tasks { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1100px) {
  .gx-split { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .ws-guide-layout { grid-template-columns: 1fr; gap: var(--ws-4); }
  .ws-guide-nav {
    top: 0; z-index: 5; flex-direction: row; overflow-x: auto; scrollbar-width: none;
    background: var(--ws-ink); margin: 0 calc(-1 * var(--ws-4)); padding: var(--ws-2) var(--ws-4); border-bottom: 1px solid var(--ws-ink-600);
  }
  .ws-guide-nav::-webkit-scrollbar { display: none; }
  .gx-nav-group { display: none; }
  .gx-nav-item { flex: none; border-left: 0; border-bottom: 2px solid transparent; border-radius: var(--ws-radius); white-space: nowrap; }
  .gx-nav-item[aria-current="page"] { border-bottom-color: var(--ws-gold); }
}
@media (max-width: 640px) {
  .gx-head { flex-direction: column; }
  .gx-trio, .gx-trio--2, .gx-who { grid-template-columns: 1fr; }
  .gx-kinds { grid-template-columns: 1fr 1fr; }
  .gx-posts { grid-template-columns: 1fr; }
  .gx-shell { grid-template-columns: 96px 1fr; }
  .gx-pipe { grid-template-columns: 1fr; }
  .gx-pipe-step + .gx-pipe-step { border-left: var(--ws-border); border-top: 0; }
  .gx-pipe-step:not(:last-child)::after { content: "⌄"; right: 50%; top: auto; bottom: -10px; transform: translateX(50%); }
  .gx-life-note { margin-left: 0; }
}
@media print {
  .ws-guide-nav, .gx-pager { display: none; }
}

/* --- Skeleton load screens ---------------------------------------------------------------------
   One system for every view that waits on data (wsSkelStart / wsSkelRows / wsSkelCards in
   workflow_ui.py). Blocks are the surface ladder's border step with a slow highlight sweep; the sweep
   stops under prefers-reduced-motion. Shapes mirror the real rows and tiles so nothing jumps. */
.ws-skel { display: block; position: relative; overflow: hidden; background: var(--ws-ink-500); border-radius: var(--ws-radius); }
.ws-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(250, 250, 247, 0.08), transparent); animation: ws-skel-sweep 1.5s ease-in-out infinite; }
@keyframes ws-skel-sweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .ws-skel::after { animation: none; display: none; } }
@media (prefers-color-scheme: light) { .ws-skel { background: rgba(13, 13, 13, 0.08); } .ws-skel::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent); } }
@media print { .ws-skel, .ws-skel-group { display: none; } }
.ws-skel--line { height: 12px; }
.ws-skel--sm { height: 10px; }
.ws-skel--value { height: 32px; margin: 2px 0; }
.ws-skel--circle { border-radius: 50%; }
.ws-skel--block { width: 100%; }
.ws-skel-group { display: block; }
.ws-skel-row { display: flex; align-items: center; justify-content: space-between; gap: var(--ws-3); min-height: 44px; padding: var(--ws-2) 0; border-bottom: var(--ws-border); }
.ws-skel-row--stack { min-height: 52px; }
.ws-skel-lines { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-width: 0; }
.ws-skel-tile { pointer-events: none; gap: 10px; min-height: 108px; }
.ws-skel-card { display: flex; flex-direction: column; gap: var(--ws-2); min-width: 0; }
/* Whatever inserts a skeleton, it stays invisible for 120 ms, so a fast load never flashes one. */
.ws-skel-group, .ws-skel-card, .ws-skel-tile, .ws-skel-detail, .ws-skel--block, .ws-skel-tr, [data-skel] > .ws-skel { animation: ws-skel-appear 0.01s linear 120ms backwards; }
@keyframes ws-skel-appear { from { opacity: 0; } to { opacity: 1; } }
.ws-skel-tr td { height: 56px; }
.ws-skel-head { display: flex; align-items: center; gap: var(--ws-4); margin-bottom: var(--ws-4); }
.ws-skel-stats { margin-bottom: var(--ws-4); }
.ws-skel-tr td .ws-skel { min-width: 56px; max-width: 160px; }
/* Already in Wingspan? (gen_prototype.py wsDupOpen) — a new player whose
   name matches someone on file. Modal on purpose: it has to be answered. */
.ws-dup-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  padding: var(--ws-5);
  background: var(--ws-ink-700);
  color: var(--ws-text);
  border: 2px solid var(--ws-flare);
  border-radius: var(--ws-radius);
}
.ws-dup-dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
.ws-dup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ws-2); }
.ws-dup-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--ws-3); flex-wrap: wrap;
  padding: var(--ws-3); background: var(--ws-ink-800); border: 1px solid var(--ws-ink-500); border-radius: var(--ws-radius);
}
.ws-dup-item--strong { border-color: var(--ws-gold); }
.ws-dup-actions { display: flex; align-items: center; gap: var(--ws-4); flex-wrap: wrap; margin-top: var(--ws-4); }


/* --- prototype --- */
.sample-banner { background: var(--ws-ink-900); border-bottom: var(--ws-border); padding: var(--ws-2) var(--ws-6); text-align: center; }
  .view[hidden] { display: none !important; }
  /* record-head used to split photo+identity (left) from the WS360 score
     widget (right) 1.2fr/1fr — the header consolidation moved the photo
     and name out to the shared player-shell-head, so this tab's own fields
     grid (#record-identity) needs the full width, not half of it (and
     FEATURES["ws360"] off, the default, leaves the right column with
     nothing in it anyway). Stacked instead; score-record (when ws360 is on)
     falls in below the fields rather than squeezing them. */
  .record-head { display: flex; flex-direction: column; gap: var(--ws-6); }
  .scoutview-head { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: var(--ws-7); align-items: start; }
  .signal-col h3 { margin: 0 0 var(--ws-2); }
  .strength-cluster { display: flex; align-items: center; gap: var(--ws-5); }
  @media (max-width: 900px) { .scoutview-head { grid-template-columns: minmax(0,1fr); gap: var(--ws-5); } }