/* Orangetheory page */
.otf-hero-stats { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 22px; }

.otf-classes { gap: 16px; }
.otf-class { display: flex; flex-direction: column; gap: 12px; }
.otf-class-head { display: flex; align-items: center; gap: 12px; }
.otf-class-head .thumb { width: 46px; height: 46px; border-radius: 10px; background-size: cover; background-position: center; flex-shrink: 0; }
.otf-class-title { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.3px; }
.otf-headline { display: flex; gap: 14px; flex-shrink: 0; }
.otf-headline div { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.otf-headline b { font-family: var(--font-display); font-size: 22px; color: var(--forge); text-shadow: 0 0 14px var(--forge-glow); }
.otf-headline span { font-size: 10px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 3px; }

.otf-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.otf-stat { display: flex; flex-direction: column; gap: 2px; background: var(--bg-elevated); border: 1px solid var(--line-soft); border-radius: 9px; padding: 7px 9px; min-width: 0; }
.otf-stat .l { font-size: 10px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.otf-stat .v { font-family: var(--font-display); font-size: 14px; color: var(--ink); white-space: nowrap; }
.otf-stat .v small { font-family: var(--font-body); font-size: 10px; color: var(--ink-dim); margin-left: 3px; font-weight: 600; }

.otf-zones { display: flex; flex-direction: column; gap: 6px; }
.otf-zone-grid { display: flex; gap: 6px; flex-wrap: wrap; }
.otf-zone { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-dim); background: var(--bg-elevated); border-radius: 999px; padding: 3px 9px 3px 6px; }
.otf-zone i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.otf-zone b { color: var(--ink); font-weight: 700; }
.otf-zone.total { margin-left: auto; }

.otf-stations { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.otf-station { border: 1px solid var(--line-soft); border-radius: 10px; padding: 9px 10px; }
.otf-station.na { opacity: 0.55; }
.otf-station-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.otf-station-sum { font-size: 11.5px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.otf-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.tag { font-size: 10px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.tag.tread { color: var(--success); background: var(--success-dim); }
.tag.row { color: var(--hydro); background: var(--hydro-dim); }

/* Class log table */
.otf-table-wrap { overflow-x: auto; }
.otf-table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.otf-table th, .otf-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.otf-table th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink-faint); font-weight: 700; background: var(--bg-elevated); position: sticky; top: 0; }
.otf-table th.num, .otf-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.otf-table th.tread { color: var(--success); }
.otf-table th.row { color: var(--hydro); }
.otf-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.otf-table tbody tr:last-child td { border-bottom: none; }

@media (max-width: 900px) {
  .otf-stations { grid-template-columns: 1fr; }
  .otf-top { grid-template-columns: repeat(2, 1fr); }
}

/* avg / max pairs in one tile */
/* Stacked: label on top, then one line per value (avg / max) with the
   number right-aligned. Nothing shares a row, so nothing can clip. */
.otf-stat.pair { display: flex; flex-direction: column; gap: 3px; }
.otf-stat.pair .pv { display: flex; align-items: baseline; justify-content: flex-start; gap: 0; font-family: var(--font-display); font-size: 15px; color: var(--ink); white-space: nowrap; min-width: 0; }
.otf-stat.pair .pv em { font-style: normal; font-family: var(--font-body); font-size: 9.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-faint); flex: none; margin-right: auto; padding-right: 8px; }
.otf-stat.pair .pv small { font-family: var(--font-body); font-size: 10px; color: var(--ink-dim); margin-left: 3px; font-weight: 600; }
.otf-stat.pair .pv + .pv { border-top: 1px dashed var(--line-soft); padding-top: 3px; }

/* Challenge-best max/best values: green glow and a tag */
.otf-stat.pair .l { display: flex; align-items: center; gap: 6px; }
.otf-stat.pair .pr-tag { font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: 0.8px; color: #0B1F14; background: var(--success); border-radius: 999px; padding: 1px 6px; text-transform: uppercase; box-shadow: 0 0 10px var(--success-glow); }
.otf-stat.pair.pr { border-color: rgba(43,255,155,0.45); background: linear-gradient(135deg, rgba(43,255,155,0.10), rgba(43,255,155,0) 60%); }
.otf-stat.pair.pr .pv.best { color: var(--success); text-shadow: 0 0 10px var(--success-glow); }
.otf-stat.pair.pr .pv.best small { color: rgba(43,255,155,0.7); }
.otf-stat.pair .l { overflow: visible; white-space: nowrap; flex-wrap: wrap; row-gap: 2px; }
.otf-stat.pair .pr-tag { flex: none; }

/* Workout History (moved here from Progress): four rows tall, scroll for the rest */
.otf-history { max-height: 460px; overflow-y: auto; padding-right: 6px; }

/* Below desktop width the class cards go one per row, so each station
   keeps two full-width tiles and the paired values never crowd. */
@media (max-width: 1100px) {
  .otf-classes { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .otf-stat.pair .pv { font-size: 14px; }
}

/* Class trends: two rows of three, taller charts */
.otf-trends .chart-card.compact canvas { height: 190px; }
.otf-trends .chart-card.compact { padding: 14px 16px 12px; }
.otf-trends .chart-card.compact .card-title { font-size: 12px; }
@media (max-width: 720px) { .otf-trends { grid-template-columns: 1fr; } .otf-trends .chart-card.compact canvas { height: 170px; } }
