@media (max-width: 980px) {
  .recipes .recipe-card:nth-child(n + 3) {
    display: none;
  }

  .week-grid,
  .recipe-grid,
  .all-recipes-grid,
  .porridge-recipe-grid,
  .recipe-notes,
  .filter-groups,
  .shopping-board,
  .tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    grid-column: 1 / -1;
  }

  .recipe-detail-layout {
    grid-template-columns: 1fr;
  }

  .filter-top {
    grid-template-columns: 1fr;
  }

  .recipe-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .recipe-type-filter,
  .recipe-type-filter-options {
    justify-content: flex-start;
  }

  .planner-layout {
    grid-template-columns: 1fr;
  }

  .planner-days,
  .recipe-button-list {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 720px) {
  .line-fit-word {
    margin-right: 0;
  }

  .topbar {
    position: static;
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }

  .recipe-static-header {
    min-height: 71px;
  }

  .recipe-steps,
  .recipe-steps ol,
  .imported-recipe-content > ol {
    --recipe-step-done-size: 1.18rem;
    --recipe-step-active-size: 1.34rem;
  }

  .recipe-steps ol,
  .imported-recipe-content > ol {
    gap: 12px;
  }

  .recipe-steps > ol > li,
  .recipe-substeps > li,
  .imported-recipe-content > ol > li {
    padding-left: 34px;
  }

  .recipe-steps > ol > li::before,
  .recipe-substeps > li::before,
  .imported-recipe-content > ol > li::before {
    top: 0.34em;
    width: 17px;
    height: 17px;
  }

  .recipe-steps > ol > li::after,
  .recipe-substeps > li::after,
  .imported-recipe-content > ol > li::after {
    top: calc(0.34em + 3px);
    left: 5px;
    width: 7px;
    height: 10px;
  }

  nav {
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-left: auto;
  }

  .account-aware-header.is-account-signed-in nav {
    justify-content: flex-start;
    margin-left: 0;
  }

  nav a[href="/tips"],
  nav a[href="/tips/"] {
    padding-right: 0;
  }

  nav .nav-current {
    display: none;
  }

  body:not(.home-page) .topbar .brand > span {
    font-size: 1.55rem !important;
  }

  .home-page .topbar {
    border-bottom: 0 !important;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .hero,
  .quick-panel,
  .week-grid,
  .recipe-grid,
  .all-recipes-grid,
  .porridge-recipe-grid,
  .recipe-notes,
  .filter-groups,
  .shopping-board,
  .tool-list {
    grid-template-columns: 1fr;
  }

  .tips-list-section .section-heading {
    margin-inline: 0;
    text-align: left;
  }

  .mat-recipe-form-grid {
    grid-template-columns: 1fr;
  }

  .food-cost-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .food-cost-row > div {
    grid-column: 1 / -1;
  }

  .tips-list-section .meal-tips-list {
    grid-template-columns: 1fr;
    margin-inline: 0;
  }

  .tips-page .page-hero {
    border-bottom: 0;
  }

  .tips-page .tips-list-section {
    padding-top: 34px;
  }

  .meal-tips-list {
    gap: 10px;
  }

  .meal-tips-list li {
    background: #fff;
    box-shadow: none;
    margin-bottom: 24px;
  }

  .hero {
    padding-top: 30px;
  }

  #page-recept #recipes-title {
    font-size: clamp(1.8rem, 7.8vw, 2.85rem);
    line-height: 1;
    white-space: nowrap;
  }

  #page-recept .recipes-hero .eyebrow {
    display: none;
  }

  #page-recept .recipe-photo-link img {
    aspect-ratio: 20 / 9;
  }

  #page-recept .full-recipe-card {
    min-height: 0;
  }

  #page-recept .full-recipe-card-content {
    gap: 0;
    padding: 10px 12px 11px;
  }

  #page-recept .full-recipe-card-content h3 {
    line-height: 1.15;
    text-align: center;
  }

  #page-recept .full-recipe-card-content p {
    display: none;
  }

  #page-recept .custom-recipe-detail-head,
  #page-recept .custom-recipe-detail-grid {
    grid-template-columns: 1fr;
  }

  .home-page .hero {
    position: relative;
    gap: 18px;
    align-content: start;
    min-height: calc(100svh - 56px);
    padding-top: 0;
    padding-bottom: clamp(18px, 5svh, 44px);
    border-bottom: 0;
  }

  .home-page .hero-copy {
    padding-top: 0;
  }

  .home-page .hero > img {
    order: -1;
    width: calc(100% + (clamp(18px, 4vw, 56px) * 2));
    height: clamp(140px, 24svh, 230px);
    max-width: none;
    margin-inline: calc(clamp(18px, 4vw, 56px) * -1);
    border-radius: 0;
    object-fit: cover;
    object-position: center 42%;
  }

  .home-page .hero h1 {
    line-height: 1.04;
  }

  .home-page .hero h1 + p {
    margin-top: 8px;
  }

  .mobile-hide {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  .mobile-uppercase {
    display: none;
  }

  .mobile-ampersand {
    font-size: 0;
  }

  .mobile-ampersand::after {
    content: "&";
    font-size: 1rem;
  }

  .home-page .hero .eyebrow {
    display: none;
  }

  @media (min-height: 760px) {
    .home-page .topbar {
      padding-top: 14px;
      padding-bottom: 14px;
    }

    .home-page .hero {
      min-height: auto;
      padding-bottom: 28px;
    }

    .home-page .hero > img {
      height: clamp(230px, 31svh, 360px);
    }
  }

  .hero-photo {
    min-height: 340px;
  }

  .hero-photo img {
    min-height: 292px;
  }

  .quick-panel article {
    grid-template-columns: 42px 1fr;
  }

  .panel-icon {
    width: 42px;
    height: 42px;
  }

  .filter-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-footer p {
    text-align: left;
  }

  .planner-shell {
    padding-top: 28px;
  }

  .account-panel-head,
  .account-form,
  .account-signed-in {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .account-panel-head,
  .account-inline,
  .account-signed-in {
    flex-direction: column;
  }

  .account-status {
    min-width: 0;
  }

  .account-actions .button,
  .account-links .button,
  .account-signed-in .button {
    width: 100%;
  }

  .account-plan-toggle {
    width: 100%;
  }

  .account-app-info {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .account-app-info p {
    max-width: 100%;
  }

  .today-recipe-panel {
    grid-template-columns: 1fr;
  }

  .today-recipe-image img {
    min-height: 240px;
    max-height: 360px;
  }

  .planner-actions .button {
    width: auto;
  }

  .week-panel > .panel-title-row {
    display: grid;
    gap: 10px;
    justify-items: stretch;
  }

  .planner-view-options,
  .week-panel .planner-actions {
    justify-content: stretch;
  }

  .planner-view-options label {
    flex: 1 1 100%;
    justify-content: center;
  }

  #fill-week {
    order: 1;
    justify-self: end;
  }

  .planner-days {
    order: 2;
  }

  #clear-week,
  #print-plan {
    order: 3;
    justify-self: stretch;
  }

  #fill-week.is-mobile-hidden,
  #clear-week.is-mobile-hidden,
  #print-plan.is-mobile-hidden {
    display: none;
  }

  .planner-days,
  .recipe-button-list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 760px) {
  .planner-days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .recipe-picker {
    min-height: 320px;
  }

  .recipe-button-list {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .planner-days {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
 
  .move-me-if-larger {
  padding: 4vh 0 0 8.4rem;
  max-width: 740px;
}

}

@media (max-height: 879px), (min-width: 1180px) {

  .planner-day:not(.is-empty) {
    gap: 0;
    min-height: 144px;
    padding: 0;
  }

  .planner-day.is-empty {
    min-height: 144px;
  }

  .planner-day:not(.is-empty) .meal-card-image {
    width: 100%;
    margin: 0;
  }

  .planner-day .meal {
    position: absolute;
    top: 144px;
    left: 0;
    z-index: 1;
    max-width: calc(100% - 18px);
    padding: 7px 12px;
    border-radius: 0 8px 0 0;
    background: #fff;
    box-shadow: 0 6px 14px rgba(54, 72, 58, 0.12);
    transform: translateY(-100%);
  }

  .planner-day ul {
    display: none;
  }

  .planner-day-name {
    font-size: .84rem;
    font-weight: 400;
    border-radius: 8px 0 0 8px;
    display: block;
  }
}


@media (min-width: 1180px) and (max-height: 1500px) {
  .planner-day:not(.is-empty) .day-head {
    top: -5px;
  }
}


@media (min-width: 1180px) and (min-height: 1501px) {

  .week-panel {
  margin-top: 3vh;
}

  .recipe-picker {
    margin-top: 5vh;
  }

  .planner-days {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .planner-day:not(.is-empty),
  .planner-day.is-empty {
    min-height: 180px;
  }

  .planner-day:not(.is-empty) .meal-card-image {
    height: 180px;
  }

  .planner-day .meal {
    top: 172px;
    border-radius: 0 3px 3px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .recipe-button-list {
    transition: none;
  }

  .recipe-button-list.is-filtering {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 430px) {
  .button {
    width: 100%;
  }

  .day-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .planner-day .day-head {
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
  }

  .planner-day.is-empty .day-head {
    justify-content: center;
 }

  .planner-actions .button {
    width: 100%;
  }
}

.account-logout-actions .button {
  flex: 0 0 auto;
  width: auto;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  .topbar,
  .planner-heading,
  .planner-actions,
  .recipe-picker,
  footer {
    display: none;
  }

  .planner-shell {
    padding: 0;
  }

  .planner-layout {
    grid-template-columns: 1fr;
  }

  .planner-panel,
  .planner-day,
  .shopping-group {
    box-shadow: none;
  }

  .home-page {
    background: #fff;
  }

  .home-page .hero,
  .home-page #recept,
  .home-page footer {
    display: none;
  }

  .home-page main {
    overflow: visible;
  }

  .home-page #schema {
    padding: 0;
    border: 0;
  }

  .home-page #schema > div:first-child {
    margin-bottom: 5mm;
  }

  .home-page #schema h2 {
    font-size: 20pt !important;
  }

  .home-page #schema button {
    display: none;
  }

  .home-page .week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5mm;
  }

  .home-page .week-grid > p {
    display: none;
  }

  .home-page .day-card {
    min-height: 0;
    break-inside: avoid;
    page-break-inside: avoid;
    gap: 3.5mm;
    padding: 5mm;
    border-color: #bdbdbd;
    box-shadow: none;
  }

  .home-page .day-head {
    align-items: flex-start;
    justify-content: center;
    text-align: center;
  }

  .home-page .day-head h3 {
    font-size: 13pt;
  }

  .home-page .day-head span,
  .home-page .tag {
    min-height: 0;
    padding: 1.5mm 3mm;
    font-size: 8pt;
  }

  .home-page .meal {
    font-size: 11pt;
    line-height: 1.2;
  }

  .home-page ul {
    gap: 1.5mm;
    margin: 0;
    padding-left: 5mm;
    font-size: 9pt;
    line-height: 1.25;
  }

  .planner-page .planner-shell {
    margin-top: 0;
  }

  .planner-page .shopping-list {
    display: none;
  }

  .planner-page .planner-days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4mm;
  }

  .planner-page .planner-day {
    min-height: 0;
    gap: 3mm;
    padding: 4mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .planner-page .meal-card-image {
    display: none;
  }

  .planner-page .meal {
    font-size: 10.5pt;
  }

  .planner-page .planner-day ul {
    gap: 1mm;
    margin: 0;
    font-size: 8.5pt;
    line-height: 1.2;
  }
}
