/* Recipes section. Builds on site.css tokens; phone first. */
.top .nav a[aria-current="page"] { background: rgba(22, 48, 31, .1); color: var(--ink); }

/* Recipe header */
.rhero { background: var(--lime); padding: clamp(18px, 4vw, 40px) 0 0; }
.rhero-grid { display: grid; gap: 22px; align-items: center; padding-bottom: 28px; }
.crumbs { font-size: .86rem; font-weight: 700; color: var(--ink-2); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.rhero h1 { font-size: clamp(2.5rem, 9vw, 4.6rem); letter-spacing: -.05em; line-height: .98; }
.rhero .lede { margin-top: 16px; font-size: clamp(1.02rem, 1.5vw, 1.15rem); }
.rhero .facts { margin-top: 18px; }
.rhero-img { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); background: #e9e4d8; aspect-ratio: 1216 / 832; }
.rhero-img img { width: 100%; height: 100%; object-fit: cover; }
.stats { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--forest); color: #eaf5e3; border-radius: 24px 24px 0 0; padding: 20px 8px 14px; }
.stats > div { text-align: center; padding: 0 4px; border-right: 1px solid rgba(213, 249, 112, .14); }
.stats > div:last-of-type { border-right: 0; }
.stats b { display: block; font-size: clamp(1.4rem, 5vw, 2.1rem); letter-spacing: -.04em; line-height: 1.05; color: var(--lime); }
.stats small { font-size: .55em; margin-left: 2px; font-weight: 700; letter-spacing: 0; color: #b9cdb4; }
.stats span { display: block; font-size: .78rem; font-weight: 700; color: #b9cdb4; margin-top: 2px; }
.stats-note { grid-column: 1 / -1; text-align: center; font-size: .8rem; color: #9fb69a; margin-top: 12px; }
.stats-note a { color: var(--lime); }
@media (min-width: 900px) {
  .rhero-grid { grid-template-columns: 1fr 1.08fr; gap: 56px; padding-bottom: 44px; }
  .rhero-img { border-radius: 32px; }
  .stats { max-width: 640px; margin-left: auto; margin-right: auto; }
}

/* Body */
.rbody { display: grid; gap: 40px; padding: clamp(36px, 6vw, 72px) 0 12px; }
.rcol h2, .rnotes h2, .nutri h2, .rcta h2, .rmore h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 8px; }
.rsub { color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.rcol h3 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 22px 0 8px; }
.ing { list-style: none; margin: 0; padding: 0; }
.ing li { padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.ing li b { color: var(--ink); font-weight: 800; }
.steps { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: s; display: grid; gap: 20px; }
.steps li { counter-increment: s; position: relative; padding-left: 52px; scroll-margin-top: 90px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; background: var(--lime); color: var(--ink); font-weight: 800; display: grid; place-items: center; }
@media (min-width: 900px) { .rbody { grid-template-columns: 360px 1fr; gap: 72px; } .rcol:first-child { position: sticky; top: 90px; align-self: start; } }

.rdetail { margin: 36px auto 0; max-width: 760px; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1 / 1; background: #e9e4d8; }
.rdetail img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .rdetail { max-width: 620px; } }

.rnotes { display: grid; gap: 32px; padding: 56px 0 8px; }
.plain { margin: 8px 0 0; padding-left: 1.2em; display: grid; gap: 10px; color: var(--ink-2); }
.rnotes p { color: var(--ink-2); }
@media (min-width: 900px) { .rnotes { grid-template-columns: repeat(3, 1fr); gap: 48px; } }

/* Nutrition */
.nutri { padding: 56px 0 8px; }
.ntable-wrap { margin-top: 12px; background: var(--card); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; max-width: 760px; }
.ntable { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.ntable th, .ntable td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--line); }
.ntable td { white-space: nowrap; }
.ntable thead th { background: var(--forest); color: #eaf5e3; font-size: .78rem; letter-spacing: .04em; font-weight: 800; }
.ntable th:first-child, .ntable td:first-child { text-align: left; padding-left: 14px; }
.ntable tbody th { font-weight: 700; }
.ntable .grp th { background: var(--lime-soft); text-align: left; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); padding: 10px 14px; }
.ntable .nsub th { font-weight: 500; color: var(--muted); padding-left: 30px; font-size: .92em; }
.ntable .nsub td { color: var(--muted); }
.ntable td:last-child { color: var(--muted); padding-right: 14px; }
.ntable abbr { text-decoration: none; }
.nnote { margin-top: 14px; color: var(--muted); font-size: .88rem; max-width: 760px; }
@media (max-width: 560px) { .ntable { font-size: .82rem; } .ntable thead th { font-size: .7rem; letter-spacing: 0; } .ntable th, .ntable td { padding: 8px 6px; } .ntable th:first-child { padding-left: 10px; } .ntable .nsub th { padding-left: 20px; } .ntable td:last-child { padding-right: 10px; } }

/* App note */
.rcta { margin: 64px 0 0; background: var(--lime-soft); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); display: grid; gap: 18px; align-items: center; box-shadow: inset 0 0 0 1px var(--line); }
.rcta p { color: var(--ink-2); max-width: 36em; }
.rcta .btn { justify-self: start; }
@media (min-width: 760px) { .rcta { grid-template-columns: 1fr auto; } }

/* Cards */
.rmore { padding-top: 64px; padding-bottom: 8px; }
.rindex { padding-top: 22px; padding-bottom: 8px; }
.rindex .rgrid { margin-top: 14px; }
@media (min-width: 900px) { .rindex { padding-top: 30px; } }
@media (min-width: 1100px) {
  .rindex .rgrid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .rindex .rcard-body { padding: 14px 16px 18px; }
  .rindex .rcard-body b { font-size: 1.12rem; line-height: 1.2; }
  .rindex .rcard-meta { font-size: .86rem; }
}
.rgrid { display: grid; gap: 22px; grid-template-columns: 1fr; margin-top: 20px; }
.rcard { display: block; text-decoration: none; background: var(--card); border-radius: 24px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); transition: transform .18s ease, box-shadow .18s ease; }
.rcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.rcard-img { display: block; aspect-ratio: 3 / 2; background: #e9e4d8; overflow: hidden; }
.rcard-img img { width: 100%; height: 100%; object-fit: cover; }
.rcard-body { display: block; padding: 16px 18px 20px; }
.rcard-body b { display: block; font-size: 1.3rem; letter-spacing: -.03em; font-weight: 800; }
.rcard-cuisine { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--green-deep); margin-bottom: 4px; }
.rcard-meta { display: block; color: var(--muted); font-size: .92rem; margin-top: 4px; }
@media (min-width: 640px) { .rgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .rgrid { grid-template-columns: repeat(3, 1fr); } }

/* Top of the browse pages: short, so the recipes start on the first screen */
.rhead { background: var(--lime); padding: 18px 0 16px; }
.rhead .crumbs { margin-bottom: 8px; }
.rhead-grid { display: grid; gap: 14px; }
.rhead h1 { font-size: clamp(1.85rem, 6.4vw, 3rem); letter-spacing: -.045em; line-height: 1; }
.rhead-lede { margin-top: 8px; color: var(--ink-2); font-weight: 600; font-size: .98rem; line-height: 1.4; max-width: 44em; }
@media (min-width: 900px) {
  .rhead { padding: 30px 0 22px; }
  .rhead-grid { grid-template-columns: 1fr minmax(360px, 500px); gap: 40px; align-items: end; }
  .rhead-lede { font-size: 1.05rem; }
}
.rfilters { display: flex; gap: 8px; margin: 14px -16px 0; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.rfilters::-webkit-scrollbar { display: none; }
.rfilters .chip { flex: none; align-items: center; min-height: 38px; padding: 7px 14px; font-size: .9rem; background: rgba(255, 254, 253, .72); box-shadow: inset 0 0 0 1px rgba(22, 48, 31, .1); white-space: nowrap; }
.rfilters .chip:hover { background: var(--card); }
.rfilters .chip:last-child { margin-right: 32px; }
.rfilters .chip-lead { background: var(--ink); color: var(--lime); box-shadow: none; gap: 8px; align-items: center; }
.rfilters .chip-lead::before { content: ""; width: 14px; height: 14px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='%23d5f970'%3E%3Crect width='6' height='6' rx='1.5'/%3E%3Crect x='8' width='6' height='6' rx='1.5'/%3E%3Crect y='8' width='6' height='6' rx='1.5'/%3E%3Crect x='8' y='8' width='6' height='6' rx='1.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.rfilters .chip-lead:hover { background: var(--forest-2); }
@media (min-width: 900px) {  /* a mouse cannot easily scroll sideways: one row of whatever fits, the rest wraps out of sight (still in the page, reached from "All categories") */
  .rfilters { flex-wrap: wrap; margin: 16px -5px 0; padding: 5px; max-height: 48px; overflow: hidden; -webkit-mask-image: none; mask-image: none; }
  .rfilters .chip:last-child { margin-right: 0; }
}
main { padding-bottom: 72px; flex: 1 0 auto; }
body { display: flex; flex-direction: column; }

/* Search */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rsearch-wrap { max-width: 640px; min-height: 52px; }
.rsearch { position: relative; margin: 0; }
.rsearch input {
  -webkit-appearance: none; appearance: none; width: 100%; height: 52px; border: 0; border-radius: 999px; padding: 0 22px 0 56px;
  font: 700 1.0625rem/1 inherit; font-family: inherit; color: var(--ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='%2316301f' stroke-width='2.4'/%3E%3Cpath d='M15.5 15.5L21 21' stroke='%2316301f' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") 20px center / 22px no-repeat;
  box-shadow: 0 14px 28px -18px rgba(22, 48, 31, .6), inset 0 0 0 2px rgba(22, 48, 31, .16);
}
.rsearch input::placeholder { color: var(--muted); font-weight: 600; opacity: 1; }
.rsearch input:focus { outline: 0; box-shadow: 0 14px 28px -18px rgba(22, 48, 31, .6), inset 0 0 0 3px var(--green); }
.rresults { padding: 28px 0 8px; min-height: 50vh; }
.sline { color: var(--muted); font-weight: 700; margin-bottom: 14px; }
.slist { display: grid; gap: 10px; margin-top: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.slist + .btn { margin-top: 22px; }
.srow { display: flex; gap: 14px; align-items: center; padding: 8px; border-radius: 18px; text-decoration: none; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .18s ease; }
.srow:hover { box-shadow: var(--shadow); }
.srow img { width: 72px; height: 48px; border-radius: 12px; object-fit: cover; background: #e9e4d8; flex: none; }
.srow-t { min-width: 0; }
.srow-t b { display: block; font-size: 1.02rem; letter-spacing: -.02em; line-height: 1.2; font-weight: 800; }
.srow-t small { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }

/* Browse chips */
.rbrowse { padding-top: 48px; display: grid; gap: 30px; }
[data-browse] > .rbrowse { padding-top: 28px; }
.rbrowse h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.bgroup { scroll-margin-top: 90px; }
.rbrowse-all .chip, [data-browse] > .rbrowse .chip { min-height: 38px; padding: 7px 14px; font-size: .92rem; align-items: center; }
.rbrowse-all .chip-all { box-shadow: inset 0 0 0 1.5px var(--ink); }
@media (min-width: 900px) {
  .rbrowse-all { gap: 0; }
  .rbrowse-all .bgroup { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
  .rbrowse-all .bgroup:first-child { border-top: 0; padding-top: 0; }
  .rbrowse-all .bgroup h2 { margin: 12px 0 0; }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: baseline; gap: 7px; min-height: 42px; padding: 9px 16px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; font-weight: 700; font-size: .95rem; line-height: 1.3; }
.chip small { color: var(--muted); font-size: .82em; font-weight: 700; }
.chip:hover { background: var(--lime-soft); }
.chip-all { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.schips { margin-bottom: 6px; }
.facts a { text-decoration: underline; text-decoration-color: rgba(22, 48, 31, .35); text-underline-offset: 3px; }
.rmore-link { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.rcount { color: var(--muted); font-weight: 700; font-size: .92rem; }
.rsec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.rsec-head h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.rsec-head a { font-weight: 800; font-size: .95rem; color: var(--green-deep); text-decoration: none; }
.rsec-head a:hover { text-decoration: underline; }
@media (max-width: 639px) { .rsec-head { flex-wrap: nowrap; } .rsec-head h2 { font-size: 1.3rem; } .rsec-long { display: none; } .rsec-head a { white-space: nowrap; } }

/* Pager */
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 40px; flex-wrap: wrap; }
.pg { display: inline-flex; min-width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0 14px; border-radius: 999px; text-decoration: none; font-weight: 800; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-variant-numeric: tabular-nums; }
a.pg:hover { background: var(--lime-soft); }
.pg-cur { background: var(--ink); color: var(--lime); box-shadow: none; }
.pg-off { opacity: .4; }
.pg-nums { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pg-gap { display: grid; place-items: center; width: 20px; color: var(--muted); }
.pg-count { display: none; font-weight: 700; color: var(--muted); }
@media (max-width: 640px) { .pager { flex-wrap: nowrap; justify-content: space-between; gap: 8px; } .pg-nums { display: none; } .pg-count { display: block; text-align: center; font-size: .9rem; } .pg-step { padding: 0 12px; font-size: .92rem; } }
.rsearch input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; height: 22px; width: 22px; margin-right: -4px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%2316301f' fill-opacity='.14'/%3E%3Cpath d='M8 8l8 8M16 8l-8 8' stroke='%2316301f' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 22px no-repeat; }

/* Phone: cards as compact rows so a page of 24 is a short scroll */
@media (max-width: 639px) {
  .rgrid { gap: 12px; margin-top: 16px; }
  .rcard { display: flex; align-items: stretch; border-radius: 20px; }
  .rcard-img { flex: 0 0 38%; aspect-ratio: auto; min-height: 108px; }
  .rcard-body { align-self: center; padding: 12px 14px; min-width: 0; }
  .rcard-body b { font-size: 1.06rem; line-height: 1.2; }
  .rcard-meta { font-size: .86rem; }
}

@media (max-width: 639px), (min-width: 1100px) { .rindex .rc-pp { display: none; } }
