:root {
  --ink: #24362e;
  --green: #315b49;
  --green-soft: #dfeae3;
  --peach: #d98162;
  --peach-soft: #f3ddd3;
  --cream: #f7f2e8;
  --paper: #fffdf8;
  --line: #d9d4c9;
  --muted: #747d77;
  --shadow: 0 12px 35px rgba(36, 54, 46, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 148px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}
a { color: inherit; }

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 8%, var(--green-soft) 0 150px, transparent 151px),
    radial-gradient(circle at 2% 105%, var(--peach-soft) 0 105px, transparent 106px);
}
.hero__inner, .toolbar__inner, main, .empty {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}
.hero__inner { padding: 64px 0 54px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--peach);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1 { margin: 0; font-size: clamp(2.7rem, 8vw, 5.4rem); line-height: .98; letter-spacing: -.05em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 750;
  text-decoration: none;
}
.button--primary { border-color: var(--green); color: white; background: var(--green); }

.toolbar {
  position: sticky;
  z-index: 20;
  top: 0;
  border-block: 1px solid rgba(217, 212, 201, .9);
  background: rgba(247, 242, 232, .94);
  backdrop-filter: blur(16px);
}
.toolbar__inner { padding: 12px 0 10px; }
.search { position: relative; display: block; }
.search__icon {
  position: absolute;
  top: 50%;
  left: 16px;
  color: var(--muted);
  font-size: 1.5rem;
  transform: translateY(-52%);
}
.search input {
  width: 100%;
  height: 48px;
  padding: 0 18px 0 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  box-shadow: 0 4px 16px rgba(36, 54, 46, .04);
}
.search input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(49, 91, 73, .12); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: .83rem;
  font-weight: 700;
  text-decoration: none;
}

main { padding: 28px 0 80px; }
.section { margin: 0 0 52px; }
.section[hidden], .card[hidden] { display: none; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section__head h2 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1; letter-spacing: -.04em; }
.section__note { max-width: 540px; margin: 7px 0 0; color: var(--muted); }
.section__count { color: var(--peach); font-size: .85rem; font-weight: 800; white-space: nowrap; }
.subsection { margin-top: 28px; }
.subsection h3 { margin: 0 0 14px; font-size: 1.25rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.card--peach { border-left-color: var(--peach); }
.card__body { padding: 20px; }
.card h3, .card h4 { margin: 0 0 10px; font-size: 1.22rem; line-height: 1.2; }
.card ul { margin: 0; padding-left: 1.2em; }
.card li + li { margin-top: 3px; }
.card__image {
  width: 100%;
  height: 300px;
  padding: 10px;
  object-fit: contain;
  display: block;
  border-bottom: 1px solid var(--line);
  background: #f2eee5;
}
.card__caption { margin: 8px 0 0; color: var(--muted); font-size: .82rem; }
.nutrition-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--green);
  font-size: .88rem;
}
.nutrition-summary strong {
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: var(--green);
}
.nutrition-summary span { font-weight: 800; }
.nutrition-summary small { color: var(--muted); font-size: .75rem; }
.nutrition {
  margin: -2px 0 14px;
  border-block: 1px solid #e7e2d8;
}
.nutrition summary {
  padding: 8px 0;
  color: var(--green);
  cursor: pointer;
  font-size: .83rem;
  font-weight: 800;
  list-style-position: inside;
}
.nutrition__content { padding: 1px 0 9px; }
.nutrition__row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 11px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f3f5f1;
  font-size: .78rem;
}
.nutrition__row + .nutrition__row { margin-top: 6px; }
.nutrition__row strong { width: 100%; color: var(--ink); }
.nutrition__row .nutrition__meta {
  width: 100%;
  color: var(--muted);
}
.ingredients { display: grid; gap: 7px; margin: 0; }
.ingredients div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding-bottom: 7px; border-bottom: 1px solid #ebe7df; }
.ingredients div:last-child { padding-bottom: 0; border-bottom: 0; }
.ingredients dt, .ingredients dd { margin: 0; }
.ingredients dd { color: var(--green); font-weight: 800; }
.groups { display: grid; gap: 12px; }
.group { padding: 12px 14px; border-radius: 12px; background: #f6f3eb; }
.group strong { display: block; margin-bottom: 4px; color: var(--green); }
.group p { margin: 0; font-size: .94rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th { padding: 13px 15px; color: white; background: var(--green); text-align: left; }
td { padding: 12px 15px; border-top: 1px solid var(--line); }
tbody tr:nth-child(even) { background: #f6f4ed; }
.empty { padding: 60px 0 100px; color: var(--muted); text-align: center; }
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 1.25rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: var(--shadow);
}

@media (max-width: 760px) {
  html { scroll-padding-top: 156px; }
  .hero__inner { padding: 44px 0 38px; }
  .grid, .grid--three { grid-template-columns: 1fr; }
  .section { margin-bottom: 40px; }
  .section__head { align-items: start; flex-direction: column; gap: 5px; }
  .card__image { height: 290px; }
  .table-wrap { overflow-x: visible; }
  .table-wrap table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: .72rem;
    line-height: 1.15;
  }
  .table-wrap th,
  .table-wrap td {
    padding: 10px 5px;
    overflow-wrap: anywhere;
    text-align: center;
  }
  .table-wrap th:first-child,
  .table-wrap td:first-child {
    padding-left: 9px;
    text-align: left;
  }
  .table--tea th:nth-child(1) { width: 29%; }
  .table--tea th:nth-child(2),
  .table--tea th:nth-child(3) { width: 13%; }
  .table--tea th:nth-child(4) { width: 22%; }
  .table--tea th:nth-child(5) { width: 23%; }
  .table--grind th:first-child { width: 62%; }
  .table--grind th:last-child { width: 38%; }
}

@media print {
  .toolbar, .hero__actions, .to-top { display: none; }
  .card { break-inside: avoid; box-shadow: none; }
  body { background: white; }
}
