/* mesa — base styles shared by every surface. Design system "Azulejo" (docs/DESIGN.md).
   Tokens, reset, type, and every shared component. Page stylesheets (platform.css,
   dashboard.css, manage.css, site.css) build on this and never restyle the basics.
   The class index is at the end of the file. */

/* 1. Font ------------------------------------------------------------------ */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/onest-latin.woff2") format("woff2");
}

/* 2. Tokens (light) --------------------------------------------------------- */
:root {
  color-scheme: light;
  --paper: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #eaeef6;
  --ink: #131c33;
  --ink-soft: #3b4661;
  --muted: #5f6983;
  --line: #d8deea;
  --line-strong: #8694b1;
  --cobalt: #2746b9;
  --cobalt-press: #1d369a;
  --cobalt-soft: #e6ecfb;
  --on-cobalt: #ffffff;
  --btn: #2746b9;
  --btn-press: #1d369a;
  --on-btn: #ffffff;
  --sol: #f5c53a;
  --ok: #1d7a4c;
  --ok-bg: #e3f3ea;
  --warn: #8a5a00;
  --warn-bg: #fff3d6;
  --err: #b3261e;
  --err-bg: #fde8e6;
  --focus: 0 0 0 3px #f5c53a;
  --tile: url("../img/tile.svg");
  --tile-row: url("../img/tile-row.svg");
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-sm: 0.85rem;
  --fs-0: 1rem;
  --fs-1: 1.2rem;
  --fs-2: 1.35rem;
  --fs-3: 1.7rem;
  --fs-4: 2.2rem;
  --fs-5: 2.6rem;
  --measure: 64ch;

  --gutter: max(20px, env(safe-area-inset-left));
  --wrap: 1120px;
  --narrow: 720px;
  --r-ctl: 8px;
  --r-panel: 12px;
  --r-pill: 999px;
}
@media (min-width: 760px) {
  :root { --fs-4: 2.8rem; --fs-5: 3.4rem; }
}

/* Tokens (dark): the device setting unless the person chose "Claro", and the explicit choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0f1627;
    --surface: #171f33;
    --surface-2: #1f2a44;
    --ink: #e9edf6;
    --ink-soft: #b7c1d8;
    --muted: #8a96b2;
    --line: #2a3550;
    --line-strong: #5c6ca0;
    --cobalt: #7b95f2;
    --cobalt-press: #9db1f7;
    --cobalt-soft: #1d2a4f;
    --on-cobalt: #0f1627;
    --btn: #3d5fe0;
    --btn-press: #2f4fcf;
    --on-btn: #ffffff;
    --sol: #f5c53a;
    --ok: #5fd39a;
    --ok-bg: #143225;
    --warn: #f0c050;
    --warn-bg: #3a2d10;
    --err: #ff8f86;
    --err-bg: #3f1a18;
    --focus: 0 0 0 3px #f5c53a;
    --tile: url("../img/tile-dark.svg");
    --tile-row: url("../img/tile-row-dark.svg");
    --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%230f1627' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1627;
  --surface: #171f33;
  --surface-2: #1f2a44;
  --ink: #e9edf6;
  --ink-soft: #b7c1d8;
  --muted: #8a96b2;
  --line: #2a3550;
  --line-strong: #5c6ca0;
  --cobalt: #7b95f2;
  --cobalt-press: #9db1f7;
  --cobalt-soft: #1d2a4f;
  --on-cobalt: #0f1627;
  --btn: #3d5fe0;
  --btn-press: #2f4fcf;
  --on-btn: #ffffff;
  --sol: #f5c53a;
  --ok: #5fd39a;
  --ok-bg: #143225;
  --warn: #f0c050;
  --warn-bg: #3a2d10;
  --err: #ff8f86;
  --err-bg: #3f1a18;
  --focus: 0 0 0 3px #f5c53a;
  --tile: url("../img/tile-dark.svg");
  --tile-row: url("../img/tile-row-dark.svg");
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%230f1627' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* 3. Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-0);
  font-weight: 400;
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100svh;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
svg { display: inline-block; max-width: 100%; vertical-align: middle; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}
a { color: var(--cobalt); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--cobalt-press); }
:focus-visible { outline: none; box-shadow: var(--focus); }
::placeholder { color: var(--muted); opacity: 1; }
hr, .rule { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
[hidden] { display: none !important; }

/* Without JavaScript (theme.js adds the "js" class before first paint; a "no-js" class on <html>
   is honoured too): help texts stay open, the phone menu stays open, dead controls disappear. */
.no-js .help-text, html:not(.js) .help-text { display: block !important; }
.no-js .help-btn, .no-js .menu-btn, .no-js .theme-btn, .no-js .theme-select,
html:not(.js) .help-btn, html:not(.js) .menu-btn, html:not(.js) .theme-btn, html:not(.js) .theme-select { display: none !important; }

/* 4. Type ------------------------------------------------------------------- */
h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-4); text-wrap: balance; }
h2 { font-size: var(--fs-3); text-wrap: balance; }
h3 { font-size: var(--fs-2); line-height: 1.25; letter-spacing: 0; }
h4 { font-size: var(--fs-1); line-height: 1.3; letter-spacing: 0; }
p { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin: 0 0 0.25em; }
dl { margin: 0 0 1em; }
dd { margin: 0; }
strong, b { font-weight: 700; }
code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
}
.lead { font-size: var(--fs-1); line-height: 1.5; }
small, .small { font-size: var(--fs-sm); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* "Saltar al contenido": the first thing the keyboard reaches; hidden until it has focus. */
.skip { position: absolute; top: 12px; left: 12px; z-index: 1000; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip:focus-visible {
  width: auto;
  height: auto;
  min-height: 44px;
  margin: 0;
  padding: 10px 20px;
  overflow: visible;
  clip: auto;
  clip-path: none;
  border-radius: var(--r-pill);
  background: var(--cobalt);
  color: var(--on-cobalt);
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--focus);
}

/* 5. Layout ----------------------------------------------------------------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: var(--narrow); margin-inline: auto; }
.wrap.narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.mid { max-width: 52rem; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 32px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.grid-2, .grid-3 { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
section.block { padding-block: 64px; }
section.block + section.block { border-top: 1px solid var(--line); }
@media (max-width: 759px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  section.block { padding-block: 40px; }
}

/* 6. Buttons: <button class="btn"> and <a class="btn"> look the same ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  font-size: var(--fs-0);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  user-select: none;
  vertical-align: middle;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-soft); color: var(--ink); }
.btn-primary { background: var(--btn); border-color: var(--btn); color: var(--on-btn); }
.btn-primary:hover { background: var(--btn-press); border-color: var(--btn-press); color: var(--on-btn); }
.btn-secondary { background: var(--surface); border-color: var(--cobalt); color: var(--cobalt); }
.btn-secondary:hover { background: var(--cobalt-soft); border-color: var(--cobalt-press); color: var(--cobalt-press); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ink); }
.btn-quiet:hover { background: transparent; border-color: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 0.15em; }
.btn-danger { background: var(--surface); border-color: var(--err); color: var(--err); }
.btn-danger:hover { background: var(--err-bg); border-color: var(--err); color: var(--err); }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 0.95rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 1.2em; height: 1.2em; }

/* 7. Forms ------------------------------------------------------------------ */
.field { margin: 0 0 20px; min-width: 0; }
label, .label { display: block; font-weight: 500; }
.field > label, .field > .label { margin: 0 0 6px; }
.label-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 6px; }
.label-row label, .label-row .label { margin: 0; flex: 0 1 auto; min-width: 0; max-width: calc(100% - 36px); }
/* the "?" stays on the label's first line: a long label wraps inside its box instead */
.label-row .help-text { flex: 1 1 100%; margin-top: 0; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]),
select, textarea, .input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.3;
}
select { padding-right: 36px; }
textarea { min-height: 7rem; line-height: 1.5; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--cobalt); box-shadow: var(--focus); }
input[type="radio"] { width: 22px; height: 22px; margin: 0; accent-color: var(--cobalt); flex: none; }
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  flex: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface) center / 16px 16px no-repeat;
  vertical-align: middle;
  cursor: pointer;
}
input[type="checkbox"]:checked { background-color: var(--cobalt); border-color: var(--cobalt); background-image: var(--check); }
input[type="checkbox"]:focus-visible { border-color: var(--cobalt); box-shadow: var(--focus); }
input[type="checkbox"]:disabled { opacity: 0.55; cursor: not-allowed; }
input[type="file"] { font-size: var(--fs-sm); }
.invalid input, .invalid select, .invalid textarea, .invalid .input, [aria-invalid="true"] { border-color: var(--err); }
.hint { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.err { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--err); font-weight: 500; }
.field .check, .check { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-weight: 400; cursor: pointer; }
.check input { margin-top: 2px; }
.affix { display: flex; align-items: stretch; min-width: 0; }
.affix input, .affix .input { flex: 1 1 auto; min-width: 0; border-radius: var(--r-ctl) 0 0 var(--r-ctl); }
.affix input:focus-visible { position: relative; z-index: 1; }
.affix .suffix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1.5px solid var(--line-strong);
  border-left: 0;
  border-radius: 0 var(--r-ctl) var(--r-ctl) 0;
  background: var(--surface-2);
  color: var(--ink-soft);
  white-space: nowrap;
}
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: 20px;
  margin: 0 0 24px;
}
/* The legend sits inside the panel: floated, it is not drawn on the border, so a title that wraps on
   a phone no longer has the border running through its second line. The next child clears it. */
fieldset.group > legend { float: left; width: 100%; margin: 0 0 12px; padding: 0; font-size: var(--fs-2); font-weight: 700; line-height: 1.25; }
fieldset.group > legend + * { clear: both; }
fieldset.group::after { content: ""; display: block; clear: both; }
.group-lead { margin: 0 0 16px; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* The "?" on every setting: a 26px circle with a 44px touch area; it opens the paragraph. */
.help-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 1.5px solid var(--cobalt);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--cobalt);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
}
.help-btn::before { content: ""; position: absolute; inset: -9px; border-radius: var(--r-pill); }
.help-btn:hover { background: var(--cobalt-soft); }
.help-btn[aria-expanded="true"] { background: var(--cobalt); color: var(--on-cobalt); }
.help-text {
  margin: 8px 0 0;
  padding: 12px;
  max-width: var(--measure);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--ink-soft);
  background: var(--cobalt-soft);
  border-radius: var(--r-ctl);
}
.help-text + .hint, .help-text + .err { margin-top: 8px; }

/* Party stepper: − 4 + */
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); overflow: hidden; }
.stepper-btn { display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; padding: 0; border: 0; border-radius: 0; background: var(--surface-2); color: var(--ink); font-size: 1.5rem; font-weight: 500; line-height: 1; cursor: pointer; }
.stepper-btn:hover { background: var(--cobalt-soft); color: var(--cobalt); }
.stepper-btn:focus-visible { box-shadow: inset var(--focus); }
.stepper-btn[disabled] { color: var(--muted); cursor: not-allowed; }
/* The anti-robot widget's place in a form (macros/forms.challenge): its own height, so the button
   below does not jump when the widget appears. */
.challenge-box { margin: 0 0 16px; min-height: 65px; }
.challenge-box:empty { display: none; }
.stepper-value { min-width: 64px; padding: 0 8px; text-align: center; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* 8. Chips: kinds of table, times --------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  font-size: var(--fs-0);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
button.chip, a.chip, label.chip { cursor: pointer; }
.chip:hover { border-color: var(--cobalt); color: var(--cobalt); }
.chip.on, .chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--cobalt); border-color: var(--cobalt); color: var(--on-cobalt); }
.chip.on:hover, .chip[aria-pressed="true"]:hover { color: var(--on-cobalt); }
.chip.off, .chip[disabled], .chip[aria-disabled="true"] { background: var(--surface-2); border-color: var(--surface-2); color: var(--muted); cursor: not-allowed; text-decoration: none; }

/* 9. Status pills and badges ----------------------------------------------- */
.status, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--ink-soft);
}
.badge { background: var(--surface); border: 1px solid var(--line-strong); }
.status.status-confirmed { background: var(--ok-bg); color: var(--ok); }
.status.status-pending_restaurant { background: var(--warn-bg); color: var(--warn); }
.status.status-pending_customer { background: var(--surface-2); color: var(--ink-soft); border: 1px dashed var(--line-strong); }
.status.status-cancelled, .status.status-no_show { background: var(--err-bg); color: var(--err); }
.tag-reconfirmed { display: inline-block; padding: 1px 8px; border: 1px solid var(--ok); border-radius: var(--r-pill); color: var(--ok); font-size: var(--fs-sm); white-space: nowrap; }
.reconfirmed { color: var(--ok); font-weight: 500; }

/* 10. Panels (interactive groups only; running text is never boxed) ----------- */
.panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; min-width: 0; }

/* 11. Flashes ---------------------------------------------------------------- */
.flashes { padding-top: 16px; }
.flash { margin: 0 0 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); max-width: var(--measure); }
.flash a { color: inherit; }
.flash-info { background: var(--cobalt-soft); border-color: var(--cobalt-soft); color: var(--ink); }
.flash-success { background: var(--ok-bg); border-color: var(--ok-bg); color: var(--ok); }
.flash-warning { background: var(--warn-bg); border-color: var(--warn-bg); color: var(--warn); }
.flash-error { background: var(--err-bg); border-color: var(--err-bg); color: var(--err); }

/* 12. Tables ------------------------------------------------------------------ */
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; font-size: var(--fs-sm); color: var(--ink-soft); background: var(--surface-2); white-space: nowrap; }
table.ledger th:first-child, table.ledger td:first-child { padding-left: 8px; }

/* 13. Details ----------------------------------------------------------------- */
summary { cursor: pointer; font-weight: 500; padding: 6px 0; }
summary:focus-visible { border-radius: 4px; }
details[open] > summary { margin-bottom: 8px; }

/* 14. Tiles: hero wall, 32px divider row, auth side panel -------------------- */
.tiles { background-color: var(--surface); background-image: var(--tile); background-size: 64px 64px; background-position: 0 0; background-repeat: repeat; }
/* One tile tall: the corner quarter circles of the full tile would show as half-moons along both
   edges of the strip, so the row uses the variant without them (tile-row.svg). */
.tiles-row { height: 32px; background-image: var(--tile-row); background-size: 32px 32px; }
.tiles-wall { display: grid; place-items: center; padding: 32px 20px; min-height: 220px; border: 1px solid var(--line); border-radius: var(--r-panel); }
.tiles-wall > .panel, .tiles-wall > .card { width: 100%; max-width: 360px; border: 6px solid var(--surface); border-radius: calc(var(--r-panel) + 6px); }

/* 15. Brand: [mark] mesa ------------------------------------------------------ */
.wordmark, .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: var(--fs-2);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover, .brand:hover { color: var(--ink); }
svg.mark { width: 28px; height: 28px; flex: none; color: var(--ink); }

/* 16. Header ------------------------------------------------------------------- */
.topbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; min-height: 64px; padding: 12px 0; }
.topbar > .wordmark, .topbar > .brand { margin-right: auto; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-ctl); color: var(--ink); font-weight: 500; text-decoration: none; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--cobalt); }
.nav form { margin: 0; }
.menu-btn { display: none; }
@media (max-width: 759px) {
  .menu-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-ctl);
    background: var(--surface);
    color: var(--ink);
    font-weight: 500;
  }
  .menu-btn[aria-expanded="true"] { border-color: var(--cobalt); color: var(--cobalt); }
  .nav { display: none; flex: 1 1 100%; flex-direction: column; align-items: stretch; order: 10; gap: 2px; padding: 8px 0 4px; border-top: 1px solid var(--line); }
  .nav.open, html:not(.js) .nav, .no-js .nav { display: flex; }
  .nav a:not(.btn), .nav .btn-quiet { justify-content: flex-start; min-height: 48px; width: 100%; }
}
@media (max-width: 479px) {
  .topbar > .btn-primary { order: 5; flex: 1 1 100%; }
}

/* 17. Theme controls ----------------------------------------------------------- */
.theme-btn { gap: 8px; }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .icon-sun { display: inline-block; }
  :root:not([data-theme="light"]) .theme-btn .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-btn .icon-sun { display: inline-block; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: none; }
@media (max-width: 599px) {
  .theme-btn { position: relative; padding: 0 12px; }
  .theme-btn [data-theme-label] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
.theme-select { display: inline-flex; align-items: center; gap: 8px; }
.theme-select select { width: auto; min-height: 44px; padding: 4px 32px 4px 12px; font-size: var(--fs-sm); }

/* 18. Platform footer ---------------------------------------------------------- */
.platform-footer { margin-top: 64px; padding: 32px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
.platform-footer .footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.platform-footer .footer-nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.platform-footer .footer-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); text-decoration: none; }
.platform-footer .footer-nav a:hover { color: var(--cobalt); text-decoration: underline; }
.platform-footer .theme-select { margin-left: auto; color: var(--ink-soft); }
.platform-footer .footer-year { margin: 16px 0 0; }
@media (max-width: 759px) {
  .platform-footer { margin-top: 40px; }
  .platform-footer .theme-select { margin-left: 0; flex-basis: 100%; }
}

/* 19. Motion: only where allowed ------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .btn, .chip, .help-btn { transition: background-color 120ms, border-color 120ms, color 120ms; }
}

/* ==============================================================================
   CLASS INDEX — everything base.css defines (page packages must not restyle these)
   Tokens:      --paper --surface --surface-2 --ink --ink-soft --muted --line --line-strong
                --cobalt --cobalt-press --cobalt-soft --on-cobalt --btn --btn-press --on-btn --sol
                --ok --ok-bg --warn --warn-bg --err --err-bg --focus --tile --tile-row
                --font --fs-sm --fs-0 --fs-1 --fs-2 --fs-3 --fs-4 --fs-5 --measure
                --gutter --wrap --narrow --r-ctl --r-panel --r-pill --check
   Reset/type:  html body img svg button a :focus-visible ::placeholder hr [hidden]
                h1 h2 h3 h4 p ul ol li dl dd strong code kbd
                .lead .small .muted .num .sr-only .skip .rule
                .no-js / html:not(.js) fallbacks (.help-text open; .help-btn .menu-btn .theme-btn .theme-select hidden; .nav open)
   Layout:      .wrap .narrow .mid .stack .stack-lg .row .between .grid-2 .grid-3 section.block
   Buttons:     .btn .btn-primary .btn-secondary .btn-quiet .btn-danger .btn-sm .btn-block
                [disabled] [aria-disabled="true"]
   Forms:       .field label .label .label-row input select textarea .input .hint .err .invalid
                [aria-invalid="true"] .check (22px box) .affix .suffix fieldset fieldset.group legend
                .group-lead .actions .honeypot .help-btn [aria-expanded="true"] .help-text
                .stepper .stepper-btn .stepper-value .challenge-box
   Chips:       .chips .chip .chip.on .chip[aria-pressed="true"] .chip.off .chip[disabled]
   Status:      .status .status-confirmed .status-pending_restaurant .status-pending_customer
                .status-cancelled .status-no_show .badge .tag-reconfirmed .reconfirmed
   Panels:      .panel .card
   Flashes:     .flashes .flash .flash-info .flash-success .flash-warning .flash-error
   Tables:      table th td .table-wrap table.ledger
   Details:     summary details[open]
   Tiles:       .tiles .tiles-row .tiles-wall (.tiles-wall > .panel with the 6px grout border)
   Brand:       .wordmark .brand svg.mark
   Header:      .topbar .nav .nav a .nav[aria-current="page"] .menu-btn .nav.open
   Theme:       .theme-btn .icon-sun .icon-moon .theme-select
   Footer:      .platform-footer .footer-row .footer-nav .footer-year
   ============================================================================== */
