/* ═══════════════════════════════════════════════════════════════════════════
   Alpha High public menu — ERRA deck language, web dialect.
   Fable design pass 2026-08-10.

   Source system: the Amy/Ty ERRA_Certified_080426 deck, as inventoried in
   ipad-menu-and-survey/docs/2026-08-09-deck-design-language.md, tokens per that
   repo's constants/theme.ts. Deck motifs carried here: cream ground, eyebrow +
   full-width hairline, light display type where size does the work, solid-fill
   rounded cards (~14px), forest statement moments, mint-on-forest, green
   checkmark bullets, hierarchy through saturation.

   ⚠ CONTRAST FLOOR (measured, not eyeballed — see verify block in PLAN.md §2):
     ink    #1A1A1A on cream #F6F1E8  = 15.6:1 ✓    on white ✓
     ink2   #57575A on cream          =  6.4:1 ✓
     green  #37705A on cream          =  5.2:1 ✓   on white 5.8:1 ✓
     forest #1C4A41 on cream          =  8.9:1 ✓
     cream  on forest                 =  8.9:1 ✓    mint #A5DC9A on forest 6.3:1 ✓
     forest on sage  #93C08C          =  4.8:1 ✓ (AA normal)
     chip   #6E4B2A on #FAF3E8        =  6.6:1 ✓
   The deck's own white-on-sage/taupe (≈1.9–2.3:1) is a bug, not a motif.
   Sage and taupe fills carry DARK type; only forest carries light type.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --forest:      #1C4A41;
  --green:       #37705A;   /* AA-safe interactive/label green — NOT deck sage as text */
  --sage:        #93C08C;   /* fill only */
  --mint:        #A5DC9A;   /* text only on forest */
  --taupe:       #A9A096;   /* fill only */
  --cream:       #F6F1E8;
  --white:       #FFFFFF;
  --ink:         #1A1A1A;
  --ink-2:       #57575A;
  --border:      #E5E0D8;
  --hairline:    #E5E0D8;
  --chip-bg:     #FAF3E8;
  --chip-border: #E0CBA8;
  --chip-ink:    #6E4B2A;

  --radius: 14px;           /* deck cards read 10–14px */
  --wrap: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  /* Slim brand bar — the one piece of web chrome the deck doesn't prescribe. */
  border-top: 4px solid var(--forest);
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ── Eyebrow system — deck motif #1 ──────────────────────────────────────── */

.eyebrow {
  margin: 0;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
}

/* ── Masthead ────────────────────────────────────────────────────────────── */

.masthead { padding-top: clamp(1.5rem, 4vw, 2.75rem); }

.masthead__mark {
  display: block;
  height: clamp(30px, 4.5vw, 40px);
  width: auto;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.masthead__eyebrow {
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--hairline);   /* the full-width hairline under the eyebrow */
}

.masthead__title {
  margin: clamp(1.25rem, 3.5vw, 2rem) 0 .3rem;
  /* Light display voice: 300, size does the work. Forest = brand statement color. */
  font-size: clamp(2.15rem, 6.5vw, 3.6rem);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -.015em;
  color: var(--forest);
}

.masthead__school {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  font-weight: 400;
  color: var(--ink-2);
}

/* ── Standards — forest statement card, motifs #3 + #7 ───────────────────── */

.standards {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  padding: clamp(1.25rem, 3vw, 1.85rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--forest);
  border-radius: var(--radius);
  color: var(--cream);
}

.standards__title {
  margin: 0 0 .85rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid rgba(246, 241, 232, .28);  /* in-card hairline, deck grammar */
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  font-weight: 400;
  color: var(--white);
}

.standards__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .45rem;
}

.standards__list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: .93rem;
  font-weight: 400;
}

/* Green checkmark bullets — mint on forest, 6.3:1 */
.standards__list li::before {
  content: "✓";
  position: absolute;
  left: .1rem;
  color: var(--mint);
  font-weight: 600;
}

/* Two columns once there's room — keeps the card from dominating the page. */
@media (min-width: 46rem) {
  .standards__list { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
}

/* ── Service note — sage card, dark type (the fixed motif) ───────────────── */

.service-note {
  margin-top: 1rem;
  padding: .95rem 1.25rem;
  background: var(--sage);
  border-radius: var(--radius);
}

.service-note p { margin: 0; font-size: .95rem; color: var(--ink); }

.service-note__lead { font-weight: 600; color: var(--forest); }  /* 4.8:1 on sage ✓ */

/* ── Weeks ───────────────────────────────────────────────────────────────── */

.week { margin-top: clamp(2rem, 5vw, 2.75rem); }

.week__label {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--hairline);
  font-size: .78rem;   /* eyebrow grammar, slightly larger as a section head */
}

.week__range {
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--ink-2);
}

.week__days {
  margin: .9rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .6rem;
}

.week__note {
  margin: .8rem 0 0;
  font-size: .84rem;
  font-style: italic;
  color: var(--ink-2);
}

/* ── Day cards ───────────────────────────────────────────────────────────── */

.day {
  padding: .9rem 1.05rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 5px rgba(42, 31, 20, .05);
}

.day__head {
  margin: 0 0 .3rem;
  display: flex;
  align-items: baseline;
  gap: .55rem;
  flex-wrap: wrap;
}

.day__weekday {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
}

.day__date { font-size: .72rem; color: var(--ink-2); }

.day__theme {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 600;         /* dish-name weight per theme.ts heading */
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;       /* long themes ("BYO Loaded Baked Potato…") break evenly */
}

/* Badges — sage fill, forest type (4.8:1, AA normal at any size) */
.day__badge {
  align-self: center;
  margin-left: auto;
  padding: .12rem .55rem;
  background: var(--sage);
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--forest);
  white-space: nowrap;
}

/* Today outranks First-day visually: filled forest pill, cream type (8.9:1). */
.day__badge--today { background: var(--forest); color: var(--cream); }

.day--today { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 1px 5px rgba(42,31,20,.05); }

/* No-service days — hierarchy through saturation (motif #5), meaning never by
   color alone: the literal "No service" flag is the carrier, muting is secondary. */
.day--no-service {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}

.day--no-service .day__weekday { color: var(--ink-2); }
.day--no-service .day__theme   { font-weight: 400; color: var(--ink-2); }

.day__flag {
  margin: .35rem 0 0;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);      /* 6.4:1 on cream — textSubtle would fail here */
}

/* ── Dish lists (Phase 2 — live data; styled now so the swap ships styled) ── */

.day__dishes {
  margin: .45rem 0 0;
  padding: 0;
  list-style: none;
}

.day__dishes li {
  padding: .3rem 0;
  border-top: 1px solid #EEEBE4;   /* in-card hairline */
  font-size: .88rem;
  font-weight: 400;
  line-height: 1.4;
}

.day__chips { display: inline-flex; flex-wrap: wrap; gap: .3rem; margin-left: .5rem; vertical-align: middle; }

/* Allergen chips stay TEXT, warm amber family — reads as a warning class against
   the green brand family (kiosk ruling, carried forward). */
.chip {
  padding: .05rem .45rem;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--chip-ink);
}

.chip--veg { background: #EFF5EC; border-color: #C4DBBD; color: #2C5847; }

/* ── Colophon — forest statement band, deck's closing-slide grammar ──────── */

.colophon {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(1.75rem, 4vw, 2.5rem) 0 clamp(2rem, 5vw, 2.75rem);
  background: var(--forest);
  color: var(--cream);
}

.colophon__mark { display: block; height: 30px; width: auto; margin-bottom: 1rem; }

.colophon__body { margin: 0 0 .4rem; max-width: 46rem; font-size: .95rem; font-weight: 400; }
.colophon__body strong { color: var(--white); font-weight: 600; }

.colophon__meta { margin: 0; font-size: .8rem; color: var(--mint); }

/* ── Tablet: 46–60rem — day rows go horizontal; the week reads as a list ─── */

@media (min-width: 46rem) and (max-width: 59.98rem) {
  .day {
    display: grid;
    grid-template-columns: 9.5rem 1fr;
    column-gap: 1.25rem;
    align-items: start;
  }
  .day__head { flex-direction: column; align-items: flex-start; gap: .15rem; margin: 0; }
  .day__badge { margin-left: 0; margin-top: .35rem; align-self: flex-start; }
}

/* ── Desktop ≥60rem: the week-across grid returns, five equal columns ────── */

@media (min-width: 60rem) {
  .week__days { grid-template-columns: repeat(5, 1fr); align-items: stretch; }
  .day { display: flex; flex-direction: column; }
  .day__head { row-gap: .15rem; }
  .day__badge { margin-left: 0; }          /* badge wraps under the date at this width */
  .day__body { display: flex; flex-direction: column; flex: 1 1 auto; }
  .day__flag { margin-top: auto; padding-top: .5rem; }  /* flags align to card bottoms */
}

/* ── Print — a school office will pin this up ────────────────────────────── */

@media print {
  body { background: #fff; border-top: none; }
  .masthead__title { color: #000; }
  .standards { background: none; border: 1px solid #999; color: #000; }
  .standards__title { color: #000; border-bottom-color: #999; }
  .standards__list li::before { color: #000; }
  .service-note { background: none; border: 1px solid #999; }
  .service-note__lead { color: #000; }
  .day { box-shadow: none; break-inside: avoid; }
  .day--today { border-color: #999; box-shadow: none; }
  .day__badge, .day__badge--today { background: none; border: 1px solid #666; color: #000; }
  .week { break-inside: avoid; }
  .colophon { background: none; color: #000; }
  .colophon__mark { display: none; }
  .colophon__meta { color: #333; }
}
