/* Summary tiles, as StatTile: hairline on top, icon and stamp, the figure */
.summary { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.summary .wrap { padding-top: 34px; padding-bottom: 38px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; }
.tile { border-top: 1px solid var(--rule); padding: 10px 16px 0 0; }
.tile .stamp { display: flex; align-items: center; gap: 6px; }
.tile p + p { margin-top: 6px; }
.tile .num { font-size: 56px; line-height: 1; }
.tile .unit { font-size: 17px; margin-left: 5px; }
.tile .signal { color: var(--signal); }

/* Match screen header and the Pitch panel */
.match-title { font-size: 34px; margin-top: 4px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 18px; }
.pills span { min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 14px; }
.pills .on { background: var(--ink); color: var(--ground); font-weight: 600; }
.pitch { position: relative; border-radius: 6px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.pitch img { display: block; width: 100%; height: auto; }
.legend { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--muted); }
.legend > span { display: flex; align-items: center; gap: 10px; }
.ramp { display: block; width: 140px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgb(30,100,180), rgb(64,200,190) 30%, rgb(230,220,70) 55%, rgb(240,140,40) 75%, rgb(214,40,40)); }
.sprint-key { display: inline-block; width: 22px; height: 4px; border-radius: 2px; background: var(--signal); }
/* Stacked bars that grow from zero: where you play, where the ground went */
.stack { display: flex; border-radius: 3px; overflow: hidden; margin-top: 10px; background: var(--surface); }
.stack.thirds { height: 14px; }
.stack.zones { height: 18px; border-radius: 4px; background: var(--track); }
.stack > div { width: var(--w); animation: grow 8s var(--ease-out) infinite both; }
.stack > div:nth-child(2) { animation-delay: .1s; }
.stack > div:nth-child(3) { animation-delay: .2s; }
.stack > div:nth-child(4) { animation-delay: .3s; }
@keyframes grow { 0% { width: 0; } 9% { width: var(--w); } 90% { width: var(--w); opacity: 1; } 97% { opacity: 0; width: var(--w); } 100% { width: 0; opacity: 0; } }
.keys { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.keys .minute { display: flex; align-items: center; gap: 6px; white-space: pre; }
.keys i { width: 10px; height: 10px; border-radius: 2px; display: block; }
.mt-36 { margin-top: 36px; }
.mt-40 { margin-top: 40px; }

/* Timeline rows tick in one after another */
.tick { animation: tickin 8s ease-out infinite both; }
.tick:nth-child(2) { animation-delay: .15s; }
.tick:nth-child(3) { animation-delay: .3s; }
.tick:nth-child(4) { animation-delay: .45s; }
.tick:nth-child(5) { animation-delay: .6s; }
@keyframes tickin { 0% { opacity: 0; transform: translateX(-8px); } 5% { opacity: 1; transform: none; } 88% { opacity: 1; } 95%, 100% { opacity: 0; } }
.tick p { font-size: 15px; }
.tick .num6 { font-size: 20px; }
.tick .num6 small { font-size: 12px; color: var(--muted); }

/* Rings section */
.rings-section { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--ground-deep); }
.streak-note { display: flex; align-items: center; gap: 10px; margin-top: 28px; font-size: 15px; color: var(--soft); }

/* Trends, in the app's light theme */
.light { background: var(--light-ground); color: var(--light-ink); }
.light .stamp { color: var(--light-muted); }
.light .copy { color: var(--light-muted); }
.card-light { background: var(--light-surface); border-radius: 6px; }
.bests { margin-top: 32px; padding: 18px 20px; }
.bests ul { list-style: none; margin-top: 8px; }
.bests li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--light-rule); }
.bests li:last-child { border-bottom: 0; }
.bests .date { font-size: 13px; color: var(--light-muted); }
.bests .num { font-size: 26px; }
.bests .unit { font-size: 13px; color: var(--light-muted); }
.bests .signal { color: var(--light-signal-text); }
.chart { padding: 22px 22px 18px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.chart-head .stamp { display: flex; align-items: center; gap: 6px; }
.chart-head p:last-child { font-size: 13px; color: var(--light-muted); }
.bars { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: end; height: 240px; margin-top: 34px; border-bottom: 1px solid var(--light-rule); }
.bars > div { height: var(--h); background: var(--light-neutral); border-radius: 3px 3px 0 0; transform-origin: bottom; animation: bar 8s var(--ease-out) infinite both; }
.bars > div.on { background: var(--light-signal); }
.callout { position: absolute; right: 0; top: -26px; background: var(--light-ink); color: var(--light-ground); border-radius: 6px; padding: 6px 10px; font-size: 13px; white-space: nowrap; animation: callout 8s ease-out infinite both; }
.callout .num6 { font-size: 15px; }
.months { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--light-muted); }
@keyframes bar { 0% { transform: scaleY(0); } 8% { transform: scaleY(1); } 90% { transform: scaleY(1); opacity: 1; } 97% { opacity: 0; } 100% { transform: scaleY(0); opacity: 0; } }
@keyframes callout { 0%, 10% { opacity: 0; transform: translateY(6px); } 14% { opacity: 1; transform: none; } 88% { opacity: 1; } 95%, 100% { opacity: 0; } }


/* Responsive rules and reduced motion load last so they override every sheet above. */
@media (max-width: 760px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .cols { gap: 40px; }
  .cols > * { flex-basis: 100% !important; }
  .nav-links a:not(.ghost) { display: none; }
  .block { padding-top: 88px; padding-bottom: 88px; }
}
@media (max-width: 480px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .selects { grid-template-columns: 1fr; }
  .row button { flex: 1 1 100%; }
  .tile .num { font-size: 44px; }
  .final img { width: 120px; height: 120px; border-radius: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* Timeline charts: a speed line with sprint marks and a scrub marker, then heart rate */
.tl-card { background: var(--surface); border-radius: 6px; padding: 16px 18px 12px; }
.tl-card + .tl-card { margin-top: 12px; }
.tl-card .chart-head .stamp { display: flex; align-items: center; gap: 6px; }
.tl-card .chart-head p:last-child { font-size: 13px; color: var(--muted); }
.tl-plot { position: relative; margin-top: 12px; }
.tl-plot svg { display: block; width: 100%; height: auto; }
.tl-line { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.tl-line.hr { stroke: #FF453A; }
.tl-sprints circle { fill: var(--signal); }
.tl-scrub { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.tl-read { position: absolute; top: 0; left: var(--x); transform: translate(-50%, -4px); background: var(--ink); color: var(--ground); border-radius: 4px; padding: 3px 8px; font-size: 12px; white-space: nowrap; }
.tl-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); }

/* Features section */
.feat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.feat { border: 1px solid var(--rule); border-radius: 6px; padding: 24px; background: var(--surface); }
.feat h3 { font-size: 24px; margin-top: 8px; }
.feat > p:last-child, .feat > p:not(.stamp) { color: var(--soft); font-size: 15px; margin-top: 10px; }
.feat-art { min-height: 150px; margin-bottom: 20px; display: flex; gap: 14px; align-items: center; justify-content: center; color: var(--signal); }
.wide-feat { grid-column: 1 / -1; }
.feat-list { list-style: none; margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; color: var(--soft); font-size: 15px; }
.feat-list li { padding-left: 16px; position: relative; }
.feat-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.watch-tally { width: 190px; border-radius: 46px; padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; }
.trow { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.trow span { width: 42px; } .trow b { width: 22px; text-align: center; font-size: 17px; }
.trow i { font-style: normal; width: 34px; height: 36px; border-radius: 12px; background: #2C2C2E; display: grid; place-items: center; font-size: 18px; }
.trow i.plus { background: var(--signal); color: #000; }
.wbtn.end { background: #FF453A; padding: 8px; font-size: 14px; margin-top: 4px; }
.recap { width: 100%; max-width: 260px; background: var(--ground-deep); border: 1px solid var(--rule); border-radius: 6px; padding: 16px 18px; color: var(--ink); }
.recap .score { font-size: 52px; line-height: 1; margin: 4px 0 10px; }
.recap-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 6px 0; border-top: 1px solid var(--rule); color: var(--soft); }
.recap-row b { color: var(--ink); font-weight: 600; }
.fig { flex: 1 1 0; min-width: 0; font-size: 13px; color: var(--soft); }
.fig .num { font-family: var(--display); font-weight: 600; font-size: 44px; line-height: 1; color: var(--ink); }
.fig .num small { font-size: 16px; color: var(--muted); }
@media (max-width: 760px) { .feat-grid, .feat-list { grid-template-columns: minmax(0, 1fr); } }
.chips { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.chip { font-size: 12px; color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 10px; }
.chip.on { color: var(--on-signal); background: var(--signal); border-color: var(--signal); }
.platforms { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.platform { display: flex; align-items: baseline; gap: 12px; border: 1px solid var(--rule); border-radius: 6px; padding: 12px 18px; background: var(--surface); }
.platform b { font: 600 20px/1 var(--display); letter-spacing: .5px; }
.platform i { font: normal 12px/1 var(--mono); letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.faq { margin-top: 36px; border-top: 1px solid var(--rule); }
.faq > div { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.faq dt { font: 600 22px/1.2 var(--display); letter-spacing: .5px; }
.faq dd { margin-top: 8px; color: var(--soft); font-size: 16px; max-width: 46em; }
.faq a, footer a { color: var(--lede); }
.legal { padding-top: 56px; padding-bottom: 88px; max-width: 760px; }
.legal h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1; margin-top: 12px; }
.legal h2 { font-size: 24px; margin-top: 36px; }
.legal p, .legal li { color: var(--soft); font-size: 16px; margin-top: 10px; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--lede); overflow-wrap: anywhere; }
