/* GERD Friendly: shared by every page. Antacid-tablet pistachio, stomach-lining green ink, traffic-light verdicts. */
:root {
  --bg: #dfe9d6;
  --field: #f3f7ef;
  --ink: #1f3a2e;
  --soft: #4d6a5b;
  --line: #b7c9ad;
  --yes: #2b7d4f;
  --maybe: #a86b00;
  --no: #c23b26;
  --display: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --body: "Atkinson Hyperlegible", "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14211b; --field: #1c2d25; --ink: #e3eedc; --soft: #a5bba9; --line: #34503f;
    --yes: #6fd39a; --maybe: #f0b43c; --no: #ff7a62;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); }
html { min-height: 100%; }
a { color: var(--ink); text-decoration-color: var(--soft); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
body { font-size: 17px; line-height: 1.5; }
main { width: min(640px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 64px; }
h1 { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.1; margin: 0 0 6px; letter-spacing: -0.01em; }
.lede { margin: 0 0 28px; color: var(--soft); }
label { display: block; font-weight: 700; margin-bottom: 8px; }
textarea {
  width: 100%; min-height: 150px; resize: vertical; padding: 14px 16px;
  font: inherit; color: var(--ink); background: var(--field);
  border: 2px solid var(--line); border-radius: 14px;
}
textarea:focus { outline: none; border-color: var(--ink); }
.row { display: flex; gap: 16px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
button {
  font: 700 18px/1 var(--body); color: var(--bg); background: var(--ink);
  border: 0; border-radius: 999px; padding: 14px 28px; cursor: pointer;
}
button:disabled { opacity: .55; cursor: progress; }
button:focus-visible, textarea:focus-visible { outline: 3px solid var(--maybe); outline-offset: 3px; }
.hint { color: var(--soft); font-size: 15px; }

#result { margin-top: 44px; min-height: 1px; }
.verdict {
  font-family: var(--display); font-weight: 800; line-height: .85; letter-spacing: -0.04em;
  font-size: clamp(96px, 30vw, 184px); margin: 0;
}
.verdict.yes { color: var(--yes); }
.verdict.maybe { color: var(--maybe); }
.verdict.no { color: var(--no); }
.verdict.not_food { color: var(--soft); font-size: clamp(48px, 13vw, 80px); line-height: 1; }
.say { font-size: 20px; margin: 14px 0 0; max-width: 34em; }
.why { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.why li { border: 2px solid currentColor; border-radius: 999px; padding: 3px 12px; font-size: 15px; font-weight: 700; }
.ings { margin: 14px 0 0; max-width: 34em; }
.meta { margin-top: 20px; color: var(--soft); font-size: 14px; }
.photo { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 700 18px/1 var(--body); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 12px 26px; margin: 0; }
.photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.photo:focus-within { outline: 3px solid var(--maybe); outline-offset: 3px; }
.photo[hidden] { display: none; }
.read { margin-top: 24px; font-size: 14px; color: var(--soft); }
.read summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.read pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: var(--field); padding: 10px 12px; border-radius: 10px; }

.group { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.1; letter-spacing: -0.01em; margin: 36px 0 4px; }
.group.yes { color: var(--yes); }
.group.maybe { color: var(--maybe); }
.group.no { color: var(--no); }
.group-say { margin: 0 0 6px; color: var(--soft); }
.dishes { list-style: none; padding: 0; margin: 0; }
.dishes li { padding: 12px 0; border-bottom: 2px solid var(--line); }
.dishes li:last-child { border-bottom: 0; }
.dish-name { font-weight: 700; }
.dish-section { color: var(--soft); font-size: 14px; margin-left: 8px; }
.dish-desc { display: block; color: var(--soft); font-size: 15px; margin-top: 2px; }
.dish-note { display: block; margin-top: 4px; }
.skip > summary { cursor: pointer; list-style: none; }
.skip > summary::-webkit-details-marker { display: none; }
.skip > summary .group::after { content: " +"; }
.skip[open] > summary .group::after { content: " –"; }
/* The menu with its dishes tinted like a highlighter on paper: no lines, so the print under a mark stays readable.
   The page is always paper-colored, so the marks keep their light-theme colors in dark mode too. */
.marked { --mark-yes: #2b7d4f; --mark-maybe: #d08a00; --mark-no: #c23b26; margin-top: 24px; font-size: 15px; }
.marked > summary { cursor: pointer; font-weight: 700; }
.marked > div { margin-top: 8px; }
.legend { list-style: none; padding: 0; margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; }
.key::before { content: ""; display: inline-block; width: 22px; height: 14px; margin-right: 8px; vertical-align: -2px; border-radius: 3px; }
.key.yes::before { background: color-mix(in srgb, var(--mark-yes) 45%, #fff); }
.key.maybe::before { background: color-mix(in srgb, var(--mark-maybe) 50%, #fff); }
.key.no::before { background: color-mix(in srgb, var(--mark-no) 35%, #fff); }
.sheets { display: grid; gap: 16px; }
.sheet { position: relative; line-height: 0; border-radius: 6px; box-shadow: 0 0 0 2px var(--line); background: #fff; }
.sheet img, .sheet canvas { display: block; width: 100%; height: auto; border-radius: 6px; }
.mark { position: absolute; padding: 0; border: 0; border-radius: 4px; cursor: pointer; mix-blend-mode: multiply; }
.mark.yes { background: color-mix(in srgb, var(--mark-yes) 34%, transparent); }
.mark.maybe { background: color-mix(in srgb, var(--mark-maybe) 36%, transparent); }
.mark.no { background: color-mix(in srgb, var(--mark-no) 24%, transparent); }
.mark.yes:hover, .mark.yes.on { box-shadow: 0 0 0 2px var(--mark-yes); }
.mark.maybe:hover, .mark.maybe.on { box-shadow: 0 0 0 2px var(--mark-maybe); }
.mark.no:hover, .mark.no.on { box-shadow: 0 0 0 2px var(--mark-no); }
.mark.on { z-index: 1; }
.mark:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* The card for the tapped dish, right under (or above) its mark. */
.mark-card { position: absolute; z-index: 2; left: 8px; right: 8px; margin: 6px 0; padding: 12px 40px 12px 14px; display: grid; gap: 4px; line-height: 1.35; font-size: 15px; color: var(--ink); background: var(--field); border-radius: 10px; border-left: 5px solid var(--line); box-shadow: 0 6px 24px rgb(0 0 0 / 0.28); }
.mark-card.yes { border-left-color: var(--mark-yes); }
.mark-card.maybe { border-left-color: var(--mark-maybe); }
.mark-card.no { border-left-color: var(--mark-no); }
.mark-card .word { font-weight: 700; font-size: 13px; }
.mark-close { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: none; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.word.yes { color: var(--yes); } .word.maybe { color: var(--maybe); } .word.no { color: var(--no); }
.error { border-left: 4px solid var(--no); padding: 4px 0 4px 14px; margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .verdict { animation: land .35s cubic-bezier(.2, 1.4, .4, 1); }
  @keyframes land { from { transform: translateY(12px) scale(.96); opacity: 0; } }
}

/* Top bar: home on the left, the account on the right. */
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: -24px 0 28px; font-size: 15px; }
.top .home { font-family: var(--display); font-weight: 800; text-decoration: none; letter-spacing: -0.01em; }
.top .home { white-space: nowrap; flex-shrink: 0; }
.top nav { display: flex; gap: 16px; color: var(--soft); flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
/* A username can be a long email address: cut it short in the bar, wrap it in headings. */
.top nav a { max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
h1 { overflow-wrap: anywhere; }
.top nav a[aria-current="page"] { text-decoration: none; font-weight: 700; }

.free { margin: 10px 0 0; color: var(--soft); font-size: 15px; }
.for-you { margin: 14px 0 0; max-width: 34em; font-weight: 700; }
.usually { color: var(--soft); font-weight: 400; }

/* Forms on the account page. */
input[type="text"], input[type="password"], input[type="email"], select {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink); background: var(--field);
  border: 2px solid var(--line); border-radius: 12px;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, select:focus { outline: none; border-color: var(--ink); }
.field { margin-bottom: 14px; }
.field small { display: block; color: var(--soft); font-size: 14px; margin-top: 4px; font-weight: 400; }
button.quiet { color: var(--ink); background: transparent; border: 2px solid var(--ink); padding: 12px 22px; font-size: 16px; }
button.link { color: var(--ink); background: none; padding: 0; border-radius: 0; font: inherit; text-decoration: underline; text-decoration-color: var(--soft); text-underline-offset: 3px; }
button.danger { background: var(--no); color: var(--bg); }
.or { color: var(--soft); margin: 28px 0 16px; display: flex; align-items: center; gap: 12px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 2px solid var(--line); }
.section { margin-top: 40px; padding-top: 4px; }
.section h2 { font-family: var(--display); font-weight: 800; font-size: 22px; margin: 0 0 6px; }
.section > p { margin: 0 0 14px; color: var(--soft); }
.ok { color: var(--yes); font-weight: 700; margin: 10px 0 0; }
form .error, .section .error { margin-top: 12px; }

.triggers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.triggers label { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 0; padding: 10px 14px;
  border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--field); }
.triggers input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }
.triggers label:has(input:checked) { border-color: var(--ink); font-weight: 700; }

.keys { list-style: none; padding: 0; margin: 0 0 14px; }
.keys li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 2px solid var(--line); }
.keys small { display: block; color: var(--soft); font-size: 14px; }

/* History list. */
.history { list-style: none; padding: 0; margin: 0; }
.history li { border-bottom: 2px solid var(--line); display: flex; gap: 14px; align-items: baseline; }
.history a { flex: 1; display: grid; grid-template-columns: 3.4em 1fr; gap: 2px 14px; padding: 14px 0; text-decoration: none; min-width: 0; }
.history .v { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; grid-row: span 2; }
.history .v.yes { color: var(--yes); } .history .v.maybe { color: var(--maybe); } .history .v.no { color: var(--no); }
.history .v.menu, .history .v.not_food { color: var(--soft); font-size: 16px; }
.history .what { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history .when { color: var(--soft); font-size: 14px; }
.history button { font-size: 14px; padding: 6px 12px; }
.empty { color: var(--soft); }
a.button { display: inline-block; font: 700 18px/1 var(--body); color: var(--bg); background: var(--ink); text-decoration: none; border-radius: 999px; padding: 14px 28px; margin-top: 16px; }
a.button.quiet { color: var(--ink); background: transparent; border: 2px solid var(--ink); padding: 12px 26px; }

/* The line under the check box that points to "What bothers you". */
.mine { margin: 14px 0 0; color: var(--soft); font-size: 15px; }
.mine a { color: var(--ink); font-weight: 700; }

/* A dish that's a yes only because of the user's own triggers: those triggers, struck out. */
.crossed { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 3px; font-size: 14px; color: var(--soft); }
.crossed s { text-decoration-thickness: 2px; text-decoration-color: var(--yes); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* The triggers list: plain text for people new to the page and for search engines, quiet under the checker. */
.about { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--soft); }
.about h2 { font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1.2; color: var(--ink); margin: 24px 0 8px; }
.about h2:first-child { margin-top: 0; }
.about p { margin: 0 0 12px; line-height: 1.5; }
.about h3 { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--ink); margin: 16px 0 4px; }
.about-list { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.about-list li { border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 15px; }
.about-note { font-size: 14px; }

/* The page an app like Claude or ChatGPT sends you to when you connect it (lib/oauth.js). */
.consent h1 { font-size: 26px; }
.consent-list { margin: 8px 0 16px; padding-left: 20px; line-height: 1.5; }
.consent-list li { margin-bottom: 4px; }
.consent-warn { border: 2px solid var(--maybe); border-radius: 10px; padding: 10px 14px; font-weight: 700; }
.consent-small { color: var(--soft); font-size: 14px; }
.mcp-url { font-size: 15px; background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; word-break: break-all; user-select: all; }

/* Plain reading pages (privacy). */
.prose h2 { font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1.2; margin: 28px 0 8px; }
.prose ul { padding-left: 20px; }
.prose li, .prose p { line-height: 1.55; }
.prose li { margin-bottom: 8px; }
