@import url("https://rsms.me/inter/inter.css");

:root {
  --bg: #ffffff;
  --bg-page: #ffffff;
  --bg-hover: #f5f5f5;
  --bg-active: #ececec;
  --border: #e5e7eb;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent: #03A87C;
  --accent-hover: #028a65;
  --accent-light: rgba(3,168,124,0.07);
  --red: #d93025;
  --yellow: #e8a000;
  --gold: #c78d00;
  --silver: #888;
  --bronze: #a0652a;
  --radius: 8px;
  --sidebar-width: 264px;
  --header-height: 52px;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18181b;
    --bg-page: #18181b;
    --bg-hover: #27272a;
    --bg-active: #3f3f46;
    --border: #27272a;
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent-light: rgba(3,168,124,0.12);
    --gold: #daa520;
    --silver: #aaa;
    --bronze: #c8894d;
  }
  .logo { color: #ffffff !important; -webkit-text-fill-color: #ffffff; }
  body {
    background-image: radial-gradient(ellipse 80% 40% at 50% -5%, rgba(3,168,124,0.06) 0%, transparent 70%);
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); color: var(--text);
  font-size: 15px; line-height: 1.65;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 80% 40% at 50% -5%, rgba(3,168,124,0.06) 0%, transparent 70%);
  background-repeat: no-repeat;
  background-size: 100% 100vh;
}
body.home {
  background-image: radial-gradient(ellipse 80% 40% at 50% -5%, rgba(3,168,124,0.20) 0%, transparent 70%);
}
@media (prefers-color-scheme: dark) {
  body.home {
    background-image: radial-gradient(ellipse 80% 40% at 50% -5%, rgba(3,168,124,0.25) 0%, transparent 70%);
  }
}
body.nav-open { overflow: hidden; }
a { color: var(--accent); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

/* ========== HEADER ========== */
.site-header {
  display: none;
  position: sticky; top: 0; z-index: 300;
  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  height: var(--header-height);
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s,
    -webkit-backdrop-filter 0.25s, backdrop-filter 0.25s;
}
.site-header.scrolled, .site-header.nav-open {
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom-color: rgba(0,0,0,0.06);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
@media (prefers-color-scheme: dark) {
  .site-header { border-bottom-color: rgba(255,255,255,0.06); }
  .site-header.scrolled, .site-header.nav-open {
    background: rgba(24,24,27,0.8);
    border-bottom-color: rgba(255,255,255,0.06);
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  }
}
.header-inner {
  max-width: 100%; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: flex-end;
  height: var(--header-height);
}
.logo {
  font-weight: 700; font-size: 18px; letter-spacing: -0.2px;
  color: var(--accent) !important; text-transform: uppercase;
  text-decoration: none !important; display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
  padding: 0 20px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.logo img { height: 22px; }
.logo:hover { text-decoration: none !important; opacity: 0.7; }
.header-logo { display: none; padding: 0; margin-bottom: 0; padding-bottom: 0; border-bottom: none; margin-right: auto; }
.header-nav {
  display: flex; align-items: center; gap: 2px;
}
.header-nav a {
  color: var(--text-secondary); font-weight: 500; font-size: 14px;
  padding: 6px 12px; border-radius: 6px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
  transition: color 0.1s, background 0.1s;
}
.header-nav a:hover { color: var(--text); background: var(--bg-hover); text-decoration: none; }
.header-nav .header-cta {
  background: var(--accent); color: white !important; font-weight: 600;
  padding: 5px 14px; border-radius: 8px; font-size: 13px; margin-left: 8px;
}
.header-nav .header-cta:hover { opacity: 0.8; }
.header-nav .header-cta .mdi { font-size: 12px; margin-left: 2px; }

.cta-mobile { display: none; }
.mobile-toggle {
  display: none; cursor: pointer; background: none; border: none; padding: 8px;
  width: 36px; height: 36px; position: relative; flex-shrink: 0;
}
.mobile-toggle span {
  display: block; width: 18px; height: 1.5px; background: var(--text); border-radius: 1px;
  position: absolute; left: 9px; transition: transform 0.3s ease, top 0.3s ease;
}
.mobile-toggle span:first-child { top: 11px; }
.mobile-toggle span:nth-child(2) { top: 17px; }
.mobile-toggle span:last-child { top: 23px; }
.mobile-toggle.open span:first-child { top: 17px; transform: rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:last-child { top: 17px; transform: rotate(-45deg); }

/* ========== LAYOUT ========== */
.site-layout {
  display: flex; min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width); flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 20px 0 20px;
  position: sticky; top: 0;
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column;
}
.sidebar-section { margin-bottom: 8px; }
.sidebar-title {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  padding: 16px 20px 4px; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sidebar-title:first-of-type { padding-top: 4px; }
.sidebar-link {
  display: block; padding: 6px 20px 6px 28px; font-size: 14px; font-weight: 400;
  color: var(--text-secondary); text-decoration: none;
  transition: color 0.15s, background 0.15s;
  border-left: 2px solid transparent; margin-left: -1px;
}
.sidebar-link:hover { color: var(--text); text-decoration: none; }
.sidebar-link.active {
  color: var(--accent); font-weight: 500;
  border-left-color: var(--accent);
}

/* Main content */
.main-content {
  flex: 1; min-width: 0;
  padding: 20px 56px 80px 40px;
  max-width: 1100px;
  overflow-x: clip;
}

/* ========== TYPOGRAPHY ========== */
h1 {
  font-size: 32px; font-weight: 700; letter-spacing: -0.8px;
  margin: 0 0 16px; line-height: 1.2; color: var(--text);
}
h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.4px;
  margin: 40px 0 20px; line-height: 1.25; color: var(--text);
}
h2:first-child { margin-top: 0; }
h3 {
  font-size: 17px; font-weight: 700; letter-spacing: -0.2px;
  margin: 32px 0 8px; color: var(--text);
}
h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
p { color: var(--text); margin-bottom: 16px; line-height: 1.65; }
p.subtitle { font-size: 16px; color: var(--text-secondary); margin-bottom: 28px; text-wrap: balance; }
.hero-text {
  font-size: 34px; font-weight: 700; letter-spacing: -0.8px;
  line-height: 1.2;
  margin-top: 20px; margin-bottom: 36px; text-wrap: balance;
  max-width: 1000px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
ul { margin-left: 20px; margin-bottom: 16px; }
ul li { padding-left: 4px; margin-bottom: 4px; color: var(--text); font-size: 14px; line-height: 1.6; }

/* ========== TABLES (docs style) ========== */
table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; margin-bottom: 8px;
}
table th, table td {
  padding: 10px 16px 10px 0; text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top; line-height: 1.5;
}
table th {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.03em;
}
table td { color: var(--text); }
table td.secondary { color: var(--text); }
table td.muted { color: var(--text-muted); font-size: 13px; }
table tr:last-child td { border-bottom: none; }
.table-divider td {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 6px 0; border-bottom: 1px solid var(--border);
}

/* ========== MEMBER CARDS ========== */
.members-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px; margin-top: 8px; margin-bottom: 8px;
}
@media screen and (max-width: 1100px) {
  .members-grid { grid-template-columns: repeat(4, 1fr); }
}
@media screen and (max-width: 700px) {
  .members-grid { grid-template-columns: repeat(2, 1fr); }
}
.member-card {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 0; overflow: hidden;
  background: transparent;
  transition: border-color 0.15s;
}
.member-card { cursor: pointer; }
.member-card:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05); }
.member-card-glow {
  position: absolute; inset: 0; border-radius: 12px;
  background: linear-gradient(to right, #D7EDEA, #F4FBDF);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(180px at var(--mouse-x, 50%) var(--mouse-y, 50%), white, transparent);
  mask-image: radial-gradient(180px at var(--mouse-x, 50%) var(--mouse-y, 50%), white, transparent);
}
.member-card:hover .member-card-glow { opacity: 1; }
@media (prefers-color-scheme: dark) {
  .member-card-glow { background: linear-gradient(to right, #202D2E, #303428); }
}
.member-card {
  position: relative;
}
.member-card::before {
  content: '';
  position: absolute; inset: -30% 0; height: 160%; width: 100%;
  border-radius: 12px;
  background-image: url("data:image/svg+xml,%3Csvg width='72' height='56' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='p' width='72' height='56' patternUnits='userSpaceOnUse'%3E%3Cpath d='M.5 56V.5H72' fill='none' stroke='rgba(0,0,0,0.05)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='rgba(0,0,0,0.02)'/%3E%3Crect width='100%25' height='100%25' fill='url(%23p)'/%3E%3C/svg%3E");
  transform: skewY(-18deg);
  -webkit-mask-image: linear-gradient(white, transparent);
  mask-image: linear-gradient(white, transparent);
  transition: opacity 0.3s;
  pointer-events: none;
}
.member-card:hover::before { opacity: 0.5; }
.member-card-top {
  padding: 40px 16px 0;
  display: flex; align-items: flex-end; justify-content: flex-start;
  min-height: 72px;
  position: relative; z-index: 1;
}
.member-card-bottom { padding: 12px 16px 16px; position: relative; z-index: 1; }
.member-card .member-logo {
  height: 40px; width: 40px; object-fit: contain;
  background: white; border-radius: 50%; padding: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.member-logo-placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 40px; width: 40px;
  background: var(--bg-hover); border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  font-size: 20px; color: var(--text-muted);
}
@media (prefers-color-scheme: dark) {
  .member-card::before {
    background-image: url("data:image/svg+xml,%3Csvg width='72' height='56' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='p' width='72' height='56' patternUnits='userSpaceOnUse'%3E%3Cpath d='M.5 56V.5H72' fill='none' stroke='rgba(255,255,255,0.025)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='rgba(255,255,255,0.01)'/%3E%3Crect width='100%25' height='100%25' fill='url(%23p)'/%3E%3C/svg%3E");
  }
  .member-card .member-logo { background: var(--bg-hover); }
  .member-logo-placeholder { background: var(--bg-hover); }
}
.member-card .member-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.member-card .member-owner { font-size: 13px; color: var(--text-secondary); margin-bottom: 2px; }
.member-card .member-meta { font-size: 12px; color: var(--text-muted); }
.badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 1px 6px; border-radius: 4px;
  background: var(--bg-hover); color: var(--text-muted);
}
.badge-founder { background: var(--accent-light); color: var(--accent); }
.member-since { font-size: 12px; color: var(--text-muted); }

/* Stats row */
.stats-row { display: flex; gap: 32px; margin-bottom: 28px; }
.stat-block {}
.stat-block .stat-num {
  font-size: 32px; font-weight: 800; letter-spacing: -1px;
  line-height: 1; color: var(--text);
}
.stat-block .stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ========== RANKINGS ========== */
.former-tag {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  margin-left: 6px; padding: 1px 6px; border-radius: 99px;
  background: var(--bg-hover); vertical-align: middle;
}
.leaderboard { margin-bottom: 8px; }
.ranking-row {
  display: flex; align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.ranking-row:last-child { border-bottom: none; }
.ranking-row .bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--accent-light); z-index: 0;
  pointer-events: none;
}
.ranking-pos {
  font-size: 14px; font-weight: 700; width: 28px;
  font-variant-numeric: tabular-nums; color: var(--text-muted);
  position: relative; z-index: 1;
}
.ranking-name {
  flex: 1; font-weight: 500; font-size: 14px; color: var(--text);
  position: relative; z-index: 1;
}
.ranking-pts {
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--accent); width: 50px; text-align: right;
  position: relative; z-index: 1;
}

/* ========== TIMELINE ========== */
.timeline-section { margin-bottom: 8px; }
.era-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted);
  padding: 20px 0 6px; display: block;
  border-bottom: 1px solid var(--border); margin-bottom: 0;
}
.era-label:first-child { padding-top: 0; }
.season-row {
  display: flex; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; gap: 16px;
}
.season-row:last-child { border-bottom: none; }
.season-year {
  font-weight: 600; color: var(--text-muted); width: 40px;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.season-winner { font-weight: 600; color: var(--text); flex: 1; min-width: 0; }
.season-others {
  display: flex; gap: 12px; color: var(--text-secondary); font-size: 13px;
  flex-wrap: wrap;
}
.season-others span { white-space: nowrap; }

/* ========== KEEPER ACCORDIONS ========== */
.keeper-deadline-banner {
  background: rgba(232,160,0,0.06);
  border: 1px solid rgba(232,160,0,0.2);
  border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 20px;
  font-size: 13px; color: #8a6500; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.keeper-teams { display: flex; flex-direction: column; gap: 16px; }
.roster-teams { display: flex; flex-direction: column; gap: 16px; }
.keeper-team {
  border: none; border-radius: 0; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.keeper-team:last-child { border-bottom: none; }
.keeper-team-header {
  display: flex; align-items: center; padding: 12px 0;
  cursor: pointer; transition: color 0.1s; user-select: none;
}
.keeper-team-header:hover { color: var(--accent); }
.keeper-team-name { font-size: 15px; font-weight: 600; flex: 1; }
.keeper-team-total {
  font-size: 13px; font-weight: 600; color: var(--accent);
  margin-right: 8px; font-variant-numeric: tabular-nums;
}
.keeper-team-header .mdi-chevron-down {
  font-size: 18px; color: var(--text-muted); transition: transform 0.2s;
}
.keeper-team.collapsed .keeper-team-header .mdi-chevron-down { transform: rotate(-90deg); }
.keeper-team-body {
  border-top: 1px solid var(--border);
  max-height: 2000px; overflow: hidden; transition: max-height 0.3s ease;
}
.keeper-team.collapsed .keeper-team-body { max-height: 0; border-top-color: transparent; }
.keeper-player {
  display: grid; grid-template-columns: 28px 1fr 36px 44px 44px;
  align-items: center; padding: 8px 0; gap: 8px;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.keeper-player.keeper-player-header { border-bottom-width: 1px; }
.keeper-player:last-child { border-bottom: none; }
.keeper-pname { font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-badge {
  font-size: 10px; font-weight: 700; padding: 1px 5px;
  border-radius: 3px; text-transform: uppercase; text-align: center;
}
.pos-badge.qb { background: rgba(217,48,37,0.06); color: var(--red); }
.pos-badge.rb { background: var(--accent-light); color: var(--accent); }
.pos-badge.wr { background: rgba(59,130,246,0.06); color: #3b82f6; }
.pos-badge.te { background: rgba(232,160,0,0.06); color: #b07d00; }
.pos-badge.k, .pos-badge.def { background: var(--bg-hover); color: var(--text-muted); }
.keeper-nfl { font-size: 11px; color: var(--text-muted); text-align: center; }
.keeper-nfl-inline { display: none; font-size: 11px; color: var(--text-muted); margin-left: 6px; font-weight: 400; }
.keeper-val { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); text-align: right; }
.keeper-val.na { color: var(--red); }

/* ========== BILLS CAP ========== */
.cap-gauge {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 24px; cursor: pointer;
  transition: border-color 0.15s;
}
.cap-gauge:hover { border-color: var(--accent); }
.cap-gauge-labels {
  display: flex; justify-content: space-between;
  font-size: 14px; color: var(--text-secondary); margin-bottom: 6px;
}
.cap-gauge-labels .cap-used { font-weight: 700; color: var(--text); }
.cap-info-icon { cursor: pointer; font-size: 15px; color: var(--text-muted); vertical-align: middle; }
.cap-info-icon:hover { color: var(--accent); }
.cap-gauge-bar { height: 6px; border-radius: 3px; background: var(--bg-hover); overflow: hidden; }
.cap-gauge-fill { height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.6s ease; }
.cap-gauge-fill.over { background: var(--red); }
.cap-gauge-info { display: flex; gap: 20px; margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.cap-gauge-info strong { color: var(--text); }

.cap-list {}
.cap-row {
  display: flex; align-items: center;
  padding: 8px 16px; gap: 16px; font-size: 15px;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.cap-row .cap-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--accent-light); z-index: 0;
  pointer-events: none;
}
.cap-row .cap-rank, .cap-row .cap-name, .cap-row .cap-salary, .cap-row .cap-gtd, .cap-row .cap-hit { position: relative; z-index: 1; }
.cap-rank, .cap-rank-h { width: 18px; flex-shrink: 0; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cap-row:last-child { border-bottom: none; }
.cap-row .cap-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bio { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.player-headshot { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--bg-hover); }
.player-header-sub { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.player-bio-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.bio-stat { }
.bio-stat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 2px; }
.bio-stat-value { font-size: 13px; font-weight: 600; color: var(--text); }
.bio-sub { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.bio-sep { margin: 0 5px; color: var(--text-muted); }
.cap-row-clickable { cursor: pointer; }
.cap-row-clickable:hover .cap-name { color: var(--accent); }
.cap-row .cap-salary, .cap-row .cap-gtd, .cap-row .cap-hit {
  font-variant-numeric: tabular-nums;
  width: 120px; text-align: right; flex-shrink: 0;
  color: var(--text-secondary); font-size: 14px;
}
.cap-row .cap-gtd { color: var(--accent); }
.cap-row .cap-hit { color: var(--text); font-weight: 500; }
.cap-section-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); padding: 16px 16px 6px; border-top: 2px solid var(--border);
}
.dead-row .cap-name { color: var(--text); }
.dead-row .cap-hit { color: var(--red); }
.dead-total-row { border-top: 1px solid var(--border); }
.dead-total-row .cap-name { font-weight: 700; color: var(--text); }
.dead-total-row .cap-hit { font-weight: 700; }
.cap-sort-header {
  display: flex; align-items: center; padding: 0 16px 6px; gap: 16px;
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--text-muted);
  border-bottom: 1px solid var(--border); margin-bottom: 0;
}
.cap-sort-header span { cursor: pointer; }
.cap-sort-header span:hover { color: var(--text-secondary); }
.cap-sort-header .cap-name-h { flex: 1; }
.cap-sort-header .cap-salary-h, .cap-sort-header .cap-gtd-h, .cap-sort-header .cap-hit-h { width: 120px; text-align: right; flex-shrink: 0; }
.dead-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dead-table th {
  text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--text-muted); padding: 0 0 8px;
}
.dead-table th:last-child { text-align: right; }
.dead-table td { padding: 6px 0; border-bottom: 1px solid var(--border); }
.dead-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--red); font-weight: 600; }
.dead-table tr:last-child td { border-bottom: none; }
.dead-table .dead-total td { border-top: 2px solid var(--border); border-bottom: none; font-weight: 700; padding-top: 10px; }
.dead-table .dead-total td:last-child { color: var(--red); }
.source-line { margin-top: 20px; font-size: 12px; color: var(--text-muted); }
.source-line a { color: var(--text-muted); text-decoration: underline; font-weight: 400; }

/* ========== STANDINGS ========== */
.standings-wrap { margin-bottom: 8px; }
.standings-wrap table td.rank-cell { width: 32px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.standings-wrap table td.record-cell { font-variant-numeric: tabular-nums; }
.standings-wrap table td.pts-cell { font-variant-numeric: tabular-nums; }
.streak-win { color: var(--accent); font-weight: 600; }
.streak-loss { color: var(--red); font-weight: 600; }

/* ========== SCOREBOARD ========== */
.week-nav { display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin-bottom: 24px; }
.week-nav button {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  width: 32px; height: 32px; cursor: pointer; font-size: 18px;
  color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
}
.week-nav button:hover { border-color: var(--text-muted); color: var(--text); }
.week-nav button:disabled { opacity: 0.3; cursor: default; }
#week-label { font-size: 16px; font-weight: 600; min-width: 100px; text-align: center; }
.matchups-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.matchup-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-top: 12px; grid-column: 1 / -1; }
.matchup-label:first-child { margin-top: 0; }
.matchup-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.matchup-row { display: flex; align-items: center; padding: 10px 16px; font-size: 14px; }
.matchup-row + .matchup-row { border-top: 1px solid var(--border); }
.matchup-team { flex: 1; font-weight: 500; display: flex; align-items: center; }
.matchup-owner { color: var(--text-muted); font-size: 12px; font-weight: 400; margin-left: 6px; }
.matchup-score { font-variant-numeric: tabular-nums; font-weight: 600; width: 70px; text-align: right; }
.matchup-row.winner { background: var(--accent-light); }
.matchup-row.winner .matchup-score { color: var(--accent); }
.matchup-card.clickable { cursor: pointer; transition: border-color 0.15s; }
.matchup-card.clickable:hover { border-color: var(--accent); }
.matchup-logo { height: 20px; width: 20px; min-width: 20px; object-fit: contain; margin-right: 8px; flex-shrink: 0; }
.matchup-seed { color: var(--text-muted); font-size: 12px; font-weight: 400; margin-right: 7px; display: inline-block; width: 20px; text-align: right; flex-shrink: 0; }

.bye-bar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; padding: 8px 0; color: var(--text-muted); font-size: 13px;
}
.bye-label { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.bye-team { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--text-muted); }
.bye-logo { height: 16px; width: 16px; object-fit: contain; opacity: 0.6; }
.season-select {
  font-size: 13px; font-weight: 500; font-family: var(--font);
  padding: 6px 28px 6px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.season-select:focus { outline: none; border-color: var(--accent); }

/* ========== NEWS ========== */
.news-list { display: flex; flex-direction: column; }
.news-item {
  display: block; padding: 20px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; transition: background 0.1s;
}
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: none; }
.news-headline { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 14px; line-height: 1.3; }
.news-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.news-analysis {
  font-size: 15px; line-height: 1.6; margin-bottom: 10px;
  color: var(--text-muted); font-style: italic;
  border-left: 3px solid var(--accent); padding-left: 12px;
}
.news-time { font-size: 12px; color: var(--text-muted); }

/* ========== MODAL ========== */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #ffffff;
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-radius: 16px;
  width: 100%; max-width: 480px; max-height: 80vh;
  overflow-y: auto; box-shadow: 0 16px 48px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.5);
}
@media (prefers-color-scheme: dark) {
  .modal {
    background: #18181b;
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
  }
}
.modal-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: inherit; z-index: 1;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.modal-header img { height: 28px; width: 28px; object-fit: contain; }
.modal-header .player-headshot { height: 32px; width: 32px; border-radius: 50%; }
.modal-title { font-size: 16px; font-weight: 600; flex: 1; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--text-muted); padding: 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 0; }
.modal-player {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 20px; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.modal-player:last-child { border-bottom: none; }
.modal-player .modal-pname { flex: 1; font-weight: 500; }
.modal-player .modal-ppos { flex-shrink: 0; width: 36px; font-size: 11px; color: var(--text-muted); font-weight: 600; }
.modal-player .modal-pteam { font-size: 11px; color: var(--text-muted); width: 32px; text-align: center; flex-shrink: 0; }
.modal-player .modal-pbid { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; width: 36px; text-align: right; flex-shrink: 0; }
.modal-matchup-grid { display: grid; grid-template-columns: 1fr 1fr; }
.modal-team-col { min-width: 0; }
.modal-team-col + .modal-team-col { border-left: 1px solid var(--border); }
.modal-team-header {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 12px; font-weight: 600; font-size: 13px;
  background: var(--accent-light); border-bottom: 1px solid var(--border);
  text-align: center;
}
.modal-team-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-team-total {
  padding: 6px 12px; font-size: 20px; font-weight: 700; text-align: center;
  color: var(--accent); border-bottom: 1px solid var(--border);
}
.modal-team-col .modal-player { padding: 5px 10px; font-size: 12px; gap: 4px; }
.modal-team-col .modal-ppos { width: 30px; font-size: 10px; }
.modal-team-col .modal-pname { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-team-col .modal-pbid { width: 30px; font-size: 11px; }
.modal-bench-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); padding: 6px 12px 2px; border-top: 1px solid var(--border);
}
.modal-pkeeper {
  display: inline-block; font-size: 9px; font-weight: 700;
  background: var(--accent-light); color: var(--accent);
  padding: 0 4px; border-radius: 3px; margin-left: 8px;
  vertical-align: middle;
}

/* ========== SKELETON ========== */
.skeleton-item { padding: 20px 0; border-bottom: 1px solid var(--border); }
.skeleton-item:first-child { padding-top: 0; }
.skeleton-line {
  background: var(--bg-hover);
  border-radius: 4px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ========== RESPONSIVE ========== */
.sidebar-bottom {
  margin-top: auto; padding: 20px 20px 0;
  border-top: 1px solid var(--border);
}
.sidebar-bottom a {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 13px; font-weight: 600; color: white;
  text-decoration: none; padding: 8px 16px;
  background: var(--accent); border-radius: 8px;
  width: 100%;
}
.sidebar-bottom a:hover { opacity: 0.8; text-decoration: none; }
.sidebar-bottom a .mdi { font-size: 12px; }

@media screen and (max-width: 900px) {
  .site-header { display: block; }
  .header-inner { justify-content: space-between; }
  .header-logo { display: flex; margin-right: 0; }
  .mobile-toggle { display: block; order: 1; margin-right: -8px; }
  .sidebar {
    display: flex; flex-direction: column;
    position: fixed; top: var(--header-height); left: 0; right: 0;
    width: 100%;
    background: rgba(255,255,255,0.85); z-index: 200;
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s 0.3s;
    padding: 16px 0 24px;
    overflow-y: auto;
    max-height: calc(100dvh - var(--header-height));
    box-shadow: none;
  }
  .sidebar.open { transform: translateY(0); visibility: visible; transition: transform 0.3s ease, visibility 0s 0s; box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
  @media (prefers-color-scheme: dark) {
    .sidebar {
      background: rgba(24,24,27,0.8);
      -webkit-backdrop-filter: blur(20px) saturate(180%);
      backdrop-filter: blur(20px) saturate(180%);
    }
    .sidebar.open { box-shadow: 0 4px 24px rgba(0,0,0,0.3); }
  }
  .sidebar .logo { display: none; }
  .sidebar-link {
    padding: 10px 24px; font-size: 15px;
    border-left: none; margin-left: 0;
  }
  .sidebar-link.active {
    background: none;
    color: var(--accent); font-weight: 600;
  }
  .sidebar-bottom { padding: 16px 24px 24px; }
  .sidebar-bottom a { font-size: 14px; padding: 10px 0; }
  .mobile-overlay {
    display: none; position: fixed; inset: 0; z-index: 199;
    background: rgba(0,0,0,0.3);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .mobile-overlay.open { display: block; }
  .header-nav .header-cta { display: none; }
  .logo-edition { display: none; }
  .main-content { padding: 28px 24px 60px; }
  .stats-row { flex-wrap: wrap; gap: 16px; }
  .season-others { display: none; }
  .cap-row .cap-salary, .cap-row .cap-gtd { display: none; }
  .cap-sort-header .cap-salary-h, .cap-sort-header .cap-gtd-h { display: none; }
  .keeper-player .keeper-nfl { display: none; }
  .keeper-nfl-inline { display: inline; }
  .keeper-player { grid-template-columns: 28px 1fr 40px 40px; }
  .matchup-owner { display: none; }
  .seasons-table th:nth-child(n+4),
  .seasons-table td:nth-child(n+4) { display: none; }
}

@media screen and (max-width: 480px) {
  .standings-wrap .hide-narrow { display: none; }
}

@media screen and (max-width: 600px) {
  .main-content { padding: 24px 16px 60px; }
  .header-inner { padding: 0 16px; }
  .header-nav a:not(.header-cta) { display: none; }
  h1 { font-size: 24px; margin-bottom: 12px; }
  h2 { font-size: 19px; margin-top: 32px; }
  p.subtitle { font-size: 14px; margin-bottom: 20px; }
  .hero-text { margin-top: 0; }
  .leaderboard { margin-left: -16px; margin-right: -16px; }
  .cap-list, .cap-sort-header { margin-left: -16px; margin-right: -16px; }
  .standings-wrap { margin: 0 -16px; }
  .standings-wrap table { font-size: 13px; }
  .standings-wrap table th, .standings-wrap table td { padding: 8px 8px 8px 0; }
  .standings-wrap table th:first-child, .standings-wrap table td:first-child { padding-left: 16px; }
  .matchups-grid { margin: 0; grid-template-columns: 1fr; }
  .matchup-card { border-radius: var(--radius); }
  .matchup-owner { display: none; }
  .keeper-teams { margin: 0; }
  .keeper-team-name { font-size: 13px; }
  .keeper-player { font-size: 12px; }
  .keeper-val { font-size: 12px; }
  .keeper-pname { font-size: 12px; }
  .stats-row { gap: 12px; }
  .stat-block .stat-num { font-size: 24px; }
  .stat-block .stat-label { font-size: 12px; }
  table { font-size: 13px; }
  .season-row { font-size: 13px; }
}
