/* The recipe page (/recipes), on top of site.css. Black and white like the app, with the food photos as the colour,
   and Nutri-Score's own colours on the grades. */

.r-filters { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 18px; }
.r-filters[hidden] { display: none; }
.r-group { display: flex; flex-wrap: wrap; gap: 8px; }
.r-group button {
  min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  font: 400 15px/1 Archivo, system-ui, sans-serif; cursor: pointer;
}
.r-group button:hover { border-color: var(--fg3); }
.r-group button[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.r-group button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.r-count { margin: 0 0 14px; }
.r-none { color: var(--fg2); }

.r-grid { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.r-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; min-width: 0; }
.r-card[hidden] { display: none; }
.r-pic { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: #0b0c0d; }
.r-plain { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: var(--surface2); color: var(--fg3); }
.r-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.r-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.r-name { font-size: 19px; font-weight: 700; font-stretch: 100%; line-height: 1.25; letter-spacing: -0.01em; margin: 0; }
.r-tags { margin: 0; color: var(--fg3); font-size: 14px; }
.r-macros { margin: 0; color: var(--fg2); font-size: 14px; font-family: 'DM Mono', ui-monospace, monospace; }

/* Where a portion's calories come from, like the app's bar under each food. The widths are in the SVG; the colours
   and the key above the cards are here. */
.r-bar { display: block; width: 100%; max-width: 220px; height: 6px; border-radius: 3px; overflow: hidden; margin: 2px 0; }
.r-bar .r-p, .r-dot.r-p { fill: var(--protein); background: var(--protein); }
.r-bar .r-c, .r-dot.r-c { fill: var(--carbs); background: var(--carbs); }
.r-bar .r-f, .r-dot.r-f { fill: var(--fat); background: var(--fat); }
.r-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; margin: 0 0 14px; }
.r-meta .r-count { margin: 0; }
.r-key { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--fg3); font-size: 14px; }
.r-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 8px; }
.r-dot:first-child { margin-left: 0; }

.grade { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; font: 700 15px/1 Archivo, system-ui, sans-serif; }
.grade-a { background: #038141; color: #fff; }
.grade-b { background: #85BB2F; color: #11161A; }
.grade-c { background: #FECB02; color: #11161A; }
.grade-d { background: #EE8100; color: #11161A; }
.grade-e { background: #E63E11; color: #fff; }

.r-card details { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.r-card summary { cursor: pointer; font-weight: 500; min-height: 32px; display: flex; align-items: center; }
.r-card summary:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }
.r-card h3 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); margin: 16px 0 6px; }
.r-detail { margin: 4px 0 0; color: var(--fg2); font-size: 14px; }
.r-items { list-style: none; margin: 0; padding: 0; }
.r-items li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.r-grams { color: var(--fg2); font-family: 'DM Mono', ui-monospace, monospace; white-space: nowrap; }
.r-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; }
