/* Staff editor: inkono's product theme (the inkono-design skill). Ink and warm bone neutrals, Space Grotesk for
 * headings, one accent. The accent comes from the business (its site's button colour, checked for contrast in
 * src/editor/accent.ts and served as /brand/accent.css); without a business it is inkono's Signal below, with
 * Ink text on it. Phone first; from 960 px a side navigation. Scripts only enhance form controls (/static/forms/,
 * styled by forms.css from the --fc-* tokens below). Fonts are self-hosted (static/inkono/fonts, SIL OFL 1.1). */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/static/inkono/fonts/space-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/static/inkono/fonts/space-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* inkono brand: Ink, White, the bone neutrals and Signal, the one accent (never on the logo) */
  --ink: #1b1a17;
  --white: #ffffff;
  --bone: #f4f1ea;
  --bone-2: #eae6dc;
  --bone-line: #e2ddd2;
  --stone: #8a857b;
  --stone-dark: #5c5a55;
  --stone-light: #b3afa6;
  --signal: #ff5a1f;

  --text: var(--ink);
  --muted: var(--stone-dark);
  --field: var(--stone);
  --line: var(--bone-line);
  --bg: var(--bone);
  --bg-2: var(--bone-2);
  --paper: var(--white);
  --chrome: var(--ink);
  --chrome-2: #2e2c27;
  --on-chrome: var(--bone);
  --on-chrome-muted: var(--stone-light);
  --accent: #ff5a1f;
  --on-accent: #1b1a17;
  --accent-hover: #ff7442;
  --accent-on-chrome: #ff5a1f;
  /* the accent where it is text or a small mark on a light ground: 4.5:1 on white and bone */
  --accent-text: #b93d0d;
  --on-accent-text: var(--white);
  --accent-tint: color-mix(in srgb, var(--accent) 10%, #ffffff);
  --accent-ring: color-mix(in srgb, var(--accent) 35%, transparent);
  --danger: #a3261b;
  --danger-tint: #fbedea;
  --r: 10px;
  --r-s: 6px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --gutter: 1rem;
  /* the space between the header band and a page's first block, on every page at every width: main's top padding (the
     shell's from 960 px) and nothing else; the start page (src/vorschau/client/start.css) uses the same value */
  --page-top: 2.5rem;
  /* the inner space of a box (.panel): one value for the top and the bottom, one for the sides (see the end of this file) */
  --box-y: 1.125rem;
  --box-x: 1rem;
  /* a box's lift; a box with a coloured edge draws the edge as an inset bar in front of it (see .confirm.is-note) */
  --lift: 0 1px 2px rgba(20, 23, 28, 0.05);
  color-scheme: light;
  --fc-surface: var(--paper); --fc-text: var(--text); --fc-muted: var(--muted); --fc-line: var(--line);
  --fc-accent: var(--accent-text); --fc-on-accent: var(--on-accent-text); --fc-radius: var(--r-s); --fc-radius-lg: var(--r); --fc-font-display: var(--font-display);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-bottom: 5.5rem; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.5 var(--font); font-feature-settings: 'tnum' 0;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--text); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--text); }
:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.topbar :focus-visible, .today :focus-visible, .flash-ok :focus-visible, .appfoot :focus-visible { outline-color: var(--on-chrome); }
.skip { position: absolute; left: -999px; top: 0; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 0.75rem 1rem; font-weight: 600; }
.skip:focus { left: 1rem; top: 0.75rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.i { width: 1.375rem; height: 1.375rem; flex: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 650; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: 1.875rem; line-height: 1.12; margin: 0; }
h2 { font-size: 1.1875rem; line-height: 1.25; margin: 0 0 0.5rem; }
p { margin: 0 0 1rem; }
strong { font-weight: 600; }

/* ---------------------------------------------------------------- brand bar */
.topbar { background: var(--chrome); color: var(--on-chrome); }
.topbar-in { max-width: 76rem; margin: 0 auto; min-height: 3.75rem; padding: 0.5rem var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--on-chrome); text-decoration: none; min-height: 44px; }
.brand img { width: 34px; height: 30px; }
.brand .brand-mark { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.2; overflow-wrap: anywhere; }
/* inkono's lockup "inkono by itnomad" (the logo package's file, white on the Ink band) at its minimum width.
   Clear space, the height of its n (33px): margin plus the band's padding, the gutter or the gap to .brand-product. */
.brand .wordmark { display: block; width: 200px; height: auto; margin: 1.5625rem 1.25rem; flex: none; }
.brand-product { font-size: 0.9375rem; color: var(--on-chrome-muted); padding-left: 0.6rem; margin-left: 0.1rem; border-left: 1px solid var(--chrome-2); }
.topbar-site {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.875rem;
  color: var(--on-chrome); text-decoration: none; font-weight: 500; font-size: 0.9375rem;
  border: 1px solid rgba(243, 244, 247, 0.35); border-radius: var(--r-s);
}
button.topbar-site { background: none; font-family: inherit; cursor: pointer; }
.topbar-site .i { width: 1.125rem; height: 1.125rem; color: var(--accent-on-chrome); }
.topbar-site:hover { background: var(--chrome-2); }

/* ---------------------------------------------------------------- shell */
.shell { flex: 1; width: 100%; max-width: 76rem; margin: 0 auto; }
main { display: block; padding: var(--page-top) var(--gutter) 2.5rem; max-width: 46rem; outline: none; }
main.public { margin: 0 auto; width: 100%; max-width: 72rem; flex: 1; }
.sidenav { display: none; }

.back { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 44px; margin: 0 0 0.75rem -0.35rem; padding-right: 0.5rem; text-decoration: none; font-weight: 500; color: var(--muted); }
.back:hover { color: var(--text); }
/* a 44px row first on the page gives its spare height above the text to the page top: its text starts there */
main > .back:first-child { margin-top: calc((1lh - 44px) / 2); }
.pagehead { margin: 0 0 1.5rem; }
.pagehead .lead { margin: 0.5rem 0 0; color: var(--muted); max-width: 38rem; }
.lead strong { color: var(--text); }
.group-h { font-size: 1.0625rem; margin: 2rem 0 0.75rem; }
.hint { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; margin: 0 0 0.5rem; }
.opt { color: var(--muted); font-weight: 400; font-size: 0.875rem; margin-left: 0.25rem; }

/* ---------------------------------------------------------------- messages */
.flash { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.875rem 1rem; border-radius: var(--r); margin: 0 0 1.25rem; }
.flash p { margin: 0; flex: 1 1 12rem; }
.flash .i { width: 1.5rem; height: 1.5rem; }
.flash-ok { background: var(--chrome); color: var(--on-chrome); }
.flash-ok .i { color: var(--accent-on-chrome); }
.flash-ok a { color: var(--on-chrome); font-weight: 600; text-decoration-color: var(--accent-on-chrome); min-height: 44px; display: inline-flex; align-items: center; }
.flash-err, .errors { background: var(--paper); color: var(--text); border: 1px solid var(--line); }
.flash-err .i, .errors > .i { color: var(--danger); }
.flash-err strong { color: var(--danger); }
.errors { display: flex; gap: 0.75rem; padding: 1rem; border-radius: var(--r); margin: 0 0 1.25rem; }
.errors h2 { font-size: 1.0625rem; color: var(--danger); margin: 0 0 0.35rem; }
.errors ul { margin: 0; padding-left: 1.1rem; }
.errors a { color: var(--text); }
.err-msg { display: flex; gap: 0.4rem; align-items: flex-start; color: var(--danger); font-weight: 600; font-size: 0.9375rem; margin: 0 0 0.4rem; }
.err-msg .i { width: 1.125rem; height: 1.125rem; margin-top: 0.15rem; }

/* ---------------------------------------------------------------- overview: today */
.today { background: var(--chrome); color: var(--on-chrome); border-radius: var(--r); padding: 1.25rem 1rem 0.25rem; margin: 0; }
.today-name { margin: 0 0 0.35rem; color: var(--on-chrome-muted); font-weight: 500; font-size: 0.9375rem; }
.today h1 { font-size: 1.75rem; }
.today-date { margin: 0.35rem 0 1rem; color: var(--accent-on-chrome); font-weight: 600; }
.today-list { list-style: none; margin: 0 -1rem; padding: 0; }
.today-list a { display: flex; align-items: center; gap: 0.875rem; min-height: 4.25rem; padding: 0.75rem 1rem; color: var(--on-chrome); text-decoration: none; border-top: 1px solid var(--chrome-2); }
.today-list a:hover { background: var(--chrome-2); }
.today-list .i { color: var(--on-chrome-muted); }
.today-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.today-label { font-size: 0.875rem; color: var(--on-chrome-muted); }
.today-value { font-weight: 600; font-size: 1.0625rem; overflow-wrap: anywhere; }
.today-value.is-off { font-weight: 400; color: var(--on-chrome-muted); }
.today-list .chev { color: var(--on-chrome-muted); width: 1.25rem; height: 1.25rem; }
.today-foot { margin: 0 -1rem; padding: 0.875rem 1rem 1rem; border-top: 1px solid var(--chrome-2); font-size: 0.9375rem; color: var(--on-chrome-muted); }
.today-foot strong { color: var(--on-chrome); }

/* ---------------------------------------------------------------- task lists (overview) */
.tasks, .items, .rows { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tasks > li + li, .items > li + li, .rows > li + li { border-top: 1px solid var(--line); }
.task { display: flex; align-items: center; gap: 0.875rem; min-height: 4.5rem; padding: 0.75rem 1rem; text-decoration: none; color: var(--text); }
.task:hover, .items a:hover { background: var(--bg); }
.task-icon { width: 2.5rem; height: 2.5rem; flex: none; display: grid; place-items: center; background: var(--bg); border-radius: var(--r); }
.task-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.task-title { font-weight: 600; }
.task-state { color: var(--muted); font-size: 0.9375rem; }
.chev { color: var(--field); width: 1.25rem; height: 1.25rem; }
.task.is-later .task-title, .task.is-later .task-icon { color: var(--muted); }
.task.is-later .task-icon { background: transparent; border: 1px dashed var(--field); }

/* ---------------------------------------------------------------- entry lists */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0 0 0.5rem; }
.toolbar .primary { flex: 1 1 100%; min-height: 52px; }
.toolbar .quiet { padding: 0 0.25rem; }
.group .group-h { margin-top: 1.75rem; }
.items a, .item.is-sorting { display: flex; align-items: center; gap: 0.875rem; min-height: 4.5rem; padding: 0.625rem 0.875rem 0.625rem 0.75rem; text-decoration: none; color: var(--text); scroll-margin-top: 1rem; }
.item { scroll-margin-top: 1rem; }
.thumb { width: 3.5rem; height: 3.5rem; flex: none; border-radius: var(--r-s); object-fit: cover; background: var(--bg-2); }
.thumb.is-empty { display: grid; place-items: center; background: var(--bg); border: 1px dashed var(--field); color: var(--muted); }
.thumb.is-empty .i { width: 1.25rem; height: 1.25rem; }
.item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.item-title { font-weight: 600; line-height: 1.3; }
.item-meta { color: var(--muted); font-size: 0.9375rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
.codes { font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--text); background: var(--bg); border-radius: 3px; padding: 0 0.3rem 0 0.4rem; }
.item-price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 1.0625rem; }
.item.is-fresh a { background: var(--accent-tint); box-shadow: inset 4px 0 0 var(--accent); }
.items .item.is-fresh a { flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8125rem; font-weight: 500; line-height: 1.2; padding: 0.15rem 0.45rem; border: 1px solid var(--field); border-radius: 3px; color: var(--text); background: var(--paper); white-space: nowrap; }
.tag .i { width: 0.9rem; height: 0.9rem; }
.tag.is-fresh { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; order: 5; }
.moves { display: flex; gap: 0.5rem; }
.moves form { margin: 0; }
.iconbtn-spacer { width: 44px; height: 44px; }

/* ---------------------------------------------------------------- buttons */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.25rem; border-radius: var(--r-s); border: 2px solid var(--accent);
  background: var(--accent); color: var(--on-accent); font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  touch-action: manipulation;
}
button:hover, .button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button:active, .button:active { transform: translateY(1px); }
button .i, .button .i { width: 1.25rem; height: 1.25rem; }
.ghost, button.ghost { background: transparent; border-color: var(--text); color: var(--text); }
.ghost:hover, button.ghost:hover { background: var(--bg-2); border-color: var(--text); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.danger:hover { background: #87201a; border-color: #87201a; }
button.quiet, .button.quiet { background: none; border-color: transparent; color: inherit; font-weight: 500; padding: 0 0.5rem; }
button.quiet:hover, .button.quiet:hover { background: none; text-decoration: underline; text-decoration-color: var(--accent-hover); }
.wide { width: 100%; }
.iconbtn { width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid var(--field); background: var(--paper); color: var(--text); border-radius: var(--r-s); }
.iconbtn:hover { background: var(--bg-2); border-color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0; }

/* ---------------------------------------------------------------- panels and forms */
.panel { --inset: var(--box-y); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--lift); border-radius: var(--r); padding: var(--inset) var(--box-x); margin: 0 0 1rem; }
form { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 600; }
.field { margin: 0 0 1.125rem; }
label { font-weight: 600; }
.field > label, .field > .affix + label { display: block; margin: 0 0 0.375rem; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], textarea, select, .fc-trigger {
  display: block; width: 100%; min-height: 52px; padding: 0.75rem 0.875rem;
  font: 400 1.0625rem/1.35 var(--font); color: var(--text); background: var(--paper);
  border: 1.5px solid var(--field); border-radius: var(--r-s); appearance: none;
}
/* the listbox hides the original select with [hidden]; the display above would win over the browser's hidden rule */
select[hidden] { display: none; }
/* the same for the username the reset form gives password managers (src/editor/routes/password-reset.ts) */
input[hidden] { display: none; }
select { padding-right: 2.5rem; background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%); background-position: calc(100% - 1.25rem) 52%, calc(100% - 0.9rem) 52%; background-size: 0.375rem 0.375rem; background-repeat: no-repeat; }
input[type=time], input[type=date] { font-variant-numeric: tabular-nums; }
input:hover, textarea:hover, select:hover, .fc-trigger:hover { border-color: var(--text); }
input:focus-visible, textarea:focus-visible, select:focus-visible, .fc-trigger:focus-visible { border-color: var(--text); outline: 3px solid var(--text); outline-offset: 1px; box-shadow: 0 0 0 7px var(--accent-ring); }
textarea { min-height: 6.5rem; resize: vertical; }
[aria-invalid=true] { border-color: var(--danger) !important; border-width: 2px !important; }
.is-short input, .is-short .affix, .is-short .fc-date { max-width: 12rem; }
.fc-error { display: flex; gap: 0.4rem; }
.fc-phone > .fc-trigger.fc-cc { width: auto; }
.affix { position: relative; }
.affix input { padding-right: 2.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.suffix { position: absolute; right: 0.875rem; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--muted); pointer-events: none; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.pair .field { margin-bottom: 0.75rem; }
.pair .field > label { font-weight: 500; color: var(--muted); font-size: 0.9375rem; }

.check, .radio { display: flex; align-items: center; gap: 0.75rem; min-height: 48px; font-weight: 400; cursor: pointer; }
.check input, .radio input { width: 1.5rem; height: 1.5rem; margin: 0; flex: none; accent-color: var(--accent); }
/* Firmenprofil: the company's own address shows when "wie auf der Webseite" is not ticked (without :has() it always shows) */
.panel:has(#f-company_same:checked) .company-fields { display: none; }
.choice { margin: 0 0 1rem; }
.choice legend { margin-bottom: 0.25rem; }
.choice .pair { margin: 0.25rem 0 0 2.25rem; }

/* on/off switch: a real checkbox (role=switch) over a drawn track; the state is also written on the track */
.toggle { position: relative; display: flex; align-items: flex-start; gap: 0.875rem; min-height: 48px; padding: 0.125rem 0 0.875rem; cursor: pointer; font-weight: 400; }
/* a toggle, checkbox or radio directly in a .field stays a row (the .field > label block rule is for text labels) */
.field > .toggle, .field > .check, .field > .radio { display: flex; margin: 0; }
.toggle input { position: absolute; left: 0; top: 0.125rem; width: 4rem; height: 2.125rem; margin: 0; opacity: 0; cursor: pointer; }
.toggle-track { position: relative; flex: none; width: 4rem; height: 2.125rem; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--field); }
.toggle-track::before { content: 'Aus'; position: absolute; right: 0.55rem; top: 50%; transform: translateY(-50%); font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.toggle-track::after { content: ''; position: absolute; left: 0.2rem; top: 50%; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--field); transform: translateY(-50%); }
.toggle input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-track::before { content: 'An'; right: auto; left: 0.6rem; color: var(--on-accent); }
html[lang='en'] .toggle-track::before { content: 'Off'; }
html[lang='en'] .toggle input:checked + .toggle-track::before { content: 'On'; }
.toggle input:checked + .toggle-track::after { left: auto; right: 0.2rem; background: var(--paper); }
.toggle input:focus-visible + .toggle-track { outline: 3px solid var(--text); outline-offset: 3px; }
.toggle-text { display: flex; flex-direction: column; gap: 0.15rem; padding-top: 0.3rem; }
.toggle-label { font-weight: 600; }
.toggle-hint { color: var(--muted); font-size: 0.9375rem; }
@media (prefers-reduced-motion: no-preference) {
  .toggle-track::after, .toggle-track { transition: background-color 0.15s ease-out; }
}

/* folded sections (English version, second time range) */
details.more { margin: 0 0 1rem; }
details.more > summary { display: flex; align-items: center; gap: 0.6rem; min-height: 48px; cursor: pointer; font-weight: 600; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: ''; width: 0.5rem; height: 0.5rem; margin-left: auto; border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(45deg); margin-right: 0.35rem; }
details.more[open] > summary::after { transform: rotate(-135deg); }
details.more[open] > summary { margin-bottom: 0.75rem; }
details.lang.panel { padding-top: 0.25rem; padding-bottom: 0.25rem; }
details.lang.panel[open] { padding-bottom: 1rem; }
.panel details.lang { border-top: 1px solid var(--line); margin: 0.25rem -1rem 0; padding: 0.25rem 1rem 0; }

/* allergens: 14 large tick tiles, letter + name */
.allergens { margin: 0.25rem 0 1rem; }
.allergens legend { margin-bottom: 0.25rem; }
.allergen-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; margin-top: 0.5rem; }
.allergen-name { min-width: 0; }
.allergen { display: flex; align-items: center; gap: 0.6rem; min-height: 3.25rem; padding: 0.5rem 0.625rem; border: 1px solid var(--field); border-radius: var(--r-s); background: var(--paper); font-weight: 400; font-size: 0.9375rem; line-height: 1.25; cursor: pointer; }
.allergen input { width: 1.25rem; height: 1.25rem; margin: 0; flex: none; accent-color: var(--accent); }
.allergen-code { flex: none; width: 1.625rem; height: 1.625rem; display: grid; place-items: center; border-radius: 3px; background: var(--bg); font-weight: 600; font-size: 0.875rem; }
.allergen:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); background: var(--accent-tint); }
.allergen:has(input:checked) .allergen-code { background: var(--accent); color: var(--on-accent); }
.allergen:has(input:focus-visible) { outline: 3px solid var(--text); outline-offset: 2px; }

/* photo field */
.photo-field legend { float: left; width: 100%; margin-bottom: 0.75rem; font-size: 1.0625rem; }
.photo-field legend + * { clear: both; }
.photo-current { margin: 0 0 0.5rem; }
.photo-current img { display: block; width: 100%; max-width: 24rem; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-s); background: var(--bg-2); }
.photo-current figcaption { color: var(--muted); font-size: 0.875rem; margin-top: 0.35rem; }
input[type=file] { display: block; width: 100%; padding: 0.5rem; border: 1.5px dashed var(--field); border-radius: var(--r-s); background: var(--bg); font: 400 0.9375rem var(--font); color: var(--muted); min-height: 60px; }
input[type=file]::file-selector-button { min-height: 44px; margin-right: 0.75rem; padding: 0 1rem; border: 2px solid var(--text); border-radius: var(--r-s); background: var(--paper); color: var(--text); font: 600 0.9375rem var(--font); cursor: pointer; }

/* sticky save bar: the one primary action of a form stays in reach */
.savebar { position: sticky; bottom: 0; z-index: 5; margin: 1.5rem calc(-1 * var(--gutter)) 0; padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -8px 16px -12px rgba(27, 26, 23, 0.35); }
.savebar-in { display: flex; gap: 0.75rem; }
.savebar .primary { flex: 1; min-height: 52px; font-size: 1.0625rem; }
.danger-link { margin: 0.5rem 0 0; }
.danger-link a, .danger-link-inline { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; color: var(--danger); font-weight: 600; text-decoration-color: currentColor; }
.danger-link .i, .danger-link-inline .i { width: 1.125rem; height: 1.125rem; }

/* opening hours */
.days { display: grid; gap: 0.75rem; }
.day { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 0.875rem 1rem 0.125rem; }
.day > legend { float: left; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.625rem; }
.day > legend + * { clear: both; }
.day-name { font-size: 1.0625rem; }
.day.has-error { border-color: var(--danger); box-shadow: inset 4px 0 0 var(--danger); }
.day details.more { margin: 0 0 0.25rem; }
.day details.more > summary { font-weight: 500; font-size: 0.9375rem; color: var(--muted); min-height: 44px; }

/* special days */
.row { display: flex; align-items: center; gap: 0.875rem; padding: 0.625rem 0.75rem; min-height: 4.25rem; }
.row form { margin: 0; }
.row-date { flex: none; width: 4.25rem; padding: 0.4rem 0; text-align: center; background: var(--bg); border-radius: var(--r-s); display: flex; flex-direction: column; line-height: 1.15; }
.row-date span { font-size: 0.8125rem; color: var(--muted); }
.row-date strong { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 600; }
.row-meta { color: var(--muted); font-size: 0.9375rem; }

/* empty states */
.empty { display: flex; gap: 0.875rem; align-items: flex-start; padding: 1.125rem 1rem; border: 1.5px dashed var(--field); border-radius: var(--r); background: transparent; margin: 0 0 1rem; }
.empty .i { width: 1.75rem; height: 1.75rem; color: var(--muted); }
.empty p { margin: 0; }

/* photos */
.photos { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.ph > a, .ph > div { display: flex; flex-direction: column; height: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--text); }
.ph > a:hover { border-color: var(--text); }
.ph img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg-2); }
.ph-text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; padding: 0.625rem 0.75rem 0.75rem; }
.ph-title { font-weight: 600; font-size: 0.9375rem; line-height: 1.3; }
.ph .chev { display: none; }
.tasks-single { margin-bottom: 1rem; }
.tab-icon img { width: 40px; height: 40px; flex: none; object-fit: contain; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; }

/* account */
.block { display: flex; gap: 0.875rem; }
.block > .i { width: 2.5rem; height: 2.5rem; padding: 0.55rem; flex: none; background: var(--bg); border-radius: var(--r); }
.block h2 { font-size: 1.125rem; margin: 0.4rem 0 0.35rem; }
.block p { color: var(--text); }
/* web addresses (own domains), read-only */
.block-main { min-width: 0; flex: 1; }
.domains { list-style: none; margin: 0.75rem 0 0.5rem; padding: 0; display: grid; gap: 0.625rem; }
.domain { border: 1px solid var(--line); border-radius: var(--r); padding: 0.625rem 0.75rem 0.25rem; background: var(--paper); }
.domain-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; margin: 0; }
.domain-host { font-weight: 600; overflow-wrap: anywhere; }
.domain > .hint { margin: 0.125rem 0 0.5rem; }
.domain-head .tag { white-space: normal; }
.tag.is-ok .i { color: var(--text); }
.tag.is-wait { background: var(--accent-tint); border-color: var(--accent-hover); }
.dns-more { margin: 0; }
.dns-more > summary { min-height: 44px; font-weight: 500; }
.dns-wrap { overflow-x: auto; margin: 0 0 0.5rem; }
.dns { border-collapse: collapse; font-size: 0.875rem; width: 100%; }
.dns th, .dns td { text-align: left; padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.dns td { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.dns td:first-child { white-space: nowrap; overflow-wrap: normal; }
.dns thead th { background: var(--bg); font-weight: 600; }
.dangerzone { --inset: 1.125rem; margin: 2rem 0 0; padding: var(--inset) 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.dangerzone h2 { color: var(--danger); font-size: 1.125rem; }
.confirm { display: flex; gap: 0.75rem; align-items: flex-start; }
.confirm > .i { width: 1.5rem; height: 1.5rem; margin-top: 0.1rem; }
.confirm p:last-child { margin-bottom: 0; }
.confirm.is-danger > .i { color: var(--danger); }
.confirm.is-ok > .i, .confirm.is-note > .i { color: var(--accent-text); }
/* a coloured edge: a bar inside the box's 1px frame that follows its rounded corners, drawn in front of the lift; the box
   keeps the border, radius and padding of every other box. Danger red for errors and what cannot be undone; the accent
   (inkono's Signal) for a note: a draft text, a site that is switched off or a demo. */
.flash-err, .errors, .dangerzone { box-shadow: inset 4px 0 0 var(--danger); }
.confirm.is-danger { box-shadow: inset 4px 0 0 var(--danger), var(--lift); }
.confirm.is-note { box-shadow: inset 4px 0 0 var(--accent), var(--lift); }
/* forced colours draw no shadows: there the edge is the left border again */
@media (forced-colors: active) {
  .flash-err, .errors, .dangerzone, .confirm.is-danger, .confirm.is-note { border-left-width: 4px; }
}

/* login and public pages */
.auth { max-width: 28rem; margin: 0 auto; padding: 0 0 1rem; }
.auth-intro { margin: 0 0 1.5rem; }
.auth-intro h1 { font-size: 2.125rem; }
.auth-intro .lead { color: var(--muted); margin: 0.6rem 0 0; font-size: 1.125rem; }
.auth-card h2 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.125rem; margin: 0 0 1rem; }
.auth-card h2 .i { color: var(--muted); }
.auth-card .wide { min-height: 52px; font-size: 1.0625rem; }
.auth-card.is-alt { background: transparent; border-style: dashed; border-color: var(--field); }
.auth-mark, .auth-note { display: none; }
.auth-key { width: 2.5rem; height: 2.5rem; color: var(--accent-text); margin: 0 0 1rem; }
.auth-card > .hint { margin: 0.75rem 0 0; }
.auth-forgot { margin: 0.9rem 0 0; text-align: center; font-size: 0.9375rem; }
.card-public { max-width: 32rem; margin: 0 auto; }
.card-public .pagehead .lead { color: var(--text); }

/* footer band (phone): logout and the maker's mark */
.appfoot { background: var(--chrome); color: var(--on-chrome-muted); padding: 0.75rem var(--gutter) calc(1rem + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; }
.appfoot p { margin: 0; font-size: 0.9375rem; }
.appfoot button.quiet { color: var(--on-chrome); min-height: 44px; }
.appfoot button.quiet .i { width: 1.125rem; height: 1.125rem; }
.appfoot { flex-wrap: wrap; row-gap: 0.25rem; }

/* legal links (Impressum, Datenschutz, AGB, editor terms): app footer band and public pages */
.legal { flex-basis: 100%; }
.legal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.125rem; }
.legal a { display: inline-flex; align-items: center; min-height: 2.25rem; font-size: 0.875rem; color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.legal a:hover { text-decoration-thickness: 2px; }
.appfoot .legal { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 0.25rem; }
.appfoot .legal a { color: var(--on-chrome-muted); }
.appfoot .legal a:hover { color: var(--on-chrome); }
.pubfoot { max-width: 32rem; width: 100%; margin: auto auto 0; padding: 2.5rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom)); color: var(--muted); }
.pubfoot .legal ul { justify-content: center; }

/* ---------------------------------------------------------------- wider phones and tablets */
@media (min-width: 600px) {
  :root { --gutter: 1.5rem; --box-y: 1.375rem; --box-x: 1.5rem; }
  .allergen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photos { grid-template-columns: repeat(3, 1fr); }
  .panel details.lang { margin-left: -1.5rem; margin-right: -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; }
  .today { padding: 1.5rem 1.5rem 0.25rem; }
  .today-list, .today-foot { margin-left: -1.5rem; margin-right: -1.5rem; }
  .today-list a, .today-foot { padding-left: 1.5rem; padding-right: 1.5rem; }
  .savebar .primary { flex: 0 1 auto; min-width: 16rem; }
}

/* ---------------------------------------------------------------- desktop: side navigation + content column */
@media (min-width: 960px) {
  .topbar-in { padding: 0.5rem 2rem; min-height: 4rem; }
  .shell { display: grid; grid-template-columns: 15.5rem minmax(0, 46rem); gap: 3.5rem; padding: var(--page-top) 2rem 4rem; }
  main { padding: var(--page-top) 0 0; }
  .shell > main { padding-top: 0; }
  .back { display: none; }
  h1 { font-size: 2.25rem; }
  .today h1 { font-size: 2.125rem; }
  .sidenav { display: flex; flex-direction: column; position: sticky; top: 1.5rem; align-self: start; }
  .sidenav-name { font-weight: 600; font-size: 1.0625rem; margin: 0 0 0.75rem; padding: 0 0.75rem; }
  .sidenav ul { list-style: none; margin: 0; padding: 0; }
  .sidenav a { display: flex; align-items: center; gap: 0.75rem; min-height: 44px; padding: 0.375rem 0.75rem; border-radius: var(--r-s); color: var(--text); text-decoration: none; font-weight: 500; }
  .sidenav a .i { width: 1.25rem; height: 1.25rem; color: var(--muted); }
  .sidenav a:hover { background: var(--bg-2); }
  .sidenav a[aria-current=page] { background: var(--paper); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent), 0 0 0 1px var(--line); }
  .sidenav a[aria-current=page] .i { color: var(--text); }
  .sidenav a.later { color: var(--muted); }
  .sidenav-account { margin-top: 1.25rem !important; padding-top: 1.25rem !important; border-top: 1px solid var(--line); }
  .sidenav-logout { margin-top: 0.5rem; }
  .sidenav-logout button { width: 100%; justify-content: flex-start; padding: 0 0.75rem; gap: 0.75rem; color: var(--muted); }
  .sidenav-logout .i { width: 1.25rem; height: 1.25rem; }
  .appfoot-logout { display: none; }
  .appfoot { justify-content: center; }
  .appfoot .legal ul { justify-content: center; }
  .savebar { margin: 2rem 0 0; padding: 1rem 0; background: var(--bg); box-shadow: none; }
  .tasks { display: grid; grid-template-columns: 1fr 1fr; }
  .tasks > li { border-top: 1px solid var(--line); }
  .tasks > li:nth-child(-n+2) { border-top: 0; }
  .tasks > li:nth-child(odd) { border-right: 1px solid var(--line); }
  .tasks > li + li { border-top: 1px solid var(--line); }
  .tasks > li:nth-child(2) { border-top: 0; }
  .tasks > li:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
  .toolbar .primary { flex: 0 1 auto; }
  .days { grid-template-columns: 1fr 1fr; }
  .allergen-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .photos { grid-template-columns: repeat(3, 1fr); }
  .auth { max-width: 64rem; display: grid; grid-template-columns: 1fr 26rem; column-gap: 5rem; align-items: start; }
  .auth-intro { grid-row: span 4; margin: 0; align-self: stretch; min-height: 30rem; display: flex; flex-direction: column; background: var(--chrome); color: var(--on-chrome); border-radius: var(--r); padding: 3rem 3rem 2.5rem; }
  .auth-intro h1 { font-size: 3.25rem; line-height: 1.05; }
  .auth-intro .lead { font-size: 1.25rem; max-width: 24rem; color: var(--on-chrome-muted); }
  .auth-mark { display: block; width: 7rem; height: auto; margin-top: auto; margin-bottom: 1.5rem; }
  .auth-note { display: block; margin: 0 0 1.5rem; color: var(--on-chrome); font-weight: 500; }
  .auth { grid-template-columns: 1fr 26rem; column-gap: 3rem; }
  .auth > .flash, .auth > .panel { grid-column: 2; }
}

.auth-lang { margin: 0.25rem 0 0; text-align: center; font-size: 0.9375rem; }
.auth-lang a { color: var(--muted); }

/* ---------------------------------------------------------------- bookings (staff) */
.bk-tabs { margin: 0 0 1.25rem; }
.bk-tabs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.bk-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem; border: 1px solid var(--field); border-radius: var(--r-s); background: var(--paper); color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.bk-tabs a:hover { background: var(--bg-2); }
.bk-tabs a[aria-current=page] { background: var(--text); border-color: var(--text); color: var(--paper); font-weight: 600; }
.bk-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 0.75rem; margin: 0 0 1rem; }
.bk-bar .field { margin: 0; }
.bk-bar form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.bk-bar input[type=date] { min-width: 10.5rem; }
.bk-days { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.bk-days .button { min-height: 44px; padding: 0 0.875rem; font-size: 0.9375rem; }
.bk-pills { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.bk-pills a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.875rem; border: 1px solid var(--field); border-radius: 999px; background: var(--paper); color: var(--text); text-decoration: none; font-size: 0.9375rem; }
.bk-pills a[aria-current=page] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.bk-table-wrap { margin: 0 0 1.25rem; }
.bk-table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); table-layout: fixed; }
.bk-table caption { text-align: left; font-weight: 600; padding: 0 0 0.5rem; }
.bk-table th, .bk-table td { border: 1px solid var(--line); padding: 0.25rem 0.375rem; vertical-align: top; text-align: left; font-size: 0.875rem; line-height: 1.35; overflow-wrap: break-word; hyphens: auto; }
.bk-table thead th { background: var(--bg-2); font-weight: 600; }
.bk-table tbody th { width: 3.25rem; background: var(--bg); font-weight: 600; font-variant-numeric: tabular-nums; }
.bk-table td { height: 3rem; }
.bk-table .bk-name { display: block; font-weight: 600; }
.bk-table .bk-meta { display: block; color: var(--muted); }
.bk-table td.is-free a { display: flex; align-items: center; min-height: 44px; color: var(--muted); font-weight: 500; }
.bk-table td.is-busy { background: var(--accent-tint); }
.bk-table td.is-block { background: var(--bg-2); }
.bk-table td.is-open .bk-meta strong { color: var(--danger); }
.bk-list { list-style: none; margin: 0 0 1rem; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.bk-list > li { padding: 0.75rem 1rem; }
.bk-list > li + li { border-top: 1px solid var(--line); }
.bk-list a { font-weight: 600; }
.bk-facts { margin: 0 0 0.75rem; }
.bk-fact { display: grid; grid-template-columns: minmax(7rem, 9rem) minmax(0, 1fr); gap: 0.5rem; padding: 0.4rem 0; border-top: 1px solid var(--line); }
.bk-fact:first-child { border-top: 0; }
.bk-fact dt { color: var(--muted); font-weight: 500; }
.bk-fact dd { margin: 0; overflow-wrap: break-word; hyphens: auto; }
/* Stripe ids (acct_..., pi_...) are long single words: let them wrap on a phone */
.bk-fact dd code { overflow-wrap: anywhere; }
.bk-inline { display: inline; margin-left: 0.75rem; }
.bk-inline button { min-height: 44px; }
ol.bk-list { list-style: none; }
.pair > * { min-width: 0; }
input[type=date], input[type=time] { min-width: 0; max-width: 100%; }
.savebar-in { flex-wrap: wrap; }
@media (max-width: 420px) { .pair:has(input[type=date]) { grid-template-columns: minmax(0, 1fr); } }
.pagehead h1 { overflow-wrap: break-word; hyphens: auto; }

/* self-service billing (src/billing/): sign-up honeypot, steps to go-live, legal texts */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.panel-h { font-size: 1.125rem; font-weight: 600; margin: 0 0 0.75rem; padding: 0; }
fieldset.panel { min-width: 0; }
.radio > span { min-width: 0; }
.steps { list-style: none; margin: 0 0 0.75rem; padding: 0; display: grid; gap: 0.875rem; }
.step { display: flex; flex-wrap: wrap; gap: 0.5rem 0.875rem; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 0.875rem; }
.step:first-child { border-top: 0; padding-top: 0; }
.step > .tag { flex: none; }
.step-main { flex: 1; min-width: 12rem; }
.step-main h3 { font-size: 1.0625rem; margin: 0 0 0.25rem; }
.step-main p { margin: 0 0 0.5rem; }
.legal-page .panel + .panel { margin-top: 1rem; }
.legal-toc { list-style: none; margin: 0; padding: 0 0 0.5rem; columns: 2 16rem; }
.legal-toc a { display: inline-flex; min-height: 2.25rem; align-items: center; }
.legal-toc-h { font-size: 1.0625rem; margin: 0 0 0.5rem; }
.legal-doc h2.legal-part { font-size: 1.25rem; margin: 1.5rem 0 0.5rem; }
.legal-doc h3 { font-size: 1.0625rem; margin: 1.25rem 0 0.5rem; }
.legal-doc .legal-ol { padding-left: 1.5rem; }
.legal-doc .legal-table { overflow-x: auto; margin: 0 0 1rem; }
.legal-doc table { border-collapse: collapse; font-size: 0.9375rem; }
.legal-doc th, .legal-doc td { text-align: left; padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-ph { background: var(--accent-tint); color: var(--text); padding: 0 0.15rem; }
.legal-note { color: var(--muted); }
/* Team: a member's role form and remove link */
.member-role { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 0.75rem; margin: 0.25rem 0 0.5rem; }
.member-role .field { margin: 0; flex: 1 1 12rem; }
.member-remove { margin: 0 0 0.5rem; }

/* ---------------------------------------------------------------- the inner space of a box, last so it wins ties
   A box's padding (--inset) alone sets it, the same at the bottom as at the top: the bottom margin of the last element, also
   of the last one in a form, fieldset or column inside the box, adds nothing. A switch, tick box, choice or danger link is a
   row of at least 44px for the thumb; as the last row it takes the bottom padding into its own tap area, so its text, not
   its spare height, sits the inset above the frame. A fieldset's legend sits inside the box, not on its frame. */
/* the bottom edge of the content: a last child whose ancestors inside the box are all last children too (a nested
   .domain card keeps its own spacing) */
:is(.panel, .dangerzone) :last-child:not(:is(.panel, .dangerzone) :is(:not(:last-child), .domain) *) { margin-bottom: 0; }
:is(.panel, .dangerzone) :is(.toggle, .check, .radio, .danger-link-inline):last-child:not(:is(.panel, .dangerzone) :is(:not(:last-child), .domain) *) {
  padding-bottom: var(--inset); margin-bottom: calc(-1 * var(--inset)); vertical-align: bottom;
}
fieldset.panel > legend { float: left; width: 100%; }
fieldset.panel > legend + * { clear: both; }
/* the English fold: its title keeps the same space above and below, also when it wraps on a phone or closes a box */
details.lang > summary { padding-block: 0.6875rem; }
.panel > details.lang:last-child:not([open]) { margin-bottom: calc(0.25rem - var(--inset)); }
