/* =========================================================
   V160 — component-scoped contrast + explicit ranking fixture
   =========================================================
   Rule: a dark child surface inside a light section must keep its own
   contrast. Legacy `.section.light ... { color:... !important }` rules
   are not allowed to leak into components marked data-surface="dark".
*/

/* Reusable dark-surface contract. Keep this AFTER legacy/global CSS. */
.section.light [data-surface="dark"],
.light [data-surface="dark"],
[data-surface="dark"]{
  background:#101311!important;
  color:#f7f9f7!important;
  border-color:#303631!important;
}

/* Primary text on dark surfaces: always high contrast. */
.section.light [data-surface="dark"] :is(h1,h2,h3,h4,h5,h6,strong,b),
.light [data-surface="dark"] :is(h1,h2,h3,h4,h5,h6,strong,b),
[data-surface="dark"] :is(h1,h2,h3,h4,h5,h6,strong,b){
  color:#fff!important;
}

/* Secondary/meta copy on dark surfaces: readable, but visually secondary. */
.section.light [data-surface="dark"] :is(p,small,time,.meta,[class*="meta"],[class*="subline"]),
.light [data-surface="dark"] :is(p,small,time,.meta,[class*="meta"],[class*="subline"]),
[data-surface="dark"] :is(p,small,time,.meta,[class*="meta"],[class*="subline"]){
  color:#c9d0cb!important;
}

/* Never allow the legacy light-section span rule to black out dark cards. */
.section.light [data-surface="dark"] span,
.light [data-surface="dark"] span,
[data-surface="dark"] span{
  color:inherit!important;
}

/* Ranking visit: make fixture/opponent unmistakable. */
.visit-match-v159[data-surface="dark"]{
  background:#101311!important;
  border-bottom:1px solid #303631!important;
}
.visit-fixture-label-v160{
  margin:0 0 7px;
  color:#8fd0b0!important;
  font-size:.68rem;
  line-height:1;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.visit-match-v159[data-surface="dark"] .meta,
.visit-match-v159[data-surface="dark"] .meta span{
  color:#c8d0cb!important;
}
.visit-match-v159[data-surface="dark"] h3{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:.18em .42em;
  margin:0!important;
  color:#fff!important;
  font-size:clamp(1.2rem,2.7vw,1.72rem)!important;
  line-height:1.16!important;
}
.visit-match-v159[data-surface="dark"] .visit-team-v160{
  color:#fff!important;
  font:inherit;
}
.visit-match-v159[data-surface="dark"] .visit-vs-v160{
  color:#8fd0b0!important;
  font-size:.56em;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
  white-space:nowrap;
}
.visit-match-v159[data-surface="dark"] .result{
  color:#fff!important;
  background:transparent!important;
}

/* Accessible selection/focus on the new dark component. */
.visit-match-v159[data-surface="dark"] ::selection{background:#8fd0b0;color:#0b1711}

@media(max-width:700px){
  .visit-match-v159[data-surface="dark"] h3{
    display:grid;
    grid-template-columns:1fr;
    gap:3px;
    font-size:1.28rem!important;
  }
  .visit-match-v159[data-surface="dark"] .visit-vs-v160{
    font-size:.62rem;
  }
  .visit-fixture-label-v160{font-size:.62rem}
}
