/* DIY Recipes: screen + print styles. Builds on styles.css variables. */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; padding: 8px 12px; background: #fff; color: var(--ink); border-radius: 8px; }

.recipe { max-width: 820px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 32px) 64px; }
.recipe h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.15; margin: 6px 0 14px; }
.recipe h2 { font-size: 1.35rem; margin: 0 0 12px; }
.recipe-intro { font-size: 1.08rem; color: var(--ink); }
.recipe-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.recipe-actions button { cursor: pointer; font: inherit; font-weight: 800; }
.recipe img { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--line); }
.recipe figure { margin: 0; }
.recipe figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.recipe-hero { margin: 22px 0; }

.recipe-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 24px; }
.recipe-facts div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.recipe-facts dt { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.recipe-facts dd { margin: 2px 0 0; font-weight: 700; }

.recipe-ingredients { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
.recipe-ingredients section { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.recipe-ingredients ul { margin: 0; padding-left: 20px; }
.recipe-ingredients li + li { margin-top: 8px; }
.recipe-deal { display: block; margin-top: 6px; }
.recipe-deal a { color: var(--red); font-weight: 800; }
.discount-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #fff6dc; border: 1px dashed var(--yellow); border-radius: 4px; padding: 1px 6px; }
.recipe .affiliate-disclosure { margin: 12px 0 0; color: var(--muted); }

.recipe-method { margin-top: 36px; }
.recipe-steps { list-style: none; margin: 0; padding: 0; }
.recipe-step { padding: 20px 0; border-top: 1px solid var(--line); }
.recipe-step h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 1.15rem; }
.recipe-step-number { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; }
.recipe-step p { margin: 0 0 12px; }
.recipe-step a { color: var(--teal); font-weight: 700; }
.recipe-step-images { display: grid; gap: 12px; }
.recipe-step-images.two { grid-template-columns: 1fr 1fr; }

.recipe-tips { margin-top: 28px; padding: 18px 20px; border-left: 5px solid var(--yellow); background: #fff6dc; border-radius: 8px; }
.recipe-tips ul { margin: 0; padding-left: 20px; }
.recipe-tips li + li { margin-top: 6px; }
.recipe-next { margin-top: 28px; }
.recipe-print-footer { display: none; }

/* Recipes index */
.recipe-card-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.recipe-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; transition: box-shadow .15s; }
.recipe-card:hover, .recipe-card:focus-visible { box-shadow: var(--shadow); }
.recipe-card img { width: 100%; height: auto; border-radius: 6px; }
.recipe-card h2 { font-size: 1.1rem; margin: 2px 0; }
.recipe-card-meta, .recipe-card-facts { font-size: 0.85rem; color: var(--muted); }

/* Video-page recipe card (Eonon mock-up) */
.recipe-cta { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: center; max-width: 1100px; margin: 0 auto; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--red); border-radius: 8px; }
.recipe-cta img { width: 100%; height: auto; border-radius: 6px; }
.recipe-cta h2 { margin: 2px 0 6px; }
.recipe-cta p { margin: 0 0 12px; color: var(--muted); }
.recipe-cta-section { padding: 28px clamp(18px, 4vw, 56px); }
details.chapters-collapsible > summary { cursor: pointer; font-weight: 800; font-size: 1.1rem; padding: 6px 0; }

@media (max-width: 640px) {
  .recipe-ingredients, .recipe-step-images.two, .recipe-cta { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .site-header, .site-footer, .breadcrumb, .recipe-actions, .skip-link, .g-ytsubscribe { display: none !important; }
  .recipe { max-width: none; padding: 0; }
  .recipe h1 { font-size: 20pt; }
  .recipe-hero img { max-height: 70mm; width: auto; margin: 0 auto; }
  .recipe-facts div, .recipe-ingredients section, .recipe-tips { border: 1px solid #999; background: #fff; box-shadow: none; }
  .recipe-step { break-inside: avoid; page-break-inside: avoid; padding: 10px 0; }
  .recipe h2, .recipe h3 { break-after: avoid; page-break-after: avoid; }
  .recipe-step-images { grid-template-columns: 1fr 1fr; }
  .recipe-step-images img { max-height: 55mm; width: auto; max-width: 100%; }
  .recipe figcaption { font-size: 8pt; }
  .recipe-step-number { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .recipe-tips, .recipe-ingredients { break-inside: avoid; page-break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
  a.print-url[data-print-url]::after { content: " (" attr(data-print-url) ")"; font-size: 8pt; font-weight: 400; word-break: break-all; }
  .recipe-print-footer { display: block; margin-top: 14px; font-size: 8pt; color: #444; border-top: 1px solid #999; padding-top: 6px; }
}

/* Final recipe additions: tools table, sub-steps, PDF link */
.recipe-ingredients-single { grid-template-columns: 1fr; }
.recipe-tools { margin-top: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.recipe-table-wrap { overflow-x: auto; }
.recipe-tools-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.recipe-tools-table th, .recipe-tools-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.recipe-tools-table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border-bottom: 2px solid var(--line); }
.recipe-tools-table tbody th { font-weight: 700; }
.recipe-tools-table a { color: var(--red); font-weight: 800; white-space: nowrap; }
.recipe-tools-table td.na { color: var(--muted); }
.recipe-tools-note { margin: 12px 0 0; font-size: 0.95rem; }
.recipe-substep { margin-top: 16px; padding-left: 14px; border-left: 3px solid var(--line); }
.recipe-substep h4 { margin: 0 0 6px; font-size: 1.02rem; }
.recipe-cta-links { display: flex; flex-wrap: wrap; gap: 10px; }

@media print {
  .recipe-tools { border: 1px solid #999; background: #fff; break-inside: avoid; page-break-inside: avoid; }
  .recipe-table-wrap { overflow: visible; }
  .recipe-tools-table { font-size: 8.5pt; }
  .recipe-tools-table th, .recipe-tools-table td { border: 1px solid #999; padding: 3px 6px; }
  .recipe-tools-table a { color: #000; white-space: normal; }
  .recipe-substep { break-inside: avoid; page-break-inside: avoid; }
  .recipe-substep .recipe-step-images img { max-height: 50mm; }
}

/* "Watch the Short" card (thumbnail link to YouTube, same approach as video pages) */
.short-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; margin: 0 0 24px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.short-card:hover, .short-card:focus-visible { box-shadow: var(--shadow); }
.short-card-thumb { width: 96px; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 6px; background: var(--charcoal); }
.short-card-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.short-card .eyebrow { margin: 0; }
.short-card strong { display: block; font-size: 1.02rem; margin: 2px 0; }
.short-card span.short-card-cta { color: var(--red); font-weight: 800; font-size: 0.9rem; }
.recipe-cta-section .short-card { max-width: 1100px; margin: 14px auto 0; }

@media print {
  .short-card { display: block; padding: 6px 10px; border: 1px solid #999; background: #fff; box-shadow: none; break-inside: avoid; }
  .short-card-thumb { display: none; }
  .short-card[data-print-url]::after { content: "Watch the Short: " attr(data-print-url); display: block; font-size: 8pt; word-break: break-all; }
  .short-card span.short-card-cta { display: none; }
}
