/* ===========================================================================
   The public recipe pages at /recipes.
   ===========================================================================

   Loaded only by the HTML that lib/recipe-html.ts writes, on top of tokens.css
   and site.css. `.rx-` prefixed, because the app's namespace is one shared room
   and `.rp-` next door is the app's own recipe sheet (css/recipe-detail.css).

   Shaped to look like that sheet without being it. A visitor who arrives here
   from a search and later signs up should recognise the layout — two panels,
   ingredients left, method right, the photograph across the top — because
   recognising it is most of the argument for signing up. It is a wider, calmer
   version of the same idea, at reading size rather than kitchen-bench size.
   =========================================================================== */

.rx-lede { padding-bottom: 0; }
.rx-lede .st-h2 { margin-top: 10px; }
.rx-lede .st-lead { margin-top: 14px; max-width: 62ch; }

/* --- the index -------------------------------------------------------------- */

.rx-packsec { padding-top: 56px; scroll-margin-top: 92px; }
.rx-packsec .st-sec-head { margin-bottom: 28px; }

.rx-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.rx-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.rx-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.rx-shot { display: block; aspect-ratio: 3 / 2; background: var(--surface-3); }
.rx-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rx-noshot { background: linear-gradient(135deg, var(--surface-3), var(--accent-soft)); }

.rx-card-body { display: block; padding: 14px 16px 16px; }
.rx-card-body b { display: block; font-size: 1rem; font-weight: 700; line-height: 1.3;
                  letter-spacing: var(--track-heading); }
.rx-card-body small { display: block; margin-top: 4px; font-size: .82rem; color: var(--text-muted); }

/* --- one recipe -------------------------------------------------------------- */

.rx-crumbs { display: flex; gap: 10px; align-items: center; padding: 28px 0 0; font-size: .9rem; color: var(--text-muted); }
.rx-crumbs a { color: var(--text-soft); text-decoration: none; }
.rx-crumbs a:hover { color: var(--accent); text-decoration: underline; }

.rx-recipe { padding: 20px 0 8px; }
.rx-head { max-width: 68ch; }
.rx-head .st-h2 { margin-top: 8px; }
.rx-head .st-lead { margin-top: 12px; }

.rx-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 20px; font-size: .94rem; color: var(--text-muted); }
.rx-meta b { color: var(--text); font-weight: 750; font-variant-numeric: tabular-nums; }

.rx-hero {
  display: block; width: 100%; max-height: 460px; object-fit: cover;
  margin: 30px 0 0; border-radius: var(--radius-lg);
  background: var(--surface-3);
}

/* Ingredients narrower than the method: a line of ingredients is short and a
   step is a paragraph, so an even split leaves one column ragged and the other
   cramped. Same reason the app's sheet does it. */
.rx-body { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); margin-top: 30px; }
@media (max-width: 860px) { .rx-body { grid-template-columns: 1fr; } }

.rx-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
}
.rx-panel > .st-h3 { margin-bottom: 16px; }

.rx-group {
  margin: 20px 0 8px; font-size: .78rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
}
.rx-group:first-of-type { margin-top: 0; }

.rx-ing { list-style: none; display: grid; gap: 2px; }
.rx-ing li {
  padding: 9px 0 9px 22px;
  border-bottom: 1px solid var(--border);
  font-size: .97rem; color: var(--text-soft);
  position: relative;
}
.rx-ing li:last-child { border-bottom: 0; }
.rx-ing li::before {
  content: ""; position: absolute; left: 4px; top: 1.05em;
  width: 6px; height: 6px; border-radius: 99px; background: var(--brand-mist);
}

.rx-steps { list-style: none; counter-reset: rx-step; display: grid; gap: 18px; }
.rx-steps li {
  counter-increment: rx-step;
  display: grid; grid-template-columns: 30px 1fr; gap: 14px;
  font-size: .99rem; line-height: 1.65; color: var(--text-soft);
}
.rx-steps li::before {
  content: counter(rx-step);
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent);
  font-size: .84rem; font-weight: 800;
}

.rx-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.rx-tags span {
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: .8rem; color: var(--text-muted);
}

/* --- the invitation ---------------------------------------------------------- */

.rx-cta {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  margin: 44px 0 8px; padding: 30px 32px;
  border-radius: var(--radius-lg);
  background: var(--brand-deep);
  color: #ffffff;
}
.rx-cta > div { flex: 1; min-width: 260px; }
.rx-cta .st-h3 { color: #ffffff; }
.rx-cta p { margin-top: 8px; color: rgba(255,255,255,.75); font-size: .96rem; max-width: 62ch; }
.rx-cta .st-btn-primary { background: var(--brand-sun); color: #ffffff; }
.rx-cta .st-btn-primary:hover { background: #e2792c; }
