/* Brainzie Poolside — Gym ↔ Freestyle guide (gym.html).
   Loaded on top of app.css and reusing its brand tokens (--brand, --secondary,
   --paper, --ink, fonts, --radius-s) so the page matches the rest of Poolside.
   Scoped to .guide-page. */

.guide-page { background: var(--paper); }

/* --- hero ------------------------------------------------------------------ */
.guide-hero {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  padding: 18px 16px 4px;
}
.guide-hero .kicker {
  font-family: var(--font-display);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}
.guide-hero h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 6px 0 8px;
  letter-spacing: -.5px;
  color: var(--ink);
}
.guide-hero p { font-size: .92rem; color: var(--ink-soft); line-height: 1.55; margin: 0; }
.guide-hero .muscle-word { color: var(--accent-coral); font-weight: 700; }

/* Stroke switcher (Freestyle / Breaststroke) — segmented pill, like the mode nav. */
.stroke-switch {
  display: inline-flex;
  gap: 0;
  margin-top: 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.stroke-switch a {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
}
.stroke-switch a:hover { color: var(--ink); }
.stroke-switch a.active {
  color: var(--white);
  background: var(--brand);
  box-shadow: 0 1px 4px rgba(216, 27, 114, .35);
}

/* --- layout + controls ----------------------------------------------------- */
.guide-wrap { max-width: 620px; margin: 0 auto; padding: 6px 14px 44px; }

.play-row { display: flex; justify-content: center; padding: 12px 0 4px; }
.play-toggle {
  background: var(--paper-2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.play-toggle.on { background: var(--ok-tint); color: var(--ok); border-color: var(--ok); }

.group-tabs { display: flex; gap: 6px; padding: 10px 0 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.group-tab {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
}
.group-tab.active { background: var(--brand); color: var(--white); border-color: var(--brand); box-shadow: 0 1px 4px rgba(216, 27, 114, .35); }

.group-desc { padding: 4px 2px 12px; font-size: .85rem; font-weight: 600; color: var(--secondary); }

/* --- cards ----------------------------------------------------------------- */
.ex-list { display: flex; flex-direction: column; gap: 12px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.card.open { border-color: var(--brand); box-shadow: 0 6px 24px rgba(216, 27, 114, .14); }

.card-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.thumbs { display: flex; gap: 6px; flex-shrink: 0; }
.thumb {
  width: 70px; height: 70px;
  background: var(--paper-2);
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.thumb.swim { background: #f3fafe; }

.card-meta { flex: 1; min-width: 0; }
.card-name { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.sets {
  display: inline-block;
  background: var(--brand-tint);
  color: var(--brand-deep);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .74rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.card-sub { font-size: .72rem; color: var(--muted); }
.chev { color: var(--brand); font-size: 1.1rem; transition: transform .2s; }
.card.open .chev { transform: rotate(180deg); }

/* --- expanded detail ------------------------------------------------------- */
.detail { padding: 0 14px 16px; }

.figs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 10px;
  margin-bottom: 10px;
}
.fig { margin: 0; min-width: 0; }
.fig-box { aspect-ratio: 1 / 1; width: 100%; background: var(--white); border-radius: 10px; border: 1px solid var(--line); }
.fig-box.swim { background: #f3fafe; }
.fig figcaption { text-align: center; font-size: .68rem; color: var(--muted); font-weight: 600; margin-top: 5px; }

.muscle-key {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: .8rem; color: var(--ink-soft);
  background: rgba(255, 77, 109, .08);
  border: 1px solid rgba(255, 77, 109, .35);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
}
.muscle-key .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent-coral); box-shadow: 0 0 7px rgba(255, 77, 109, .8); flex: 0 0 auto; }
.muscle-key strong { color: var(--ink); }

.timeline {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px 2px;
  height: 74px;
}
.timeline svg { display: block; width: 100%; height: 100%; }
.timeline-cap { font-size: .68rem; color: var(--muted); text-align: center; margin: 4px 0 10px; }

.carry {
  background: var(--brand-tint);
  border: 1px solid var(--brand);
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 8px;
}
.carry-h { font-family: var(--font-display); font-size: .68rem; color: var(--brand-deep); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 3px; }
.carry-t { font-size: .85rem; color: var(--ink); line-height: 1.5; }

.info { background: var(--paper-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.info-l { font-family: var(--font-display); font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.info-t { font-size: .85rem; color: var(--ink-soft); line-height: 1.5; }

/* --- footer note ----------------------------------------------------------- */
.tempo-note {
  margin-top: 20px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.tempo-h { font-family: var(--font-display); font-weight: 700; color: var(--brand); margin-bottom: 4px; font-size: .9rem; }
.tempo-note p { margin: 0; font-size: .82rem; color: var(--ink-soft); line-height: 1.6; }

.guide-link { margin-top: 18px; }

/* Narrow phones: the four views as a 2×2 grid. */
@media (max-width: 520px) {
  .figs { grid-template-columns: repeat(2, 1fr); }
}
