/**
 * Recipes: the detail layout and the recipe card. Everything else comes from
 * base.css.
 */

.cs-recipe {
  --band-pad: var(--space-12);
  --rule-w: 3px;
  --ing-w: 320px;
}

/* ── head and hero ──────────────────────────────────────── */
.cs-recipe .recipe-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  width: 100%;
}

.cs-recipe .media-strip {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* ── fact strip ─────────────────────────────────────────── */
.cs-recipe .recipe-facts {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-8);
  width: 100%;
  padding-block: var(--space-5);
  border-top: var(--line-hair);
  border-bottom: var(--line-hair);
}

.cs-recipe .fact { display: flex; flex-direction: column; gap: var(--space-1); }

.cs-recipe .fact-label {
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neutral-700);
}

.cs-recipe .fact-value { font-family: var(--font-heading); font-size: var(--fs-h4); }

/* ── two column body ────────────────────────────────────── */
.cs-recipe .recipe-body {
  display: flex;
  flex-direction: row;
  gap: var(--space-10);
  width: 100%;
  align-items: flex-start;
}

.cs-recipe .recipe-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  flex: 0 0 var(--ing-w);
  position: sticky;
  top: var(--space-6);
}

.cs-recipe .recipe-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  flex: 1 1 auto;
  min-width: 0;
}

.cs-recipe .panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
}

.cs-recipe .panel-title { font-family: var(--font-heading); font-size: var(--fs-h4); }

.cs-recipe .ing-list { display: flex; flex-direction: column; gap: var(--space-3); }

.cs-recipe .ing {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--fs-small);
}

.cs-recipe .ing-qty {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--color-accent-700);
  flex: none;
}

/* ── method ─────────────────────────────────────────────── */
.cs-recipe .prose { display: flex; flex-direction: column; gap: var(--space-4); max-width: 66ch; }

.cs-recipe .method { display: flex; flex-direction: column; gap: var(--space-6); }

.cs-recipe .method-step {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-5);
}

.cs-recipe .step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--mark-size);
  height: var(--mark-size);
  flex: none;
  border-radius: 999px;
  background: var(--color-accent-200);
  font-family: var(--font-heading);
  color: var(--color-accent-800);
}

.cs-recipe .method-text { display: flex; flex-direction: column; gap: var(--space-2); }

.cs-recipe .step-title { font-family: var(--font-heading); font-size: var(--fs-h4); }

.cs-recipe .method-text p,
.cs-recipe .prose-p { font-size: var(--fs-body); line-height: 1.5; color: var(--color-text); }

.cs-recipe .method-text img,
.cs-recipe .recipe-main img { max-width: 100%; height: auto; border-radius: var(--radius-md); }

/* The optional photo under a step. */
.cs-recipe .step-media { margin: var(--space-1) 0 0; }
.cs-recipe .step-media img { display: block; width: 100%; }

.cs-recipe .note-strip {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  border-left: var(--rule-w) solid var(--color-accent);
  background: var(--color-accent-100);
  border-radius: var(--radius-md);
}

.cs-recipe .note-body { display: flex; flex-direction: column; gap: var(--space-2); }

/* The note's dot sits against the first line of type, not the panel edge. */
.cs-recipe .note-strip .bullet { margin-top: var(--space-2); }

/* ── recipe card ────────────────────────────────────────── */
.cs-recipe .card-recipe {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1 1 300px;
  max-width: 380px;
}

.cs-recipe .media-wide,
.cs-recipe .ph-wide {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.cs-recipe .ph-label { font-family: var(--font-mono); }

.cs-recipe .card-recipe-body { display: flex; flex-direction: column; gap: var(--space-2); }

/* ── tablet ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cs-recipe .band { padding-block: var(--space-10); }
  .cs-recipe .recipe-body { flex-direction: column; gap: var(--space-8); }
  .cs-recipe .recipe-side { flex: 1 1 auto; width: 100%; position: static; }
  .cs-recipe .card-recipe { flex: 1 1 44%; max-width: none; }
}

/* ── mobile ─────────────────────────────────────────────── */
@media (max-width: 560px) {
  .cs-recipe .band { padding-block: var(--space-8); }
  .cs-recipe .recipe-facts { gap: var(--space-5); padding-block: var(--space-4); }
  .cs-recipe .fact { flex: 1 1 40%; }
  .cs-recipe .method-step { gap: var(--space-3); }
  .cs-recipe .note-strip { flex-direction: column; gap: var(--space-3); padding: var(--space-4); }
  .cs-recipe .card-recipe { flex: 1 1 100%; }
  .cs-recipe .media-strip { aspect-ratio: 4 / 3; }
}
