/* The account gate shares its paper, ink and typography with the diary. */
#access {
  --account-paper: #fcfbf7;
  --account-ink: #282924;
  --account-muted: #66665e;
  --account-line: #d6d5ca;
  --account-accent: #b94027;
  display: grid;
  grid-template: auto minmax(0, 1fr) / minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 0 clamp(36px, 6vw, 110px);
  min-height: 100svh;
  padding: 0 max(clamp(24px, 4.8vw, 88px), calc((100% - 1600px) / 2)) 30px;
  background: var(--account-paper);
  color: var(--account-ink);
}
#access .access-top {
  grid-column: 1 / -1;
  min-height: 85px;
  border-bottom: 1px solid var(--account-line);
}
#access .access-switch {
  border: 1px solid var(--account-line);
  border-radius: 100px;
  background: transparent;
  color: var(--account-ink);
  padding: 9px 21px;
  min-height: 42px;
  font-size: .9375rem;
}
#access .access-switch:hover { background: #eeede6; }
#access .access-main { justify-content: center; padding: 40px 0; }
#access .access-body { width: min(100%, 455px); padding: 0; flex: 0 0 auto; }
#access .account-form { gap: 17px; }
#access .access-intro { margin-bottom: 10px; }
#access .access-intro .caption {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--account-accent);
  font-size: .875rem;
  letter-spacing: .045em;
  font-weight: 650;
  text-transform: none;
  margin: 0 0 15px;
}
#access .access-intro .caption::before { content: ""; width: 24px; height: 2px; background: currentColor; }
#access .access-intro h1 {
  font: 400 clamp(2.55rem, 4vw, 4.25rem)/1.05 "PT Serif", Georgia, serif;
  letter-spacing: -.055em;
  text-wrap: balance;
}
#access .access-intro p:last-child {
  max-width: 36ch;
  margin-top: 15px;
  color: var(--account-muted);
  line-height: 1.55;
  font-size: 1.0625rem;
}
#access .field { gap: 6px; }
#access .field > span, #access .access-password > label { color: var(--account-ink); font-weight: 600; font-size: .9375rem; }
#access .field input {
  min-height: 49px;
  border: 1px solid var(--account-line);
  border-radius: 9px;
  background: #fff;
  color: var(--account-ink);
  padding-inline: 15px;
}
#access .field input::placeholder { color: #76766d; }
#access .field input:focus {
  border-color: var(--account-accent);
  box-shadow: 0 0 0 3px #b940271a;
}
#access .password-control { position: relative; }
#access .password-control input { padding-right: 6.25rem; }
#password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  min-height: 40px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #57584f;
  font-size: .875rem;
  font-weight: 550;
}
#password-toggle:hover { color: var(--account-accent); }
#access .access-submit {
  min-height: 50px;
  margin-top: 4px;
  justify-content: center;
  color: #fff;
  background: var(--account-accent);
  border-color: var(--account-accent);
}
#access .access-submit:hover { background: #9d3120; }
#access .access-footnote { color: var(--account-muted); font-size: .875rem; }
.access-plate {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 23px 0 0;
  padding: 0;
}
.access-plate-image {
  position: relative;
  min-height: 385px;
  flex: 1;
  overflow: hidden;
  border-radius: 3px;
  background: #6a603d;
}
.access-plate-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 51%; }
.access-plate figcaption { display: flex; gap: 16px; align-items: end; justify-content: space-between; padding-top: 14px; }
.access-plate h2 {
  font: 400 clamp(1.5rem, 2.45vw, 2.25rem)/1.15 "PT Serif", Georgia, serif;
  letter-spacing: -.035em;
}
.access-plate figcaption p { margin-top: 5px; color: var(--account-muted); font-size: .9375rem; }
.access-plate figcaption a { color: var(--account-muted); font-size: .8125rem; text-decoration: underline; text-underline-offset: 3px; }

body[data-onboarding="true"] :is(.sidebar, .breadcrumb) { display: none; }
body[data-onboarding="true"] .workspace { margin-left: 0; }
body[data-onboarding="true"] .mobile-brand { display: flex; padding: 0; }
body[data-onboarding="true"] .content { max-width: 1176px; margin-inline: auto; }
@media (min-width: 741px) {
  body[data-onboarding="true"] .topbar { padding-inline: max(clamp(24px, 3.4vw, 58px), calc((100% - 1176px) / 2 + clamp(24px, 3.4vw, 58px))); }
}
#page-profile .profile-layout { display: block; margin-bottom: 16px; }
.login-settings {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding: 18px clamp(19px, 2.2vw, 32px); margin-bottom: 19px;
}
.login-settings h2 { font-size: 1.125rem; letter-spacing: -.025em; }
#login-email { color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.login-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#credentials-saved { flex-basis: 100%; color: var(--ink); font-size: .9375rem; }
#credentials-saved:empty { display: none; }
#credentials-dialog { width: min(440px, calc(100% - 24px)); background: var(--paper); border-color: var(--line); }
#credentials-form { display: grid; gap: 16px; padding: clamp(18px, 4vw, 28px); }
#credentials-form .dialog-heading { align-items: center; }
#credentials-form .dialog-heading h2 { font-size: 1.375rem; }
#credentials-description { line-height: 1.5; margin-top: -5px; }
#credentials-form .field > span { color: var(--ink); }
#credentials-form input { border-color: var(--line); background-color: white; }
#credentials-form .field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px #b940271a; }
#credentials-form .password-fields { display: grid; gap: 16px; border: 0; margin: 0; padding: 0; min-width: 0; }
#credentials-form .dialog-footer { flex-wrap: wrap; margin-top: 3px; }
#profile-step { color: var(--muted); }
body[data-onboarding="false"] #profile-step { text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; }
#page-profile .profile-editor { display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(0, 1fr); gap: 19px; align-items: start; }
#page-profile .profile-card { padding: clamp(19px, 2.2vw, 32px); }
#page-profile .profile-card > p { color: #67675d; line-height: 1.55; }
#page-profile .profile-fields { margin-block: 22px; }
#page-profile .field > span { color: var(--ink); }
#page-profile .field :is(input, select) { border-color: var(--line); background-color: #fff; }
#page-profile .field :is(input, select):focus { border-color: var(--green); box-shadow: 0 0 0 3px #b940271a; }
#page-profile .field:has(> select) { position: relative; }
#page-profile .field select { appearance: none; padding-right: 34px; }
#page-profile .field:has(> select)::after {
  content: "";
  position: absolute;
  bottom: 22px;
  right: 15px;
  width: 8px;
  height: 8px;
  border: solid #67685e;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  pointer-events: none;
}
#page-profile .goal-field legend { color: #45463f; }
#page-profile .goal-options { gap: 7px; }
#page-profile .goal-options label > span { min-height: 73px; color: #52534b; background: #fcfbf7; border-color: #dbd9cf; line-height: 1.3; }
#page-profile .goal-options label:hover > span { border-color: #a9a799; }
#page-profile .goal-options input:checked + span { color: #91301c; background: #f9ece5; border-color: #b94027; }
#page-profile .goal-options input:focus-visible + span { outline-color: #b94027; }
#page-profile .profile-target {
  min-width: 0;
  display: grid;
  align-items: start;
  align-content: start;
  justify-content: stretch;
  gap: 24px;
  margin: 0;
  padding: clamp(21px, 2.4vw, 36px);
  border: none;
  border-radius: var(--radius);
  background: #282924;
  color: #fcfbf7;
}
#page-profile .profile-target h2 { font-size: 1.125rem; line-height: 1.35; font-weight: 600; letter-spacing: -.02em; }
#page-profile .profile-target .energy-number { margin-block: 15px 5px; white-space: normal; color: #dfdcd1; font-size: 1.0625rem; }
#page-profile .profile-target .energy-number strong { color: #fcfbf7; font-size: clamp(2.875rem, 4.4vw, 4.375rem); font-weight: 550; }
#page-profile #profile-target-description { color: #dbd8ce; font-size: .9375rem; line-height: 1.5; }
.profile-macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 19px 0 0; margin: 0; border-top: 1px solid #55564c; }
.profile-macros dt { color: #d9d8cd; font-weight: 450; font-size: .875rem; }
.profile-macros dd { margin: 5px 0 0; font-size: 1.16rem; line-height: 1.25; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#page-profile .profile-target a { display: inline-flex; align-items: center; gap: 5px; justify-self: start; color: #dedbd0; text-decoration: underline; text-underline-offset: 4px; line-height: 1.6; }
#page-profile .profile-target a .icon { flex-shrink: 0; width: 15px; height: 15px; margin: 0; }
#page-profile .profile-editor > :is(details, .profile-submit, .form-error) { grid-column: 1 / -1; margin: 0; }
#page-profile .profile-submit { align-items: center; min-width: 0; }
#page-profile .profile-submit button { min-height: 46px; }
#page-profile #profile-nutrition { overflow: hidden; }

@media (max-width: 1100px) {
  #page-profile .profile-editor { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  #access { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 0 25px; padding-inline: 22px; }
  .access-plate figcaption { flex-wrap: wrap; gap: 7px; }
}
@media (max-width: 650px) {
  #access { grid-template: auto auto auto / minmax(0, 1fr); gap: 0; padding: 0 20px 22px; }
  #access .access-top { min-height: 69px; }
  #access .access-main { padding: 35px 0 28px; }
  #access .access-body, .access-plate { width: min(100%, 455px); margin-inline: auto; }
  #access .access-intro .caption { margin-bottom: 9px; }
  #access .access-intro p:last-child { margin-top: 10px; font-size: 1rem; }
  #access .access-intro { margin-bottom: 4px; }
  #access .account-form { gap: 14px; }
  .access-plate { margin-top: 0; }
  .access-plate-image { min-height: 0; aspect-ratio: 2 / 1; }
  .access-plate figcaption { align-items: baseline; padding-top: 10px; }
  .access-plate figcaption p { display: none; }
}
@media (max-width: 460px) {
  #page-profile .diary-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px 12px; }
  #page-profile .diary-heading > div { display: contents; }
  #page-profile #profile-step { grid-area: 1 / 1; margin: 0; }
  #page-profile #sign-out { grid-area: 1 / 2; margin: 0; }
  #page-profile #profile-title { grid-area: 2 / 1 / 3 / -1; }
  body[data-onboarding="false"] #page-profile #profile-title { grid-area: 1 / 1; }
  .login-actions .button { padding-inline: 10px; }
  #page-profile .goal-options { grid-template-columns: minmax(0, 1fr); }
  #page-profile .goal-options label > span { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 9px 12px; }
  #page-profile .profile-submit button { width: 100%; }
}
