/* Amo Plan · shared palette with Receitas do Mundo */
:root {
  color-scheme: light;
  --canvas: #faf5ef;
  --surface: #fffcf8;
  --ink: #341c15;
  --muted: #69594e;
  --line: #e2d3c5;
  --clay: #a33d18;
  --clay-dark: #823312;
  --clay-light: #fae7d5;
  --sage: #486132;
  --shadow: 0 2px 3px #54301b0c, 0 8px 20px #54301b05;
  --serif: "Noto Serif", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1rem, 4vw, 3.25rem);
  --width: 68rem;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--canvas);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  container-type: inline-size;
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}
main,
section,
article,
form,
label,
fieldset,
.row > *,
.grid > *,
.hero-copy {
  min-width: 0;
}
[hidden] {
  display: none !important;
}
button,
input,
textarea,
select {
  font: inherit;
}
a {
  color: var(--clay);
  text-underline-offset: 0.19em;
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
figure {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.16;
  text-wrap: pretty;
}
h1 {
  font-size: clamp(2.15rem, 5vw, 3.7rem);
  letter-spacing: -0.052em;
}
h2,
.section-title {
  font: 700 clamp(1.5rem, 3vw, 2.12rem)/1.15 var(--serif);
  letter-spacing: -0.035em;
}
h3 {
  font-size: clamp(1.23rem, 2.5vw, 1.55rem);
  letter-spacing: -0.025em;
}
p,
li,
summary,
label,
h1,
h2,
h3,
strong,
button {
  overflow-wrap: anywhere;
}
ul,
ol {
  padding-inline-start: 1.4em;
}
li + li {
  margin-top: 0.35rem;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 0.875rem;
}
:focus-visible {
  outline: 3px solid #206c76;
  outline-offset: 3px;
}
.shell {
  width: min(calc(100% - var(--gutter) * 2), var(--width));
  margin-inline: auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
  padding: 0.7rem max(var(--gutter), calc((100vw - var(--width)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.topbar > .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font: 700 1.75rem/1.04 var(--serif);
  letter-spacing: -0.055em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  flex: none;
  border-radius: 0.72rem;
  background: var(--clay);
  color: var(--surface);
}
.brand small {
  display: block;
  margin-top: 0.28rem;
  font: 400 0.78rem/1.25 var(--sans);
  letter-spacing: 0;
}
.nav {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}
.nav :is(a, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.46rem;
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 2rem;
  font: 600 0.93rem/1.2 var(--sans);
  text-decoration: none;
  color: var(--muted);
  background: transparent;
}
.nav :is(a, button):is(.active, [aria-current="page"]) {
  color: var(--clay-dark);
  background: var(--clay-light);
}
.nav svg,
button svg,
a svg {
  width: 1.24em;
  height: 1.24em;
  flex: none;
  vertical-align: -0.18em;
}
main.shell {
  padding-block: clamp(1.65rem, 4vw, 3.3rem) 4.5rem;
}
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.page-head p {
  margin-top: 0.35rem;
  color: var(--muted);
}
.week-range {
  margin: -.65rem 0 1rem;
  color: var(--muted);
  font-size: .9375rem;
}
.start-plan { margin-bottom: 1rem; }
.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--clay-dark);
  font: 700 0.76rem/1.35 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.week-switch {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem;
  gap: 0.1rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: #f3e8dd;
}
.week-switch button {
  border: 0;
  border-radius: 2rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.9rem;
  background: transparent;
  font-size: 0.89rem;
  color: var(--muted);
}
.week-switch :is(.active, [aria-pressed="true"]) {
  color: var(--clay-dark);
  background: var(--surface);
  box-shadow: 0 1px 4px #583a2824;
}
.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 17%, 12rem);
  min-height: clamp(15rem, 28vw, 21rem);
  margin-bottom: 1.6rem;
  border-radius: 1.35rem;
  background: #eddfc9 url("./cozinha.webp") center 49% / cover no-repeat;
  text-align: center;
}
.hero :is(h1, h2) {
  font: 700 clamp(1.9rem, 4.7vw, 3.55rem)/1.05 var(--serif);
  letter-spacing: -0.05em;
}
.hero .hero-copy {
  max-width: 42rem;
}
.hero-copy > * + * {
  margin-top: 0.8rem;
}
.hero-copy .actions {
  justify-content: center;
  margin-top: 1.2rem;
}
.hero-copy > p:not(.eyebrow) {
  color: #4f3f32;
}
.hero-image {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.stack,
.fields {
  display: grid;
  gap: 0.95rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
}
.row,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}
.row {
  justify-content: space-between;
}
.card,
.item,
details,
.shop-row {
  border: 1px solid var(--line);
  border-radius: 1.05rem;
  background: var(--surface);
}
.card {
  padding: clamp(1rem, 2.6vw, 1.65rem);
  box-shadow: var(--shadow);
}
.card > * + *,
.item > * + * {
  margin-top: 0.65rem;
}
.card :is(.row, .actions) > *,
.card .grid > * {
  margin-top: 0;
}
.item,
.shop-row {
  padding: 0.85rem 1rem;
}
.item + .item,
.shop-row + .shop-row {
  margin-top: 0.55rem;
}
.section-title {
  margin: 1.65rem 0 0.9rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 0.35rem;
  padding: 0.22rem 0.59rem;
  border-radius: 2rem;
  color: var(--clay-dark);
  background: var(--clay-light);
  font-size: 0.8rem;
  font-weight: 650;
}
.pill-info,
.pill[data-shop-status="available"] {
  color: #244856;
  background: #e3eef2;
}
.pill[data-shop-status="skipped"] {
  color: #44454a;
  background: #ececf0;
}
.pill[data-shop-status="bought"] {
  color: #304c34;
  background: #e5eedf;
}
.pill[data-shop-status="uncertain"] {
  color: #634306;
  background: #fbefce;
}
.amount {
  color: var(--clay-dark);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
button,
.primary,
.secondary {
  cursor: pointer;
  touch-action: manipulation;
}
button,
a.primary,
a.secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.48rem;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--ink);
  background: var(--surface);
  font: 600 0.94rem/1.3 var(--sans);
  text-align: center;
  text-decoration: none;
}
button.primary,
a.primary {
  border-color: var(--clay);
  color: #fff;
  background: var(--clay);
}
button.secondary,
a.secondary {
  color: var(--clay-dark);
  border-color: #c9b8a6;
}
button:disabled {
  opacity: 0.56;
  cursor: default;
}
@media (hover: hover) {
  button:not(:disabled):hover,
  a.secondary:hover,
  .nav a:hover {
    background-color: #f2eae0;
  }
  button.primary:not(:disabled):hover,
  a.primary:hover {
    background-color: var(--clay-dark);
  }
  summary:hover {
    color: var(--clay-dark);
  }
}
label {
  display: grid;
  align-content: start;
  gap: 0.36rem;
  font-size: 0.92rem;
  font-weight: 600;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.78rem;
  padding: 0.6rem 0.73rem;
  border: 1px solid #bfb2a4;
  border-radius: 0.6rem;
  color: var(--ink);
  background-color: #fffefa;
  font-size: 1rem;
  font-weight: 400;
}
input[type="file"] {
  max-width: 100%;
}
input[type="checkbox"],
input[type="radio"] {
  width: 1.35rem;
  height: 1.35rem;
  accent-color: var(--sage);
  flex: none;
}
select {
  padding-right: 2.5rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='m2 2 5 5 5-5' fill='none' stroke='%235b5048' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 0.88rem center;
  background-repeat: no-repeat;
}
textarea {
  min-height: 5.5rem;
  resize: vertical;
}
.check,
label:has(> input[type="checkbox"]) {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
}
fieldset {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
legend {
  padding-inline: 0.35rem;
  font-weight: 600;
}
details {
  padding: 0.75rem 1rem;
}
details + details {
  margin-top: 0.6rem;
}
summary {
  cursor: pointer;
  padding: 0.4rem 0;
  min-height: 2.65rem;
  font-weight: 650;
}
summary::marker {
  color: var(--clay);
}
details[open] > summary {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
dialog {
  max-width: min(40rem, calc(100vw - 1.5rem));
  width: 100%;
  max-height: 88dvh;
  padding: clamp(1rem, 3vw, 1.6rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 16px 80px #33251e38;
}
dialog::backdrop {
  background: #281f19a8;
}
dialog h2 {
  margin-bottom: 0.85rem;
}
dialog form > .actions {
  justify-content: flex-end;
  margin-top: 1rem;
}
.toast:not(:empty) {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 5;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  color: white;
  background: #3c4737;
  box-shadow: 0 3px 15px #31292226;
  transform: translateX(-50%);
}
.toast[data-tone="warning"] {
  color: #3d2803;
  background: #f5dfab;
}
.toast[data-tone="error"] {
  background: #812f32;
}
footer {
  color: var(--muted);
  font-size: 0.875rem;
}
@media (max-width: 720px) {
  .topbar {
    min-height: 4.2rem;
    padding-block: 0.65rem;
  }
  .brand {
    font-size: 1.55rem;
  }
  .brand-mark {
    width: 2.3rem;
    height: 2.3rem;
  }
  .nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.1rem;
    padding: 0.32rem max(0.3rem, env(safe-area-inset-right))
      max(0.35rem, env(safe-area-inset-bottom))
      max(0.3rem, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -3px 15px #45342608;
  }
  .nav :is(a, button) {
    flex-direction: column;
    gap: 0.22rem;
    min-height: 3.3rem;
    padding: 0.35rem 0.05rem;
    border-radius: 0.65rem;
    font-size: 0.78rem;
  }
  .nav svg {
    width: 1.35rem;
    height: 1.35rem;
  }
  body {
    padding-bottom: calc(4.4rem + env(safe-area-inset-bottom));
  }
  main.shell {
    padding-bottom: calc(7rem + env(safe-area-inset-bottom));
  }
  .page-head {
    align-items: center;
    gap: 0.7rem;
  }
  .hero {
    min-height: 14rem;
    padding: 2rem 1rem;
    border-radius: 1rem;
    background-size: auto 145%;
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      90deg,
      #f4e9d97a,
      #f4e9d9e6 21%,
      #f4e9d9e6 79%,
      #f4e9d97a
    );
    z-index: -1;
  }
  .hero-copy {
    max-width: 30rem;
  }
  .toast:not(:empty) {
    bottom: calc(4.8rem + env(safe-area-inset-bottom));
  }
}
@media (max-width: 380px) {
  :root {
    --gutter: 0.72rem;
  }
  .nav :is(a, button) {
    font-size: 0.73rem;
  }
  .page-head .week-switch {
    flex-shrink: 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  .nav a {
    transition:
      background-color 0.13s ease,
      border-color 0.13s ease;
  }
}

/* Navigation sits below the masthead on tablets and inside its center on wide screens. */
@media (min-width: 721px) {
  .topbar + .nav {
    min-height: 3.6rem;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
  }
}
@container (min-width: 70rem) {
  .topbar + .nav {
    position: absolute;
    top: 0;
    left: 50%;
    height: 5rem;
    transform: translateX(-50%);
    border: 0;
    background: transparent;
  }
}
.topbar > span {
  font: italic 1rem var(--serif);
}
@media (max-width: 720px) {
  .topbar { justify-content: flex-start; }
  .topbar > span { border-inline-start: 1px solid var(--line); padding-left: .7rem; margin-left: .3rem; }
}
.actions + .stack {
  margin-top: 1.15rem;
}
.home-actions {
  gap: .65rem;
}
.actions:has(> label) {
  align-items: end;
}
.prose {
  white-space: pre-line;
}
.dish + .dish {
  border-top: 1px solid var(--line);
  margin-top: 1.4rem;
  padding-top: 1.2rem;
}
.dish h4 {
  margin: 1.28rem 0 0.28rem;
  font: 700 0.84rem/1.3 var(--sans);
  color: var(--clay-dark);
  letter-spacing: 0.015em;
}
.dish > h4:first-child {
  margin-top: 0.8rem;
}
.lines {
  padding: 0;
  list-style: none;
  margin-top: 0.8rem;
}
.lines li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(45%);
  align-items: baseline;
  gap: 0.15rem 0.8rem;
}
.lines li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e9e1d8;
}
.lines li > p {
  grid-column: 1 / -1;
}
.lines li > span {
  min-width: 0;
  text-align: end;
  overflow-wrap: anywhere;
}
.lines li > span {
  color: var(--clay-dark);
  font-variant-numeric: tabular-nums;
}
details.card > summary {
  display: block;
  position: relative;
  list-style: none;
  padding: 0 2rem 0 0;
}
details.card > summary::-webkit-details-marker {
  display: none;
}
details.card > summary::after {
  content: "";
  position: absolute;
  right: 0.15rem;
  top: 0.6rem;
  width: 0.68rem;
  height: 0.68rem;
  border: solid var(--clay);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
details.card[open] > summary {
  padding-bottom: 1rem;
}
details.card[open] > summary::after {
  transform: rotate(225deg);
}
details.card > summary .eyebrow {
  display: block;
  margin-bottom: 0.35rem;
}
details.card > summary h2 {
  font-size: clamp(1.25rem, 2.3vw, 1.65rem);
}
details.card > summary .muted {
  display: block;
  margin-top: 0.35rem;
  font-weight: 400;
}
.card.shopping-store {
  --shop-inset: clamp(0.875rem, 4vw, 1.5rem);
  padding: 0;
}
.shopping-store > summary h2 {
  display: flex;
  align-items: center;
  gap: .65rem;
}
details.card.shopping-store > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  margin: 0;
  padding: .65rem var(--shop-inset);
  border: 0;
  border-radius: inherit;
  background: #f3f1e5;
}
details.shopping-store[open] > summary { border-radius: 1rem 1rem 0 0; border-bottom: 1px solid var(--line); }
details.shopping-store > summary::after { position: static; }
.shopping-store .icon-tile { background: #e7e5d1; color: #59562e; }
.icon-tile {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 2.4rem;
  block-size: 2.4rem;
  border-radius: .7rem;
  background: var(--clay-light);
  color: var(--clay-dark);
}
.icon-tile svg { width: 1.45rem; height: 1.45rem; }
.shopping-store > .shopping-items {
  margin-top: 0;
  padding-inline: var(--shop-inset);
}
.shop-row {
  padding: 0.65rem 0 0.2rem;
  border: 0;
  border-radius: 0;
}
.shop-row + .shop-row {
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.shop-item-head,
.shop-controls,
.shop-stock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.65rem;
}
.shop-item-head {
  align-items: baseline;
  justify-content: space-between;
}
.shop-item-name {
  flex: 1 1 6.5rem;
  font-size: 1.125rem;
  line-height: 1.3;
}
.shop-item-head .pill {
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.shop-item-info {
  margin-top: 0.125rem;
  font-size: 0.9375rem;
}
.shop-quantity-warning {
  color: #634306;
}
.shop-item-head:has([data-shop-status="uncertain"]) ~ .shop-quantity-warning {
  display: none;
}
.shop-controls {
  margin-top: 0.35rem;
}
.shop-controls input[type="number"][data-shop="home"] {
  width: 4.5rem;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}
.shop-controls .check input { margin: 0; }
.shop-item-options {
  display: grid;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
}
.shop-row > details {
  padding: 0;
  border: 0;
  border-radius: 0;
}
:is(.shop-row > details, .prep-guidance details) > summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  list-style: none;
  color: var(--clay-dark);
  font-size: 1rem;
  font-weight: 600;
}
:is(.shop-row > details, .prep-guidance details) > summary::-webkit-details-marker { display: none; }
:is(.shop-row > details, .prep-guidance details) > summary::before {
  content: "";
  flex: none;
  width: 0.48rem;
  height: 0.48rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-0.1rem) rotate(45deg);
}
:is(.shop-row > details, .prep-guidance details)[open] > summary::before {
  transform: translateY(0.1rem) rotate(225deg);
}
.shop-item-head:has([data-shop-status="bought"]) .shop-item-name {
  color: var(--muted);
  text-decoration: line-through;
}
.card.row > * {
  margin-top: 0;
}
.record-actions {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.8rem;
  min-width: 2.8rem;
  min-height: 2.8rem;
  padding: .55rem;
}
.icon-button svg { width: 1.15rem; height: 1.15rem; }
.data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.data-actions > button {
  min-height: 2.8rem;
}
.data-actions .icon-button {
  color: var(--clay-dark);
  background: var(--surface);
}
.data-actions .icon-button:hover { background: var(--clay-light); }
.data-actions .icon-button.danger-action {
  color: #8b3030;
  background: #fffaf7;
}
.data-actions .icon-button.danger-action:hover { background: #fae9e4; }
.danger-action {
  border-color: #dfc6bb;
  color: #8b3030;
  background: #fffaf7;
}
.danger-action:hover { background: #fae9e4; }
.unit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: .65rem;
}
.unit-form label { min-width: 0; }
.unit-form button { white-space: nowrap; }
.unit-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: 0;
  list-style: none;
}
.unit-list li {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin: 0;
  padding: .15rem .2rem .15rem .7rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: #faf4ed;
}
.unit-list .icon-button {
  width: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: .35rem;
  border: 0;
  background: transparent;
}
@media (max-width: 380px) {
  .topbar > span {
    font-size: 0.85rem;
  }
}

.portion-day + .portion-day { border-top: 1px solid var(--line); padding-top: .7rem; }
.portion-day h3 { font: 650 .9375rem/1.5 var(--sans); color: var(--muted); }
.portion-day ul { list-style: none; padding: 0; }
.portion-day li strong { color: var(--clay-dark); font-size: 1.1875rem; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  :root { --gutter: clamp(12px, 3.5vw, 16px); text-size-adjust: auto; -webkit-text-size-adjust: auto; }
  body { font-size: 1.0625rem; container-type: inline-size; }
  .page-head h1, .hero-copy h1 { font-size: 1.875rem; }
  h2, .section-title, details.card > summary h2 { font-size: 1.4375rem; }
  .prose { font-size: 1.125rem; line-height: 1.5; }
  .eyebrow, .nav :is(a,button) { font-size: .875rem; }
  .pill, .muted, .dish h4, .topbar > span { font-size: .9375rem; }
  button, select, input:not([type=checkbox]), .check, summary, .week-switch button { min-height: 3rem; }
  .card { padding: clamp(12px, 3.5vw, 16px); }
  .topbar { flex-wrap: wrap; gap: .25rem .375rem; }
  .page-head .week-switch {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    max-width: 100%;
    flex: none;
  }
  .week-switch button {
    white-space: nowrap;
    padding-inline: .65rem;
  }
  .actions > *, .fields > *, button { max-width: 100%; min-width: 0; }
  .portion-day { padding-block: .35rem; }
  .portion-day h3 { margin-bottom: .2rem; }
  .portion-day li span { font-size: 1.125rem; }
  .nav a { overflow-wrap: anywhere; }
}
@container (max-width: 19rem) {
  .week-switch button { padding-inline: .2rem; }
  .topbar + .nav { position: static; display: flex; flex-wrap: wrap; }
  .nav a { padding-inline: .4rem; }
  .card .grid, .fields, .grid { grid-template-columns: minmax(0, 1fr); }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.registry-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem .65rem;
  text-decoration: none;
  color: var(--ink);
}
.registry-link > div { margin: 0; }
.registry-link h2 { font-size: 1.4rem; }
.registry-link .muted { margin: 0; }
.registry-link::after {
  content: "";
  width: .5rem;
  height: .5rem;
  margin-inline-end: .15rem;
  border: solid var(--clay);
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}
.paired-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr));
  gap: .55rem .75rem;
  align-items: end;
}
@media (max-width: 720px) {
  .page-head { margin-bottom: 1rem; column-gap: .5rem; }
  .stack > details + details { margin-top: 0; }
  .actions { column-gap: .5rem; }
  .actions > button { padding-inline: .75rem; }
  .registry-search { flex: 1 1 8rem; }
  .registry-tools label:has(select), .shopping-filter label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem .5rem;
  }
  .shopping-filter select, .registry-tools select {
    width: auto;
    max-width: 100%;
    field-sizing: content;
  }
  .shopping-filter { align-items: center; }
  .shop-controls .check { min-height: 3rem; }
  .card.row > div { flex: 1 1 9rem; }
  details.card > summary { padding-right: 0; }
  details.card > summary .eyebrow { padding-right: 1.5rem; }
  .lines li { column-gap: .5rem; }
  .ingredient-line .paired-fields { margin-block: .5rem; }
}

.prep-plan {
  display: grid;
  gap: 1rem;
  align-items: start;
}
.prep-plan > .prep-stage { margin: 0; padding: 0; }
details.prep-stage > summary {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: .15rem .8rem;
  padding: clamp(.85rem, 2vw, 1.35rem);
  margin: 0;
  border: 0;
  border-radius: inherit;
}
details.prep-stage > summary .icon-tile { grid-row: 1 / 3; width: 2.65rem; height: 2.65rem; }
details.prep-stage > summary h2 { grid-column: 2; line-height: 1.12; }
.stage-description { grid-column: 2; color: var(--muted); font-weight: 400; line-height: 1.35; }
details.prep-stage > summary::after {
  position: static;
  grid-area: 1 / 3 / 3 / 4;
  margin: 0 .2rem;
  color: var(--clay-dark);
}
.stage-body { margin: 0; padding: 0 clamp(.85rem, 2vw, 1.35rem) 1rem; }
.stage-body > * + * { margin-top: .85rem; }
.prep-progress > div { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .2rem .6rem; }
.prep-progress strong { color: var(--clay-dark); }
.prep-progress .percentage { margin-left: auto; font-weight: 700; color: var(--sage); }
.prep-progress progress {
  display: block;
  width: 100%;
  height: .5rem;
  margin-top: .4rem;
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: #ede4db;
  color: var(--sage);
  accent-color: var(--sage);
}
.prep-progress progress::-webkit-progress-bar { background: #ede4db; }
.prep-progress progress::-webkit-progress-value { background: var(--sage); }
.prep-progress progress::-moz-progress-bar { background: var(--sage); }
.prep-guidance {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  padding: .85rem;
  border-radius: .75rem;
  background: #f1f2e7;
}
.prep-guidance > svg { color: var(--sage); margin-top: .15rem; }
.prep-guidance h3 { color: #374e2a; font: 700 1.1rem/1.35 var(--sans); }
.prep-guidance p { margin-top: .35rem; }
.prep-guidance details { margin-top: .35rem; padding: 0; background: transparent; border: 0; }
.prep-guidance .prep-reference > summary { color: var(--sage); }
.prep-tasks {
  padding-inline-start: 1.25em;
}
.prep-tasks li::marker {
  color: var(--clay);
}
.prep-bases strong {
  display: block;
  color: var(--clay-dark);
  font-variant-numeric: tabular-nums;
}
.prep-bases {
  list-style: none;
  padding: 0;
}
.prep-check:has(> input[type="checkbox"]) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  align-content: center;
  gap: .125rem .55rem;
  min-height: 3rem;
  padding-block: .3rem;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
}
.prep-check input[type="checkbox"] {
  margin: 0;
  align-self: start;
  margin-block-start: .15rem;
}
.prep-bases li { margin: 0; border-top: 1px solid var(--line); padding-block: .35rem; }
.prep-bases .prep-check span { font-weight: 650; }
.prep-bases .prep-check strong, .portion-day .prep-check strong {
  justify-self: start;
  padding: .12rem .55rem;
  background: var(--clay-light);
  border-radius: .65rem;
  line-height: 1.35;
}
.prep-bases .prep-check strong { grid-column: 2; }
.portion-day .prep-check:has(> input[type="checkbox"]) {
  grid-template-columns: auto minmax(0, 1fr) fit-content(45%);
}
.portion-day .prep-check strong {
  text-align: end;
  overflow-wrap: anywhere;
}
.prep-check:has(:checked) > span {
  color: var(--sage);
  text-decoration: line-through;
}
.prep-reset {
  display: flex;
  justify-content: flex-end;
  margin: .5rem 0;
}
.prep-reset button {
  border: 0;
  background: transparent;
  color: var(--clay-dark);
  padding-inline: .35rem;
  font-size: .9375rem;
}
.prep-meal > summary > h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
}
.prep-direction + .prep-direction {
  margin-top: 1rem;
}
.dish .prep-direction :is(h4, h5),
.dish .prep-dish-title {
  margin: 0 0 0.3rem;
  font: 700 1rem/1.4 var(--sans);
  color: var(--clay-dark);
}
.prep-direction .prose {
  max-width: 66ch;
}
.prep-direction .lines {
  margin-top: 0.35rem;
}
.prep-direction .lines li > span {
  font-weight: 700;
}
@media (min-width: 900px) {
  main:has(.prep-plan) { max-width: 54rem; }
  .stack.prep-days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}
.stack > details + details { margin-top: 0; }
details.prep-meal { background: #fffcf8; box-shadow: none; }
@media (max-width: 720px) {
  .stage-description { font-size: .9375rem; }
  details.prep-stage > summary { column-gap: .6rem; }
  details.prep-stage > summary h2 { font-size: clamp(1.25rem, 5.6vw, 1.5rem); }
  .nav :is(a, button)[aria-current="page"] { font-weight: 750; }
}
@container (max-width: 22rem) {
  details.prep-stage > summary .icon-tile { grid-row: 1; width: 2.1rem; height: 2.1rem; }
  details.prep-stage > summary::after { grid-row: 1; }
  .stage-description { grid-column: 1 / -1; margin-top: .2rem; }
}
