/* site-version: 29 */
/* ===================== Recipe page ===================== */
.preview-bar { background: #b45309; color: #fff; text-align: center; padding: .55rem 1rem; font-weight: 700; font-size: .92rem; }
.preview-bar a { color: #fff; }
.rp { padding-top: 22px; }
.back { display: inline-block; color: var(--muted); text-decoration: none; font-weight: 700; margin-bottom: 18px; }
.back:hover { color: var(--text); }
.muted { color: var(--muted); }

.rp-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 36px; align-items: center; margin-bottom: 28px; }
.rp-video { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.02); }
.rp-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.rp-novid { height: 100%; display: grid; place-items: center; align-content: center; gap: 6px; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%), var(--surface-2); }
.rp-novid span { font-size: 4rem; } .rp-novid small { color: var(--muted); font-weight: 700; }
.rp-head { display: grid; gap: 14px; align-content: center; }
.rp-head .tag { justify-self: start; text-decoration: none; }
.rp-head h1 { font-family: var(--display); text-transform: uppercase; font-size: clamp(2.2rem, 4.6vw, 3.8rem); line-height: .98; text-wrap: balance; }
.rp-desc { color: #c9c9d1; font-size: 1.08rem; margin: 0; line-height: 1.6; }
.rp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.btn.big { font-size: 1.05rem; padding: .85rem 1.5rem; }
.rp-details { margin-bottom: 30px; }

.rp-body { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 40px; align-items: start; }
.rp-ing { position: sticky; top: 84px; }
.rp-ing-in { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; }
.rp-ing-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.rp-ing-head h2 { font-family: var(--display); text-transform: uppercase; font-size: 1.7rem; }
.rp-ing-head .muted { font-weight: 600; font-size: .88rem; }
.scaler { display: flex; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 8px; }
.scaler span { color: var(--muted); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; padding: 0 8px 0 6px; }
.scaler button { flex: 1; border: 0; background: none; color: var(--muted); font-weight: 800; padding: .5rem 0; border-radius: 8px; cursor: pointer; font-size: .95rem; }
.scaler button[aria-pressed="true"] { background: var(--fire); color: #fff; }
.scaler-note { font-size: .85rem; color: var(--orange); font-weight: 700; margin: 0 0 6px; }
.ing .scaled { color: #fff; }
.ing .q { color: var(--orange); font-weight: 800; }

.rp-steps .steps li { cursor: pointer; padding: 14px 14px 14px 0; border-radius: 12px; transition: background .15s, opacity .15s; }
.rp-steps .steps li:hover { background: rgba(255,255,255,.03); }
.rp-steps .steps li span { font-size: 1.08rem; line-height: 1.7; color: #e3e3e8; }
.rp-steps .steps li.done { opacity: .45; }
.rp-steps .steps li.done span { text-decoration: line-through; }
.rp-steps .steps li:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.rp-related { margin-top: 60px; }
.rp-related .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); padding-bottom: 30px; }
.rp-suggest { display: block; text-align: center; margin: 10px 0 60px; padding: 18px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-decoration: none; font-weight: 600; }
.rp-suggest b { color: var(--orange); }
.rp-suggest:hover { border-color: var(--orange); color: var(--text); }

@media (max-width: 980px) {
  .rp-hero { grid-template-columns: 1fr; gap: 22px; }
  .rp-body { grid-template-columns: 1fr; gap: 28px; }
  .rp-ing { position: static; }
  .rp-ing-in { max-height: none; }
}
@media (max-width: 520px) { .rp-video { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; } }

/* ===================== Cook mode ===================== */
.cookmode { position: fixed; inset: 0; z-index: 100; background: #08080a; display: grid; grid-template-rows: auto auto auto 1fr auto; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.cookmode[hidden] { display: none; }
.cook-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 22px; }
.cook-title { display: grid; min-width: 0; }
.cook-title b { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-title small { color: var(--muted); font-weight: 600; }
.cook-x { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: #fff; font-size: 1.6rem; cursor: pointer; flex: none; }
.cook-bar { height: 4px; background: var(--surface-2); }
.cook-bar i { display: block; height: 100%; width: 0; background: var(--fire); transition: width .3s; }
.cook-stage { display: grid; align-content: center; justify-items: center; text-align: center; padding: 30px clamp(20px, 7vw, 120px); overflow-y: auto; user-select: none; }
.cook-n { font-family: var(--display); color: var(--orange); font-size: 1.1rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.cook-text { font-size: clamp(1.5rem, 3.6vw, 2.7rem); line-height: 1.4; font-weight: 600; max-width: 30ch; margin: 0; text-wrap: pretty; }
.cook-text.long { font-size: clamp(1.25rem, 2.6vw, 2rem); max-width: 40ch; }
.cook-done { font-size: 4rem; }
.cook-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px 22px 22px; }
.cook-nav .btn { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-stage, .cook-top { min-width: 0; }
.cookmode { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 520px) { .cook-nav { gap: 8px; padding: 12px 14px 16px; } .cook-nav .btn { padding: .9rem .4rem; font-size: 1rem; } .cook-top { padding: 12px 14px; } }
.cook-nav .btn { justify-content: center; padding: 1rem; font-size: 1.1rem; border-radius: 14px; }
.cook-drawer { position: absolute; left: 0; right: 0; bottom: 0; max-height: 70vh; overflow-y: auto; background: var(--surface); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 22px 24px calc(28px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(0,0,0,.6); }
.cook-drawer h3 { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 1.5rem; margin-bottom: 10px; }
.cook-drawer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 1.1rem; }
.cook-drawer li.grp { color: var(--orange); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-top: 8px; }

/* ===================== Print ===================== */
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; color: #000 !important; padding: 0 !important; font-size: 11.5pt; }
  .bar, .back, .rp-video, .rp-actions, .rp-related, .rp-suggest, footer, .bnav, .season-fx, .scaler, .toast, .preview-bar, .cookmode, .rp-ing-head .muted, .rp-steps .rp-ing-head .muted { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .rp-hero { display: block; margin: 0 0 10px; }
  .rp-head h1 { color: #000; font-size: 26pt; }
  .rp-desc, .facts span, .details b, .details small { color: #000 !important; }
  .facts span, .details div { background: none !important; border-color: #bbb !important; }
  .details { border-color: #bbb !important; background: #bbb !important; }
  .rp-head .tag { color: #000; }
  .rp-body { display: grid; grid-template-columns: 38% 1fr; gap: 24px; }
  .rp-ing { position: static; }
  .rp-ing-in { background: none; border: 1px solid #bbb; max-height: none; overflow: visible; }
  .ing label { padding: 3px 0; }
  .ing input { border-color: #666 !important; width: 14px; height: 14px; }
  .ing .q, .ing .scaled, .rp-steps .steps li span { color: #000 !important; }
  .rp-steps .steps li { padding: 4px 0; break-inside: avoid; opacity: 1 !important; }
  .rp-steps .steps li span { text-decoration: none !important; }
  .steps li::before { color: #000 !important; }
  h2 { color: #000; }
  .scaler-note { color: #000 !important; }
}

/* the YouTube player only loads when someone presses play (faster page, and the player can't upset the page around it) */
.rp-play { all: unset; box-sizing: border-box; display: block; position: relative; width: 100%; height: 100%; cursor: pointer; background: #000; }
.rp-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-playbtn { position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 84px; height: 58px; border-radius: 16px; background: var(--red, #E8170B); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(232,23,11,.45); transition: transform .2s; }
.rp-playbtn i { width: 0; height: 0; border-left: 22px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 5px; }
.rp-play:hover .rp-playbtn, .rp-play:focus-visible .rp-playbtn { transform: scale(1.08); }
.rp-play:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }

/* video chapters */
.rp-chapters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -8px 0 26px; }
.rp-ch-h { color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; margin-right: 4px; }
.rp-ch { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: .4rem .85rem; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-align: left; }
.rp-ch b { color: var(--red); font-variant-numeric: tabular-nums; margin-right: 2px; }
.rp-ch:hover { border-color: #3a3a44; background: var(--surface-2); }
.rp-ch.on { border-color: var(--red); }
@media (max-width: 560px) { .rp-chapters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; } .rp-ch { flex: none; } }
@media print { .rp-chapters, .newsletter, .cart-fab, .heart { display: none !important; } }

/* cook mode: watch along */
.cook-top { grid-row: 1; } .cook-bar { grid-row: 2; } .cook-vid { grid-row: 3; } .cook-stage { grid-row: 4; } .cook-nav { grid-row: 5; }
.cook-vid { width: min(720px, 100%); margin: 8px auto 0; padding: 0 16px; }
.cook-vid[hidden] { display: none; }
.cook-vid iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; display: block; background: #000; }
.cookmode.with-vid .cook-text { font-size: clamp(1.2rem, 2.6vw, 1.9rem); }
#cook-vid-btn[aria-pressed="true"] { background: var(--fire); border-color: transparent; color: #fff; }
@media (max-height: 640px) { .cook-vid { width: min(420px, 100%); } }

/* rating + made it */
.rp-score { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.stars { display: inline-flex; }
.stars button { border: 0; background: none; font-size: 1.7rem; line-height: 1; padding: 0 2px; cursor: pointer; color: #3a3a44; transition: transform .1s, color .1s; }
.stars button.on { color: #FFB020; }
.stars button.mine.on { color: #FFC940; }
.stars:hover button { color: #FFB020; }
.stars button:hover ~ button { color: #3a3a44; }
.stars button:hover { transform: scale(1.15); }
.score-txt { color: var(--muted); font-weight: 600; font-size: .95rem; }
.made-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: .45rem .95rem; font: inherit; font-weight: 700; cursor: pointer; }
.made-btn:hover { border-color: #3a3a44; }
.made-btn[aria-pressed="true"] { background: rgba(255,120,0,.16); border-color: #ff7a1a; color: #ffd2b0; }

/* units switch */
.units { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin: -4px 0 12px; background: var(--bg); }
.units button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: .82rem; padding: .3rem .8rem; border-radius: 999px; cursor: pointer; }
.units button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }

/* timers */
.tmr { border: 1px solid rgba(255,176,32,.45); background: rgba(255,176,32,.12); color: #ffd58a; border-radius: 999px; padding: 0 .55rem; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; line-height: 1.6; }
.tmr:hover { background: rgba(255,176,32,.22); }
.cook-text .tmr { font-size: .85em; }
@media print { .timers, .units, .rp-score, #plan-btn, .tmr-pill { display: none !important; } .tmr { border: 0; background: none; color: inherit; padding: 0; } }

/* long steps never get cut off: the text area shrinks and scrolls instead */
.cook-stage { min-height: 0; align-content: safe center; }
.cook-vid { width: min(720px, 100%, calc((100dvh - 380px) * 16 / 9)); min-width: min(320px, 100%); }
/* big screens: video on the left, the step on the right */
@media (min-width: 900px) {
  .cookmode.with-vid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .cookmode.with-vid .cook-top, .cookmode.with-vid .cook-bar, .cookmode.with-vid .cook-nav { grid-column: 1 / -1; }
  .cookmode.with-vid .cook-vid { grid-row: 3; grid-column: 1; align-self: center; width: 100%; max-width: calc((100dvh - 230px) * 16 / 9); margin: 0 auto; padding: 0 0 0 22px; }
  .cookmode.with-vid .cook-stage { grid-row: 3; grid-column: 2; padding: 20px 28px; }
  .cookmode.with-vid .cook-text { font-size: clamp(1.15rem, 1.9vw, 1.7rem); max-width: 34ch; }
  .cookmode.with-vid .cook-nav { grid-row: 4; }
}
#cook-vid-btn { white-space: nowrap; padding: .55rem 1rem; }
@media (max-width: 520px) { #cook-vid-btn { padding: .45rem .75rem; font-size: .85rem; } }

.rp-file { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.cook-vid video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; display: block; background: #000; }

/* share image */
.simg-wrap { position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.8); display: grid; place-items: center; padding: 14px; }
.simg-wrap[hidden] { display: none; }
.simg { position: relative; width: min(460px, 100%); max-height: 96vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: grid; gap: 12px; }
.simg-x { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: #fff; font-size: 1.3rem; cursor: pointer; z-index: 2; }
.simg-seg { display: inline-flex; justify-self: start; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.simg-seg button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; padding: .35rem 1rem; border-radius: 999px; cursor: pointer; }
.simg-seg button[aria-pressed="true"] { background: var(--surface-2); color: #fff; }
.simg-prev { display: grid; place-items: center; min-height: 300px; background: #000; border-radius: 12px; overflow: hidden; }
.simg-prev img { width: 100%; height: auto; display: block; max-height: 62vh; object-fit: contain; }
.simg-prev span { color: var(--muted); }
.simg-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.simg-tip { margin: 0; color: var(--muted); font-size: .88rem; }

.tc-h { display: flex; gap: 10px; align-items: center; }
.tc-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #b8860b, #f5c542); color: #1a1200; font-weight: 900; }
.tc-h small { color: var(--muted); }
.tc-reply { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--red); background: rgba(232,23,11,.08); border-radius: 0 10px 10px 0; }
.tc-reply b { color: #ff8a7a; font-size: .85rem; }
.tc-reply p { margin: 4px 0 0; }
/* ingredient swaps */
#ing-list li.has-swap { display: grid; grid-template-columns: 1fr auto; align-items: start; }
#ing-list li.has-swap > label { min-width: 0; }
.swap-b { margin: .45rem .3rem 0 0; background: none; border: 1px solid #3a3a3a; color: #aaa; border-radius: 999px; font-size: .8rem; line-height: 1; padding: 4px 8px; cursor: pointer; }
.swap-b:hover, .swap-b:focus-visible, .swap-b[aria-expanded="true"] { color: #fff; border-color: var(--red, #E8170B); }
.swap-pop { grid-column: 1 / -1; margin: 2px .6rem 8px 2.4rem; background: #161616; border: 1px solid #2e2e2e; border-left: 3px solid var(--red, #E8170B); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.swap-pop b { display: block; margin-bottom: 4px; color: #fff; font-size: .85rem; }
.swap-pop ul { margin: 0; padding-left: 18px; color: #ccc; }
.swap-pop li { padding: 1px 0; }
@media print { .swap-b, .swap-pop { display: none !important; } }

/* ---------- phone once-over ---------- */
@media (max-width: 600px) {
  .rp-ch-h { white-space: nowrap; flex: none; }
  /* Cook mode big on top, everything else as a tidy 3-across grid */
  .rp-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .rp-actions > * { min-width: 0; }
  .rp-actions > .btn, .rp-actions > button { width: 100%; justify-content: center; padding: .6rem .4rem; font-size: .8rem; line-height: 1.15; text-align: center; white-space: normal; min-height: 46px; }
  .rp-actions > #cook-open { grid-column: 1 / -1; font-size: 1rem; min-height: 52px; }
  .rp-actions > .btn.big:not(#cook-open) { grid-column: 1 / -1; }
}
.facts .fact-cost em { display: block; font-style: normal; font-size: .78rem; color: #8fd18f; font-weight: 700; }
