/* Mensa-Bestellung: Layout und Standardwerte (Look der Schule HEG). Schriften und Farben je Auftritt in theme-<name>.css. */


:root {
  --paper: #F7F6F3;      /* Hintergrund */
  --ink: #333D44;        /* Text, dunkle Flächen: 10,27:1 auf --paper */
  --blue: #9CCBD1;       /* nur Fläche/Linie, nie Text auf Hell */
  --sand: #A68E74;       /* nur Fläche/Linie */
  --white: #FFFFFF;
  --muted: #4F5A61;      /* Nebentext: 7,0:1 auf Weiß (Arbeitswert, nicht CI) */
  --line: #D8D5CE;
  --blue-soft: #E3F1F3;  /* Auswahlfläche, Text darauf --ink */
  --error: #A4262C;      /* Fehlertext: 6,9:1 auf Weiß (funktional, nicht CI) */
  --error-soft: #FBE9E9;
  --head: "ValkyRegular", Georgia, "Times New Roman", serif;
  --body: "GilroyRegular", Helvetica, Arial, sans-serif;
  --bold: "GilroyBold", Helvetica, Arial, sans-serif;
  --r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--body); }
strong, b { font-family: var(--bold); font-weight: normal; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* Überschriften in Gilroy Bold. Die Serife Valky bleibt nur im Logo, damit das Werkzeug modern wirkt. */
h1, h2, h3 { font-family: var(--headline, var(--bold)); font-weight: normal; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4.4vw, 2.2rem); line-height: 1.15; }
h2 { font-size: 1.2rem; }
small, .small { font-size: .9rem; color: var(--muted); }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 10; }

/* Kopf und Fuß */
.top { background: var(--ink); color: var(--paper); }
.top__in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { color: var(--paper); text-decoration: none; display: flex; flex-direction: column; line-height: 1.25; }
.brand__name { font-family: var(--head); font-size: 1.35rem; white-space: nowrap; }
.brand__sub { margin-top: 3px; font-size: .75rem; letter-spacing: .25em; text-transform: uppercase; color: var(--blue); }
.top__nav { display: flex; gap: 18px; }
.top__link { color: var(--paper); font-family: var(--bold); text-decoration: none; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem;
  border-bottom: 2px solid var(--blue); padding-bottom: 2px; }
.foot { margin-top: 56px; border-top: 1px solid var(--line); background: var(--white); }
.foot__in { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 20px; padding-bottom: 28px; font-size: .95rem; }

/* Einleitung */
.hero { padding: 28px 0 8px; }
.lead { font-size: 1.12rem; max-width: 40em; }
.facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.facts li { background: var(--white); border-left: 4px solid var(--blue); padding: 10px 14px; border-radius: 0 var(--r) var(--r) 0; }
@media (min-width: 700px) { .facts { grid-template-columns: repeat(3, 1fr); } }

/* Schritte */
.step { display: flex; align-items: center; gap: 12px; margin: 44px 0 16px; font-size: 1.25rem; }
.step span { flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); color: var(--paper);
  font: 1rem/2rem var(--bold); text-align: center; }

/* Tage und Gerichte */
.week + .week { margin-top: 28px; }
.week__title { font-family: var(--bold); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 10px; }
.day { border: 0; margin: 0 0 14px; padding: 0; background: var(--white); border-radius: var(--r); overflow: hidden;
  box-shadow: 0 1px 0 var(--line); min-width: 0; }
.day__head { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px;
  padding: 12px 16px; background: var(--ink); color: var(--paper); float: left; }
.day__head + * { clear: both; }
.day__date { font-family: var(--bold); font-size: 1.15rem; letter-spacing: .01em; }
.day__date small { color: var(--blue); font-size: 1rem; margin-left: 4px; }
.day__when { font-size: .9rem; }
.day__note { clear: both; margin: 0; padding: 10px 16px; background: var(--blue-soft); font-size: .95rem; }
.day--closed .day__head { background: var(--muted); }
.day--closed .day__date small { color: var(--paper); } /* Hellblau auf Grau nur 4,0:1 */
.opts { clear: both; display: grid; gap: 1px; background: var(--line); }
@media (min-width: 700px) { .opts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .opts { grid-template-columns: repeat(4, 1fr); } .opt { min-height: 120px; } }

.opt { position: relative; display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; align-items: start;
  padding: 14px 16px; background: var(--white); cursor: pointer; min-height: 72px; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt__box { grid-row: 1 / span 3; width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 5px; margin-top: 2px; background: var(--white); }
.opt__cat { font-family: var(--bold); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.opt__dish { font-size: 1.02rem; }
.opt__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag, .codes { font-size: .78rem; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted); }
.opt:hover { background: var(--paper); }
.opt input:checked ~ .opt__box { background: var(--ink); box-shadow: inset 0 0 0 3px var(--white); }
.opt:has(input:checked) { background: var(--blue-soft); }
.opt input:focus-visible ~ .opt__box { outline: 3px solid var(--ink); outline-offset: 2px; }
.opt--off { cursor: not-allowed; color: var(--muted); }
.opt--off .opt__box { border-color: var(--line); background: var(--paper); }

.legend { margin: 18px 0 0; background: var(--white); border-radius: var(--r); padding: 12px 16px; }
.legend summary { cursor: pointer; font-family: var(--bold); }
.legend dl { display: grid; gap: 4px 16px; margin: 12px 0 0; }
.legend dl div { display: flex; gap: 10px; }
.legend dt { font-family: var(--bold); min-width: 2.2em; }
.legend dd { margin: 0; }
@media (min-width: 700px) { .legend dl { grid-template-columns: 1fr 1fr; } }

/* Formular */
.card { background: var(--white); border-radius: var(--r); padding: 20px 16px; box-shadow: 0 1px 0 var(--line); }
.fields { display: grid; gap: 18px; }
@media (min-width: 1000px) { .fields--order { grid-template-columns: 1fr 1fr; column-gap: 32px; } .fields--order > .row2, .fields--order > .span2 { grid-column: 1 / -1; } }
.row2 { display: grid; gap: 18px; }
@media (min-width: 700px) { .row2 { grid-template-columns: 1fr 1fr; } .card { padding: 24px; } }
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-family: var(--bold); margin-bottom: 6px; }
.opt-l { font-family: var(--body); color: var(--muted); }
input[type=text], input[type=email], input:not([type]) {
  width: 100%; font: inherit; color: var(--ink); padding: 12px 14px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--white); min-height: 50px; }
input[aria-invalid=true] { border-color: var(--error); background: var(--error-soft); }
.field__hint { margin: 6px 0 0; font-size: .9rem; color: var(--muted); }
.field__err { margin: 6px 0 0; color: var(--error); font-family: var(--bold); font-size: .95rem; }
.radios { display: grid; gap: 8px; }
@media (min-width: 700px) { .radios { grid-template-columns: repeat(3, 1fr); } }
.radio, .check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.radio { border: 2px solid var(--line); border-radius: var(--r); padding: 12px; }
.radio:has(input:checked) { border-color: var(--ink); background: var(--blue-soft); }
.radio input, .check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.errors { border: 2px solid var(--error); background: var(--error-soft); border-radius: var(--r); padding: 14px 16px; margin: 20px 0; }
.errors h2 { font-family: var(--bold); font-size: 1.05rem; color: var(--error); }
.errors ul { margin: 0; padding-left: 20px; }
.errors a { color: var(--error); }

/* Absenden: auf dem Handy unten fixiert */
.submitbar { position: sticky; bottom: 0; z-index: 5; margin: 24px -16px 0; padding: 12px 16px; background: var(--white);
  border-top: 3px solid var(--blue); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.submitbar__count { margin: 0; font-size: .95rem; }
@media (min-width: 700px) { .submitbar { margin: 24px 0 0; border-radius: var(--r); } }

.btn { display: inline-block; font: 1.05rem/1.2 var(--bold); color: var(--white); background: var(--ink); border: 2px solid var(--ink);
  border-radius: var(--r); padding: 14px 22px; min-height: 52px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #222A30; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--white); }
.btn--warn { background: var(--error); border-color: var(--error); }
.btn--warn:hover { background: #861E23; }

/* Status- und Dankeseiten */
.msg, .manage, .narrow { max-width: 760px; margin: 40px auto 0; }
.msg { background: var(--white); border-radius: var(--r); padding: 28px 20px; border-top: 6px solid var(--blue); }
.msg--warn { border-top-color: var(--sand); }
.msg__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 1.6rem/56px var(--bold); text-align: center; margin-bottom: 16px; }
.msg--warn .msg__icon { background: var(--sand); color: var(--ink); }
.msg__back { margin-top: 24px; }
.checklist { padding-left: 20px; }
.checklist li { margin-bottom: 6px; }
.items { list-style: none; padding: 0; margin: 16px 0; border-top: 1px solid var(--line); }
.item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.item--cancelled strong, .item--expired strong, .item--duplicate strong { text-decoration: line-through; }
.items--manage .check { width: 100%; }
.check--none { padding-left: 32px; }
.notice { background: var(--blue-soft); border-left: 4px solid var(--blue); padding: 12px 14px; border-radius: 0 var(--r) var(--r) 0; }
.empty { background: var(--white); border-radius: var(--r); padding: 24px; margin-top: 24px; }
.prose h2 { font-family: var(--bold); font-size: 1.1rem; margin-top: 1.5em; }

@media (prefers-reduced-motion: no-preference) { .opt, .radio, .btn { transition: background-color .12s ease, border-color .12s ease; } }

/* Hinweis Testbetrieb */
.testbar { background: var(--blue); color: var(--ink); text-align: center; padding: 8px 16px; font-family: var(--bold); font-size: .95rem; }

/* Meine Bestellungen */
.overview { margin-top: 28px; }
.overview__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.overview__head .lead { margin: 0; }
.notice--warn { border-left-color: var(--sand); background: var(--white); }
.oday { border: 0; padding: 0; margin: 0 0 14px; background: var(--white); border-radius: var(--r); overflow: hidden; box-shadow: 0 1px 0 var(--line); min-width: 0; }
.oday__head { width: 100%; float: left; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 12px 16px; background: var(--ink); color: var(--paper); }
.olist { clear: both; list-style: none; margin: 0; padding: 0; }
.oitem { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border-top: 1px solid var(--line); }
.oitem__main { flex: 1 1 320px; }
.oitem__dish { font-size: 1.02rem; }
.oitem--cancelled { background: var(--paper); }
.oitem--cancelled .oitem__dish { text-decoration: line-through; color: var(--muted); }
.btn--small { padding: 9px 14px; min-height: 42px; font-size: .95rem; }
.page { margin-top: 28px; }
.prose { max-width: 75ch; }

/* Kopfbereich auf dem Handy: Logo in einer Zeile, darunter die zwei Links als gleich breite, gut treffbare Felder */
@media (max-width: 699px) {
  .top__in { flex-wrap: wrap; padding-top: 14px; padding-bottom: 0; gap: 10px 0; }
  .brand { width: 100%; }
  .brand__name { font-size: 1.25rem; }
  .top__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0; width: calc(100% + 32px); margin: 0 -16px; border-top: 1px solid rgba(247, 246, 243, .18); }
  .top__link { text-align: center; text-transform: none; letter-spacing: .02em; font-size: 1rem; padding: 14px 8px; border-bottom-width: 3px; }
  .top__link + .top__link { border-left: 1px solid rgba(247, 246, 243, .18); }
  .testbar { font-size: .88rem; padding: 6px 16px; }
}
