/* ================================================================
   rebyld. — Unified Design System
   12-Week Bodyweight & Dumbbell Performance System
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --ink: #090A0F;
  --ink-2: #121620;
  --ink-3: #1A202C;
  --paper: #F5F6F9;
  --paper-dim: #8E9AA8;
  --lime: #D4FF26;
  --lime-dim: #BADA1F;
  --blue: #4D7CFF;
  --blue-dim: #355ECB;
  --coral: #FF4D4D;
  --green: #34D399;
  --line: #222938;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --disp: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(212, 255, 38, 0.08);
  --shadow-glow-green: 0 0 16px rgba(52, 211, 153, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--line) var(--ink);
  background-color: var(--ink);
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lime), var(--blue));
  z-index: 250;
  width: 0%;
  transition: width 0.1s ease-out;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lime);
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 1px;
  display: inline-block;
  box-shadow: 0 0 8px var(--lime);
}

h1, h2, h3, h4, .disp {
  font-family: var(--disp);
  letter-spacing: -.01em;
}

/* ---------- SCOREBOARD NAV ---------- */
.scorebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(9, 10, 15, 0.8);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 40px);
  height: 64px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.scorebar.hide {
  transform: translateY(-100%);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  font-family: var(--disp);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .dot {
  width: 8px;
  height: 8px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--lime);
}

.btn-settings-trigger {
  background: none;
  border: none;
  color: var(--paper-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.btn-settings-trigger:hover {
  color: var(--lime);
  background: rgba(255, 255, 255, 0.05);
}

.tabs {
  display: flex;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.tabs a {
  padding: 8px 14px;
  color: var(--paper-dim);
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.tabs a:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
}

.tabs a.active {
  color: var(--ink);
  background: var(--lime);
  font-weight: 600;
}

.tabs a.nav-hidden {
  display: none !important;
}

.navtoggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  z-index: 250;
}

.navtoggle .bar {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--paper);
  border-radius: 2px;
  transition: var(--transition-smooth);
}

.navtoggle.active .bar-1 {
  transform: translateY(7px) rotate(45deg);
}

.navtoggle.active .bar-2 {
  opacity: 0;
  transform: scale(0);
}

.navtoggle.active .bar-3 {
  transform: translateY(-7px) rotate(-45deg);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  z-index: 201;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(280px, 80vw);
  background: rgba(18, 22, 32, 0.98);
  backdrop-filter: blur(30px);
  z-index: 202;
  border-left: 1px solid var(--line);
  padding: 88px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer.active {
  transform: translateX(0);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-nav a {
  font-family: var(--disp);
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--paper-dim);
  padding: 12px 16px;
  border-radius: var(--radius);
  transition: var(--transition-smooth);
}

.drawer-nav a.active {
  color: var(--ink);
  background: var(--lime);
}

.drawer-nav a.nav-hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .tabs { display: none; }
  .navtoggle { display: flex; }
}

/* ---------- SETTINGS PANEL ---------- */
.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.settings-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.settings-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 9, 0.85);
  backdrop-filter: blur(8px);
}

.settings-modal-content {
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--line);
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  padding: 24px;
  z-index: 301;
  box-shadow: var(--shadow-md);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-modal.active .settings-modal-content {
  transform: scale(1);
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.settings-modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--paper);
}

.settings-modal-meta {
  font-size: 12px;
  color: var(--paper-dim);
  margin-bottom: 20px;
}

.btn-settings-close {
  background: none;
  border: none;
  color: var(--paper-dim);
  cursor: pointer;
  font-size: 24px;
  padding: 4px;
  line-height: 1;
}

.settings-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.settings-toggle-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.settings-toggle-item.dragging {
  cursor: grabbing;
  opacity: 0.6;
  transform: scale(1.02);
  border-color: var(--lime);
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.drag-handle {
  color: var(--paper-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.settings-toggle-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--paper);
  flex: 1;
}

.switch-control {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--line);
  border-radius: 24px;
  transition: .3s;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--paper-dim);
  border-radius: 50%;
  transition: .3s;
}

input:checked+.switch-slider {
  background-color: var(--lime);
}

input:checked+.switch-slider:before {
  transform: translateX(20px);
  background-color: var(--ink);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 120px clamp(16px, 5vw, 64px) 60px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: radial-gradient(circle at 80% 20%, rgba(212, 255, 38, 0.02), transparent 50%);
}

.hero.section-hidden {
  display: none !important;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .15;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
}

.hero-name {
  font-size: clamp(48px, 8vw, 96px);
  line-height: .95;
  font-weight: 700;
  margin: 16px 0 20px;
  letter-spacing: -.03em;
}

.hero-name span {
  color: var(--lime);
}

.hero-sub {
  font-family: var(--body);
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--paper-dim);
  max-width: 620px;
  margin-bottom: 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  max-width: 820px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.stat {
  padding: 14px 16px;
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: var(--radius);
}

.stat b {
  font-family: var(--mono);
  font-size: clamp(24px, 3vw, 32px);
  display: block;
  color: var(--lime);
  font-weight: 700;
}

.stat span {
  font-size: 11px;
  color: var(--paper-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-family: var(--mono);
  margin-top: 4px;
  display: block;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: clamp(16px, 5vw, 64px);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-dim);
  letter-spacing: .1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.scroll-cue .bar {
  width: 1px;
  height: 24px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.scroll-cue .bar::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--lime);
  animation: scrolldrip 1.8s ease-in-out infinite;
}

@keyframes scrolldrip {
  0% { top: -100%; }
  100% { top: 100%; }
}

/* ---------- SECTION SCAFFOLD ---------- */
section.block {
  padding: clamp(40px, 5vw, 72px) clamp(14px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  position: relative;
}

section.block.section-hidden {
  display: none !important;
}

.block-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  max-width: 760px;
}

.block-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
}

.block-head p {
  color: var(--paper-dim);
  font-size: clamp(14px, 1.5vw, 16px);
  max-width: 620px;
  line-height: 1.5;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- DIET SECTION ---------- */
.plan-toggle,
.diet-toggle {
  display: flex;
  width: fit-content;
  max-width: 100%;
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 12px;
  gap: 2px;
  box-sizing: border-box;
}

.plan-toggle {
  margin-bottom: 10px;
}

/* Legacy slider nodes kept in markup — unused; active chip paints the button */
.plan-toggle .slider,
.diet-toggle .slider {
  display: none;
}

.hidden-toggle {
  display: none !important;
}

.plan-group {
  display: none;
}

.plan-group.active {
  display: block;
}

.plan-toggle button,
.diet-toggle button {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: clamp(10px, 2.4vw, 11px);
  letter-spacing: .05em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  color: var(--paper-dim);
  padding: 11px 18px;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
}

.plan-toggle button.active,
.diet-toggle button.active {
  color: var(--ink);
  background: var(--lime);
  box-shadow: var(--shadow-glow);
}

.plan-toggle button:not(.active):hover,
.diet-toggle button:not(.active):hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
}

.macro-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.macro-cell {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.macro-cell .num {
  font-family: var(--mono);
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  color: var(--paper);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.macro-cell .num small {
  font-size: 12px;
  color: var(--paper-dim);
}

.macro-cell .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--paper-dim);
  font-family: var(--mono);
  margin-top: 6px;
}

.macro-cell.hydration .num {
  color: var(--blue);
}

.day-panel {
  display: none;
}

.day-panel.active {
  display: block;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
  transform: translateX(-50%);
}

@media (max-width: 760px) {
  .timeline::before {
    left: 18px;
    transform: none;
  }
}

.tl-item {
  position: relative;
  margin-bottom: 22px;
  width: 50%;
}

.tl-item:last-child {
  margin-bottom: 0;
}

.tl-item:nth-child(odd) {
  padding-right: 32px;
  left: 0;
  text-align: right;
}

.tl-item:nth-child(even) {
  padding-left: 32px;
  left: 50%;
  text-align: left;
}

.tl-node {
  position: absolute;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--line);
  z-index: 2;
  transition: var(--transition-smooth);
}

.tl-item:nth-child(odd) .tl-node { right: -6px; }
.tl-item:nth-child(even) .tl-node { left: -6px; }

.tl-item:hover .tl-node {
  border-color: var(--lime);
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
}

.tl-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.tl-item:nth-child(odd) .tl-header { justify-content: flex-end; }
.tl-item:nth-child(even) .tl-header { justify-content: flex-start; }

.tl-time {
  font-family: var(--mono);
  color: var(--lime);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tl-item:nth-child(odd) .tl-time { flex-direction: row-reverse; }

.tl-time .kcal {
  background: var(--ink-2);
  color: var(--paper-dim);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--line);
  font-family: var(--mono);
}

.tl-card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  text-align: left;
}

.tl-phase {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--paper);
  font-family: var(--disp);
}

.tl-menu {
  color: var(--paper-dim);
  font-size: 14px;
  margin-bottom: 12px;
}

.tl-menu ul {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tl-macros {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-dim);
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 12px;
  border-radius: 6px;
  width: fit-content;
}

.tl-macros span b {
  color: var(--paper);
}

@media (max-width: 760px) {
  .tl-item {
    width: 100% !important;
    left: 0 !important;
    padding-left: 36px !important;
    padding-right: 0 !important;
    text-align: left !important;
    margin-bottom: 16px;
  }
  .tl-node {
    left: 13px !important;
    right: auto !important;
  }
  .tl-header { justify-content: flex-start !important; }
  .tl-time { flex-direction: row !important; }
}

.weekend-note {
  margin-top: 24px;
  background: var(--ink-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 13.5px;
  color: var(--paper-dim);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.callout {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 28px;
}

.callout h3 {
  font-family: var(--disp);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--lime);
  margin-bottom: 16px;
  font-weight: 700;
}

.callout ul {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.callout li {
  font-size: 14px;
  color: var(--paper-dim);
}

.callout li b {
  color: var(--paper);
}

.mini-callout {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--paper-dim);
}

/* ---------- WORKOUT SECTION ---------- */
.day-tabs-wrap {
  position: relative;
  margin-bottom: 32px;
}

.day-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.day-tabs::-webkit-scrollbar {
  display: none;
}

.day-tab {
  flex: 0 0 auto;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--paper-dim);
  padding: 14px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  min-width: 150px;
  transition: var(--transition-smooth);
}

.day-tab .d-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--paper-dim);
}

.day-tab .d-name {
  font-weight: 700;
  font-size: 14px;
  margin-top: 2px;
  color: var(--paper);
  font-family: var(--disp);
}

.day-tab .d-focus {
  font-size: 11px;
  color: var(--paper-dim);
}

.day-tab:hover { border-color: rgba(255, 255, 255, 0.15); }

.day-tab.active {
  background: var(--lime);
  border-color: var(--lime);
}

.day-tab.active .d-num,
.day-tab.active .d-name,
.day-tab.active .d-focus {
  color: var(--ink);
}

.workout-panel {
  display: none;
}

.workout-panel.active {
  display: block;
}

.wtag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.wtag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--paper-dim);
  background: var(--ink-2);
}

.wtag.intensity-mod {
  border-color: rgba(77, 124, 255, 0.3);
  color: var(--blue);
}

.wtag.intensity-high {
  border-color: rgba(255, 77, 77, 0.3);
  color: var(--coral);
}

.subhead {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--paper-dim);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 16px;
}

.subhead::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.warmup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wu-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.wu-item .wu-n {
  font-family: var(--mono);
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
}

.wu-item .wu-t {
  font-weight: 600;
  font-size: 14px;
  font-family: var(--disp);
}

.wu-item .wu-r {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-dim);
  margin-left: auto;
}

.wu-item .wu-d {
  font-size: 13px;
  color: var(--paper-dim);
  flex-basis: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  padding-top: 4px;
}

.ex-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  border: none;
  background: transparent;
  overflow: visible;
}

.ex-table thead th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--paper-dim);
  padding: 4px 16px 8px;
  border: none;
  background: transparent;
  font-weight: 500;
  letter-spacing: .06em;
}

.ex-table thead th:first-child,
.ex-table thead th:last-child,
.ex-table tbody tr:last-child td:first-child,
.ex-table tbody tr:last-child td:last-child {
  border-radius: 0;
}

.ex-row td {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-2);
  vertical-align: middle;
  font-size: 14px;
}

.ex-row td:first-child {
  border-left: 1px solid var(--line);
  border-radius: var(--radius) 0 0 var(--radius);
  padding-left: 16px;
}

.ex-row td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding-right: 16px;
}

.ex-row {
  background: transparent;
  transition: var(--transition-smooth);
}

.ex-row:hover td {
  background: var(--ink-3);
  border-color: rgba(212, 255, 38, 0.18);
}

.ex-seq {
  font-family: var(--mono);
  color: var(--lime);
  font-weight: 700;
}

.ex-name {
  font-weight: 700;
  font-family: var(--disp);
  font-size: 15px;
}

.ex-sets { font-family: var(--mono); }
.ex-weight {
  font-family: var(--mono);
  color: var(--blue);
}

.ex-instr {
  color: var(--paper-dim);
  font-size: 13px;
  max-width: 400px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  line-height: 1.45;
}

.ex-instr .btn-ex-demo {
  margin-left: 0 !important;
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .ex-table {
    border-spacing: 0;
  }
  .ex-table thead { display: none; }
  .ex-table, .ex-table tbody, .ex-row, .ex-row td {
    display: block;
    width: 100%;
  }
  .ex-row {
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 8px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "seq name"
      "sets weight"
      "instr instr";
    gap: 6px 12px;
    position: relative;
  }
  .ex-row:hover {
    background: var(--ink-3);
  }
  .ex-row td {
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
  }
  .ex-row:hover td {
    background: transparent;
    border-color: transparent;
  }
  .ex-seq { grid-area: seq; }
  .ex-name {
    grid-area: name;
    padding-right: 20px;
  }
  .ex-sets {
    grid-area: sets;
    color: var(--paper-dim);
    font-size: 12px;
  }
  .ex-weight {
    grid-area: weight;
    font-size: 12px;
  }
  .ex-instr {
    grid-area: instr;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    max-width: none;
  }
}

.cooldown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cd-item {
  display: flex;
  gap: 12px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.cd-time {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--blue);
  background: rgba(77, 124, 255, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
  flex: 0 0 auto;
}

.cd-text b {
  display: block;
  font-size: 14px;
  color: var(--paper);
  font-family: var(--disp);
}

.cd-text span {
  font-size: 13px;
  color: var(--paper-dim);
}

.rest-strip {
  display: flex;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin: 16px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-dim);
}

.rest-strip b { color: var(--lime); }

.recovery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.rec-card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.rec-card .rc-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--lime);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.rec-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  font-family: var(--disp);
}

.rec-card p {
  font-size: 13px;
  color: var(--paper-dim);
}

/* ---------- HYDRATION & SLEEP ---------- */
.hs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
}

@media (max-width: 900px) {
  .hs-grid { grid-template-columns: 1fr; }
}

.water-vessel {
  position: relative;
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
  padding: 6px;
  height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.water-fill {
  position: relative;
  background: linear-gradient(180deg, rgba(77, 124, 255, 0.8), rgba(77, 124, 255, 0.5));
  border-radius: calc(var(--radius-lg) - 6px);
  transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  height: 0%;
}

.water-marks {
  position: absolute;
  inset: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--paper-dim);
  opacity: 0.5;
}

.water-marks div {
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  width: 100%;
  text-align: right;
}

.water-total {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: #fff;
  z-index: 2;
}

.water-total b {
  font-size: 32px;
  display: block;
  font-weight: 700;
  font-family: var(--disp);
  letter-spacing: -.02em;
}

.water-slots {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}

.ws-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ws-checkbox::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--blue);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.5);
  transition: var(--transition-smooth);
}

.ws-item.checked { border-color: rgba(77, 124, 255, 0.3); }
.ws-item.checked .ws-checkbox { border-color: var(--blue); }
.ws-item.checked .ws-checkbox::after {
  opacity: 1;
  transform: scale(1);
}
.ws-item.checked .ws-desc {
  color: var(--paper-dim);
  text-decoration: line-through;
  opacity: 0.5;
}

.ws-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  min-width: 80px;
}

.ws-desc {
  font-size: 13.5px;
  color: var(--paper-dim);
  flex: 1;
}

.ws-amt {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--paper);
  font-size: 13px;
}

.water-quick-log {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}

.water-manual-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.input-water-custom {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
}

.input-water-custom:focus { border-color: var(--blue); }

.btn-water {
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 12px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
}

.btn-water:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--paper-dim);
}

.btn-water-action {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  font-weight: 600;
}

.btn-water-action:hover {
  background: var(--blue-dim);
  border-color: var(--blue-dim);
}

.btn-water-reset {
  color: var(--coral);
  border-color: rgba(255, 77, 77, 0.2);
}

.btn-water-reset:hover {
  background: rgba(255, 77, 77, 0.05);
  border-color: var(--coral);
}

.sleep-card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
}

.sleep-arc-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.sleep-rules {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sr-item { display: flex; gap: 14px; }

.sr-item .sr-ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--lime);
  font-size: 14px;
  border: 1px solid var(--line);
}

.sr-item h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
  font-family: var(--disp);
}

.sr-item p {
  font-size: 13px;
  color: var(--paper-dim);
}

/* ---------- SCIENCE / BREAKDOWN ---------- */
.accordion { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }

.acc-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 4px;
  cursor: pointer;
}

.acc-num {
  font-family: var(--mono);
  color: var(--lime);
  font-size: 13px;
  min-width: 24px;
}

.acc-title {
  font-family: var(--disp);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 600;
  flex: 1;
}

.acc-plus {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--paper-dim);
  transition: transform 0.3s;
}

.acc-item.open .acc-plus {
  transform: rotate(45deg);
  color: var(--lime);
}

.acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-out;
  overflow: hidden;
}

.acc-item.open .acc-body { grid-template-rows: 1fr; }

.acc-inner {
  min-height: 0;
  padding: 0 4px 24px 40px;
  color: var(--paper-dim);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.acc-inner b { color: var(--paper); }

/* ---------- FOOTER ---------- */
footer {
  padding: 48px clamp(16px, 5vw, 64px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-dim);
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.totop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.totop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- WORKOUT FILTERS BAR ---------- */
.workout-controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-dim);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.btn-filter {
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--paper-dim);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-filter:hover {
  border-color: var(--paper-dim);
  color: var(--paper);
}

.btn-filter.active {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
  font-weight: 700;
}

.btn-filter-intensity.active-burn {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral);
}

/* ---------- EXERCISE ROW DEMO TRIGGER ---------- */
.btn-ex-demo {
  background: rgba(212, 255, 38, 0.1);
  border: 1px solid rgba(212, 255, 38, 0.25);
  color: var(--lime);
  padding: 5px 10px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-ex-demo:hover {
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 0 12px rgba(212, 255, 38, 0.4);
}

.btn-ex-demo svg {
  flex-shrink: 0;
}

.ex-row {
  cursor: pointer;
}

.ex-row:hover .btn-ex-demo {
  border-color: var(--lime);
}

.ex-row.bodyweight-hidden {
  display: none !important;
}

.badge-abs {
  background: rgba(212, 255, 38, 0.15);
  color: var(--lime);
  border: 1px solid rgba(212, 255, 38, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-left: 6px;
}

.badge-5k {
  background: rgba(77, 124, 255, 0.15);
  color: var(--blue);
  border: 1px solid rgba(77, 124, 255, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-left: 6px;
}

/* ---------- POP-UP DEMONSTRATION DIALOG (<dialog>) ---------- */
dialog.ex-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(92vw, 540px);
  max-height: 90vh;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--paper);
  padding: 0;
  box-shadow: var(--shadow-md), 0 0 40px rgba(0, 0, 0, 0.8);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) var(--ink-2);

  /* Modern Top-Layer Transitions */
  transition: display 0.3s allow-discrete, overlay 0.3s allow-discrete, opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: scale(0.92) translateY(12px);
}

dialog.ex-modal[open] {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@starting-style {
  dialog.ex-modal[open] {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
}

dialog.ex-modal::backdrop {
  background: rgba(5, 6, 9, 0.85);
  backdrop-filter: blur(12px) saturate(140%);
  transition: display 0.3s allow-discrete, overlay 0.3s allow-discrete, background-color 0.3s ease;
}

@starting-style {
  dialog.ex-modal[open]::backdrop {
    background-color: rgba(0, 0, 0, 0);
  }
}

.modal-card-wrap {
  display: flex;
  flex-direction: column;
}

.modal-hero-visual {
  position: relative;
  width: 100%;
  height: 240px;
  background: var(--ink-3);
  background-image: radial-gradient(circle at 50% 50%, rgba(212, 255, 38, 0.08), transparent 70%), linear-gradient(180deg, rgba(18, 22, 32, 0.2), var(--ink-2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(9, 10, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--paper);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background: var(--lime);
  color: var(--ink);
}

.shorts-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 77, 77, 0.9);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(255, 77, 77, 0.4);
}

.visual-motion-canvas {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  text-align: center;
}

.motion-svg-box {
  width: 90px;
  height: 90px;
  background: rgba(212, 255, 38, 0.05);
  border: 1.5px solid var(--lime);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  animation: pulseMotion 2s infinite ease-in-out;
}

@keyframes pulseMotion {
  0%, 100% { transform: scale(1); box-shadow: 0 0 16px rgba(212, 255, 38, 0.15); }
  50% { transform: scale(1.06); box-shadow: 0 0 28px rgba(212, 255, 38, 0.35); }
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-title-row h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--paper);
  line-height: 1.2;
}

.modal-muscles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.muscle-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--paper-dim);
}

.muscle-tag.primary {
  color: var(--lime);
  border-color: rgba(212, 255, 38, 0.3);
  background: rgba(212, 255, 38, 0.05);
}

.modal-section-card {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-section-card h4 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--lime);
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-section-card p, .modal-section-card ul {
  font-size: 13.5px;
  color: var(--paper-dim);
  line-height: 1.5;
}

.modal-section-card ul {
  padding-left: 16px;
}

.modal-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.btn-modal-action {
  flex: 1;
  background: var(--lime);
  color: var(--ink);
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-family: var(--disp);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-modal-action:hover {
  background: var(--lime-dim);
  box-shadow: 0 0 16px rgba(212, 255, 38, 0.3);
}

.btn-modal-ref {
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.3);
  color: var(--coral);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-modal-ref:hover {
  background: var(--coral);
  color: #fff;
}

.btn-modal-ref-pin {
  border-color: rgba(77, 124, 255, 0.4);
  color: var(--blue);
  background: rgba(77, 124, 255, 0.1);
}

.btn-modal-ref-pin:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.modal-form-guide {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-form-guide h4 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--lime);
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-form-guide p {
  font-size: 13px;
  color: var(--paper-dim);
  line-height: 1.45;
  margin: 0;
}

.modal-form-guide strong {
  color: var(--paper);
  font-weight: 600;
}

@media (max-width: 760px) {
  .plan-toggle,
  .diet-toggle {
    width: 100%;
    max-width: 100%;
  }

  .plan-toggle button,
  .diet-toggle button {
    flex: 1 1 0;
    min-width: 0;
    padding: 11px 12px;
    font-size: 9px;
    letter-spacing: .03em;
    text-align: center;
  }

  .modal-actions-row {
    flex-wrap: wrap;
  }

  .btn-modal-action,
  .btn-modal-ref {
    flex: 1 1 100%;
  }
}

/* Target User Settings Inputs */
.settings-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.settings-input-group h4 {
  font-family: var(--disp);
  font-size: 14px;
  color: var(--paper);
  margin-bottom: 4px;
}

.settings-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-field label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--paper-dim);
  text-transform: uppercase;
}

.settings-field input {
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 8px 12px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
}

.settings-field input:focus {
  border-color: var(--lime);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ================================================================
   EXERCISE COMPLETION VISUAL STATE
   ================================================================ */

.ex-row.completed td {
  background: rgba(52, 211, 153, 0.04);
  border-color: rgba(52, 211, 153, 0.25);
}

.ex-row.completed td:first-child {
  box-shadow: inset 3px 0 0 var(--green);
}

.ex-row.completed .ex-name {
  text-decoration: line-through;
  text-decoration-color: rgba(52, 211, 153, 0.5);
  color: var(--paper-dim);
}

.ex-row.completed .ex-seq {
  background: var(--green);
  color: var(--ink);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.ex-row.completed .ex-seq::after {
  content: '✓';
  font-size: 13px;
  font-weight: 700;
}

.ex-row.completed .btn-ex-demo {
  opacity: 0.5;
}

.wu-item.completed {
  border-left: 3px solid var(--green);
  background: rgba(52, 211, 153, 0.03);
}

.wu-item.completed .wu-t {
  text-decoration: line-through;
  text-decoration-color: rgba(52, 211, 153, 0.5);
  color: var(--paper-dim);
}

.wu-item.completed .wu-n {
  background: var(--green);
  color: var(--ink);
}

/* Day Tab Completion Indicator */
.day-tab.day-complete {
  border-color: var(--green);
  box-shadow: var(--shadow-glow-green);
}

.day-tab.day-complete .d-num::after {
  content: ' ✓';
  color: var(--green);
  font-size: 10px;
}

.day-tab .completion-badge {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--paper-dim);
  margin-top: 2px;
}

.day-tab.day-complete .completion-badge {
  color: var(--green);
}

/* Completion animation */
@keyframes completeFlash {
  0% { background-color: rgba(52, 211, 153, 0.15); }
  100% { background-color: rgba(52, 211, 153, 0.03); }
}

.ex-row.just-completed,
.wu-item.just-completed {
  animation: completeFlash 0.6s ease-out;
}

/* ================================================================
   ENHANCED EXERCISE MODAL — EXTENDED SECTIONS
   ================================================================ */

.modal-posture-card,
.modal-breathing-card,
.modal-tempo-card,
.modal-progression-card {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-posture-card h4,
.modal-breathing-card h4,
.modal-tempo-card h4,
.modal-progression-card h4 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-posture-card h4 { color: var(--blue); }
.modal-breathing-card h4 { color: var(--green); }
.modal-tempo-card h4 { color: var(--lime); }
.modal-progression-card h4 { color: var(--coral); }

.modal-posture-card p,
.modal-breathing-card p,
.modal-tempo-card p,
.modal-progression-card p {
  font-size: 13.5px;
  color: var(--paper-dim);
  line-height: 1.5;
}

/* Tempo Notation Display */
.tempo-display {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 6px;
}

.tempo-phase {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  text-align: center;
  flex: 1;
}

.tempo-phase .tempo-val {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--lime);
  display: block;
}

.tempo-phase .tempo-label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--paper-dim);
  letter-spacing: .05em;
}

.tempo-sep {
  color: var(--line);
  font-size: 18px;
  font-weight: 300;
}

/* Separate 5K & Abs Benefit Cards */
.modal-benefit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-benefit-card {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-benefit-card h4 {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.modal-benefit-card.card-5k h4 { color: var(--blue); }
.modal-benefit-card.card-abs h4 { color: var(--coral); }

.modal-benefit-card p {
  font-size: 12.5px;
  color: var(--paper-dim);
  line-height: 1.45;
}

@media (max-width: 480px) {
  .modal-benefit-row {
    grid-template-columns: 1fr;
  }
}

/* Mark Complete Button States */
.btn-modal-action.completed-state {
  background: var(--green);
  color: var(--ink);
  pointer-events: none;
}

/* ================================================================
   DIAGNOSTICS ACCORDION (preserved from original)
   ================================================================ */

/* Accordion styles already exist above, this section ensures
   they are included in the extracted CSS. */

/* Modal Equipment Label */
.modal-equip-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: .08em;
}
