/* The /stacks/ page in JM's look (Aaron, 2026-10-15).
 *
 * "With stacks, I think you should also look to change it along with this
 * week ... that includes contest optimizer and late swap. All the
 * functionality stays the same, but the design, the way that we have for
 * StatFinder and sportsbook implied, I think that's the style we want to go
 * with moving forward."
 *
 * A layer over stacks.css, late-swap.css, leverage-page.css and the Contest
 * Optimizer's own sheet — none of which is edited. It only loads when the
 * `ows_stacks_look` option says `jm`, and every rule hangs off the body class
 * that goes with it, so turning the option back to `classic` is the whole
 * rollback.
 *
 * Most of the work is done by the tokens: every one of those sheets draws its
 * colours and type from the same custom properties, so pointing them at JM's
 * palette and at Archivo restyles the bulk of the page at once. What follows
 * the tokens is the shapes — JM's tabs, switches, card and table — and the
 * sizes, because Archivo Black is far wider than the condensed Knockout these
 * sizes were set for.
 */

/* ---- tokens: JM's palette and type ------------------------------------ */
body.stx-look-jm #ows-stacks,
body.stx-look-jm #ows-stacks #ows-cf {
  --page: #fbf9f6;
  --surface: #f3efe8;
  --line: rgba(22, 19, 15, .13);
  --rule-2: rgba(22, 19, 15, .22);
  --ink: #16130f;
  --muted: #5c5348;
  --orange: #ff7a00;
  --orange-dark: #c95f00;
  --hit: #fdeee6;
  --display: "Archivo Black", Archivo, "Helvetica Neue", Arial, sans-serif;
  --sans: Archivo, "Helvetica Neue", Arial, sans-serif;
  --ui: Archivo, "Helvetica Neue", Arial, sans-serif;
  --jm-ink-3: #948a7c;
  --jm-card-bg:
    radial-gradient(80% 60% at 100% 0%, rgba(255, 122, 0, .08) 0%, transparent 60%),
    radial-gradient(70% 50% at 0% 100%, rgba(43, 108, 176, .07) 0%, transparent 60%),
    linear-gradient(158deg, #fbf9f6 0%, #f3efe8 100%);
  font-variant-numeric: tabular-nums;
}
/* The leverage board keeps its own token names. */
body.stx-look-jm #ows-stacks .ows-lev-standalone {
  --lev-ink: #16130f;
  --lev-mute: #948a7c;
  --lev-rule: rgba(22, 19, 15, .13);
  --ows-orange: #ff7a00;
}
body.stx-look-jm #ows-stacks,
body.stx-look-jm #ows-stacks button,
body.stx-look-jm #ows-stacks input,
body.stx-look-jm #ows-stacks select { font-family: var(--ui); }

/* Headings and big numbers were sized for a condensed face. Archivo Black is
   wider and heavier, so it comes down a step everywhere it is used. */
body.stx-look-jm #ows-stacks h2,
body.stx-look-jm #ows-stacks h3 { letter-spacing: -.01em !important; }

/* ---- the tab bar: JM's tabs, one size up ------------------------------ */
body.stx-look-jm #ows-stacks .stx-tabs {
  flex-wrap: wrap; gap: 4px; margin-bottom: 0; border-bottom: 2px solid var(--ink);
}
/* Eight tools have to fit one row at 1100px, so a hair under JM's 14px. */
body.stx-look-jm #ows-stacks .stx-tab {
  padding: 10px 10px 9px; border: 0; border-radius: 3px 3px 0 0; background: transparent;
  font: 700 12px/1.2 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--jm-ink-3);
}
body.stx-look-jm #ows-stacks .stx-tab:hover { color: var(--ink); }
body.stx-look-jm #ows-stacks .stx-tab.is-active,
body.stx-look-jm #ows-stacks .stx-tab.is-child-active {
  background: var(--ink); color: #fff; border: 0;
}
/* The locks on the paid tabs, and the "$1 This week" pill, for anyone they are
   locked to (Aaron, 2026-10-15: "we still have the lock buttons over Bink
   Machine and Cascading Projections"). Inline, the two pills pushed the row
   210px past 1100 and Contest Optimizer and Late Swap wrapped; on a small
   second line under the tab's name the row fits (measured 1054px). */
body.stx-look-jm #ows-stacks .stx-tabs { align-items: flex-end; }
body.stx-look-jm #ows-stacks .stx-tab-premium .stx-tab-lock {
  display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 3px; white-space: nowrap;
}
body.stx-look-jm #ows-stacks .stx-tab-premium .stx-tab-pill { margin-left: 0; padding: 2px 6px 3px; font-size: 9px; letter-spacing: .03em; }
body.stx-look-jm #ows-stacks .stx-tab-premium .stx-tab-price { font-size: 11px; margin-right: 3px; }
body.stx-look-jm #ows-stacks .stx-tab-premium i { font-size: 11px; }

/* ---- the second row inside a tab: JM's slate buttons ------------------ */
body.stx-look-jm #ows-stacks .stx-mergednav { gap: 6px; margin: 18px 0 14px; }
body.stx-look-jm #ows-stacks .stx-mergednav-btn {
  padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 4px; background: transparent;
  font: 700 14px/1.2 var(--sans); color: var(--ink);
}
body.stx-look-jm #ows-stacks .stx-mergednav-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
body.stx-look-jm #ows-stacks .stx-mergednav-note { font: 400 14px/1.45 var(--sans); color: var(--muted); }

/* ---- each tool sits in JM's card ---------------------------------------
   Not Stat Finder (it builds its own) and not JM's widgets (they bring theirs). */
body.stx-look-jm #ows-stacks #stx-panel-stacks,
body.stx-look-jm #ows-stacks #stx-panel-heat,
body.stx-look-jm #ows-stacks #stx-panel-teams,
body.stx-look-jm #ows-stacks #stx-panel-weekly,
body.stx-look-jm #ows-stacks #stx-panel-leverage,
body.stx-look-jm #ows-stacks #stx-panel-lateswap,
body.stx-look-jm #ows-stacks #stx-panel-finder {
  margin-top: 0; padding: 4px 30px 26px;
  border: 1px solid rgba(22, 19, 15, .10); border-top: 0; border-radius: 0 0 2px 2px;
  background: var(--jm-card-bg); box-shadow: 0 18px 50px -18px rgba(22, 19, 15, .35);
}
body.stx-look-jm #ows-stacks .stx-panel[hidden] { display: none !important; }

/* ---- control boxes: no beige box, JM's loose row ----------------------- */
body.stx-look-jm #ows-stacks .stx-controls {
  padding: 4px 0 6px; border: 0; border-top: 0; background: transparent; box-shadow: none;
}
body.stx-look-jm #ows-stacks .stx-label,
body.stx-look-jm #ows-stacks .cf-label,
body.stx-look-jm #ows-stacks .ls-label {
  font: 700 12px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--jm-ink-3);
}
body.stx-look-jm #ows-stacks .stx-kicker,
body.stx-look-jm #ows-stacks .cf-kicker {
  font: 700 12px/1.2 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--orange);
}

/* Fields: JM's thin-bordered inputs. */
body.stx-look-jm #ows-stacks select,
body.stx-look-jm #ows-stacks input[type="text"],
body.stx-look-jm #ows-stacks input[type="search"],
body.stx-look-jm #ows-stacks input[type="number"],
body.stx-look-jm #ows-stacks .cf-sel,
body.stx-look-jm #ows-stacks .cf-money {
  border: 1.5px solid rgba(22, 19, 15, .35); border-radius: 4px; background: #fff; box-shadow: none;
  font-family: var(--sans); color: var(--ink);
}
body.stx-look-jm #ows-stacks select { padding: 7px 9px; font-size: 14px; }
body.stx-look-jm #ows-stacks select:focus,
body.stx-look-jm #ows-stacks input:focus,
body.stx-look-jm #ows-stacks .cf-sel:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: rgba(22, 19, 15, .35); box-shadow: none; }
body.stx-look-jm #ows-stacks .stx-check,
body.stx-look-jm #ows-stacks label.cf-check {
  font: 600 13px/1.3 var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted);
}
body.stx-look-jm #ows-stacks input[type="checkbox"],
body.stx-look-jm #ows-stacks input[type="radio"] { accent-color: var(--orange); }

/* ---- switches: JM's segmented control ---------------------------------- */
body.stx-look-jm #ows-stacks .stx-notdseg,
body.stx-look-jm #ows-stacks .stx-platseg,
body.stx-look-jm #ows-stacks .stx-wkseg {
  display: inline-flex; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; background: transparent;
}
body.stx-look-jm #ows-stacks .stx-notdseg button,
body.stx-look-jm #ows-stacks .stx-platseg button,
body.stx-look-jm #ows-stacks .stx-wkseg button {
  padding: 6px 11px; border: 0; border-right: 0; border-radius: 0; background: transparent; box-shadow: none;
  font: 700 14px/1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink);
}
body.stx-look-jm #ows-stacks .stx-notdseg button + button,
body.stx-look-jm #ows-stacks .stx-platseg button + button,
body.stx-look-jm #ows-stacks .stx-wkseg button + button { border-left: 1.5px solid var(--ink); }
body.stx-look-jm #ows-stacks .stx-notdseg button.is-active,
body.stx-look-jm #ows-stacks .stx-platseg button.is-active,
body.stx-look-jm #ows-stacks .stx-platseg button[aria-pressed="true"],
body.stx-look-jm #ows-stacks .stx-wkseg button.is-active,
body.stx-look-jm #ows-stacks .stx-wkseg button[aria-pressed="true"] { background: var(--orange); color: #fff; }
body.stx-look-jm #ows-stacks .stx-notdseg button:hover:not(.is-active) { background: rgba(255, 122, 0, .06); }
/* A switch is as wide as its buttons. In a column of controls (Heat) the
   column stretched them into a bar across the whole card (Aaron, 2026-10-16:
   "we don't need the long rectangle bar"). Phones keep stacks.css's full width. */
@media (min-width: 601px) {
  body.stx-look-jm #ows-stacks .stx-notdseg,
  body.stx-look-jm #ows-stacks .stx-platseg,
  body.stx-look-jm #ows-stacks .stx-wkseg { width: auto; max-width: max-content; align-self: flex-start; }
}
/* The toolkit's one rule for "selected" (2026-10-15), by shape: every boxed
   switch is ORANGE when pressed; only tabs (the bar, the row under it, the
   pill sub-tabs, a widget's tab row) are black. */

/* The sub-tabs inside Concentrated Offenses and Late Swap: JM's slate buttons. */
body.stx-look-jm #ows-stacks .stx-subtab {
  padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 4px; background: transparent;
  font: 700 14px/1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink);
}
/* Pressed = ORANGE, like every other option button (2026-10-15 uniformity
   rule: options orange, only tab rows black). These are Late Swap's site and
   stance choices and Concentrated Offenses' Teams | Players. */
body.stx-look-jm #ows-stacks .stx-subtab.is-active,
body.stx-look-jm #ows-stacks .stx-subtab[aria-pressed="true"] { background: var(--orange); color: #fff; border-color: var(--orange); }

/* Chips (position filters and the like): JM's squared buttons, sentence case. */
body.stx-look-jm #ows-stacks .stx-chip-btn {
  padding: 6px 11px; border: 1.5px solid rgba(22, 19, 15, .25); border-radius: 4px; background: #fff;
  font: 700 13px/1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink);
}
body.stx-look-jm #ows-stacks .stx-chip-btn:hover { border-color: var(--ink); }
body.stx-look-jm #ows-stacks .stx-chip-btn.is-active { border-color: var(--orange); background: var(--orange); color: #fff; }
body.stx-look-jm #ows-stacks .stx-chip-btn.is-active * { color: inherit; }
/* Secondary actions: JM's ghost button. */
body.stx-look-jm #ows-stacks .ls-addbtn,
body.stx-look-jm #ows-stacks .ls-clearbtn,
body.stx-look-jm #ows-stacks .stx-ghost,
body.stx-look-jm #ows-stacks .stx-secondary {
  padding: 7px 12px; border: 1.5px solid var(--ink); border-radius: 4px; background: transparent; box-shadow: none;
  font: 700 14px/1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink);
}

/* ---- buttons ------------------------------------------------------------ */
body.stx-look-jm #ows-stacks .stx-primary,
body.stx-look-jm #ows-stacks .cf-btn {
  border: 1.5px solid var(--orange); border-radius: 4px; background: var(--orange); color: #fff !important;
  box-shadow: none; font: 700 16px/1.2 var(--sans); letter-spacing: 0;
}
body.stx-look-jm #ows-stacks .stx-primary:hover:not(:disabled) { background: var(--orange-dark); border-color: var(--orange-dark); }
body.stx-look-jm #ows-stacks .stx-open { padding: 9px 14px; font-size: 14px; }
body.stx-look-jm #ows-stacks .stx-open:disabled { background: var(--jm-ink-3); border-color: var(--jm-ink-3); opacity: .55; }

/* ---- tables: JM's ------------------------------------------------------- */
body.stx-look-jm #ows-stacks .stx-table {
  border-collapse: separate; border-spacing: 0; font: 400 14px/1.35 var(--sans); font-variant-numeric: tabular-nums;
}
body.stx-look-jm #ows-stacks .stx-table th {
  padding: 0 7px 6px; border-bottom: 1px solid var(--line);
  font: 700 11px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--jm-ink-3);
}
body.stx-look-jm #ows-stacks .stx-table th small { font: 500 11px/1.2 var(--sans); letter-spacing: 0; color: var(--jm-ink-3); }
body.stx-look-jm #ows-stacks .stx-table td { padding: 7px; border-bottom: 1px solid var(--line); background: #fffdfb; }
body.stx-look-jm #ows-stacks .stx-table tbody tr:nth-child(even) td { background: #f8f5f0; }
body.stx-look-jm #ows-stacks .stx-table tbody tr:hover td { background: #fdeee6; }
body.stx-look-jm #ows-stacks .stx-table td b { font: 700 15px/1.25 var(--sans); }
body.stx-look-jm #ows-stacks .stx-table td small { font: 500 12px/1.3 var(--sans); color: var(--jm-ink-3); }

/* ---- headings and big figures ------------------------------------------ */
body.stx-look-jm #ows-stacks .stx-title,
body.stx-look-jm #ows-stacks .cf-title { font-size: clamp(30px, 4.4vw, 46px) !important; line-height: 1.02; letter-spacing: -.02em; }
body.stx-look-jm #ows-stacks .stx-notd-lede h2,
body.stx-look-jm #ows-stacks .cf-h2,
body.stx-look-jm #ows-stacks .stx-panel > h2,
body.stx-look-jm #ows-stacks .stx-section h2,
body.stx-look-jm #ows-stacks .stx-wk-head h2 {
  font-family: var(--display) !important; font-size: clamp(22px, 3vw, 30px) !important; line-height: 1.08 !important;
}
body.stx-look-jm #ows-stacks .stx-intro,
body.stx-look-jm #ows-stacks .cf-intro { font: 400 15px/1.45 var(--sans); color: var(--muted); }
body.stx-look-jm #ows-stacks .stx-notd-note,
body.stx-look-jm #ows-stacks .stx-note,
body.stx-look-jm #ows-stacks .stx-muted { font-family: var(--sans); }

/* JM keeps Archivo Black for headlines and big figures only. Names, cells,
   sub-heads and the bold bits of a sentence are plain Archivo, bold — they
   were Knockout-Heavy, which at 15–20px read as a condensed bold, and Archivo
   Black at the same size is a slab. Measured on the page: 107 cells on This
   Week alone were set in it. */
body.stx-look-jm #ows-stacks b,
body.stx-look-jm #ows-stacks strong,
body.stx-look-jm #ows-stacks td,
body.stx-look-jm #ows-stacks th,
body.stx-look-jm #ows-stacks .stx-ex-lead,
body.stx-look-jm #ows-stacks #ows-cf h4 { font-family: var(--sans) !important; }
body.stx-look-jm #ows-stacks b,
body.stx-look-jm #ows-stacks strong,
body.stx-look-jm #ows-stacks .stx-ex-lead { font-weight: 800; letter-spacing: -.005em; }
body.stx-look-jm #ows-stacks td.stx-wk-n { font-weight: 700; }
body.stx-look-jm #ows-stacks th { font-weight: 700; }
body.stx-look-jm #ows-stacks h3,
body.stx-look-jm #ows-stacks #ows-cf h4 {
  font-family: var(--sans) !important; font-weight: 800 !important; text-transform: none !important;
  letter-spacing: -.005em !important; font-size: 18px !important; line-height: 1.2 !important;
}
/* Section headlines in JM's sentence case. */
body.stx-look-jm #ows-stacks h2 { text-transform: none !important; }

/* Status lines: no orange slab, a quiet line. */
body.stx-look-jm #ows-stacks .stx-status {
  border: 0; border-left: 3px solid var(--orange); background: rgba(255, 122, 0, .05);
  font: 600 14px/1.4 var(--sans); color: var(--muted);
}

/* ---- Stacks' one-click examples: JM's light card, not a black slab ------ */
body.stx-look-jm #ows-stacks .stx-ex {
  border: 1.5px solid rgba(22, 19, 15, .25); border-radius: 4px; background: #fff; box-shadow: none;
}
body.stx-look-jm #ows-stacks .stx-ex:hover { border-color: var(--orange); background: rgba(255, 122, 0, .05); }

/* ---- Leverage & Pivots: two figures hard-code Knockout ------------------- */
body.stx-look-jm #ows-stacks .ows-lev-standalone .lev-anchor-own,
body.stx-look-jm #ows-stacks .ows-lev-standalone .lev-own b {
  font-family: var(--sans) !important; font-weight: 800; letter-spacing: -.01em;
}

/* ---- Contest Optimizer -------------------------------------------------
   Its own plugin, same tokens. JM's controls are sentence case and square-ish,
   so the shouty uppercase pills and buttons come down to his. */
body.stx-look-jm #ows-stacks #ows-cf .cf-tabs { padding: 0; border: 0; border-bottom: 2px solid var(--ink); background: var(--page); gap: 4px; }
/* The theme pins link colour, so the active tab keeps the plugin's own answer —
   a light ground and an orange underline — rather than white on black. */
body.stx-look-jm #ows-stacks #ows-cf .cf-tabs a {
  flex: 0 0 auto; padding: 9px 14px 7px; border-bottom-width: 3px;
  font: 700 14px/1.2 var(--sans); letter-spacing: 0; text-transform: none;
}
/* Black when selected — it chooses a section, so it follows the toolkit's
   rule. Two ids and !important to get past the theme's pinned link colour. */
body.stx-look-jm #ows-stacks #ows-cf .cf-tabs a.is-here { background: var(--ink); border-bottom-color: var(--ink); color: #fff !important; }
body.stx-look-jm #ows-stacks #ows-cf .cf-tabs a.is-here .cf-tab-n { background: rgba(255, 255, 255, .25); color: #fff; }
body.stx-look-jm #ows-stacks #ows-cf .cf-ck {
  padding: 6px 11px; border: 1.5px solid rgba(22, 19, 15, .25); border-radius: 4px; background: #fff;
  font: 600 13px/1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink);
}
body.stx-look-jm #ows-stacks #ows-cf .cf-ck:hover { border-color: var(--ink); }
body.stx-look-jm #ows-stacks #ows-cf .cf-ck.is-on { border-color: var(--orange); background: rgba(255, 122, 0, .08); color: var(--orange-dark); }
body.stx-look-jm #ows-stacks #ows-cf .cf-btn {
  padding: 8px 14px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--ink); color: #fff !important;
  font: 700 14px/1.2 var(--sans); letter-spacing: 0; text-transform: none;
}
body.stx-look-jm #ows-stacks #ows-cf .cf-btn-ghost { background: transparent; color: var(--ink) !important; }
body.stx-look-jm #ows-stacks #ows-cf .cf-sec-clear { padding: 5px 10px !important; font-size: 13px !important; }
body.stx-look-jm #ows-stacks #ows-cf .cf-mini {
  padding: 5px 10px; border: 1.5px solid var(--ink); border-radius: 4px; background: transparent;
  font: 700 13px/1.2 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink);
}
/* Folded (the default now), Expand is the way in — a filled button. */
body.stx-look-jm #ows-stacks #ows-cf .is-min .cf-mini { background: var(--ink); color: #fff; }
body.stx-look-jm #ows-stacks #ows-cf .cf-sec-lede { font: 400 15px/1.45 var(--sans); color: var(--muted); }
/* "+ How to use it" and the other fold-outs: JM's orange "+ How these are built". */
body.stx-look-jm #ows-stacks details > summary {
  font: 700 14px/1.3 var(--sans) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--orange-dark) !important;
}
body.stx-look-jm #ows-stacks #ows-cf .cf-plan { border-width: 1px; border-color: var(--line); }
body.stx-look-jm #ows-stacks #ows-cf .cf-table th {
  font: 700 11px/1.2 var(--sans); letter-spacing: .08em; color: var(--jm-ink-3); background: transparent; border-bottom: 1px solid var(--line);
}
body.stx-look-jm #ows-stacks #ows-cf .cf-table tfoot td { border-top: 1.5px solid var(--ink); background: transparent; }

/* Licence line. */
body.stx-look-jm #ows-stacks .stx-credit { font: 400 12px/1.5 var(--sans); }

@media (max-width: 640px) {
  body.stx-look-jm #ows-stacks .stx-tab { padding: 9px 9px 8px; font-size: 11.5px; letter-spacing: .03em; }
  body.stx-look-jm #ows-stacks #stx-panel-stacks,
  body.stx-look-jm #ows-stacks #stx-panel-heat,
  body.stx-look-jm #ows-stacks #stx-panel-teams,
  body.stx-look-jm #ows-stacks #stx-panel-weekly,
  body.stx-look-jm #ows-stacks #stx-panel-leverage,
  body.stx-look-jm #ows-stacks #stx-panel-lateswap,
  body.stx-look-jm #ows-stacks #stx-panel-finder { padding: 4px 14px 18px; }
}
