* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fdf6ee;
  --card: #ffffff;
  --accent1: #2e7d32;
  --accent2: #ffb300;
  --accent3: #66bb6a;
  --text: #2d2418;
  --muted: #8a7260;
  --tip: #e8f5e9;
  --tip-border: #2e7d32;
  --shadow: 0 4px 24px rgba(0,0,0,0.09);
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 0 0 60px 0;
}

/* ===== BREADCRUMB ===== */

.breadcrumb {
  padding: 16px 24px;
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--bg);
}
.breadcrumb a {
  color: var(--accent1);
  text-decoration: none;
  font-weight: 600;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb .separator {
  margin: 0 8px;
  color: var(--muted);
}

/* ===== TOPIC HEADER ===== */

.topic-header {
  background: linear-gradient(135deg, #2e7d32 0%, #43a047 60%, #66bb6a 100%);
  padding: 40px 24px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.topic-header::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  top: -80px;
  right: -60px;
}
.topic-header h1 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2rem, 6vw, 2.8rem);
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
  position: relative;
}
.topic-header p {
  color: rgba(255,255,255,0.92);
  font-size: clamp(1rem, 3vw, 1.125rem);
  font-weight: 600;
  margin-top: 8px;
  position: relative;
}

/* ===== TUTORIALS LIST ===== */

.tutorials {
  max-width: 700px;
  margin: 0 auto;
  padding: 32px 24px;
}

.tutorial-link {
  display: block;
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 16px;
}
.tutorial-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
}
.tutorial-link:focus {
  outline: 2px solid var(--accent1);
  outline-offset: 2px;
}
.tutorial-link h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.tutorial-link p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== EXERCISE ACCORDION ===== */
.exercise-list { max-width: 700px; margin: 0 auto; padding: 24px; }

.exercise-item {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}

.exercise-item[open] { box-shadow: 0 8px 32px rgba(0,0,0,0.14); }

.exercise-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 1.05rem;
  flex-wrap: wrap;
}
.exercise-summary::-webkit-details-marker { display: none; }

.exercise-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent1);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.exercise-name { flex: 1; min-width: 150px; }

.equipment-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  background: #e8f5e9;
  color: #2e7d32;
}

.priority-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 800;
  background: #fff8e1;
  color: #f57f17;
}

.chevron {
  font-size: 1.2rem;
  transition: transform 0.2s;
  color: var(--muted);
}
.exercise-item[open] .chevron { transform: rotate(180deg); }

.exercise-body {
  padding: 0 24px 24px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.exercise-body p { margin: 12px 0; line-height: 1.6; }
.exercise-body strong { color: var(--accent1); }

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  margin: 16px 0;
  background: #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
}
.video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  border-radius: 12px;
}
.video-placeholder {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--muted);
  font-size: 0.9rem;
}

.instructions { padding-left: 20px; margin: 12px 0; }
.instructions li { margin: 6px 0; line-height: 1.6; }

.sets-reps {
  background: #e8f5e9;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
}

.engagement-cue {
  background: #fff8e1;
  border-left: 4px solid #ffb300;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin: 16px 0;
}
.engagement-cue strong { color: #f57f17; }
.engagement-cue ul { padding-left: 18px; margin: 6px 0 0; }
.engagement-cue li { margin: 4px 0; line-height: 1.5; }

/* ===== INTRO SECTION ===== */
.intro-section {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 24px 0;
}
.intro-section p {
  line-height: 1.7;
  font-size: 1.05rem;
}

/* ===== SOURCES SECTION ===== */
.sources-section {
  max-width: 700px;
  margin: 32px auto 0;
  padding: 0 24px;
}
.sources-section h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--accent1);
}
.sources-section ul { padding-left: 20px; }
.sources-section li { margin: 6px 0; line-height: 1.5; }
.sources-section a { color: var(--accent1); }

/* ===== HABIT STACKING ===== */
.habit-section {
  max-width: 700px;
  margin: 24px auto 0;
  padding: 0 24px;
}
.habit-section summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent1);
  list-style: none;
  padding: 16px 0;
}
.habit-section summary::-webkit-details-marker { display: none; }
.habit-section ul { padding-left: 20px; margin: 8px 0 16px; }
.habit-section li { margin: 8px 0; line-height: 1.6; }

/* ===== PLANK TRACKER STYLES ===== */
.timer-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
}

.timer-display {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(4rem, 20vw, 8rem);
  color: var(--accent1);
  line-height: 1;
  padding: 32px 0;
  letter-spacing: 2px;
}

.timer-btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 16px auto;
  padding: 20px 0;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.timer-btn:active { transform: scale(0.97); }
.timer-btn.start { background: var(--accent1); color: #fff; }
.timer-btn.stop { background: #c62828; color: #fff; }
.timer-btn.reset { background: var(--muted); color: #fff; }

.streak-display {
  margin: 24px 0;
  padding: 20px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.streak-number {
  font-family: 'Fredoka One', cursive;
  font-size: 2.5rem;
  color: var(--accent1);
}
.streak-label {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.95rem;
}
.already-done {
  background: #e8f5e9;
  padding: 12px 16px;
  border-radius: 10px;
  color: #2e7d32;
  font-weight: 700;
  margin: 16px 0;
}

.history-section {
  max-width: 500px;
  margin: 24px auto 0;
  padding: 0 24px;
}
.history-section h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--accent1);
}
.history-list {
  list-style: none;
  padding: 0;
}
.history-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--card);
  border-radius: 10px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.history-date { color: var(--muted); font-weight: 600; }
.history-time { font-weight: 800; color: var(--accent1); }
.history-delete {
  background: none; border: none; color: var(--muted); font-size: 1.2rem;
  cursor: pointer; padding: 0 4px; line-height: 1; opacity: 0.5;
}
.history-delete:hover { opacity: 1; color: #c62828; }

/* ===== PUSH-UP PAGE ===== */
.content-section {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px;
}
.content-section h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--accent1);
  margin: 32px 0 16px;
}
.content-section h2:first-child { margin-top: 0; }
.content-section p { line-height: 1.7; margin: 12px 0; }
.content-section ol, .content-section ul { padding-left: 20px; margin: 12px 0; }
.content-section li { margin: 8px 0; line-height: 1.6; }

.progression-card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 16px 0;
}
.progression-card h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent1);
  margin-bottom: 12px;
}

.tip-box {
  background: var(--tip);
  border-left: 4px solid var(--tip-border);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin: 16px 0;
}
.tip-box strong { color: var(--accent1); }

.warning-box {
  background: #fff3e0;
  border-left: 4px solid #ff7043;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin: 16px 0;
}
.warning-box strong { color: #e64a19; }

/* ===== NAV LINKS ===== */
.page-nav {
  max-width: 700px;
  margin: 32px auto 0;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
}
.page-nav a {
  color: var(--accent1);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}
.page-nav a:hover { text-decoration: underline; }
