/* Same visual family as the printed weekly menu: sage paper, deep green ink, mustard accent. */
:root {
  --bg: #f4f6ef; --paper: #ffffff; --ink: #1d3328; --muted: #5d6f63; --line: #dde3d6;
  --accent: #d9901c; --accent-ink: #1d3328; --leaf: #3f8a4e; --leaf-bg: #e3f1e2;
  --danger: #b3261e; --danger-bg: #fbe4e2;
  --added: #cfe2f3; --changed: #fce5cd; --cancelled: #f4cccc;
  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a15; --paper: #1a241e; --ink: #e8efe6; --muted: #9db0a2; --line: #2c3a31;
    --accent: #f0b04a; --leaf: #7fcb8b; --leaf-bg: #213527; --danger: #ff8a80; --danger-bg: #3a1f1d;
    --added: #1f3347; --changed: #46351f; --cancelled: #4a2424;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: inherit; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: var(--paper);
}
.brand { font-family: var(--display); font-weight: 800; text-decoration: none; font-size: 1.1rem; }
.brand span { color: var(--accent); }
.top nav { display: flex; gap: 16px; align-items: center; }
.top nav form { margin: 0; }
.top nav a { text-decoration: none; font-weight: 600; }
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; display: grid; gap: 16px; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1.05; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin: 0; }
.head { display: grid; gap: 6px; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 14px; min-width: 0; }
.narrow { max-width: 460px; width: 100%; justify-self: center; }
.stack { display: grid; gap: 10px; }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.row-form input { flex: 1 1 200px; }
label { font-weight: 600; }
input[type=text], input:not([type]), input[type=password], input[type=date], textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; width: 100%; min-width: 0;
}
.row-form input { width: auto; }
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.code-input { font-size: 1.4rem; letter-spacing: .12em; text-transform: uppercase; text-align: center; font-weight: 700; }
.btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 11px 18px; cursor: pointer;
  background: var(--ink); color: var(--bg); text-decoration: none; display: inline-block; text-align: center;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.wide { width: 100%; }
.link { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; color: var(--muted); }
.link.danger { color: var(--danger); }
.alert { background: var(--danger-bg); color: var(--danger); padding: 10px 12px; border-radius: 10px; margin: 0; }
.ok-box { background: var(--leaf-bg); color: var(--leaf); padding: 10px 12px; border-radius: 10px; margin: 0; font-weight: 700; }
.ok { color: var(--leaf); font-weight: 700; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 1px 8px; border-radius: 999px; background: var(--leaf-bg); color: var(--leaf); vertical-align: 1px; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.kids { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.kids li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kids li form:first-child { flex: 1 1 260px; }
.weeks { display: flex; gap: 8px; flex-wrap: wrap; }
.weeks a { text-decoration: none; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; }
.weeks a[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Ordering form */
.child-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.day { border: 1px solid var(--line); border-radius: 12px; margin: 0; padding: 10px 14px 12px; display: grid; gap: 4px; }
.day legend { padding: 0 6px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.dname { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.ddate { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.dl { color: var(--muted); font-size: .8rem; }
.day.locked { opacity: .6; }
.mains { display: grid; gap: 2px; }
.opt { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; padding: 6px 0; cursor: pointer; }
.opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--leaf); flex: none; }
.opt.none { color: var(--muted); }
.locked .opt { cursor: not-allowed; }

/* Admin */
.menu-day { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 14px; margin: 0; display: grid; gap: 6px; }
.menu-day legend { font-family: var(--display); font-weight: 700; padding: 0 6px; }
.scroll { overflow-x: auto; }
.tbl { border-collapse: collapse; width: 100%; font-size: .93rem; }
.tbl th, .tbl td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.st-added { background: var(--added); }
.st-changed { background: var(--changed); }
.st-cancelled { background: var(--cancelled); }
span.st-added, span.st-changed, span.st-cancelled { padding: 0 6px; border-radius: 4px; }
code { font-weight: 700; letter-spacing: .06em; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
