
:root {
  --ink: #182019;
  --ink-soft: #5d675f;
  --paper: #f6f5ef;
  --card: #fffefa;
  --line: #dfe3da;
  --lime: #c9f36a;
  --lime-deep: #a9d94c;
  --sage: #e8eee3;
  --warm: #f0e7d4;
  --radius: 22px;
  --shadow: 0 12px 40px rgba(34, 47, 36, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 2%, rgba(201, 243, 106, 0.17), transparent 25rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.profile-gate {
  min-height: 100svh;
  padding: 34px;
  display: grid;
  place-items: center;
}

.profile-gate-shell {
  width: min(1060px, 100%);
  min-height: 640px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  border: 1px solid rgba(24, 32, 25, 0.08);
  border-radius: 32px;
  background: var(--card);
  box-shadow: 0 34px 100px rgba(34, 47, 36, 0.12);
}

.profile-story {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 42px 48px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--ink);
  color: #fff;
}

.profile-brand,
.profile-story-copy {
  position: relative;
  z-index: 1;
}

.profile-brand { color: #fff; }
.profile-brand .brand-mark { background: var(--lime); color: var(--ink); }
.profile-brand small { color: #9ba49c; }
.profile-story-copy { max-width: 395px; }

.profile-eyebrow,
.profile-card-kicker {
  display: inline-block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-eyebrow { color: var(--lime); }

.profile-story-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(43px, 5.6vw, 66px);
  line-height: 0.99;
  letter-spacing: -0.07em;
}

.profile-story-copy > p {
  max-width: 360px;
  margin: 0;
  color: #adb5ad;
  font-size: 14px;
  line-height: 1.75;
}

.profile-feature-list {
  margin-top: 34px;
  display: grid;
  gap: 12px;
}

.profile-feature-list > span {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e3e7e2;
  font-size: 12px;
  font-weight: 650;
}

.profile-feature-list i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 9px;
  color: var(--lime);
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.profile-orbit {
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(201, 243, 106, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

.profile-orbit-one {
  width: 350px;
  height: 350px;
  top: -184px;
  right: -145px;
  box-shadow: 0 0 0 45px rgba(201, 243, 106, 0.035);
}

.profile-orbit-two {
  width: 180px;
  height: 180px;
  right: -94px;
  bottom: 96px;
  border-width: 20px;
  border-color: rgba(201, 243, 106, 0.07);
}

.profile-card {
  align-self: center;
  padding: 68px 54px;
}

.profile-card-kicker { color: #719443; }

.profile-card h2 {
  margin: 14px 0 12px;
  font-size: 39px;
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.profile-card > p {
  max-width: 330px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.profile-mode-switch {
  margin-top: 24px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid #d9dfd5;
  border-radius: 13px;
  background: #f1f3ee;
}

.profile-mode-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.profile-mode-switch button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 12px rgba(24, 32, 25, 0.08);
}

.profile-mode-switch button:disabled { opacity: 0.65; cursor: wait; }

.profile-form {
  margin-top: 20px;
  display: grid;
  gap: 9px;
}

.profile-form label {
  font-size: 11px;
  font-weight: 850;
}

.profile-form input {
  width: 100%;
  height: 54px;
  padding: 0 15px;
  border: 1px solid #d9dfd5;
  border-radius: 13px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  transition: 150ms ease;
}

.profile-form input::placeholder { color: #9ba39c; }

.profile-form input:focus {
  border-color: #8bab50;
  box-shadow: 0 0 0 4px rgba(169, 217, 76, 0.16);
}

.profile-form > button {
  min-height: 54px;
  margin-top: 7px;
  padding: 0 17px;
  border: 0;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: 150ms ease;
}

.profile-form > button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(24, 32, 25, 0.17);
}

.profile-form > button:disabled,
.profile-form input:disabled {
  opacity: 0.65;
  cursor: wait;
}

.profile-form > button span { color: var(--lime); font-size: 17px; }
.profile-error { color: #a64f3f; font-size: 11px; font-weight: 700; }

.profile-privacy-note {
  margin-top: 26px;
  padding: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 13px;
  background: #f1f3ee;
}

.profile-privacy-note > span {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  border: 1px solid #c7cec3;
  border-radius: 50%;
  color: #69766a;
  font-size: 10px;
  font-weight: 850;
}

.profile-privacy-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.app-shell { min-height: 100vh; }

.topbar {
  height: 78px;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--lime);
  font-size: 18px;
  font-weight: 900;
  transform: rotate(-3deg);
}

.brand > span:last-child { display: grid; line-height: 1.05; }
.brand strong { font-size: 16px; letter-spacing: -0.02em; }
.brand small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.account-area {
  display: flex;
  align-items: center;
  gap: 17px;
}

.save-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #75b94b;
  box-shadow: 0 0 0 4px rgba(117, 185, 75, 0.12);
}

.save-error { color: #a64f3f; }
.save-error .save-dot { background: #bf6756; box-shadow: 0 0 0 4px rgba(191, 103, 86, 0.12); }

.profile-switch {
  min-height: 42px;
  padding: 5px 9px 5px 5px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  column-gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.profile-switch:hover:not(:disabled) { border-color: #b7c0b3; background: #fff; }
.profile-switch:disabled { opacity: 0.65; cursor: wait; }

.profile-switch > span {
  width: 31px;
  height: 31px;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--lime);
  font-size: 13px;
  font-weight: 850;
}

.profile-switch strong {
  max-width: 122px;
  overflow: hidden;
  align-self: end;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-switch small {
  align-self: start;
  color: var(--ink-soft);
  font-size: 9px;
}

.view-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
}
.view-nav button {
  min-width: 84px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.view-nav button.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 3px 10px rgba(24,32,25,0.13);
}

.page-wrap { width: min(1204px, calc(100% - 40px)); margin: 0 auto; }
.hidden-view { display: none; }

.week-hero {
  min-height: 246px;
  border-radius: 30px;
  padding: 38px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 24px 70px rgba(24, 32, 25, 0.16);
  position: relative;
  overflow: hidden;
}

.week-hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -90px;
  top: -150px;
  border: 64px solid rgba(201, 243, 106, 0.08);
  border-radius: 50%;
}

.week-main, .week-progress-card { position: relative; z-index: 1; }
.eyebrow {
  color: #8c9a8e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.week-main .eyebrow { color: var(--lime); }

.week-heading-row {
  display: flex;
  align-items: center;
  gap: 17px;
  margin: 16px 0 18px;
}
.week-heading-row h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}
.week-heading-row p {
  margin: 9px 0 0;
  color: #aab2aa;
  font-size: 14px;
  font-weight: 600;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: #fff;
  cursor: pointer;
  transition: 160ms ease;
}
.icon-button:hover {
  border-color: var(--lime);
  background: rgba(201,243,106,0.09);
  transform: translateY(-1px);
}

.today-button {
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.28);
  margin-top: 14px;
  padding: 0 0 3px;
  background: transparent;
  color: #d8ddd8;
  font-size: 12px;
  cursor: pointer;
}

.program-badge {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(255,255,255,0.055);
}
.program-badge span {
  color: var(--lime);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}
.program-badge strong {
  overflow: hidden;
  color: #e2e7e1;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-progress-card {
  min-width: 320px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 21px 24px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  background: rgba(255,255,255,0.055);
  backdrop-filter: blur(8px);
}

.progress-ring {
  --progress: 0deg;
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--lime) var(--progress), rgba(255,255,255,0.1) 0);
  position: relative;
}
.progress-ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #222a23;
}
.progress-ring span { position: relative; z-index: 1; font-size: 17px; font-weight: 850; }
.week-progress-card > div:last-child { display: grid; }
.muted-label {
  color: #8f9a90;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.week-progress-card strong { margin-top: 3px; font-size: 20px; letter-spacing: -0.025em; }
.week-progress-card p { margin: 5px 0 0; color: #9da69e; font-size: 12px; }

.cycle-restart-notice {
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid #c4da9f;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f2f8e7;
}
.cycle-restart-notice > span {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--lime);
  font-size: 12px;
  font-weight: 850;
}
.cycle-restart-notice > div { display: grid; gap: 3px; }
.cycle-restart-notice strong { font-size: 12px; font-weight: 850; }
.cycle-restart-notice small { color: var(--ink-soft); font-size: 10px; }

.cycle-strip {
  margin-top: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 19px;
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  background: rgba(255,254,250,0.84);
}
.cycle-intro {
  padding-left: 9px;
  display: grid;
  gap: 5px;
}
.cycle-intro > span {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cycle-intro > strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}
.cycle-track {
  display: grid;
  grid-template-columns: repeat(var(--cycle-count, 4), minmax(120px, 1fr));
  gap: 7px;
  overflow-x: auto;
}
.cycle-step {
  min-width: 0;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid #e5e8e1;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  background: #fafaf7;
  text-align: left;
  cursor: pointer;
  transition: 140ms ease;
}
.cycle-step:hover { border-color: #bac6b1; background: #fff; }
.cycle-step.active {
  border-color: #b5d876;
  background: #f1f8e2;
}
.cycle-step > span {
  width: 23px;
  height: 23px;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e6eae3;
  font-size: 10px;
  font-weight: 850;
}
.cycle-step.active > span { background: var(--lime); }
.cycle-step > strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cycle-step > small {
  color: #78817a;
  font-size: 9px;
}

.day-switcher {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  margin: 18px 0 28px;
}

.day-tab {
  min-width: 0;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  text-align: left;
  transition: 150ms ease;
}
.day-tab:hover { background: #fff; border-color: #c6cec2; }
.day-tab.active { background: var(--card); border-color: var(--ink); box-shadow: var(--shadow); }
.day-number {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--sage);
  font-size: 12px;
  font-weight: 850;
}
.day-tab.active .day-number { background: var(--lime); }
.day-tab > span:last-child { min-width: 0; display: grid; }
.day-tab small {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}
.day-tab strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  white-space: nowrap;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 28px;
}
.workout-panel { min-width: 0; }
.workout-header {
  min-height: 98px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 4px 20px;
}
.workout-header h2 {
  margin: 7px 0 5px;
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.03;
  letter-spacing: -0.045em;
}
.workout-header p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.day-score {
  min-width: 80px;
  padding: 11px 15px;
  display: grid;
  justify-items: center;
  border-radius: 17px;
  background: var(--sage);
}
.day-score span { font-size: 20px; font-weight: 850; line-height: 1; }
.day-score small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.exercise-list { display: grid; gap: 12px; }
.exercise-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 7px 24px rgba(34,47,36,0.035);
}
.exercise-header {
  padding: 19px 20px 15px;
  display: grid;
  grid-template-columns: 35px minmax(0,1fr) auto;
  gap: 12px;
  align-items: start;
}
.exercise-index {
  padding-top: 3px;
  color: #9aa39b;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
}
.exercise-title h3 { margin: 0; font-size: 16px; letter-spacing: -0.018em; }
.exercise-meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.exercise-meta span {
  padding: 4px 8px;
  border-radius: 8px;
  background: #f0f2ed;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}
.exercise-meta .raise-hint { background: #e6f7bc; color: #4f6c25; }
.exercise-meta .extra-set-hint { background: #e8edf8; color: #4c6389; }
.exercise-meta .progression-hint { background: #eef1ea; color: #566652; }
.set-count {
  min-width: 38px;
  padding: 5px 8px;
  border-radius: 9px;
  background: #f0f2ed;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.set-count.complete { background: var(--lime); color: var(--ink); }

.sets-grid { padding: 0 20px 18px 67px; }
.sets-labels, .set-row {
  display: grid;
  grid-template-columns: 48px 1fr 1fr 52px;
  gap: 8px;
  align-items: center;
}
.sets-grid.weightless .sets-labels,
.sets-grid.weightless .set-row {
  grid-template-columns: 48px 1fr 52px;
}
.sets-labels {
  padding: 0 8px 7px;
  color: #909991;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.sets-labels span:last-child { text-align: center; }
.set-row {
  min-height: 49px;
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid #e7e9e3;
  border-radius: 13px;
  background: #fafaf7;
  transition: 130ms ease;
}
.set-row.done { border-color: #cfe69a; background: #f4fae7; }
.set-number {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #677069;
  font-size: 12px;
  font-weight: 850;
}

.remove-set-button {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  padding: 0;
  border: 1px solid #e1ccc7;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #fff8f6;
  color: #a9675b;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: 140ms ease;
}

.remove-set-button:hover {
  border-color: #c78275;
  background: #fae9e5;
  color: #8c473c;
}
.set-row input {
  width: 100%;
  height: 34px;
  border: 1px solid #dfe3da;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  outline: none;
  transition: 130ms ease;
}
.set-row input:focus {
  border-color: #88a94b;
  box-shadow: 0 0 0 3px rgba(169,217,76,0.18);
}
.set-check {
  width: 31px;
  height: 31px;
  justify-self: center;
  border: 1px solid #cbd1c8;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}
.set-row.done .set-check { border-color: var(--lime-deep); background: var(--lime); }

.add-set-button {
  width: 100%;
  min-height: 40px;
  margin-top: 9px;
  padding: 0 11px;
  border: 1px dashed #cdd5c8;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: #5f7356;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: 150ms ease;
}

.add-set-button:hover {
  border-color: #91ad65;
  background: #f3f8ea;
  color: #48652e;
}

.add-set-button > span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--sage);
  font-size: 15px;
  line-height: 1;
}

.exercise-footer {
  min-height: 42px;
  padding: 10px 20px 11px 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #eceee9;
  color: var(--ink-soft);
  font-size: 10px;
}
.exercise-footer b { color: #687169; }
.exercise-footer button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #587824;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.notes-card {
  margin-top: 18px;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.notes-card label {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 800;
}
.notes-card textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  border: 1px solid #dfe3da;
  border-radius: 13px;
  padding: 12px 14px;
  background: #fafaf7;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  outline: none;
}
.notes-card textarea:focus {
  border-color: #88a94b;
  box-shadow: 0 0 0 3px rgba(169,217,76,0.16);
}

.complete-workout {
  width: 100%;
  min-height: 58px;
  margin-top: 12px;
  border: 0;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: 160ms ease;
}
.complete-workout:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(24,32,25,0.17);
}
.complete-workout.completed { background: var(--lime); color: var(--ink); }
.complete-icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.complete-workout.completed .complete-icon { background: rgba(24,32,25,0.1); }

.sidebar { position: sticky; top: 20px; display: grid; gap: 13px; }
.summary-card {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.summary-card h3 {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.summary-card p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.section-kicker {
  color: #71806f;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.dark-card { background: var(--ink); color: #fff; border-color: var(--ink); }
.dark-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  letter-spacing: -0.045em;
}
.dark-card p { color: #9da69e; }
.mini-progress {
  height: 6px;
  margin-top: 19px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,0.1);
}
.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
  transition: width 250ms ease;
}
.warm-card { background: var(--warm); border-color: #e0d4bc; }

.calendar-page {
  width: min(1204px, calc(100% - 40px));
  margin: 0 auto;
}

.calendar-hero {
  min-height: 240px;
  padding: 39px 42px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 45px;
  background:
    radial-gradient(circle at 73% 9%, rgba(201, 243, 106, 0.14), transparent 18rem),
    var(--ink);
  color: #fff;
}

.calendar-hero > div:first-child { max-width: 670px; }
.calendar-hero .eyebrow { color: var(--lime); }

.calendar-hero h1 {
  max-width: 635px;
  margin: 12px 0 10px;
  font-size: clamp(37px, 4.9vw, 57px);
  line-height: 0.98;
  letter-spacing: -0.062em;
}

.calendar-hero > div:first-child > p {
  max-width: 535px;
  margin: 0;
  color: #abb4ab;
  font-size: 13px;
  line-height: 1.7;
}

.streak-card {
  min-width: 265px;
  padding: 21px 23px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.streak-card > span {
  color: #a8b3a8;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.streak-card > strong {
  display: block;
  margin-top: 7px;
  color: var(--lime);
  font-size: 53px;
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.streak-card > strong small {
  margin-left: 7px;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0;
}

.streak-card > p {
  max-width: 215px;
  margin: 8px 0 0;
  color: #a8b3a8;
  font-size: 10px;
  line-height: 1.55;
}

.calendar-stat-row {
  margin: 17px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.calendar-stat-row > article {
  min-height: 112px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  align-content: center;
  background: var(--card);
}

.calendar-stat-row > article > span {
  color: #727c73;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-stat-row > article > strong {
  margin-top: 5px;
  font-size: 29px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.calendar-stat-row > article > small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10px;
}

.calendar-board {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.calendar-board-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.calendar-board-header h2 {
  margin: 5px 0 0;
  font-size: 26px;
  letter-spacing: -0.04em;
  text-transform: capitalize;
}

.calendar-month-nav {
  display: flex;
  align-items: center;
  gap: 7px;
}

.calendar-month-nav > button {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafaf7;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.calendar-month-nav > button:hover { border-color: #b8c2b2; background: #fff; }
.calendar-month-nav > .calendar-today-button { font-size: 10px; }

.calendar-schedule-toolbar {
  margin-bottom: 15px;
  padding: 13px 15px;
  border: 1px solid #e2e7dc;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #f8faf5;
}

.calendar-schedule-toolbar > div:first-child { min-width: 0; display: grid; gap: 5px; }
.calendar-schedule-toolbar > div:first-child > strong { font-size: 11px; }
.calendar-schedule-toolbar > div:first-child > span { color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.calendar-schedule-actions { display: flex; flex-shrink: 0; align-items: center; gap: 6px; }

.calendar-edit-button,
.calendar-reset-button {
  min-height: 35px;
  padding: 0 11px;
  border: 1px solid #d7ddd1;
  border-radius: 10px;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.calendar-edit-button {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.calendar-edit-button.active { border-color: #aaca6b; background: var(--lime); color: var(--ink); }
.calendar-reset-button:disabled { opacity: 0.46; cursor: not-allowed; }

.calendar-edit-banner {
  margin-bottom: 10px;
  padding: 12px 13px;
  border: 1px solid #cfdfb1;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  background: #f0f7e5;
}

.calendar-edit-banner.has-selection { border-color: #93b75b; background: #eaf5d7; }

.calendar-edit-banner > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #58763b;
  font-size: 18px;
  font-weight: 750;
}

.calendar-edit-banner > div { min-width: 0; display: grid; gap: 4px; }
.calendar-edit-banner > div > strong { font-size: 11px; text-transform: capitalize; }
.calendar-edit-banner > div > small { color: #5d6d53; font-size: 9px; line-height: 1.45; }
.calendar-edit-banner > button {
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid #c5d4af;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.calendar-feedback {
  margin: 0 1px 11px;
  color: #546c36;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.5;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.calendar-weekday {
  padding: 0 4px 8px;
  color: #7e887f;
  font-size: 10px;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.calendar-cell {
  min-width: 0;
  min-height: 103px;
  padding: 11px;
  border: 1px solid #e5e8e1;
  border-radius: 13px;
  display: grid;
  grid-template-rows: 26px auto auto;
  align-content: start;
  text-align: left;
  background: #fcfcf9;
  cursor: pointer;
  transition: 150ms ease;
}

.calendar-cell:hover:not(:disabled) { border-color: #a7b2a1; transform: translateY(-1px); }
.calendar-cell.outside-month { opacity: 0.49; }
.calendar-cell.is-today { border-color: #819a5c; box-shadow: inset 0 0 0 1px #819a5c; }
.calendar-cell.completed { border-color: #cde394; background: #eff7dc; }
.calendar-cell.started { border-color: #c7d5ec; background: #eef3fa; }
.calendar-cell.missed { border-color: #e7d5d0; background: #faf1ee; }
.calendar-cell.rest { border-color: #edeee9; background: #f5f5f1; color: #8e958d; cursor: default; }
.calendar-cell.rescheduled { border-left: 3px solid #85a6d1; }
.calendar-cell.editable,
.calendar-cell.rest.editable { cursor: grab; }
.calendar-cell.editable:active { cursor: grabbing; }
.calendar-cell.selected-for-move {
  border-color: #779b47;
  background: #e8f4d4;
  box-shadow: inset 0 0 0 1px #779b47, 0 8px 22px rgba(88, 119, 60, 0.12);
}
.calendar-cell.drop-target {
  border-color: #819aca;
  background: #e8effb;
  box-shadow: inset 0 0 0 1px #819aca;
}

.calendar-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calendar-cell-top > span { font-size: 12px; font-weight: 850; }

.calendar-cell-top > i {
  width: 19px;
  height: 19px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.calendar-cell.completed .calendar-cell-top > i { background: var(--lime); }
.calendar-cell.started .calendar-cell-top > i { color: #4d6691; }
.calendar-cell.missed .calendar-cell-top > i { color: #a65747; }
.calendar-cell-top > .calendar-move-icon { color: #607455; }
.calendar-cell.selected-for-move .calendar-cell-top > .calendar-move-icon { background: var(--lime); }
.calendar-cell-top > .calendar-reschedule-icon { color: #597aaa; }

.calendar-cell > strong {
  min-width: 0;
  overflow: hidden;
  margin-top: 7px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-cell > small {
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-legend {
  margin-top: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.calendar-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 10px;
}

.calendar-legend > span > i {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  background: #d6dbd2;
}

.calendar-legend .legend-completed { background: var(--lime-deep); }
.calendar-legend .legend-started { background: #90a7ca; }
.calendar-legend .legend-missed { background: #c88678; }
.calendar-legend .legend-rest { background: #d6dbd2; }
.calendar-legend .legend-rescheduled { background: #85a6d1; }

.calendar-legend > strong {
  margin-left: auto;
  color: #54702d;
  font-size: 10px;
}

.program-page {
  width: min(1204px, calc(100% - 40px));
  margin: 0 auto;
}

.program-hero {
  min-height: 228px;
  padding: 37px 41px;
  border: 1px solid #d7ddcf;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 37px;
  background:
    radial-gradient(circle at 82% 13%, rgba(201, 243, 106, 0.31), transparent 16rem),
    linear-gradient(140deg, #edf2e7, #fbfaf5);
}

.program-hero .eyebrow { color: #618442; }

.program-hero h1 {
  max-width: 670px;
  margin: 12px 0 9px;
  font-size: clamp(39px, 5vw, 59px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.program-hero > div:first-child > p {
  max-width: 560px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.program-hero-stats {
  min-width: 215px;
  padding: 18px 19px;
  border: 1px solid rgba(24, 32, 25, 0.09);
  border-radius: 19px;
  display: grid;
  gap: 13px;
  background: rgba(255, 254, 250, 0.83);
}

.program-hero-stats > article {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.program-hero-stats > article > strong {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.program-hero-stats > article > span {
  color: var(--ink-soft);
  font-size: 10px;
}

.program-workspace {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  align-items: start;
  gap: 17px;
}

.program-rail,
.program-editor {
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.program-rail {
  position: sticky;
  top: 16px;
  padding: 20px 16px 17px;
}

.program-rail-heading,
.program-section-heading,
.program-editor-heading,
.program-day-detail-heading,
.program-exercise-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.program-rail-heading h2 {
  margin: 6px 0 0;
  font-size: 18px;
  letter-spacing: -0.04em;
}

.program-count,
.program-exercise-count {
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--sage);
  color: #52634d;
  font-size: 10px;
  font-weight: 850;
}

.program-selector-list {
  margin-top: 17px;
  display: grid;
  gap: 7px;
}

.program-selector {
  min-width: 0;
  min-height: 67px;
  padding: 9px 9px;
  border: 1px solid #e7e9e4;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 13px;
  align-items: center;
  gap: 8px;
  background: #fbfbf8;
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.program-selector:hover { border-color: #b8c6ad; background: #fff; }
.program-selector.selected { border-color: #bad681; background: #f1f7e5; }

.program-selector > span {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #e9ede6;
  font-size: 10px;
  font-weight: 850;
}

.program-selector.selected > span { background: var(--lime); }
.program-selector > div { min-width: 0; display: grid; gap: 4px; }
.program-selector > div > strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.program-selector > div > small { color: var(--ink-soft); font-size: 9px; }
.program-selector > i { color: #778172; font-size: 13px; font-style: normal; }

.program-rail-actions {
  margin-top: 15px;
  display: grid;
  gap: 7px;
}

.program-primary-action,
.program-secondary-action,
.add-program-day,
.program-add-exercise > button {
  min-height: 39px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.program-primary-action,
.program-add-exercise > button {
  background: var(--ink);
  color: #fff;
}

.program-primary-action > span,
.program-add-exercise > button > span { margin-right: 6px; color: var(--lime); font-size: 14px; }
.program-secondary-action { border-color: var(--line); background: #fff; }

.program-primary-action:disabled,
.program-secondary-action:disabled,
.add-program-day:disabled,
.program-add-exercise > button:disabled,
.program-heading-actions > button:disabled,
.program-day-actions > button:disabled,
.program-exercise-card-actions > button:disabled { opacity: 0.42; cursor: not-allowed; }

.program-rail-note {
  margin-top: 19px;
  padding-top: 17px;
  border-top: 1px solid #eceee8;
}

.program-rail-note > span { font-size: 10px; font-weight: 850; }
.program-rail-note > p { margin: 7px 0 10px; color: var(--ink-soft); font-size: 10px; line-height: 1.65; }
.program-rail-note > button {
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid #c0a292;
  background: transparent;
  color: #815647;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.program-editor { padding: 24px 25px 27px; }
.program-editor-heading { align-items: flex-start; }
.program-editor-heading h2 { margin: 6px 0 5px; font-size: 24px; letter-spacing: -0.045em; }
.program-editor-heading p { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.6; }

.program-heading-actions,
.program-day-actions,
.program-exercise-card-actions { display: flex; align-items: center; gap: 5px; }

.program-heading-actions > button,
.program-day-actions > button,
.program-exercise-card-actions > button {
  min-width: 32px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #dfe4db;
  border-radius: 9px;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.program-heading-actions > .program-delete-action,
.program-day-actions > .program-day-delete {
  border-color: #ead9d4;
  color: #9b5445;
  font-size: 9px;
}

.program-settings-grid {
  margin-top: 23px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 11px;
}

.program-field { min-width: 0; display: grid; gap: 6px; }
.program-field > span,
.program-exercise-name > span,
.program-add-exercise > label > span {
  color: #566258;
  font-size: 9px;
  font-weight: 800;
}

.program-field > input,
.program-field > select,
.program-exercise-name > input,
.program-add-exercise > label > input,
.program-progression-step > div > input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #dfe4db;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  transition: 140ms ease;
}

.program-field > input:focus,
.program-field > select:focus,
.program-exercise-name > input:focus,
.program-add-exercise > label > input:focus,
.program-progression-step > div > input:focus {
  border-color: #91ac66;
  box-shadow: 0 0 0 3px rgba(169, 217, 76, 0.15);
}

.program-day-section {
  margin-top: 29px;
  padding-top: 24px;
  border-top: 1px solid #e7e9e3;
}

.program-section-heading h3 { margin: 6px 0 0; font-size: 20px; letter-spacing: -0.045em; }
.add-program-day { border-color: #c6d4b8; background: #f1f6e9; color: #4c6536; }

.program-day-tabs {
  margin-top: 16px;
  padding-bottom: 3px;
  display: flex;
  overflow-x: auto;
  gap: 7px;
  scrollbar-width: thin;
}

.program-day-tab {
  min-width: 100px;
  min-height: 57px;
  padding: 8px 10px;
  border: 1px solid #e3e6df;
  border-radius: 11px;
  display: grid;
  align-content: center;
  gap: 3px;
  background: #fafaf7;
  text-align: left;
  cursor: pointer;
}

.program-day-tab.selected { border-color: #b8d676; background: #eff7df; }
.program-day-tab > small { color: var(--ink-soft); font-size: 8px; }
.program-day-tab > strong { max-width: 106px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.program-day-details {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e4e7e0;
  border-radius: 14px;
  background: #fbfbf8;
}

.program-day-detail-heading > div:first-child { display: grid; gap: 4px; }
.program-day-detail-heading > div:first-child > span { color: #65705f; font-size: 9px; font-weight: 800; }
.program-day-detail-heading > div:first-child > strong { font-size: 11px; }

.program-day-fields {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr);
  gap: 11px;
}

.program-day-subtitle { grid-column: 1 / -1; }

.program-exercise-section {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid #e7e9e3;
}

.program-exercise-heading { margin-bottom: 15px; }
.program-exercise-list { display: grid; gap: 10px; }

.program-exercise-card {
  padding: 13px 13px 14px;
  border: 1px solid #e3e6df;
  border-radius: 15px;
  background: #fbfbf8;
}

.program-exercise-card-header { align-items: end; gap: 8px; }

.program-exercise-number {
  width: 33px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--sage);
  color: #587045;
  font-size: 10px;
  font-weight: 850;
}

.program-exercise-name { min-width: 0; flex: 1; display: grid; gap: 6px; }
.program-exercise-card-actions > button { height: 38px; }
.program-exercise-card-actions > .remove-program-exercise { border-color: #ead8d2; color: #9f5747; font-size: 16px; }

.program-exercise-settings {
  margin-top: 13px;
  display: grid;
  grid-template-columns: 76px minmax(80px, 1fr) minmax(83px, 1fr) minmax(105px, 1fr);
  gap: 8px;
}

.program-progression-settings {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8eae5;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 108px auto;
  align-items: end;
  gap: 8px;
}

.program-progression-step.disabled { opacity: 0.5; }
.program-progression-step > div { position: relative; }
.program-progression-step > div > input { padding-right: 27px; }
.program-progression-step > div > span {
  position: absolute;
  top: 12px;
  right: 8px;
  color: var(--ink-soft);
  font-size: 9px;
}

.program-weightless-toggle {
  min-height: 38px;
  padding: 0 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.program-weightless-toggle > input { width: 14px; height: 14px; accent-color: #789a45; }
.program-weightless-toggle > span { font-size: 9px; font-weight: 750; }

.program-empty-exercises {
  min-height: 155px;
  padding: 21px;
  border: 1px dashed #cdd6c6;
  border-radius: 15px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  background: #fafbf7;
  text-align: center;
}

.program-empty-exercises > span {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--sage);
  font-size: 19px;
}
.program-empty-exercises > strong { font-size: 12px; }
.program-empty-exercises > p { margin: 0; color: var(--ink-soft); font-size: 10px; }

.program-add-exercise {
  margin-top: 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.program-add-exercise > label { min-width: 0; display: grid; gap: 6px; }
.program-add-exercise > button { min-height: 38px; padding-inline: 13px; }
.program-save-caption { margin: 13px 0 0; color: #6d776f; font-size: 9px; }

.history-page {
  width: min(1204px, calc(100% - 40px));
  margin: 0 auto;
}

.history-hero {
  min-height: 246px;
  padding: 42px;
  border: 1px solid #d7ddcf;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  background:
    radial-gradient(circle at 80% 20%, rgba(201,243,106,0.33), transparent 16rem),
    var(--sage);
  overflow: hidden;
}
.history-hero h1 {
  max-width: 650px;
  margin: 10px 0 10px;
  font-size: clamp(38px, 5.5vw, 62px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}
.history-hero > div:first-child > p {
  max-width: 570px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}
.history-record {
  min-width: 260px;
  padding: 22px 24px;
  border: 1px solid rgba(24,32,25,0.1);
  border-radius: 22px;
  background: rgba(255,255,255,0.58);
  box-shadow: 0 18px 50px rgba(24,32,25,0.08);
}
.history-record > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.history-record strong {
  display: block;
  margin-top: 6px;
  font-size: 46px;
  line-height: 1;
  letter-spacing: -0.055em;
}
.history-record strong small {
  margin-left: 6px;
  color: var(--ink-soft);
  font-size: 15px;
  letter-spacing: 0;
}
.history-record p {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.35;
}

.history-toolbar {
  margin: 18px 0;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  background: var(--card);
}
.history-toolbar label { display: grid; gap: 6px; }
.history-toolbar label > span {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.history-toolbar select {
  min-width: min(430px, 65vw);
  height: 42px;
  border: 1px solid #d9ded5;
  border-radius: 11px;
  padding: 0 38px 0 12px;
  background: #fafaf7;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  outline: none;
}
.history-toolbar select:focus {
  border-color: #88a94b;
  box-shadow: 0 0 0 3px rgba(169,217,76,0.16);
}
.history-range {
  display: flex;
  align-items: center;
  gap: 13px;
}
.history-range button {
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f7f7f2;
  cursor: pointer;
}
.history-range span {
  min-width: 90px;
  display: grid;
  text-align: center;
  font-size: 12px;
  font-weight: 850;
}
.history-range small {
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: stretch;
  gap: 16px;
}
.chart-card {
  min-height: 430px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  position: relative;
  overflow: hidden;
}
.chart-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.chart-card h2 {
  margin: 6px 0 0;
  font-size: 24px;
  letter-spacing: -0.035em;
}
.chart-unit {
  min-width: 38px;
  padding: 6px 9px;
  border-radius: 9px;
  background: var(--sage);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}
.bar-chart {
  height: 286px;
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent 70px,
    rgba(24,32,25,0.06) 70px,
    rgba(24,32,25,0.06) 71px
  );
}
.bar-column {
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: 22px 1fr 24px;
  align-items: end;
  justify-items: center;
}
.bar-value {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}
.bar-track {
  width: min(38px, 72%);
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.bar-track > span {
  width: 100%;
  border-radius: 9px 9px 3px 3px;
  background: #dfe5da;
  transition: height 250ms ease;
}
.bar-track > span.recorded {
  background: linear-gradient(180deg, var(--lime), var(--lime-deep));
  box-shadow: 0 5px 15px rgba(169,217,76,0.25);
}
.bar-column small {
  max-width: 100%;
  color: #7a847c;
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}
.chart-empty {
  position: absolute;
  inset: 96px 24px 25px;
  border: 1px dashed #cad1c6;
  border-radius: 17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,254,250,0.9);
  text-align: center;
}
.chart-empty > span {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--lime);
  font-size: 20px;
  font-weight: 900;
}
.chart-empty strong { font-size: 15px; }
.chart-empty p { margin: 6px 0 15px; color: var(--ink-soft); font-size: 11px; }
.chart-empty button {
  border: 0;
  border-radius: 10px;
  padding: 9px 13px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.history-stats {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
}
.history-stats section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--card);
}
.history-stats section:first-child { background: var(--ink); color: #fff; border-color: var(--ink); }
.history-stats strong {
  margin-top: 7px;
  font-size: 29px;
  line-height: 1;
  letter-spacing: -0.045em;
}
.history-stats p { margin: 7px 0 0; color: var(--ink-soft); font-size: 10px; }
.history-stats section:first-child p { color: #98a098; }
.history-stats .positive { color: #659729; }
.history-stats .negative { color: #b85c4a; }

.history-table-card {
  margin-top: 16px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.history-table-card > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 18px;
}
.history-table-card h2 {
  margin: 5px 0 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}
.table-caption { color: var(--ink-soft); font-size: 9px; }
.history-table-wrap { overflow-x: auto; }
.history-table-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.history-table-card th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: #899289;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}
.history-table-card td {
  padding: 12px;
  border-bottom: 1px solid #eceee9;
  color: var(--ink-soft);
}
.history-table-card tbody tr:last-child td { border-bottom: 0; }
.history-table-card td:first-child { display: grid; color: var(--ink); }
.history-table-card td:first-child small { margin-top: 2px; color: #969e97; font-size: 8px; }
.program-cell {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 8px;
  background: var(--sage);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.data-card {
  margin-top: 16px;
  padding: 25px 27px;
  border: 1px solid #d7ddcf;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: var(--sage);
}
.data-card h2 { margin: 6px 0 5px; font-size: 20px; letter-spacing: -0.03em; }
.data-card p { max-width: 610px; margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.restart-cycle-card { border-color: #c8d9aa; background: #f5f8ec; }
.restart-cycle-date {
  width: fit-content;
  margin-top: 11px;
  padding: 6px 9px;
  border: 1px solid #d5dfc5;
  border-radius: 8px;
  display: inline-block;
  color: #45632c;
  background: rgba(255, 255, 255, 0.74);
  font-size: 10px;
  font-weight: 800;
}
.restart-cycle-button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid #8bab5c;
  border-radius: 11px;
  background: var(--lime);
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}
.restart-cycle-button:hover { background: #d7fb85; transform: translateY(-1px); }
.data-message {
  display: inline-block;
  margin-top: 8px;
  color: #4e6d28;
  font-size: 10px;
  font-weight: 800;
}
.data-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.secondary-button, .danger-button {
  min-height: 38px;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.secondary-button { border: 1px solid #bfc8b9; background: #fff; }
.danger-button { border: 1px solid #dabfb8; background: transparent; color: #8b4437; }
.file-input { display: none; }

.site-footer {
  width: min(1204px, calc(100% - 40px));
  margin: 70px auto 0;
  padding: 24px 4px 36px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
}

@media (max-width: 900px) {
  .profile-story { padding-inline: 36px; }
  .profile-card { padding-inline: 38px; }
  .topbar { height: 116px; padding: 12px 20px; flex-wrap: wrap; }
  .account-area { order: 2; }
  .view-nav { width: 100%; order: 3; }
  .view-nav button { min-width: 66px; flex: 1; }
  .account-area { gap: 11px; }
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(3, 1fr); }
  .week-progress-card { min-width: 290px; }
  .history-grid { grid-template-columns: 1fr; }
  .history-stats { grid-template-columns: repeat(3, 1fr); grid-template-rows: none; }
  .data-card { align-items: flex-start; flex-direction: column; }
  .data-actions { justify-content: flex-start; }
  .cycle-strip { grid-template-columns: 1fr; }
  .cycle-intro { padding: 4px 3px 0; }
  .calendar-hero { gap: 24px; }
  .streak-card { min-width: 225px; }
  .calendar-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-hero { gap: 22px; }
  .program-hero-stats { min-width: 187px; }
  .program-workspace { grid-template-columns: 1fr; }
  .program-rail { position: static; }
  .program-selector-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-rail-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .profile-gate { padding: 18px; }
  .profile-gate-shell {
    min-height: auto;
    grid-template-columns: 1fr;
    border-radius: 25px;
  }
  .profile-story { min-height: 350px; padding: 27px 29px 32px; }
  .profile-story-copy h1 { margin: 13px 0 10px; font-size: 48px; }
  .profile-story-copy > p { font-size: 12px; line-height: 1.65; }
  .profile-feature-list { margin-top: 19px; display: flex; flex-wrap: wrap; gap: 8px 14px; }
  .profile-feature-list > span { gap: 7px; font-size: 10px; }
  .profile-feature-list i { width: 22px; height: 22px; font-size: 8px; }
  .profile-card { padding: 32px 29px 35px; }
  .profile-card h2 { font-size: 33px; }
  .profile-form { margin-top: 25px; }
  .profile-privacy-note { margin-top: 19px; }
  .topbar { height: 116px; padding: 12px 18px; flex-wrap: wrap; }
  .save-status { font-size: 0; }
  .save-status::after { content: "Tallessa"; font-size: 10px; }
  .save-status.save-error::after { content: "Virhe"; }
  .account-area { order: 2; gap: 9px; }
  .profile-switch strong { max-width: 88px; }
  .view-nav { width: 100%; order: 3; }
  .view-nav button { min-width: 66px; flex: 1; }
  .page-wrap { width: min(100% - 24px, 1204px); }
  .week-hero {
    min-height: auto;
    padding: 28px 22px;
    display: grid;
    gap: 26px;
    border-radius: 24px;
  }
  .week-progress-card { min-width: 0; width: 100%; }
  .day-switcher {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .day-switcher::-webkit-scrollbar { display: none; }
  .cycle-track {
    display: flex;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }
  .cycle-track::-webkit-scrollbar { display: none; }
  .cycle-step { min-width: 148px; }
  .day-tab { min-width: 130px; }
  .sidebar { grid-template-columns: 1fr; }
  .calendar-page { width: min(100% - 24px, 1204px); }
  .calendar-hero { min-height: auto; padding: 28px 23px; display: grid; gap: 23px; border-radius: 24px; }
  .calendar-hero h1 { font-size: 42px; }
  .streak-card { min-width: 0; width: 100%; }
  .calendar-stat-row { gap: 8px; }
  .calendar-stat-row > article { min-height: 101px; padding: 13px; border-radius: 14px; }
  .calendar-stat-row > article > span { font-size: 8px; }
  .calendar-board { padding: 17px 13px; border-radius: 18px; }
  .calendar-board-header h2 { font-size: 22px; }
  .calendar-month-nav { gap: 4px; }
  .calendar-month-nav > button { min-width: 31px; height: 33px; padding: 0 8px; }
  .calendar-schedule-toolbar { padding: 11px; align-items: stretch; flex-direction: column; gap: 10px; }
  .calendar-schedule-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .calendar-edit-button, .calendar-reset-button { min-height: 34px; padding-inline: 7px; }
  .calendar-edit-banner { padding: 10px; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; }
  .calendar-edit-banner > span { width: 29px; height: 29px; font-size: 15px; }
  .calendar-edit-banner > div > strong { font-size: 10px; }
  .calendar-edit-banner > div > small { font-size: 8px; }
  .calendar-edit-banner > button { grid-column: 2; justify-self: start; }
  .calendar-feedback { font-size: 9px; }
  .calendar-grid { gap: 4px; }
  .calendar-cell { min-height: 84px; padding: 7px 5px; border-radius: 9px; }
  .calendar-cell > strong { margin-top: 5px; font-size: 9px; }
  .calendar-cell > small { font-size: 8px; }
  .calendar-cell-top > i { width: 16px; height: 16px; font-size: 10px; }
  .calendar-legend { gap: 8px 12px; }
  .calendar-legend > strong { margin-left: 0; }
  .program-page { width: min(100% - 24px, 1204px); }
  .program-hero { min-height: auto; padding: 27px 23px; display: grid; gap: 20px; border-radius: 24px; }
  .program-hero h1 { font-size: 42px; }
  .program-hero-stats { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .program-hero-stats > article { display: grid; align-content: center; gap: 5px; }
  .program-hero-stats > article > strong { font-size: 21px; }
  .program-hero-stats > article > span { font-size: 9px; }
  .program-workspace { gap: 12px; }
  .program-rail { padding: 17px 13px 15px; border-radius: 18px; }
  .program-editor { padding: 21px 15px 22px; border-radius: 18px; }
  .program-editor-heading { flex-wrap: wrap; }
  .program-heading-actions { width: 100%; justify-content: flex-end; }
  .program-settings-grid { gap: 11px 8px; }
  .program-exercise-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-progression-settings { grid-template-columns: minmax(0, 1fr) 112px; }
  .program-weightless-toggle { grid-column: 1 / -1; min-height: 30px; padding-inline: 2px; }
  .history-page { width: min(100% - 24px, 1204px); }
  .history-hero { min-height: auto; padding: 28px 23px; display: grid; gap: 24px; border-radius: 24px; }
  .history-record { min-width: 0; width: 100%; }
  .history-toolbar { align-items: stretch; flex-direction: column; }
  .history-toolbar select { min-width: 0; width: 100%; }
  .history-range { justify-content: space-between; }
  .history-stats { grid-template-columns: 1fr; }
  .chart-card { padding: 20px 14px; }
  .bar-chart { gap: 4px; }
  .bar-column small { font-size: 7px; transform: rotate(-35deg); transform-origin: center; }
  .history-table-card { padding: 20px 14px; }
  .history-table-card > header { align-items: flex-start; flex-direction: column; }
  .data-card { padding: 22px 20px; }
  .exercise-header {
    padding: 17px 15px 13px;
    grid-template-columns: 29px minmax(0,1fr) auto;
    gap: 9px;
  }
  .sets-grid { padding: 0 14px 14px; }
  .exercise-footer { padding: 10px 15px; }
  .workout-header { padding-inline: 3px; }
}

@media (max-width: 470px) {
  .profile-gate { padding: 10px; }
  .profile-gate-shell { border-radius: 20px; }
  .profile-story { min-height: 315px; padding: 23px 23px 26px; }
  .profile-story-copy h1 { font-size: 42px; }
  .profile-feature-list > span:last-child { display: none; }
  .profile-card { padding: 28px 23px 29px; }
  .brand small { display: none; }
  .topbar { flex-wrap: wrap; height: 116px; padding-block: 12px; }
  .view-nav { width: 100%; order: 4; }
  .view-nav button { flex: 1; }
  .save-status { gap: 0; }
  .save-status::after { display: none; }
  .profile-switch strong { max-width: 96px; }
  .week-heading-row { gap: 10px; }
  .week-heading-row h1 { font-size: 36px; }
  .icon-button { width: 36px; height: 36px; }
  .week-progress-card { padding: 17px; }
  .progress-ring { width: 64px; height: 64px; flex-basis: 64px; }
  .exercise-index { display: none; }
  .exercise-header { grid-template-columns: minmax(0,1fr) auto; }
  .exercise-title h3 { font-size: 15px; }
  .sets-labels, .set-row { grid-template-columns: 39px 1fr 1fr 43px; gap: 6px; }
  .sets-grid.weightless .sets-labels,
  .sets-grid.weightless .set-row {
    grid-template-columns: 39px 1fr 43px;
  }
  .set-number { gap: 2px; }
  .remove-set-button { width: 16px; height: 16px; flex-basis: 16px; font-size: 13px; }
  .calendar-hero h1 { font-size: 35px; }
  .calendar-board { padding: 15px 9px; }
  .calendar-board-header { gap: 8px; }
  .calendar-board-header h2 { font-size: 19px; }
  .calendar-month-nav > .calendar-today-button { padding: 0 6px; font-size: 9px; }
  .calendar-schedule-toolbar { padding: 9px; }
  .calendar-schedule-toolbar > div:first-child > strong { font-size: 10px; }
  .calendar-schedule-toolbar > div:first-child > span { font-size: 8px; }
  .calendar-edit-button, .calendar-reset-button { min-height: 33px; font-size: 9px; }
  .calendar-grid { gap: 3px; }
  .calendar-cell { min-height: 75px; padding: 6px 3px; border-radius: 7px; }
  .calendar-cell-top > span { font-size: 10px; }
  .calendar-cell-top > i { width: 14px; height: 14px; border-radius: 5px; font-size: 9px; }
  .calendar-cell > strong { font-size: 8px; }
  .calendar-cell > small { font-size: 7px; }
  .calendar-weekday { font-size: 8px; }
  .program-hero { padding: 24px 18px; }
  .program-hero h1 { font-size: 36px; }
  .program-hero-stats { padding: 13px 10px; gap: 5px; }
  .program-hero-stats > article > strong { font-size: 19px; }
  .program-hero-stats > article > span { font-size: 8px; }
  .program-selector-list { grid-template-columns: 1fr; }
  .program-rail-actions { grid-template-columns: 1fr; }
  .program-settings-grid { grid-template-columns: 1fr; }
  .program-day-details { padding: 11px; }
  .program-day-detail-heading { align-items: flex-start; flex-wrap: wrap; }
  .program-day-actions { margin-left: auto; }
  .program-day-fields { grid-template-columns: 1fr; }
  .program-day-subtitle { grid-column: auto; }
  .program-exercise-card { padding: 10px; }
  .program-exercise-card-header { flex-wrap: wrap; }
  .program-exercise-card-actions { margin-left: auto; }
  .program-progression-settings { grid-template-columns: minmax(0, 1fr) 92px; gap: 6px; }
  .program-add-exercise { grid-template-columns: 1fr; }
  .program-add-exercise > button { width: 100%; }
  .site-footer { margin-top: 46px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
