/* Bandwagon Boys V14 — franchise dossier + real lore-newsprint correction pass */

/* Use actual generated newspaper collage artwork, not CSS/SVG mock newspapers. */
body[data-section="teams"]{
  background:
    linear-gradient(rgba(8,8,7,.62),rgba(8,8,7,.84)),
    url('assets/art/teams-lore-newspaper.png') center top/cover fixed no-repeat!important;
}
body[data-section="press"]{
  background:
    linear-gradient(rgba(8,8,7,.60),rgba(8,8,7,.82)),
    url('assets/art/press-lore-newspaper.png') center top/cover fixed no-repeat!important;
}

/* Team dossier: prevent the old renderer/new renderer flash. */
body[data-section="teams"] #team-profile{opacity:0;transition:opacity .14s ease}
body[data-section="teams"].v14-team-ready #team-profile{opacity:1}

/* Team pages need to read like a dossier, not brown text disappearing into a wall. */
body[data-section="teams"] .page{color:#f8f2e7}
body[data-section="teams"] .dossier-hero,
body[data-section="teams"] .profile-hero,
body[data-section="teams"] .panel,
body[data-section="teams"] .dossier-body,
body[data-section="teams"] .profile-stat-grid article,
body[data-section="teams"] .dossier-kpis article,
body[data-section="teams"] .roster-player,
body[data-section="teams"] .team-trade-list-v11 a,
body[data-section="teams"] .rival-list-v11 a,
body[data-section="teams"] .dossier-awards article,
body[data-section="teams"] .draft-habits article{
  background:rgba(20,18,15,.93)!important;
  border-color:rgba(222,188,121,.34)!important;
  color:#f8f2e7!important;
  box-shadow:0 16px 34px rgba(0,0,0,.24);
}
body[data-section="teams"] .franchise-identity,
body[data-section="teams"] .profile-two .panel,
body[data-section="teams"] .trade-history{
  background:rgba(244,235,215,.95)!important;
  color:#191713!important;
  border-color:#bca57a!important;
}
body[data-section="teams"] .franchise-identity *,
body[data-section="teams"] .profile-two .panel *,
body[data-section="teams"] .trade-history *{color:inherit}
body[data-section="teams"] .profile-hero h1,
body[data-section="teams"] .dossier-hero h1,
body[data-section="teams"] .profile-owner,
body[data-section="teams"] .profile-record,
body[data-section="teams"] .profile-record span,
body[data-section="teams"] .dossier-hero p,
body[data-section="teams"] .dossier-hero span,
body[data-section="teams"] .dossier-kpis span,
body[data-section="teams"] .dossier-kpis b,
body[data-section="teams"] .roster-player h3,
body[data-section="teams"] .roster-player p,
body[data-section="teams"] .roster-player span,
body[data-section="teams"] .rival-list-v11 h3,
body[data-section="teams"] .rival-list-v11 span,
body[data-section="teams"] .rival-list-v11 b,
body[data-section="teams"] .team-trade-list-v11 b,
body[data-section="teams"] .team-trade-list-v11 span,
body[data-section="teams"] .team-trade-list-v11 i,
body[data-section="teams"] .dossier-awards *,
body[data-section="teams"] .draft-dossier h3,
body[data-section="teams"] .draft-dossier span,
body[data-section="teams"] .draft-dossier b{color:#f8f2e7!important}

/* A single clear tab language across every team subpage. */
body[data-section="teams"] .profile-tabs-v11{
  display:flex;gap:6px;flex-wrap:wrap;margin:14px 0 18px;padding:8px;
  background:rgba(11,10,9,.96);border:1px solid rgba(224,190,122,.3);border-radius:4px;
}
body[data-section="teams"] .profile-tabs-v11 button{
  appearance:none;border:1px solid rgba(224,190,122,.28);background:#27231d;color:#f4ead7!important;
  font-weight:900;letter-spacing:.04em;padding:11px 16px;cursor:pointer;border-radius:3px;
}
body[data-section="teams"] .profile-tabs-v11 button:hover{background:#3b3327;color:#fff!important}
body[data-section="teams"] .profile-tabs-v11 button.active{background:#ead9b6!important;color:#15120e!important;border-color:#ead9b6!important}
body[data-section="teams"] .dossier-table{background:rgba(244,235,215,.97)!important;color:#191713!important}
body[data-section="teams"] .dossier-table th,
body[data-section="teams"] .dossier-table td{color:#191713!important;border-color:#c9b78f!important}
body[data-section="teams"] .dossier-table thead{background:#251f18!important}
body[data-section="teams"] .dossier-table thead th{color:#fff4df!important}

/* Rich Overview pulled back from the original franchise intelligence renderer. */
.v14-rich-overview{display:grid;gap:18px}
.v14-rich-overview .profile-stat-grid{margin-top:0}
.v14-rich-overview .profile-two{align-items:stretch}
.v14-rich-overview .profile-table a{color:#60400d!important;text-decoration:underline;font-weight:800}
.v14-rich-overview .trade-row summary{color:#1b1710!important}

/* Forum: keep the clubhouse, but give the text a real reading surface. */
body[data-section="forum"] .forum-hero,
body[data-section="forum"] .forum-category,
body[data-section="forum"] .forum-thread,
body[data-section="forum"] .thread-card,
body[data-section="forum"] .forum-panel,
body[data-section="forum"] .forum-board-head,
body[data-section="forum"] .v11-forum-shell,
body[data-section="forum"] .v11-forum-shell article{
  background:rgba(244,235,215,.95)!important;
  color:#1a1712!important;
  border-color:#b99b69!important;
  text-shadow:none!important;
}
body[data-section="forum"] .forum-hero *,
body[data-section="forum"] .forum-category *,
body[data-section="forum"] .forum-thread *,
body[data-section="forum"] .thread-card *,
body[data-section="forum"] .forum-panel *,
body[data-section="forum"] .forum-board-head *,
body[data-section="forum"] .v11-forum-shell *{color:inherit}

/* Storylines: more editorial space, less repetitive bullet-list feeling. */
.v14-storyline-card{background:rgba(14,17,18,.94);border:1px solid rgba(221,190,122,.35);padding:22px;display:grid;gap:16px}
.v14-storyline-card header{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px}
.v14-storyline-card header h2{margin:.15rem 0;color:#fff}
.v14-storyline-feature{background:#eee4d0;color:#18150f;padding:18px 20px;border-left:5px solid #a87422}
.v14-storyline-feature em{display:block;font-style:normal;font-weight:900;letter-spacing:.09em;color:#7d4c08;margin-bottom:6px}
.v14-storyline-feature h3{font-size:1.35rem;margin:0 0 6px;color:#18150f}
.v14-storyline-feature p{margin:0;color:#2b261d;line-height:1.55}
.v14-storyline-notes{display:grid;gap:8px}
.v14-storyline-notes p{margin:0;padding:10px 12px;background:rgba(255,255,255,.06);color:#efe7d8}
.v14-ai-chip{display:inline-flex;gap:6px;align-items:center;font-size:.72rem;font-weight:900;letter-spacing:.08em;color:#d9bc7a}

@media(max-width:760px){
  body[data-section="teams"],body[data-section="press"]{background-attachment:scroll!important}
  body[data-section="teams"] .profile-tabs-v11{overflow:auto;flex-wrap:nowrap}
  body[data-section="teams"] .profile-tabs-v11 button{white-space:nowrap}
}

/* V14.1 hotfix — exact user-supplied lore backgrounds + storyline containment */
body[data-section="teams"]{
  background:
    linear-gradient(rgba(8,8,7,.54),rgba(8,8,7,.78)),
    url('assets/art/teams-lore-newspaper.png') center top/cover fixed no-repeat!important;
}
body[data-section="press"]{
  background:
    linear-gradient(rgba(8,8,7,.52),rgba(8,8,7,.76)),
    url('assets/art/press-lore-newspaper.png') center top/cover fixed no-repeat!important;
}

/* Sleeper avatars arrive as unconstrained images; never let them determine card geometry. */
.v14-storyline-card{min-width:0;max-width:100%;overflow:hidden}
.v14-storyline-card header{min-width:0;grid-template-columns:58px minmax(0,1fr) 58px!important}
.v14-storyline-card header>div{min-width:0}
.v14-storyline-card header h2{overflow-wrap:anywhere}
.v14-team-logo{
  display:block!important;
  width:54px!important;
  height:54px!important;
  min-width:54px!important;
  max-width:54px!important;
  min-height:54px!important;
  max-height:54px!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:12px!important;
  background:#f5f2ea!important;
  padding:4px!important;
  box-sizing:border-box!important;
  box-shadow:0 0 0 1px rgba(221,190,122,.36)!important;
}
.v14-storyline-feature,.v14-storyline-notes,.v14-storyline-card>a,.v14-ai-chip{min-width:0;max-width:100%}
.v14-storyline-feature p,.v14-storyline-notes p{overflow-wrap:anywhere}
.v12-storyline-grid{align-items:start}

@media(max-width:760px){
  .v14-storyline-card{padding:15px}
  .v14-storyline-card header{grid-template-columns:44px minmax(0,1fr) 44px!important;gap:9px}
  .v14-team-logo{width:42px!important;height:42px!important;min-width:42px!important;max-width:42px!important;min-height:42px!important;max-height:42px!important}
}


/* V14.2 — exact background visibility + stable storyline team logos */
/* The previous build did contain the correct files, but the inherited archive .page layer
   was ~91% opaque and hid them. These rules deliberately expose the actual supplied art. */
body[data-section="teams"]{
  background-color:#18120d!important;
  background-image:linear-gradient(rgba(18,13,9,.24),rgba(18,13,9,.40)),url('assets/art/teams-lore-newspaper.png')!important;
  background-position:center top!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  background-attachment:fixed!important;
}
body[data-section="press"]{
  background-color:#18120d!important;
  background-image:linear-gradient(rgba(18,13,9,.20),rgba(18,13,9,.36)),url('assets/art/press-lore-newspaper.png')!important;
  background-position:center top!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  background-attachment:fixed!important;
}
body[data-section="teams"].archive-surface:before,
body[data-section="press"].archive-surface:before{display:none!important}
body[data-section="teams"] .page,
body[data-section="press"] .page{
  background:transparent!important;
  box-shadow:none!important;
}
/* Keep text readable while leaving large uninterrupted windows onto the newspaper wall. */
body[data-section="teams"] .page-title,
body[data-section="press"] .page-title,
body[data-section="press"] .section-head,
body[data-section="press"] .press-folder-tabs{
  background:rgba(12,13,12,.92)!important;
  border:1px solid rgba(232,207,159,.28)!important;
  box-shadow:0 12px 34px rgba(0,0,0,.26)!important;
}
body[data-section="teams"] .page-title h1,
body[data-section="teams"] .page-title p,
body[data-section="press"] .page-title h1,
body[data-section="press"] .page-title p,
body[data-section="press"] .section-head h2,
body[data-section="press"] .section-head .kicker{color:#f8f0df!important}
body[data-section="press"] .press-folder-tabs a{color:#f4ead7!important}
body[data-section="press"] .press-folder-tabs a:hover{background:#ead9b6!important;color:#15120e!important}

/* Storylines always use the site's stable local franchise marks. */
.v14-storyline-card header{
  grid-template-columns:64px minmax(0,1fr) 64px!important;
  overflow:hidden;
}
.v14-storyline-card .v14-team-logo{
  display:block!important;
  width:60px!important;
  height:60px!important;
  min-width:60px!important;
  max-width:60px!important;
  min-height:60px!important;
  max-height:60px!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:50%!important;
  background:#f4efe4!important;
  padding:5px!important;
  border:2px solid rgba(222,190,119,.55)!important;
  box-sizing:border-box!important;
}
@media(max-width:900px){
  body[data-section="teams"],body[data-section="press"]{background-attachment:scroll!important}
  .v14-storyline-card header{grid-template-columns:48px minmax(0,1fr) 48px!important}
  .v14-storyline-card .v14-team-logo{width:46px!important;height:46px!important;min-width:46px!important;max-width:46px!important;min-height:46px!important;max-height:46px!important;padding:4px!important}
}
