/* RecipeHub Pro — public site styles. Logical properties (inline-start/end) keep Hebrew and Arabic layouts mirrored. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #0f1a14;
  --ink-2: #3b4a41;
  --muted: #6b7b71;
  --line: #e5ece7;
  --brand: #15803d;
  --brand-dark: #166534;
  --brand-soft: #e8f5ec;
  --herb: #b45309;
  --herb-soft: #fef3e2;
  --mint: #f1f8f3;
  --gold: #e3a008;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 3px rgba(15, 26, 20, .08), 0 10px 28px rgba(15, 26, 20, .06);
  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1200px;
}
.lang-ja { --font-head: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif; --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif; }
.lang-he { --font-head: "Frank Ruhl Libre", "Times New Roman", serif; --font-body: "Heebo", "Arial Hebrew", system-ui, sans-serif; }
.lang-ar { --font-head: "Noto Kufi Arabic", "Geeza Pro", sans-serif; --font-body: "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--font-body); }
.lang-ar body, body.lang-ar { line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: var(--ink); margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
.lang-he h1, .lang-he h2, .lang-he h3, .lang-ar h1, .lang-ar h2, .lang-ar h3, .lang-ja h1, .lang-ja h2, .lang-ja h3 { letter-spacing: 0; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
.hp { position: absolute; inset-inline-start: -9999px; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .wrap { padding-inline: 24px; } }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: .6em; }
.lang-he .eyebrow, .lang-ar .eyebrow { letter-spacing: 0; text-transform: none; }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: 44px; padding: .55em 1.2em; border-radius: 999px; border: 1.5px solid var(--brand); background: var(--brand); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand); }
.btn-ghost[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.chip { display: inline-block; padding: .2em .75em; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .78rem; font-weight: 600; text-decoration: none; }
.chip-soft { background: var(--herb-soft); color: var(--herb); }
.chip-light { background: rgba(255,255,255,.92); color: var(--brand-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1em; }
.note { padding: .75em 1em; border-radius: 10px; font-weight: 500; }
.note-success { background: var(--brand-soft); color: var(--brand-dark); }
.note-error { background: #fde8e8; color: #9b1c1c; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .95); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: "Poppins", system-ui, sans-serif; font-size: 1.25rem; letter-spacing: -.02em; font-weight: 700; white-space: nowrap; }
.logo b { color: var(--brand); }
.logo-light { color: #fff; }
.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.main-nav a { white-space: nowrap; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current] { background: var(--brand-soft); color: var(--brand-dark); }
.header-tools { display: flex; align-items: center; gap: 4px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.badge { position: absolute; top: 3px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.badge[hidden] { display: none; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 10px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { background: var(--brand-soft); }
.lang-menu ul { position: absolute; inset-inline-end: 0; top: 46px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 150px; }
.lang-menu a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.lang-menu a:hover, .lang-menu a[aria-current] { background: var(--brand-soft); color: var(--brand-dark); }
.menu-btn { display: none; }
@media (max-width: 960px) {
  .menu-btn { display: inline-grid; }
  .main-nav { display: none; position: absolute; inset-inline: 0; top: 68px; flex-direction: column; padding: 8px 16px 16px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px; border-radius: 10px; }
  .header-tools { margin-inline-start: auto; }
  .lang-menu summary span { display: none; }
}
.search-panel { border-top: 1px solid var(--line); background: #fff; padding: 14px 0; }
.search-form { position: relative; display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); }
.search-results { position: absolute; top: 56px; inset-inline: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; z-index: 5; }
.search-results a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a:focus { background: var(--brand-soft); }
.search-results img { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; }
.search-results .all { justify-content: center; font-weight: 600; color: var(--brand-dark); }

/* Breadcrumbs */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 16px 0 0; list-style: none; font-size: .85rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "›"; margin-inline-start: 6px; }
[dir="rtl"] .crumbs li:not(:last-child)::after { content: "‹"; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-dark); text-decoration: underline; }
.crumbs li[aria-current] { color: var(--ink-2); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Hero */
.hero { padding: 32px 0 28px; background: linear-gradient(180deg, var(--mint), #fff); }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1fr 1.05fr; gap: 48px; } .hero { padding: 48px 0 16px; } }
.hero-search { display: flex; gap: 8px; max-width: 520px; margin: 22px 0 14px; }
.center .hero-search { margin-inline: auto; }
.hero-search input { flex: 1; min-width: 0; height: 52px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); }
.hero-search .btn { min-height: 52px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .95rem; }
.hero-links a { font-weight: 600; }
.hero-feature { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; color: #fff; text-decoration: none; }
.hero-feature img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.hero-feature:hover img { transform: scale(1.03); }
.hero-feature-text { position: absolute; inset: auto 0 0 0; padding: 70px 22px 20px; background: linear-gradient(transparent, rgba(20, 16, 12, .82)); display: grid; gap: 6px; justify-items: start; }
.hero-feature-text strong { font-family: var(--font-head); font-size: clamp(1.25rem, 2.6vw, 1.8rem); line-height: 1.2; }
.hero-feature:hover { color: #fff; }

/* Sections and grids */
.section { margin-top: 48px; }
.section-sm { margin-top: 40px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.more { white-space: nowrap; font-weight: 600; text-decoration: none; }
.more::after { content: " →"; }
[dir="rtl"] .more::after { content: " ←"; }
.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.page-head { padding: 28px 0 8px; }
.page-head h1 { margin-bottom: .3em; }

/* Recipe card */
.card { background: var(--surface); border: 1px solid transparent; box-shadow: 0 1px 3px rgba(15, 26, 20, .08); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { display: block; aspect-ratio: 4 / 3; background: var(--mint); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-logo img { object-fit: contain; padding: 18px; background: #fff; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; align-items: flex-start; }
.card-title { font-size: 1.08rem; margin: 0; line-height: 1.3; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--brand-dark); }
.card-text { color: var(--ink-2); font-size: .92rem; margin: 0; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: auto 0 0; padding-top: 4px; color: var(--muted); font-size: .85rem; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-rating { color: var(--ink-2); }
.card-rating small { color: var(--muted); }

/* Category tiles */
.cat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.cat-grid-lg { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.cat-tile { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #22a355, var(--brand-dark)); color: #fff; text-decoration: none; }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile span { position: absolute; inset: auto 0 0 0; padding: 36px 12px 10px; background: linear-gradient(transparent, rgba(20, 16, 12, .8)); display: grid; }
.cat-tile strong { font-size: 1rem; line-height: 1.25; }
.cat-tile small { opacity: .85; font-size: .8rem; }
.cat-tile:hover { color: #fff; }

/* Promise block */
.promise { display: grid; gap: 20px; padding: 28px; border-radius: var(--radius-lg); background: var(--mint); align-items: end; }
@media (min-width: 900px) { .promise { grid-template-columns: 1fr auto; padding: 36px 40px; } }
.promise-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.promise-list strong { display: block; color: var(--brand-dark); margin-bottom: 2px; }
.promise-list span { color: var(--ink-2); font-size: .95rem; }

/* Filters and pager */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 24px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.filters input, .filters select { height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; max-width: 100%; }
.filters .f-search { flex: 1 1 220px; }
.filters .f-search input { width: 100%; }
.reset { font-weight: 600; }
.empty { text-align: center; padding: 48px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 36px 0 8px; }
.pager a, .pager span { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.pager [aria-current] { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Recipe page */
.recipe { padding-top: 12px; }
.recipe-head { display: grid; gap: 24px; align-items: center; margin-top: 12px; }
@media (min-width: 960px) { .recipe-head { grid-template-columns: 1fr 1fr; gap: 40px; } }
.recipe-hero { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--mint); aspect-ratio: 4 / 3; }
.recipe-hero img { width: 100%; height: 100%; object-fit: cover; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; }
.byline img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.byline .dot { opacity: .6; }
.rating-link { text-decoration: none; color: var(--ink-2); }
.stars { color: var(--gold); letter-spacing: 1px; }
.stars-off { color: #d6ddd8; }
.recipe-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; margin: 28px 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--surface); padding: 14px 16px; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.lang-he .facts dt, .lang-ar .facts dt { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.facts dd { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; }
.facts-inline { display: inline-grid; grid-template-columns: repeat(2, auto); margin: 8px 0; }
.recipe-layout { display: grid; gap: 40px; }
@media (min-width: 1024px) { .recipe-layout { grid-template-columns: minmax(0, 1fr) 320px; } .recipe-side { position: sticky; top: 90px; align-self: start; } }
.prose { font-size: 1.04rem; color: var(--ink-2); }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose img { border-radius: var(--radius); margin: 1em 0; }
.prose a { color: var(--brand-dark); }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 24px 0; }
.gallery img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; }

.recipe-card { margin-top: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 90px; }
.rc-head { padding: 22px 24px; background: var(--brand-soft); }
.rc-head h2 { margin: 0 0 4px; }
.rc-head p { margin: 0; color: var(--ink-2); }
.rc-section { padding: 22px 24px; border-top: 1px solid var(--line); }
.rc-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.rc-row h3 { margin: 0; }
.scaler { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; }
.scaler button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: 1.1rem; cursor: pointer; }
.scaler output { min-width: 1.6em; text-align: center; font-weight: 700; }
.ingredients { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ingredients label { display: flex; gap: 12px; align-items: flex-start; padding: 8px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.ingredients input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--herb); flex: none; }
.ingredients input:checked + span { color: var(--muted); text-decoration: line-through; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 18px; }
.steps li { counter-increment: step; position: relative; padding-inline-start: 50px; scroll-margin-top: 90px; }
.steps li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.steps p { margin: 4px 0 0; }
.step-img { margin-top: 12px; border-radius: 12px; }
.nutrition { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 0 0 10px; }
.nutrition div { padding: 10px 12px; background: var(--mint); border-radius: 10px; }
.nutrition dt { font-size: .8rem; color: var(--muted); }
.nutrition dd { margin: 0; font-weight: 700; }
.video { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.video video, .video iframe, .yt, .yt img { width: 100%; height: 100%; border: 0; display: block; object-fit: cover; }
.yt { position: relative; padding: 0; border: 0; cursor: pointer; background: #000; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 50px; border-radius: 14px; background: #e00; color: #fff; display: grid; place-items: center; font-size: 22px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; font-size: .85rem; color: var(--muted); }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.side-box h2 { font-size: 1.1rem; }
.author-box { text-align: center; }
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; }
.author-box p { font-size: .92rem; color: var(--ink-2); }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mini-list a { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; line-height: 1.3; }
.mini-list img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; flex: none; }
.mini-list small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* Reviews and forms */
.review-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 14px; }
.review-list li { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.review-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 4px; }
.review-head time { color: var(--muted); font-size: .85rem; }
.form { display: grid; gap: 14px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 20px; }
.form h3 { margin: 0; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form input[type=text], .form input[type=email], .form textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fafcfb; font-weight: 400; }
.form textarea { resize: vertical; }
.form .btn { justify-self: start; }
.form-row { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.star-input { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
[dir="rtl"] .star-input { flex-direction: row-reverse; }
.star-input legend { font-weight: 600; font-size: .92rem; margin-bottom: 4px; float: left; width: 100%; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 1.9rem; color: #d6ddd8; cursor: pointer; line-height: 1; padding: 2px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 3px solid var(--brand); border-radius: 6px; }

/* Menus */
.menu-head { display: flex; gap: 20px; align-items: center; }
.menu-logo { width: 120px; height: auto; background: #fff; border-radius: 12px; padding: 10px; border: 1px solid var(--line); }
.menu-group { margin-top: 32px; }
.menu-table { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.menu-row { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 14px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.menu-row:last-child { border-bottom: 0; }
.menu-row:hover { background: var(--brand-soft); }
.menu-row img { width: 64px; height: 44px; object-fit: cover; border-radius: 8px; }
.menu-name { font-weight: 600; }
.menu-price { font-weight: 700; color: var(--herb); }

/* Footer */
.site-footer { margin-top: 72px; background: #0f1a14; color: #c9d6cd; padding: 48px 0 24px; }
.site-footer a { color: #e8f5ec; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.site-footer h2 { color: #fff; font-family: var(--font-body); font-size: .95rem; font-weight: 700; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer p { font-size: .93rem; }
.newsletter { display: flex; flex-wrap: wrap; gap: 8px; }
.newsletter input { flex: 1 1 180px; min-width: 0; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #2c3d33; background: #18271e; color: #fff; }
.nl-msg { flex-basis: 100%; margin: 4px 0 0; font-size: .9rem; min-height: 1.2em; }
.footer-langs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.footer-langs a { padding: 4px 10px; border: 1px solid #2c3d33; border-radius: 999px; font-size: .85rem; }
.footer-langs a[aria-current] { background: #e8f5ec; color: #0f1a14; }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid #22342a; font-size: .85rem; color: #8fa397; }

/* Print: only the recipe card */
@media print {
  .site-header, .site-footer, .crumbs, .recipe-actions, .recipe-side, .reviews, .faq, .gallery, .recipe-story, .video, .tags, .scaler { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .recipe-card { box-shadow: none; border: 0; margin: 0; }
  .recipe-head { grid-template-columns: 1fr 220px; }
  .recipe-hero { box-shadow: none; }
  .ingredients input { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.logo svg { color: var(--brand); }
@media (max-width: 440px) {
  .header-row { gap: 6px; }
  .logo { font-size: 1.05rem; gap: 6px; }
  .logo svg { width: 28px; height: 28px; }
  .icon-btn { width: 38px; height: 38px; }
  .lang-menu summary { padding: 0 6px; }
}

/* ===== Header v2: top strip, search bar, category row ===== */
.topbar { background: var(--brand-dark); color: #e8f5ec; font-size: .82rem; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.topbar-msg { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.topbar-langs { display: flex; gap: 2px; }
.topbar-langs a { color: #cfe9d8; text-decoration: none; font-weight: 600; font-size: .75rem; padding: 3px 7px; border-radius: 6px; letter-spacing: .03em; }
.topbar-langs a:hover { background: rgba(255,255,255,.12); color: #fff; }
.topbar-langs a[aria-current] { background: #fff; color: var(--brand-dark); }
.site-header { box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(15, 26, 20, .04); border-bottom: 0; }
.header-row { min-height: 76px; gap: 24px; }
.logo { font-size: 1.4rem; }
.logo b { color: var(--brand); }
.header-search { position: relative; flex: 1; max-width: 560px; margin-inline: auto; display: flex; align-items: center; }
.header-search > svg { position: absolute; inset-inline-start: 18px; color: var(--muted); pointer-events: none; }
.header-search input { width: 100%; height: 50px; padding-inline: 50px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--mint); font-size: .95rem; transition: border-color .15s, background .15s, box-shadow .15s; }
.header-search input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(21, 128, 61, .12); }
.header-search .search-results { top: 58px; inset-inline: 0; }
.header-tools { gap: 6px; }
.icon-btn { width: 44px; height: 44px; background: var(--mint); }
.lang-menu summary { background: var(--mint); height: 44px; padding: 0 14px; }
.lang-menu .caret { opacity: .6; }
.search-toggle { display: none; }
.subnav { border-top: 1px solid var(--line); background: #fff; }
.subnav-row { display: flex; align-items: center; gap: 4px; min-height: 50px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.subnav-row::-webkit-scrollbar { display: none; }
.subnav a { flex: none; padding: 7px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: .92rem; font-weight: 500; white-space: nowrap; }
.subnav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.subnav a[aria-current] { background: var(--brand); color: #fff; }
.subnav .subnav-main { font-weight: 700; color: var(--ink); }
.subnav-sep { flex: none; width: 1px; height: 22px; background: var(--line); margin: 0 8px; }
.subnav-about { margin-inline-start: auto; }
.main-nav, .menu-btn { display: none !important; }
@media (max-width: 860px) {
  .header-search { display: none; }
  .search-toggle { display: inline-grid; }
  .header-tools { margin-inline-start: auto; }
  .header-row { min-height: 64px; }
  .topbar-langs { display: none; }
  .subnav-about { margin-inline-start: 0; }
}
@media (max-width: 440px) {
  .icon-btn { width: 40px; height: 40px; }
  .lang-menu summary { padding: 0 10px; height: 40px; }
  .lang-menu summary span, .lang-menu .caret { display: none; }
  .topbar { font-size: .76rem; }
}

/* ===== Recipe top v2 ===== */
.btn .ic { flex: none; }
.btn-lg { min-height: 50px; padding-inline: 1.5em; font-size: 1.02rem; box-shadow: 0 6px 16px rgba(21, 128, 61, .25); }
.btn-icon { width: 46px; padding: 0; }
.recipe-top { position: relative; display: grid; gap: 28px; margin-top: 14px; padding: 22px; border-radius: 28px; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, #dcf3e3 0%, rgba(220, 243, 227, 0) 55%), radial-gradient(90% 80% at 0% 100%, #fff4e5 0%, rgba(255, 244, 229, 0) 60%), var(--mint); }
@media (min-width: 960px) { .recipe-top { grid-template-columns: 1.05fr 1fr; gap: 44px; padding: 44px 44px 30px; align-items: center; } }
.recipe-top::before { content: ""; position: absolute; inset-inline-end: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(21, 128, 61, .06); pointer-events: none; }
.recipe-top h1 { font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.08; margin-bottom: .35em; }
.recipe-top .chip { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 2px rgba(15, 26, 20, .08); }
.recipe-top .chip:hover { background: var(--brand); color: #fff; }
.recipe-top .lede { font-size: 1.06rem; margin-bottom: 1.1em; }
.rating-pill { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: .9rem; }
.rating-pill span { color: var(--muted); }
.author-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.author-row img, .author-row .avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(15, 26, 20, .12); }
.author-row .avatar { display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; }
.author-meta { display: grid; line-height: 1.35; font-size: .92rem; color: var(--muted); }
.author-meta a { color: var(--ink); font-weight: 600; text-decoration: none; }
.author-meta a:hover { color: var(--brand-dark); text-decoration: underline; }
.recipe-top .recipe-actions { margin-top: 0; gap: 10px; }
.recipe-top .btn-ghost { background: #fff; border-color: #fff; box-shadow: 0 1px 3px rgba(15, 26, 20, .08); }
.recipe-top .btn-ghost:hover { border-color: var(--brand); }
.recipe-photo { position: relative; margin: 0; }
.recipe-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; border: 6px solid #fff; box-shadow: 0 18px 40px rgba(15, 26, 20, .16); }
@media (min-width: 960px) { .recipe-photo img { transform: rotate(1.2deg); } [dir="rtl"] .recipe-photo img { transform: rotate(-1.2deg); } }
.photo-badge { position: absolute; inset-inline-start: -10px; bottom: 22px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; background: #fff; color: var(--ink); font-weight: 700; font-size: .95rem; box-shadow: 0 10px 24px rgba(15, 26, 20, .16); }
.photo-badge .ic { color: var(--brand); }
@media (max-width: 600px) { .photo-badge { inset-inline-start: 10px; bottom: 14px; font-size: .85rem; } }
.recipe-top .facts { grid-column: 1 / -1; margin: 6px 0 0; gap: 10px; background: transparent; border: 0; border-radius: 0; overflow: visible; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.recipe-top .facts > div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(15, 26, 20, .06); }
.fact-ic { grid-row: span 2; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.recipe-top .facts > div:nth-child(6n+2) .fact-ic { background: #fff1e0; color: #c2410c; }
.recipe-top .facts > div:nth-child(6n+4) .fact-ic { background: #e9f1ff; color: #1d4ed8; }
.recipe-top .facts > div:nth-child(6n+6) .fact-ic { background: #fde8ec; color: #be123c; }
.recipe-top .facts dt { font-size: .74rem; }
.recipe-top .facts dd { margin: 0; font-size: 1.02rem; }
.recipe-top + .recipe-layout { margin-top: 40px; }
@media print { .recipe-top { background: none; padding: 0; } .topbar, .subnav, .photo-badge { display: none !important; } .recipe-photo img { transform: none; box-shadow: none; } }
.recipe-top .facts { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .recipe-top .facts { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .recipe-top .facts { grid-template-columns: repeat(6, 1fr); } }
