/* recipes.css — «Рецепты и статьи» (logic/NEW_MAP_5.md §12 B1–B3) and the recipe card shared with recipe.html (§13 B4),
   build P6 023, 01.10.2026.
   R35 P12 card (photo, title, meta, round ↗) · R22/R23 plates spread in the head · chips — the spice pills of the home (R38 G7) ·
   phone R61: tabs and the filter as pill ribbons, cards one per row. Motion: transform and opacity only. */

[data-rx] [hidden], .rp [hidden] { display: none !important; }

/* ---------- head: title, tabs (12.B1), the plates spread (R22 · R23) ---------- */
.rx-head { padding-block: clamp(24px, 2.6vw, 52px) clamp(18px, 2vw, 40px); }
.rx-head__in { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 96px); align-items: center; }
.rx-head h1 { font-size: var(--fs-h1); margin-top: 22px; line-height: 1.02; }
.rx-head h1 em { font-style: normal; color: var(--clay); }
.rx-tabs { display: inline-flex; gap: 6px; padding: 6px; margin-top: clamp(24px, 2.4vw, 44px); background: var(--white); border: 1.5px solid var(--line);
  border-radius: var(--r-pill); }
.rx-tab { display: inline-flex; align-items: center; gap: 6px; min-height: clamp(54px, 3.4vw, 70px); padding: 0 clamp(22px, 1.8vw, 38px); border-radius: var(--r-pill);
  font-family: var(--f-acc); font-weight: 700; font-size: clamp(20px, .9vw + 8px, 32px); line-height: 1; transition: transform .25s var(--ease); }
.rx-tab:hover { background: var(--cream); }
.rx-tab:active { transform: scale(.97); }
.rx-tab[aria-selected="true"] { background: var(--sun); }
.rx-tab sup { font-family: var(--f-txt); font-size: .5em; font-weight: 600; color: var(--ink-2); }

.rx-spread { position: relative; height: clamp(300px, 27vw, 620px); }
.rx-spread::before { content: ""; position: absolute; inset: 9% 2% 1% 8%; border-radius: 50%; background: var(--butter); }
.rx-plate { position: absolute; display: block; padding: clamp(6px, .5vw, 12px); background: var(--white); border-radius: var(--r-card);
  box-shadow: 0 30px 50px -34px rgba(45, 41, 38, .55); transform: rotate(var(--r, 0deg)); }
.rx-plate img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-plate); }
.rx-plate--a { width: 50%; left: 25%; top: 0; --r: -3deg; z-index: 1; }
.rx-plate--b { width: 37%; left: 3%; bottom: 0; --r: 4deg; z-index: 3; }
.rx-plate--c { width: 34%; right: 1%; bottom: 7%; --r: -2deg; z-index: 2; }
.rx-spread__dr { position: absolute; right: 7%; top: -2%; width: 16%; mix-blend-mode: multiply; transform: rotate(16deg); }

/* ---------- 12.B2 · filter chips (the spice pills of the home: tinted ovals, a little turned) ---------- */
.rx-bar { padding-block: 4px clamp(26px, 2.4vw, 48px); }
.rx-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 52px; padding: 10px 26px; border-radius: 50% / 60%; background: var(--c, var(--sand));
  font-family: var(--f-acc); font-weight: 700; font-size: clamp(18px, .7vw + 8px, 27px); line-height: 1; transform: rotate(var(--r, 0deg));
  transition: transform .3s var(--ease); }
.chip sup { font-family: var(--f-txt); font-size: .56em; font-weight: 600; opacity: .72; }
.chip:hover { transform: rotate(0deg) scale(1.04); }
.chip:active { transform: rotate(0deg) scale(.97); }
.chip--all { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-pill); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip:disabled { opacity: .4; cursor: not-allowed; transform: rotate(var(--r, 0deg)); }

/* ---------- 12.B3 · grid: R35 P12 cards ---------- */
.rx-list { padding-bottom: var(--sec); }
.rgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.3vw, 28px); grid-auto-flow: dense; }
.rgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rcard { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 10px 10px 16px; background: var(--white);
  border: 1px solid #efe5d6; border-radius: var(--r-card); transition: transform .35s var(--ease); }
.rcard:hover { transform: translateY(-4px); }
.rcard__ph { display: block; position: relative; aspect-ratio: 1.12; border-radius: var(--r-plate); overflow: hidden; background: var(--sand); }
.rcard__ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform .6s var(--ease); }
.rcard:hover .rcard__ph img { transform: scale(1.04); }
.rcard__t { padding: 0 8px; font-family: var(--f-acc); font-weight: 700; font-size: var(--fs-h3); line-height: 1.16; }
.rcard:hover .rcard__t { color: var(--clay); }
.rcard__f { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; padding-left: 8px; }
.rcard__m { font-size: 14px; line-height: 1.4; color: var(--ink-2); padding-bottom: 4px; }
.rcard__go { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--white); border: 1.5px solid var(--line);
  transition: transform .3s var(--ease); }
.rcard__go .ico { width: 22px; height: 22px; }
.rcard:hover .rcard__go { background: var(--sun); border-color: var(--sun); transform: translate(2px, -2px); }
/* the first card is the big plate of the spread (R23 «расположение снеков, тарелок») */
.rcard--big { grid-column: span 2; grid-row: span 2; }
.rcard--big .rcard__ph { aspect-ratio: 1 / .9; }
.rcard__goods { display: flex; align-items: center; gap: 14px; padding: 0 8px; }
.rcard__pics { display: flex; }
.rcard__pics span { position: relative; width: 48px; height: 48px; margin-left: -10px; border-radius: 50%; overflow: hidden; background: var(--tone, var(--sand));
  border: 3px solid var(--white); }
.rcard__pics span:first-child { margin-left: 0; }
.rcard__pics img { position: absolute; inset: 10%; width: 80%; height: 80%; object-fit: contain; }
.rcard__pics img.is-photo { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rcard__gl { font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); }
.rcard__lead { padding: 0 8px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 60ch; }
.rcard--big .rcard__t { font-size: clamp(26px, 1.5vw + 6px, 46px); }
.rcard--big .rcard__go { width: 58px; height: 58px; }

/* the rest: a compact index of rows, no photo (А–Я, a letter where it changes) */
.rlist { margin-top: clamp(28px, 2.6vw, 52px); padding: clamp(10px, 1vw, 20px) clamp(18px, 2vw, 40px) clamp(18px, 1.6vw, 30px); background: var(--white);
  border: 1px solid #efe5d6; border-radius: var(--r-card); columns: 3; column-gap: clamp(24px, 3vw, 64px); }
.rlet { display: block; padding: 16px 0 4px; font-family: var(--f-acc); font-weight: 700; font-size: clamp(22px, .8vw + 10px, 32px); line-height: 1;
  color: var(--clay); break-after: avoid; }
.rrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line);
  break-inside: avoid; }
.rrow__t { font-weight: 600; line-height: 1.3; }
.rrow__m { display: block; margin-top: 3px; font-size: 14px; color: var(--ink-2); }
.rrow__go { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); transition: transform .25s var(--ease); }
.rrow__go .ico { width: 19px; height: 19px; }
.rrow:hover .rrow__t { color: var(--clay); }
.rrow:hover .rrow__go { border-color: var(--ink); transform: translate(2px, -2px); }

@media (min-width: 2000px) {
  .rlist { columns: 4; }
}
@media (max-width: 1100px) and (min-width: 768px) {
  .rgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rlist { columns: 2; }
}

/* ---------- phone: R61 — pill ribbons, one card per row ---------- */
@media (max-width: 767px) {
  .rx-head { padding-block: 18px 4px; }
  .rx-head__in { grid-template-columns: 1fr; gap: 0; }
  .rx-head h1 { margin-top: 0; font-size: 34px; }
  .rx-spread { display: none; }
  .rx-tabs { display: flex; width: 100%; margin-top: 18px; padding: 4px; }
  .rx-tab { flex: 1 1 0; justify-content: center; min-height: 50px; padding: 0 10px; font-size: 19px; }
  .rx-bar { padding-block: 12px 16px; }
  .rx-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 10px; margin-inline: -16px; padding: 8px 16px 12px; }
  .rx-chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; min-height: 46px; padding: 8px 18px; font-size: 18px; }
  .rgrid, .rgrid--3 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rcard { padding: 8px 8px 14px; border-radius: 22px; gap: 12px; }
  .rcard__ph { aspect-ratio: 4 / 3; }
  .rcard--big { grid-column: auto; grid-row: auto; }
  .rcard--big .rcard__ph { aspect-ratio: 4 / 3; }
  .rcard__lead, .rcard__goods { display: none; }
  .rcard--big .rcard__t, .rcard__t { font-size: 21px; }
  .rcard--big .rcard__go { width: 48px; height: 48px; }
  .rlist { columns: 1; padding: 4px 16px 14px; border-radius: 22px; }
  .rrow { padding: 12px 0; }
}
