/* Shared design tokens + components (both apps) */
:root {
  --sage: #6B8F71; --sage-d: #4F7357; --sage-l: #DDE8DB; --turmeric: #E39B2D; --turmeric-d: #B97A14; --cream: #FBF6EC; --cream-2: #F4ECDB;
  --ink: #2B3A2F; --ink-2: #5B6B5F; --line: #E6DDC9; --card: #FFFFFF; --danger: #B3453A;
  --shadow: 0 1px 2px rgba(43,58,47,.06), 0 6px 18px rgba(43,58,47,.08);
  --shadow-l: 0 10px 40px rgba(43,58,47,.22);
  --r: 16px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: var(--sage-d); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--turmeric) 70%, white); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

.btn { border: 0; background: var(--sage); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: .92rem; box-shadow: 0 2px 0 rgba(0,0,0,.08); transition: transform .08s, background .15s; white-space: nowrap; }
.btn:hover { background: var(--sage-d); }
.btn:active { transform: translateY(1px); }
.btn.alt { background: var(--turmeric); color: #2b1d04; }
.btn.alt:hover { background: #D18D20; }
.btn.ghost { background: transparent; color: var(--sage-d); border: 1.5px solid var(--sage); box-shadow: none; }
.btn.ghost:hover { background: var(--sage-l); }
.btn.sm { padding: 6px 12px; font-size: .82rem; }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid #E7C3BE; box-shadow: none; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.chip { border: 1.5px solid var(--line); background: #fff; color: var(--ink); padding: 6px 12px; border-radius: 999px; font-size: .86rem; font-weight: 600; transition: all .12s; }
.chip:hover { border-color: var(--sage); }
.chip[aria-pressed="true"] { background: var(--sage); border-color: var(--sage); color: #fff; }
.chip.t[aria-pressed="true"] { background: var(--turmeric); border-color: var(--turmeric); color: #2b1d04; }

.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--sage-l); color: var(--sage-d); }
.pill.tag-high-protein { background: #F9E4BD; color: #8A5A07; }
.pill.tag-vegan { background: #D6EBCB; color: #3E6B2E; }
.pill.warn { background: #FBE3D8; color: #9A3F22; }

.rimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--cream-2); }
.ph { display: grid; place-items: center; aspect-ratio: 4 / 3; width: 100%; }
.ph span { font-size: clamp(2rem, 8vw, 3.2rem); filter: drop-shadow(0 2px 4px rgba(0,0,0,.12)); }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }

input[type=search], input[type=text], select { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 12px; min-width: 0; }
input[type=search]:focus, input[type=text]:focus, select:focus { border-color: var(--sage); outline: none; box-shadow: 0 0 0 3px var(--sage-l); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--sage); flex: none; }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(43,58,47,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; padding: 0; backdrop-filter: blur(2px); }
.modal { background: var(--cream); width: 100%; max-height: 94vh; overflow: auto; border-radius: 24px 24px 0 0; box-shadow: var(--shadow-l); position: relative; animation: up .22s ease-out; overscroll-behavior: contain; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.modal .x { position: sticky; top: 10px; float: right; margin: 10px 10px -44px 0; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); box-shadow: var(--shadow); font-size: 1.2rem; z-index: 2; }
.d-hero .rimg { aspect-ratio: 16 / 9; border-radius: 24px 24px 0 0; }
.d-body { padding: 18px 20px 24px; }
.d-body h2 { font-size: 1.55rem; line-height: 1.15; margin: 2px 0 4px; }
.d-body h3 { font-size: 1.05rem; margin: 20px 0 8px; color: var(--sage-d); text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; }
.kicker { font-size: .78rem; font-weight: 800; color: var(--turmeric-d); text-transform: uppercase; letter-spacing: .08em; }
.sub { color: var(--ink-2); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 8px; font-weight: 600; font-size: .92rem; }
.meta small { font-weight: 500; color: var(--ink-2); }
.dots { color: var(--turmeric); letter-spacing: 2px; } .dots i { font-style: normal; color: var(--line); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ing { list-style: none; margin: 0; padding: 0; }
.ing li { padding: 7px 0 7px 26px; border-bottom: 1px dashed var(--line); position: relative; }
.ing li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--sage-l); border: 2px solid var(--sage); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; padding: 8px 0 8px 40px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 7px; width: 28px; height: 28px; border-radius: 50%; background: var(--turmeric); color: #2b1d04; font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.note { margin-top: 14px; background: #FFF3DA; border-radius: 12px; padding: 10px 14px; font-size: .93rem; }
.note.alt { background: var(--sage-l); }
.note b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--turmeric-d); }
.note.alt b { color: var(--sage-d); }

.disclaimer { max-width: 900px; margin: 34px auto 0; padding: 18px 20px 30px; text-align: center; font-size: .8rem; color: var(--ink-2); }
.disclaimer b { color: var(--ink); }

#toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .9rem; opacity: 0; pointer-events: none; transition: all .2s; z-index: 80; box-shadow: var(--shadow-l); max-width: 90vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 760px) {
  .overlay { align-items: center; padding: 24px; }
  .modal { max-width: 760px; border-radius: 24px; max-height: 90vh; }
  .d-hero .rimg { border-radius: 24px 24px 0 0; aspect-ratio: 20 / 9; }
  .d-body { padding: 22px 32px 30px; }
  .d-two { display: grid; grid-template-columns: 1fr 1.2fr; gap: 0 32px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
