/* «90 минут. Или вся история команды.» (owner, 2026-11-06): what STEMX Arena trades, in one screen, drawn the way the
   exchange draws it — three outcome price lines over the match, and the team token's candles. Two glass cards in the
   story-screen style, joined by a link that carries each result from one to the other. Exchange colours: up #22c98b,
   down #f0566e; outcome lines in club colours as on the demo (Arsenal #ff6b7f, draw #b9a8ff, opponent per match). */
.arena-markets { position: relative; padding: clamp(36px, calc(4.5 * var(--vw, 1vw)), 72px) 0 clamp(48px, calc(4.5 * var(--vw, 1vw)), 72px); background-color: var(--bg); }
@media (min-width: 901px) {
  .arena-markets { background-image: radial-gradient(ellipse 85% 360px at 32% 0%, #204a8633, transparent), radial-gradient(ellipse 85% 360px at 32% 100%, #204a8633, transparent); }
}
.arena-markets::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 36% 340px at 27% 66%, #5b6bff2e, transparent 72%), radial-gradient(ellipse 36% 340px at 73% 66%, #22c98b1f, transparent 72%); }
.arena-markets .shell { position: relative; z-index: 1; }
.arena-markets__intro { margin-bottom: clamp(30px, calc(3.4 * var(--vw, 1vw)), 50px); }
.arena-markets__eyebrow { margin: 0 0 18px; color: #9aaaf3; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.arena-markets h2 { font-size: clamp(38px, calc(3.8 * var(--vw, 1vw)), 60px); line-height: 1.08; letter-spacing: -1.4px; }
.arena-markets h2 span { background: linear-gradient(110deg, #f3f4ff, #b8c4fa); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.arena-markets__lead { max-width: 600px; margin-top: 18px; color: #b8c4df; font-size: clamp(16px, calc(1.3 * var(--vw, 1vw)), 19px); line-height: 1.6; }
.arena-markets__note { margin-top: 18px; color: #7d8aa8; font-size: 12px; text-align: center; }

/* Two cards and the link between them. Shared rows (subgrid) line up both texts and both live panels. */
.arena-markets__duo { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); grid-template-rows: auto 1fr; }
.market-card { position: relative; grid-row: 1 / 3; display: grid; grid-template-rows: subgrid; row-gap: 22px; padding: clamp(22px, calc(2.2 * var(--vw, 1vw)), 30px); border-radius: 28px;
  background: radial-gradient(90% 55% at 50% -10%, #3a46c440, transparent 70%), linear-gradient(165deg, #131c42, #0a1127 72%);
  box-shadow: inset 0 0 0 1px #8f9cff2e, inset 0 1px 0 #ffffff1f, 0 40px 90px -40px #000e, 0 60px 140px -80px #5b6bffaa; }
.market-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, #a7b0ff80, #a7b0ff00 32%, #a7b0ff00 70%, #a7b0ff40);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.market-card--match { grid-column: 1; }
.market-card--team { grid-column: 3; background: radial-gradient(90% 55% at 50% -10%, #22c98b24, transparent 70%), linear-gradient(165deg, #0f1f3c, #0a1127 72%);
  box-shadow: inset 0 0 0 1px #8fd9c22b, inset 0 1px 0 #ffffff1f, 0 40px 90px -40px #000e, 0 60px 140px -80px #22c98b80; }
.market-card--team::before { background: linear-gradient(150deg, #7ff0c880, #7ff0c800 32%, #7ff0c800 70%, #7ff0c840); }
.market-card__tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 16px; color: #8e9cb9; font-size: 13px; }
.market-card__tag b { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 99px; background: #6f7cff24; box-shadow: inset 0 0 0 1px #8f9cff40; color: #dfe3ff; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.market-card__tag b::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #8d98ff; }
.market-card--team .market-card__tag b { background: #22c98b1c; box-shadow: inset 0 0 0 1px #22c98b47; }
.market-card--team .market-card__tag b::before { background: #22c98b; box-shadow: 0 0 0 3px #22c98b24; animation: live-pulse 2s ease-in-out infinite; }
.market-card h3 { color: #f3f5ff; font: 700 clamp(24px, calc(2.1 * var(--vw, 1vw)), 30px)/1.15 var(--heading); letter-spacing: -.4px; }
.market-card__text { max-width: 480px; margin-top: 10px; color: #aebbd5; font-size: var(--f155, 15.5px); line-height: 1.6; text-wrap: pretty; }
.match-live, .team-live { display: flex; flex-direction: column; justify-content: space-between; padding: 18px 18px 16px; border-radius: 20px;
  background: linear-gradient(180deg, #0b1230f2, #060b1af5); box-shadow: inset 0 0 0 1px #8f9cff24, inset 0 1px 0 #ffffff10, 0 24px 50px -30px #000c; }
.match-live__chart, .team-live__chart { display: block; width: 100%; height: auto; margin: 12px 0 10px; overflow: visible; fill: none; stroke: none; font-family: var(--font); font-variant-numeric: tabular-nums; }

/* The match: board with score and clock, three price lines, three price chips. */
.match-live { --o0: #ff6b7f; --o1: #b9a8ff; --o2: #5d9bff; }
.match-live > * { opacity: var(--fade, 1); }
.match-live__board { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.match-live__team { display: flex; align-items: center; gap: 10px; min-width: 0; color: #eef1ff; font-size: 14px; }
.match-live__team--away { flex-direction: row-reverse; text-align: right; }
.match-live__team img { flex: none; width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 4px 12px #000a); }
.match-live__team b { min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.match-live [hidden] { display: none; }
.match-live__center { display: grid; justify-items: center; gap: 6px; }
.match-live__score { display: flex; align-items: center; gap: 8px; color: #fff; font: 700 38px/1 var(--heading); font-variant-numeric: tabular-nums; perspective: 400px; text-shadow: 0 0 24px #8d98ff55; }
.match-live__score i { color: #6f7cff; font-style: normal; }
.match-live__score b { display: inline-block; min-width: .62em; text-align: center; }
.match-live__score .is-flip { animation: story-flip .7s cubic-bezier(.2, .7, .2, 1); }
.match-live__status { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 22px; padding: 0 10px; border-radius: 99px; background: #ffffff0a; color: #9aa7c7; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.match-live__status > i { width: 7px; height: 7px; border-radius: 50%; background: #6b7899; }
.match-live.is-live .match-live__status { color: #ffd2d8; background: #f0566e1f; }
.match-live.is-live .match-live__status > i { background: #ff5b6e; box-shadow: 0 0 0 3px #ff5b6e2e; animation: live-pulse 1.4s ease-in-out infinite; }
.match-live__goal { position: absolute; top: 50%; left: calc(100% + 8px); padding: 3px 10px; border-radius: 99px; background: #22c98b; color: #04140d; font-size: 12px; font-style: normal; font-weight: 800; letter-spacing: .02em; box-shadow: 0 0 22px #22c98b99;
  opacity: 0; transform: translateY(-50%) scale(.7); transition: opacity .2s, transform .35s cubic-bezier(.2, .9, .3, 1.5); }
.match-live.is-goal .match-live__goal { opacity: 1; transform: translateY(-50%); }
.match-live__grid line { stroke: #ffffff14; stroke-width: 1; }
.match-live__grid line.is-mid { stroke-dasharray: 3 5; }
.match-live__grid text { fill: #6f7c9c; font-size: var(--f10, 10px); font-weight: 600; }
.match-live__goals line { stroke: #ffffff33; stroke-width: 1; stroke-dasharray: 2 4; }
.match-live__goals rect { fill: #22c98b24; stroke: #22c98b80; stroke-width: 1; }
.match-live__goals text { fill: #8ff3cd; font-size: var(--f105, 10.5px); font-weight: 800; }
.match-live__lines path { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; transition: opacity .45s, stroke-width .45s; }
.match-live__lines path.is-glow { stroke-width: 9; opacity: .16; }
.match-live__lines .o0 { stroke: var(--o0); } .match-live__lines .o1 { stroke: var(--o1); } .match-live__lines .o2 { stroke: var(--o2); }
.match-live__heads circle { stroke: #070d1f; stroke-width: 2; transition: opacity .45s; }
.match-live__heads .o0 { fill: var(--o0); } .match-live__heads .o1 { fill: var(--o1); } .match-live__heads .o2 { fill: var(--o2); }
.match-live__heads .is-halo { stroke: none; opacity: .22; }
.match-live__tags rect { fill: currentColor; }
.match-live__tags text { fill: #070d1f; font-size: 11px; font-weight: 800; }
.match-live__tags .o0 { color: var(--o0); } .match-live__tags .o1 { color: var(--o1); } .match-live__tags .o2 { color: var(--o2); }
.match-live__tags g { transition: opacity .45s; }
.match-live__chart .is-lost { opacity: .28; }
.match-live__lines path.is-won:not(.is-glow) { stroke-width: 3.2; }
.match-live__lines path.is-glow.is-won { opacity: .3; }
.match-live__tags g.is-won { color: #22c98b; }
.match-live__legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.match-live__legend li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 8px; row-gap: 4px; padding: 9px 11px; border-radius: 12px; background: #0b1328cc; box-shadow: inset 0 0 0 1px #8f9cff1f; transition: opacity .45s, background .45s, box-shadow .45s; }
.match-live__legend li:nth-child(1) { --c: var(--o0); } .match-live__legend li:nth-child(2) { --c: var(--o1); } .match-live__legend li:nth-child(3) { --c: var(--o2); }
.match-live__legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.match-live__legend li > span { overflow: hidden; color: #aeb9d6; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.match-live__legend b { grid-column: 1 / -1; color: #fff; font: 700 18px/1 var(--heading); font-variant-numeric: tabular-nums; }
.match-live__legend li.is-won { background: #22c98b1f; box-shadow: inset 0 0 0 1px #22c98b, 0 0 26px -10px #22c98b; }
.match-live__legend li.is-won b { color: #5ff0bd; }
.match-live__legend li.is-lost { opacity: .4; }

/* The link: the result travels from the match to the team. */
.arena-markets__link { grid-column: 2; grid-row: 2; position: relative; display: grid; place-items: center; }
.arena-markets__link::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, #8f9cff1a, #8f9cff66, #8f9cff1a); }
.arena-markets__link span { position: relative; z-index: 1; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #0d1530; color: #c9d0ff;
  box-shadow: inset 0 0 0 1px #8f9cff40, 0 0 calc(var(--on, 0) * 34px) calc(var(--on, 0) * 6px) #22c98b88; }
.arena-markets__link span svg { width: 18px; height: 18px; }
.arena-markets__link i { position: absolute; z-index: 2; top: 50%; left: calc(var(--k, 0) * 100%); width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #5ff0bd; box-shadow: 0 0 14px 5px #22c98b99, -14px 0 18px -2px #22c98b66; opacity: var(--on, 0); }

/* The team: name and price, candles with volume, match-day marks and the last price. */
.team-live__head { display: flex; align-items: center; gap: 12px; }
.team-live__head img { flex: none; width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 4px 12px #000a); }
.team-live__name { display: grid; gap: 4px; min-width: 0; }
.team-live__name b { color: #eef1ff; font-size: 15px; font-weight: 600; }
.team-live__name small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: #8e9cb9; font-size: 12px; }
.team-live__ticker { padding: 1px 7px; border-radius: 6px; background: #ffffff0f; color: #c9d0ec; font-weight: 700; letter-spacing: .03em; }
.team-live__price { display: grid; justify-items: end; gap: 5px; margin-left: auto; }
.team-live__price b { color: #fff; font: 700 28px/1 var(--heading); font-variant-numeric: tabular-nums; }
.team-live__price em { padding: 3px 8px; border-radius: 99px; background: #22c98b24; color: #5ff0bd; font-size: 12px; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; transition: background .3s, color .3s; }
.team-live__price em.is-down { background: #f0566e24; color: #ff9aa5; }
.team-live__grid line { stroke: #ffffff12; stroke-width: 1; stroke-dasharray: 2 6; }
.team-live__grid line.is-base { stroke: #ffffff12; stroke-dasharray: none; }
.team-live__grid text { fill: #6f7c9c; font-size: var(--f10, 10px); font-weight: 600; }
.team-live__candles line { stroke-width: 1.3; }
.team-live__candles .is-up { fill: #22c98b; stroke: #22c98b; }
.team-live__candles .is-down { fill: #f0566e; stroke: #f0566e; }
.team-live__candles rect { stroke: none; }
.team-live__vol .is-up { fill: #22c98b47; }
.team-live__vol .is-down { fill: #f0566e47; }
.team-live__marks circle { stroke: #070d1f; stroke-width: 2; }
.team-live__marks .is-win { fill: #22c98b; }
.team-live__marks .is-loss { fill: #f0566e; }
.team-live__last line { stroke-width: 1; stroke-dasharray: 3 4; }
.team-live__last.is-up line { stroke: #22c98bb3; } .team-live__last.is-down line { stroke: #f0566eb3; }
.team-live__last.is-up rect { fill: #22c98b; } .team-live__last.is-down rect { fill: #f0566e; }
.team-live__last text { fill: #04140d; font-size: 11px; font-weight: 800; }
.team-live__last.is-down text { fill: #2a0610; }
.team-live__legend { display: flex; gap: 16px; color: #8e9cb9; font-size: 12px; }
.team-live__legend span { display: inline-flex; align-items: center; gap: 6px; }
.team-live__legend i { width: 8px; height: 8px; border-radius: 50%; background: #22c98b; }
.team-live__legend span + span i { background: #f0566e; }

@media (max-width: 1100px) {
  .arena-markets__duo { grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); }
  .match-live__score { font-size: 32px; }
  .match-live__team img, .team-live__head img { width: 34px; height: 34px; }
  .team-live__price b { font-size: 24px; }
  .match-live__legend b { font-size: 16px; }
}
@media (max-width: 900px) {
  .arena-markets__duo { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .market-card { grid-row: auto; grid-column: 1; display: flex; flex-direction: column; gap: 20px; }
  .market-card--team { grid-column: 1; }
  .arena-markets__link { grid-column: 1; grid-row: auto; height: 56px; }
  .arena-markets__link::before { top: 0; bottom: 0; left: 50%; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, #8f9cff1a, #8f9cff66, #8f9cff1a); }
  .arena-markets__link span { transform: rotate(90deg); }
  .arena-markets__link i { top: calc(var(--k, 0) * 100%); left: 50%; box-shadow: 0 0 14px 5px #22c98b99, 0 -14px 18px -2px #22c98b66; }
}
@media (max-width: 650px) {
  .arena-markets__eyebrow { margin-bottom: 14px; font-size: var(--f10, 10px); }
  .arena-markets__lead { margin-top: 14px; font-size: 16px; }
  .arena-markets__intro { margin-bottom: 26px; }
  .arena-markets__note { margin-top: 12px; }
  .market-card { gap: 16px; padding: 18px 14px 14px; border-radius: 22px; }
  .market-card__tag { margin-bottom: 12px; font-size: 12px; }
  .market-card h3 { font-size: 22px; }
  .market-card__text { margin-top: 8px; font-size: var(--f145, 14.5px); line-height: 1.55; }
  .match-live, .team-live { padding: 12px 10px 10px; border-radius: 16px; }
  .match-live__board { gap: 8px; }
  .match-live__team { gap: 7px; font-size: var(--f125, 12.5px); }
  .match-live__team img, .team-live__head img { width: 28px; height: 28px; }
  .match-live__center { gap: 5px; }
  .match-live__score { gap: 5px; font-size: 26px; }
  .match-live__status { height: 20px; padding: 0 8px; font-size: 11px; }
  /* On a phone the goal lights the status itself instead of a pill beside it. */
  .match-live__goal { position: static; display: none; padding: 0; background: none; box-shadow: none; color: inherit; opacity: 1; transform: none; transition: none; }
  .match-live.is-goal .match-live__goal { display: inline; transform: none; }
  .match-live.is-goal [data-clock="min"] { display: none; }
  .match-live.is-live.is-goal .match-live__status { background: #22c98b; color: #04140d; box-shadow: 0 0 18px #22c98b99; }
  .match-live.is-live.is-goal .match-live__status > i { background: #04140d; box-shadow: none; animation: none; }
  .match-live__chart, .team-live__chart { margin: 8px 0 8px; }
  .match-live__legend { gap: 6px; }
  .match-live__legend li { padding: 7px 8px; border-radius: 10px; row-gap: 3px; }
  .match-live__legend li > span { font-size: 11px; }
  .match-live__legend b { font-size: 15px; }
  .team-live__head { gap: 10px; }
  .team-live__name b { font-size: 14px; }
  .team-live__name small { font-size: 11px; }
  .team-live__price b { font-size: 22px; }
  .team-live__legend { font-size: 11px; }
  .arena-markets__link { height: 36px; }
  .arena-markets__link span { width: 32px; height: 32px; }
  .arena-markets__link span svg { width: 15px; height: 15px; }
}
/* The narrowest phones: the team's whole name fits beside the score and in the key. */
@media (max-width: 340px) {
  .match-live__board { gap: 6px; }
  .match-live__team { gap: 5px; font-size: 12px; }
  .match-live__team img { width: 24px; height: 24px; }
  .match-live__score { gap: 4px; font-size: 24px; }
  .match-live__legend { gap: 4px; }
  .match-live__legend li { column-gap: 5px; padding: 7px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .market-card--team .market-card__tag b::before, .match-live__score .is-flip, .match-live.is-live .match-live__status > i { animation: none; }
}
