:root {
  color-scheme: light;
  --ink: #333;
  --muted: #647169;
  --paper: #fffdf8;
  --panel: #ffffff;
  --sage: #dce8d4;
  --leaf: #2f6f4e;
  --leaf-dark: #111;
  --tomato: #d85f47;
  --corn: #eee;
  --sky: #d9edf2;
  --shadow: 0 16px 40px rgba(54, 72, 58, 0.12);
  --line: #d0d0d0;
  --night: #000;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid #f0f0f0;
  backdrop-filter: blur(14px);
}

.brand,
nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 58%, rgba(255, 255, 255, 0.65) 59%),
    conic-gradient(from 50deg, var(--leaf), var(--corn), var(--tomato), var(--leaf));
  box-shadow: inset 0 0 0 2px rgba(36, 48, 43, 0.1);
}

nav {
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  background: var(--sage);
  color: var(--leaf-dark);
  outline: none;
}

main {
  overflow: hidden;
}

.page-hero {
  padding: clamp(46px, 7vw, 96px) clamp(18px, 4vw, 56px) clamp(34px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 980px;
  font-size: clamp(2.4rem, 7vw, 5.1rem);
}

.recipes-hero {
  background: #fafafa;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 66px);
  padding: clamp(36px, 6vw, 82px) clamp(18px, 4vw, 56px) 28px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 740px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--tomato);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  color: #222;
}

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow),
.section-heading p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
}

.button.primary {
  background: var(--night);
  border: 1px solid var(--night);
  color: #fff;
}

.button.secondary {
  background: transparent;
  color: var(--leaf-dark);
}

img {
  border-radius: 5px; 
}

.hero-photo figcaption {
  min-height: 48px;
  padding: 12px 16px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.92rem;
}

.quick-panel,
.section {
  padding-inline: clamp(18px, 4vw, 56px);
}

.quick-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-block: 22px;
  background: var(--leaf-dark);
  color: #fff;
}

.quick-panel article {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 3px 12px;
  align-items: center;
}

.panel-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--corn);
  color: var(--ink);
  font-weight: 900;
}

.quick-panel h2 {
  font-size: 1rem;
}

.quick-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.section {
  padding-block: clamp(52px, 7vw, 92px);
}

.section-heading {
  display: grid;
  gap: 10px;
  max-width: 900px;
  margin-bottom: 26px;
}

.section-heading p {
  margin: 0;
}

.week-grid,
.recipe-grid,
.tool-list {
  display: grid;
  gap: 14px;
}

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

.day-card,
.recipe-card,
.shopping-board article,
.save-box,
.tool-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(54, 72, 58, 0.07);
}

.day-card {
  display: flex;
  min-height: 245px;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
}

.day-card.weekend {
  background: var(--sky);
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.home-page .week-grid .meal {
  text-align: center;
}

.home-page .week-grid .day-card {
  min-height: 190px;
  gap: 12px;
  padding: 16px;
}

.home-page .week-grid .day-head {
  margin-top: 8px;
}

.home-page #schema .button {
  min-width: 232px;
}

.day-head span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--leaf-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.meal {
  margin: 0;
  color: var(--leaf-dark);
  font-size: 1.2rem;
  font-weight: 850;
  line-height: 1.25;
}

ul {
  display: grid;
  gap: 8px;
  margin: auto 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.recipes {
  border-block: 1px solid var(--line);
}

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

.recipe-card {
  overflow: hidden;
}

.recipe-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.recipe-card div {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.recipe-card p {
  margin: 0;
  color: var(--muted);
}

.recipe-card .tag {
  justify-self: start;
  color: var(--ink);
  background: var(--corn);
}

.recipe-library {
  background: var(--paper);
}

.recipe-library.alt-band {
  background: #f4f8ef;
  border-block: 1px solid var(--line);
}

.recipe-filter {
  display: grid;
  gap: 20px;
  margin-bottom: 28px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(220, 232, 212, 0.75), rgba(255, 255, 255, 0) 52%),
    var(--panel);
  box-shadow: 0 12px 30px rgba(54, 72, 58, 0.08);
}

.filter-top {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: end;
}

.filter-top h2 {
  font-size: clamp(1.55rem, 3vw, 2.4rem);
}

.filter-search {
  display: grid;
  gap: 7px;
  min-height: auto;
  color: var(--leaf-dark);
  font-weight: 850;
}

.filter-search input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.filter-search input::placeholder {
  color: #8b968f;
}

.filter-groups {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 14px;
}

.recipe-filter fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.recipe-filter legend {
  padding: 0 6px;
  color: var(--leaf-dark);
  font-weight: 900;
}

.filter-chips,
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: default;
}

.filter-chip span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--leaf-dark);
  font-size: 0.8rem;
  line-height: 1;
}

.filter-chip.is-included {
  border-color: rgba(47, 111, 78, 0.35);
  background: var(--leaf-dark);
  color: #fff;
}

.filter-chip.is-included span {
  background: var(--corn);
  color: var(--ink);
}

.filter-chip.is-excluded {
  border-color: rgba(216, 95, 71, 0.42);
  background: #fff4f1;
  color: #8c3729;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(216, 95, 71, 0.55);
}

.filter-chip.is-excluded span {
  background: var(--tomato);
  color: #fff;
}

.filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 2px;
}

.active-filters span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--corn);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 850;
}

.filter-footer p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.all-recipes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.full-recipe-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 300px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(54, 72, 58, 0.07);
  margin-bottom: 13px;
}

.full-recipe-card p {
  margin: 0;
  color: var(--muted);
}

.full-recipe-card .tag {
  justify-self: start;
  color: var(--ink);
  background: var(--corn);
}

.full-recipe-card dl {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
}

.full-recipe-card dl div {
  display: grid;
  gap: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.full-recipe-card dt {
  color: var(--leaf);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.full-recipe-card dd {
  margin: 0;
  color: var(--muted);
}

.full-recipe-card h3 a,
.recipe-link,
.back-link {
  color: inherit;
  text-decoration-color: rgba(47, 111, 78, 0.35);
  text-underline-offset: 3px;
}

.recipe-link,
.back-link {
  color: var(--leaf-dark);
  font-weight: 850;
}

.recipe-detail {
  padding: clamp(34px, 6vw, 82px) clamp(18px, 4vw, 56px);
}

.recipe-detail-hero {
  display: grid;
  gap: 14px;
  max-width: 980px;
  margin-bottom: clamp(28px, 5vw, 56px);
}

.recipe-detail-hero > p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.recipe-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--leaf-dark);
  font-size: 0.86rem;
  font-weight: 850;
}

.recipe-detail-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: start;
}

.ingredients-panel,
.method-panel,
.recipe-notes article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(54, 72, 58, 0.07);
}

.ingredients-panel h2,
.method-panel h2,
.recipe-notes h2 {
  font-size: 1.25rem;
}

.ingredient-list,
.method-list {
  margin: 16px 0 0;
  color: var(--muted);
}

.method-list {
  display: grid;
  gap: 12px;
  padding-left: 22px;
}

.recipe-notes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.recipe-notes p {
  margin: 10px 0 0;
  color: var(--muted);
}

.imported-recipe-content {
  display: grid;
  gap: 18px;
  max-width: 920px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(54, 72, 58, 0.07);
}

.imported-recipe-content h2,
.imported-recipe-content h3,
.imported-recipe-content h4 {
  margin: 12px 0 0;
  color: var(--leaf-dark);
  line-height: 1.15;
}

.imported-recipe-content h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.imported-recipe-content h3,
.imported-recipe-content h4 {
  font-size: 1.15rem;
}

.imported-recipe-content p,
.imported-recipe-content ul,
.imported-recipe-content ol {
  margin: 0;
  color: var(--muted);
}

.imported-recipe-content ul,
.imported-recipe-content ol {
  gap: 9px;
  padding-left: 22px;
}

.imported-recipe-content a {
  color: var(--leaf-dark);
  font-weight: 750;
  text-underline-offset: 3px;
}

.recipe-kids {
  display: grid;
  gap: 12px;
  max-width: 920px;
  margin-top: 18px;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sky);
  box-shadow: 0 10px 26px rgba(54, 72, 58, 0.07);
}

.recipe-kids h2 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.recipe-kids p,
.recipe-kids ul {
  margin: 0;
  color: var(--muted);
}

.recipe-kids ul {
  gap: 8px;
  padding-left: 22px;
}

.shopping-section {
  background:
    linear-gradient(90deg, rgba(216, 95, 71, 0.07), transparent 42%),
    var(--paper);
}

.shopping-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.shopping-board article,
.save-box {
  padding: 18px;
}

.shopping-board h3,
.save-box h3 {
  margin-bottom: 14px;
}

label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 34px;
  color: var(--muted);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--leaf);
}

.save-box {
  background: var(--leaf-dark);
  color: #fff;
}

.save-box p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

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

.tool-list article {
  padding: 20px;
  border-top: 6px solid var(--tomato);
}

.tool-list article:nth-child(2) {
  border-top-color: var(--leaf);
}

.tool-list article:nth-child(3) {
  border-top-color: var(--corn);
}

.tool-list article:nth-child(4) {
  border-top-color: #5ca6b8;
}

.tool-list p {
  margin: 10px 0 0;
  color: var(--muted);
}

.tips-page .quick-panel,
.tips-page .tool-list,
.tips-page .week-grid,
.tips-page .shopping-board {
  grid-template-columns: minmax(0, 820px);
  justify-content: start;
}

.tips-page .quick-panel article,
.tips-page .tool-list article,
.tips-page .day-card,
.tips-page .shopping-board article,
.tips-page .save-box {
  max-width: 820px;
}

.planner-shell {
  margin-top: 5vh;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 56px) clamp(44px, 7vw, 90px);
}

.planner-heading {
  display: grid;
  gap: 10px;
  max-width: 920px;
  margin-bottom: 22px;
}

.planner-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.planner-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
}

.planner-actions button,
.recipe-add-button {
  font: inherit;
}

.planner-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.recipe-picker,
.week-panel,
.shopping-list {
  grid-column: 1 / -1;
}

.planner-panel,
.planner-day,
.shopping-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(54, 72, 58, 0.07);
}

.planner-panel {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2.5vw, 22px);
}

.week-panel,
.shopping-list {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

  
.shopping-list {
  margin-top: 13vh;
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-title-row h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.planner-count {
  min-width: max-content;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.planner-days {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.recipe-button-list,
.shopping-list-groups {
  display: grid;
  gap: 10px;
}

.recipe-search {
  display: grid;
  gap: 6px;
  max-width: 360px;
  margin: 8px auto 4px;
}

.recipe-search span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.recipe-search input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

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

.recipe-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.recipe-pagination button {
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.recipe-pagination button:hover,
.recipe-pagination button:focus-visible,
.recipe-pagination button.is-current {
  border-color: rgba(47, 111, 78, 0.45);
  background: var(--sage);
  outline: none;
}

.planner-day {
  position: relative;
  cursor: grab;
}

.planner-day .day-head {
  justify-content: flex-end;
}

.planner-day-name {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.planner-day:active {
  cursor: grabbing;
}

.planner-day.is-empty {
  border-style: dashed;
  cursor: default;
  justify-content: center;
  text-align: center;
}

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

.planner-day.is-empty .planner-day-name {
  color: var(--leaf-dark);
  font-size: 1.05rem;
}

.day-random-button {
  justify-self: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(47, 111, 78, 0.35);
  border-radius: 8px;
  background: #fff;
  color: var(--leaf-dark);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
}

.day-random-button:hover,
.day-random-button:focus-visible {
  background: var(--sage);
  outline: none;
}

.planner-day.is-drop-target {
  border-color: var(--leaf);
  background: var(--sage);
  outline: 3px solid rgba(47, 111, 78, 0.16);
}

.planner-day.is-remove-pending {
  border-color: rgba(216, 95, 71, 0.64);
  background: #fff4f1;
  outline: 3px solid rgba(216, 95, 71, 0.18);
  opacity: 0.78;
}

.planner-day.is-remove-pending::after {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 5px 8px;
  border-radius: 999px;
  background: #8c3729;
  color: #fff;
  content: "Släpp för att ta bort";
  font-size: 0.76rem;
  font-weight: 750;
}

.planner-day .meal a {
  color: var(--leaf-dark);
  text-decoration: none;
}

.planner-day .meal a:hover,
.planner-day .meal a:focus-visible {
  text-decoration-color: rgba(47, 111, 78, 0.35);
  text-decoration-line: underline;
  text-underline-offset: 3px;
}

.empty-list {
  margin: 0;
  color: var(--muted);
}

.recipe-add-button {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: grab;
  text-align: left;
}

.recipe-button-image {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: contain;
}

.recipe-button-image.is-empty {
  display: block;
  border: 1px dashed var(--line);
}

.recipe-add-button:active {
  cursor: grabbing;
}

.recipe-add-button:hover,
.recipe-add-button:focus-visible {
  border-color: rgba(47, 111, 78, 0.45);
  background: var(--sage);
  outline: none;
}

.recipe-add-button span {
  min-width: 0;
  font-weight: 900;
  line-height: 1.18;
}

.meal-card-image {
  width: 100%;
  height: 118px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.shopping-group {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.shopping-group h3 {
  margin-bottom: 4px;
  color: var(--leaf-dark);
}

.shopping-group label {
  min-height: 30px;
}

footer {
  padding: 28px clamp(18px, 4vw, 56px);
  background: #fff;
}

footer p {
  margin: 0;
}

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

  .week-grid,
  .recipe-grid,
  .all-recipes-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;
  }

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

  .planner-days,
  .recipe-button-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

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

  .hero {
    padding-top: 30px;
  }

  .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;
  }

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

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

@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%;
  }
}

@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;
  }
}
