/* ESOS Meals: calm, uncluttered, large type, big tap targets.
   ESOS colors: navy #12305E for text/buttons; sky blue #3BA7F5 is for marks only. */
:root {
  --navy: #12305E;
  --sky: #3BA7F5;
  --ink: #1b2430;
  --muted: #5a6573;
  --line: #e3e8ef;
  --bg: #f7f9fc;
  --card: #ffffff;
  --ok: #1f7a4d;
  --warn: #8a5a00;
  --radius: 18px;
  --tap: 52px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #eef2f7; --muted: #a9b4c2; --line: #2a3546; --bg: #0f1724; --card: #172235; --navy: #cfe3ff; }
  .btn.primary { color: #0f1724 !important; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 18px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
a { color: var(--navy); }
img { max-width: 100%; display: block; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .2em 0 .5em; }
h2 { font-size: 1.25rem; margin: 1.4em 0 .5em; }
h3 { font-size: 1.05rem; margin: 1em 0 .3em; }
p { margin: .4em 0 .9em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px 18px; }

.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; max-width: 720px; margin: 0 auto; }
.topbar .brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 700; }
.topbar .brand svg { width: 34px; height: 34px; }
.topbar .who { margin-left: auto; color: var(--muted); font-size: .9rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; }
.card.flat { padding: 14px 16px; }
.tonight { padding: 0; overflow: hidden; }
.tonight img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.tonight .body { padding: 18px; }
.tonight .label { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--muted); font-weight: 700; }
.tonight h1 { margin: .15em 0 .3em; }

.btn, button.btn, input[type=submit].btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 20px; border-radius: 14px; border: 2px solid var(--navy);
  background: transparent; color: var(--navy); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--navy); color: #fff; }
.btn.block { width: 100%; }
.btn.quiet { border-color: var(--line); color: var(--ink); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: .95rem; border-radius: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.actions form { margin: 0; }
.stack > * + * { margin-top: 10px; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url],
select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 14px; font: inherit; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: 12px;
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 12px; font-weight: 500; min-height: var(--tap); margin: 0; }
.check input { width: 26px; height: 26px; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 4px; }

.flash { background: #eaf4ff; color: #12305E; border-radius: 14px; padding: 12px 16px; margin: 10px 0; }
@media (prefers-color-scheme: dark) { .flash { background: #1d3150; color: #eaf4ff; } }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.chip { flex: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px;
        border: 2px solid var(--line); text-decoration: none; color: var(--ink); background: var(--card); font-weight: 550; }
.chip.on { border-color: var(--navy); background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.on { color: #0f1724; } }

details.filters { margin: 8px 0 14px; }
details.filters summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 650; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); }
.tile img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: var(--line); }
.tile .t { padding: 10px 12px; font-weight: 600; line-height: 1.3; }
.tile .m { padding: 0 12px 12px; color: var(--muted); font-size: .85rem; }

.hero-img { width: 100%; border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; background: var(--line); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); margin: 6px 0 10px; }
ul.clean { list-style: none; padding: 0; margin: 0; }
ul.clean li { padding: 12px 0; border-bottom: 1px solid var(--line); }
ol.steps li { margin: 0 0 12px; }
.note { background: #fff6e0; color: #5a3d00; border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
@media (prefers-color-scheme: dark) { .note { background: #3a2f12; color: #ffe7a8; } }

.day { margin: 16px 0; }
.day h3 { display: flex; align-items: baseline; gap: 10px; }
.day h3 .tag { font-size: .8rem; font-weight: 600; color: var(--warn); }
.meal { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.meal img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.meal .info { flex: 1; min-width: 0; }
.meal .slot { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.meal .name { font-weight: 600; display: block; text-decoration: none; color: var(--ink); }
.meal form { margin: 0; }

.list-item { display: flex; align-items: center; gap: 14px; min-height: var(--tap); padding: 6px 0; border-bottom: 1px solid var(--line); }
.list-item button.tick { width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--navy); background: transparent; flex: none; cursor: pointer; font-size: 1.1rem; color: #fff; }
.list-item.done button.tick { background: var(--navy); }
.list-item.done .what { text-decoration: line-through; color: var(--muted); }
.list-item .what { flex: 1; }
.list-item .qty { color: var(--muted); font-size: .95rem; }

.vote { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vote input { position: absolute; opacity: 0; }
.vote label { margin: 0; min-height: 48px; padding: 0 16px; display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; font-weight: 600; cursor: pointer; }
.vote input:checked + label { border-color: var(--navy); background: var(--navy); color: #fff; }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.stars input { position: absolute; opacity: 0; }
.stars label { margin: 0; font-size: 2rem; line-height: 1; color: #c5ccd6; cursor: pointer; padding: 2px; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #f2a900; }
.starline { color: #c48a00; font-weight: 700; }
.review { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review.hidden { opacity: .6; }

nav.bottom { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 10; }
nav.bottom a { flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: .8rem; font-weight: 600;
  min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
nav.bottom a svg { width: 26px; height: 26px; }
nav.bottom a.on { color: var(--navy); }
.pager { display: flex; justify-content: space-between; margin: 18px 0; }
.empty { text-align: center; padding: 30px 10px; }
.copybox { display: flex; gap: 8px; }
.copybox input { flex: 1; }
.right { text-align: right; }
.sr { position: absolute; left: -9999px; }

/* Footer: quiet links and recipe-source credit. */
.site-footer { max-width: 720px; margin: 8px auto 0; padding: 8px 18px 20px; text-align: center; color: var(--muted); font-size: .85rem; }
.site-footer p { margin: .3em 0; }
.site-footer a { color: var(--muted); }

/* Terms and Privacy pages. */
.legal h2 { font-size: 1.15rem; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: .3em 0; }
.legal .note { border-left: 4px solid var(--line); padding-left: 12px; }
