/* Cards, chips, meters and the pieces each view is built from. */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.15rem; }
.grid2 { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 860px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.list li:first-child { padding-top: 0; }
.list li:last-child { border-bottom: 0; padding-bottom: 0; }
.list + h3 { margin-top: 1.2rem; }
.sw { display: inline-block; width: 1rem; height: 1rem; border-radius: 4px; flex: none; }
.logo { object-fit: contain; flex: none; }

/* ---------- player photo ---------- */
/* A cut-out headshot on the team color. The initials sit underneath and show
   when ESPN has no photo. */
.av {
  position: relative; flex: none; display: grid; place-items: end center; overflow: hidden;
  width: 3.5rem; height: 3.5rem; border-radius: 13px;
  background: linear-gradient(155deg, var(--team), color-mix(in srgb, var(--team) 62%, #000));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14);
}
.av::before { content: attr(data-initials); position: absolute; inset: 0; display: grid; place-items: center; font: 700 1.1em/1 var(--display); color: rgb(255 255 255 / .85); letter-spacing: .03em; }
.av img { position: relative; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform: scale(1.18); transform-origin: 50% 12%; }
.av-sm { width: 2.75rem; height: 2.75rem; border-radius: 11px; font-size: .9rem; }
.av-lg { width: 4.75rem; height: 4.75rem; border-radius: 16px; font-size: 1.4rem; }

.pl { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.pl-name { display: block; font-weight: 700; }
.pl:hover .pl-name { text-decoration: underline; }
.pl-meta { display: block; color: var(--muted); font-size: .84rem; }
.tm { display: inline-flex; align-items: center; gap: .55rem; }

/* ---------- grades, tags, meters ---------- */
.grade { display: inline-block; border-radius: 999px; padding: .12rem .65rem; font-weight: 700; font-size: .8rem; white-space: nowrap; border: 1.5px solid transparent; }
.g1 { background: var(--good); color: var(--surface); border-color: var(--good); }
.g2 { background: var(--good-bg); color: var(--good); border-color: var(--good); }
.g3 { background: var(--panel); color: var(--ink); border-color: var(--line-strong); }
.g4 { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.g5 { background: var(--bad); color: var(--surface); border-color: var(--bad); }
.tag { display: inline-block; font-weight: 700; font-size: .74rem; padding: .05rem .5rem; border: 1.5px solid var(--line-strong); border-radius: 999px; vertical-align: 1px; }
.tag.out { background: var(--bad); color: var(--surface); border-color: var(--bad); }
.tag.q { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.meter { display: inline-flex; align-items: center; gap: .55rem; }
.meter-track { width: 72px; height: 8px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--flag); border-radius: 999px; }
/* The edge score is always yellow on navy, wherever it shows up. */
.meter b, .edge-num { font: 800 italic 1.25rem/1 var(--display); color: var(--flag); }
.meter b { min-width: 2.3rem; text-align: center; padding: .2rem .4rem; border-radius: 7px; background: var(--night); }
.edge-num { font-size: 1.15em; }

/* ---------- week controls ---------- */
.stepper { display: inline-flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.stepper button, .stepper select { border: 0; border-radius: 0; background: transparent; padding: .6rem .85rem; }
.stepper select { border-inline: 1px solid var(--line); font-weight: 600; background-color: var(--surface); }
.stepper svg { width: 1.1rem; height: 1.1rem; display: block; }
.filters { display: inline-flex; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; }
.filters button { border: 0; border-radius: 999px; padding: .5rem 1rem; background: transparent; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- rails: side-scrolling rows of cards on phones, grids on desktops ---------- */
.rail { display: flex; align-items: flex-start; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px var(--pad) .6rem; margin: 0 calc(var(--pad) * -1); scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: 0 0 min(84vw, 20.5rem); scroll-snap-align: center; }
@media (min-width: 760px) {
  .rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(18.5rem, 1fr)); overflow: visible; padding: 0; margin: 0; gap: 1rem; }
}

/* ---------- the week at a glance ---------- */
.board { margin: 0 0 .4rem; }
.board .rail { align-items: stretch; }
.board .rail > * { flex-basis: min(72vw, 16rem); }
@media (min-width: 760px) { .board .rail { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); } }
.glance {
  display: flex; flex-direction: column; gap: .5rem; text-decoration: none; color: var(--on-night);
  background: var(--night); border: 1px solid var(--night-2); border-top: 3px solid var(--flag); border-radius: var(--r); padding: .9rem 1.05rem 1.05rem; min-height: 8.2rem;
}
.glance-k { font-size: .82rem; font-weight: 600; color: var(--flag); }
.glance-teams { display: flex; align-items: center; gap: .4rem; font: 700 1.25rem/1 var(--display); }
.glance-teams i { font: 400 .8rem var(--text); color: var(--on-night-muted); margin: 0 .1rem; }
.glance-big { font: 700 1.45rem/1.1 var(--display); display: flex; align-items: center; gap: .45rem; }
.glance-big svg { width: 1.3rem; height: 1.3rem; }
.glance-sub { font-size: .86rem; color: var(--on-night-muted); }
.glance-row { display: flex; align-items: center; gap: .7rem; }
.glance-row > span:not(.av) { flex: 1; min-width: 0; }
.glance-row b { display: block; font: 700 1.25rem/1.1 var(--display); }
.glance-row small { display: block; color: var(--on-night-muted); font-size: .84rem; margin-top: .15rem; }

/* ---------- game tiles ---------- */
.dayhead { font: 600 .95rem/1.2 var(--text); color: var(--muted); margin: 1.9rem 0 .8rem; display: flex; align-items: center; gap: 1rem; }
.dayhead::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.slate { display: grid; gap: .8rem; }
@media (min-width: 620px) { .slate { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1rem; } }
.tile { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.tile-when { display: flex; justify-content: space-between; align-items: baseline; padding: .7rem 1rem .1rem; font-size: .86rem; }
.tile-when span { color: var(--muted); font-size: .78rem; }
.tile-team { display: flex; align-items: center; gap: .8rem; padding: .55rem 1rem; }
.tile-name { flex: 1; min-width: 0; }
.tile-name b { display: block; font: 800 1.55rem/1 var(--display); letter-spacing: .01em; }
.tile-name span { display: block; font-size: .86rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-name i { font-style: normal; margin-left: .25rem; }
.tile-score { font: 800 2rem/1 var(--display); }
.tile-proj { font: 700 1.45rem/1 var(--display); color: var(--muted); }
.tile-meta { display: flex; justify-content: space-between; gap: .6rem; margin-top: .35rem; padding: .6rem 1rem; background: var(--panel); border-top: 1px solid var(--line); font-size: .9rem; font-weight: 600; }

/* ---------- player card ---------- */
.spot { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.spot:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.spot-top {
  display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .8rem .9rem;
  background: linear-gradient(100deg, var(--team) 0 62%, color-mix(in srgb, var(--team) 80%, #000) 62% 100%); color: var(--on-team);
}
.spot-top .av { box-shadow: 0 0 0 2px rgb(255 255 255 / .28); background: linear-gradient(155deg, color-mix(in srgb, var(--team) 78%, #fff), color-mix(in srgb, var(--team) 70%, #000)); }
.spot-name { font: 700 1.35rem/1.05 var(--display); }
.spot-meta { font-size: .82rem; opacity: .88; margin-top: .2rem; }
.spot-score { text-align: center; min-width: 3.3rem; padding: .35rem .5rem; border-radius: 10px; background: var(--night); color: #fff; }
.spot-score b { display: block; font: 800 italic 1.9rem/1 var(--display); }
.spot-score.is-edge b { color: var(--flag); }
.spot-score span { font-size: .68rem; font-weight: 600; white-space: nowrap; }
.spot-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-size: .9rem; padding: .65rem .9rem; }
.spot-row + .spot-row { border-top: 1px solid var(--line); }
.spark { flex: none; }

/* ---------- game page ---------- */
.hero { display: grid; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.hero-side { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; background: var(--team); color: var(--on-team); }
.disc { flex: none; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px rgb(255 255 255 / .3); }
.disc img { width: 70%; height: 70%; }
.hero-city { font-weight: 500; font-size: .92rem; opacity: .9; }
.hero-name { font: 800 italic 2.3rem/1 var(--display); text-transform: uppercase; }
.hero-rec { font-weight: 600; font-size: .9rem; margin-top: .2rem; opacity: .95; }
.hero-score { margin-left: auto; font: 800 3rem/1 var(--display); }
.hero-mid { order: -1; padding: .9rem 1.2rem; text-align: center; display: flex; flex-direction: column; gap: .15rem; }
.hero-when { font: 700 1.35rem/1.1 var(--display); }
.hero-line { display: flex; justify-content: center; gap: .5rem; margin-top: .5rem; }
.hero-line span { padding: .3rem .85rem; border-radius: 999px; background: var(--night); color: #fff; font-weight: 700; font-size: .92rem; }
@media (min-width: 860px) {
  .hero { grid-template-columns: 1fr minmax(15rem, auto) 1fr; }
  .hero-mid { order: 0; justify-content: center; padding: 1.4rem 1.6rem; }
  .hero-side { padding: 1.7rem 1.9rem; }
  .hero-side.away { clip-path: polygon(0 0, 100% 0, calc(100% - 1.6rem) 100%, 0 100%); padding-right: 3rem; }
  .hero-side.home { flex-direction: row-reverse; text-align: right; clip-path: polygon(1.6rem 0, 100% 0, 100% 100%, 0 100%); padding-left: 3rem; }
  .hero-side.home .hero-score { margin: 0 auto 0 0; }
  .hero-name { font-size: 3rem; }
  .disc { width: 6rem; height: 6rem; }
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; font-size: .86rem; font-weight: 500; background: var(--surface); }
.chip svg { width: 1rem; height: 1rem; flex: none; color: var(--muted); }

.tabs { display: flex; gap: .15rem; border-bottom: 1px solid var(--line-strong); margin: 1.5rem calc(var(--pad) * -1) 0; padding: 0 var(--pad); overflow-x: auto; scrollbar-width: none; position: sticky; top: calc(3.75rem + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--bg); }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; border-radius: 0; background: none; padding: .85rem .8rem .7rem; font: 700 1.15rem/1 var(--display); letter-spacing: .02em; color: var(--muted); white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }

.notes { list-style: none; margin: 0; padding: .2rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.notes li { padding: .85rem 0 .85rem 1.25rem; border-bottom: 1px solid var(--line); position: relative; }
.notes li:last-child { border-bottom: 0; }
.notes li::before { content: ""; position: absolute; left: 0; top: 1.4rem; width: 8px; height: 8px; background: var(--flag); transform: skewX(-14deg); }

.tape-key { display: flex; gap: 1.2rem; flex-wrap: wrap; font-weight: 700; margin-bottom: .5rem; }
.tape-key span { display: inline-flex; align-items: center; gap: .45rem; }
.tape-row { display: grid; grid-template-columns: 3.6rem 1fr 1fr 3.6rem; grid-template-areas: "l l l l" "va ba bh vh"; gap: .25rem .6rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.tape-l { grid-area: l; text-align: center; font-size: .86rem; color: var(--muted); }
.tape-v { font: 700 1.5rem/1 var(--display); }
.tape-v small { display: block; font: 500 .72rem/1 var(--text); color: var(--muted); margin-top: .3rem; }
.tape-v.a { grid-area: va; text-align: right; }
.tape-v.h { grid-area: vh; }
.tape-v.best b { box-shadow: inset 0 -3px var(--flag); }
.bar { height: 12px; display: flex; }
.bar.a { grid-area: ba; justify-content: flex-end; }
.bar.h { grid-area: bh; }
.bar i { display: block; height: 100%; border-radius: 4px; border: 2px solid; }
.tape-text { grid-template-columns: 1fr auto 1fr; grid-template-areas: "va l vh"; }
.tape-text .tape-v { font-size: 1.25rem; }
.tape-text .tape-v.a { text-align: left; }
.tape-text .tape-v.h { text-align: right; }
.tape > p { margin-top: .9rem; }
@media (min-width: 860px) {
  .tape-row { grid-template-columns: 5.4rem 1fr minmax(10rem, 15rem) 1fr 5.4rem; grid-template-areas: "va ba l bh vh"; gap: .8rem; }
}

.kpis { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 1rem; }
.kpis > div { padding: .9rem 1rem; box-shadow: 1px 1px 0 var(--line); }
.kpis b { display: block; font: 800 2.1rem/1 var(--display); margin-bottom: .3rem; }
.kpis span { font-size: .84rem; color: var(--muted); }
.kpi-edge { background: var(--night); }
.kpi-edge b { color: var(--flag); font-style: italic; }
.kpis .kpi-edge span { color: var(--on-night-muted); }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); } }

.winprob { display: flex; height: 3rem; border-radius: var(--r-sm); overflow: hidden; font: 700 1.2rem/1 var(--display); }
.winprob div { display: flex; align-items: center; padding: 0 .8rem; white-space: nowrap; min-width: 5.5rem; }
.winprob div:last-child { justify-content: flex-end; }

.search { display: flex; align-items: center; gap: .6rem; max-width: 26rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 1rem; margin-bottom: .7rem; }
.search svg { width: 1.1rem; height: 1.1rem; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; background: none; padding: .7rem 0; min-width: 0; }
.search input:focus { outline: none; }
.search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- notes: storylines, sideline, oddities ---------- */
.notegrid { display: grid; gap: .7rem; }
@media (min-width: 620px) { .notegrid { grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); } }
.note { display: grid; grid-template-columns: 2.4rem 1fr; gap: .8rem; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1rem; }
.note-ic { width: 2.4rem; height: 2.4rem; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.note-ic svg { width: 1.2rem; height: 1.2rem; }
.note b { display: block; margin-bottom: .15rem; line-height: 1.3; }
.note div span { display: block; color: var(--muted); font-size: .9rem; }
.note a { display: inline-block; margin-top: .35rem; font-size: .86rem; font-weight: 600; color: var(--brand); }

/* ---------- player page ---------- */
.phero {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "photo id" "vs vs"; align-items: end; column-gap: .6rem;
  border-radius: var(--r-lg); overflow: hidden; color: var(--on-team); padding: 1.1rem 1.1rem 0;
  background: linear-gradient(115deg, var(--team) 0 58%, color-mix(in srgb, var(--team) 78%, #000) 58% 100%);
}
.phero-num { position: absolute; right: -.1em; top: -.16em; font: 800 italic 11rem/1 var(--display); color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--on-team) 20%, transparent); pointer-events: none; user-select: none; }
.phero-photo { grid-area: photo; position: relative; width: 45vw; max-width: 13rem; height: 38vw; max-height: 11rem; margin-left: -.7rem; align-self: end; display: grid; place-items: end center; }
.phero-photo::before { content: attr(data-initials); position: absolute; inset: auto 0 .8rem 0; text-align: center; font: 800 3rem/1 var(--display); opacity: .35; }
.phero-photo img { position: relative; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; filter: drop-shadow(0 8px 14px rgb(0 0 0 / .35)); }
.phero-id { grid-area: id; position: relative; padding-bottom: 1rem; min-width: 0; }
.phero-id h1 { font-size: clamp(1.8rem, 7.6vw, 3.6rem); overflow-wrap: anywhere; }
.phero-id p { font-size: .92rem; }
.phero-id p { margin: .35rem 0 0; font-weight: 600; }
.phero-id .phero-bio { font-weight: 400; font-size: .9rem; opacity: .9; }
.phero-vs { grid-area: vs; position: relative; display: flex; align-items: center; gap: .7rem; margin: 0 -1.1rem; padding: .7rem 1.1rem; background: rgb(0 0 0 / .28); color: #fff; font: 700 1.3rem/1 var(--display); }
.phero-vs .disc { width: 2.6rem; height: 2.6rem; box-shadow: none; }
.phero-vs small { display: block; font: 400 .82rem/1.2 var(--text); opacity: .85; margin-top: .15rem; }
@media (min-width: 760px) {
  .phero { grid-template-columns: auto 1fr auto; grid-template-areas: "photo id vs"; padding: 1.6rem 2rem 0; column-gap: 1.6rem; }
  .phero-photo { width: 17rem; max-width: none; height: 13rem; max-height: none; margin-left: 0; }
  .phero-id p { font-size: 1rem; }
  .phero-id { padding-bottom: 1.6rem; }
  .phero-num { font-size: 17rem; right: 16rem; }
  .phero-vs { align-self: center; margin: 0 0 1.6rem; padding: .8rem 1.1rem; border-radius: var(--r); }
}

.strip { display: grid; grid-template-columns: repeat(var(--n, 32), 1fr); gap: 2px; margin: 1rem 0 .4rem; }
.strip i { height: 22px; border-radius: 3px; display: block; border: 0; }
.strip i.me { outline: 3px solid var(--ink); outline-offset: 1px; position: relative; }
.strip-ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }

.prop { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; margin-bottom: .8rem; }
.prop label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .84rem; color: var(--muted); }
.prop select { max-width: 13rem; }
.prop input { width: 6.5rem; }
.hits { flex: 1 1 100%; font-size: 1.02rem; padding: .2rem 0; }
.splits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; margin-top: 1rem; }
.splits div { background: var(--panel); padding: .6rem .8rem; }
.splits span { display: block; font-size: .8rem; color: var(--muted); }
.splits b { font: 700 1.5rem/1.1 var(--display); margin-right: .4rem; }
.splits small { color: var(--muted); font-size: .76rem; }
@media (min-width: 760px) { .splits { grid-template-columns: repeat(6, 1fr); } }

.chart-scroll { overflow-x: auto; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart text { font-family: var(--text); }
.chart-col { cursor: pointer; }
.chart-readout { margin: .5rem 0 0; padding: .55rem .75rem; border-radius: var(--r-sm); background: var(--panel); font-size: .9rem; line-height: 1.45; white-space: pre-line; color: var(--muted); }
.chart-readout::first-line { font-weight: 700; color: var(--ink); }
.legend { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .84rem; margin-top: .5rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }

/* ---------- trends ---------- */
.streaks { display: grid; gap: .6rem; }
@media (min-width: 620px) { .streaks { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); } }
.streak { display: flex; align-items: center; gap: .8rem; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .6rem .9rem .6rem .6rem; }
.streak-n { font: 800 italic 2.4rem/1 var(--display); color: var(--brand); min-width: 2.2rem; text-align: center; }
.streak b { display: block; }
.streak small { display: block; color: var(--muted); font-size: .86rem; }
