:root {
  --ink: #183128;
  --muted: #627168;
  --green: #1e5b45;
  --green-2: #337a5b;
  --lime: #dceba9;
  --cream: #f7f1e5;
  --paper: #fffdf8;
  --orange: #e4834f;
  --line: #ded9cd;
  --shadow: 0 16px 40px rgb(40 57 47 / 12%);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; background: white; padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

.topbar {
  height: 72px;
  padding: 0 clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  gap: 28px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgb(247 241 229 / 92%);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgb(222 217 205 / 70%);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: Georgia, serif; font-weight: 700; font-size: 19px; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 50% 50% 42% 42%; font-style: italic; }
.desktop-nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.desktop-nav a { text-decoration: none; font-size: 14px; font-weight: 700; color: var(--muted); }
.desktop-nav a.active { color: var(--green); }
.favorites-button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 12px; color: var(--green); font-weight: 800; cursor: pointer; }
.bottom-nav { display: none; }

main { min-height: calc(100vh - 72px); }
.page { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 42px 0 100px; }
.eyebrow { color: var(--green-2); text-transform: uppercase; letter-spacing: .14em; font-weight: 800; font-size: 12px; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.08; letter-spacing: -.025em; }
h1 { font-size: clamp(42px, 7vw, 86px); margin: 14px 0 20px; }
h2 { font-size: clamp(32px, 4vw, 54px); margin: 8px 0 14px; }
h3 { font-size: 22px; margin: 0 0 8px; }
.lead { font-size: clamp(17px, 2vw, 21px); color: var(--muted); max-width: 650px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; min-height: 48px; padding: 0 22px; background: var(--green); color: white; text-decoration: none; font-weight: 800; cursor: pointer; }
.button.secondary { background: transparent; color: var(--green); border: 1px solid var(--green); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: clamp(28px, 5vw, 72px); padding-top: 24px; }
.hero-copy { padding: 28px 0; }
.hero-copy h1 span { display: block; color: var(--green); font-style: italic; }
.hero-visual { min-height: 620px; position: relative; overflow: hidden; border-radius: 44% 44% 24px 24px; box-shadow: var(--shadow); background: url("./assets/jar-salads.webp") center / cover; }
.hero-visual::after { content: ""; position: absolute; inset: auto 0 0; height: 33%; background: linear-gradient(transparent, rgb(23 63 49 / 55%)); }
.hero-note { position: absolute; z-index: 2; left: 24px; bottom: 24px; color: white; max-width: 280px; font-weight: 700; }
.stat-band { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 18px; }
.stat { padding: 20px 14px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: Georgia, serif; font-size: 32px; color: var(--green); }
.stat span { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 800; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head p { color: var(--muted); max-width: 560px; }
.toolbox { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 14px; margin: 24px 0; }
.search { width: 100%; min-height: 50px; border-radius: 16px; border: 1px solid var(--line); padding: 0 18px; background: var(--paper); color: var(--ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 13px; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 700; }
.chip.active { color: white; background: var(--green); border-color: var(--green); }
.result-count { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.recipe-card { overflow: hidden; border-radius: var(--radius); background: var(--paper); box-shadow: 0 8px 28px rgb(40 57 47 / 8%); border: 1px solid rgb(222 217 205 / 70%); display: flex; flex-direction: column; min-width: 0; }
.card-image { height: 220px; background: url("./assets/jar-salads.webp") center / 220% auto no-repeat; position: relative; }
.card-number { position: absolute; left: 14px; top: 14px; border-radius: 999px; background: rgb(255 253 248 / 88%); backdrop-filter: blur(7px); padding: 6px 10px; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.favorite { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgb(255 253 248 / 92%); color: var(--green); cursor: pointer; font-size: 21px; box-shadow: 0 5px 15px rgb(0 0 0 / 12%); }
.favorite.active { color: #b83f4d; }
.card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--green-2); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
.card-body p { color: var(--muted); font-size: 14px; margin: 10px 0 16px; }
.card-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-bottom span { font-size: 13px; font-weight: 800; }
.text-button { border: 0; background: none; color: var(--green); font-weight: 900; cursor: pointer; padding: 8px 0; }

.feature-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.feature-tile { min-height: 220px; border-radius: var(--radius); padding: 26px; background: var(--green); color: white; text-decoration: none; position: relative; overflow: hidden; }
.feature-tile:nth-child(2) { background: var(--orange); }
.feature-tile:nth-child(3) { background: #9eab63; color: var(--ink); }
.feature-tile .big { font-size: 56px; font-family: Georgia, serif; opacity: .35; position: absolute; right: 18px; bottom: -6px; }

.sauce-grid, .bonus-grid, .storage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.info-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.info-card p, .info-card li { color: var(--muted); font-size: 14px; }
.info-card ul { padding-left: 18px; }
.mini-meta { display: flex; gap: 12px; color: var(--green-2); font-size: 12px; font-weight: 800; margin: 12px 0; }

.layer-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: center; margin-top: 34px; }
.jar-diagram { width: min(390px, 100%); margin: 0 auto; padding: 30px 24px 18px; border: 7px solid rgb(160 175 163 / 50%); border-top-width: 18px; border-radius: 30px 30px 80px 80px; background: rgb(255 255 255 / 55%); box-shadow: inset 0 0 0 3px rgb(255 255 255 / 65%); }
.layer { padding: 16px; text-align: center; font-weight: 900; border-top: 3px solid rgb(255 255 255 / 70%); }
.layer:first-child { border-radius: 14px 14px 0 0; }
.layer:last-child { border-radius: 0 0 45px 45px; }
.layer-5 { background: #8db956; } .layer-4 { background: #cfe09f; } .layer-3 { background: #e3c175; }
.layer-2 { background: #ef9a69; } .layer-1 { background: #d4a25c; }
.callout { border-left: 4px solid var(--orange); padding: 4px 0 4px 18px; margin: 22px 0; color: var(--muted); }
.steps { counter-reset: step; display: grid; gap: 14px; }
.step { display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: start; }
.step::before { counter-increment: step; content: counter(step); width: 38px; height: 38px; display: grid; place-items: center; background: var(--green); color: white; border-radius: 50%; font-weight: 900; }
.step p { margin: 0; color: var(--muted); }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.tab { border: 1px solid var(--line); background: var(--paper); padding: 10px 16px; border-radius: 999px; cursor: pointer; font-weight: 800; color: var(--muted); }
.tab.active { background: var(--green); border-color: var(--green); color: white; }
.bonus-card { min-height: 220px; display: flex; flex-direction: column; }
.bonus-card .number { font-family: Georgia, serif; font-size: 44px; color: var(--orange); opacity: .7; }
.bonus-card details { margin-top: auto; }
summary { cursor: pointer; font-weight: 800; color: var(--green); }

.source-list { display: grid; gap: 10px; margin-top: 30px; }
.source-list a { color: var(--green); font-weight: 700; }
.notice { background: #fff6df; border: 1px solid #e9d69d; border-radius: 16px; padding: 16px 18px; color: #674f1f; }

dialog { width: min(760px, calc(100% - 24px)); max-height: min(880px, calc(100vh - 24px)); border: 0; border-radius: 26px; padding: 0; box-shadow: 0 30px 100px rgb(0 0 0 / 30%); background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgb(18 39 31 / 72%); backdrop-filter: blur(4px); }
.dialog-close { position: sticky; z-index: 4; float: right; top: 14px; right: 14px; margin: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ink); color: white; font-size: 24px; cursor: pointer; }
.dialog-hero { height: 280px; background: url("./assets/jar-salads.webp") center / cover; }
.dialog-inner { padding: 28px clamp(22px, 5vw, 44px) 44px; }
.dialog-inner h2 { font-size: 40px; }
.dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dialog-inner li { margin-bottom: 8px; }
.layer-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.layer-list li { background: var(--lime); border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 800; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); background: var(--paper); border-radius: var(--radius); }

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .topbar { height: 64px; }
  .favorites-button { margin-left: auto; }
  main { min-height: calc(100vh - 64px); }
  .bottom-nav { position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; min-height: 68px; padding: 7px 8px max(7px, env(safe-area-inset-bottom)); background: rgb(255 253 248 / 96%); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); backdrop-filter: blur(14px); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; font-size: 10px; font-weight: 800; color: var(--muted); border-radius: 12px; }
  .bottom-nav a span { font-size: 20px; line-height: 1; }
  .bottom-nav a.active { color: var(--green); background: #edf2dd; }
  .page { padding-bottom: 110px; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-visual { min-height: 470px; order: -1; border-radius: 28px 28px 100px 28px; }
  .stat-band { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .card-grid, .sauce-grid, .bonus-grid, .storage-grid { grid-template-columns: repeat(2, 1fr); }
  .layer-layout { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .page { width: min(100% - 28px, 1180px); padding-top: 28px; }
  h1 { font-size: 48px; }
  .hero-visual { min-height: 410px; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(3) { border-right: 1px solid var(--line); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .card-grid, .sauce-grid, .bonus-grid, .storage-grid { grid-template-columns: 1fr; }
  .toolbox { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .dialog-grid { grid-template-columns: 1fr; }
  .dialog-hero { height: 210px; }
  .dialog-inner h2 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
