/* ============================================================
   reset.css — the browser defaults this app overrides.

   A WARNING, because I got this wrong once and it cost the whole
   app its typeface. This file USED to open with a duplicate copy
   of tokens.css -- a real scaffolding mistake, the wrong file
   pasted above the real rules -- and the actual reset lived
   underneath it. I compared the two token blocks, found them
   identical, concluded the file was nothing but a stale copy, and
   replaced the lot. That deleted three load-bearing rules,
   including `html, body { font-family }`, which put every heading,
   label and table in the product back to Times New Roman.

   The duplicate tokens are gone. The three original rules below
   are restored verbatim, comments included, because each one
   records something measured rather than assumed.

   WHAT IS STILL DELIBERATELY NOT HERE:

   `box-sizing: border-box` on everything. It is the first line of
   almost every reset and the one thing this file must not do. The
   product was built and tuned against content-box for its whole
   history; where it mattered, individual rules opted in by hand,
   and .form-control says so in as many words ("width:100%
   includes padding+border"). Switching it globally would resize
   every element carrying both a width and a padding, which is most
   of them, and the damage would spread thin enough across enough
   pages that it would not all be found. Worth doing with time to
   check the result. Not in a bug-fix pass.

   Typography resets (zeroing margins on headings, p, ul) are out
   for the same reason: the app leans on those defaults in places
   and nobody has catalogued which.
   ============================================================ */

/* overflow-x lives on html ALONE, not on html+body.
   Any overflow value other than visible makes an element a scroll container,
   and a scroll container that never actually scrolls — body's height is
   content-driven, the window does the scrolling — is a dead scrollport. Every
   position:sticky descendant then resolves against it and silently never
   sticks. Measured, not guessed: with it on body, a sticky bar scrolled clean
   off the top of the settings page; with it removed, the same bar pinned under
   the topbar exactly as written, and nothing else moved.
   html keeps it, so horizontal overflow is still clipped at the root. */
html {
    overflow-x: hidden;
}

html, body {
    /* --font-family was declared in two places and then applied to only three
       component selectors (.btn, .form-control, one menu item) — nothing ever
       set it on the page. So Inter was loaded and paid for, buttons and inputs
       used it, and EVERYTHING else fell through to the browser default: the
       whole app, marketing site included, rendered headings, labels and tables
       in Times New Roman. That mismatch is why a table could look "unstyled"
       even where its own CSS was fine. */
    font-family: var(--font-family);
}

/* Blazor's <FocusOnNavigate Selector="h1" /> (Routes.razor) moves keyboard
   focus to the page's h1 after every navigation, for accessibility — the
   browser's plain black default outline reads as a stray border on a
   heading, so replace it with a soft branded ring instead of suppressing
   it (removing focus indication entirely would hurt keyboard users). */
h1:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 6px;
    border-radius: var(--radius-sm);
}

/* ── Added 2026-09-21, during the mobile pass ── */

/* The browser puts an 8px margin on body. On a 1280px desktop that is
   invisible; on a 320px phone it is 5% of the screen spent on nothing, and it
   was why the POS till measured 304px wide instead of 320 and let its Exit
   button fall off the right-hand edge. Every page here draws its own gutters --
   .app-content has padding, the marketing pages have containers -- so nothing
   was relying on it. */
body {
    margin: 0;
}

/* Form controls do not inherit the page font in ANY browser; they fall back to
   the system UI font unless told otherwise. That is the other half of the note
   on html, body above: setting the font on the page was never going to reach a
   <button> or an <input> on its own. Most of this app's controls set
   font-family explicitly and so looked right, which is exactly why the ones
   that did not have never been obvious -- the topbar icon buttons were
   rendering in Arial. */
button,
input,
select,
textarea {
    font-family: inherit;
}

/* An image wider than its column pushes the page sideways, and on a phone
   almost any unconstrained image is. Deliberately NOT applied to <svg>: the
   icons here carry explicit width/height attributes, and max-width would let a
   squeezed flex row shrink them instead of the text beside them. */
img,
video,
canvas {
    max-width: 100%;
}
