:root {
  color-scheme: light dark;
  --accent: #d97706;
  --bg: #fafaf9;
  --fg: #1c1917;
  --muted: #78716c;
  --border: #e7e5e4;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1c1917; --fg: #fafaf9; --muted: #a8a29e; --border: #44403c; }
}

* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  line-height: 1.5;
}
header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header a { color: var(--fg); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
header nav a { font-weight: 400; margin-left: 1rem; color: var(--accent); }
main { max-width: 720px; margin: 0 auto; padding: 1.5rem; }
h1 { font-size: 1.4rem; }
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; }
.mle-badge { font-weight: 700; color: var(--accent); }
.muted { color: var(--muted); font-size: 0.9rem; }
form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 480px; }
label { font-size: 0.9rem; font-weight: 600; }
input, select { padding: 0.5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--fg); }
button { padding: 0.6rem 1rem; border: none; border-radius: 6px; background: var(--accent); color: white; font-weight: 600; cursor: pointer; width: fit-content; }
.item-row { border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; margin-bottom: 0.75rem; }
.item-row .fields { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem; }
.item-row .fields label { font-size: 0.75rem; }
.flag { color: #b45309; font-size: 0.8rem; }
img.menu-preview { max-width: 100%; border-radius: 8px; margin: 1rem 0; }
.formula {
  background: var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  overflow-x: auto;
  white-space: pre;
}
h2 { margin-top: 2rem; }
h3 { font-size: 1rem; margin-bottom: 0; }
