@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/barlow-condensed-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-sans-3-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/source-sans-3-latin-700-normal.woff2') format('woff2');
}

/* Tapper LIGHT palette — from native/theme/tokens.ts */
:root {
  --pitch: #fafaf7;
  --pitch-line: #8a8a82;
  --pitch-line-strong: #4a4a44;
  --chrome: #edede8;
  --chrome-edge: #c9c9c1;
  --ink: #141412;
  --ink-muted: #5c5c56;
  --won: #1b6b3a;
  --lost: #a32020;
  --score: #9a6b00;
  --pending: #1f5fa8;
  --pin: #5a9e9a;
  --team-a: #7b1113;
  --team-b: #0b6e3a;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--chrome);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

body.embed {
  background: transparent;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: var(--chrome);
  border-bottom: 1px solid var(--chrome-edge);
}

.site-footer {
  border-bottom: none;
  border-top: 1px solid var(--chrome-edge);
  color: var(--ink-muted);
  font-size: 0.8rem;
}

body.embed .site-header,
body.embed .site-footer {
  display: none;
}

.brand-home {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.brand-home:hover .brand-word,
.brand-home:focus-visible .brand-word {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.brand-home:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.brand-mark {
  width: 36px;
  height: 39px;
  flex-shrink: 0;
}

.brand-mark img,
.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-word {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}

.brand-sub {
  display: block;
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.app {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 1.5rem;
}

body.embed .app {
  max-width: none;
  margin: 0;
  padding: 0.35rem 0.35rem 0.5rem;
}

.embed-pin {
  display: none;
  width: 22px;
  height: 24px;
  margin: 0 0 0.35rem;
}

body.embed .embed-pin {
  display: block;
}

/* Scoreboard */
.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}

.team {
  min-width: 0;
}

.team-a {
  text-align: left;
}

.team-b {
  text-align: right;
}

.team-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 1.85rem;
  padding: 0.28rem 0.55rem;
  background: var(--badge, var(--chrome-edge));
  color: var(--badge-ink, var(--ink));
  border-radius: 2px;
}

.team-a .team-badge {
  border-left: 3px solid var(--badge-ink, var(--ink));
}

.team-b .team-badge {
  border-right: 3px solid var(--badge-ink, var(--ink));
  margin-left: auto;
}

.team-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.95rem, 3.8vw, 1.35rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
  color: inherit;
  white-space: nowrap;
  overflow: visible;
  max-width: 100%;
}

.team-score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 7vw, 2.75rem);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-top: 0.2rem;
}

/* Rewatch: hold attention on the scoreline for ~3s after a score. */
.scoreboard.is-score-hold .team-score {
  transform: scale(1.04);
  transition: transform 0.2s ease;
}

.score-goals,
.score-points {
  font: inherit;
}

.score-goals {
  /* Goals stand apart from points in the G-PP line */
  text-decoration: underline;
  text-underline-offset: 0.12em;
  text-decoration-thickness: 2px;
}

.team-a .team-score,
.team-a .score-goals {
  color: var(--team-a);
}

.team-b .team-score,
.team-b .score-goals {
  color: var(--team-b);
}

.score-sep {
  opacity: 0.55;
  margin: 0 0.02em;
}

.clock-block {
  text-align: center;
  padding-bottom: 0.15rem;
}

.clock {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.clock-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}


.half-banner {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--score);
  border-top: 1px solid var(--chrome-edge);
  border-bottom: 1px solid var(--chrome-edge);
  padding: 0.45rem 0;
  margin: 0.15rem 0 0;
  background: var(--pitch);
}

.half-banner.visible {
  display: block;
}

body.embed .half-banner {
  background: transparent;
}

/* Rewatch play flash — reserved slot between clock and pitch (no layout shift). */
.play-flash {
  position: relative;
  height: clamp(1.35rem, 4.8vw, 1.85rem);
  margin: -0.15rem 0 0.55rem;
  pointer-events: none;
}

.play-flash-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.1;
  color: var(--flash-team, var(--ink));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.play-flash.is-on .play-flash-msg {
  opacity: var(--flash-weight, 1);
}

.play-flash.is-out .play-flash-msg {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.play-flash[data-kind='goal'] {
  --flash-weight: 1;
}

.play-flash[data-kind='goal'] .play-flash-msg {
  font-size: clamp(1.05rem, 4.4vw, 1.5rem);
  letter-spacing: 0.18em;
}

.play-flash[data-kind='point'] {
  --flash-weight: 0.95;
}

.play-flash[data-kind='2pt'] {
  --flash-weight: 1;
}

.play-flash[data-kind='point'] .play-flash-msg {
  font-size: clamp(0.95rem, 3.8vw, 1.28rem);
  letter-spacing: 0.15em;
}

.play-flash[data-kind='2pt'] .play-flash-msg {
  font-size: clamp(1rem, 4vw, 1.35rem);
  letter-spacing: 0.16em;
}

.play-flash[data-kind='wide'],
.play-flash[data-kind='save'],
.play-flash[data-kind='shot'] {
  --flash-weight: 0.72;
}

.play-flash[data-kind='wide'] .play-flash-msg,
.play-flash[data-kind='save'] .play-flash-msg,
.play-flash[data-kind='shot'] .play-flash-msg {
  font-size: clamp(0.82rem, 3.2vw, 1.08rem);
  letter-spacing: 0.12em;
}

.play-flash[data-kind='turnover'],
.play-flash[data-kind='sideline'] {
  --flash-weight: 0.48;
}

.play-flash[data-kind='turnover'] .play-flash-msg,
.play-flash[data-kind='sideline'] .play-flash-msg {
  font-size: clamp(0.68rem, 2.7vw, 0.92rem);
  font-weight: 400;
  letter-spacing: 0.1em;
}

@media (max-width: 300px) {
  .play-flash {
    height: 1.25rem;
    margin-bottom: 0.4rem;
  }

  .play-flash-msg {
    letter-spacing: 0.08em;
    padding: 0 0.2rem;
  }
}

/* Possession strip — dual band, key events only */
.poss-strip-block {
  margin: 0.55rem 0 0.65rem;
}

.poss-strip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.poss-strip-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.poss-strip-head-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.55rem 0.75rem;
  min-width: 0;
}

.poss-strip-readout {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poss-back-live {
  margin: 0;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--chrome-edge);
  background: var(--ink);
  color: var(--pitch);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1.2;
}

.poss-back-live:hover,
.poss-back-live:focus-visible {
  background: var(--pin);
  border-color: var(--pin);
  outline: none;
}

.poss-strip-legend {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.poss-strip-legend .leg {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.poss-strip-legend .leg::before {
  content: '';
  display: block;
  flex-shrink: 0;
}

.leg-goal::before {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--pitch);
  outline: 1.5px solid var(--ink);
}

.leg-point::before {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: 2px solid var(--ink-muted);
  background: transparent;
  box-sizing: border-box;
}

.leg-2pt::before {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  border: 2px solid var(--ink-muted);
  background: transparent;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1.5px var(--pitch), inset 0 0 0 3px var(--ink-muted);
}

.leg-wide::before {
  width: 0.5rem;
  height: 0.5rem;
  background:
    linear-gradient(
      to top right,
      transparent calc(50% - 1px),
      var(--ink-muted) calc(50% - 1px),
      var(--ink-muted) calc(50% + 1px),
      transparent calc(50% + 1px)
    ),
    linear-gradient(
      to top left,
      transparent calc(50% - 1px),
      var(--ink-muted) calc(50% - 1px),
      var(--ink-muted) calc(50% + 1px),
      transparent calc(50% + 1px)
    );
}

.leg-save::before {
  width: 0.42rem;
  height: 0.42rem;
  border: 1.5px solid var(--ink-muted);
  background:
    linear-gradient(
      to top right,
      transparent calc(50% - 0.7px),
      var(--ink-muted) calc(50% - 0.7px),
      var(--ink-muted) calc(50% + 0.7px),
      transparent calc(50% + 0.7px)
    );
}

.poss-strip {
  display: block;
  width: 100%;
  height: 3.5rem;
  background: var(--pitch);
  border: 1px solid var(--chrome-edge);
  flex: 1 1 auto;
  min-width: 0;
  touch-action: manipulation;
}

.poss-strip.is-lookback {
  box-shadow: inset 0 0 0 1px var(--pin);
}

.strip-unplayed {
  fill: rgba(20, 20, 18, 0.045);
  pointer-events: none;
}

.strip-seg {
  cursor: pointer;
}

.strip-seg-hit {
  pointer-events: all;
}

.strip-seg.is-selected > rect:nth-child(1),
.strip-seg.is-selected > rect:nth-child(2) {
  stroke: var(--ink);
  stroke-width: 1.25;
  paint-order: stroke fill;
}

.strip-seg.is-selected > rect:nth-child(2) {
  opacity: 0.55;
}

.strip-mark {
  cursor: pointer;
}

.strip-mark-hit {
  pointer-events: all;
}

.strip-mark > :not(.strip-mark-hit) {
  pointer-events: none;
}

.strip-mark.is-selected .strip-mark-hit {
  fill: rgba(20, 20, 18, 0.1);
  stroke: var(--ink);
  stroke-width: 1.5;
}

.strip-live-tip {
  stroke: var(--ink);
  stroke-width: 1.75;
  stroke-dasharray: 3.5 2.5;
  opacity: 0.9;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.poss-strip-track {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.poss-strip-track .poss-strip {
  width: 100%;
  flex: none;
}

.strip-scrubber {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.strip-scrubber[hidden] {
  display: none !important;
}

.strip-scrubber-ahead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--scrub-pct, 0%);
  right: 0;
  background: rgba(20, 20, 18, 0.45);
}

.strip-scrubber-needle {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: var(--scrub-pct, 0%);
  width: 5px;
  margin-left: -2.5px;
  background: #141412;
  border-radius: 1px;
  box-shadow:
    -2px 0 0 #fafaf7,
    2px 0 0 #fafaf7,
    0 0 0 1px rgba(20, 20, 18, 0.7);
}

.strip-scrubber-needle::before,
.strip-scrubber-needle::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  filter: drop-shadow(0 0 1px #fafaf7);
}

.strip-scrubber-needle::before {
  top: -1px;
  border-top: 10px solid #141412;
}

.strip-scrubber-needle::after {
  bottom: -1px;
  border-bottom: 10px solid #141412;
}

.poss-strip-frame {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem;
  align-items: stretch;
}

.poss-strip-side {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 0;
  max-width: 5.5rem;
  padding: 0.1rem 0;
}

.poss-strip-mid {
  stroke: var(--chrome-edge);
  stroke-width: 1;
  pointer-events: none;
}

.poss-band-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#poss-band-top {
  color: var(--team-a);
}

#poss-band-bot {
  color: var(--team-b);
}

@media (max-width: 360px) {
  .poss-strip-legend {
    display: none;
  }

  .poss-strip {
    height: 2.85rem;
  }

  .poss-strip-side {
    max-width: 3.25rem;
  }
}

body.embed .poss-strip {
  height: 2.75rem;
}

body.embed .poss-strip-legend {
  display: none;
}

/* Pitch — fixed aspect, pale surface */
.pitch-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 145 / 90;
  background: var(--pitch);
  border: 1px solid var(--chrome-edge);
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
}

.pitch-stage {
  display: grid;
  grid-template-columns: minmax(3.25rem, 5.5rem) 1fr minmax(3.25rem, 5.5rem);
  gap: 0.35rem;
  align-items: stretch;
  margin-bottom: 0.35rem;
}

.pitch-stage[data-has-ends='0'] {
  grid-template-columns: 1fr;
}

.pitch-stage[data-has-ends='0'] .end-rail {
  display: none;
}

.pitch-stage.ends-swapped .end-badge {
  outline: 2px solid var(--score);
  outline-offset: 2px;
}

.end-rail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  z-index: 2;
}

.end-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.5rem;
  height: 100%;
  max-height: 100%;
  padding: 0.35rem 0.25rem;
  overflow: hidden;
  background: transparent;
}

/* Name + colour before direction resolves — flat rail, no attack tip. */
.end-badge.no-chevron {
  background: var(--badge, var(--chrome-edge));
}

.end-badge .badge-chevron {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.end-badge.no-chevron .badge-chevron {
  display: none;
}

/* Tip apex flush with pitch-facing rail edge — no overhang onto the pitch. */
.end-badge.chevron-right .badge-chevron {
  width: 100%;
  left: 0;
  right: auto;
}

.end-badge.chevron-left .badge-chevron {
  width: 100%;
  right: 0;
  left: auto;
}

.badge-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.7rem, 2.6vw, 0.95rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--badge-ink, #fafaf7);
  text-align: center;
  line-height: 1.15;
  padding: 0 0.2rem;
  max-width: 100%;
  word-break: keep-all;
}

/* Keep abbr in the rectangular body; tip is ~22% of viewBox (28/128). */
.end-badge.chevron-right .badge-label {
  padding-right: 22%;
}

.end-badge.chevron-left .badge-label {
  padding-left: 22%;
}

.ends-note {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

@media (max-width: 360px) {
  .pitch-stage[data-has-ends='1'] {
    grid-template-columns: minmax(2.6rem, 3.6rem) 1fr minmax(2.6rem, 3.6rem);
    gap: 0.2rem;
  }

  .badge-label {
    letter-spacing: 0.06em;
    font-size: 0.65rem;
  }
}

.pitch-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pitch-line {
  stroke: var(--pitch-line);
  fill: none;
}

.pitch-line-strong {
  stroke: var(--pitch-line-strong);
  fill: none;
}

.pitch-spot {
  fill: var(--pitch-line-strong);
}

.goal-casing {
  stroke: rgba(20, 20, 18, 0.85);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.goal-core {
  stroke: var(--pitch-line-strong);
  stroke-width: 1.35;
  stroke-linecap: round;
}

.goal-posts line {
  stroke: var(--pitch-line-strong);
  stroke-width: 0.7;
  stroke-linecap: square;
  fill: none;
}

.trail {
  fill: none;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}

.ball {
  stroke: var(--ink);
  stroke-width: 0.35;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.45rem 0 0.55rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.status-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--ink-muted);
  margin-right: 0.35rem;
  vertical-align: middle;
}

.status-dot.live {
  background: var(--won);
}

.status-dot.reconnect {
  background: var(--score);
}

.status-dot.idle {
  background: var(--ink-muted);
}

/* Event feed */
.feed-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.4rem;
}

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--chrome-edge);
  max-height: min(40vh, 24rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.feed-item {
  display: grid;
  grid-template-columns: 3.4rem 5.5rem 1fr auto;
  gap: 0.4rem 0.65rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--chrome-edge);
  font-size: 0.88rem;
}

.feed-item .fc {
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.feed-item .ft {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-item .fk {
  color: var(--ink);
}

.feed-item .fr {
  color: var(--ink-muted);
  font-size: 0.8rem;
  text-align: right;
  white-space: nowrap;
}

.feed-item.is-score {
  background: color-mix(in srgb, var(--score) 8%, transparent);
}

.feed-item.is-score .fk,
.feed-item.is-score .fr {
  color: var(--score);
  font-weight: 700;
}

.feed-item.is-goal {
  background: color-mix(in srgb, var(--won) 10%, transparent);
}

.feed-item.is-goal .fk,
.feed-item.is-goal .fr {
  color: var(--won);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.feed-item.is-turnover .fk {
  color: var(--lost);
  font-weight: 700;
}

.feed-item.is-half {
  background: var(--pitch);
}

.feed-item.is-half .fk {
  color: var(--score);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feed-latest {
  display: none;
  padding: 0.45rem 0;
  border-top: 1px solid var(--chrome-edge);
  border-bottom: 1px solid var(--chrome-edge);
  font-size: 0.88rem;
}

.feed-latest .label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.15rem;
}

/* Responsive feed collapse */
@media (max-width: 500px) {
  .feed-item {
    grid-template-columns: 2.8rem 1fr auto;
  }

  .feed-item .ft {
    display: none;
  }
}

@media (max-width: 360px) {
  .feed {
    display: none;
  }

  .feed-title {
    display: none;
  }

  .feed-latest {
    display: block;
  }

  .scoreboard {
    gap: 0.35rem 0.4rem;
  }

  .team-name {
    font-size: 0.95rem;
  }
}

body.embed .feed-item:nth-child(n + 5) {
  display: none;
}

@media (max-width: 500px) {
  body.embed .feed-item:nth-child(n + 3) {
    display: none;
  }
}

@media (max-width: 360px) {
  body.embed .feed {
    display: none;
  }

  body.embed .feed-title {
    display: none;
  }

  body.embed .feed-latest {
    display: block;
  }
}

/* —— Match index —— */
.index-app {
  max-width: 40rem;
}

.index-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 6vw, 2.4rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  line-height: 1.1;
}

.index-lede {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.index-empty {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.match-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.match-card {
  display: block;
  color: inherit;
  background: var(--pitch);
  border: 1px solid var(--chrome-edge);
  padding: 0;
}

.match-card:hover,
.match-card:focus-within {
  border-color: var(--pitch-line-strong);
}

.match-card-main {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.9rem 1rem 1rem;
}

.match-card-main:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.match-card-tactical {
  display: block;
  margin: 0;
  padding: 0.55rem 1rem 0.7rem;
  border-top: 1px solid var(--chrome-edge);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-muted);
}

.match-card-tactical:hover,
.match-card-tactical:focus-visible {
  color: var(--ink);
  background: rgba(90, 158, 154, 0.12);
  outline: none;
}

.match-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.match-phase {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.phase-live {
  color: var(--won);
}

.phase-half {
  color: var(--score);
}

.phase-between {
  color: var(--ink-muted);
}

.phase-archive {
  color: var(--ink-muted);
}

/* —— Rewatch navigation —— */
.rewatch-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.rewatch-nav-btn {
  margin: 0;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--chrome-edge);
  background: var(--pitch);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1.2;
  touch-action: manipulation;
}

.rewatch-nav-btn:hover,
.rewatch-nav-btn:focus-visible {
  border-color: var(--pitch-line-strong);
  outline: none;
}

.rewatch-nav-play,
.rewatch-nav-stop {
  background: var(--ink);
  color: var(--pitch);
  border-color: var(--ink);
}

.rewatch-nav-play:hover,
.rewatch-nav-play:focus-visible,
.rewatch-nav-stop:hover,
.rewatch-nav-stop:focus-visible {
  background: var(--pin);
  border-color: var(--pin);
}

.rewatch-speed {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.15rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.rewatch-speed-label {
  white-space: nowrap;
}

.rewatch-speed select {
  margin: 0;
  padding: 0.22rem 0.35rem;
  border: 1px solid var(--chrome-edge);
  background: var(--pitch);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  line-height: 1.2;
}

.poss-strip.is-selected {
  box-shadow: inset 0 0 0 1px var(--pin);
}

.feed-item.is-selected {
  outline: 1.5px solid var(--pin);
  outline-offset: -1px;
  background: rgba(90, 158, 154, 0.12);
}

@media (max-width: 360px) {
  .rewatch-nav-btn {
    padding: 0.32rem 0.45rem;
    font-size: 0.62rem;
  }

  .poss-strip-readout {
    max-width: 7.5rem;
  }
}

.match-clock {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.match-teams {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 4.5vw, 1.55rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
}

.match-vs {
  color: var(--ink-muted);
  font-weight: 400;
  font-size: 0.85em;
}

.match-score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  letter-spacing: 0.02em;
  margin-top: 0.35rem;
  line-height: 1.1;
}

.match-meta {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.match-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.match-back {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.match-back:hover,
.match-back:focus-visible {
  color: var(--ink);
  outline: none;
}

body.embed .match-nav {
  display: none;
}

/* In-flow invite to the match tactical review. */
.tactical-tile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(135deg, rgba(90, 158, 154, 0.14), transparent 42%),
    var(--pitch);
  border: 1px solid var(--chrome-edge);
  border-left: 4px solid var(--pin);
  transition:
    border-color 0.15s ease,
    transform 0.15s ease,
    background-color 0.15s ease;
}

.tactical-tile[hidden] {
  display: none !important;
}

.tactical-tile:hover,
.tactical-tile:focus-visible {
  border-color: var(--pin);
  border-left-color: var(--pin);
  background:
    linear-gradient(135deg, rgba(90, 158, 154, 0.22), transparent 48%),
    var(--pitch);
  transform: translateY(-1px);
  outline: none;
}

.tactical-tile-mark {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 1.7rem;
  color: var(--pin);
}

.tactical-tile-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.tactical-tile-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  flex: 1 1 auto;
}

.tactical-tile-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pin);
}

.tactical-tile-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--ink);
}

.tactical-tile-sub {
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.25;
}

.tactical-tile-go {
  flex: 0 0 auto;
  align-self: center;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--pitch);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tactical-tile:hover .tactical-tile-go,
.tactical-tile:focus-visible .tactical-tile-go {
  background: var(--pin);
  border-color: var(--pin);
}

@media (min-width: 1100px) {
  .tactical-tile:not([hidden]) {
    position: fixed;
    top: 50%;
    right: max(0.75rem, calc((100vw - 52rem) / 2 - 12.5rem));
    z-index: 20;
    width: 11.5rem;
    margin: 0;
    padding: 1rem 0.9rem 0.95rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    transform: translateY(-50%);
    box-shadow: 0 10px 28px rgba(20, 20, 18, 0.08);
  }

  .tactical-tile:not([hidden]):hover,
  .tactical-tile:not([hidden]):focus-visible {
    transform: translateY(calc(-50% - 2px));
  }

  .tactical-tile-mark {
    width: 3.1rem;
    height: 1.9rem;
  }

  .tactical-tile-title {
    font-size: 1.35rem;
  }

  .tactical-tile-go {
    margin-top: 0.25rem;
    align-self: stretch;
    text-align: center;
  }
}

body.embed .tactical-tile {
  display: none !important;
}
