:root {
  --ink: #20242a;
  --muted: #55606a;
  --line: #cbd3d8;
  --paper: #ffffff;
  --page: #ffffff;
  --soft: #f8fafb;
  --accent: #7a0019;
  --accent-dark: #570012;
  --focus: #005fcc;
  /* Light pastel meal palette with dark text; contrast is well above WCAG AA. */
  --meal-header-text: #20242a;
  --breakfast-header: #f0c7d1;
  --breakfast-bg: #f7f2fc;
  --breakfast-line: #9e85bf;
  --lunch-header: #bfe3cf;
  --lunch-bg: #f1faf5;
  --lunch-line: #79a88b;
  --dinner-header: #bedaf1;
  --dinner-bg: #f2f8fd;
  --dinner-line: #789cb9;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.42;
}
a { color: #6b0016; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.skip-link { position: absolute; left: -9999px; top: 0; background: #000; color: #fff; padding: .75rem; z-index: 10; }
.skip-link:focus { left: .5rem; top: .5rem; }
.app-shell { width: min(1600px, 100%); margin: auto; min-height: 100vh; padding: 1rem; }
.page-header { background: #fff; border-bottom: 4px solid var(--accent); border-radius: .35rem .35rem 0 0; padding: .62rem .85rem .55rem; margin-bottom: .65rem; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .09em; font-size: .72rem; font-weight: 700; color: var(--accent); }
h1 { margin: .1rem 0 0; font-family: Georgia, serif; font-size: clamp(1.7rem, 3.4vw, 2.65rem); line-height: 1.05; }

.filter-panel { background: var(--paper); border: 1px solid var(--line); border-radius: .4rem; padding: .72rem; margin-bottom: .75rem; }
.filter-panel h2 { margin: 0 0 .65rem; font-size: 1.08rem; }
.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .8fr) minmax(280px, 1.5fr);
  gap: .65rem;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: .2rem; }
label { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .84rem; }
.ui-icon { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
input, select, button { min-height: 42px; border: 1px solid #7c8790; border-radius: .35rem; padding: .48rem .55rem; font: inherit; background: #fff; color: var(--ink); }
button { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; cursor: pointer; }
button:hover { background: var(--accent-dark); }
.filter-actions { display: flex; gap: .65rem; align-items: center; }
.filter-actions a { color: var(--accent); font-weight: 700; }
.currently-showing { margin: .65rem 0 0; font-size: .9rem; color: #414b54; }

.announcement { border: 1px solid #b49a54; border-left-width: 5px; border-radius: .25rem; background: #fff9df; padding: .68rem .85rem; margin: .65rem 0; color: #302509; font-size: .86rem; }
.announcement h2 { margin: 0 0 .42rem; font-size: 1.08rem; }
.announcement-body > :first-child { margin-top: 0; }
.announcement-body > :last-child { margin-bottom: 0; }
.announcement-body p { margin: .28rem 0; }
.announcement-body h2, .announcement-body h3, .announcement-body h4 { margin: .58rem 0 .2rem; line-height: 1.18; }
.status-note { padding: .65rem .85rem; background: #eaf4fb; border: 1px solid #7ca8ca; border-radius: .35rem; }
.status-note.error { background: #fff0f0; border-color: #bd7373; }

.debug-panel { background: #fff8e8; border: 2px solid #9a6b16; border-radius: .4rem; padding: .8rem 1rem; margin: 1rem 0; }
.debug-panel > summary { color: #5b3900; font-weight: 800; cursor: pointer; }
.debug-list { margin: .8rem 0; }
.debug-list > div { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: .75rem; padding: .4rem 0; border-top: 1px solid #d9c79e; }
.debug-list dt { font-weight: 700; }
.debug-list dd { margin: 0; min-width: 0; }
.debug-list pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; }
.debug-warning { margin-bottom: 0; }

.location-results { display: grid; gap: 1rem; }
.dining-location { min-width: 0; }
.location-header { margin: 0 0 .45rem; padding: .45rem .68rem; background: #ffffff; text-align: center; border-bottom: 1px solid var(--line); border-radius: .25rem; }
.location-header h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(1.35rem, 2.5vw, 1.85rem); line-height: 1.15; }
.menus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .72rem; align-items: start; }
.meal-column { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .5rem; }
.meal-header { display: flex; justify-content: space-between; align-items: center; gap: .7rem; color: var(--meal-header-text); padding: .58rem .7rem; }
.meal-header h3 { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: 1.08rem; text-transform: uppercase; letter-spacing: .035em; }
.meal-icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.meal-header span { font-size: .78rem; white-space: nowrap; font-weight: 700; }
.meal-items { min-height: 4rem; }
.meal-breakfast { border-color: var(--breakfast-line); background: var(--breakfast-bg); }
.meal-breakfast .meal-header { background: var(--breakfast-header); }
.meal-lunch { border-color: var(--lunch-line); background: var(--lunch-bg); }
.meal-lunch .meal-header { background: var(--lunch-header); }
.meal-dinner { border-color: var(--dinner-line); background: var(--dinner-bg); }
.meal-dinner .meal-header { background: var(--dinner-header); }
.menu-item { padding: .52rem .62rem; border-bottom: 1px solid rgb(55 65 75 / 14%); background: rgb(255 255 255 / 45%); }
.menu-item:last-child { border-bottom: 0; }
.item-heading { display: flex; justify-content: space-between; gap: .65rem; align-items: start; }
.item-heading h4 { margin: 0; font-size: .94rem; line-height: 1.25; }
.calories { color: #4d5660; font-size: .74rem; white-space: nowrap; padding-top: .05rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: .2rem; margin: .25rem 0 0; padding: 0; list-style: none; }
.tag-list li { background: #f7fff6; border: 1px solid #719875; color: #233f28; border-radius: 999px; font-size: .68rem; padding: .08rem .38rem; }
details { margin-top: .27rem; font-size: .79rem; }
summary { color: #670016; cursor: pointer; font-weight: 700; }
.item-details > summary { line-height: 1.25; }
.nutrition-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem .65rem; }
.nutrition-list div { display: flex; justify-content: space-between; gap: .5rem; border-bottom: 1px dotted #858d93; }
.nutrition-list dt, .nutrition-list dd { margin: 0; }
.empty-state { padding: .8rem; color: var(--muted); }

.menu-group { margin: 0; border-bottom: 1px solid rgb(55 65 75 / 14%); background: rgb(255 255 255 / 58%); font-size: inherit; }
.menu-group:last-child { border-bottom: 0; }
.menu-group > summary { display: flex; justify-content: flex-start; align-items: center; gap: .5rem; padding: .56rem .62rem; color: var(--ink); font-size: .92rem; font-weight: 800; list-style: none; }
.menu-group > summary::-webkit-details-marker { display: none; }
.menu-group > summary::marker { content: ''; }
.group-count { margin-left: auto; color: var(--muted); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.menu-group > summary::after { content: '+'; margin-left: .18rem; color: #4b5560; font-size: 1.35rem; font-weight: 800; line-height: 1; flex: 0 0 auto; }
.menu-group[open] > summary::after { content: '\2212'; }
.menu-group > summary:hover::after { color: #20242a; }
.group-items { border-top: 1px solid rgb(55 65 75 / 14%); background: rgb(255 255 255 / 42%); }
.menu-item--grouped { padding-left: 1rem; background: transparent; }
.item-details { margin-top: .34rem; }
.pal-inline { margin: .5rem 0 0; padding: .35rem .5rem; border-left: 3px solid #8a6500; background: #fff8df; color: #4b3a00; font-size: .75rem; }

@media (min-width: 1024px) {
  .announcement--columns .announcement-body { column-count: 2; column-gap: 2rem; column-rule: 1px solid rgb(88 68 20 / 18%); column-fill: balance; }
  .announcement--columns .announcement-body h2,
  .announcement--columns .announcement-body h3,
  .announcement--columns .announcement-body h4 { break-after: avoid-column; }
  .announcement--columns .announcement-body hr { break-after: avoid-column; }
}
@media (max-width: 1023px) {
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .menus-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .app-shell { padding: .6rem; }
  .filter-grid { grid-template-columns: 1fr; }
  .filter-actions { align-items: stretch; }
  .debug-list > div { grid-template-columns: 1fr; gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
