body.onboarding-active .topnav,
body.onboarding-active .dock { display: none; }

body.onboarding-active .mast-in { justify-content: space-between; }
body.onboarding-active #content {
  padding-top: clamp(32px, 6vh, 72px);
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}
.ob-shell, .ob-welcome {
  --ob-blue: var(--blue, #2854ce);
  --ob-ink: var(--ink, #202124);
  --ob-muted: var(--muted, #575c67);
  color: var(--ob-ink);
}
.ob-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr);
  grid-template-areas: "copy scene" "actions scene";
  column-gap: clamp(30px, 4.8vw, 78px);
  align-content: center;
  min-height: min(690px, calc(100svh - 185px));
}
.ob-welcome-copy {
  grid-area: copy;
  align-self: end;
  container-type: inline-size;
}
.ob-welcome-copy h1 {
  font: 690 clamp(32px, 10.2cqi, 67px)/1.055 var(--sans);
  letter-spacing: -.061em;
  text-wrap: balance;
  outline: none;
}
.ob-welcome-copy h1 span { display: block; color: var(--ob-blue); }
.ob-welcome-copy > p {
  max-width: 34em;
  margin-top: clamp(17px, 2vw, 26px);
  color: #4c525d;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.52;
  text-wrap: pretty;
}
.ob-welcome-actions {
  grid-area: actions;
  align-self: start;
  padding-top: clamp(26px, 3vw, 40px);
}
.ob-action-row, .ob-footer {
  display: flex;
  align-items: center;
  gap: 12px 21px;
  flex-wrap: wrap;
}
.ob-primary, .ob-secondary, .ob-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 0;
  font: 610 16px/1.25 var(--sans);
  cursor: pointer;
}
.ob-primary {
  padding: 14px 22px;
  border-radius: 10px;
  background: var(--ob-blue);
  color: white;
  text-decoration: none;
}
.ob-primary:hover:not(:disabled) { background: var(--blue-strong); }
.ob-primary:disabled { cursor: default; opacity: .54; }
.ob-secondary, .ob-back {
  padding: 8px 2px;
  color: var(--ob-blue);
  background: transparent;
  text-decoration: none;
}
.ob-secondary:hover, .ob-back:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.ob-offer-note {
  margin-top: 14px;
  color: var(--ob-muted);
  font-size: 13px;
  line-height: 1.55;
}
.ob-offer-note span { padding-inline: .12em; }

/* A recipe card and its ingredient slip sit on the same checked kitchen cloth. */
.ob-kitchen-scene {
  grid-area: scene;
  align-self: center;
  position: relative;
  isolation: isolate;
  margin: 0;
  aspect-ratio: 1.13;
  overflow: hidden;
  border-radius: clamp(18px, 2.4vw, 34px);
  background-color: #e4edf4;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 37px, #7297b929 37px 38px, transparent 38px 41px, #7297b91d 41px 42px),
    repeating-linear-gradient(90deg, transparent 0 37px, #7297b929 37px 38px, transparent 38px 41px, #7297b91d 41px 42px);
}
.ob-recipe-paper {
  position: absolute;
  top: 6%;
  right: 6%;
  width: 65%;
  height: 82%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(5px, .55vw, 9px);
  border-radius: 5px;
  background: #fffefa;
  box-shadow: 0 10px 22px -7px #23384d55, 0 2px 4px #29476426;
  transform: rotate(5deg);
}
.ob-recipe-paper img {
  width: 100%;
  min-height: 0;
  object-fit: cover;
  flex: 1 1 auto;
  border-radius: 2px;
}
.ob-paper-caption {
  display: grid;
  align-content: center;
  flex: 0 0 22%;
  padding: 5px 4%;
}
.ob-paper-caption strong {
  font: 650 clamp(15px, 1.55vw, 24px)/1.25 var(--sans);
  letter-spacing: -.035em;
}
.ob-paper-caption span {
  font-size: clamp(11px, 1vw, 14px);
  color: var(--ob-muted);
}
.ob-grocery-slip {
  position: absolute;
  left: 5%;
  top: 25%;
  width: 39%;
  padding: 3.3% 4% 4.8%;
  color: #373628;
  border-radius: 3px;
  background: #fff3cb;
  box-shadow: 0 6px 16px -4px #3947604d, 0 1px 2px #39476026;
  transform: rotate(-7deg);
}
.ob-grocery-slip > strong {
  display: block;
  padding-bottom: .5em;
  border-bottom: 1px solid #79734c59;
  font: 650 clamp(15px, 1.6vw, 24px)/1.2 var(--sans);
  letter-spacing: -.03em;
}
.ob-grocery-slip ul { margin: .25em 0 0; padding: 0; list-style: none; }
.ob-grocery-slip li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: .25em;
  padding-top: .46em;
  font-size: clamp(11px, 1.06vw, 16px);
  line-height: 1.25;
}
.ob-grocery-slip li svg {
  width: .93em;
  height: .93em;
  color: var(--ob-blue);
}
.ob-grocery-slip li small {
  font-size: .93em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #56533f;
}

.ob-step {
  width: min(100%, 740px);
  margin-inline: auto;
}
.ob-step { padding-block: 0 18px; }
.ob-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}
.ob-back { min-height: 40px; font-size: 14px; }
.ob-label { color: var(--ob-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.ob-progress {
  flex-basis: 100%;
  height: 4px;
  border-radius: 4px;
  overflow: hidden;
  background: #e6ebf4;
}
.ob-progress span {
  display: block;
  height: 100%;
  background: var(--ob-blue);
  border-radius: inherit;
  transform-origin: left;
}
.ob-step-title, .ob-result h1 {
  margin-top: clamp(23px, 4vw, 40px);
  font: 665 clamp(32px, 3.8vw, 51px)/1.08 var(--sans);
  letter-spacing: -.045em;
  text-wrap: balance;
  outline: none;
}
.ob-hint {
  max-width: 60ch;
  margin-top: 12px;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.5;
  color: var(--ob-muted);
}
.ob-fields { margin-top: clamp(22px, 3vw, 32px); }
.ob-footer {
  min-height: 56px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.ob-error:not(:empty) {
  margin-top: 14px;
  color: #9c292c;
  font-size: 14px;
}
.ob-error:empty { display: none; }
.ob-primary[aria-busy="true"]::before {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #ffffff66;
  border-top-color: white;
}
.ob-result {
  width: min(100%, 1090px);
  min-height: min(640px, calc(100svh - 185px));
  margin-inline: auto;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  gap: clamp(25px, 5vw, 82px);
}
.ob-result .ob-step-title { margin: 0; }
.ob-result .ob-hint { margin-top: 16px; }
.ob-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 30px;
  margin: 27px 0 0;
  padding-block: 18px;
  border-block: 1px solid var(--line);
}
.ob-summary > div { display: grid; gap: 2px; }
.ob-summary dt, .ob-result-note { color: var(--ob-muted); font-size: 14px; }
.ob-summary dd {
  margin: 0;
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 640;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.ob-result-note { margin-top: 10px; }
.ob-result-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 27px;
}
.ob-result-img {
  width: 100%;
  aspect-ratio: 1.07;
  object-fit: cover;
  border-radius: clamp(18px, 2vw, 28px);
  background: var(--wash);
}

@media (prefers-reduced-motion: no-preference) {
  .ob-welcome-copy, .ob-welcome-actions { animation: ob-text-in 400ms cubic-bezier(.2,.75,.25,1) both; }
  .ob-welcome-actions { animation-delay: 70ms; }
  .ob-recipe-paper { animation: ob-lay-card 650ms cubic-bezier(.18,.72,.24,1) both; }
  .ob-grocery-slip { animation: ob-lay-slip 560ms 125ms cubic-bezier(.18,.72,.24,1) both; }
  .ob-grocery-slip li path { stroke-dasharray: 17; animation: ob-check 210ms 550ms ease-out backwards; }
  .ob-grocery-slip li:nth-child(2) path { animation-delay: 660ms; }
  .ob-grocery-slip li:nth-child(3) path { animation-delay: 770ms; }
  .ob-forward { animation: ob-step-in 230ms cubic-bezier(.2,.75,.25,1) both; }
  .ob-backward { animation: ob-step-back 210ms ease-out both; }
  .ob-primary[aria-busy="true"]::before { animation: ob-assembling 720ms linear infinite; }
  .ob-result .ob-result-img { animation: ob-text-in 390ms 60ms cubic-bezier(.2,.75,.25,1) both; }
  .ob-primary, .ob-secondary, .ob-back { transition: background-color 160ms ease, transform 160ms ease; }
  .ob-primary:active:not(:disabled), .ob-back:active { transform: translateY(1px); }
  .ob-primary svg { transition: transform 170ms ease; }
  .ob-primary:hover:not(:disabled) svg { transform: translateX(2px); }
}
@keyframes ob-text-in { from { opacity: 0; transform: translateY(9px); } }
@keyframes ob-step-in { from { opacity: 0; transform: translateX(11px); } }
@keyframes ob-step-back { from { opacity: 0; transform: translateX(-11px); } }
@keyframes ob-lay-card { from { opacity: 0; transform: translate(10%, -4%) rotate(10deg); } }
@keyframes ob-lay-slip { from { opacity: 0; transform: translate(-10%, 7%) rotate(-12deg); } }
@keyframes ob-check { from { stroke-dashoffset: 17; } to { stroke-dashoffset: 0; } }
@keyframes ob-assembling { to { transform: rotate(1turn); } }

@media (min-width: 701px) and (max-width: 900px) {
  .ob-welcome { column-gap: 28px; }
  .ob-kitchen-scene { aspect-ratio: .94; }
  .ob-recipe-paper { height: 70%; width: 72%; }
  .ob-grocery-slip { top: 18%; width: 49%; }
}
@media (max-width: 700px) {
  body.onboarding-active #content { padding-top: clamp(21px, 4vh, 35px); }
  .ob-welcome {
    max-width: 460px;
    margin: 0 auto;
    min-height: 0;
    grid-template-columns: minmax(0,1fr);
    grid-template-areas: "copy" "scene" "actions";
    row-gap: 22px;
  }
  .ob-welcome-copy h1 { font-size: clamp(32px, 10.6cqi, 49px); }
  .ob-welcome-copy > p { margin-top: 14px; font-size: 16px; line-height: 1.48; }
  .ob-kitchen-scene {
    width: 100%;
    height: clamp(185px, 31svh, 290px);
    aspect-ratio: auto;
  }
  .ob-recipe-paper { height: 85%; width: 60%; right: 8%; }
  .ob-grocery-slip { top: 22%; left: 7%; width: 39%; }
  .ob-welcome-actions { padding-top: 0; }
  .ob-action-row { flex-direction: column; gap: 1px; }
  .ob-action-row > button { width: 100%; }
  .ob-action-row .ob-primary { min-height: 50px; }
  .ob-action-row .ob-secondary { min-height: 42px; font-size: 15px; }
  .ob-offer-note { text-align: center; margin-top: 0; font-size: 12px; }
  .ob-footer {
    position: sticky;
    z-index: 2;
    bottom: 0;
    margin-inline: -2px;
    padding: 11px 2px max(11px, env(safe-area-inset-bottom));
    background: white;
  }
  .ob-footer .ob-primary { flex: 1; }
  .ob-step-title { margin-top: 23px; }
  .ob-back { min-height: 44px; }
  .ob-result {
    grid-template-columns: 1fr;
    gap: 22px;
    min-height: 0;
    max-width: 460px;
  }
  .ob-result-img { aspect-ratio: 1.9; }
  .ob-result-actions { gap: 8px 18px; margin-top: 20px; }
  .ob-summary { margin-top: 17px; padding-block: 13px; }
}
@media (max-width: 700px) and (max-height: 630px) {
  body.onboarding-active #content { padding-top: 18px; }
  .ob-welcome { grid-template-areas: "copy" "actions" "scene"; gap: 15px; }
  .ob-kitchen-scene { height: 180px; }
}
