/* brand.css: one look for every page of osemvault.com (12 Nov 2026), from the brand book (docs/brand-book.html; the PDF is
   "OsemVault Brand Book", version 1, November 2026). Loaded last in each page's <head>, after the page's own styles and flat.css.
   It only repeats selectors the pages already use, at the same weight, so a page's special controls (calendar cells, round
   icon buttons, picture tiles) keep their own shape.

   What it sets, and why:
   - Type. Xiang, 12 Nov 2026: "poppins is for the vending app, we stick with Apple's font for now ... use Poppins for big
     words, like the titles". So text is the system face (Inter where there is no Apple font) and h1, h2 and the pages' display
     words are Poppins.
   - Cream. The brand book's cream is #FFF8E7; the pages' own paper colours were changed to it in the pages themselves.
   - Buttons. One set everywhere: a 10 px rounded rectangle, no outline, no gradient, sentence case. Main is the page's accent
     (red, or yellow in the dark). Quiet is a plain ground. Danger is dark red with white. No pills: the brand book's capital
     pills are labels for promotion pieces, not buttons.
   - No navy: the Customers page's chart blues became the brand's reds (in that page).
   - Readability (Impeccable audit, 23 Nov 2026; Xiang said yes to all five):
     1. No text under 11 px, on any page.
     2. A link inside a sentence wears the sentence's own colour, underlined. No blue.
     3. In the dark, red words turn yellow: red on the dark ground is 3:1, too faint; the yellow is 11.8:1.
     4. Notes and help text stop at about 70 characters a line (max-width: 70ch).
     5. One yellow, the book's #FFCB05, in light and dark, for fills and for words (the dashboard's lighter #FFD750 is gone). */
:root {
  --osv-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --osv-title: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --osv-main: #C41420; --osv-on-main: #FFFFFF;
  --osv-danger: #6E0810; --osv-on-danger: #FFFFFF;
  --osv-pick: #FFCB05; --osv-on-pick: #181012;
  --osv-quiet: #F4E7D0; --osv-on-quiet: #181012;
  --osv-r: 10px;
  --osv-mast: #C41420;
  --osv-field: #F7EEDD; --osv-on-field: #181012; --osv-field-hint: #6B5B5D;
  /* spacing (docs/map/style/spacing.md, 29 Nov 2026). The steps are 4, 6, 8, 10, 12, 14, 16, 24 and 28 px, nothing odd; these
     name the ones every page repeats, so a page says the name instead of carrying its own copy of the number. */
  --osv-gutter: 16px;                       /* the page's sides, phone and desktop: max(var(--osv-gutter), env(safe-area-inset-left)) */
  --osv-pad: 16px;                          /* inside a panel */
  --osv-gap: 12px;                          /* between cards, and inside a dense card */
  --osv-above: 28px; --osv-below: 10px;     /* above and below a section heading */
  --osv-r-card: 12px; --osv-r-panel: 14px; --osv-r-big: 16px;   /* corners (--osv-r, 10 px, is buttons and fields) */
  /* the keyboard focus ring (docs/map/style/access.md): the page's main colour, so red, and yellow in the dark */
  --osv-ring: var(--osv-main);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --osv-mast: #6E0810; --osv-main: #FFCB05; --osv-on-main: #181012; --osv-danger: #B3261E; --osv-quiet: #2E2023; --osv-on-quiet: #F7EEE9;
    --osv-field: #2E2023; --osv-on-field: #F7EEE9; --osv-field-hint: #A89794; }
}
:root[data-theme="dark"] { --osv-mast: #6E0810; --osv-main: #FFCB05; --osv-on-main: #181012; --osv-danger: #B3261E; --osv-quiet: #2E2023; --osv-on-quiet: #F7EEE9;
  --osv-field: #2E2023; --osv-on-field: #F7EEE9; --osv-field-hint: #A89794; }

/* ---- type: the system face for text, Poppins for titles ---- */
body { --body: var(--osv-text); --disp: var(--osv-title); font-family: var(--osv-text); }
button, input, select, textarea, h3, h4 { font-family: var(--osv-text); }
h1, h2 { font-family: var(--osv-title); }

/* ---- buttons: one shape ---- */
.btn, .mc-btn, .done-btn, button.rw.ready,
.btns button, .bar button, .auto button,
.nav button, .clips button,
.signin button, .cta a.go, .live-btn,
.langs button, .chips button { border-radius: var(--osv-r); }

/* quiet buttons that wore an outline or a gloss */
.btns button, .bar button, .auto button, .clips button { border: 0; background: var(--osv-quiet); color: var(--osv-on-quiet); background-image: none; }

/* main */
.signin button, .btns button.pri, .bar button.pri, .btn.primary { background: var(--osv-main); background-image: none; color: var(--osv-on-main); border-color: transparent; box-shadow: none; }
/* on the red panel a red button would vanish: the brand's yellow, flat */
.cta a.go { background: #FFCB05; background-image: none; color: #181012; box-shadow: none; }

/* danger: dark red with white, on every page */
button.danger, .btn.danger, .mc-btn.danger, .btns button.danger { background: var(--osv-danger); background-image: none; color: var(--osv-on-danger); border-color: transparent; }

/* a chosen filter or page of a set */
.clips button[aria-current="true"] { background: var(--osv-pick); color: var(--osv-on-pick); }

/* ---- fields: one look on every page (docs/map/style/inputs.md). 28 Nov 2026, after the UI check: fields came in five looks
   (34 to 46 px tall, with and without a border, 8 or 10 px corners), and Control, Inventory, Diagnostics and Users had text
   under 16 px, which makes an iPhone zoom in when the field is tapped.
   1. Machines' field everywhere: no border, 10 px corners, the cream field ground (dark in the dark), 46 px tall.
   2. Text never under 16 px. A field that should be bigger says so on itself: --osv-field-size (Machines' pairing code).
   3. Only fields you type in or pick from: checkboxes, radios, switches and file pickers keep their own look, and the
      shared rule never sets a width, so each page still lays its fields out.
   4. The customers' pages keep their own dark fields (Club, Feedback: <html data-fields="own">; both are 16 px or more).
   The pages no longer carry their own field look; only their layout (width, flex). */
html:not([data-fields="own"]) input:is(:not([type]), [type=text], [type=search], [type=number], [type=date], [type=time],
  [type=datetime-local], [type=month], [type=password], [type=email], [type=tel], [type=url]),
html:not([data-fields="own"]) select, html:not([data-fields="own"]) textarea {
  box-sizing: border-box; min-height: 46px; padding: 10px 12px; border: 0; border-radius: var(--osv-r); box-shadow: none;
  background: var(--osv-field); color: var(--osv-on-field); font-size: max(16px, var(--osv-field-size, 16px)); line-height: 1.3;
}
html:not([data-fields="own"]) :is(input, textarea)::placeholder { color: var(--osv-field-hint); opacity: 1; }
html:not([data-fields="own"]) :is(input, select, textarea):disabled { opacity: .55; cursor: default; }

/* ---- keyboard focus: one ring on every page (29 Nov 2026, after the UI check: the pages carried 26 copies of the same ring, and
   70 of 644 controls showed the browser's own blue-black one). docs/map/style/access.md.
   1. 2 px in the main colour, 2 px out from the control: red, and yellow in the dark. Fields too.
   2. On the red panels (the console's page header; the red header of the dashboard, Live Screen and How it works) the ring is
      yellow: red on red would vanish. So it is on the customers' pages (Club, Feedback: <html data-fields="own">), which are
      near-black in both themes.
   3. Light on purpose (one pseudo-class), so a page's ring for a special place still wins: white over the video, inside a tab,
      round a dot on a chart, the machine's own screen.
   4. Never outline: none without something in its place. ---- */
:focus-visible { outline: 2px solid var(--osv-ring); outline-offset: 2px; }
html.cn-on body > header:not(.mast), header.mast, html[data-fields="own"] { --osv-ring: #FFCB05; }

/* ---- a phone: nothing you tap is under 44 px (Apple's size; docs/map/style/access.md). 28 Nov 2026, after the UI check:
   the Menu and Refresh buttons were 34, Back and Home 32, the date chips 31, the sort headers 15. ----
   1. Every button, field and button-like link is at least 44 tall. The pages' own smaller sizes are overridden by name.
   2. Small square buttons, and short words like "All" or "EN", are 44 wide too.
   3. Kept small on purpose: the machine's coil map, a picture of the cabinet with one cell a slot (25 to 50 px, still over
      the 24 px floor), and the Customers calendar's day cells (sized by the calendar's width, about 44). */
@media (max-width: 700px) {
  /* not textarea: none on the site is under 46 px, and at this weight this line cut Feedback's 80 px comment box to 44 */
  button, select, a.btn, [role=button], input:not([type]), input[type=text], input[type=number], input[type=time],
  input[type=date], input[type=search], input[type=url], input[type=password], input[type=email], input[type=tel] { min-height: 44px; }
  .btns button, .bar button, .auto button, .clips button, .mc-btn, .signin button { min-height: 44px; }
  /* pages that set their own smaller size: Diagnostics, Customers, Camera, Control, Users, Feedback, the Back/Home row */
  .rf-btn, .px-sort, .fold.how > summary, .fold.flat > summary, .vx-keyd.fold.flat > summary, .pb-panel .fold.flat > summary,
  .nav button, .views button, .pv-seg button, .vid-bar button, .vid.docked > .vid-bar button, .nav .cal-f button, .langs button,
  .log-f input, .picker button, details.done-list summary, .sheet-body .card .btns button, .sheet-foot button, .form input, .form select,
  .osv-nav a, body .osv-nav a { min-height: 44px; }
  .rf-btn, .pw-day, .nav .cal-h button, .osv-nav a, body .osv-nav a, .btns button, #dwm button, .vl-pick .btn.vl-step, .vx-controls button,
  .langs button, .chip, .seg button, .px-sort { min-width: 44px; }
  th.num .px-sort { justify-content: flex-end; }
  .pw-day, .nav .cal-h button { height: 44px; width: 44px; }
  .coil { min-height: 0; }
  a.btn { display: inline-flex; align-items: center; justify-content: center; }
  /* words you tap that are not buttons: more room above and below, the same look */
  .roles summary { padding-block: 12px; }
  .pdpa summary { padding-block: 14px; }
  .plate-more > summary { padding-block: 14px; }
  .plate-body a { display: inline-block; padding-block: 12px; }
  .admin a { padding-block: 14px; }
  .mast-top .ig { display: inline-block; padding-block: 12px; }
  .mast-top .home { padding-block: 2px; }
}

/* ---- the logo: one logo, white and yellow. On cream or white it sits on a red panel (brand book, page 2) ---- */
.gate-logo { display: inline-block; padding: 12px 16px; border-radius: var(--osv-r-card); background: #C41420; }
.tabs-logo { background: #C41420; border-radius: 8px; padding: 0 8px; }
.tabs-logo .tl-dk { display: block; }

/* ---- one page header on the console's pages (the ones with the left menu): the brand's red panel, rounded ---- */
html.cn-on body > header:not(.mast) { margin: 12px var(--osv-gutter) 0; padding: 16px 24px 16px; border-radius: var(--osv-r-big); background: var(--osv-mast); color: #FFFFFF; }
html.cn-on body > header:not(.mast) h1 { color: #FFFFFF; }
html.cn-on body > header:not(.mast) .sub, html.cn-on body > header:not(.mast) p { color: #FFE3A0; }
/* on a phone the header lines up with the cards under it (it stood 6 px wider on each side until 29 Nov 2026) */
@media (max-width: 700px) { html.cn-on body > header:not(.mast) { margin: 8px var(--osv-gutter) 0; padding: 14px 16px 16px; } }
/* the dashboard's own header panel wore dark red; the same red as every other page's */
body[data-tab] .mast { background: var(--osv-mast); }

/* readability rule 1 for <small> (29 Nov 2026): the browser's "smaller" made 10.4 px of a 12.5 px line ("(13 days)" on Sales).
   Weightless, so a page's own size for a small still wins. */
:where(small) { font-size: max(11px, .83em); }

/* Impeccable audit, 23 Nov 2026: no paragraph ends on one lonely word, and headings wrap evenly. */
p, li, dd, figcaption { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
