/* Enrise colours and type, laid out like a kitchen allergen chart:
   numbered allergens, a clear "niet" state, a matrix for the buyers.
   System fonts only, so nothing loads from another site. */
:root {
  --yellow: #fbb900;
  --yellow-deep: #d39b00;
  --yellow-soft: #fff4d1;
  --navy: #201b39;
  --navy-2: #3a3466;
  --lilac: #b9b5d2;
  --muted: #5b5873;
  --line: #e2e0ec;
  --bg: #f5f4f9;
  --surface: #ffffff;
  --red: #c4122f;
  --red-soft: #fce8eb;
  --green: #17734a;
  --green-soft: #e2f3ea;
  --font-display: 'Avenir Next Condensed', 'Bahnschrift', 'Roboto Condensed', 'Arial Narrow', sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --r: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--navy); font: 16px/1.5 var(--font-body); overflow-x: clip; }
[hidden] { display: none !important; }
a { color: var(--navy); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 14px; }
.eyebrow { font: 700 13px/1.2 var(--font-display); font-stretch: condensed; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

/* Header band */
.band { background: var(--yellow); }
.band-in { padding-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 22px/1 var(--font-display); font-stretch: condensed; }
.brand .logo { display: block; height: 32px; width: auto; color: var(--navy); }
.brand-sub { font-weight: 600; padding-left: 12px; border-left: 2px solid var(--navy); line-height: 32px; }
.who { display: flex; align-items: baseline; gap: 12px; font-size: 15px; }
.link { border: 0; background: none; padding: 10px 0; font: inherit; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
h1 { font: 800 clamp(40px, 6vw, 76px)/0.92 var(--font-display); font-stretch: condensed; letter-spacing: -0.015em; margin-top: 18px; max-width: 14ch; }
.intro { font-size: 19px; max-width: 34em; }
.tabs { display: flex; gap: 4px; margin-top: 14px; }
.tab { border: 0; border-radius: 10px 10px 0 0; padding: 12px 20px; background: rgba(32, 27, 57, 0.1); color: var(--navy); font: 700 17px/1 var(--font-display); font-stretch: condensed; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.tab[aria-current="page"] { background: var(--bg); }
.band-in:not(:has(.tabs:not([hidden]))) { padding-bottom: 32px; }
main { padding-top: 28px; padding-bottom: 96px; }

/* Cards and buttons */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
h2 { font: 800 26px/1.1 var(--font-display); font-stretch: condensed; display: flex; align-items: center; gap: 12px; }
.group-t { font-size: 15px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.group-t .muted { font-size: 13px; }
.btn { border: 0; border-radius: 10px; min-height: 52px; padding: 0 22px; background: var(--navy); color: #fff; font: 700 19px/1 var(--font-display); font-stretch: condensed; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 0 #100d20; transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #100d20; }
.btn:disabled { background: var(--lilac); box-shadow: 0 4px 0 #8d89ad; cursor: default; transform: none; }
.err { color: var(--red); font-weight: 600; }

/* My preference: steps on the left, the label on the right */
.mine { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.steps { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); font: 800 18px/1 var(--font-display); flex: none; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 16px 46px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice input { position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; margin: 0; accent-color: var(--navy); }
.choice-t { font-weight: 700; }
.choice-d { font-size: 14px; color: var(--muted); }
.choice:has(input:checked) { border-color: var(--navy); background: var(--yellow-soft); }
.choice:has(input:focus-visible) { outline: 3px solid var(--navy); outline-offset: 2px; }

/* Allergen tiles: the number in a circle, as on a kitchen chart */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.tile { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 10px 12px; min-height: 60px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--navy); font: inherit; cursor: pointer; transition: border-color 120ms var(--ease-out), background-color 120ms var(--ease-out); }
.tile:hover { border-color: var(--lilac); }
.tile .code { grid-row: 1 / span 2; }
.tile .name { font-weight: 700; line-height: 1.2; }
.tile .hint { font-size: 12.5px; line-height: 1.25; color: var(--muted); }
.tile[aria-pressed="true"] { border-color: var(--red); background: var(--red-soft); }
.tile[aria-pressed="true"] .code { background: var(--red); border-color: var(--red); color: #fff; }
.tile[aria-pressed="true"] .name::after { content: " · niet"; color: var(--red); }
.code { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--navy); font: 700 14px/1 var(--font-mono); background: var(--surface); }
.code.diet { border-style: dashed; font-size: 0; }
.code.diet::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.switch { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: var(--bg); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--lilac); position: relative; transition: background-color 160ms var(--ease-out); margin-top: 2px; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 160ms var(--ease-out); }
.switch input:checked + .switch-ui { background: var(--red); }
.switch input:checked + .switch-ui.ok { background: var(--green); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--navy); outline-offset: 2px; }

textarea { width: 100%; resize: vertical; border: 2px solid var(--line); border-radius: 10px; padding: 12px 14px; font: inherit; color: var(--navy); background: var(--surface); }
textarea:focus-visible { outline: none; border-color: var(--navy); }

/* The label the buyer reads: styled after the allergen line on a food label */
.summary { position: sticky; top: 20px; }
.label { border: 2px solid var(--navy); border-radius: 6px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.label-name { font: 800 22px/1.1 var(--font-display); font-stretch: condensed; }
.label-rule { border-top: 2px solid var(--navy); margin: 2px -16px; }
.label b { font-weight: 800; }
.label .ok { color: var(--green); font-weight: 700; }
.label .no { color: var(--red); font-weight: 800; }
.label .note { font-style: italic; color: var(--muted); }
.status { font-size: 14px; font-weight: 600; }
.status.saved { color: var(--green); }
.status.unsaved { color: var(--red); }

/* Organizers */
.buy { display: flex; flex-direction: column; gap: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.stat .n { font: 800 40px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.stat .t { font-size: 14px; color: var(--muted); }
.check-rows { display: grid; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--navy); font: 600 14px/1.2 var(--font-body); cursor: pointer; }
.chip .code { width: 24px; height: 24px; font-size: 11px; border-width: 1.5px; }
.chip[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.chip[aria-pressed="true"] .code { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
#traceChips .chip[aria-pressed="true"] { border-color: var(--yellow-deep); background: var(--yellow); color: var(--navy); }
#traceChips .chip[aria-pressed="true"] .code { background: var(--navy); border-color: var(--navy); color: #fff; }
.verdict { border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.verdict.good { background: var(--green-soft); }
.verdict.bad { background: var(--red-soft); }
.verdict-t { font: 800 22px/1.1 var(--font-display); font-stretch: condensed; }
.verdict.good .verdict-t { color: var(--green); }
.verdict.bad .verdict-t { color: var(--red); }
.verdict ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }

/* The matrix: colleagues down, allergens across, as on a kitchen chart */
.scroll { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
th { font-weight: 700; }
th.name, td.name { text-align: left; padding-left: 0; white-space: nowrap; font-weight: 700; }
td.note { text-align: left; color: var(--muted); min-width: 16ch; font-style: italic; }
th .code { width: 28px; height: 28px; font-size: 12px; }
th .short { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.x { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 13px; }
.x.trace { box-shadow: 0 0 0 3px var(--red-soft), 0 0 0 4px var(--red); }
tbody tr:hover { background: var(--bg); }
tr.hit td.name { color: var(--red); }
.legend { line-height: 1.7; }
.empty { padding: 20px; border: 2px dashed var(--line); border-radius: 10px; color: var(--muted); }

/* Sign-in, refused and signed-out pages */
.door { max-width: 640px; margin: 0 auto; padding: 64px max(24px, env(safe-area-inset-right)) 96px max(24px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 20px; }
.door-page { background: var(--yellow); }
.door p { font-size: 19px; max-width: 30em; }
.door .btn { align-self: flex-start; display: inline-flex; align-items: center; text-decoration: none; min-height: 56px; }

@media (max-width: 900px) {
  .mine { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .choices { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .step, .card { padding: 18px; }
  .scroll { margin: 0 -18px; padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
