.calories-page {
  background: #fff;
}

.calories-page .directory-container {
  width: min(100% - 64px, 1376px);
}

.calories-page main {
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 128, 38, .08), transparent 260px),
    radial-gradient(circle at 88% 18%, rgba(16, 189, 114, .08), transparent 280px),
    linear-gradient(180deg, #fff 0%, #fbfdff 42%, #fff 100%);
}

.calories-hero {
  padding: 22px 0 24px;
  border-bottom: 1px solid #dfe7f1;
}

.calories-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #49617f;
  font-size: 13px;
  font-weight: 650;
}

.calories-breadcrumb a:first-child {
  color: #005dbb;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.calories-breadcrumb svg {
  width: 13px;
  height: 13px;
}

.calories-title-row {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-top: 20px;
}

.calories-mark {
  position: relative;
  width: 150px;
  height: 150px;
  flex: 0 0 150px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 63% 30%, #ff7d22 0 23px, transparent 24px),
    radial-gradient(circle at 32% 53%, #6cc565 0 32px, transparent 33px),
    linear-gradient(145deg, #d8f6e9 0%, #9bd7c9 100%);
  box-shadow: 0 18px 38px rgba(9, 151, 115, .18);
}

.calories-mark::before,
.calories-mark::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.calories-mark::before {
  left: 28px;
  right: 22px;
  top: 50px;
  height: 55px;
  border: 6px solid rgba(255, 255, 255, .94);
  transform: rotate(-8deg);
}

.calories-mark::after {
  right: 33px;
  bottom: 32px;
  width: 36px;
  height: 36px;
  background: #12bd72;
  box-shadow: inset 0 -7px 0 rgba(0, 0, 0, .1);
}

.calories-mark .plate {
  position: absolute;
  left: 39px;
  top: 58px;
  width: 58px;
  height: 40px;
  border: 5px solid #fff;
  border-radius: 50%;
  z-index: 1;
  transform: rotate(-8deg);
}

.calories-mark .apple-shape,
.calories-mark .flame-shape {
  position: absolute;
  z-index: 2;
  background: #fff;
}

.calories-mark .apple-shape {
  left: 44px;
  top: 45px;
  width: 40px;
  height: 36px;
  border-radius: 48% 48% 55% 55%;
  background: #7ed05f;
  box-shadow: inset -7px -5px 0 rgba(0, 0, 0, .08);
}

.calories-mark .flame-shape {
  right: 44px;
  top: 23px;
  width: 28px;
  height: 46px;
  border-radius: 22px 22px 22px 5px;
  background: #ff7d22;
  transform: rotate(30deg);
}

.calories-title-row h1 {
  margin: 0;
  color: #061738;
  font-size: clamp(38px, 4vw, 50px);
  line-height: 1.05;
  letter-spacing: 0;
}

.calories-title-row p {
  max-width: 560px;
  margin: 14px 0 0;
  color: #263b5f;
  font-size: 17px;
  line-height: 1.55;
}

.calories-workspace {
  padding: 34px 0 0;
}

.calories-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 16px;
  align-items: start;
}

.calorie-tool,
.side-panel,
.guide-shell {
  min-width: 0;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 28px rgba(17, 40, 77, .06);
}

.calorie-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border-bottom: 1px solid #dfe7f1;
}

.calorie-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 58px;
  border: 0;
  border-right: 1px solid #dfe7f1;
  border-radius: 0;
  background: #fff;
  color: #10264c;
  font-weight: 800;
}

.calorie-tabs button:first-child {
  border-top-left-radius: 8px;
}

.calorie-tabs button:last-child {
  border-right: 0;
  border-top-right-radius: 8px;
}

.calorie-tabs button.is-active {
  border-color: transparent;
  background: #fff;
  color: #061738;
  box-shadow: inset 0 -4px 0 #08ae64;
}

.calorie-tabs button.is-active svg {
  color: #ff5f58;
}

.calorie-tool-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 610px;
}

.calorie-form {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 14px;
  padding: 22px 24px;
  border-right: 1px solid #dfe7f1;
}

.calorie-form label {
  min-width: 0;
  display: grid;
  gap: 8px;
  color: #0b2146;
  font-size: 14px;
  font-weight: 800;
}

.calorie-form label > span,
.pace-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tiny-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border: 1px solid #9fb0c8;
  border-radius: 50%;
  color: #49617f;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.segmented,
.unit-row,
.two-field {
  display: grid;
  gap: 8px;
}

.segmented {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #f7fbff;
}

.segmented button,
.unit-row button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #49617f;
  font-size: 13px;
  font-weight: 850;
}

.segmented button.is-active,
.unit-row button.is-active {
  background: #fff;
  color: #08ae64;
  box-shadow: 0 4px 14px rgba(17, 40, 77, .08);
}

.unit-row {
  display: inline-grid;
  grid-template-columns: repeat(2, 56px);
  width: max-content;
  padding: 3px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #f7fbff;
}

.calorie-form label:has(.unit-row) {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.calorie-form label:has(.unit-row) > span {
  min-height: 34px;
}

.calorie-form label:has(.unit-row) .unit-row {
  grid-column: 2;
  grid-row: 1;
}

.calorie-form label:has(.unit-row) > .field-shell,
.calorie-form label:has(.unit-row) > .two-field {
  grid-column: 1 / -1;
}

.two-field {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-shell {
  display: flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid #d5e0ee;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.field-shell input,
.calorie-form select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: #061738;
  font-size: 14px;
  font-weight: 700;
  outline: 0;
}

.calorie-form select {
  font-weight: 750;
}

.field-shell input {
  padding: 0 15px;
}

.field-shell span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 54px;
  padding: 0 12px;
  border-left: 1px solid #dce6f2;
  color: #49617f;
  background: #f8fbff;
  font-size: 13px;
  font-weight: 800;
}

.calorie-form select {
  appearance: none;
  min-height: 40px;
  padding: 0 38px 0 14px;
  border: 1px solid #d5e0ee;
  border-radius: 6px;
  background:
    linear-gradient(45deg, transparent 50%, #49617f 50%) calc(100% - 20px) 17px / 6px 6px no-repeat,
    linear-gradient(135deg, #49617f 50%, transparent 50%) calc(100% - 14px) 17px / 6px 6px no-repeat,
    #fff;
  font-size: 14px;
}

.height-metric,
.weight-metric,
.calorie-form.is-metric-height .height-us,
.calorie-form.is-metric-weight .weight-us {
  display: none;
}

.calorie-form.is-metric-height .height-metric,
.calorie-form.is-metric-weight .weight-metric {
  display: flex;
}

.pace-field {
  grid-column: 1 / -1;
  padding-top: 2px;
}

.calorie-form[data-goal="maintain"] .pace-field {
  opacity: .62;
}

.calorie-form[data-goal="maintain"] .pace-field input {
  pointer-events: none;
}

.pace-field output {
  color: #08ae64;
  font-size: 13px;
  font-weight: 900;
}

.pace-field input[type="range"] {
  width: 100%;
  accent-color: #08ae64;
}

.pace-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  color: #6d7f99;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: pre-line;
}

.pace-labels span:nth-child(2) {
  text-align: center;
}

.pace-labels span:nth-child(3) {
  text-align: right;
}

.calculate-btn {
  align-self: end;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #12bd72 0%, #009e57 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 166, 87, .24);
}

.medical-note {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  justify-content: center;
  margin: 0;
  color: #49617f;
  font-size: 13px;
  font-weight: 700;
}

.medical-note svg {
  color: #08ae64;
}

.calorie-result {
  padding: 26px;
  background:
    radial-gradient(circle at 86% 10%, rgba(255, 160, 75, .14), transparent 180px),
    linear-gradient(145deg, #f6fffb 0%, #f9fcff 58%, #fff 100%);
}

.calorie-result h2,
.side-panel h2,
.guide-grid h2,
.calories-related h2 {
  margin: 0;
  color: #061738;
  font-size: 20px;
  line-height: 1.2;
}

.calorie-result > strong {
  display: block;
  margin-top: 18px;
  color: #07945a;
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1;
}

.calorie-result > strong span {
  display: block;
  margin-top: 6px;
  color: #263b5f;
  font-size: 16px;
}

.calorie-result > p {
  margin: 10px 0 0;
  color: #49617f;
  font-size: 14px;
  font-weight: 700;
}

.result-lines {
  display: grid;
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid #dce6f2;
  border-bottom: 1px solid #dce6f2;
}

.result-lines div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid #dce6f2;
  color: #49617f;
  font-size: 13px;
  font-weight: 700;
}

.result-lines div:last-child {
  border-bottom: 0;
}

.result-lines strong {
  flex: 0 0 auto;
  color: #061738;
  font-size: 14px;
  text-align: right;
}

.macro-block {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.calories-page[data-current-calorie-mode="macros"] .macro-block {
  border-color: rgba(8, 174, 100, .48);
  box-shadow: 0 12px 28px rgba(8, 174, 100, .12);
}

.calories-page[data-current-calorie-mode="goal"] .pace-field,
.calories-page[data-current-calorie-mode="goal"] .result-lines {
  border-color: rgba(8, 174, 100, .42);
}

.macro-block h3 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  color: #061738;
  font-size: 17px;
}

.macro-block h3 span {
  color: #6d7f99;
  font-size: 13px;
}

.macro-bar {
  display: grid;
  grid-template-columns: 30fr 45fr 25fr;
  height: 12px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf4fb;
}

.macro-bar span.protein,
.dot.protein {
  background: #12bd72;
}

.macro-bar span.carbs,
.dot.carbs {
  background: #3f86ff;
}

.macro-bar span.fat,
.dot.fat {
  background: #ff9f19;
}

.macro-rows {
  display: grid;
  gap: 11px;
  margin-top: 16px;
}

.macro-rows div {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  color: #263b5f;
  font-size: 14px;
  font-weight: 800;
}

.macro-rows em {
  color: #6d7f99;
  font-size: 12px;
  font-style: normal;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.result-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #cfe1f3;
  border-radius: 6px;
  background: #f7fbff;
  line-height: 1.5;
}

.calories-side {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.side-panel {
  padding: 18px;
}

.examples-panel {
  display: grid;
  gap: 0;
}

.examples-panel h2 {
  margin-bottom: 8px;
}

.examples-panel button {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #dfe7f1;
  background: transparent;
  color: #061738;
  text-align: left;
}

.examples-panel button:last-child {
  border-bottom: 0;
}

.example-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: var(--badge-color, #08ae64);
  background: color-mix(in srgb, var(--badge-color, #08ae64) 16%, white);
}

.example-badge svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.5;
}

.example-badge.office {
  --badge-color: #6b7cff;
}

.example-badge.parent {
  --badge-color: #ff625a;
}

.example-badge.runner {
  --badge-color: #08ae64;
}

.example-badge.strength {
  --badge-color: #ff9f19;
}

.examples-panel strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.examples-panel small {
  display: block;
  margin-top: 4px;
  color: #49617f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.checklist-panel ul {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.checklist-panel li {
  position: relative;
  padding-left: 24px;
  color: #263b5f;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.checklist-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 15px;
  height: 15px;
  border: 2px solid #08ae64;
  border-radius: 4px;
  background: linear-gradient(135deg, transparent 55%, rgba(8, 174, 100, .18) 56%);
}

.similar-panel {
  display: grid;
  gap: 0;
}

.similar-panel h2 {
  margin-bottom: 8px;
}

.similar-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #dfe7f1;
  color: #0b2146;
  font-size: 14px;
  font-weight: 800;
}

.similar-panel a:last-child {
  border-bottom: 0;
}

.calories-guide {
  padding: 18px 0 0;
}

.guide-shell {
  padding: 0;
  overflow: hidden;
}

.guide-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #dfe7f1;
}

.guide-tabs button {
  min-height: 44px;
  border: 0;
  border-right: 1px solid #e6edf6;
  background: #fff;
  color: #263b5f;
  font-weight: 800;
}

.guide-tabs button:last-child {
  border-right: 0;
}

.guide-tabs button.is-active {
  color: #008f55;
  box-shadow: inset 0 -3px 0 #08ae64;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 22px;
}

.guide-grid article {
  min-width: 0;
  padding: 0;
}

.guide-grid article.is-focused {
  display: block;
  animation: guideFade .18s ease;
}

.guide-grid article[hidden] {
  display: none;
}

@keyframes guideFade {
  from {
    opacity: .25;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.guide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 8px;
  color: #08ae64;
  background: #eafaf3;
}

.guide-grid h2 {
  font-size: 17px;
}

.guide-grid p,
.guide-grid li {
  color: #263b5f;
  font-size: 14px;
  line-height: 1.55;
}

.guide-grid p {
  margin: 10px 0 0;
}

.guide-grid ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.calories-related {
  padding: 20px 0 18px;
  border-bottom: 1px solid #dfe7f1;
}

.calories-related .related-inner {
  display: block;
}

.calories-related h2 {
  margin-bottom: 12px;
}

.calories-related .related-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.calories-related .related-card {
  width: auto;
  min-width: 0;
}

@media (max-width: 760px) {
  .calories-page:not(.menu-open) .mobile-menu {
    display: none;
  }

  .calories-page.menu-open .mobile-menu {
    display: flex;
  }

  .calories-page .mobile-menu {
    right: auto;
    left: 100%;
  }

  .calories-page.menu-open .mobile-menu {
    transform: translateX(-100%);
  }
}

@media (max-width: 1180px) {
  .calories-page .header-inner {
    gap: 14px;
  }

  .calories-page .directory-nav {
    gap: 16px;
    margin-left: 14px;
    font-size: 13px;
  }

  .calories-page .directory-actions {
    gap: 10px;
  }

  .calories-page .submit-btn {
    padding: 0 14px;
    font-size: 13px;
  }

  .calories-page .lang-btn {
    padding: 0 10px;
    font-size: 13px;
  }

  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calories-related .related-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .calories-layout,
  .calorie-tool-grid {
    grid-template-columns: 1fr;
  }

  .calorie-form {
    border-right: 0;
    border-bottom: 1px solid #dfe7f1;
  }

  .calories-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .calories-page .directory-container {
    width: calc(100% - 32px);
  }

  .calories-hero {
    padding: 16px 0 20px;
  }

  .calories-breadcrumb {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .calories-title-row {
    align-items: flex-start;
    gap: 15px;
    margin-top: 16px;
  }

  .calories-mark {
    width: 70px;
    height: 70px;
    flex-basis: 70px;
    border-radius: 22px;
  }

  .calories-mark::before {
    inset: 12px;
    border-width: 3px;
  }

  .calories-mark::after {
    right: 9px;
    bottom: 11px;
    width: 19px;
    height: 19px;
  }

  .calories-mark .plate {
    left: 20px;
    top: 19px;
    width: 30px;
    height: 30px;
    border-width: 3px;
  }

  .calories-mark .apple-shape {
    right: 18px;
    top: 19px;
    width: 10px;
    height: 12px;
  }

  .calories-mark .flame-shape {
    left: 20px;
    bottom: 14px;
    width: 11px;
    height: 15px;
  }

  .calories-title-row h1 {
    font-size: 34px;
    line-height: 1;
  }

  .calories-title-row p {
    margin-top: 9px;
    font-size: 15px;
  }

  .calories-workspace {
    padding-top: 18px;
  }

  .calories-layout {
    gap: 16px;
  }

  .calorie-tabs {
    display: flex;
    overflow-x: auto;
    padding: 10px;
    scrollbar-width: none;
  }

  .calorie-tabs button {
    flex: 0 0 auto;
    min-width: 132px;
  }

  .calorie-form {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }

  .calorie-form label:has(.unit-row) {
    grid-template-columns: 1fr;
  }

  .calorie-form label:has(.unit-row) .unit-row {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calorie-result {
    padding: 18px;
  }

  .calorie-result > strong {
    font-size: 40px;
  }

  .result-lines div,
  .macro-rows div {
    grid-template-columns: auto 1fr;
  }

  .result-lines div {
    flex-direction: column;
    gap: 4px;
  }

  .result-lines strong {
    text-align: left;
  }

  .macro-rows em {
    grid-column: 2;
  }

  .calories-side {
    grid-template-columns: 1fr;
  }

  .guide-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .guide-tabs button {
    min-width: 148px;
    padding: 0 16px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .calories-related .related-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .calories-related .related-card {
    flex: 0 0 236px;
  }
}

@media (max-width: 430px) {
  .two-field,
  .segmented,
  .unit-row {
    gap: 6px;
  }

  .field-shell span {
    min-width: 44px;
  }

  .examples-panel button {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .example-badge {
    width: 46px;
    height: 46px;
  }
}
