:root {
  --bg: #fbf8f1;
  --surface: #fffdf8;
  --surface-soft: #f3eadf;
  --ink: #1d2721;
  --muted: #69746c;
  --accent: #295240;
  --accent-strong: #183629;
  --accent-soft: #dce8de;
  --tomato: #b94d3b;
  --honey: #e8b45b;
  --line: rgba(29, 39, 33, 0.12);
  --shadow: 0 22px 50px rgba(53, 58, 48, 0.14);
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", Arial, sans-serif;
  background: linear-gradient(180deg, #f7efe4 0%, var(--bg) 48%, #eef4ef 100%);
}

body,
button,
input,
select {
  font: inherit;
}

button,
select,
input {
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.app-shell {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 18px 16px 96px;
}

.topbar,
.brand,
.hero-actions,
.drawer-actions,
.recipe-meta,
.recipe-actions,
.detail-actions,
.status-strip,
.filter-row {
  display: flex;
  align-items: center;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  justify-content: space-between;
  gap: 14px;
  min-height: 70px;
  padding: 10px 0;
  background: rgba(251, 248, 241, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  gap: 10px;
}

.brand strong {
  display: block;
  font-size: 1.15rem;
}

.brand-mark {
  display: block;
  width: 92px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(53, 58, 48, 0.08);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(53, 58, 48, 0.08);
}

.main-content {
  display: grid;
  gap: 18px;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(620px, calc(100vh - 120px));
  overflow: hidden;
  border-radius: 8px;
  background: var(--accent-strong);
  box-shadow: var(--shadow);
}

.hero-media {
  position: absolute;
  inset: 0;
  opacity: 0.66;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(24, 54, 41, 0.92), rgba(24, 54, 41, 0.3));
}

.hero-placeholder {
  display: grid;
  height: 100%;
  place-items: center;
  color: #fff;
  background: var(--accent);
  font-size: 4rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: end;
  max-width: 680px;
  padding: clamp(28px, 7vw, 72px);
  color: #fffdf8;
}

.badge {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--honey);
  font-size: 0.86rem;
  font-weight: 800;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 9vw, 6.7rem);
  line-height: 0.94;
}

.hero p {
  max-width: 58ch;
  margin-top: 18px;
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.primary-button,
.secondary-button,
.ghost-button,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
}

.primary-button {
  color: #fffdf8;
  background: var(--tomato);
}

.secondary-button {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.ghost-button {
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--line);
}

.mini-button {
  min-height: 36px;
  padding: 8px 10px;
  color: var(--accent);
  background: var(--surface-soft);
}

.mini-button.is-active {
  color: #fffdf8;
  background: var(--accent);
}

.mini-button.is-disabled,
.mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  text-decoration: line-through;
}

.load-more-actions {
  display: flex;
  justify-content: center;
  padding: 6px 0 28px;
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-field {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.filter-row,
.status-strip {
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip,
.status-pill {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--surface);
}

.filter-chip.is-active {
  color: #fffdf8;
  background: var(--accent);
}

.status-pill {
  color: var(--muted);
  font-size: 0.86rem;
}

.status-pill.is-error {
  color: var(--tomato);
}

.content-panel,
.content-section {
  display: grid;
  gap: 18px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(240px, 0.5fr);
  gap: 18px;
  align-items: end;
  margin-top: 10px;
}

.section-head h2 {
  margin-top: 6px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
}

.section-head p {
  color: var(--muted);
  line-height: 1.65;
}

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

.recipe-card,
.today-card,
.detail-card,
.planner-day,
.empty-state,
.shopping-list,
.license-gate {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(53, 58, 48, 0.08);
}

.recipe-card {
  overflow: hidden;
}

.recipe-media {
  aspect-ratio: 4 / 3;
  background: var(--surface-soft);
}

.recipe-media a {
  display: block;
  width: 100%;
  height: 100%;
}

.recipe-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.recipe-meta {
  flex-wrap: wrap;
  gap: 6px;
}

.recipe-meta span {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.recipe-title {
  font-size: 1.35rem;
  line-height: 1.14;
}

.recipe-link:hover .recipe-title {
  color: var(--accent);
}

.recipe-excerpt,
.today-copy p,
.detail-body p,
.planner-day p,
.empty-state p {
  color: var(--muted);
  line-height: 1.62;
}

.recipe-actions,
.detail-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.today-layout {
  display: grid;
  gap: 14px;
}

.today-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  overflow: hidden;
}

.today-image {
  min-height: 380px;
  background: var(--surface-soft);
}

.today-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(22px, 5vw, 48px);
}

.today-copy h2,
.detail-body h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.detail-card {
  overflow: hidden;
}

.detail-card > .ghost-button {
  margin: 14px;
}

.detail-cover {
  aspect-ratio: 16 / 7;
  background: var(--surface-soft);
}

.detail-body {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 5vw, 48px);
}

.ingredient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ingredient-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--surface-soft);
}

.ingredient-list strong {
  width: 100%;
  margin-top: 8px;
  font-size: 1rem;
}

.servings-control {
  display: grid;
  gap: 8px;
  max-width: 280px;
}

.servings-control label {
  font-weight: 800;
}

.servings-control div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
}

.servings-control input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
  background: var(--surface-soft);
}

.article-text {
  display: grid;
  gap: 12px;
  max-width: 78ch;
}

.article-text p:not(.eyebrow) {
  color: var(--ink);
  line-height: 1.72;
}

.cook-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cook-steps section {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 8px;
  background: #f7f2e9;
}

.cook-steps strong {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fffdf8;
  background: var(--accent);
}

.planner-grid {
  display: grid;
  gap: 12px;
}

.planner-day {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.planner-day-title {
  margin: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.08;
}

.planner-day h3:not(.planner-day-title) {
  font-size: 1.22rem;
  line-height: 1.15;
}

.planner-recipe {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.planner-recipe span {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-soft);
}

.planner-recipe strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  line-height: 1.16;
}

.plan-picker {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.plan-picker[hidden] {
  display: none;
}

.plan-picker div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shopping-panel,
.shopping-list {
  display: grid;
  gap: 8px;
}

.shopping-panel {
  align-items: start;
}

.shopping-list {
  padding: 16px;
}


.print-button {
  justify-self: start;
  margin-bottom: 8px;
}

.shopping-item {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.shopping-item:last-child {
  border-bottom: 0;
}

.shopping-section-heading {
  margin-top: 12px;
  padding-top: 8px;
  font-weight: 800;
}

.shopping-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.servings-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--accent-strong);
  background: var(--honey);
  font-weight: 900;
}

.empty-state {
  padding: 28px;
}

.license-gate {
  display: grid;
  gap: 18px;
  max-width: 680px;
  padding: clamp(22px, 5vw, 44px);
}

.license-gate h2 {
  margin-top: 6px;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
}

.license-gate p {
  color: var(--muted);
  line-height: 1.62;
}

.license-form {
  display: grid;
  gap: 10px;
}

.license-form label {
  font-weight: 800;
}

.license-form input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface-soft);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.license-message {
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 800;
}

.license-message.is-success {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.license-message.is-error {
  color: var(--tomato);
  background: #f8e4df;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.drawer.is-open {
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(24, 31, 27, 0);
  transition: background 180ms ease;
}

.drawer.is-open .drawer-backdrop {
  background: rgba(24, 31, 27, 0.42);
}

.drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  width: min(420px, 88vw);
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateX(-100%);
  transition: transform 180ms ease;
}

.drawer.is-open .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-head h2 {
  margin-top: 4px;
  font-size: 2rem;
}

.drawer-nav,
.drawer-card {
  display: grid;
  gap: 8px;
}

.drawer-nav a,
.drawer-card {
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.install-hint {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.bottom-nav {
  position: fixed;
  right: 16px;
  bottom: 14px;
  left: 16px;
  z-index: 30;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 620px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.bottom-link {
  display: grid;
  min-height: 42px;
  place-items: center;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
}

.bottom-link:hover {
  background: var(--accent-soft);
}

@media (max-width: 920px) {
  .recipe-grid,
  .cook-steps,
  .section-head,
  .today-card {
    grid-template-columns: 1fr;
  }

  .today-image {
    min-height: 300px;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 8px 10px 86px;
  }

  .topbar {
    min-height: 62px;
  }

  .brand .eyebrow {
    display: none;
  }

  .hero {
    min-height: min(560px, calc(100vh - 96px));
  }

  .hero h1 {
    font-size: clamp(2.7rem, 16vw, 4.6rem);
  }

  .hero-copy {
    padding: 24px;
  }

  .control-strip {
    grid-template-columns: 1fr;
  }

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

  .bottom-nav {
    display: grid;
  }
}

@media print {
  body {
    background: #fff;
  }

  .drawer,
  .topbar,
  .hero,
  .control-strip,
  .filter-row,
  .status-strip,
  .bottom-nav,
  .detail-actions a,
  .detail-actions button {
    display: none !important;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .main-content,
  .content-panel,
  .content-section {
    display: block;
  }

  .section-head {
    display: block;
    margin-bottom: 18px;
  }

  .section-head h2 {
    font-size: 28px;
  }

  .section-head p,
  .servings-badge {
    color: #000;
    background: transparent;
    padding: 0;
  }

  .shopping-list {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .shopping-item {
    min-height: 30px;
    border-bottom: 0;
  }

  .shopping-section-heading {
    margin-top: 18px;
    font-size: 16px;
  }
}
