/* Pocket Ops theme "midnight": charcoal panels, a soft blue accent, Inter; always dark.
 * Palette from the catalogue theme dark (layouts/default), mapped to the pocket-ops short names.
 * Every colour, font and size comes from theme.json (the --theme-* custom
 * properties lazysite writes), through the short names below. Pages and app
 * sheets use the short names too, so they follow a theme change without edits.
 * Light and dark: follows the device; <html data-theme="light|dark"> forces one
 * (pocket-ops.js sets it from the person's choice).
 * Fonts come from fonts.css (generated at packaging from this theme's fonts.list). */

/* ---- short names: light (the default) ------------------------------------ */
:root {
  --canvas: var(--theme-colours-canvas);
  --surface: var(--theme-colours-surface);
  --sunken: var(--theme-colours-sunken);
  --ink: var(--theme-colours-ink);
  --muted: var(--theme-colours-muted);
  --line: var(--theme-colours-line);
  --line-strong: var(--theme-colours-line-strong);
  --accent: var(--theme-colours-accent);
  --accent-hover: var(--theme-colours-accent-hover);
  --accent-ink: var(--theme-colours-accent-ink);
  --accent-soft: var(--theme-colours-accent-soft);
  --accent-strong: var(--theme-colours-accent-strong);
  --focus-ring: var(--theme-colours-focus-ring);
  --ok: var(--theme-colours-ok);
  --ok-soft: var(--theme-colours-ok-soft);
  --warn: var(--theme-colours-warn);
  --warn-soft: var(--theme-colours-warn-soft);
  --bad: var(--theme-colours-bad);
  --bad-soft: var(--theme-colours-bad-soft);
  --bad-ink: var(--theme-colours-bad-ink);
  --info: var(--theme-colours-info);
  --info-soft: var(--theme-colours-info-soft);
  --star: var(--theme-colours-star);
  --scrim: var(--theme-colours-scrim);
  --data-1: var(--theme-colours-data-1);
  --data-2: var(--theme-colours-data-2);
  --data-3: var(--theme-colours-data-3);
  --data-4: var(--theme-colours-data-4);
  --shadow: var(--theme-colours-shadow);
  --shadow-raised: var(--theme-colours-shadow-raised);

  --font: var(--theme-fonts-body);
  --mono: var(--theme-fonts-mono);
  --radius-sm: var(--theme-shape-radius-sm);
  --radius: var(--theme-shape-radius);
  --radius-lg: var(--theme-shape-radius-lg);
  --control: var(--theme-shape-control-height);
  --touch: var(--theme-shape-touch-height);
  --scan: var(--theme-shape-scan-height);
  --header: var(--theme-shape-header-height);
  --page: var(--theme-shape-page-width);

  /* the type scale: steps, not ad-hoc sizes (Pocket Ops caption, body-sm, body, title, title-md, title-lg, title-xl) */
  --t-xs: .75rem; --t-sm: .875rem; --t-md: 1rem; --t-lg: 1.125rem;
  --t-xl: 1.25rem; --t-2xl: 1.5rem; --t-3xl: 1.75rem;
  /* the spacing scale */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem;
  /* kept for app sheets that draw focus as a shadow; the theme itself uses an outline */
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus-ring);
  /* shape and case the app sheets take from the theme (control squares and capitalises them) */
  --radius-pill: 999px; --dot-radius: 50%; --avatar-radius: 50%;
  --label-case: none; --label-track: 0; --button-case: none; --button-track: 0;
  --figure-font: var(--font); --signal: var(--accent);
  /* --panel-rule is left undefined: a panel then keeps its own 1px top edge */
  color-scheme: dark;
}

/* ---- short names: dark, when the device asks and nobody chose light, or when chosen */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: var(--theme-dark-canvas); --surface: var(--theme-dark-surface); --sunken: var(--theme-dark-sunken);
    --ink: var(--theme-dark-ink); --muted: var(--theme-dark-muted);
    --line: var(--theme-dark-line); --line-strong: var(--theme-dark-line-strong);
    --accent: var(--theme-dark-accent); --accent-hover: var(--theme-dark-accent-hover);
    --accent-ink: var(--theme-dark-accent-ink); --accent-soft: var(--theme-dark-accent-soft);
    --accent-strong: var(--theme-dark-accent-strong); --focus-ring: var(--theme-dark-focus-ring);
    --ok: var(--theme-dark-ok); --ok-soft: var(--theme-dark-ok-soft);
    --warn: var(--theme-dark-warn); --warn-soft: var(--theme-dark-warn-soft);
    --bad: var(--theme-dark-bad); --bad-soft: var(--theme-dark-bad-soft); --bad-ink: var(--theme-dark-bad-ink);
    --info: var(--theme-dark-info); --info-soft: var(--theme-dark-info-soft);
    --star: var(--theme-dark-star); --scrim: var(--theme-dark-scrim);
    --data-1: var(--theme-dark-data-1); --data-2: var(--theme-dark-data-2);
    --data-3: var(--theme-dark-data-3); --data-4: var(--theme-dark-data-4);
    --shadow: var(--theme-dark-shadow); --shadow-raised: var(--theme-dark-shadow-raised);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: var(--theme-dark-canvas); --surface: var(--theme-dark-surface); --sunken: var(--theme-dark-sunken);
  --ink: var(--theme-dark-ink); --muted: var(--theme-dark-muted);
  --line: var(--theme-dark-line); --line-strong: var(--theme-dark-line-strong);
  --accent: var(--theme-dark-accent); --accent-hover: var(--theme-dark-accent-hover);
  --accent-ink: var(--theme-dark-accent-ink); --accent-soft: var(--theme-dark-accent-soft);
  --accent-strong: var(--theme-dark-accent-strong); --focus-ring: var(--theme-dark-focus-ring);
  --ok: var(--theme-dark-ok); --ok-soft: var(--theme-dark-ok-soft);
  --warn: var(--theme-dark-warn); --warn-soft: var(--theme-dark-warn-soft);
  --bad: var(--theme-dark-bad); --bad-soft: var(--theme-dark-bad-soft); --bad-ink: var(--theme-dark-bad-ink);
  --info: var(--theme-dark-info); --info-soft: var(--theme-dark-info-soft);
  --star: var(--theme-dark-star); --scrim: var(--theme-dark-scrim);
  --data-1: var(--theme-dark-data-1); --data-2: var(--theme-dark-data-2);
  --data-3: var(--theme-dark-data-3); --data-4: var(--theme-dark-data-4);
  --shadow: var(--theme-dark-shadow); --shadow-raised: var(--theme-dark-shadow-raised);
  color-scheme: dark;
}

/* ---- base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: var(--t-md);
  line-height: 1.5; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--s-3); text-wrap: balance; letter-spacing: -.01em; font-weight: 600; }
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); margin-top: var(--s-6); }
h3 { font-size: var(--t-xl); margin-top: var(--s-5); }
h4 { font-size: var(--t-lg); }
p, ul, ol, dl, table { margin: 0 0 var(--s-4); }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
code, kbd, samp { font-family: var(--mono); font-size: .875em; }
code { background: var(--sunken); padding: .15em .4em; border-radius: var(--radius-sm); overflow-wrap: anywhere; }
kbd { border: 1px solid var(--line-strong); border-bottom-width: 2px; padding: .1em .4em; border-radius: var(--radius-sm); background: var(--surface); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }
small { font-size: var(--t-sm); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
[hidden] { display: none !important; }
button, a, input, select, textarea, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- the frame: header, nav, page head, footer -------------------------- */
.po-skip { position: absolute; left: -999px; top: var(--s-2); background: var(--surface); padding: var(--s-2) var(--s-3); z-index: 30; }
.po-skip:focus { left: var(--s-2); }
.po-top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px); }
.po-top-row, .po-subnav, .po-main, .po-foot { max-width: var(--page); margin: 0 auto;
  padding-left: calc(var(--s-4) + env(safe-area-inset-left, 0px)); padding-right: calc(var(--s-4) + env(safe-area-inset-right, 0px)); }
.po-top-row { display: flex; align-items: center; gap: 0 var(--s-5); min-height: var(--header); flex-wrap: wrap; }
.po-brand { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--control); font-weight: 600; font-size: var(--t-lg);
  color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.po-brand:hover { color: var(--ink); }
.po-brand-mark { width: 1.25rem; height: 1.25rem; border-radius: var(--radius-sm); background: var(--accent); }
.po-nav { display: flex; gap: var(--s-1); flex: 1; flex-wrap: wrap; }
.po-nav a, .po-subnav a { display: inline-flex; align-items: center; min-height: var(--control); color: var(--muted); text-decoration: none;
  font-weight: 500; font-size: var(--t-sm); padding: 0 var(--s-3); border-radius: var(--radius); white-space: nowrap; }
.po-nav a:hover, .po-subnav a:hover { color: var(--ink); background: var(--sunken); }
.po-nav a[aria-current] { color: var(--accent-strong); background: var(--accent-soft); }
.po-nav a:focus-visible, .po-subnav a:focus-visible { outline-offset: -2px; }
.po-subnav { display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; }
.po-subnav::-webkit-scrollbar { display: none; }
.po-subnav a { border-radius: 0; }
.po-subnav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.po-who { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.po-who-name { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--control); color: var(--ink); text-decoration: none;
  font-weight: 500; font-size: var(--t-sm); }
.po-avatar { width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent-soft);
  display: inline-grid; place-items: center; font-size: var(--t-sm); font-weight: 600; color: var(--accent-strong); }
.po-avatar::after { content: attr(data-initial); }
.po-main { padding-top: var(--s-6); padding-bottom: var(--s-7); }
.po-page-head { margin-bottom: var(--s-5); }
.po-page-head h1 { margin-bottom: var(--s-2); }
.po-lede { color: var(--muted); font-size: var(--t-lg); line-height: 1.55; max-width: 60ch; margin: 0; }
.po-foot { padding-bottom: calc(var(--s-6) + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: var(--t-sm); }
.po-foot::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: var(--s-4); }
.po-foot-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }
.po-foot-links span { margin-left: auto; }
.po-foot a { color: var(--muted); }
.po-timing { font-size: var(--t-xs); line-height: 1.35; font-family: var(--mono); color: var(--muted); min-height: 1.35em; }

/* the light/dark switch in the header (pocket-ops.js: [data-po-theme]) */
.po-theme { min-width: var(--control); padding: 0 var(--s-3); }
.po-theme::before { content: ""; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%); flex: none; }

@media (max-width: 44rem) {
  .po-nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none;
    margin: 0 calc(var(--s-4) * -1); padding: 0 var(--s-3) var(--s-1); }
  .po-nav::-webkit-scrollbar { display: none; }
  h1 { font-size: var(--t-2xl); }
  .po-main { padding-top: var(--s-5); }
  .po-foot-links span { margin-left: 0; }
}

/* ---- signed in or not: pocket-ops.js sets data-po-signed-in on <html> -------- */
html:not([data-po-signed-in="1"]) [data-po-show-in], html:not([data-po-signed-in="1"]) [data-ls-app-show-in],
html:not([data-po-signed-in="0"]) [data-po-show-out], html:not([data-po-signed-in="0"]) [data-ls-app-show-out] { display: none !important; }
.po-signed-out { display: none; }
html[data-po-signed-in="0"] .po-main:has(.po-app:not([data-po-public])) .po-signed-out { display: block; }
html[data-po-signed-in="0"] .po-app:not([data-po-public]) { display: none; }

/* ---- controls ----------------------------------------------------------- */
button, .po-button { font: inherit; font-size: var(--t-sm); font-weight: 500; line-height: 1.4; min-height: var(--control); padding: 0 var(--s-4);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; transition: background-color .12s, border-color .12s; }
button:hover, .po-button:hover { background: var(--sunken); color: var(--ink); }
button[type="submit"], button.po-primary, .po-button.po-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button[type="submit"]:hover, button.po-primary:hover, .po-button.po-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
button.po-quiet, .po-button.po-quiet { background: transparent; border-color: transparent; color: var(--accent); }
button.po-quiet:hover, .po-button.po-quiet:hover { background: var(--accent-soft); color: var(--accent-strong); }
button.po-danger, .po-button.po-danger { background: var(--bad); border-color: var(--bad); color: var(--bad-ink); }
button.po-danger:hover, .po-button.po-danger:hover { background: var(--bad); color: var(--bad-ink); filter: brightness(.92); }
button:disabled, button:disabled:hover, button[aria-disabled="true"], button[aria-disabled="true"]:hover { background: var(--sunken); border-color: var(--line); color: var(--muted); cursor: not-allowed; filter: none; }
button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
button[aria-pressed="true"]::before { content: "\2713"; }
button[aria-pressed] b { font-weight: 500; color: var(--muted); }
button[aria-pressed="true"] b { color: inherit; }
@media (pointer: coarse) { button, .po-button, input, select { min-height: var(--touch); } }

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), select, textarea {
  font: inherit; font-size: var(--t-md); font-weight: 400; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); min-height: var(--control); padding: var(--s-2) var(--s-3); max-width: 100%; }
textarea { min-height: 6rem; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border: 2px solid var(--bad); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:disabled, select:disabled, textarea:disabled { background: var(--sunken); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 1.25rem; height: 1.25rem; margin: 0; flex: none; }
input[type="file"] { font: inherit; font-size: var(--t-md); max-width: 100%; padding: var(--s-1); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--surface); }
input[type="file"]::file-selector-button { font: inherit; font-size: var(--t-sm); font-weight: 500; border: 0; border-radius: var(--radius-sm);
  background: var(--sunken); color: var(--ink); min-height: calc(var(--control) - 10px); padding: 0 var(--s-3); margin-right: var(--s-3); cursor: pointer; }
label { font-size: var(--t-sm); font-weight: 500; }
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { font-size: var(--t-md); font-weight: 400; display: inline-flex;
  gap: var(--s-3); align-items: center; min-height: var(--control); cursor: pointer; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-2) var(--s-4) var(--s-3); margin: 0; }
legend { font-size: var(--t-sm); font-weight: 500; padding: 0 var(--s-2); }
progress { accent-color: var(--accent); height: .5rem; border: 0; border-radius: 999px; background: var(--sunken); overflow: hidden;
  -webkit-appearance: none; appearance: none; vertical-align: middle; }
progress::-webkit-progress-bar { background: var(--sunken); }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

/* ---- tables and lists ---------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
th { text-align: left; font-size: var(--t-sm); font-weight: 500; color: var(--muted); background: var(--sunken); }
th, td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover td { background: var(--sunken); }
td a { font-weight: 500; text-decoration: none; }
td a:hover { text-decoration: underline; }
th.num, td.num { text-align: right; }

/* ---- the app surfaces -------------------------------------------------- */
.po-app { display: block; }
.po-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-4) var(--s-5); box-shadow: var(--shadow); }
.po-note { border-radius: var(--radius); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.po-note.ok { background: var(--ok-soft); border-color: transparent; }
.po-note.warn { background: var(--warn-soft); border-color: transparent; }
.po-note.bad { background: var(--bad-soft); border-color: transparent; }
.po-note.info { background: var(--info-soft); border-color: transparent; }
.po-signed-out { background: var(--accent-soft); color: var(--accent-strong); border-radius: var(--radius-lg); padding: var(--s-4) var(--s-5); max-width: 44rem; }
.po-signed-out p { margin: 0; }
.po-badge { display: inline-flex; align-items: center; font-size: var(--t-xs); font-weight: 500; letter-spacing: .02em; padding: .125rem .5rem;
  border-radius: 999px; background: var(--sunken); color: var(--ink); white-space: nowrap; line-height: 1.35; }
.muted { color: var(--muted); }

/* ---- the Odoo sign-in dialog (lazysite-odoo.js's markup) -------------------- */
[data-ls-odoo-prompt] { position: fixed; inset: 0; z-index: 50; display: grid; place-items: end center; padding: 0;
  background: var(--scrim); }
[data-ls-odoo-prompt] form { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-raised);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; width: min(30rem, 100%); display: grid; gap: var(--s-3);
  padding: var(--s-5) calc(var(--s-5) + env(safe-area-inset-right, 0px)) calc(var(--s-5) + env(safe-area-inset-bottom, 0px)) calc(var(--s-5) + env(safe-area-inset-left, 0px)); }
[data-ls-odoo-prompt] form::before { content: "Sign in with Odoo"; font-size: var(--t-lg); font-weight: 600; }
[data-ls-odoo-prompt] p { margin: 0; color: var(--muted); font-size: var(--t-sm); }
[data-ls-odoo-prompt] input:not([type="checkbox"]) { width: 100%; }
[data-ls-odoo-prompt] button { width: 100%; }
[data-ls-odoo-prompt] button[type="button"] { background: transparent; border-color: transparent; color: var(--accent); }
@media (min-width: 40rem) {
  [data-ls-odoo-prompt] { place-items: center; padding: var(--s-4); }
  [data-ls-odoo-prompt] form { border-radius: var(--radius-lg); width: min(24rem, 100%); padding: var(--s-5); }
}

/* ---- lazysite's own forms (::: form blocks) -------------------------------- */
.lazysite-form { display: grid; gap: var(--s-4); max-width: 36rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--s-5); box-shadow: var(--shadow); }
.lazysite-form .form-field { display: grid; gap: var(--s-1); }
.lazysite-form .form-field input, .lazysite-form .form-field textarea, .lazysite-form .form-field select { width: 100%; }
.lazysite-form .required { color: var(--bad); }
.lazysite-form .form-submit { margin-top: var(--s-2); }

/* ---- the header on a phone: brand and the person on one row, the apps below */
@media (max-width: 30rem) {
  .po-who-name [data-po-who] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .po-top-row { gap: 0 var(--s-3); }
  .po-theme { padding: 0; }
}

/* ---- touch screens: no hover colours left behind after a tap ------------- */
@media (hover: none) {
  button:hover, .po-button:hover { background: var(--surface); }
  button[type="submit"]:hover, button.po-primary:hover, .po-button.po-primary:hover { background: var(--accent); }
  button.po-quiet:hover, .po-button.po-quiet:hover { background: transparent; color: var(--accent); }
  button[aria-pressed="true"]:hover { background: var(--accent-soft); }
  button.po-danger:hover { filter: none; }
  tbody tr:hover td { background: transparent; }
  .po-nav a:hover, .po-subnav a:hover { background: transparent; color: var(--muted); }
  .po-nav a[aria-current]:hover { background: var(--accent-soft); color: var(--accent-strong); }
}

/* States a still page cannot show */
/* a link in the page's own content that has been visited (the frame's links are classed and keep their colours) */
.po-main a:not([class]):visited { color: var(--accent-strong); }
/* lazysite's form messages: the server's answer under a ::: form block */
.lazysite-form .form-status { margin: var(--s-2) 0 0; font-size: var(--t-sm); font-weight: 500; color: var(--muted); }
.lazysite-form .form-status-ok, .lazysite-form .form-success { color: var(--ok); }
.lazysite-form .form-status-error { color: var(--bad); }
.form-status-ok, .form-success { color: var(--ok); }
.form-status-error { color: var(--bad); }
/* a stepped form: progress, one fieldset to a step, Back and Next */
.lsf-progress { font-size: var(--t-sm); font-weight: 500; color: var(--muted); }
.lsf-step { display: grid; gap: var(--s-3); }
.lsf-nav { display: flex; gap: var(--s-3); justify-content: space-between; }
/* a disclosure in the page's content */
.po-main details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 var(--s-4); margin: 0 0 var(--s-3); }
.po-main details > summary { cursor: pointer; min-height: var(--control); display: flex; align-items: center; font-weight: 500; }
.po-main details[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: var(--s-3); }
.po-main details > summary:hover { color: var(--accent-strong); }

/* ---- the three app slots, by the engine's generic names -------------------------
   An extension (the engine's app-offline) fills them; the layout also carries the
   data-po-* names, so these rules cover both. Words carry every state, colour
   only adds to it. */
[data-ls-app-banner] { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-2) var(--s-4); margin: 0 0 var(--s-4); border-radius: var(--radius);
  background: var(--info-soft); color: var(--info); font-size: var(--t-sm); font-weight: 500; }
[data-ls-app-banner][role="alert"] { background: var(--bad-soft); color: var(--bad); }
[data-ls-app-banner] a, [data-ls-app-banner] button { color: inherit; }
[data-ls-app-show-out] { background: var(--accent-soft); color: var(--accent-strong); }
[data-ls-app-show-out] a { color: inherit; }
[data-ls-app-status] { position: relative; color: var(--muted); font-size: var(--t-sm); }
[data-ls-app-status] summary { cursor: pointer; }
[data-ls-app-status] summary:hover { color: var(--ink); }
[data-ls-app-status] summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* An always-dark theme: there is no light scheme to switch to, so the switch is not drawn. */
.po-theme { display: none; }

/* long words and addresses wrap inside the column, never widen the page */
.po-main, .po-foot { overflow-wrap: anywhere; }
.po-main :is(p, li, dd, dt, td, th, a, h1, h2, h3, h4, figcaption, blockquote) { overflow-wrap: anywhere; }
/* code blocks, plain tables and media scroll or shrink inside their own box */
pre { max-width: 100%; overflow-x: auto; background: var(--sunken); padding: var(--s-3) var(--s-4); border-radius: var(--radius); }
pre code { background: none; padding: 0; overflow-wrap: normal; }
img, video, svg, iframe { max-width: 100%; height: auto; }
.po-main table:not(.po-table) { display: block; max-width: 100%; overflow-x: auto; }
/* the quantity box beside a checklist option keeps its own small width */
.lazysite-form .form-field input.form-option-qty { width: 5rem; flex: none; }
.lazysite-form .form-option { flex-wrap: wrap; }
