/* Receptes (mobile-first). Loaded only on /receptes pages. */
.recipes .rcats, .rcats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; }
.rcats a { flex: 0 0 auto; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink-2); font: 600 14px/1.2 var(--sans); text-decoration: none; }
.rcats a span { color: var(--muted); font-weight: 500; }
.rcats a[aria-current="page"] { background: #c2410c; border-color: #c2410c; color: #fff; }
.rcats a[aria-current="page"] span { color: #ffedd5; }
.rempty { padding: 24px 0; color: var(--muted); }
.rgrid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .rgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .rgrid { grid-template-columns: repeat(3, 1fr); } .rgrid--small { grid-template-columns: repeat(4, 1fr); } }
.rcard { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.rcard__link { display: block; color: inherit; text-decoration: none; }
.rcard__img { aspect-ratio: 16 / 9; background: #fff7ed; display: grid; place-items: center; overflow: hidden; }
.rcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rcard__ph { font-size: 44px; }
.rcard__body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.rcard__cat { color: #c2410c; font: 700 12px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .04em; }
.rcard__title { margin: 0; font: 700 18px/1.25 var(--serif); }
.rcard__meta { color: var(--muted); font: 13px/1.3 var(--sans); }

.recipe { max-width: 860px; }
.preview-banner { background: #fef3c7; border: 1px solid #f59e0b; border-radius: 10px; padding: 10px 14px; font: 14px/1.4 var(--sans); }
.recipe__cat { color: #c2410c; font: 700 13px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .05em; text-decoration: none; }
.recipe__title { margin: 6px 0 10px; font: 800 clamp(28px, 7vw, 44px)/1.12 var(--serif); }
.recipe__summary { margin: 0 0 8px; font: 18px/1.5 var(--serif); color: var(--ink-2); }
.recipe__byline { margin: 0 0 14px; color: var(--muted); font: 14px/1.4 var(--sans); }
.recipe__hero { margin: 0 0 14px; }
.recipe__hero img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: #fff7ed; }
.recipe__noimg { aspect-ratio: 16 / 9; border-radius: var(--radius); background: #fff7ed; display: grid; place-items: center; font-size: 72px; }
.recipe__hero figcaption { margin-top: 6px; color: var(--muted); font: 12px/1.4 var(--sans); }
.ai-label { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 6px; background: #ede9fe; color: #5b21b6; font-weight: 700; }
.recipe__facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 14px; padding: 12px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.recipe__facts dt { color: var(--muted); font: 600 11px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .03em; }
.recipe__facts dd { margin: 4px 0 0; font: 700 15px/1.2 var(--sans); }
.recipe__actions { display: flex; gap: 10px; margin: 0 0 18px; }
.btn--cook { flex: 1; min-height: 52px; font-size: 18px; background: #c2410c; border-color: #c2410c; }
.recipe__actions .btn--ghost { min-height: 52px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.recipe__cols { display: grid; gap: 22px; }
@media (min-width: 820px) { .recipe__cols { grid-template-columns: 300px 1fr; align-items: start; } .recipe__ingredients { position: sticky; top: 12px; } }
.recipe__ingredients, .recipe__steps { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.recipe h2 { margin: 0 0 10px; font: 800 21px/1.2 var(--serif); }
.ing__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.scaler { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.scaler__btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font: 700 20px/1 var(--sans); cursor: pointer; }
.scaler__val { min-width: 2ch; text-align: center; font: 800 20px/1 var(--sans); }
.scaler__lbl { color: var(--muted); font: 13px var(--sans); }
.ing__group { margin: 12px 0 4px; font: 700 14px/1.3 var(--sans); color: #9a3412; }
.ing__list { list-style: none; margin: 0; padding: 0; }
.ing__list li + li { border-top: 1px solid var(--line); }
.ing { display: grid; grid-template-columns: 26px auto 1fr; gap: 8px; align-items: baseline; padding: 10px 0; cursor: pointer; font: 16px/1.4 var(--sans); }
.ing input { width: 20px; height: 20px; accent-color: #c2410c; transform: translateY(3px); }
.ing__qty { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ing input:checked ~ span { color: var(--muted); text-decoration: line-through; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 16px 44px; font: 17px/1.6 var(--serif); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: #c2410c; color: #fff; display: grid; place-items: center; font: 700 15px/1 var(--sans); }
.steps p { margin: 0; }
.steps__timer { display: inline-block; margin-top: 4px; color: #9a3412; font: 600 13px var(--sans); }
.recipe__tips { margin-top: 8px; padding: 14px; border-radius: 12px; background: #fff7ed; }
.recipe__tips h2 { font-size: 18px; }
.recipe__tips p { margin: 0 0 6px; }
.recipe__note { margin: 18px 0; color: var(--muted); font: 13px/1.5 var(--sans); }
.rshare { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 24px; }
.rshare__title { width: 100%; font: 700 14px var(--sans); }
.rshare a, .rshare button { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 14px var(--sans); text-decoration: none; cursor: pointer; }
.rshare__toast { color: #15803d; font: 13px var(--sans); }
.rrelated { margin-bottom: 30px; }

/* Cooking mode */
.cook { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #1c1917; color: #fafaf9; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); touch-action: pan-y; }
.cook[hidden] { display: none; }
.cook__top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.cook__title { flex: 1; font: 600 15px/1.3 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #d6d3d1; }
.cook__count { font: 700 15px var(--sans); color: #fdba74; }
.cook__close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #292524; color: #fff; font-size: 20px; cursor: pointer; }
.cook__bar { height: 4px; background: #292524; }
.cook__bar span { display: block; height: 100%; width: 0; background: #f97316; transition: width .25s; }
.cook__stage { flex: 1; overflow-y: auto; display: flex; flex-direction: column; justify-content: center; padding: 20px 22px; }
.cook__text { margin: 0; font: 500 clamp(24px, 6.4vw, 40px)/1.4 var(--serif); }
.cook__timer { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cook__timer[hidden] { display: none; }
.cook__time { min-width: 4.2ch; font: 800 44px/1 var(--sans); font-variant-numeric: tabular-nums; color: #fdba74; }
.cook__time.is-done { color: #4ade80; animation: cookblink 1s steps(2) infinite; }
@keyframes cookblink { 50% { opacity: .3; } }
.cook__tbtn { min-height: 48px; padding: 0 18px; border: 0; border-radius: 12px; background: #f97316; color: #1c1917; font: 700 17px var(--sans); cursor: pointer; }
.cook__tbtn--ghost { background: #292524; color: #fafaf9; }
.cook__nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding: 12px 16px 16px; }
.cook__nav button { min-height: 60px; border: 0; border-radius: 14px; font: 700 19px var(--sans); cursor: pointer; }
.cook__prev { background: #292524; color: #fafaf9; }
.cook__next { background: #f97316; color: #1c1917; }
.cook__nav button:disabled { opacity: .35; }
.cook__wake { margin: 0; padding: 0 16px 10px; text-align: center; color: #a8a29e; font: 12px var(--sans); }
.cook__wake[hidden] { display: none; }
html.cook-open, html.cook-open body { overflow: hidden; }

@media print {
    .masthead, .nav, .footer, footer, .topbar, .crumbs, .no-print, .cook, #cmp-bar, .ad, .slot, .preview-banner { display: none !important; }
    body { background: #fff; }
    .recipe { max-width: none; }
    .recipe__ingredients, .recipe__steps, .recipe__facts { box-shadow: none; padding: 0; }
    .recipe__cols { grid-template-columns: 1fr 2fr; }
    .recipe__ingredients { position: static; }
    .recipe__hero img { max-height: 240px; width: auto; }
    .ing input { display: none; }
    .ing { grid-template-columns: auto 1fr; padding: 3px 0; }
    .steps li { break-inside: avoid; }
}

/* Ads in Receptes (house-ads system; slides reserve their aspect-ratio → no CLS) */
.rgrid__ad { grid-column: 1 / -1; padding: 4px 0; }
.rgrid__ad .hads { max-width: 820px; margin: 0 auto; }
.recipe__ad { margin: 0; }
.recipe__ad:empty { display: none; }
.recipe__ad--m { margin: 0 0 22px; }
.recipe-layout { display: block; }
.recipe-side { display: none; }
@media (min-width: 820px) { .recipe__ad--cols { display: none; } }
@media (min-width: 1100px) {
    .recipe-layout--side { display: grid; grid-template-columns: minmax(0, 860px) 300px; gap: 28px; justify-content: center; align-items: start; }
    .recipe-layout--side .recipe__ad--m { display: none; }
    .recipe-side { display: block; padding-top: 24px; }
    .recipe-side__sticky { position: sticky; top: 16px; }
}
/* cooking mode banner: fixed height strip between the step and the buttons (never overlaps them) */
.cook__ad { flex: 0 0 auto; height: 122px; padding: 0 16px; overflow: hidden; }
.cook__ad[hidden] { display: none; }
.cook__ad .hads__label { color: #a8a29e; margin: 0 0 2px; font-size: 10px; text-align: center; }
.cook__ad .hads__stage { height: 100px; }
.cook__ad .hads__slide { aspect-ratio: auto !important; height: 100px; max-width: 640px; width: 100%; justify-self: center; }
.cook__ad .hads__slide img { height: 100px; object-fit: contain; }
.cook__done { text-align: center; }
.cook__done .cook__text { font-size: clamp(30px, 8vw, 46px); }
.cook__ad .hads__slide { background: transparent; }
