* { box-sizing: border-box; }
html { margin: 0; padding: 0; }
/* Overflow guard for the full-bleed 100vw sections. Deliberately on <body>
   only: putting overflow on <html> as well makes <body> its own scroll
   container, which silently breaks every position:sticky on the page.
   On body alone it propagates to the viewport and sticky keeps working. */
body { margin: 0; padding: 0; overflow-x: hidden; }
body { font-family: var(--font-body); background: var(--bg); color: var(--fg); line-height: 1.55; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; color: var(--heading); }

.site-header { background: var(--header-bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.logo { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; color: var(--heading); }
.logo span { color: var(--accent); }
.site-header nav { display: flex; align-items: center; }
.site-header nav a { margin-left: 22px; font-weight: 600; color: var(--fg); }
.site-header nav a:hover { color: var(--accent); }
.theme-switch { margin-left: 22px; font-size: .82rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.theme-switch select { font-family: var(--font-body); font-size: .82rem; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--card-bg); color: var(--fg); }

main.wrap { padding-top: 48px; padding-bottom: 64px; min-height: 60vh; }

.hero { text-align: center; padding: 40px 0 56px; }
.hero h1 { font-size: 2.4rem; margin-bottom: 12px; }
.hero p { max-width: 560px; margin: 0 auto 24px; font-size: 1.05rem; }
.button { display: inline-block; padding: 12px 26px; background: var(--accent); color: var(--on-accent); border-radius: var(--radius); font-weight: 700; }

.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 20px; }
.category-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 16px; text-align: center; font-weight: 700; color: var(--heading); }
.category-card:hover { border-color: var(--accent); color: var(--accent); }

.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; margin-top: 24px; }
.recipe-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: block; transition: transform .12s ease, box-shadow .12s ease; }
.recipe-card:hover { transform: translateY(-3px); box-shadow: var(--hover-shadow); }
.recipe-card-img { aspect-ratio: 4 / 3; background: var(--bg); }
.recipe-card-body { padding: 14px 16px 18px; }
.recipe-card h3 { font-size: 1.05rem; margin: 8px 0 6px; color: var(--heading); }
.recipe-card .meta { font-size: .85rem; color: var(--muted); margin: 0; }

.chip { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); background: var(--chip-bg); padding: 4px 10px; border-radius: 999px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 4px; }
.filter-btn { border: 1px solid var(--border); background: var(--card-bg); color: var(--fg); padding: 8px 16px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: .88rem; }
.filter-btn.active, .filter-btn:hover { border-color: var(--accent); color: var(--accent); }

/* recipe page: stacked by default; the Editorial theme turns .recipe-top into
   a split info-panel-beside-photo layout */
.recipe-top { margin-bottom: 28px; }
.recipe-photo { aspect-ratio: 16 / 9; background: var(--card-bg); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.recipe-photo img { width: 100%; height: 100%; object-fit: cover; }
.recipe-intro h1 { margin: 10px 0 8px; }
.action-row { display: none; } /* editorial-only feature */
.recipe-intro .excerpt { font-size: 1.05rem; color: var(--muted); }
.recipe-meta { display: flex; gap: 28px; margin: 18px 0 30px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.recipe-meta div { display: flex; flex-direction: column; }
.recipe-meta strong { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.recipe-body { }
.recipe-body ul, .recipe-body ol { padding-left: 20px; }
.recipe-body li { margin-bottom: 8px; }
.notes { margin-top: 34px; }
.notes h3 { font-size: 1.05rem; margin: 0 0 4px; }
.notes .note { margin-bottom: 18px; }
.notes .note p { margin: 0; }
.tip-box { margin-top: 30px; padding: 16px 20px; background: var(--chip-bg); border-left: 4px solid var(--accent); border-radius: 6px; }
.tags { margin-top: 20px; }
.tag { display: inline-block; margin: 4px 6px 0 0; font-size: .82rem; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; margin-top: 40px; }
.site-footer p { font-size: .85rem; color: var(--muted); margin: 0; }

@media (max-width: 700px) {
  .recipe-body { grid-template-columns: 1fr; }
  .site-header nav a { margin-left: 14px; }
}
