:root {
  color-scheme: dark;
  --bg: #08090b;
  --surface: #121417;
  --field: #0c0e10;
  --line: #292c31;
  --muted: #a5aab4;
  --text: #f1f2f4;
  --red: #c8102e;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 17px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.4;
  transition:
    background 0.15s,
    border-color 0.15s;
  color: var(--text);
  text-decoration: none;
  background: #22252a;
}
button:hover:not(:disabled),
.button:hover {
  background: #31353c;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.primary {
  background: var(--red);
  color: #fff;
}
button.primary:hover:not(:disabled) {
  background: #a90d26;
}
.secondary {
  background: #25282e;
  border-color: #3b3f47;
}
.ghost {
  background: transparent;
  border-color: var(--line);
}
.danger {
  background: #2b1419;
  color: #ffb4c0;
  border-color: #71303b;
}
a {
  color: var(--text);
  text-underline-offset: 4px;
}
a:hover {
  color: #fff;
}
a:not(.button) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #f2f3f5;
  outline-offset: 3px;
}
input,
select,
textarea {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  background: var(--field);
  border: 1px solid #41454e;
  border-radius: 10px;
  color: var(--text);
  padding: 11px 12px;
}
input::placeholder,
textarea::placeholder {
  color: #8e949f;
}
input[type="checkbox"] {
  appearance: auto;
  accent-color: var(--red);
  min-height: 20px;
  width: 20px;
  flex: 0 0 20px;
  margin: 0;
}
label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #c8cbd2;
  min-width: 0;
}
label.check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 13px;
  line-height: 1.6;
  padding: 4px 0;
}
.check span span {
  display: block;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
h2 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -1.5px;
}
h3 {
  font-size: 18px;
  letter-spacing: -0.4px;
  font-weight: 650;
}
h4 {
  font-size: 12px;
  font-weight: 700;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: #b7bcc6;
  margin-bottom: 7px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-top: 13px;
}
.small {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.small a {
  min-height: 44px;
}
.shell {
  width: min(1216px, 100%);
  padding: 30px 38px 24px;
  margin: auto;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 50px;
  margin-bottom: 28px;
}
.logo {
  width: 45px;
  height: 45px;
  border-radius: 10px;
}
.topbar .eyebrow {
  margin-bottom: 2px;
}
.topbar #logoutBtn {
  margin-left: auto;
}
.skip {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 10;
  background: var(--text);
  color: var(--bg);
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
nav {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
  position: relative;
  margin-bottom: 34px;
}
.nav-button {
  min-width: 102px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  position: relative;
}
.nav-button.active {
  background: #22252a;
  color: #fff;
}
.nav-button.active:after {
  content: "";
  position: absolute;
  width: 22px;
  height: 2px;
  background: var(--red);
  bottom: -14px;
  left: calc(50% - 11px);
}
.page-heading {
  margin: 0 0 30px;
}
.page-heading .muted {
  max-width: 690px;
}
.page-heading .eyebrow {
  margin-bottom: 12px;
}
.card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 22px;
  min-width: 0;
}
.grid {
  display: grid;
  gap: 22px;
}
.two {
  grid-template-columns: 1fr 1fr;
}
.today-grid {
  grid-template-columns: 1.65fr 1fr;
}
.nutrition-grid {
  grid-template-columns: 1fr 1.18fr;
}
.coach-grid {
  grid-template-columns: 0.85fr 1.35fr;
}
.grid > .card {
  margin-bottom: 0;
}
.grid + * {
  margin-top: 22px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.section-head h2 {
  font-size: 24px;
  letter-spacing: -0.6px;
}
.section-head > div {
  min-width: 0;
}
.section-head button {
  flex-shrink: 0;
}
.subhead {
  margin-top: 24px;
}
.stack {
  display: grid;
  gap: 17px;
  margin-top: 18px;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.page-actions {
  margin-bottom: 13px;
}
.template-list {
  margin-top: 22px;
}
.list {
  display: grid;
  gap: 12px;
}
.stack + .list {
  margin-top: 24px;
}
.item {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.item:last-child {
  border-bottom: 0;
}
.item .section-head {
  margin-bottom: 0;
}
.item > .muted {
  margin-bottom: 18px;
}
.item strong {
  font-size: 14px;
}
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: 6px 10px;
  background: #25282e;
  border-radius: 6px;
  color: #cbd0d9;
  white-space: nowrap;
}
.empty {
  padding: 29px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.empty-mark {
  display: block;
  color: #626975;
  font-size: 28px;
  margin-bottom: 5px;
}
.workout {
  display: grid;
  justify-content: stretch;
  text-align: left;
  background: #191c20;
  border: 1px solid #33373e;
  width: 100%;
  gap: 9px;
  padding: 18px;
  border-left: 3px solid var(--red);
  border-radius: 9px;
}
.workout strong {
  font-size: 16px;
  font-weight: 650;
}
.workout .small {
  font-weight: 400;
}
.list + .ghost {
  margin-top: 18px;
}
.daily-aside {
  padding-top: 30px;
}
.daily-aside button {
  margin-top: 23px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 26px 0;
}
.connection {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
}
.connection h3 {
  font-size: 16px;
}
.connection .small {
  max-width: 750px;
  margin-top: 10px;
}
.connection .pill {
  flex-shrink: 0;
}
.footnote {
  margin-top: 22px;
}
.login-card {
  max-width: 470px;
  margin: 80px auto 100px;
}
.login-card h2 {
  font-size: 52px;
  margin-top: 15px;
}
.login-card .stack {
  margin-top: 32px;
}
.login-card .primary {
  margin-top: 2px;
}
footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 16px;
  font-size: 11px;
  color: #939aa5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 18px;
}
footer span {
  margin-left: auto;
}
footer a {
  color: #b5bac4;
}
#notice:not(:empty) {
  margin: 0 0 20px;
  border: 1px solid #3e424b;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
}
#notice.error {
  border-color: #853647;
}
.error {
  color: #ffbac7;
  font-size: 13px;
  line-height: 1.6;
}
.error:empty {
  display: none;
}
.success,
.done {
  color: #b4d9bd;
}
.consent {
  border-left: 3px solid #686f7a;
  padding: 19px 23px;
}
.consent .small {
  margin-top: 8px;
  max-width: 920px;
}
.consent .stack {
  gap: 8px;
}
.consent h3 {
  font-size: 15px;
}
.narrow {
  max-width: 700px;
}
details {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 5px;
}
details > summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 0;
  font-size: 13px;
  font-weight: 650;
  color: #d0d4dc;
  line-height: 1.6;
}
details[open] > summary {
  margin-bottom: 8px;
}
details .actions {
  margin-top: 16px;
}
.card > details:first-child {
  margin: 0;
  border: 0;
  padding: 0;
}
.card details .card {
  margin-top: 18px;
}
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid #494e58;
  border-radius: 14px;
  padding: 25px;
  width: min(660px, calc(100% - 28px));
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
}
dialog .section-head {
  align-items: flex-start;
}
dialog .section-head button {
  margin-top: -6px;
}
.prose {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.8;
  margin: 20px 0;
  overflow-wrap: anywhere;
}
.secret {
  display: block;
  margin: 22px 0;
  padding: 18px;
  background: var(--field);
  border: 1px solid var(--line);
  font-family: monospace;
  font-size: 16px;
  word-break: break-all;
  user-select: all;
}
.library-list {
  margin: 16px 0;
  max-height: 460px;
  overflow: auto;
}
.library-row,
.picker-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.library-row > div {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.library-row strong {
  font-size: 14px;
}
.picker-row > .check {
  flex: 1;
}
.picker-row > label:last-child {
  width: 115px;
  flex-shrink: 0;
}
.picker-list {
  max-height: 45vh;
  overflow: auto;
}
.nutrients {
  margin: 14px 0;
}
.nutrients > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.nutrients dt {
  color: var(--muted);
}
.nutrients dd {
  margin: 0;
}
.nutrient-input {
  border-bottom: 1px solid var(--line);
  padding-bottom: 7px;
}
.nutrient-input .check {
  font-size: 11px;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: 20px 0;
  margin-bottom: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats > div {
  display: grid;
  gap: 6px;
}
.stats strong {
  font-size: 30px;
  letter-spacing: -1px;
}
.calendar-toolbar {
  display: flex;
  align-items: end;
  gap: 20px;
  justify-content: space-between;
}
.calendar-toolbar > label {
  max-width: 190px;
}
.week-title {
  margin: 27px 0 20px;
  font-size: 17px;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.day {
  background: #101215;
  border: 1px solid #2b2e34;
  border-radius: 8px;
  min-height: 225px;
  padding: 10px;
  min-width: 0;
}
.day.is-today {
  border-color: #85404c;
}
.day h4 {
  min-height: 45px;
  line-height: 1.6;
  color: #c0c6d1;
}
.day h4 span {
  display: block;
  font-size: 10px;
  color: #f0b9c2;
}
.day .workout {
  padding: 11px 8px;
  border-left-width: 2px;
  gap: 9px;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.day .workout strong {
  font-size: 12px;
}
.day .workout .small {
  font-size: 10px;
}
.rest {
  font-size: 11px;
  color: #7b838f;
  margin-top: 15px;
}
.session-row {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.session-row strong {
  display: block;
  margin: 5px 0;
  font-size: 14px;
}
.session-row .actions {
  flex-shrink: 0;
}
.exercise {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0 0 18px;
  padding: 18px;
  display: grid;
  gap: 14px;
  min-width: 0;
}
.exercise legend {
  font-size: 12px;
  color: var(--muted);
  padding: 0 8px;
}
.sticky-actions {
  position: static;
  background: var(--surface);
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.client-row {
  width: 100%;
  display: flex;
  justify-content: start;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  padding: 14px 10px;
  margin-bottom: 8px;
  gap: 13px;
}
.client-row.selected {
  background: #22252a;
  border-color: #454950;
}
.client-row > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.client-row strong,
.client-row .small {
  display: block;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #363a43;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.client-row .small {
  font-weight: 400;
  font-size: 11px;
}
.account-create {
  margin-top: 25px;
}
.compact-workouts {
  max-height: 460px;
  overflow: auto;
}
.compact-workouts .workout {
  padding: 14px;
}
.compact-workouts .workout strong {
  font-size: 14px;
}
[hidden] {
  display: none !important;
}
main:focus {
  outline: none;
}
@media (min-width: 1400px) {
  .shell {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (max-width: 1000px) {
  .calendar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .day {
    min-height: 160px;
  }
  .coach-grid {
    grid-template-columns: 1fr 1.25fr;
  }
}
@media (max-width: 700px) {
  .shell {
    padding: 22px 20px;
  }
  .topbar {
    margin-bottom: 22px;
    gap: 10px;
  }
  .logo {
    width: 40px;
    height: 40px;
  }
  h1 {
    font-size: 17px;
  }
  .topbar .eyebrow {
    font-size: 9px;
  }
  nav {
    gap: 2px;
    margin-bottom: 28px;
    justify-content: space-between;
  }
  .nav-button {
    min-width: 0;
    padding: 10px 8px;
    flex: 1;
    font-size: 11px;
  }
  .page-heading {
    margin-bottom: 24px;
  }
  h2 {
    font-size: 34px;
  }
  .page-heading .muted {
    font-size: 13px;
  }
  .card {
    padding: 20px;
    margin-bottom: 18px;
  }
  .grid {
    gap: 18px;
  }
  .grid.two,
  .today-grid,
  .nutrition-grid,
  .coach-grid {
    grid-template-columns: 1fr;
  }
  .section-head {
    gap: 12px;
  }
  h3 {
    font-size: 16px;
  }
  .connection {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .connection .pill {
    align-self: flex-start;
  }
  .daily-aside {
    padding: 24px 20px;
  }
  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }
  .calendar-toolbar .actions {
    justify-content: space-between;
    gap: 5px;
  }
  .calendar-toolbar button {
    padding: 10px 12px;
    font-size: 12px;
  }
  .calendar-toolbar > label {
    max-width: none;
  }
  .calendar {
    grid-template-columns: 1fr;
  }
  .day {
    min-height: 85px;
    padding: 15px;
  }
  .day h4 {
    min-height: 28px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
  }
  .day .workout {
    padding: 14px;
  }
  .day .workout strong {
    font-size: 15px;
  }
  .day .workout .small {
    font-size: 12px;
  }
  .rest {
    margin-top: 0;
  }
  .session-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .session-row .actions {
    width: 100%;
  }
  .session-row .actions button {
    flex: 1;
  }
  .login-card {
    margin: 55px auto 65px;
  }
  .login-card h2 {
    font-size: 46px;
  }
  .row {
    gap: 12px;
  }
  .consent {
    padding: 18px;
  }
  .consent .actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .consent .small a {
    display: inline-flex;
  }
  .stats {
    gap: 10px;
  }
  footer {
    margin-top: 30px;
    line-height: 1.8;
  }
  footer span {
    margin-left: 0;
    flex-basis: 100%;
  }
  dialog {
    padding: 21px;
    max-height: 92dvh;
  }
  dialog .section-head h2 {
    font-size: 21px;
  }
  dialog .two {
    grid-template-columns: 1fr 1fr;
  }
  .picker-row {
    gap: 8px;
  }
  .picker-row > label:last-child {
    width: 100px;
  }
  .picker-row .check {
    font-size: 12px;
  }
}
@media (max-width: 360px) {
  .shell {
    padding: 18px 14px;
  }
  .topbar #logoutBtn {
    padding: 10px;
    font-size: 11px;
  }
  .nav-button {
    padding: 10px 5px;
    font-size: 10px;
  }
  .card {
    padding: 17px;
  }
  button {
    padding: 11px 13px;
  }
  .section-head {
    flex-wrap: wrap;
  }
  .row {
    grid-template-columns: 1fr;
  }
  dialog .two {
    grid-template-columns: 1fr;
  }
  .calendar-toolbar button {
    padding: 10px;
    font-size: 11px;
  }
  .login-card h2 {
    font-size: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
