/* Recipe page — shared by web and print.
   Layout follows the family sketch: centred title, two columns split by a dashed
   rule (story, yield, equipment, ingredients, QR, tip | numbered steps, image).
   Feel follows the reference pâtisserie book. */

:root {
  --ink: #2b2622;
  --ink-soft: #6b625a;
  --rule: #b9aea3;
  --panel: #f6f1ea;
  --page: #fffdf9;
  --title-font: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --body-font: "Alegreya Sans", "Source Sans 3", "Fira Sans", "Helvetica Neue", Arial, sans-serif;
}

.recipe {
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 10.5pt;
  line-height: 1.45;
}

.recipe p { margin: 0 0 0.5em; }

/* ---- title ---- */
.recipe-head { text-align: center; margin-bottom: 9mm; }
.recipe-title {
  font-family: var(--title-font);
  font-weight: 300;
  font-size: 30pt;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0;
}
.recipe-subtitle {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 12pt;
  margin: 2mm 0 0;
}

/* ---- labels: short underline, like the reference book ---- */
.recipe .label {
  display: inline-block;
  font-family: var(--body-font);
  font-size: 10.5pt;
  font-weight: 500;
  margin: 0 0 1.5mm;
  padding-bottom: 0.6mm;
  border-bottom: 0.6pt solid var(--ink);
}
.recipe h2.label { display: table; }

/* ---- two columns ----
   The left column floats; the right column is an ordinary block beside it, so it
   splits across pages cleanly (WeasyPrint cannot fragment flex rows). */
.columns::after { content: ""; display: block; clear: both; }
.col-left {
  float: left;
  width: 42%;
  box-sizing: border-box;
  padding-right: 6mm;
}
.col-right {
  margin-left: 42%;
  padding-left: 7mm;
  border-left: 0.8pt dashed var(--rule);
}

.context {
  border: 0.6pt solid var(--rule);
  border-radius: 2mm;
  background: var(--panel);
  padding: 3mm 4mm 2mm;
  margin-bottom: 5mm;
}
.context p { font-style: normal; }

.yield { margin: 0 0 4mm; }
.yield .label { margin-bottom: 0; }
.equipment { margin-bottom: 4mm; }
.ingredients ul { list-style: none; padding: 0; margin: 0 0 3mm; }
.ingredients li { margin: 0 0 0.8mm; }
.group-name {
  font-size: 10pt;
  font-weight: 500;
  font-style: italic;
  margin: 2.5mm 0 1mm;
}

.steps { padding-left: 1.4em; margin: 0; }
.steps li { margin: 0 0 3.5mm; padding-left: 0.3em; }
.steps li p { margin: 0; }

/* ---- tip, QR, image (sketch: tip bottom-left, image bottom-right) ---- */
.tip { margin-top: 5mm; }
.tip p { display: inline; }
.tip .label, .yield .label { display: inline; margin: 0; }
.qr {
  display: flex;
  align-items: center;
  gap: 3mm;
  margin-top: 5mm;
  break-inside: avoid;
}
.qr svg { width: 20mm; height: 20mm; flex: 0 0 auto; }
.qr-url { font-size: 8pt; color: var(--ink-soft); word-break: break-all; }
.image-slot { margin: 7mm 0 0 auto; width: 75mm; break-inside: avoid; }
.image-slot img { display: block; width: 100%; border-radius: 1mm; }
/* a finished-dish photo fills a square; a handwritten original is shown whole */
.image-slot.dish img { height: 75mm; object-fit: cover; }
.image-slot.original img { height: auto; max-height: 100mm; object-fit: contain; }

/* ---- web ---- */
body.web { background: var(--page); margin: 0; padding: 24px 16px 48px; }
body.web .recipe { max-width: 900px; margin: 0 auto; font-size: 17px; }
@media screen and (max-width: 700px) {
  .col-left { float: none; width: auto; padding-right: 0; border-bottom: 1px dashed var(--rule); padding-bottom: 16px; margin-bottom: 16px; }
  .col-right { margin-left: 0; padding-left: 0; border-left: 0; }
  .image-slot { width: 100%; }
  .image-slot.dish img { height: auto; aspect-ratio: 1; }
  .recipe-title { font-size: 26pt; }
}
