/* Moneyball Fantasy Football Lab -- TheFFCalc GUI
   Steam depth (steel-navy grounds, gradient panels, one glowing accent) meets Sleeper chips
   (position-coloured player rows, bottom tab bar on phones). Deliberately single-theme dark. */
:root {
  --bg0: #0d1118;                 /* page ground */
  --bg1: #141a25;                 /* top bar, rail */
  --bg2: #1a2231;                 /* panels */
  --bg3: #222c3d;                 /* rows, inputs, sub-panels */
  --bg4: #2c384c;                 /* hover */
  --line: rgba(128, 168, 220, 0.14);
  --line-strong: rgba(128, 168, 220, 0.28);
  --text: #e8eef7;
  --dim: #9aa8bd;
  --faint: #66748a;
  --accent: #66c0f4;              /* steam blue: primary actions, selection, the favoured side */
  --accent-ink: #061a2a;
  --accent-glow: rgba(102, 192, 244, 0.28);
  --mint: #00d1b2;                /* good / win / lab */
  --mint-ink: #04241f;
  --amber: #f5b74a;               /* warn / slight edge / S tier */
  --rose: #ff4d6d;                /* bad / injury / lopsided */
  --violet: #8b7cff;              /* flex slots */
  --qb: #ff3d7f; --rb: #00d1b2; --wr: #4fa8ff; --te: #ffa94d; --k: #b57bff; --dst: #b39466;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Sora", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --radius: 12px; --radius-sm: 8px;
  --rail: 76px; --topbar: 58px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  /* aliases kept for older inline styles */
  --turf: var(--bg0); --turf-2: var(--bg2); --turf-3: var(--bg3);
  --chalk: var(--text); --chalk-dim: var(--dim); --chalk-faint: var(--faint);
  --marigold: var(--accent); --marigold-ink: var(--accent-ink); --sky: var(--accent); --ember: var(--rose);
  --tier-s: var(--amber); --tier-a: var(--mint); --tier-b: var(--accent); --tier-c: #8ea3bd; --tier-d: #55637a;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg0);
  background-image:
    radial-gradient(1200px 500px at 15% -10%, rgba(102, 192, 244, 0.10), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(0, 209, 178, 0.07), transparent 60%);
  background-attachment: fixed;
  color: var(--text); font-family: var(--body); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); letter-spacing: 0.005em; margin: 0; }
h1 { font-size: 2.1rem; font-weight: 700; line-height: 1; }
h2 { font-size: 1.35rem; font-weight: 600; line-height: 1.1; }
h3 { font-size: 0.78rem; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--body); }
p { margin: 0 0 0.75rem; max-width: 70ch; }
code { font-family: var(--display); font-size: 1.05em; background: var(--bg3); padding: 0.05em 0.4em; border-radius: 5px; color: var(--accent); }
a { color: var(--accent); }
[hidden] { display: none !important; }
.visually-hidden, .skip { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.skip:focus { left: 1rem; top: 1rem; width: auto; height: auto; background: var(--accent); color: var(--accent-ink); padding: 0.5rem; z-index: 60; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--dim); }
.eyebrow { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); font-weight: 600; margin: 0; }

/* ---------------------------------------------------------------- controls */
button, input, select { font: inherit; color: inherit; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.55rem 1rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.85rem; cursor: pointer;
  background: linear-gradient(180deg, #7fd0ff 0%, #4fa8e6 100%); color: var(--accent-ink); border: 1px solid transparent;
  box-shadow: 0 0 0 1px rgba(102, 192, 244, 0.35), 0 6px 18px -6px var(--accent-glow);
  transition: filter 0.15s, transform 0.08s, background 0.15s, border-color 0.15s;
}
button:hover { filter: brightness(1.06); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.5; cursor: default; filter: none; }
button.ghost { background: var(--bg3); color: var(--text); border-color: var(--line); box-shadow: none; }
button.ghost:hover { background: var(--bg4); border-color: var(--line-strong); filter: none; }
button.small { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
input, select {
  background: var(--bg3); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem; min-width: 0;
}
input::placeholder { color: var(--faint); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 2rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.control { display: flex; flex-direction: column; gap: 0.25rem; }
.control > span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); font-weight: 600; }
.control select { padding-top: 0.4rem; padding-bottom: 0.4rem; }
.control-inline { flex-direction: row; align-items: center; gap: 0.5rem; }

/* ------------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
.topbar {
  grid-column: 1 / -1; position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center;
  padding: 0.6rem 1.1rem; min-height: var(--topbar);
  background: rgba(20, 26, 37, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark { display: flex; align-items: center; gap: 0.6rem; line-height: 1; }
.wordmark-badge {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, #66c0f4, #00d1b2); color: #06131c;
  font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em;
}
.wordmark-main { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.01em; display: block; }
.wordmark-sub { font-size: 0.66rem; color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-top: 0.15rem; }
.league-form { display: flex; gap: 0.5rem; max-width: 520px; width: 100%; justify-self: center; }
.league-form input { flex: 1; font-size: 0.95rem; }
.session { display: flex; gap: 0.5rem; align-items: center; }
.lab-btn {
  background: var(--bg3); color: var(--text); border: 1px solid var(--line); box-shadow: none;
  padding: 0.45rem 0.85rem; border-radius: 999px; font-size: 0.8rem;
}
.lab-btn:hover { filter: none; background: var(--bg4); border-color: var(--line-strong); }
.lab-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04); }
.lab-btn.is-unlocked { color: var(--mint); border-color: rgba(0, 209, 178, 0.45); }
.lab-btn.is-unlocked .dot { background: var(--mint); box-shadow: 0 0 10px var(--mint); }

/* rail: the tabs live here (left on desktop, bottom bar on phones) */
.tabs {
  position: sticky; top: var(--topbar); align-self: start; height: calc(100vh - var(--topbar));
  display: flex; flex-direction: column; gap: 0.2rem; padding: 0.75rem 0.5rem; overflow-y: auto;
  background: var(--bg1); border-right: 1px solid var(--line); margin: 0;
}
.rail-label { font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); text-align: center; padding: 0.15rem 0 0.3rem; }
.tab-divider { height: 1px; background: var(--line); margin: 0.45rem 0.6rem; }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem; width: 100%;
  padding: 0.6rem 0.25rem; border-radius: 10px; border: 0; background: transparent; box-shadow: none;
  color: var(--faint); font-family: var(--body); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; text-align: center;
  position: relative; transition: background 0.15s, color 0.15s;
}
.tab:hover { background: var(--bg3); color: var(--dim); filter: none; }
.tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.is-active { color: var(--text); background: linear-gradient(180deg, rgba(102, 192, 244, 0.16), rgba(102, 192, 244, 0.05)); }
.tab.is-active::before { content: ""; position: absolute; left: -0.5rem; top: 20%; bottom: 20%; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.tab-lab .lock { position: absolute; top: 6px; right: 8px; width: 10px; height: 10px; stroke-width: 2.2; opacity: 0.8; }
.tab-lab.is-unlocked .lock { display: none; }
.tab-lab.is-unlocked:not(.is-active) { color: var(--faint); }

.main { padding: 1.25rem 1.5rem 3rem; min-width: 0; display: flex; flex-direction: column; }
.main-inner { width: min(1240px, 100%); margin: 0 auto; flex: 1; }

/* ----------------------------------------------------------------- landing */
.landing { padding: 2.5rem 0 1rem; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: center; }
.landing h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.01em; text-wrap: balance; max-width: 17ch; margin: 0.6rem 0 1rem; }
.landing h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing p { color: var(--dim); font-size: 1.02rem; max-width: 52ch; }
.landing-note { color: var(--amber); }
.feature-grid { display: grid; gap: 0.6rem; }
.feature {
  display: grid; grid-template-columns: 40px 1fr; gap: 0.8rem; align-items: center; padding: 0.85rem 1rem;
  background: linear-gradient(180deg, var(--bg2), var(--bg1)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.feature svg { width: 26px; height: 26px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature.lab svg { stroke: var(--mint); }
.feature b { display: block; font-family: var(--display); font-size: 1.1rem; font-weight: 600; }
.feature span { color: var(--dim); font-size: 0.82rem; }

/* ------------------------------------------------------------ league header */
.league-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: end;
  padding: 1.1rem 1.25rem; margin-bottom: 1rem; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(102, 192, 244, 0.14), rgba(26, 34, 49, 0.9) 45%, rgba(0, 209, 178, 0.08));
  border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.league-head::after { content: ""; position: absolute; right: -10%; bottom: -60%; width: 60%; height: 140%; background: radial-gradient(closest-side, rgba(102, 192, 244, 0.12), transparent); pointer-events: none; }
.league-title { min-width: 0; }
.league-title h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 800; margin-top: 0.35rem; overflow-wrap: anywhere; }
.league-title p { margin: 0; }
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.55rem; }
.chip { font-size: 0.72rem; font-weight: 600; padding: 0.22rem 0.6rem; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--dim); letter-spacing: 0.02em; }
.chip.live { color: var(--mint); border-color: rgba(0, 209, 178, 0.4); }
.chip.live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); margin-right: 0.4rem; box-shadow: 0 0 8px var(--mint); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.league-controls { display: flex; gap: 0.75rem; align-items: end; position: relative; z-index: 1; }

/* ------------------------------------------------------------------ chrome */
.section, .card, .team-col, .scale, .finder, .lab-locked {
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); min-width: 0;
}
.section { margin-bottom: 1.25rem; }
.section > .card { background: var(--bg3); box-shadow: none; padding: 0.8rem 0.9rem; }
.section-head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.section-head h2 { flex: 1; }
.section-head .muted { font-size: 0.82rem; }
.section-head h3 { margin: 0; }
.status { color: var(--dim); min-height: 1.4rem; margin-top: 0.75rem; font-size: 0.85rem; }
.status.is-error { color: var(--rose); }
.error { color: var(--rose); min-height: 1.2rem; margin: 0.5rem 0 0; font-size: 0.85rem; }
.empty { color: var(--dim); padding: 0.75rem 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.toolbar { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 0 0; margin-top: 2rem; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.78rem; }

/* ------------------------------------------------------------------ tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.55rem 0.6rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); font-weight: 600; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.table .rank { font-family: var(--display); font-size: 1.35rem; font-weight: 700; width: 2.6rem; color: var(--dim); }
.table tbody tr:nth-child(-n+3) .rank { color: var(--text); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll-x.narrow { max-width: 760px; }
.grade { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 1.05rem; padding: 0.05rem 0.5rem; border-radius: 6px; background: var(--bg3); border: 1px solid var(--line); }
.grade-A { color: var(--mint); } .grade-B { color: var(--accent); } .grade-C { color: var(--amber); } .grade-D { color: var(--rose); }
.bar { position: relative; height: 8px; background: rgba(0, 0, 0, 0.35); border-radius: 4px; overflow: hidden; min-width: 110px; }
.bar > span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #4fa8e6, var(--accent)); border-radius: 4px; }
.bar.sky > span { background: linear-gradient(90deg, #00a88f, var(--mint)); }
.pill { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--bg3); color: var(--dim); font-size: 0.72rem; font-weight: 600; border: 1px solid var(--line); vertical-align: middle; }
.pill.clinched { color: var(--mint); border-color: rgba(0, 209, 178, 0.4); }
.pill.eliminated { color: var(--rose); border-color: rgba(255, 77, 109, 0.4); }
.reasons { margin: 0.15rem 0 0; padding: 0; list-style: none; font-size: 0.76rem; color: var(--dim); }
.change { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0; border-top: 1px solid var(--line); font-size: 0.86rem; }
.change b { font-variant-numeric: tabular-nums; color: var(--mint); }
.stream-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.75rem; }
.stream-grid .card { padding: 0.75rem 0.9rem; background: var(--bg3); box-shadow: none; }
.stream-grid h3 { margin-bottom: 0.4rem; }
.stream-grid ol { margin: 0; padding-left: 1.2rem; font-size: 0.85rem; }
.stream-grid li { margin-bottom: 0.25rem; }
.stream-grid li span { color: var(--dim); font-size: 0.78rem; }
.lab-locked { text-align: center; padding: 3rem 1rem; }
.lab-locked .lockmark { width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 16px; display: grid; place-items: center; background: var(--bg3); border: 1px solid var(--line); }
.lab-locked .lockmark svg { width: 26px; height: 26px; stroke: var(--mint); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lab-locked h2 { margin-bottom: 0.4rem; }
.lab-locked p { color: var(--dim); max-width: 46ch; margin: 0 auto 1rem; }

/* position tags: the Sleeper chip */
.pos-tag, .pos { display: inline-grid; place-items: center; min-width: 2.3rem; padding: 0.1rem 0.35rem; border-radius: 5px; font-family: var(--display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.04em; color: #0b0f15; background: #8ea3bd; line-height: 1.3; }
.pos-QB { background: var(--qb); } .pos-RB { background: var(--rb); } .pos-WR { background: var(--wr); } .pos-TE { background: var(--te); } .pos-K { background: var(--k); } .pos-DST { background: var(--dst); }
.pos-FLEX, .pos-OP { background: var(--violet); color: #fff; }
.pos-BE, .pos-IR { background: var(--bg4); color: var(--dim); }
.pos-IR { color: var(--rose); }

/* ------------------------------------------------------------------- trade */
.trade-grid { display: grid; grid-template-columns: 1fr minmax(300px, 0.95fr) 1fr; gap: 1rem; align-items: start; }
.team-col select { width: 100%; margin-bottom: 0.4rem; }
.team-record { color: var(--dim); font-size: 0.78rem; margin: 0 0 0.6rem; }
.roster { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.roster li {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.6rem; align-items: center;
  padding: 0.42rem 0.6rem 0.42rem 0.55rem; border-radius: 9px; cursor: pointer; border: 1px solid transparent;
  background: var(--bg3); position: relative; overflow: hidden; transition: background 0.12s, border-color 0.12s;
}
.roster li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #8ea3bd; opacity: 0.85; }
.roster li[data-pos="QB"]::before { background: var(--qb); } .roster li[data-pos="RB"]::before { background: var(--rb); }
.roster li[data-pos="WR"]::before { background: var(--wr); } .roster li[data-pos="TE"]::before { background: var(--te); }
.roster li[data-pos="K"]::before { background: var(--k); } .roster li[data-pos="DST"]::before { background: var(--dst); }
.roster li:hover { background: var(--bg4); }
.roster li.is-in-trade { border-color: var(--accent); background: rgba(102, 192, 244, 0.12); box-shadow: 0 0 0 1px rgba(102, 192, 244, 0.25) inset; }
.roster li.is-in-trade .value-chip { color: var(--accent); }
.roster li.is-injured .pname { color: var(--dim); }
.pname { font-weight: 500; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pname small { color: var(--faint); font-weight: 400; margin-left: 0.4rem; font-size: 0.75rem; }
.pname .inj { color: var(--rose); font-weight: 700; margin-left: 0.35rem; font-size: 0.72rem; }
.value-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--display); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tier { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; border-radius: 4px; font-family: var(--display); font-weight: 700; font-size: 0.75rem; color: #0b0f15; }
.tier-S { background: var(--amber); } .tier-A { background: var(--mint); } .tier-B { background: var(--accent); } .tier-C { background: #8ea3bd; } .tier-D { background: #55637a; color: var(--text); }

.scale-col { position: sticky; top: calc(var(--topbar) + 1rem); }
.scale h2 { margin-bottom: 0.15rem; }
.scale > p.muted { font-size: 0.85rem; }
.beam-wrap { position: relative; height: 130px; margin: 0.75rem 0 0.5rem; }
.beam { position: absolute; left: 8%; right: 8%; top: 50%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--dim), var(--text), var(--dim)); transform-origin: 50% 50%; transform: rotate(0deg); transition: transform 0.55s cubic-bezier(.2, .8, .2, 1); }
.beam::before, .beam::after { content: ""; position: absolute; top: -19px; width: 42px; height: 42px; border-radius: 50%; background: var(--bg3); border: 3px solid var(--dim); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4); transition: background 0.3s, border-color 0.3s, box-shadow 0.3s; }
.beam::before { left: -10px; } .beam::after { right: -10px; }
.beam.is-a::before, .beam.is-b::after { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 22px var(--accent-glow), 0 6px 14px rgba(0, 0, 0, 0.4); }
.fulcrum { position: absolute; left: 50%; top: 50%; transform: translate(-50%, 2px); width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-bottom: 38px solid var(--bg4); }
.beam-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.beam-labels > span { font-size: 0.78rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.beam-labels > span:last-child { text-align: right; }
.side-total { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; margin-top: 0.15rem; }
.verdict { font-family: var(--display); font-size: 1.45rem; font-weight: 700; text-align: center; margin: 0.4rem 0 0.5rem; letter-spacing: 0.01em; text-wrap: balance; }
.verdict.is-fair { color: var(--mint); } .verdict.is-slight { color: var(--amber); } .verdict.is-clear, .verdict.is-lopsided { color: var(--rose); }
.effects { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; font-size: 0.8rem; color: var(--dim); }
.effects > div { min-width: 0; }
.effects strong { color: var(--text); font-size: 0.82rem; }
.effect-up { color: var(--mint); } .effect-down { color: var(--rose); } .effect-flat { color: var(--faint); }
.lab-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.75rem; font-size: 0.78rem; color: var(--dim); margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--line); }
.lab-detail b { color: var(--text); font-variant-numeric: tabular-nums; }
.notes { list-style: none; padding: 0; margin: 0.6rem 0 0; font-size: 0.8rem; color: var(--dim); }
.notes li { padding: 0.3rem 0; border-top: 1px solid var(--line); }
.notes li.warn { color: var(--amber); }
.scale-actions { display: flex; gap: 0.5rem; margin-top: 0.85rem; flex-wrap: wrap; }
.suggestions { margin-top: 0.85rem; }
.suggestions h3 { margin-bottom: 0.25rem; }
.suggestion { border-top: 1px solid var(--line); padding: 0.6rem 0; display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; }
.suggestion p { margin: 0; font-size: 0.85rem; }
.suggestion small { color: var(--dim); display: block; font-size: 0.75rem; }
.finder { margin-top: 1rem; }
.finder-head { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.5rem; }
.finder-head h2 { flex: 1; }
.finder-head .muted { font-size: 0.82rem; }
.finder-row { display: grid; grid-template-columns: 1fr auto; gap: 0.75rem; align-items: center; border-top: 1px solid var(--line); padding: 0.6rem 0; font-size: 0.88rem; }
.finder-row .arrows { color: var(--dim); font-size: 0.78rem; margin-top: 0.15rem; }

/* ---------------------------------------------------------------- matchups */
.mu-table { border-collapse: separate; border-spacing: 0 6px; }
.mu-table td { padding: 0.65rem 0.6rem; border-bottom: 0; background: var(--bg3); }
.mu-table tr:hover td { background: var(--bg4); }
.mu-table td:first-child { border-radius: 10px 0 0 10px; padding-left: 0.9rem; }
.mu-table td:last-child { border-radius: 0 10px 10px 0; padding-right: 0.9rem; }
.mu-team { width: 30%; font-weight: 600; font-size: 0.9rem; line-height: 1.25; }
.mu-team.mu-away { text-align: right; }
.mu-team.is-fav { color: var(--accent); }
.mu-team .muted, .mu-score { font-weight: 400; font-size: 0.76rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.mu-pct { width: 4.6rem; font-family: var(--display); font-size: 1.25rem; font-weight: 700; color: var(--dim); white-space: nowrap; text-align: center !important; }
.mu-pct.is-fav { color: var(--text); }
.mu-bar { min-width: 140px; }
.mu-bar .bar { height: 10px; }
.bar.duel { background: var(--bg4); }
.bar.duel::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.25); }
.mu-row.is-final .bar.duel > span { opacity: 0.55; }
.mu-bar .mu-note { text-align: center; font-size: 0.7rem; color: var(--faint); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.08em; }
.mu-center { text-align: center; }
.mu-detail { font-size: 0.8rem; margin-top: 0.75rem; color: var(--faint); }

/* ------------------------------------------------- lab: player rankings */
.pills { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; margin: 0 0 0.9rem; }
.pillbtn { background: var(--bg3); color: var(--dim); border: 1px solid var(--line); padding: 0.35rem 0.85rem; border-radius: 999px; font-weight: 600; font-size: 0.8rem; box-shadow: none; }
.pillbtn:hover { color: var(--text); filter: none; background: var(--bg4); }
.pillbtn.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pills input[type="search"] { margin-left: auto; min-width: 200px; padding: 0.4rem 0.7rem; }
.rk-table th, .rk-table td { white-space: nowrap; }
.rk-table td.rk-name { white-space: normal; min-width: 180px; }
.rk-row { cursor: pointer; }
.rk-row.is-open td { background: var(--bg3); border-bottom-color: transparent; }
.rk-row .rank { font-size: 1.2rem; }
.rk-card-row > td { padding: 0 0 1rem; background: var(--bg3); border-bottom: 2px solid var(--accent); white-space: normal; }
.rk-card { padding: 0.75rem 1rem 0.25rem; position: sticky; left: 0; box-sizing: border-box; max-width: calc(100vw - var(--rail) - 5rem); }
.rk-card-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; margin-bottom: 0.75rem; }
.rk-card-head h2 { margin: 0; font-size: 1.5rem; }
.rk-card-head p { margin: 0.2rem 0 0; font-size: 0.85rem; }
.rk-card-head .small { font-size: 0.78rem; }
.rk-card-nums { display: flex; gap: 1.25rem; }
.rk-card-nums div { display: flex; flex-direction: column; align-items: flex-end; }
.rk-card-nums b { font-family: var(--display); font-size: 1.7rem; font-weight: 700; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.rk-card-nums span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-top: 0.2rem; }
.rk-card .card { background: var(--bg2); margin-bottom: 1rem; box-shadow: none; padding: 0.8rem 0.9rem; }
.rk-card h3 { margin: 0.9rem 0 0.4rem; }
.rk-method { font-size: 0.8rem; margin-top: 0.75rem; color: var(--faint); }
.proj-line { margin: 0.4rem 0; font-size: 0.9rem; color: var(--dim); }
.proj-line .big { font-family: var(--display); font-size: 1.7rem; font-weight: 700; color: var(--accent); }
.parts { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.85rem; color: var(--dim); margin-bottom: 0.6rem; }
.parts b { color: var(--text); font-variant-numeric: tabular-nums; }
.pctbar { position: relative; height: 14px; background: rgba(0, 0, 0, 0.35); border-radius: 7px; overflow: hidden; min-width: 90px; }
.pctbar > span { position: absolute; inset: 0 auto 0 0; border-radius: 7px; background: var(--accent); }
.pctbar.hi > span { background: var(--mint); }
.pctbar.lo > span { background: var(--rose); }
.pctbar > b { position: absolute; right: 6px; top: 0; font-size: 0.68rem; line-height: 14px; color: var(--text); font-weight: 700; }
.unit-head, .unit-row { display: grid; grid-template-columns: minmax(130px, 1.2fr) 2fr; gap: 0.5rem; align-items: center; padding: 0.22rem 0; }
.unit-head { color: var(--faint); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; }
.unit-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.unit-label { font-size: 0.85rem; }
.cb-room { margin-top: 0.6rem; }
.table.tight th, .table.tight td { padding: 0.3rem 0.45rem; font-size: 0.8rem; white-space: nowrap; }
.stats-cols { margin-top: 0.5rem; }
.sched-strip { display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 0.3rem; }
.sched-cell { min-width: 60px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 0.35rem 0.4rem; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; font-size: 0.72rem; color: var(--dim); }
.sched-cell b { color: var(--text); font-family: var(--display); font-size: 1rem; font-variant-numeric: tabular-nums; }
.sched-cell.is-bye { opacity: 0.5; }
.sched-cell.is-now { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.sched-week { font-weight: 600; }
.tag-inj { display: inline-block; margin-left: 0.4rem; padding: 0 0.45rem; border-radius: 999px; border: 1px solid rgba(255, 77, 109, 0.4); color: var(--rose); font-size: 0.7rem; font-weight: 700; vertical-align: 1px; }
.pill.mu-great { color: var(--mint); border-color: rgba(0, 209, 178, 0.5); background: rgba(0, 209, 178, 0.12); }
.pill.mu-good { color: var(--mint); border-color: rgba(0, 209, 178, 0.35); }
.pill.mu-neutral { color: var(--dim); }
.pill.mu-poor { color: var(--amber); border-color: rgba(245, 183, 74, 0.4); }
.pill.mu-tough { color: var(--rose); border-color: rgba(255, 77, 109, 0.5); background: rgba(255, 77, 109, 0.12); }
.intel-wait p { color: var(--dim); }

/* ----------------------------------------------------- lab: NFL board */
.card.game { margin-bottom: 1rem; }
.game-head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.game-head h3 { margin: 0; color: var(--text); font-family: var(--display); font-size: 1.3rem; text-transform: none; letter-spacing: 0; }
.edges { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.4rem 0 0.8rem; }
.edge { font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--bg3); border: 1px solid var(--line); color: var(--dim); }
.edge b { color: var(--text); }
.edge.hi b { color: var(--mint); } .edge.lo b { color: var(--rose); }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.side { background: var(--bg3); border-radius: 10px; padding: 0.75rem; min-width: 0; }
.side-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 0.4rem; }
.side-head b { font-family: var(--display); font-size: 1.25rem; }
.unit-line { display: grid; grid-template-columns: 1fr 110px; gap: 0.5rem; align-items: center; padding: 0.15rem 0; font-size: 0.8rem; }
.fpa-line { font-size: 0.78rem; margin: 0.4rem 0; }
.fpa-line b { color: var(--text); }
.fpa-hi { color: var(--mint) !important; } .fpa-lo { color: var(--rose) !important; }
.side h3 { margin: 0.7rem 0 0.3rem; }
.side h3 .muted { text-transform: none; letter-spacing: 0; }
.angles { list-style: none; margin: 0; padding: 0; }
.angles li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.5rem; align-items: start; padding: 0.35rem 0; border-top: 1px solid var(--line); font-size: 0.84rem; }
.angles .pos { margin-top: 0.1rem; }
.angles .angle-pts { text-align: right; white-space: nowrap; }
.angles .angle-pts b { font-family: var(--display); font-size: 1.05rem; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; background: rgba(6, 9, 14, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 1rem; z-index: 50; }
.modal-card { background: var(--bg2); border: 1px solid var(--line-strong); border-radius: 16px; padding: 1.5rem; width: min(440px, 100%); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.modal-card h2 { margin-top: 0.3rem; }
.modal-card p { color: var(--dim); margin: 0.5rem 0 1rem; font-size: 0.9rem; }
.modal-card input { width: 100%; margin-bottom: 0.75rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.modal-actions button[type="submit"] { background: linear-gradient(180deg, #2ee6c8 0%, #00b89c 100%); color: var(--mint-ink); box-shadow: 0 0 0 1px rgba(0, 209, 178, 0.35), 0 6px 18px -6px rgba(0, 209, 178, 0.35); }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .trade-grid { grid-template-columns: 1fr; }
  .scale-col { position: static; order: -1; }
  .two-col, .sides { grid-template-columns: 1fr; }
  .landing { grid-template-columns: 1fr; }
  .lab-detail { grid-template-columns: 1fr; }
  .table th:nth-child(n+6), .table td:nth-child(n+6) { display: none; }
  .table.rk-table th, .table.rk-table td, .table.tight th, .table.tight td, .mu-table td { display: table-cell; }
  .stats-cols { grid-template-columns: 1fr; }
  .unit-head, .unit-row { grid-template-columns: 1fr; gap: 0.2rem; }
  .pills input[type="search"] { margin-left: 0; width: 100%; }
}
@media (max-width: 760px) {
  :root { --rail: 0px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .topbar { grid-template-columns: 1fr auto; row-gap: 0.5rem; }
  .league-form { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .session { grid-row: 1; grid-column: 2; }
  .wordmark-sub { display: none; }
  .tabs {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 40;
    flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 0.35rem 0.4rem; border-right: 0; border-top: 1px solid var(--line);
    background: rgba(20, 26, 37, 0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .tab { min-width: 64px; width: auto; flex: none; padding: 0.45rem 0.2rem; }
  .tab.is-active::before { left: 20%; right: 20%; top: -0.35rem; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .tab-divider, .rail-label { display: none; }
  .main { padding: 1rem 0.9rem 6rem; }
  .league-head { grid-template-columns: 1fr; align-items: start; }
  .effects { grid-template-columns: 1fr; }
  .effects > div:last-child { text-align: left !important; }
  .rk-card { max-width: calc(100vw - 2.5rem); }
  /* matchups: names + odds on one line, the bar underneath */
  .mu-table, .mu-table tbody { display: block; }
  .mu-table tr { display: grid; grid-template-columns: 1fr auto auto 1fr; grid-template-areas: "home hp ap away" "bar bar bar bar"; column-gap: 0.5rem; row-gap: 0.35rem; align-items: center; background: var(--bg3); border-radius: 10px; padding: 0.6rem 0.75rem; margin-bottom: 6px; }
  .mu-table td { display: block; padding: 0; border: 0; width: auto; background: transparent; border-radius: 0; }
  .mu-table td.mu-team:first-child { grid-area: home; }
  .mu-table td.mu-pct:nth-child(2) { grid-area: hp; }
  .mu-table td.mu-bar { grid-area: bar; min-width: 0; }
  .mu-table td.mu-pct:nth-child(4) { grid-area: ap; }
  .mu-table td.mu-away { grid-area: away; }
  .mu-table td.mu-center { grid-column: hp / ap; }
  .mu-pct { font-size: 1.05rem; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .beam, button, .tab { transition: none; }
  .chip.live::before { animation: none; }
}
.sides > *, .two-col > *, .side, .unit-line > *, .rk-card { min-width: 0; }
.side .scroll-x, .rk-card .scroll-x { max-width: 100%; }
