/* ==========================================================================
   Fun Boy Gang Dynasty League — site.css
   Design: polished pro-league look, playful copy. Navy + gold, cream paper.
   ========================================================================== */
:root {
  --ink: #0B1220;
  --ink-2: #16233A;
  --ink-3: #243553;
  --paper: #F7F5EF;
  --card: #FFFFFF;
  --line: #E4E0D6;
  --line-2: #CFC9BA;
  --text: #1B2233;
  --muted: #6B7280;
  --gold: #F5B301;
  --gold-2: #C98A00;
  --gold-soft: #FFF3C7;
  --red: #D7263D;
  --green: #1F8A4C;
  --green-soft: #E3F5EA;
  --blue: #2E5AAC;
  --shadow: 0 1px 2px rgba(11,18,32,.06), 0 8px 24px -12px rgba(11,18,32,.18);
  --radius: 14px;
  --font-display: "Barlow Condensed", "Oswald", "Arial Narrow", Impact, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: .01em; line-height: 1.05; margin: 0 0 .4em; color: var(--ink); }
h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 800; text-transform: uppercase; }
h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; text-transform: uppercase; }
h3 { font-size: 22px; font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.section { padding: 44px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head p { margin: 0; color: var(--muted); }
.kicker { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .18em; font-size: 13px; font-weight: 700; color: var(--gold-2); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card.tight { padding: 14px 16px; }
.card h3 { margin-top: 0; }
.pill { display: inline-block; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: #fff; }
.pill.gold { background: var(--gold); color: var(--ink); }
.pill.red { background: var(--red); }
.pill.green { background: var(--green); }
.pill.ghost { background: transparent; color: var(--ink-3); border: 1px solid var(--line-2); }
.btn { display: inline-block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: 15px; padding: 10px 18px; border-radius: 10px; background: var(--ink); color: #fff; border: 2px solid var(--ink); }
.btn:hover { background: var(--ink-3); text-decoration: none; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { background: #ffc735; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn.ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ---------- header / nav ---------- */
.topbar { background: var(--ink); color: #fff; border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 50; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 22px; }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 44px; }
.brand small { display: block; font-size: 11px; letter-spacing: .22em; color: var(--gold); font-weight: 700; line-height: 1; margin-top: 2px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: #E7EAF0; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 14px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.nav a.active { color: var(--gold); }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 18px; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--ink); flex-direction: column; align-items: stretch; padding: 8px 12px 14px; border-bottom: 3px solid var(--gold); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
}

/* ---------- hero ---------- */
.hero { background: radial-gradient(1200px 500px at 20% -10%, #2A3D66 0%, var(--ink-2) 40%, var(--ink) 100%); color: #fff; padding: 56px 0 48px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 2px, transparent 2px 88px); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.hero h1 { color: #fff; margin: 6px 0 10px; }
.hero h1 span { color: var(--gold); }
.hero p.lead { font-size: 18px; color: #C9D1E0; max-width: 60ch; }
.hero .crest { width: 200px; margin: 0 auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.45)); }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero .crest { width: 140px; order: -1; } }
.hero-sub { background: var(--ink-2); color: #fff; }
.hero-sub .wrap { padding-top: 26px; padding-bottom: 26px; }
.hero-sub h1 { color: #fff; margin: 0; }
.hero-sub .kicker { color: var(--gold); }
.hero-sub p { color: #C9D1E0; margin: 6px 0 0; }

/* ---------- stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat .v { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--ink); }
.stat .l { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 6px; }
.stat .s { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat.dark { background: var(--ink); border-color: var(--ink); }
.stat.dark .v { color: var(--gold); }
.stat.dark .l, .stat.dark .s { color: #B7C0D3; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--ink-3); background: #FBFAF6; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FCFBF7; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.name { font-weight: 600; white-space: normal; }
tr.hl td { background: var(--gold-soft); }
tr.me td { background: #EAF1FF; }
table.sortable th { cursor: pointer; user-select: none; }
table.sortable th.asc::after { content: " ▲"; font-size: 9px; }
table.sortable th.desc::after { content: " ▼"; font-size: 9px; }
.trophy { color: var(--gold-2); }
.pos { color: var(--green); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--gold); }

/* ---------- owner cards ---------- */
.owner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.owner-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: var(--text); display: flex; flex-direction: column; }
.owner-card:hover { text-decoration: none; transform: translateY(-2px); transition: transform .15s; border-color: var(--line-2); }
.owner-card .avatar { aspect-ratio: 1 / 1; background: var(--ink-2); overflow: hidden; }
.owner-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.owner-card .avatar .initials { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 72px; color: var(--gold); }
.owner-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.owner-card .name { font-family: var(--font-display); font-weight: 800; font-size: 24px; text-transform: uppercase; color: var(--ink); line-height: 1; }
.owner-card .team { color: var(--muted); font-size: 14px; }
.owner-card .rings { position: absolute; top: 10px; left: 10px; display: flex; gap: 3px; }
.owner-card .rings span { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; display: grid; place-items: center; font-size: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.owner-card .badge { position: absolute; top: 10px; right: 10px; }
.owner-card .line { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: auto; }
.owner-card .line b { color: var(--ink); }
.avatar-lg { width: 168px; height: 168px; border-radius: 18px; overflow: hidden; background: var(--ink-2); border: 4px solid #fff; box-shadow: var(--shadow); flex: none; }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg .initials { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 64px; color: var(--gold); }
.profile-head { display: flex; gap: 26px; align-items: flex-end; flex-wrap: wrap; }
.profile-head h1 { margin: 0; }
.profile-head .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.profile-head .sub { color: #C9D1E0; font-size: 17px; }
.known-for { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.known-for li { padding-left: 24px; position: relative; }
.known-for li::before { content: "🏈"; position: absolute; left: 0; top: 0; font-size: 14px; }
.timeline { display: grid; gap: 0; }
.timeline .row { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.timeline .row:last-child { border-bottom: 0; }
.timeline .yr { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--ink-3); }
.timeline .tn { font-weight: 600; }
.timeline .rec { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.h2h-grid td, .h2h-grid th { padding: 6px 8px; font-size: 12.5px; text-align: center; }
.h2h-grid th.rowhead, .h2h-grid td.rowhead { text-align: left; font-weight: 700; }
.h2h-grid td.w { background: var(--green-soft); color: var(--green); font-weight: 700; }
.h2h-grid td.l { background: #FCE8EB; color: var(--red); font-weight: 700; }
.h2h-grid td.e { background: #F3F1EA; color: var(--muted); }
.h2h-grid td.self { background: var(--ink); }

/* ---------- champions / history ---------- */
.champ-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.champ { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; position: relative; overflow: hidden; }
.champ .yr { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--gold-2); }
.champ .who { font-family: var(--font-display); font-weight: 700; font-size: 20px; text-transform: uppercase; color: var(--ink); margin-top: 6px; }
.champ .team { color: var(--muted); font-size: 13px; }
.champ .def { font-size: 12.5px; color: var(--muted); margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 6px; }
.champ::before { content: "🏆"; position: absolute; right: 12px; top: 10px; font-size: 22px; opacity: .9; }
.champ.current { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.banner { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 22px 24px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; border-left: 8px solid var(--gold); }
.banner .big { font-family: var(--font-display); font-weight: 800; font-size: 32px; text-transform: uppercase; line-height: 1; }
.banner .big span { color: var(--gold); }
.banner p { margin: 4px 0 0; color: #C9D1E0; }
.week-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.week { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.week h4 { margin-bottom: 8px; }
.week .g { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.week .g:last-child { border-bottom: 0; }
.week .g .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week .g .t.win { font-weight: 700; }
.week .g .t.r { text-align: right; }
.week .g .s { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.week.po { border-color: var(--gold); background: #FFFDF5; }
details { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 0; }
details summary { cursor: pointer; padding: 12px 16px; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 15px; color: var(--ink-3); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "▸ "; color: var(--gold-2); }
details[open] summary::before { content: "▾ "; }
details .inner { padding: 4px 16px 16px; }

/* ---------- draft board grid ---------- */
.board { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.board table { font-size: 12px; min-width: 1100px; }
.board th { text-align: center; }
.board td { padding: 6px 6px; border-right: 1px solid var(--line); vertical-align: top; text-align: center; white-space: normal; height: 48px; }
.board td .p { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.board td.keeper { background: var(--gold-soft); }
.board td.keeper .n { font-weight: 700; color: var(--ink); }
.board td.traded { background: #EEF3FF; }
.board td.drafted { background: var(--green-soft); }
.board td.drafted .n { font-weight: 700; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; border: 1px solid var(--line-2); }

/* ---------- misc ---------- */
.callout { border-left: 6px solid var(--gold); background: var(--gold-soft); padding: 12px 16px; border-radius: 0 10px 10px 0; }
.callout.red { border-color: var(--red); background: #FCE8EB; }
.callout.blue { border-color: var(--blue); background: #EAF1FF; }
.two-col { columns: 2; column-gap: 32px; }
@media (max-width: 720px) { .two-col { columns: 1; } }
.rule-list li { margin-bottom: 6px; }
.footer { background: var(--ink); color: #9AA5BC; padding: 34px 0; margin-top: 60px; font-size: 13px; }
.footer a { color: #C9D1E0; }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: 13px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink-3); cursor: pointer; }
.tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabpane { display: none; }
.tabpane.active { display: block; }
.scoreline { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.scoreline .t { font-family: var(--font-display); font-weight: 700; font-size: 20px; text-transform: uppercase; }
.scoreline .t.r { text-align: right; }
.scoreline .s { font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--ink); white-space: nowrap; }
.scoreline .sub { font-size: 12.5px; color: var(--muted); font-family: var(--font-body); font-weight: 400; text-transform: none; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.warn { font-size: 12.5px; color: var(--muted); font-style: italic; }
