/* Release 328: the home page's hands-on simulator (static/js/home_try.js). The lineup side is the editor's own pitch and squad rows
   (lineup_lab.css, loaded with this page); the results side repeats the simulation page's card, badge, progress bar and table
   (simulation_analysis.css) and its "Final moments" tiles (analysis_shots.css), scoped to this section. */
.ht { --muted: #63636b; --border: #e4e4e7; --subtle: #f4f4f5; --primary: #3131eb; --ink: #18181b; padding: var(--sx-section, 6rem) 0 0; }
.ht[hidden] { display: none; }
.ht-head { display: grid; gap: .75rem; max-width: 46rem; }
.ht-eyebrow { margin: 0; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #3030ff; }
.ht-head p.ht-lede { margin: 0; color: #52525b; font-size: 1.0625rem; line-height: 1.6; }
.ht-grid2 { margin-top: 2rem; display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }

/* lineup side: the editor's card, with the players this demo can change ringed in gold */
/* the light colours the editor has on the sport pages (scoutics_light.css applies them under html.sx-cream; the home page is not sx-cream) */
.ht .lineup-lab { background: #fafafa; border: 1px solid rgba(24,24,27,.12); color: #18181b; }
.ht .fantasy-lineup-card { background: #fafafa; border: 1px solid rgba(24,24,27,.12); }
.ht .fantasy-card-header { background: #18181b !important; }
.ht .fantasy-card-header, .ht .fantasy-card-header * { color: #fafafa !important; }
.ht .lineup-lab .fantasy-player { color: #18181b; }
.ht .lineup-lab .fantasy-player.is-selected { background: rgba(24,24,27,.12); }
.ht .fantasy-pitch .fantasy-player > span { color: #fff !important; text-shadow: 0 1px 2px rgba(0,40,26,.9) !important; }
.ht-lab .lineup-sides { display: flex; gap: 8px; margin-bottom: 10px; }
.ht-lab .lineup-sides button { font: inherit; font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 8px; border: 1px solid rgba(24,24,27,.12); background: #fff; color: var(--ink); cursor: pointer; }
.ht-lab .lineup-sides button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ht-lab .fantasy-player.ht-can .fpl-jersey { filter: drop-shadow(0 0 0 #facc15) drop-shadow(0 0 4px #facc15); }
.ht-lab .fantasy-player.ht-can { outline: 2px dashed #facc15; outline-offset: 2px; border-radius: 10px; }
/* the position tag on each shirt, as on the sport pages (sport_page_order.css, not loaded on home) */
.ht .lineup-lab .fantasy-pitch .fantasy-player[data-slot]::after { content: attr(data-slot); position: absolute; top: -4px; left: 50%; transform: translateX(-50%); font: 700 10px/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .03em; color: #fff; background: rgba(9,22,17,.8); border-radius: 6px; padding: 3px 5px; pointer-events: none; white-space: nowrap; }
.ht-lab .fantasy-player { position: relative; }
.ht-lab .fantasy-player.ht-swapped > span { background: #facc15 !important; color: #18181b !important; }
.ht-lab .fantasy-card-hint { display: none; }
.ht-bench { margin-top: 10px; display: grid; gap: 6px; }
.ht-bench .lineup-player { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; padding: 4px 6px; min-height: 42px; border-radius: 8px; border: 1px solid rgba(24,24,27,.12); background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ht-bench .lineup-player:hover { border-color: #facc15; background: #fffbea; }
.ht-bench .lineup-player svg { width: 24px; height: 28px; flex-shrink: 0; }
.ht-bench .lineup-player small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.ht-bench-note { margin: 0; font-size: .8125rem; line-height: 1.5; color: #52525b; }
.ht-bench-note a { color: var(--primary); font-weight: 600; }

/* results side: the simulation page's pieces */
.ht .card { border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: 0 1px 2px #00000003; overflow: hidden; margin-bottom: 16px; }
.ht .progress-card { padding: 20px 22px; }
.ht .progress-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.ht .tabular, .ht td { font-variant-numeric: tabular-nums; }
.ht .badge { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 5px; background: #fff; padding: 3px 8px; font-size: 11px; font-weight: 550; color: #52525b; }
.ht .badge i { width: 6px; height: 6px; background: #a1a1aa; border-radius: 50%; }
.ht .badge[data-state=running] i { background: var(--primary); animation: ht-breathe 1.8s infinite; }
.ht .badge[data-state=complete] { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.ht .badge[data-state=complete] i { background: #16a34a; }
.ht .progress-card h3 { font-size: 17px; letter-spacing: -.025em; line-height: 1.3; font-weight: 600; margin: 14px 0 4px; color: var(--ink); }
.ht .progress-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ht .progress-track { height: 4px; background: var(--subtle); border-radius: 4px; margin: 18px 0 12px; overflow: hidden; }
.ht .progress-track span { display: block; width: 0; height: 100%; background: var(--primary); transition: width .2s linear; }
.ht-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ht-actions .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--ink); font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.ht-actions .button.primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.ht-actions .button:disabled { opacity: .55; cursor: default; }
.ht .card-head { padding: 16px 20px; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.ht .card-head h3 { font-size: 14px; letter-spacing: -.02em; font-weight: 600; margin: 0 0 4px; color: var(--ink); }
.ht .card-head p { font-size: 11px; color: var(--muted); margin: 0; }
.ht table { border-collapse: collapse; width: 100%; font-size: 12px; }
.ht th, .ht td { padding: 11px 20px; text-align: right; white-space: nowrap; border-bottom: 1px solid #f0f0f2; color: var(--ink); }
.ht th { font-size: 10px; color: var(--muted); font-weight: 500; background: #fafafa; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ht th:first-child, .ht td:first-child { text-align: left; }
.ht td[data-role=probability] { font-weight: 650; }
.ht td.range { color: var(--muted); }
.ht .table-note { border-top: 1px solid var(--border); font-size: 10px; color: var(--muted); padding: 12px 20px; line-height: 1.65; margin: 0; }
.ht .shots-card { padding: 18px 20px; }
.ht .shots-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ht .shots-head h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }
.ht .shots-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.ht .shots-head [data-ht-shots] { flex-shrink: 0; white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 500; }
.ht .shots-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }   /* release 330: one row */
.ht .shot.shot-more { border-radius: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #fafafa; color: var(--ink); }
.ht .shot.shot-more[hidden] { display: none; }
.ht .shot-more strong { font-size: 20px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ht .shot-more span { font-size: 11px; color: var(--muted); }
.ht .shot { position: relative; display: block; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--subtle); aspect-ratio: 240 / 150; min-width: 0; }
.ht .shot[hidden] { display: none; }
.ht .shot canvas { display: block; width: 100%; height: 100%; }
.ht .shot.is-new { animation: ht-shot-in .3s cubic-bezier(.2, .8, .2, 1); }
.ht .shots-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.ht .shots-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1.5px solid #fff; box-shadow: 0 0 0 1px #d4d4d8; }
.ht .dot.home { background: #034694; } .ht .dot.away { background: #DA291C; } .ht .dot.ball { background: #fff6cc; box-shadow: 0 0 0 1.5px #111; }   /* release 336: the viewer's kits and ball */
.ht-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 4px; }
.ht-note { margin: 0; max-width: 46rem; font-size: .8125rem; line-height: 1.5; color: #52525b; }
@keyframes ht-breathe { 50% { opacity: .35; } }
@keyframes ht-shot-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .ht-grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .ht .shots-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ht .shot-more strong { font-size: 16px; }
  .ht th, .ht td { padding: 10px 12px; } .ht .progress-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .ht .shot.is-new, .ht .badge i { animation: none; } .ht .progress-track span { transition: none; } }

/* release 380 (owner: "there should be mouse moves: click a player and replace him with an alternative, in both teams"): the demo
   cursor that plays this panel until the visitor takes over (static/js/home_try.js tour), and the small "demo playing" note */
.ht { position: relative; }
.ht-cursor { position: absolute; left: 0; top: 0; z-index: 30; width: 0; height: 0; pointer-events: none; opacity: 0; transform: translate(40%, 30%);
  transition: transform .9s cubic-bezier(.45, .05, .25, 1), opacity .35s ease; will-change: transform; }
.ht-cursor.is-on { opacity: 1; }
.ht-cursor svg { position: absolute; left: -4px; top: -2px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.ht-cursor i { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; background: rgba(86, 99, 240, .4); transform: scale(0); opacity: 0; }
.ht-cursor.is-tap i { animation: htTap .6s ease-out; }
@keyframes htTap { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
@media (hover: none) {   /* phones: a finger dot, not an arrow */
  .ht-cursor svg { display: none; }
  .ht-cursor::before { content: ""; position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; border-radius: 50%; background: rgba(86, 99, 240, .45); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
}
.ht-demo { position: absolute; top: 20px; right: 24px; z-index: 5; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 999px;
  background: var(--b-primary-50, #EEF0FE); color: var(--b-primary-700, #3B3CC4); font: 700 13px/1.3 var(--b-font, Nunito, sans-serif); }
.ht-demo[hidden] { display: none; }
.ht-demo i { width: 8px; height: 8px; border-radius: 50%; background: var(--b-primary, #5663F0); animation: htDemo 1.4s ease-in-out infinite; }
@keyframes htDemo { 50% { opacity: .3; } }
@media (max-width: 767px) { .ht-demo { position: static; margin: 0 0 12px; } }
@media (prefers-reduced-motion: reduce) { .ht-cursor, .ht-demo i { transition: none; animation: none; } }

/* ---------------------------------------------------------------------------------------------------------------------------
   release 382 (owner: "let's make it hockey; the top row on the right as two side-by-side panels, the right one the actual game
   running while the simulation is rendered 1,000 times"). The starting six on a half rink (left), the counter and game 1 on the
   game viewer's rink (top right), the result table, and the newest final scores. */
.ht .dot.home { background: #da291c; } .ht .dot.away { background: #fff; box-shadow: 0 0 0 1.5px #111; } .ht .dot.ball { background: #050505; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px #d4d4d8; }
.ht-lab { padding: 14px; border: 1px solid rgba(24,24,27,.12); border-radius: 12px; background: #fafafa; }
.ht-six { border: 1px solid rgba(24,24,27,.12); border-radius: 12px; overflow: hidden; background: #fff; }
.ht-six-head { display: grid; justify-items: center; gap: 2px; padding: 12px 10px; background: #0B1220; color: #fff; }
.ht-six-head strong { font: 800 17px/1.2 var(--b-font, Nunito, sans-serif); color: #fff; }
.ht-six-head span { font-size: 13px; color: rgba(255,255,255,.8); }
.ht-halfrink { position: relative; margin: 12px; aspect-ratio: 1 / 1.05; border: 2px solid #C9D6E2; border-radius: 0 0 48px 48px; background: linear-gradient(#F4F8FB, #E6EEF5); }
.ht-halfrink-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.ht-skaters { position: absolute; inset: 0; }
.ht-skater { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; width: 76px; padding: 4px 2px 3px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font: inherit; }
.ht-skater svg { width: 40px; height: 44px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.18)); }
.ht-skater span { max-width: 100%; padding: 1px 6px; border-radius: 6px; background: rgba(11,18,32,.82); color: #fff; font: 700 12px/1.4 var(--b-font, Nunito, sans-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-skater::after { content: attr(data-slot); position: absolute; top: -6px; left: 50%; transform: translateX(-50%); padding: 2px 5px; border-radius: 6px; background: rgba(11,18,32,.8); color: #fff; font: 700 10px/1 system-ui, sans-serif; pointer-events: none; }
.ht-skater.ht-can { outline: 2px dashed #facc15; outline-offset: 1px; }
.ht-skater.ht-can svg { filter: drop-shadow(0 0 5px #facc15); }
.ht-skater.is-selected { background: rgba(250, 204, 21, .22); }
.ht-skater.ht-swapped span { background: #facc15; color: #18181b; }
.ht-skater:disabled { cursor: default; }
.ht-skater:focus-visible { outline: 3px solid var(--b-primary, #5663F0); outline-offset: 2px; }
.ht-lab .lineup-sides { display: flex; gap: 8px; margin-bottom: 10px; }
.ht-lab .lineup-sides button { font: inherit; font-size: 14px; font-weight: 700; padding: 9px 16px; border-radius: 8px; border: 1px solid rgba(24,24,27,.12); background: #fff; color: var(--ink); cursor: pointer; min-height: 44px; }
.ht-lab .lineup-sides button[aria-pressed="true"] { background: var(--b-primary, #5663F0); border-color: var(--b-primary, #5663F0); color: #fff; }

/* top right: the counter beside the rink */
.ht-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: stretch; margin-bottom: 16px; }
.ht-top > .card { margin-bottom: 0; }
.ht .card.ht-live { display: flex; flex-direction: column; justify-content: center; padding: 0; background: transparent; border: 0; box-shadow: none; overflow: visible; }
.ht-live canvas { display: block; width: 100%; height: auto; aspect-ratio: 330 / 176; background: transparent; }
.ht-live.is-goal canvas { filter: drop-shadow(0 0 4px #FDE047); }
.ht table tr.is-sub td { color: var(--muted); }

/* the newest final scores, as small score cards */
.ht .shot.ht-score { display: grid; align-content: center; gap: 2px; padding: 8px 10px; background: #fff; aspect-ratio: auto; min-height: 84px; }
.ht .ht-score small { color: var(--muted); font-size: 11px; font-weight: 600; }
.ht .ht-score strong { display: grid; gap: 0; color: var(--ink); font: 800 15px/1.25 var(--b-font, Nunito, sans-serif); font-variant-numeric: tabular-nums; }
.ht .ht-score.is-home strong span:first-child, .ht .ht-score.is-away strong span:last-child { color: var(--b-primary-700, #3B3CC4); }
.ht .ht-score em { color: var(--muted); font-size: 11px; font-style: normal; }


@media (max-width: 1180px) { .ht-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .ht-skater { width: 64px; } .ht-skater svg { width: 32px; height: 36px; } .ht-skater span { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .ht-live.is-goal canvas { filter: none; } }
.ht-grid2 > *, .ht-top > * { min-width: 0; }
@media (max-width: 560px) {
  .ht th, .ht td { white-space: normal; } .ht th:first-child, .ht td:first-child { width: 38%; }
}

/* release 382: the final-whistle tiles are transparent, like the rink above */
.ht .shot.is-rink { border: 0; background: transparent; border-radius: 0; overflow: visible; }
