/*
 * menuh — one stylesheet for the whole site.
 *
 * Paper and ink: a menu is a printed thing, and the site should look like it
 * knows that. Plain type, one warm accent, nothing that would not survive a
 * photocopier. The guest's menu (/m/<slug>) has its own block at the end,
 * including the print rules that make it a PDF.
 */
:root {
  color-scheme: light dark;
  --ink: #1d1a16;
  --bg: #fbf8f2;
  --paper: #ffffff;
  --line: #e4ddd0;
  --muted: #6b6358;
  --accent: #b4532a;
  --accent-ink: #ffffff;
  --good: #2f7a4b;
  --bad: #b3261e;
  --warn: #8a5a00;
  --radius: 12px;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #efe9df; --bg: #15130f; --paper: #1e1b16; --line: #34302a; --muted: #a59c8f;
    --accent: #e08a5f; --accent-ink: #1b120c; --good: #7cc596; --bad: #f08a80; --warn: #e6c26a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}

a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5vw, 46px); margin: 0 0 14px; }
h2 { font-size: 24px; margin: 36px 0 10px; }
h3 { font-size: 19px; margin: 22px 0 6px; }

main { max-width: 1040px; margin: 0 auto; padding: 36px 22px 64px; }
main.narrow { max-width: 720px; }

/* ── masthead and footer ─────────────────────────────────────────────── */

.masthead {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  max-width: 1040px; margin: 0 auto; padding: 18px 22px;
}
.wordmark { font: 700 26px/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.wordmark span { color: var(--accent); }
.masthead nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.masthead nav.more { margin-left: auto; }
.masthead nav a { color: var(--ink); text-decoration: none; }
.masthead nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.masthead nav a.cta { background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 999px; font-weight: 650; }

.siteftr { border-top: 1px solid var(--line); margin-top: 40px; }
.siteftr > * { max-width: 1040px; margin-left: auto; margin-right: auto; padding: 0 22px; }
.siteftr p { color: var(--muted); font-size: 14px; }
.siteftr nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.feedback-line { padding-top: 18px !important; }

/* ── text ────────────────────────────────────────────────────────────── */

.lede { font-size: 19px; color: var(--muted); max-width: 46em; }
.small { font-size: 14px; }
.muted { color: var(--muted); }
.hint { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.error { color: var(--bad); }
.ok { color: var(--good); }
.warn { color: var(--warn); }
.note { background: var(--paper); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 6px; }

/* ── blocks ──────────────────────────────────────────────────────────── */

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; border: 1px solid var(--line); color: var(--muted); }
.pill.good { color: var(--good); border-color: currentColor; }
.pill.warn { color: var(--warn); border-color: currentColor; }
.pill.bad { color: var(--bad); border-color: currentColor; }

/* ── forms ───────────────────────────────────────────────────────────── */

label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; margin: 0; }

button, .button {
  display: inline-block; font: 650 15px/1.2 var(--sans); cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 999px; padding: 10px 18px;
}
button.quiet, .button.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
button.small, .button.small { font-size: 13px; padding: 5px 11px; }
button.danger { background: transparent; color: var(--bad); border-color: currentColor; }
button:disabled { opacity: .55; cursor: not-allowed; }
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }

/* ── the front page ──────────────────────────────────────────────────── */

.hero { padding: 26px 0 8px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); max-width: 15em; }
.feature h3 { margin-top: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; margin: 14px 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; display: grid; place-items: center;
}
.sample { font-family: var(--serif); }
.sample .dish { display: flex; justify-content: space-between; gap: 12px; }
.sample .dish strong { font-weight: 650; }
.sample .tags { color: var(--muted); font-size: 13px; font-family: var(--sans); }

/* ── the editor ──────────────────────────────────────────────────────── */

.editor-section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin: 18px 0; }
.editor-section > header { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.editor-section > header h3 { margin: 0; }
.editor-item { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.editor-item:last-child { border-bottom: 0; }
.editor-item .spread strong { font-family: var(--serif); font-size: 17px; }
.editor-item.unavailable strong { text-decoration: line-through; color: var(--muted); }
.item-form { display: grid; grid-template-columns: 2fr 1fr; gap: 0 14px; }
.item-form .wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .item-form { grid-template-columns: 1fr; } }
.progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--good); }
.tr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .tr-row { grid-template-columns: 1fr; } }
.qr { width: 180px; height: 180px; background: #fff; border-radius: 8px; padding: 6px; }
.logo-preview { max-height: 64px; max-width: 200px; display: block; margin: 8px 0; }

/* ── the guest's menu (/m/<slug>) ────────────────────────────────────── */

.menu { max-width: 680px; margin: 0 auto; font-family: var(--serif); }
.menu-head { text-align: center; padding: 8px 0 4px; }
.menu-head img { max-height: 90px; max-width: 70%; }
.menu-head h1 { margin: 6px 0 4px; }
.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-family: var(--sans); margin: 10px 0 4px; }
.langs a { padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 14px; }
.langs a[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.menu-section { margin: 30px 0 8px; break-inside: avoid-page; }
.menu-section > h2 { text-align: center; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 4px; }
.menu-section > p { text-align: center; color: var(--muted); margin: 0 0 8px; font-style: italic; }
.dish { padding: 10px 0; border-bottom: 1px dotted var(--line); break-inside: avoid; }
.dish-line { display: flex; gap: 10px; align-items: baseline; }
.dish-line .name { font-weight: 650; font-size: 18px; }
.dish-line .dots { flex: 1; border-bottom: 1px dotted var(--muted); transform: translateY(-4px); min-width: 20px; }
.dish-line .price { font-weight: 650; white-space: nowrap; }
.dish p { margin: 2px 0 0; color: var(--muted); }
.dish .tags { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 3px; }
.dish .tags b { font-weight: 650; color: var(--ink); }
.dish.off .name, .dish.off .price { text-decoration: line-through; color: var(--muted); }
.menu-foot { text-align: center; font-family: var(--sans); font-size: 14px; color: var(--muted); margin-top: 26px; }
.allergen-key { font-family: var(--sans); font-size: 12px; color: var(--muted); columns: 2; margin-top: 14px; }
.menu-tools { text-align: center; font-family: var(--sans); margin-top: 18px; }
.guest-body .masthead, .guest-body .siteftr nav { display: none; }

@media print {
  @page { size: A4; margin: 16mm 14mm; }
  :root { --ink: #000; --bg: #fff; --paper: #fff; --line: #bbb; --muted: #444; color-scheme: light; }
  body { font-size: 11pt; }
  .masthead, .siteftr, .langs, .menu-tools, .no-print { display: none !important; }
  main { padding: 0; max-width: none; }
  .menu { max-width: none; }
  .dish { padding: 5px 0; }
  .dish-line .name { font-size: 12.5pt; }
  a { color: inherit; text-decoration: none; }
}
