@font-face {
  font-family: Comfortaa;
  src: url("/comfortaa.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}
* {
  box-sizing: border-box;
}
:root {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: #111827;
  background: #f7f9f8;
  font-size: 16px;
  --teal: #004e3d;
  --emerald: #1f8a70;
  --mist: #e5e7eb;
}
body {
  margin: 0;
}
header {
  height: 86px;
  padding: 18px max(24px, calc((100vw - 1100px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--mist);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: Comfortaa, Arial, sans-serif;
  color: var(--teal);
  font-size: 28px;
  text-decoration: none;
  letter-spacing: -1px;
}
.brand span {
  display: block;
  font: 10px Arial;
  letter-spacing: 3px;
  margin-top: 5px;
}
h1,
h2,
h3 {
  color: var(--teal);
  font-family: Comfortaa, "Arial Rounded MT Bold", Arial, sans-serif;
  line-height: 1.35;
}
h1 {
  font-size: 30px;
  margin: 10px 0 16px;
}
h2 {
  font-size: 21px;
  margin: 0 0 16px;
}
h3 {
  font-size: 17px;
  margin: 0 0 12px;
}
p {
  line-height: 1.6;
}
main {
  max-width: 1100px;
  margin: 32px auto;
  min-height: 65vh;
  padding: 0 24px;
}
button,
.button {
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: var(--teal);
  color: white;
  padding: 12px 18px;
  cursor: pointer;
  font: 600 14px Arial;
  min-height: 44px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
button:hover {
  background: #13614f;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.secondary {
  background: white;
  color: var(--teal);
  border-color: #b9cec6;
}
.secondary:hover {
  background: #eef5f1;
}
.danger {
  background: white;
  color: #a42d2d;
  border-color: #dfbcbc;
}
.danger:hover {
  background: #fff3f3;
}
.quiet {
  border: 0;
  background: transparent;
  color: var(--teal);
  padding: 8px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: bold;
  color: #52675f;
}
.muted,
small {
  color: #5b6863;
  line-height: 1.5;
}
small {
  font-size: 13px;
}
.card {
  background: white;
  border: 1px solid var(--mist);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}
.hero {
  border-left: 4px solid var(--emerald);
  padding: 28px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.stat {
  background: #fff;
  border: 1px solid var(--mist);
  padding: 20px;
  border-radius: 12px;
}
.stat strong {
  display: block;
  font-size: 29px;
  color: var(--teal);
  margin-bottom: 8px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 16px;
}
form label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
}
input,
select,
textarea {
  font: 16px Arial;
  color: #111827;
  width: 100%;
  border: 1px solid #b7c4be;
  border-radius: 7px;
  padding: 11px;
  background: white;
  min-height: 44px;
  margin-top: 6px;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
input[type="checkbox"] {
  width: 24px;
  min-height: 24px;
  accent-color: var(--emerald);
}
:focus-visible {
  outline: 3px solid #1f8a70;
  outline-offset: 3px;
}
.auth {
  max-width: 460px;
  margin: 50px auto;
}
.auth h1 {
  font-size: 28px;
}
nav {
  display: flex;
  gap: 5px;
  max-width: 1052px;
  margin: 0 auto;
  padding: 10px;
  background: white;
  border: 1px solid var(--mist);
  border-radius: 12px;
  position: sticky;
  bottom: 18px;
  z-index: 2;
}
nav button {
  flex: 1;
  background: transparent;
  color: #52675f;
  border: 0;
}
nav button[aria-current="page"] {
  background: #eaf4ef;
  color: var(--teal);
}
footer {
  text-align: center;
  padding: 24px 16px 36px;
  color: #627069;
  font-size: 13px;
}
#notice:empty,
#connection:empty {
  display: none;
}
#notice,
#connection {
  padding: 12px 24px;
  text-align: center;
  background: #fff2d6;
  color: #684800;
}
#notice[data-kind="success"] {
  background: #eaf4ef;
  color: var(--teal);
}
.fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.exercise-editor {
  padding: 16px;
  background: #f7f9f8;
  border: 1px solid var(--mist);
  border-radius: 10px;
  margin: 16px 0;
}
.exercise-editor .fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.day {
  border-top: 1px solid var(--mist);
  padding-top: 20px;
  margin-top: 24px;
}
.set {
  display: grid;
  grid-template-columns: 40px repeat(3, minmax(0, 1fr)) 105px;
  gap: 12px;
  align-items: end;
  padding: 14px 0;
  border-bottom: 1px solid var(--mist);
}
.set.done {
  background: #f1f8f4;
}
.set .index {
  align-self: center;
  color: #627069;
}
.set label {
  font-size: 12px;
  color: #52675f;
}
.set input {
  margin: 4px 0 0;
}
.set button {
  margin-bottom: 0;
}
.workout-title {
  position: sticky;
  top: 0;
  background: #f7f9f8;
  padding: 12px 0;
  z-index: 1;
}
.pill {
  font-size: 12px;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 20px;
  background: #eaf4ef;
  color: var(--teal);
}
.list-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--mist);
}
.list-item:last-child {
  border-bottom: 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--mist);
}
.table-wrap {
  overflow-x: auto;
}
details {
  border-bottom: 1px solid var(--mist);
  padding: 18px 0;
}
summary {
  cursor: pointer;
  color: var(--teal);
  font-weight: bold;
  min-height: 30px;
}
.empty {
  padding: 28px 0;
  color: #627069;
}
.full {
  width: 100%;
}
.timer {
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: bold;
  color: var(--teal);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
#account {
  font-size: 13px;
  color: #52675f;
}
a {
  color: var(--teal);
}
.history-set {
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--mist);
}
@media (max-width: 700px) {
  header {
    height: 72px;
    padding: 12px 18px;
  }
  .brand {
    font-size: 24px;
  }
  #account {
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  main {
    margin: 22px auto;
    padding: 0 16px;
  }
  h1 {
    font-size: 25px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .card {
    padding: 20px;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 14px 10px;
  }
  .stat strong {
    font-size: 24px;
  }
  .stat small {
    font-size: 11px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .exercise-editor .fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .set {
    grid-template-columns: 22px repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .set button {
    grid-column: 2/5;
  }
  .auth {
    margin: 24px auto;
  }
  nav {
    bottom: 0;
    border-radius: 0;
    border-right: 0;
    border-left: 0;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    width: 100%;
  }
  nav button {
    padding: 12px 5px;
    font-size: 12px;
  }
  footer {
    padding-bottom: 24px;
  }
  .hero {
    padding: 20px;
  }
  .workout-title h1 {
    font-size: 21px;
  }
  .row > button {
    flex-grow: 1;
  }
}
/* Keep all five destinations reachable on narrow phones. */
nav button {
  min-width: 0;
}
.card,
label,
.exercise-editor {
  min-width: 0;
}
@media (max-width: 700px) {
  body {
    padding-bottom: 80px;
  }
  nav {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 10;
  }
}
@media (max-width: 360px) {
  nav {
    gap: 0;
  }
  nav button {
    font-size: 11px;
    padding-left: 2px;
    padding-right: 2px;
  }
}
