/* Wat ligt er nog? — fris, warm en rustig. Kleuren zijn een voorlopige keuze (natuurlijke tinten); aanpassen kan hier. */
:root {
  --groen: #3f6b4f;
  --groen-donker: #2f5240;
  --groen-licht: #e6efe7;
  --room: #faf6ef;
  --wit: #fff;
  --tekst: #24302a;
  --grijs: #59645d;
  --rand: #737e77;
  --warm: #9c4a28;
  --warm-licht: #f7e6dc;
  --geel: #fff4cc;
  --radius: 12px;
  --schaduw: 0 1px 3px rgba(30, 40, 35, .12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; scroll-padding-bottom: 96px; }
@media (max-height: 500px) { .kop, .verder.plak { position: static; } html { scroll-padding-top: 0; scroll-padding-bottom: 0; } }
h1, h2, h3, .naam { overflow-wrap: anywhere; hyphens: auto; }
body {
  margin: 0; background: var(--room); color: var(--tekst);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 1.2rem 0 .3rem; }
h2 { font-size: 1.25rem; margin: 1.6rem 0 .4rem; }
h3 { font-size: 1.1rem; margin: 0 0 .3rem; }
h1:focus { outline: none; }
a { color: var(--groen-donker); }
p { margin: .5rem 0; }
.sub { color: var(--grijs); margin-top: 0; }
.grijs { color: var(--grijs); font-weight: normal; }
.klein { font-size: .9rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.overslaan { position: absolute; left: -9999px; top: 0; background: var(--wit); padding: 8px 12px; min-height: 44px; display: inline-flex; align-items: center; z-index: 10; }
.overslaan:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 2px; }

.concept { background: var(--geel); color: var(--tekst); font-size: .9rem; text-align: center; padding: 6px 16px; }
.kop { background: var(--wit); box-shadow: var(--schaduw); position: sticky; top: 0; z-index: 5; }
.kop-binnen { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.merk { font-weight: 700; font-size: 1.15rem; color: var(--tekst); text-decoration: none; }
.teller { display: inline-block; min-width: 1.6em; padding: 0 .4em; border-radius: 999px; background: var(--groen); color: var(--wit); font-size: .85rem; text-align: center; }
.stappen ol { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0 0 8px; overflow-x: auto; }
.stappen li { flex: 1; }
.stappen a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 4px; border-radius: 8px; color: var(--grijs); text-decoration: none; font-size: .95rem; min-height: 44px; white-space: nowrap; }
.stappen a span { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; border: 2px solid currentColor; font-size: .8rem; font-weight: 700; }
.stappen a[aria-current="step"] { background: var(--groen-licht); color: var(--groen-donker); font-weight: 700; }

.knop {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 18px;
  border: 2px solid var(--groen); border-radius: var(--radius); background: var(--groen); color: var(--wit);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center;
}
.knop:hover { background: var(--groen-donker); border-color: var(--groen-donker); }
.knop.licht { background: var(--wit); color: var(--groen-donker); }
.knop.licht:hover { background: var(--groen-licht); }
.knop.klein { min-height: 44px; padding: 6px 12px; font-size: .95rem; }
.knop.groot { min-height: 56px; font-size: 1.05rem; }
.knop.warm { background: var(--warm); border-color: var(--warm); }
.knop:disabled, .knop[aria-disabled="true"], button[aria-disabled="true"] { background: #d9ddd9; border-color: #d9ddd9; color: #4a524d; cursor: not-allowed; }
/* tekst om zelf te kopiëren als het klembord niet werkt */
.handmatig { margin: 12px 0; }
.handmatig label { display: block; margin-bottom: 4px; }
.handmatig textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: .9rem; padding: 8px; }
/* losse tekstlinks (niet in een zin): groot genoeg tikdoel */
a.los { display: inline-flex; align-items: center; min-height: 44px; }
/* losse tekstlinks in kruimelpad, linklijsten en voet: tikdoel minstens 24 px hoog (WCAG 2.5.8); links midden in een zin vallen erbuiten */
/* Losse links (kruimelpad, lijsten, voettekst) zijn op een telefoon goed raak te tikken: minstens 44 px hoog. */
nav[aria-label="Kruimelpad"] a, main li > a, .linkrij a, .voet a, .voet .link, main h2 > a, main h3 > a, a.merk { display: inline-flex; align-items: center; min-height: 44px; }
.link { background: none; border: 0; padding: 0; color: var(--groen-donker); text-decoration: underline; font: inherit; cursor: pointer; min-height: 44px; }
.knoppen { display: flex; flex-wrap: wrap; gap: 8px; }
.knoppen[hidden] { display: none; }
.verder { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin: 2rem 0; }
.verder.plak { position: sticky; bottom: 0; z-index: 3; background: var(--room); padding: 10px 0; margin-bottom: 0; box-shadow: 0 -6px 10px -8px rgba(30, 40, 35, .35); }

label { display: block; font-weight: 600; margin-bottom: 4px; }
input[type="text"], input[type="number"], select {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--tekst);
  border: 2px solid var(--rand); border-radius: 10px; background: var(--wit);
}
input[type="number"] { max-width: 9rem; }
fieldset { border: 0; padding: 0; margin: 1.4rem 0; }
legend { font-weight: 700; font-size: 1.1rem; padding: 0; margin-bottom: 6px; }
legend .grijs { display: block; font-size: .9rem; }
.veld { margin: 1rem 0; }
.rij { display: flex; gap: 8px; }
.rij input { flex: 1; min-width: 0; }
.rij.weekkies { flex-wrap: wrap; align-items: center; }
.raster { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.keuzes, .vinkjes { display: flex; flex-wrap: wrap; gap: 8px; }
.keuzes label, .vinkjes label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 14px; margin: 0;
  border: 2px solid var(--rand); border-radius: 999px; background: var(--wit); font-weight: 500; cursor: pointer;
}
.keuzes label:has(input:checked), .vinkjes label:has(input:checked) { border-color: var(--groen); background: var(--groen-licht); font-weight: 700; }
.keuzes input, .vinkjes input { width: 20px; height: 20px; accent-color: var(--groen); margin: 0; }
.grens { background: var(--groen-licht); border-radius: 8px; padding: 8px 12px; font-weight: 600; }
.stapper { display: flex; gap: 6px; align-items: center; }
.stapper .knop { width: 48px; padding: 0; font-size: 1.3rem; }
.stapper input { text-align: center; max-width: 5rem; }

.tabs { display: flex; gap: 6px; margin: 1rem 0 0; }
.tabs [role="tab"] {
  flex: 1; min-height: 52px; font: inherit; font-weight: 700; color: var(--groen-donker); cursor: pointer;
  border: 2px solid var(--groen); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--wit);
}
.tabs [aria-selected="true"] { background: var(--groen); color: var(--wit); }
.paneel { background: var(--wit); border: 2px solid var(--groen); border-radius: 0 0 var(--radius) var(--radius); padding: 16px; }
#invoer-form { display: grid; gap: 8px; }
.combo { position: relative; }
.sugg { position: absolute; z-index: 4; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px 0; list-style: none; background: var(--wit); border: 2px solid var(--rand); border-radius: 10px; box-shadow: var(--schaduw); max-height: 300px; overflow-y: auto; }
.sugg li { padding: 10px 14px; cursor: pointer; min-height: 44px; }
.sugg li[aria-selected="true"], .sugg li:hover { background: var(--groen-licht); }

.voorraad { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.voorraad li { background: var(--wit); border-radius: var(--radius); box-shadow: var(--schaduw); padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.voorraad .naam { font-weight: 700; }
.voorraad .naam small { display: block; font-weight: normal; color: var(--warm); }
.voorraad .opties { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.voorraad .hoeveel { display: flex; gap: 6px; align-items: center; }
.voorraad .hoeveel input { width: 6.5rem; min-height: 44px; }
.voorraad .hoeveel select { width: auto; min-height: 44px; padding: 6px 8px; }
.voorraad .eerst { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; min-height: 44px; }
.voorraad .eerst input { width: 22px; height: 22px; accent-color: var(--warm); }
.voorraad .datum { color: var(--grijs); font-weight: 600; }
.voorraad .datum.dringend { color: var(--warm); }
.datumveld { display: flex; gap: 8px; align-items: center; }
.datumveld label { margin: 0; font-weight: 500; }
.datumveld input { min-height: 44px; padding: 6px 8px; font: inherit; border: 2px solid var(--rand); border-radius: 10px; background: var(--wit); color: var(--tekst); }
.voorraad li.eerst-op { border-left: 6px solid var(--warm); }
.weg { background: none; border: 2px solid transparent; color: var(--warm); font: inherit; font-weight: 600; min-height: 44px; min-width: 44px; border-radius: 8px; cursor: pointer; }
.weg:hover { border-color: var(--warm); }
.leeg { color: var(--grijs); font-style: italic; }
.uitleg-klein { margin: 10px 0; }
.uitleg-klein summary { cursor: pointer; color: var(--groen-donker); font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 6px; list-style: none; }
.uitleg-klein summary::-webkit-details-marker { display: none; }
.uitleg-klein summary::before { content: "▸"; }
.uitleg-klein[open] summary::before { content: "▾"; }
.basis legend { font-size: 1.15rem; margin-top: 1rem; }

.foto-knoppen { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.foto-knoppen label { margin: 0; }
.foto-knoppen input:focus-visible + label { outline: 3px solid var(--warm); outline-offset: 2px; }
.fotos { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fotos li { position: relative; }
.fotos img { width: 104px; height: 104px; object-fit: cover; border-radius: 10px; display: block; }
.fotos button { position: absolute; top: 4px; right: 4px; min-width: 44px; min-height: 44px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .7); color: #fff; font-size: 1rem; cursor: pointer; }
.uitleg { background: var(--groen-licht); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; }
.melding { background: var(--geel); border-radius: var(--radius); padding: 10px 14px; }
.melding.fout { background: var(--warm-licht); }
.melding.goed { background: var(--groen-licht); }
.gevonden { list-style: none; padding: 0; display: grid; gap: 6px; }
.gevonden label { display: flex; gap: 10px; align-items: center; background: var(--wit); border: 2px solid var(--rand); border-radius: 10px; padding: 8px 12px; min-height: 48px; font-weight: 500; }
.gevonden input { width: 22px; height: 22px; accent-color: var(--groen); }

.kaarten { display: grid; gap: 16px; }
.kaart { background: var(--wit); border-radius: var(--radius); box-shadow: var(--schaduw); padding: 16px; border-top: 6px solid var(--groen); }
.kaart.ai { border-top-color: var(--warm); }
.label-ai { display: inline-block; background: var(--warm-licht); color: var(--warm); font-weight: 700; font-size: .85rem; border-radius: 6px; padding: 2px 8px; }
.feiten { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--grijs); font-size: .95rem; margin: 6px 0; padding: 0; list-style: none; }
.feiten li strong { color: var(--tekst); }
.waarom { background: var(--groen-licht); border-radius: 8px; padding: 8px 12px; }
.lijstjes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lijstjes h4 { margin: .6rem 0 .2rem; font-size: 1rem; }
.lijstjes ul { margin: 0; padding-left: 1.2rem; }
.mist { color: var(--warm); }

.detail-kop { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.ingredienten { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.ingredienten li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e3e6e3; }
.ingredienten .hoev { font-weight: 700; white-space: nowrap; }
/* Losse receptpagina's: hoeveelheid vooraan, naam (link) er direct naast. */
.ingredienten li:has(> .hoev:first-child) { justify-content: flex-start; align-items: center; padding: 0; min-height: 44px; }
.ingredienten li > .hoev:first-child { min-width: 5.5em; }
.ingredienten .heb { color: var(--groen-donker); font-size: .9rem; }
.ingredienten .niet { color: var(--warm); font-size: .9rem; }
.bereiding { padding-left: 1.6rem; }
.bereiding li { margin: 0 0 .7rem; padding-left: .3rem; }
.voedingstabel { border-collapse: collapse; width: 100%; max-width: 420px; background: var(--wit); border-radius: var(--radius); overflow: hidden; }
.voedingstabel th, .voedingstabel td { text-align: left; padding: 8px 12px; border-bottom: 1px solid #e3e6e3; }
.voedingstabel td { text-align: right; font-weight: 700; }
.blok { background: var(--wit); border-radius: var(--radius); box-shadow: var(--schaduw); padding: 16px; margin: 16px 0; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.chip { min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--rand); background: var(--wit); color: var(--tekst); font: inherit; cursor: pointer; }
.chip.aan { border-color: var(--groen); background: var(--groen-licht); font-weight: 700; }
.chips.vaak li, .chips.bewaard li { background: none; padding: 0; }
.vaak-kop { margin: 14px 0 0; }
.chips li { display: inline-flex; align-items: center; gap: 4px; background: var(--warm-licht); border-radius: 999px; padding: 2px 4px 2px 12px; }

.boodschappen { list-style: none; padding: 0; display: grid; gap: 6px; }
.boodschappen h3 { margin: 12px 0 2px; font-size: .95rem; color: var(--grijs); text-transform: uppercase; letter-spacing: .03em; }
.boodschappen label { display: flex; gap: 12px; align-items: center; background: var(--wit); border-radius: 10px; box-shadow: var(--schaduw); padding: 10px 12px; min-height: 52px; font-weight: 500; margin: 0; flex: 1; }
.boodschappen .regel { display: flex; gap: 6px; align-items: center; }
.boodschappen input { width: 24px; height: 24px; accent-color: var(--groen); flex: none; }
.boodschappen .af span { text-decoration: line-through; color: var(--grijs); }
.boodschappen .hoev { margin-left: auto; color: var(--grijs); white-space: nowrap; }

.powered { margin: 0 0 8px; font-weight: 600; letter-spacing: .01em; }
.powered a { font-weight: 700; }
.kookmodus { position: fixed; inset: 0; z-index: 20; background: var(--room); overflow-y: auto; padding: 16px 0 32px; }
.kook-kop { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700; }
.kook-teller { color: var(--grijs); font-weight: 600; margin-top: 1rem; }
.kook-stap { font-size: 1.6rem; line-height: 1.45; margin: .5rem 0 1.5rem; }
.kook-stap:focus { outline: none; }
.kook-nav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-top: 2rem; }
.kook-nav .knop { flex: 1 1 40%; }
.wekkers { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 1.2rem; }
.wekkers strong { font-variant-numeric: tabular-nums; }
.knop[aria-pressed="true"] { background: var(--groen-licht); border-width: 3px; color: var(--groen-donker); }
.knop[aria-pressed="true"]::before { content: "✓ "; }
.kook-kop span, .kook-stap { min-width: 0; overflow-wrap: anywhere; }
.kookmodus { color: var(--tekst); background: var(--room); width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border: 0; border-radius: 0; overscroll-behavior: contain; }
.kookmodus::backdrop { background: var(--room); }
.wekkers li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wekkers .klaar { color: var(--warm); }
.wekkerbalk { position: sticky; top: 0; z-index: 6; background: var(--warm-licht); border-bottom: 2px solid var(--warm); padding: 6px 0; }
.wekkerbalk .wekkers { margin: 0; font-size: 1rem; }
.eerst-op-blok { border-left: 6px solid var(--warm); }
.eerst-op-blok h2 { margin-top: 0; }
.weekkies { align-items: center; }
.weekkies select { width: auto; flex: 1; }
@media (max-width: 600px) { .kook-stap { font-size: 1.35rem; } }
.voet { margin-top: 3rem; padding: 1.5rem 0 2.5rem; background: var(--wit); color: var(--grijs); }
dialog { border: 0; border-radius: var(--radius); padding: 20px; max-width: min(92vw, 440px); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(0, 0, 0, .4); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.4rem; }
  .raster, .lijstjes { grid-template-columns: 1fr; }
  .stappen a { font-size: .85rem; gap: 4px; }
  .verder .knop { flex: 1 1 100%; }
  .verder.plak .knop { flex: 1 1 40%; min-height: 52px; }
  .verder.plak .knop.groot { flex-basis: 55%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print {
  .kop, .concept, .voet, .verder, .knoppen, #lijst-form, .knop { display: none !important; }
  body { background: #fff; }
}
