:root {
  --green: #1f6f54;
  --green-dark: #164f3c;
  --green-light: #2e9173;
  --bg: #0f1512;
  --panel: #16201c;
  --panel-2: #1c2a24;
  --line: #2a3b33;
  --text: #e8efea;
  --muted: #9fb3a9;
  --accent: #3ec99a;
  --warn-bg: #2a211a;
  --warn-line: #7a5a2e;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(980px, 92vw); margin: 0 auto; }
a { color: var(--accent); }

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--green-dark), var(--green) 70%, var(--green-light));
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--line);
}
.hero h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -.02em; }
.hero .sub { margin: 10px 0 26px; color: #e4f3ec; opacity: .92; max-width: 60ch; }
.stats {
  display: grid; gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 14px 12px; text-align: center;
  backdrop-filter: blur(2px);
}
.stat .num { display: block; font-size: 1.5rem; font-weight: 700; }
.stat .lbl { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #cfe7dd; margin-top: 4px; }

/* Tabs */
.tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 16px 0; position: sticky; top: 0; z-index: 20;
  background: rgba(15,21,18,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.tabs a {
  text-decoration: none; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; font-size: .9rem;
  border: 1px solid transparent;
}
.tabs a:hover { color: var(--text); background: var(--panel-2); border-color: var(--line); }

main { padding: 28px 0 60px; }
section { margin: 40px 0; scroll-margin-top: 70px; }
h2 { font-size: 1.5rem; border-left: 4px solid var(--green-light); padding-left: 12px; margin-bottom: 16px; }
h3 { margin-top: 0; }
.muted { color: var(--muted); font-weight: 400; font-size: .9em; }
.note { color: var(--muted); font-size: .92rem; }

.callout {
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-left: 4px solid #d79a4a; border-radius: var(--radius);
  padding: 16px 18px; margin: 28px 0; font-size: .96rem;
}

.rules { padding-left: 20px; }
.rules li { margin: 8px 0; }

/* Tables */
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 440px; background: var(--panel); }
th { background: var(--green-dark); color: #eafff6; text-align: left; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tr.total td { font-weight: 700; background: var(--panel-2); }
td:first-child { white-space: nowrap; font-weight: 600; }

/* Cards / columns */
.cols { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 18px 20px; }
.card.pad ul { padding-left: 18px; margin: 8px 0 0; }
.card.pad li { margin: 7px 0; }

/* Exercise grid */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ex {
  text-align: left; cursor: pointer; color: inherit;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; padding: 0;
  display: flex; flex-direction: column; transition: transform .12s ease, border-color .12s ease;
}
.ex:hover { transform: translateY(-3px); border-color: var(--green-light); }
.ex .thumb {
  position: relative; aspect-ratio: 16/9; background: var(--panel-2) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.ex .thumb::after {
  content: "▶"; color: #fff; font-size: 1.3rem;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(31,111,84,.92); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.5); padding-left: 3px;
}
.ex .thumb.no-video::after { content: "🔍"; padding-left: 0; background: rgba(0,0,0,.55); }
.ex .meta { padding: 12px 14px; }
.ex .name { font-weight: 650; display: block; }
.ex .reps { color: var(--accent); font-size: .88rem; margin-top: 2px; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.78); display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.modal[hidden] { display: none; }
.modal-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  width: min(880px, 96vw); padding: 18px 18px 16px; box-shadow: var(--shadow); position: relative;
}
.modal-box h3 { margin: 0 40px 12px 0; }
.modal-close {
  position: absolute; top: 10px; right: 12px; background: none; border: none;
  color: var(--muted); font-size: 2rem; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.video-frame { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame .placeholder { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color: var(--muted); text-align:center; padding: 20px; }
.search-link { display: inline-block; margin-top: 12px; font-size: .9rem; }

footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .88rem; }
.disclaimer { color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 40px; }

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: 1fr; }
  .hero { padding: 36px 0 30px; }
}
