/* Forma — Today, Program, Progress, Settings. */

/* ---------- shared header ---------- */

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}

.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 680;
  font-size: 21px;
  letter-spacing: 0.01em;
  color: var(--rose-deep);
}

/* ---------- today ---------- */

.today-hero {
  margin-top: 8px;
}

.today-hero .display {
  font-size: clamp(34px, 9vw, 44px);
  margin-top: 6px;
  max-width: 14ch;
}

.today-hero .display em {
  font-style: italic;
  color: var(--rose-deep);
}

.week-band {
  margin-top: 22px;
}

.week-band-track {
  display: flex;
  gap: 6px;
}

.week-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.week-day .bar {
  height: 16px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 2px rgba(80, 55, 58, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.week-day.done .bar {
  background: var(--rose);
  border-color: var(--rose);
}

.week-day.done .bar svg {
  width: 10px;
  height: 10px;
  stroke: #fff;
}

.week-day.today .bar {
  border: 1.5px solid var(--rose);
  background: var(--rose-faint);
}

.week-day.done.today .bar {
  background: var(--rose);
}

.week-day.weekend .bar {
  background: transparent;
  border-style: dashed;
}

.week-day.weekend.today .bar {
  border: 1.5px dashed var(--moss);
  background: var(--moss-tint);
}

.week-day.weekend.today .lbl {
  color: var(--moss);
}

.week-day .lbl {
  text-align: center;
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

.week-day.today .lbl {
  color: var(--rose-deep);
}

.week-caption {
  display: flex;
  gap: 18px;
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.week-caption b {
  color: var(--ink);
  font-weight: 650;
}

.start-card {
  margin-top: 26px;
  padding: 22px 20px 20px;
}

.start-card .focus-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.start-card h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 640;
  line-height: 1.15;
}

.start-card .meta {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

.day-chip {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(240, 222, 221, 0.85), rgba(240, 222, 221, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: var(--rose-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.day-chip .n {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 680;
}

.day-chip .t {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-top: 3px;
}

.day-chip.moss {
  background: var(--moss-tint);
  color: var(--moss);
}

.recovery-card {
  margin-top: 26px;
  padding: 24px 22px;
  background: linear-gradient(160deg, rgba(230, 234, 220, 0.7), rgba(255, 255, 255, 0.4) 70%);
}

.recovery-card h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 640;
  margin-bottom: 8px;
}

.recovery-card p {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 34ch;
}

.recovery-card .btn {
  margin-top: 18px;
}

/* body snapshot on Today */

.body-rows {
  padding: 6px 20px;
}

.body-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.body-row .k {
  flex: none;
}

.body-row .v {
  min-width: 0;
  overflow-wrap: anywhere;
  margin-left: auto;
}

.body-row:last-child {
  border-bottom: none;
}

.body-row .k {
  font-size: 14px;
  color: var(--ink-soft);
}

.body-row .v {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 640;
  text-align: right;
}

.body-row .v .small {
  font-family: var(--font-body);
  color: var(--ink-faint);
  font-weight: 500;
}

/* ---------- program ---------- */

.day-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  text-align: left;
  width: 100%;
  color: var(--ink);
}

.day-card .day-chip {
  width: 50px;
  height: 50px;
}

.day-card .info {
  flex: 1;
  min-width: 0;
}

.day-card h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 640;
  line-height: 1.2;
}

.day-card .meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 3px;
}

.day-card .today-tag {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose-deep);
  background: var(--rose-faint);
  border-radius: 99px;
  padding: 5px 10px;
}

.day-card .chev {
  flex: none;
  color: var(--ink-faint);
}

/* day detail */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  font-weight: 650;
  font-size: 15px;
  color: var(--rose-deep);
}

.day-detail-head {
  margin: 4px 0 22px;
}

.day-detail-head .display {
  font-size: clamp(28px, 7.5vw, 36px);
  margin-top: 6px;
  max-width: 16ch;
}

.day-detail-head .meta {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 14.5px;
}

.exercise-list {
  display: flex;
  flex-direction: column;
}

.exercise-row {
  display: flex;
  gap: 14px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}

.exercise-row:last-child {
  border-bottom: none;
}

.exercise-row .ord {
  flex: none;
  width: 20px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.exercise-row .name {
  flex: 1;
  font-weight: 600;
  font-size: 15.5px;
}

.exercise-row .name .sub {
  display: block;
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.exercise-row .rx {
  flex: none;
  text-align: right;
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 17px;
  white-space: nowrap;
}

.exercise-row .rx .small {
  display: block;
  font-family: var(--font-body);
  color: var(--ink-faint);
}

.exercise-row.walk .name {
  color: var(--moss);
}

.sticky-cta {
  position: sticky;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px);
  margin-top: 24px;
  z-index: 10;
}

/* ---------- progress ---------- */

.stat-line {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.stat-line .lbl {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 18ch;
}

.stat-line .num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.stat-line .num .unit {
  font-size: 17px;
  color: var(--ink-soft);
}

.measure-form {
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.measure-form .field.wide {
  grid-column: 1 / -1;
}

.measure-form .form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
}

.measure-form .form-actions .btn {
  flex: 1;
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entry-card {
  padding: 14px 16px;
}

.entry-card .entry-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.entry-card .date {
  font-weight: 650;
  font-size: 14.5px;
}

.entry-card .entry-actions {
  display: flex;
  gap: 4px;
}

.entry-card .entry-actions button {
  min-width: var(--tap);
  min-height: var(--tap);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 650;
  color: var(--rose-deep);
}

.entry-card .entry-actions .del {
  color: var(--danger);
}

.entry-card .vals {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.entry-card .vals b {
  color: var(--ink);
  font-weight: 650;
}

.chart-card {
  padding: 16px 16px 10px;
}

.chart-card h3 {
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.chart-card .legend {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}

.legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 4px 0 10px;
}

.legend .dot.rose {
  background: var(--rose);
}

.legend .dot.ink {
  background: var(--ink-faint);
}

.chart-empty {
  padding: 26px 10px 30px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13.5px;
}

.charts-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 860px) {
  .charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- settings ---------- */

.settings-group {
  padding: 4px 18px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
  min-height: 60px;
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-row .lbl {
  flex: 1;
}

.setting-row .lbl b {
  display: block;
  font-weight: 600;
  font-size: 15px;
}

.setting-row .lbl span {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
  max-width: 30ch;
}

.setting-row .input.narrow {
  width: 96px;
  text-align: right;
}

.setting-row .seg-control {
  width: 190px;
}

.settings-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
}
