/* ============================================================
   The Believeland Beat — source-document stylesheet
   Replaces OOTP's default skin. Maps the game's generated
   class names onto the Beat's design system, responsively.
   ============================================================ */
:root{
  --navy:#0C2340; --red:#E31937; --paper:#ffffff; --bg:#f4f4f2;
  --ink:#1a1a1a; --muted:#6b6b6b; --line:#e2e2de; --rule:#d8d8d3;
  --sans:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  --serif:Georgia,'Times New Roman',serif;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body,body.ext_bg{
  font-family:var(--serif); background:var(--bg); color:var(--ink);
  font-size:15px; line-height:1.6; margin:0; padding:0 0 60px;
}

/* ---------- top bar (injected) ---------- */
.bbbar{position:sticky;top:0;z-index:9999;background:var(--navy);border-bottom:3px solid var(--red);
  font-family:var(--sans);padding:9px 14px;display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 0 18px}
.bbbar a,.bbbar a:link,.bbbar a:visited{color:#fff !important;text-decoration:none;font-weight:700;
  font-size:12px;text-transform:uppercase;letter-spacing:.09em;padding:4px 8px;border-radius:2px}
.bbbar a:hover{background:var(--red);color:#fff !important}
.bbbar .bbmark{font-weight:900;font-size:14px;letter-spacing:-.3px;color:#fff;padding-right:6px;
  border-right:1px solid rgba(255,255,255,.22);margin-right:2px;white-space:nowrap}
.bbbar .bbmark span{color:var(--red)}
.bbbar .bbspacer{flex:1}
.bbbar .bbnote{color:#8fa2bd;font-size:11px;letter-spacing:.05em;text-transform:uppercase}

/* ---------- kill OOTP's fixed widths and header art ---------- */
table{border-collapse:collapse;max-width:100%}
body > table,
table[width="968px"],table[width="968"],table[width="1108px"],table[width="1108"],
table[width="1168px"],table[width="1168"],table[width="648px"],table[width="630px"]{
  width:100% !important;max-width:1180px;margin:0 auto;float:none
}
td[width],th[width],img[width="1"]{max-width:100%}
table[style*="report_header"]{background-image:none !important;background:var(--navy) !important;
  width:100% !important;max-width:100% !important;border-bottom:3px solid var(--red);margin-bottom:4px}
tr[style*="height:160px"]{height:auto !important}
img[src*="pixel.gif"],img[src*="dot1"]{display:none}
img[src*="bnn_"],img[src*="bg_bottom"]{display:none}

/* ---------- report header ---------- */
.reptitle{font-family:var(--sans);font-weight:900;font-size:24px;letter-spacing:-.4px;color:#fff;
  text-transform:uppercase;line-height:1.1;padding-top:4px}
.repsubtitle{font-family:var(--sans);font-weight:700;font-size:12.5px;letter-spacing:.16em;
  text-transform:uppercase;color:#ff8a97;margin-top:6px}
table[style*="report_header"] td{color:#aebad0 !important;font-family:var(--sans);font-size:12px}
table[style*="report_header"] img[src*="league_logos"],
table[style*="report_header"] img[src*="team_logos"]{max-height:74px;width:auto;padding:6px 0 0 4px}
.menu,a.menu,a.menu:link,a.menu:visited{font-family:var(--sans);font-size:11px;font-weight:700;
  letter-spacing:.09em;text-transform:uppercase;color:#8fa2bd !important;text-decoration:none}
a.menu:hover{color:#fff !important}
td.menu{padding:10px 0 12px !important;border-top:1px solid rgba(255,255,255,.16);line-height:2.1}

/* ---------- section headings ---------- */
.boxtitle,td.boxtitle,th.boxtitle{
  font-family:var(--sans);font-weight:900;font-size:13px;letter-spacing:.13em;text-transform:uppercase;
  color:var(--navy);background:transparent;border-bottom:3px solid var(--navy);
  padding:24px 2px 8px !important;text-align:left
}
.boxsubtitle,td.boxsubtitle{font-family:var(--sans);font-weight:700;font-size:12px;letter-spacing:.08em;
  text-transform:uppercase;color:var(--muted);padding:10px 2px 4px !important}
td.data_capt{font-family:var(--sans);font-weight:800;font-size:13px;color:var(--navy);
  padding:14px 2px 6px !important;white-space:normal}

/* ---------- data tables ---------- */
.bbscroll{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);
  background:var(--paper);margin:0 0 18px;max-width:1180px}
.bbscroll > table{margin:0 !important;min-width:100%}
table.data,table.stats,table.sortable{background:var(--paper);width:100% !important}
.data th,.stats th,th.datath,.datath{
  background:var(--navy) !important;color:#fff !important;font-family:var(--sans);font-weight:700;
  font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;padding:9px 9px !important;
  white-space:nowrap;border:none !important;border-bottom:none !important;cursor:pointer;vertical-align:bottom
}
.data th:hover,.stats th:hover{background:var(--red) !important}
.data a:link,.data a:visited,.stats a:link,.stats a:visited{color:var(--navy)}
.data a:hover,.stats a:hover{color:var(--red)}
.data td,.stats td{
  background:var(--paper) !important;color:var(--ink) !important;font-family:var(--sans);font-size:12.5px;
  padding:7px 9px !important;border:none !important;border-bottom:1px solid var(--line) !important;
  white-space:nowrap;vertical-align:middle
}
.data tr:hover td,.stats tr:hover td{background:#f7f7f5 !important}
td.data_footer{background:#f7f7f5 !important;color:var(--navy) !important;font-family:var(--sans);
  font-weight:800;font-size:12px;border-top:2px solid var(--navy) !important;padding:8px 9px !important}
.databg,.statsbg,.datathbg,.grey{background:transparent !important}
.datacolor{color:var(--ink) !important}
td.light{color:var(--muted) !important}
td.footer,.footer{font-family:var(--sans);font-size:11px;color:var(--muted) !important;padding:14px 2px}
.wrap,td.wrap{white-space:normal !important;line-height:1.55}
.dl{text-align:left}.dr{text-align:right}.dc{text-align:center}
.highlight{font-weight:800;color:var(--navy) !important}
.bold{font-weight:700}

/* first column sticks while you scroll sideways */
.bbscroll table.data td:first-child,.bbscroll table.stats td:first-child{
  position:sticky;left:0;z-index:1;background:var(--paper) !important;
  box-shadow:1px 0 0 var(--line)}
.bbscroll table.data th:first-child,.bbscroll table.stats th:first-child{
  position:sticky;left:0;z-index:3;background:var(--navy) !important}
.bbscroll table.data tr:hover td:first-child{background:#f7f7f5 !important}

/* ---------- links ---------- */
a,a:link,a:visited{color:var(--navy);text-decoration:none;font-weight:700}
a:hover{color:var(--red)}
.data a,.stats a{color:var(--navy)}
.data a:hover,.stats a:hover{color:var(--red)}
a.bbdead{color:var(--ink) !important;font-weight:400 !important;cursor:default;text-decoration:none !important}
a.bbbeat,a.bbbeat:link,a.bbbeat:visited{color:#B3282D !important;border-bottom:1px dotted #e0aab0}
a.bbbeat:hover{color:var(--navy) !important;border-bottom-color:var(--navy)}
a.a1,a.a1:link,a.a1:visited{color:#fff !important;font-weight:600}
a.a1:hover{color:#ff8a97 !important}
a.boxlink,a.boxlink:link,a.boxlink:visited{color:var(--navy) !important;font-size:13px;font-weight:800}
a.boxlink:hover{color:var(--red) !important}

/* ---------- rating colour scale (light-theme safe) ---------- */
td.datac0{font-weight:700;color:#8a8a8a !important}
td.datac1{font-weight:700;color:#c0392b !important}
td.datac2{font-weight:700;color:#c86a1b !important}
td.datac3{font-weight:700;color:#9a7b0a !important}
td.datac4{font-weight:700;color:#2f7d32 !important}
td.datac5{font-weight:700;color:#0f766e !important}
td.datac6{font-weight:700;color:#2E5FA3 !important}

/* ---------- schedule grid ---------- */
.sdl_off,.sdl_empty{background:#efefec !important}
.sdl_asg,.sdl_asg_played{background:#e8edf5 !important}
.sdl_home{background:#f7f7f5 !important}
.sdl_border_other{border:1px solid var(--line) !important}

/* ---------- matchup band (box scores, team headers) ---------- */
table.head_bg{background:var(--navy) !important;width:100% !important;max-width:100% !important;
  border-bottom:3px solid var(--red);margin:0 0 20px}
table.head_bg td{color:#fff !important;font-family:var(--sans) !important;background:transparent !important}
table.head_bg a,table.head_bg a:link,table.head_bg a:visited{color:#ff8a97 !important;font-weight:700}
table.head_bg a:hover{color:#fff !important}
table.head_bg img{max-height:84px;width:auto;height:auto}
table.head_bg table.data{margin:6px auto 4px;max-width:520px;border:1px solid rgba(255,255,255,.18)}
table.head_bg table.data th{font-size:10px;padding:6px 7px !important;background:#16304f !important}
table.head_bg table.data td{font-size:12px;padding:6px 7px !important;color:var(--ink) !important;background:var(--paper) !important}
table.head_bg table.data th{color:#fff !important}
table.head_bg table.data a,table.head_bg table.data a:link{color:var(--navy) !important}
img[src*="team_logos"]{max-height:84px;width:auto;height:auto}

/* two-column box-score layout: even halves */
td.bbhalf,th.bbhalf{width:50% !important;vertical-align:top}

/* ---------- box score recap ---------- */
td[class*="databg"][style*="padding:1px"]{font-family:var(--serif);font-size:16px;line-height:1.7;
  color:var(--ink) !important;background:var(--paper) !important;padding:18px 22px !important;
  border:1px solid var(--line);border-left:4px solid var(--navy);white-space:normal}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width:900px){
  body{font-size:14.5px}
  table.head_bg{margin-bottom:14px}
  table.head_bg img{max-height:56px}
  td.bbhalf,th.bbhalf{width:100% !important;display:block !important}
  .bbscroll{border-left:none;border-right:none;margin-left:-12px;margin-right:-12px;
    width:calc(100% + 24px);max-width:none}
  .reptitle{font-size:19px}
  .repsubtitle{font-size:11px}
  table[style*="report_header"] img[src*="league_logos"],
  table[style*="report_header"] img[src*="team_logos"]{max-height:52px}
  /* side-by-side box-score columns stack */
  table[width="1108px"] > tbody > tr > td[width="550px"],
  td[width="550px"]{display:block !important;width:100% !important;padding:0 !important}
  td[width="8px"],th[width="8px"]{display:none !important}
  table[width="1108px"] th[width="550px"]{display:block;width:100% !important}
  .boxtitle,td.boxtitle,th.boxtitle{padding:18px 12px 8px !important;font-size:12px}
  .boxsubtitle,td.boxsubtitle,td.data_capt{padding-left:12px !important;padding-right:12px !important}
  td.footer,.footer{padding-left:12px;padding-right:12px}
  body > table{padding:0 12px}
  .data th,.stats th{font-size:10px;padding:8px 7px !important}
  .data td,.stats td{font-size:12px;padding:6px 7px !important}
  td.menu{line-height:2.4;font-size:10.5px}
  .bbbar{gap:10px;padding:8px 12px}
  .bbbar .bbnote{display:none}
  .bbbar a{font-size:11px;padding:4px 6px}
}
@media (max-width:600px){
  .bbbar .bbmark{font-size:12px}
  .reptitle{font-size:16px;letter-spacing:0}
  table[style*="report_header"]{padding:4px 0}
  .data th,.stats th{font-size:9.5px;letter-spacing:.03em;padding:7px 6px !important}
  .data td,.stats td{font-size:11.5px;padding:6px 6px !important}
}
@media print{ .bbbar{display:none} body{background:#fff} }

/* ---------- mobile: flatten OOTP's layout scaffolding ---------- */
@media (max-width:900px){
  table.bblayout,
  table.bblayout > tbody,
  table.bblayout > tbody > tr,
  table.bblayout > tbody > tr > td,
  table.bblayout > tbody > tr > th,
  table.bblayout > tr,
  table.bblayout > tr > td,
  table.bblayout > tr > th{
    display:block !important; width:100% !important; max-width:100% !important;
    height:auto !important; float:none !important
  }
  table.bblayout > tbody > tr > td[align="left"]{text-align:left !important}
  td.bbempty,th.bbempty{display:none !important}
  table[style*="report_header"] > tbody > tr{display:block}
  table[style*="report_header"] td[style*="padding-top"]{padding-top:6px !important}
  .bbscroll{max-width:100%;width:100%;margin-left:0;margin-right:0;border-left:1px solid var(--line);border-right:1px solid var(--line)}
  body > table.bblayout{padding:0 12px}
  /* header stacks: logo above the title block */
  table[style*="report_header"] > tbody > tr > td{text-align:center !important;padding:8px 0 !important}
  table[style*="report_header"]{padding:10px 12px !important}
  .reptitle,.repsubtitle{text-align:center}
  td.menu{text-align:center !important}
}

/* ---------- prose tables: news, transactions, injury notes ---------- */
table.bbprose{width:100% !important;border:1px solid var(--line);background:var(--paper);margin:0 0 14px}
table.bbprose th{background:var(--navy) !important;text-align:left !important;font-size:11px;padding:9px 14px !important}
table.bbprose td{white-space:normal !important;line-height:1.55;padding:11px 14px !important;font-size:14px}
table.bbprose td.dl,table.bbprose td.wrap{text-align:left}

/* ============================================================
   Real-device typography. These now actually fire, because every
   page carries a width=device-width viewport tag.
   ============================================================ */
@media (max-width:900px){
  body,body.ext_bg{font-size:16px}
  .data th,.stats th{font-size:11.5px;padding:9px 9px !important;letter-spacing:.04em}
  .data td,.stats td{font-size:14px;padding:9px 9px !important}
  table.bbprose td{font-size:15px;padding:12px 14px !important}
  table.bbprose th{font-size:12px;padding:10px 14px !important}
  .boxtitle,td.boxtitle,th.boxtitle{font-size:13.5px;letter-spacing:.1em;padding:20px 12px 9px !important}
  .reptitle{font-size:22px}
  .repsubtitle{font-size:12.5px}
  /* our own bar already handles navigation — OOTP's menu row is redundant on a phone */
  td.menu{display:none !important}
  table[style*="report_header"] div[style*="text-align:center"]{font-size:13px !important}
  .bbbar{padding:10px 12px;gap:9px}
  .bbbar a,.bbbar a:link,.bbbar a:visited{font-size:12.5px;padding:5px 7px}
  .bbbar .bbmark{font-size:13px}
  .srcnote,td.footer,.footer{font-size:13px}
}
@media (max-width:600px){
  body,body.ext_bg{font-size:16px}
  .data th,.stats th{font-size:11px;padding:8px 8px !important}
  .data td,.stats td{font-size:13.5px;padding:8px 8px !important}
  table.bbprose td{font-size:15px}
  .reptitle{font-size:19px}
  .bbbar a,.bbbar a:link,.bbbar a:visited{font-size:12px;padding:5px 6px}
}

/* ============================================================
   Phone refinements — applied after the flattening rules so
   they win on specificity.
   ============================================================ */
@media (max-width:900px){
  /* our bar handles navigation; OOTP's BNN menu row is redundant */
  table.bblayout > tbody > tr > td.menu,
  table.bblayout > tr > td.menu,
  td.menu{display:none !important}

  /* one scrollable line instead of three wrapped ones */
  .bbbar{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;
    scrollbar-width:none;gap:2px;padding:9px 10px}
  .bbbar::-webkit-scrollbar{display:none}
  .bbbar a,.bbbar a:link,.bbbar a:visited{white-space:nowrap;flex:0 0 auto;font-size:12px;padding:5px 8px}
  .bbbar .bbmark{flex:0 0 auto;font-size:12.5px;padding-right:8px;margin-right:4px}
  .bbbar .bbspacer,.bbbar .bbnote{display:none}

  /* tighten the report header: no dead space, logo and title close together */
  table[style*="report_header"]{padding:14px 14px 16px !important;margin-bottom:14px}
  table[style*="report_header"] > tbody > tr > td{padding:2px 0 !important}
  table[style*="report_header"] img[src*="league_logos"],
  table[style*="report_header"] img[src*="team_logos"]{max-height:44px;padding:0 0 6px !important}
  .reptitle{font-size:20px;padding-top:0}
  .repsubtitle{font-size:11.5px;margin-top:4px}
  table[style*="report_header"] div[style*="text-align:center"]{font-size:12.5px !important;padding-top:2px !important}
  table[style*="report_header"] table{margin:0 auto}

  /* matchup band on box scores */
  table.head_bg{padding:12px 10px !important;margin-bottom:14px}
  table.head_bg > tbody > tr > td{padding:3px 0 !important}
}

@media (max-width:900px){
  /* OOTP pads the header cells with inline padding-top up to 34px; flatten it all */
  table[style*="report_header"] td,
  table[style*="report_header"] th{padding:2px 0 !important}
  table[style*="report_header"] tr:last-child td{padding-bottom:0 !important}
  table[style*="report_header"]{padding:14px 14px 12px !important}
  table[style*="report_header"] td:empty{display:none !important}
  table.head_bg td{padding:3px 0 !important}
}

@media (max-width:900px){
  /* flattened rows must not keep OOTP inline heights */
  table.bblayout > tbody > tr,table.bblayout > tr,
  tr[style*="height"]{height:auto !important;min-height:0 !important}
  table.head_bg img{max-height:48px !important}
  table.head_bg > tbody > tr > td:last-child{padding-bottom:0 !important}
}
