.fitness-plan-overview,
.nutrition-dashboard,
.fitness-knowledge-panel {
  overflow: hidden;
  border-color: #d9def2;
  background: #fff;
}

.fitness-plan-overview > header,
.nutrition-dashboard-head,
.fitness-knowledge-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e3e7f3;
}

.fitness-plan-overview h2,
.nutrition-dashboard h2,
.fitness-knowledge-panel h2 {
  margin: 4px 0 5px;
  color: #172034;
  font-size: 22px;
  line-height: 1.25;
}

.fitness-plan-overview header p,
.nutrition-dashboard-head p,
.fitness-knowledge-panel header p {
  margin: 0;
  color: #65708a;
  line-height: 1.6;
}

.fitness-today-chip {
  min-width: 126px;
  padding: 10px 14px;
  border: 1px solid #cfd5ff;
  border-radius: 12px;
  background: #f5f6ff;
  text-align: right;
}

.fitness-today-chip span,
.nutrition-calorie-balance span {
  display: block;
  margin-bottom: 3px;
  color: #6b748b;
  font-size: 12px;
}

.fitness-today-chip strong {
  color: #4f50dc;
  font-size: 15px;
}

.fitness-profile-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fitness-profile-metrics article {
  min-width: 0;
  padding: 20px 22px;
  border-right: 1px solid #e3e7f3;
}

.fitness-profile-metrics article:last-child {
  border-right: 0;
}

.fitness-profile-metrics span,
.fitness-profile-metrics small {
  display: block;
  color: #707b93;
  font-size: 12px;
}

.fitness-profile-metrics strong {
  display: block;
  margin: 8px 0 7px;
  color: #182136;
  font-size: 18px;
  line-height: 1.35;
}

.fitness-profile-metrics small {
  line-height: 1.55;
}

.fitness-plan-overview > footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border-top: 1px solid #e3e7f3;
  color: #65708a;
  font-size: 12px;
}

.fitness-plan-overview > footer small {
  text-align: right;
}

.nutrition-dashboard-head {
  align-items: center;
}

.nutrition-calorie-balance {
  min-width: 180px;
  padding-left: 22px;
  border-left: 1px solid #dfe3f1;
  text-align: right;
}

.nutrition-calorie-balance strong {
  display: block;
  color: #4f50dc;
  font-size: 30px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.nutrition-calorie-balance strong small {
  font-size: 12px;
  font-weight: 700;
}

.nutrition-calorie-balance em {
  display: block;
  margin-top: 5px;
  color: #7b8499;
  font-size: 12px;
  font-style: normal;
}

.nutrition-quota-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #e2e6f2;
}

.nutrition-quota {
  --quota-color: #5a5ce2;
  padding: 20px 22px 18px;
  background: #fff;
}

.nutrition-quota-protein {
  --quota-color: #3149b8;
}

.nutrition-quota-fat {
  --quota-color: #8a78c7;
}

.nutrition-quota.is-over {
  --quota-color: #9b4b60;
}

.nutrition-quota header,
.nutrition-quota footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.nutrition-quota header span,
.nutrition-quota header small,
.nutrition-quota footer {
  color: #69738b;
  font-size: 12px;
}

.nutrition-quota header span,
.nutrition-quota header small {
  display: block;
}

.nutrition-quota header span {
  color: #28334b;
  font-size: 14px;
  font-weight: 700;
}

.nutrition-quota header strong {
  color: #424c63;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.nutrition-quota header strong b {
  margin-left: 3px;
  color: var(--quota-color);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.nutrition-quota-track {
  height: 7px;
  margin: 15px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f7;
}

.nutrition-quota-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--quota-color);
  transition: width 180ms ease;
}

.nutrition-log-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(118px, .72fr)) auto;
  gap: 14px;
  align-items: end;
  padding: 20px 22px;
  border-top: 1px solid #e3e7f3;
  background: #f8f9fd;
}

.nutrition-log-form > div:first-child {
  align-self: center;
}

.nutrition-log-form > div:first-child strong,
.nutrition-log-form > div:first-child span {
  display: block;
}

.nutrition-log-form > div:first-child strong {
  color: #273148;
  font-size: 14px;
}

.nutrition-log-form > div:first-child span {
  margin-top: 4px;
  color: #737d93;
  font-size: 12px;
  line-height: 1.45;
}

.nutrition-log-form label > span {
  display: block;
  margin-bottom: 7px;
  color: #566079;
  font-size: 12px;
  font-weight: 700;
}

.nutrition-log-form label > div {
  position: relative;
}

.nutrition-log-form input {
  width: 100%;
  height: 42px;
  padding-right: 30px;
  border-color: #ced5e8;
  background: #fff;
  font-variant-numeric: tabular-nums;
}

.nutrition-log-form label em {
  position: absolute;
  top: 50%;
  right: 11px;
  color: #818ba1;
  font-size: 12px;
  font-style: normal;
  transform: translateY(-50%);
  pointer-events: none;
}

.nutrition-log-form button {
  min-height: 42px;
  white-space: nowrap;
}

.nutrition-log-history {
  border-top: 1px solid #e3e7f3;
}

.nutrition-log-history summary {
  display: flex;
  justify-content: space-between;
  padding: 14px 22px;
  color: #4e5870;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.nutrition-log-history summary span {
  color: #7c859a;
  font-weight: 500;
}

.nutrition-log-history > div {
  padding: 0 22px 14px;
}

.nutrition-log-history article {
  display: grid;
  grid-template-columns: 110px repeat(3, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid #edf0f6;
  color: #68728a;
  font-size: 12px;
}

.nutrition-log-history time {
  color: #35405a;
  font-weight: 700;
}

.nutrition-adjustment-note {
  display: flex;
  gap: 14px;
  padding: 13px 22px;
  border-top: 1px solid #e3e7f3;
  color: #69738b;
  font-size: 12px;
  line-height: 1.55;
}

.nutrition-adjustment-note strong {
  flex: none;
  color: #4f50dc;
}

.fitness-knowledge-panel > header > span {
  flex: none;
  padding: 5px 10px;
  border: 1px solid #d8dded;
  border-radius: 999px;
  color: #646f87;
  font-size: 12px;
}

.fitness-knowledge-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 20px 22px;
}

.fitness-knowledge-list article {
  padding: 16px;
  border: 1px solid #dfe3f0;
  border-radius: 12px;
  background: #fbfcff;
}

.fitness-knowledge-list article span {
  color: #5658dc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
}

.fitness-knowledge-list article strong,
.fitness-knowledge-list article p {
  display: block;
}

.fitness-knowledge-list article strong {
  margin: 8px 0 6px;
  color: #202a40;
}

.fitness-knowledge-list article p {
  margin: 0;
  color: #69738a;
  font-size: 13px;
  line-height: 1.6;
}

.fitness-knowledge-empty {
  display: grid;
  place-items: center;
  min-height: 142px;
  padding: 24px;
  text-align: center;
}

.fitness-knowledge-empty strong,
.fitness-knowledge-empty span {
  display: block;
}

.fitness-knowledge-empty strong {
  color: #34405a;
}

.fitness-knowledge-empty span {
  max-width: 520px;
  margin-top: 7px;
  color: #7b8498;
  font-size: 13px;
  line-height: 1.6;
}

.nutrition-log-form input:focus-visible,
.nutrition-log-form button:focus-visible,
.nutrition-log-history summary:focus-visible {
  outline: 3px solid rgba(91, 92, 226, .24);
  outline-offset: 2px;
}

@media (max-width: 1040px) {
  .fitness-profile-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fitness-profile-metrics article:nth-child(2) {
    border-right: 0;
  }

  .fitness-profile-metrics article:nth-child(-n + 2) {
    border-bottom: 1px solid #e3e7f3;
  }

  .nutrition-log-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  }

  .nutrition-log-form > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .fitness-plan-overview > header,
  .nutrition-dashboard-head,
  .fitness-knowledge-panel > header {
    gap: 12px;
    padding: 18px 16px 15px;
  }

  .fitness-plan-overview h2,
  .nutrition-dashboard h2,
  .fitness-knowledge-panel h2 {
    font-size: 19px;
  }

  .fitness-today-chip {
    min-width: 104px;
    padding: 8px 10px;
  }

  .fitness-profile-metrics {
    grid-template-columns: 1fr;
  }

  .fitness-profile-metrics article,
  .fitness-profile-metrics article:nth-child(2) {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 2px 12px;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid #e3e7f3;
  }

  .fitness-profile-metrics article:last-child {
    border-bottom: 0;
  }

  .fitness-profile-metrics strong {
    margin: 0;
    font-size: 15px;
  }

  .fitness-profile-metrics small {
    grid-column: 2;
  }

  .fitness-plan-overview > footer {
    display: block;
    padding: 11px 16px;
  }

  .fitness-plan-overview > footer small {
    display: block;
    margin-top: 5px;
    text-align: left;
  }

  .nutrition-dashboard-head {
    align-items: flex-start;
  }

  .nutrition-calorie-balance {
    min-width: 108px;
    padding-left: 12px;
  }

  .nutrition-calorie-balance strong {
    font-size: 24px;
  }

  .nutrition-quota-grid {
    grid-template-columns: 1fr;
  }

  .nutrition-quota {
    padding: 15px 16px;
  }

  .nutrition-quota-track {
    margin: 11px 0 7px;
  }

  .nutrition-log-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 16px;
  }

  .nutrition-log-form button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .nutrition-log-history summary,
  .nutrition-log-history > div,
  .nutrition-adjustment-note {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nutrition-log-history article {
    grid-template-columns: 1fr 1fr;
    gap: 5px 12px;
  }

  .nutrition-log-history time {
    grid-column: 1 / -1;
  }

  .nutrition-adjustment-note {
    display: block;
  }

  .nutrition-adjustment-note strong {
    display: block;
    margin-bottom: 3px;
  }

  .fitness-knowledge-list {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

@media (max-width: 420px) {
  .fitness-plan-overview > header,
  .nutrition-dashboard-head {
    display: block;
  }

  .fitness-today-chip,
  .nutrition-calorie-balance {
    width: 100%;
    margin-top: 12px;
    border-left: 0;
    text-align: left;
  }

  .nutrition-calorie-balance {
    padding: 10px 0 0;
    border-top: 1px solid #e3e7f3;
  }

  .nutrition-log-form {
    grid-template-columns: 1fr;
  }

  .nutrition-log-form > div:first-child,
  .nutrition-log-form button {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nutrition-quota-track i {
    transition: none;
  }
}
