/* =============================================================================
   my-league.css — /fantasy/my-league/

   The page rides on the family sheets: hub.css supplies the shell furniture
   (.fh-main, .fh-hero, .fh-sec, .fh-pills, .fh-chip, .fh-caveats) and
   extra.css supplies the crest and mug objects. Only what this page invents is
   written here, all of it under .ml-scope.

   House rules, same as every fantasy surface:
     * Newsreader upright. No slanted type; the scope reset forces it.
     * Ink + blue is the whole accent grammar. No gold value is declared here.
     * mint = ahead of the market, coral = behind it. Nothing else coloured.
     * Under 760px every board row becomes a card, so the page never scrolls
       sideways on a phone.
   ============================================================================= */

.ml-scope em, .ml-scope i, .ml-scope cite, .ml-scope address { font-style: normal; }
.ml-scope [hidden] { display: none !important; }

.ml-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* styles.css paints every bare <button> as a pill CTA; this scope opts out once
   and each control opts back in. */
.ml-scope button {
  appearance: none; -webkit-appearance: none;
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer; text-transform: none;
  letter-spacing: normal; border-radius: 0; box-shadow: none;
}
.ml-scope button:hover { transform: none; box-shadow: none; }
.ml-scope button:focus-visible,
.ml-scope a:focus-visible,
.ml-scope input:focus-visible,
.ml-scope textarea:focus-visible {
  outline: 2px solid var(--fw-blue); outline-offset: 2px; border-radius: 4px;
}

.ml-note {
  margin: 0.35rem 0 0; font-size: var(--fw-t-s); line-height: 1.6;
  color: var(--fw-muted);
}

/* =============================================================================
   THE IMPORT PANEL — three doors, side by side, none of them hidden behind
   a wizard step.
   ============================================================================= */
.ml-doors {
  display: grid; gap: 12px; margin: 0 0 1rem;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}
.ml-door {
  border: 1px solid var(--fw-line); border-radius: 15px;
  background: var(--fw-card); padding: 0.95rem 1rem 1rem;
  display: flex; flex-direction: column; gap: 0.55rem;
}
.ml-door > h3 {
  font-family: var(--fw-serif); font-weight: 700; font-size: 1.02rem;
  margin: 0; line-height: 1.2;
}
.ml-door > .kick {
  font-family: var(--fw-mono); font-size: var(--fw-t-micro); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--fw-muted);
}
.ml-door > p {
  margin: 0; font-size: var(--fw-t-s); line-height: 1.6; color: var(--fw-ink-2);
}
.ml-door .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }

.ml-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 120px; }
.ml-field > span {
  font-family: var(--fw-mono); font-size: var(--fw-t-micro); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fw-muted);
}
.ml-scope .ml-input {
  font-family: var(--fw-mono); font-size: var(--fw-t-s); font-weight: 600;
  padding: 8px 11px; border-radius: 10px; width: 100%;
  border: 1px solid var(--fw-line); background: var(--fw-card2); color: var(--fw-ink);
}
.ml-scope textarea.ml-input {
  font-family: var(--fw-mono); min-height: 128px; resize: vertical; line-height: 1.5;
}
.ml-scope .ml-num {
  font-family: var(--fw-mono); font-size: var(--fw-t-s); font-weight: 700;
  padding: 6px 8px; width: 58px; border-radius: 8px;
  border: 1px solid var(--fw-line); background: var(--fw-card2); color: var(--fw-ink);
}
.ml-scope .ml-file {
  font-family: var(--fw-mono); font-size: var(--fw-t-meta-2);
  color: var(--fw-ink-2); max-width: 100%;
}

.ml-scope .ml-btn {
  font-family: var(--fw-mono); font-size: var(--fw-t-meta-2); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 9px 15px;
  border-radius: 999px; border: 1px solid var(--fw-line);
  background: var(--fw-card2); color: var(--fw-ink-2);
  transition: color var(--mo-fast), border-color var(--mo-fast), background var(--mo-fast);
}
.ml-scope .ml-btn:hover { color: var(--fw-ink); border-color: var(--fw-blue-line); }
.ml-scope .ml-btn.is-key {
  background: var(--fw-blue); border-color: var(--fw-blue); color: var(--fw-on-blue);
}
.ml-scope .ml-btn.is-key:hover { background: var(--fw-blue-2); border-color: var(--fw-blue-2); }

.ml-privacy {
  margin: 0 0 1rem; padding: 0.7rem 0.9rem;
  border: 1px solid var(--fw-blue-line); border-left-width: 3px;
  border-radius: 12px; background: var(--fw-blue-soft);
  font-size: var(--fw-t-s); line-height: 1.6; color: var(--fw-ink-2);
}
.ml-privacy b { color: var(--fw-ink); }

.ml-said {
  display: block; margin: 0.6rem 0 0; font-family: var(--fw-mono);
  font-size: var(--fw-t-meta-2); line-height: 1.55; color: var(--fw-ink-2);
}
.ml-said[data-kind="warn"] { color: var(--fw-down); }

.ml-statusline {
  margin: 0.7rem 0 0; font-family: var(--fw-mono); font-size: var(--fw-t-meta-2);
  color: var(--fw-muted); line-height: 1.55;
}
.ml-storage {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0.7rem 0 0; padding: 0.7rem 0.8rem;
  border: 1px solid var(--fw-line); border-radius: 12px; background: var(--fw-card2);
}
.ml-storage[data-state="saved"] { border-color: var(--fw-blue-line); background: var(--fw-blue-soft); }
.ml-storage[data-state="unsaved"], .ml-storage[data-state="invalid"] { border-style: dashed; border-color: var(--fw-blue); }
.ml-storage > p {
  flex: 1 1 240px; margin: 0; font-family: var(--fw-mono);
  font-size: var(--fw-t-meta-2); line-height: 1.55; color: var(--fw-ink-2);
}
.ml-storage-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.ml-storage .ml-btn { padding: 7px 11px; }

/* unresolved names */
.ml-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.5rem; }
/* A removable chip. Deliberately NOT coral: on this desk coral means behind
   the market, and an unresolved name or a trade pick is neither ahead nor
   behind anything. It reads as ink on the card, with a dashed edge saying it
   still wants a decision. */
.ml-scope .ml-unchip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--fw-mono); font-size: var(--fw-t-meta-2); font-weight: 700;
  padding: 5px 10px; border-radius: 999px;
  border: 1px dashed var(--fw-line); background: var(--fw-card2); color: var(--fw-ink-2);
}
.ml-scope .ml-unchip:hover { border-color: var(--fw-blue-line); color: var(--fw-ink); }
.ml-scope .ml-unchip .x { opacity: 0.75; }
.ml-picked .ml-unchip { border-style: solid; }
.ml-fix {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 0.7rem; padding: 0.7rem 0.8rem;
  border: 1px solid var(--fw-line); border-radius: 12px; background: var(--fw-card2);
}
.ml-fix .ml-input { flex: 1 1 200px; }
.ml-hits { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.ml-scope .ml-hit {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--fw-sans); font-size: var(--fw-t-s); font-weight: 700;
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--fw-line); background: var(--fw-card); color: var(--fw-ink);
}
.ml-scope .ml-hit:hover { border-color: var(--fw-blue-line); color: var(--fw-blue); }
.ml-scope .ml-hit .s {
  font-family: var(--fw-mono); font-size: var(--fw-t-micro); font-weight: 600;
  color: var(--fw-muted); letter-spacing: 0.06em; text-transform: uppercase;
}

/* =============================================================================
   ROSTER SLOTS + POSITION COUNTS
   ============================================================================= */
.ml-slots { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ml-slot { display: flex; flex-direction: column; gap: 4px; }
.ml-slot > span {
  font-family: var(--fw-mono); font-size: var(--fw-t-micro); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fw-muted);
}
.ml-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0.9rem 0 0; }
.ml-count {
  border: 1px solid var(--fw-line); border-radius: 12px; background: var(--fw-card);
  padding: 7px 12px; min-width: 78px; text-align: center;
}
.ml-count b {
  display: block; font-family: var(--fw-mono); font-size: 1.05rem; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--fw-ink); line-height: 1.2;
}
.ml-count span {
  display: block; font-family: var(--fw-mono); font-size: var(--fw-t-micro);
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--fw-muted); margin-top: 2px;
}
.ml-count.is-short { border-color: var(--fw-down); }
.ml-count.is-short b { color: var(--fw-down); }
.ml-count.is-deep { border-color: var(--fw-up); }
.ml-count.is-deep b { color: var(--fw-up); }

/* =============================================================================
   THE BOARDS — roster and free agents share one row grammar
   ============================================================================= */
.ml-boardwrap {
  border: 1px solid var(--fw-line); border-radius: 14px;
  background: var(--fw-card); overflow: hidden;
}
.ml-board { display: flex; flex-direction: column; }
.ml-row {
  display: grid; align-items: center; gap: 10px;
  grid-template-columns: 46px minmax(0, 1.9fr) 78px 88px 62px 62px minmax(0, 1.5fr) 52px;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--fw-hair);
}
.ml-row:last-child { border-bottom: 0; }
.ml-row.is-head {
  background: var(--fw-card2);
  font-family: var(--fw-mono); font-size: var(--fw-t-micro); font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--fw-muted);
  border-bottom: 1px solid var(--fw-line);
}
.ml-row:not(.is-head):hover { background: var(--fw-card2); }
/* On a wide screen the figure wrapper disappears and its four children become
   real columns of the row grid. On a phone it becomes a wrapped strip. */
.ml-row > .c-figs { display: contents; }
.ml-row > .c-rank {
  font-family: var(--fw-mono); font-size: 1.02rem; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--fw-ink);
}
.ml-row.is-head > .c-rank { font-size: var(--fw-t-micro); color: var(--fw-muted); }
.ml-row > .c-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ml-row > .c-who .nm { min-width: 0; }
.ml-row > .c-who b {
  display: block; font-size: var(--fw-t-b); color: var(--fw-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ml-row > .c-who .sub {
  display: block; font-family: var(--fw-mono); font-size: var(--fw-t-micro);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fw-muted);
}
.ml-row > .c-fig {
  font-family: var(--fw-mono); font-size: var(--fw-t-s); font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--fw-ink-2); text-align: right;
}
.ml-row.is-head > .c-fig { font-size: var(--fw-t-micro); font-weight: 700; color: var(--fw-muted); }
.ml-row > .c-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ml-row > .c-act { text-align: right; }
.ml-scope .ml-x {
  font-family: var(--fw-mono); font-size: 1rem; font-weight: 700; line-height: 1;
  width: 26px; height: 26px; border-radius: 999px;
  border: 1px solid var(--fw-line); color: var(--fw-muted); background: var(--fw-card2);
}
.ml-scope .ml-x:hover { color: var(--fw-down); border-color: var(--fw-down); }
.ml-scope .ml-add {
  font-family: var(--fw-mono); font-size: var(--fw-t-micro); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 10px;
  border-radius: 999px; border: 1px solid var(--fw-line);
  background: var(--fw-card2); color: var(--fw-ink-2);
}
.ml-scope .ml-add:hover { color: var(--fw-blue); border-color: var(--fw-blue-line); }

/* best-available shelves */
.ml-shelves { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); }
.ml-shelf {
  border: 1px solid var(--fw-line); border-radius: 14px;
  background: var(--fw-card); padding: 0.8rem 0.85rem 0.85rem;
}
.ml-shelfrow {
  display: flex; align-items: center; gap: 8px;
  padding: 0.4rem 0; border-top: 1px solid var(--fw-hair); min-width: 0;
}
.ml-shelfrow:first-of-type { border-top: 0; }
.ml-shelfrow .nm { min-width: 0; }
.ml-shelfrow b {
  display: block; font-size: var(--fw-t-s); color: var(--fw-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ml-shelfrow .sub {
  display: block; font-family: var(--fw-mono); font-size: var(--fw-t-micro);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--fw-muted);
}

/* =============================================================================
   TRADE CHECK — two columns of figures. No verdict, no composite, ever.
   ============================================================================= */
.ml-trade { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; align-items: start; }
.ml-tpick {
  border: 1px solid var(--fw-line); border-radius: 14px;
  background: var(--fw-card); padding: 0.85rem 0.9rem;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.ml-tpick > .ml-input { flex: 1 1 100%; }
.ml-picked { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.ml-tsides { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin-top: 1rem; }
.ml-tside {
  border: 1px solid var(--fw-line); border-radius: 14px;
  background: var(--fw-card); padding: 0.9rem 0.95rem;
}
.ml-tlines { margin: 0.5rem 0 0.8rem; }
.ml-tline {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 0.32rem 0; border-top: 1px solid var(--fw-hair);
}
.ml-tline:first-child { border-top: 0; }
.ml-tline .n { font-size: var(--fw-t-s); color: var(--fw-ink); min-width: 0; }
.ml-tline .v {
  font-family: var(--fw-mono); font-size: var(--fw-t-meta-2); font-weight: 700;
  color: var(--fw-muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ml-tfigs { display: flex; flex-wrap: wrap; gap: 8px; }
.ml-tfigs .f {
  border: 1px solid var(--fw-line); border-radius: 11px; background: var(--fw-card2);
  padding: 7px 11px; min-width: 76px;
}
.ml-tfigs .f b {
  display: block; font-family: var(--fw-mono); font-size: 1.02rem; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--fw-ink); line-height: 1.2;
}
.ml-tfigs .f span {
  display: block; font-family: var(--fw-mono); font-size: var(--fw-t-micro);
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--fw-muted); margin-top: 2px;
}

/* =============================================================================
   MOBILE — under 760px every board row is a card and nothing scrolls sideways.

   The four figures live inside .c-figs. On a wide screen that wrapper is
   display:contents so the figures are real grid columns of the row; on a phone
   it becomes one wrapped flex strip occupying a single grid cell, and each
   figure grows the label its data-k carries.
   ============================================================================= */
@media (max-width: 760px) {
  .ml-storage { align-items: stretch; flex-direction: column; }
  .ml-storage > p { flex-basis: auto; }
  .ml-storage-actions { justify-content: flex-start; }
  .ml-storage .ml-btn { min-height: 42px; }
  .ml-row.is-head { display: none; }
  .ml-board { gap: 8px; padding: 0; }
  .ml-boardwrap { border: 0; background: none; overflow: visible; }
  .ml-row {
    grid-template-columns: 38px minmax(0, 1fr) 34px;
    grid-template-areas:
      "rank who  act"
      "figs figs figs"
      "chips chips chips";
    row-gap: 8px; column-gap: 8px; padding: 0.7rem 0.75rem;
    border: 1px solid var(--fw-line); border-radius: 13px; background: var(--fw-card);
  }
  .ml-row > .c-rank { grid-area: rank; }
  .ml-row > .c-who { grid-area: who; }
  .ml-row > .c-act { grid-area: act; }
  .ml-row > .c-chips { grid-area: chips; }
  .ml-row > .c-figs {
    grid-area: figs; display: flex; flex-wrap: wrap; gap: 5px 14px;
    border-top: 1px solid var(--fw-hair); padding-top: 7px;
  }
  .ml-row > .c-figs > .c-fig {
    display: inline-flex; align-items: baseline; gap: 5px; text-align: left;
  }
  .ml-row > .c-figs > .c-fig::before {
    content: attr(data-k);
    font-family: var(--fw-mono); font-size: var(--fw-t-micro); font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--fw-muted);
  }
  .ml-trade, .ml-tsides, .ml-doors { grid-template-columns: 1fr; }
}

@media print {
  header.site-nav, nav.rdesk, .fh-hubrail, .ml-doors, .ml-privacy, .ml-controls,
  .ml-slots, .ml-said, .ml-fix, .hi-foot, .ml-scope .ml-x, .ml-scope .ml-add,
  .ml-tpick, #mlPrintRow { display: none !important; }
  .ml-boardwrap { border: 1px solid #999; }
  .ml-row { break-inside: avoid; }
  .fh-hero-band { background: none !important; color: #000 !important; border-color: #999 !important; }
  .fh-hero-title, .fh-hero-thesis, .fh-hero-issue { color: #000 !important; }
  .fh-hero-facts .f { border-color: #999 !important; }
  .fh-hero-facts .f b, .fh-hero-facts .f span { color: #000 !important; }
}
