/* ============================================================================================
   LOOK-1 · PIECE A2 — header and tab bar rules for the design tokens.
   Link AFTER look1-tokens.css (and after app.css/pages.css/ui2.css). The markup is built by shell.js;
   the LOOK-1 A2 shell patch (look1-shell.js.patch) adds the Baloo 2 800 wordmark + 7x7 core mark to the
   header brand and the design line-icons to the tab bar. Nothing here changes ids, handlers or behaviour;
   icon/mark are inline SVG (no request). Values come from main/plan/design-ref/employee-journey.html:
   wordmark Baloo 2 800 (l.31/.190), on-dark wordmark 1.55rem (l.203), line icons stroke 1.7 (l.712-713),
   tabs with the burgundy underline (l.51-53), square 2px radius (l.41/.45/.142), gold 2px focus (l.23),
   dark surface #1C231B / off-white #F6F7F2 / gold #8F6C32 (l.11-12).
   Every app page that loads shell.js gets this header/tab bar automatically (employee, officer, operator,
   superuser, investor, and any future signed-in page); the sign-in/offline pages have no shell header.
   ============================================================================================ */

/* ---- header (topbar): the design's dark surface, off-white wordmark, square parts ----------------------- */
.topbar { background: var(--dark); color: var(--off); border-block-end: 0; box-shadow: none; }
.topbar .topbar__inner { border-block-end: 1px solid rgba(246, 247, 242, 0.14); }
.topbar .brand { color: var(--off); text-decoration: none; gap: 3px; }
.topbar .brand .wm { font-family: var(--wordmark); font-weight: 800; font-size: 1.05rem; line-height: 1;
  letter-spacing: 0; color: var(--off); display: inline-flex; align-items: flex-start; gap: 2px; direction: ltr;
  white-space: nowrap; }   /* dark bar = design .emp-bar .logo: 1.05rem off-white */
.topbar .brand .wm .mk { display: inline-block; inline-size: 7px; block-size: 7px; margin-top: 3px; flex: none; }
.topbar .brand .brand__logo, .topbar .brand .brand__wordmark { display: none !important; }  /* old favicon + NAWTT caps never flash */
.topbar { margin-block-start: 0; }
#look1-icons, .look1-sprite { display: none !important; }
.topbar .brand .wm .mk svg { display: block; width: 100%; height: 100%; }
.topbar .role-chip { border-radius: var(--look1-radius); background: transparent;
  border: 1px solid rgba(246, 247, 242, 0.35); color: var(--off); letter-spacing: 0.07em; }
.topbar .pg-nav a, .topbar .seg, .topbar .seg__item, .topbar .btn, .topbar .account__btn,
.topbar .btn--on-brand, .topbar .account__avatar, .topbar .account__caret {
  border-radius: var(--look1-radius);   /* square design parts: no pills in the header */
}
.topbar .pg-nav a[aria-current='page'] { background: var(--off); color: var(--burg-d); }
.topbar .seg { border-color: rgba(246, 247, 242, 0.35); }
.topbar .seg__item { border-radius: 0; }
.topbar .seg__item:first-child { border-start-start-radius: var(--look1-radius); border-end-start-radius: var(--look1-radius); }
.topbar .seg__item:last-child { border-start-end-radius: var(--look1-radius); border-end-end-radius: var(--look1-radius); }
.topbar a:focus-visible, .topbar button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---- tab bar (desktop): design tabs - a line, muted labels, burgundy underline on the selected tab ----- */
#tabbar .tabs { border-block-end: 1px solid var(--line); gap: 0; }
#tabbar .tab { border: 0; border-block-end: 2px solid transparent; border-radius: 0; background: none;
  color: var(--muted); font-family: var(--latin); font-weight: 700; font-size: 0.86rem; line-height: 1.2;
  padding: 14px 8px 12px; min-block-size: 44px; display: inline-flex; flex-direction: row; align-items: center;
  gap: 8px; }
#tabbar .tab:hover { background: var(--tint); color: var(--accent-ink); }
#tabbar .tab[aria-selected='true'] { background: none; color: var(--ink); border-block-end-color: var(--burg); }
#tabbar .tab[aria-selected='true']::after { display: none; }   /* the underline is the selected state */
#tabbar .tab .tab__ic { display: inline-flex; align-items: center; justify-content: center; }
#tabbar .tab .tab__ic svg { width: 18px; height: 18px; display: block; color: currentColor; }
#tabbar .tab__badge { background: var(--burg); color: var(--off); border-radius: var(--look1-radius);
  font-family: var(--latin); font-weight: 800; }
#tabbar .tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#tabbar .tabbar__more { color: var(--muted); font-family: var(--latin); font-weight: 700; }
#tabbar .tabbar__more.is-current { background: var(--tint); color: var(--accent-ink); }

/* ---- phone bottom bar: same design parts, icons above the labels (grid/column layout is the shell's) ---- */
@media (max-width: 760px) {
  .tabbar { background: var(--panel); border-block-start: 1px solid var(--line); box-shadow: none; }
  .tabbar .tab, .tabbar__more { color: var(--muted); font-family: var(--latin); font-weight: 600; }
  .tabbar .tab .tab__ic svg, .tabbar__more .tab__ic svg { width: 20px; height: 20px; display: block; }
  .tabbar .tab[aria-selected='true'], .tabbar__more.is-current {
    background: var(--tint); color: var(--accent-ink);
  }
  .tabbar .tab[aria-selected='true']::after { background: var(--burg); }
  .tabbar .tab:focus-visible, .tabbar__more:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
}

/* ---- dark scheme: the design's dark values; the tab bar follows the tokens automatically ----------------- */



/* ---- reduced motion: the shell's MOTION-ALL rules already stop animation; keep the focus/hover still ----- */
@media (prefers-reduced-motion: reduce) {
  #tabbar .tab, .topbar .pg-nav a { transition: none; }
}


/* ---- A2 fix: phone bottom bar - at most 5 items (4 tabs + More), icon above a ONE-LINE label ------------ */
@media (max-width: 760px) {
  .tabbar, .tabbar .tabs { max-inline-size: 100%; overflow: hidden; }
  .tabbar .tabs { grid-auto-columns: minmax(0, 1fr); }
  .tabbar .tab, .tabbar .tabbar__more { min-inline-size: 0; flex: 1 1 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px; padding: 6px 3px; white-space: nowrap; }
  .tabbar .tab .tab__ic svg, .tabbar .tabbar__more .tab__ic svg { inline-size: 20px; block-size: 20px; }
  .tabbar .tab .tab__label, .tabbar .tabbar__more .tab__label { display: block; max-inline-size: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.6875rem; line-height: 1.15;
    font-weight: 600; letter-spacing: 0; }
  .tabbar .tab--overflow { display: none !important; }
  /* the old per-letter wrap came from white-space:normal + overflow-wrap:anywhere + a label as a bare text node */
  .tabbar .tab, .tabbar .tabbar__more { white-space: nowrap; overflow-wrap: normal; text-align: center; }
}


/* ---- fix pass 2: desktop tab row is one line; More is the PHONE overflow control only -------------------
   app.css/pages styles set `.tabbar .tabs { flex-wrap: wrap }` for every width, so a page with more tabs than
   fit wrapped More onto a second row (reviewer: "6 labels PLUS More on its own second line"). The design's
   desktop tab bar is a single underline row; keep it single-line and scrollable, and hide the phone-only More
   button on desktop (ui2.css already hides .tabbar__more by default, but the LOOK-1 `#tabbar .tab` rule gives the
   More button display:inline-flex with ID specificity, so it has to be re-hidden here with the same specificity).
   Also covers the flip case: the phone bar is fixed and always rendered by the shell. */
@media (min-width: 761px) {
  #tabbar .tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  #tabbar .tabbar__more, #tabbar .tab.tabbar__more, .tabbar .tabbar__more { display: none !important; }
  #tabbar .tab { flex: 0 0 auto; white-space: nowrap; }
}


/* ---- fix pass 3: phone-bar geometry so 4 short labels + More fit ONE line without ellipsis --------------
   The desktop rules use ID specificity (`#tabbar .tab .tab__ic svg { width:18px }`), which beat class-only phone
   rules (the earlier 20px/16px attempts lost). Everything below is ID-scoped with !important on the measured
   properties: 16 px icon, 2 px gap, 1 px inline padding, 9.6 px (0.6rem) label, no letter spacing. This gives
   >= 52-60 px label space for 4 tabs + More at 320/390/430 while desktop (>=761 px) keeps the design's 18/20 px
   icons and 0.86rem labels. Also neutralises the old `[data-tab='waiting']` phone rule (font-size:0 + ::before
   'Waiting') so a page can use its own short label ("Pending") in the span. */
@media (max-width: 760px) {
  #tabbar .tab, #tabbar .tabbar__more, .tabbar .tab, .tabbar .tabbar__more {
    gap: 2px !important; padding: 6px 1px !important; min-inline-size: 0 !important; white-space: nowrap !important; }
  #tabbar .tab .tab__ic, #tabbar .tabbar__more .tab__ic { flex: none !important; }
  #tabbar .tab .tab__ic svg, #tabbar .tabbar__more .tab__ic svg {
    inline-size: 16px !important; block-size: 16px !important; width: 16px !important; height: 16px !important; }
  #tabbar .tab .tab__label, #tabbar .tabbar__more .tab__label {
    font-size: 0.6rem !important; line-height: 1.1 !important; letter-spacing: 0 !important; word-spacing: 0 !important; }
  #tabbar .tab[data-tab='waiting'] { font-size: inherit !important; }
  #tabbar .tab[data-tab='waiting']::before { content: none !important; }
}


/* ---- fix pass 6: phone tab bar = icon ABOVE a full-width one-line label; badge over the icon corner -------
   The desktop `#tabbar .tab` rule (ID specificity) kept the phone bar in a row, and the badge's default position
   landed on the label row: the screenshots' "Reque..." / "Inv..." were the badge covering the text and a label box
   equal to its own text width (sub-pixel ellipsis), not a CSS ellipsis of a too-wide string. Force the design's
   phone layout with ID specificity: column (icon above label), label stretched to the full tab content width
   (tens of px spare), badge on the ICON's top-right corner so it never covers text. Desktop untouched. */
@media (max-width: 760px) {
  #tabbar .tab, #tabbar .tabbar__more, .tabbar .tab, .tabbar .tabbar__more {
    flex-direction: column !important; justify-content: center !important; align-items: stretch !important;
    gap: 2px !important; padding: 5px 1px !important; min-inline-size: 0 !important; white-space: nowrap !important;
  }
  #tabbar .tab .tab__ic, #tabbar .tabbar__more .tab__ic, .tabbar .tab .tab__ic { align-self: center !important; flex: none !important; }
  #tabbar .tab .tab__label, #tabbar .tabbar__more .tab__label,
  .tabbar .tab .tab__label, .tabbar .tabbar__more .tab__label {
    display: block !important; inline-size: 100% !important; max-inline-size: 100% !important; min-inline-size: 0 !important;
    align-self: stretch !important; text-align: center !important;
  }
  #tabbar .tab .tab__badge, .tabbar .tab .tab__badge {
    position: absolute !important; inset-block-start: 1px !important; inset-inline-end: calc(50% - 21px) !important;
    block-size: 16px !important; min-inline-size: 16px !important; padding: 0 3px !important;
    font-size: 0.5625rem !important; line-height: 16px !important; border-radius: 8px !important;
  }
  #tabbar .tab[data-tab='waiting'] .tab__badge, .tabbar .tab[data-tab='waiting'] .tab__badge {
    inset-block-start: 1px !important; inset-inline-end: calc(50% - 23px) !important;
  }
}


/* ---- fix pass 8: the header .seg (page switcher) kept app.css's LIGHT surface on the DARK topbar ----------
   app.css `.seg { background: var(--nawtt-surface) }` (+ its light border) survives under the dark topbar, so the
   unselected segment text (off-white) sat on a light surface (contrast ~1.03:1 - invisible in BOTH themes; the
   contrast scan caught it as the superuser "Operator desk" row). The header's segments follow the design's dark
   bar: transparent fill, off-white text, and the current item is the off-white chip with burgundy text. */
.topbar .seg { background: transparent; border-color: rgba(246, 247, 242, 0.35); }
.topbar .seg__item { background: transparent; color: var(--off); }
.topbar .seg__item[aria-current='page'] { background: var(--off); color: var(--burg-d); }


/* ---- fix pass 9: design gap between the wordmark+mark and the role chip / page seg (12-16px) --------------
   The legacy .brand box is `flex: 0 0 44px` on phones (and keeps a wider legacy width on desktop), so the
   wordmark's 11px core mark overflowed the brand box and sat right against the role chip ("nawtt ❖ EMPLOYER").
   Let the brand hug its wordmark (auto basis/width), keep its min touch size, and give the design gap: 12px on
   phones, 14px on desktop, between the brand's right edge (the mark) and whatever follows (role chip / page seg).
   The account block on the right is unaffected (it is pushed by the middle spacer, not by these margins). */
.topbar .brand { flex: 0 0 auto !important; inline-size: auto !important; min-inline-size: 0 !important; max-inline-size: none !important;
  margin-inline-end: 4px; }
@media (max-width: 760px) {
  .topbar .brand { margin-inline-end: 4px; min-inline-size: var(--mob-touch, 44px) !important; }
}


/* ---- LOOK-1C fix: the phone bottom-nav "More" label must match the tab labels --------------------------
   The More button is built with a bare text node (no .tab__label span), so it inherited the desktop
   `#tabbar .tab` size (.86rem/700 = 13.76px) instead of the phone label size (.6rem/600 = 9.6px): the word
   "More" rendered visibly larger than "Advance"/"Requests"/.... Give the More button the SAME computed
   font-size/weight/line-height/letter-spacing as .tab__label at phones; keep a matching desktop size too (the
   button is hidden on desktop, but this guarantees parity if a bar ever shows it beside tabs). */
@media (max-width: 760px) {
  #tabbar .tabbar__more, .tabbar .tabbar__more, .tabbar__more {
    font-size: 0.6rem !important; font-weight: 600 !important; line-height: 1.1 !important;
    letter-spacing: 0 !important; word-spacing: 0 !important;
  }
}
@media (min-width: 761px) {
  #tabbar .tabbar__more, .tabbar .tabbar__more, .tabbar__more {
    font-size: 0.86rem !important; font-weight: 700 !important; letter-spacing: 0 !important;
  }
}

/* =================================================================================================================
   D6 — SHARED LEFT MENU for the five portals (all pages that load shell.js)
   Wide screens (>760px): the existing #tabbar (same tabs, same order, same live badges) becomes a sticky vertical
   menu on the inline-start side; the page content moves to its right by body padding, so the full-bleed elements
   (hero, cards) stay inside the content column. The header keeps its full width (negative margin compensates).
   Phones: the employee page keeps the design's bottom bar; staff pages hide the bar and show the Menu button in
   the header, which opens the same list (the existing More sheet now lists ALL tabs for a staff phone).
   RTL: everything is logical (padding-inline-start, inset-inline-start, margin-inline-start) so the menu mirrors.
   ================================================================================================================= */
.topbar__menu { display: none; }
@media (min-width: 761px) {
  body.has-side-menu { padding-inline-start: 232px; }
  body.has-side-menu > .topbar { margin-inline-start: -232px; }
  body.has-side-menu > #tabbar.tabbar--side {
    position: fixed; inset-block-start: var(--own1-topbar-h, 64px); inset-block-end: 0; inset-inline-start: 0;
    inline-size: 232px; overflow-y: auto; overscroll-behavior: contain; z-index: 20;
    background: var(--panel); border-inline-end: 1px solid var(--line); padding: 14px 10px 24px;
  }
  body.has-side-menu > #tabbar.tabbar--side .tabs { display: flex; flex-direction: column; gap: 2px; border: 0; }
  body.has-side-menu > #tabbar.tabbar--side .tab {
    display: flex; flex-direction: row; align-items: center; justify-content: flex-start; inline-size: 100%;
    gap: 10px; padding: 10px 12px; border: 0; border-inline-start: 2px solid transparent;
    border-radius: var(--look1-radius); min-block-size: 44px; white-space: normal; line-height: 1.2;
    font-size: 0.86rem; font-weight: 700; text-align: start;
  }
  body.has-side-menu > #tabbar.tabbar--side .tab:hover { background: var(--tint); color: var(--accent-ink); }
  body.has-side-menu > #tabbar.tabbar--side .tab[aria-selected='true'] {
    background: var(--tint); color: var(--accent-ink); border-inline-start-color: var(--burg);
  }
  body.has-side-menu > #tabbar.tabbar--side .tab[aria-selected='true']::after { display: none; }
  body.has-side-menu > #tabbar.tabbar--side .tab .tab__ic svg { inline-size: 18px; block-size: 18px; }
  body.has-side-menu > #tabbar.tabbar--side .tab__label {
    display: inline-block; inline-size: auto; max-inline-size: 100%; text-align: start;
  }
  body.has-side-menu > #tabbar.tabbar--side .tab__badge {
    position: static; margin-inline-start: auto; block-size: auto; min-inline-size: 18px; padding: 0 5px; line-height: 18px;
  }
  body.has-side-menu > #tabbar.tabbar--side .tabbar__more { display: none !important; }
  body.has-side-menu main.shell { max-inline-size: none; margin-inline: 0; }
}
@media (max-width: 760px) {
  body.portal-staff #tabbar { display: none !important; }                   /* staff phones: Menu button, no bottom bar */
  body.portal-staff .topbar__menu {
    display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px;
    margin-inline-end: 4px; border: 1px solid rgba(246, 247, 242, 0.35); border-radius: var(--look1-radius);
    background: transparent; color: var(--off); cursor: pointer; padding: 0;
  }
  body.portal-staff .topbar__menu:hover { background: rgba(246, 247, 242, 0.12); }
  body.portal-staff .topbar__menu:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  body.portal-staff .topbar__menu svg { inline-size: 20px; block-size: 20px; }
}
@media (min-width: 761px) { .topbar__menu { display: none !important; } }

/* ===== OPS-1 item 9 (patch-b): the top banner is the brand maroon again (was #1C231B since LOOK-1C) ======
   The brand burgundy family (#8B1538 light / #6F0F2B deep) with the off-white text and borders that were designed
   for it. Both themes use the same maroon bar, so every portal matches; contrast of the bar text stays >= 7:1
   (off-white #F6F7F2 on #8B1538), and the existing .topbar child rules keep their off-white colours/borders. */
.topbar { background: var(--burg, #8B1538); color: var(--off, #F6F7F2); }
.topbar .topbar__inner { border-block-end-color: rgba(246, 247, 242, 0.22); }
.topbar .role-chip, .topbar .seg, .topbar .account__btn { border-color: rgba(246, 247, 242, 0.4); }
.topbar .pg-nav a { color: rgba(246, 247, 242, 0.9); }
.topbar .brand .wm { color: var(--off, #F6F7F2); }

/* =================================================================================================================
   OPS-2 item 11 (patch-c): header/side layout on wide screens.
   The nawtt mark stays top-left in the header; the ROLE badge sits just below it on the left; the account / operator
   control moves to the bottom-left corner of the side menu. The side menu keeps its tab list between them. Phones keep
   the existing header + Menu sheet (no side column).
   ================================================================================================================= */
@media (min-width: 761px) {
  body.has-side-menu .topbar { z-index: 25; }   /* the fixed role chip + bottom account control live inside the topbar's stacking context */
  body.has-side-menu .topbar .role-chip {
    position: fixed; inset-block-start: calc(var(--own1-topbar-h, 64px) + 10px); inset-inline-start: 16px;
    z-index: 31; flex: 0 0 auto; inline-size: auto; min-inline-size: 0; max-inline-size: 200px;
    justify-content: flex-start; padding: 4px 10px;
    background: var(--tint); color: var(--ink); border: 1px solid var(--line);
  }
  body.has-side-menu .topbar__end .account__btn {
    background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--look1-radius);
  }
  body.has-side-menu .topbar__end .account__name { color: var(--ink); }
  body.has-side-menu .topbar__end .account__caret { color: var(--muted); }
  body.has-side-menu .topbar__end .account__avatar { background: var(--burg); color: var(--off, #F6F7F2); }
  body.has-side-menu > #tabbar.tabbar--side { padding-block-start: 56px; padding-block-end: 96px; }
  body.has-side-menu .topbar__end {
    position: fixed; inset-inline-start: 0; inset-block-end: 0; z-index: 32;
    inline-size: 232px; max-inline-size: 232px; margin: 0; padding: 10px;
    background: var(--panel); border-block-start: 1px solid var(--line);
  }
  body.has-side-menu .topbar__end .account__btn {
    inline-size: 100%; min-inline-size: 0; max-inline-size: none; justify-content: flex-start;
  }
  body.has-side-menu .topbar__end .account__menu {
    inset-block-start: auto; inset-block-end: calc(100% + 8px); inset-inline-end: 0; inline-size: 100%;
  }
}

/* OWNER 2026-11-12: with the side menu, the top-bar logo starts at the content's left edge (right of the menu), never above the menu, at any width */
@media (min-width: 768px) {
  body.has-side-menu > .topbar .topbar__inner { max-inline-size: none; margin-inline: 0; padding-inline-start: 248px; }
}

/* ---- LOOK-2: the always-visible Sign out button beside the account menu (exit icon; word on desktop, icon only on a phone) ---- */
.topbar .signout-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; min-block-size: 44px; min-inline-size: 44px;
  padding: 0 12px; margin-inline-start: 8px; border: 1px solid rgba(246, 247, 242, 0.4); border-radius: var(--look1-radius); background: transparent;
  color: #FFFFFF; font: inherit; font-size: 0.875rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.topbar .signout-btn:hover { background: rgba(247, 243, 237, 0.2); }
.topbar .signout-btn__ic { inline-size: 20px; block-size: 20px; flex: 0 0 auto; }
.sheet__item .sheet__ic { display: inline-flex; margin-inline-end: 10px; }
.sheet__signout { justify-content: flex-start; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .topbar .signout-btn { inline-size: 44px; padding: 0; margin-inline-start: 0; }
  .topbar .signout-btn__text { display: none; }
  .topbar .topbar__end { gap: 6px; }
}
@media (min-width: 761px) {
  /* desktop with the side menu: the account button stays in the side column; Sign out (icon + word) sits in the top bar's right side */
  body.has-side-menu .topbar__end .signout-btn { position: fixed; inset-block-start: calc(var(--own1-topbar-h, 64px) / 2 - 22px); inset-inline-end: 16px; z-index: 33; margin: 0; }
}
@media (max-width: 640px) {
  /* one row: the role pill gives way; Sign out and the account button never do */
  .topbar .topbar__inner { flex-wrap: nowrap; }
  .topbar .role-chip { display: none; }
  .topbar .topbar__end { flex: 0 0 auto; margin-inline-start: auto; }
}


/* ============================================================================================
   UI-1 WAVE 1 (shared foundations, 2026-11-15). One block, last in the shared shell file, so it wins over the older passes above.
   Light theme only (no dark rules anywhere in the shared CSS), no animation or transition, one focus ring, 44 px targets,
   disabled never faded, one input style. Portal-specific CSS loaded after this file may still override (wave 2 removes those).
   ============================================================================================ */
html { color-scheme: light; scroll-behavior: auto; }
*, *::before, *::after { animation: none !important; transition: none !important; }

/* focus: ONE ring everywhere - 3 px pitch black, 2 px off the edge; white on the burgundy bar / hero (UI review operator S12, officer 15, employee S10) */
html body :is(a, button, input, select, textarea, summary, [tabindex], [role='tab']):focus-visible { outline: 3px solid var(--ink, #000); outline-offset: 2px; box-shadow: none; }
html body :is(.topbar, .hero, .login-brandside, .login-mobile-brand) :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline-color: #fff; }
html body #tabbar .tab:focus-visible, html body .tabbar .tab:focus-visible, html body .tabbar__more:focus-visible { outline: 3px solid var(--ink, #000); outline-offset: -3px; }
html body .fk-box:focus-within { outline: 3px solid var(--ink, #000); outline-offset: 2px; box-shadow: none; border-color: var(--ink, #000); }
html body .skip-link:focus { outline: 3px solid #fff; background: var(--burg, #8B1538); color: #fff; }

/* one input style: white fill, a dark edge (3:1 or better on every surface) - no pink search box, no pale register fields */
:root { --ops2-field-bg: #FFFFFF; --ui1-edge: #595959; }
html body :is(input, select, textarea).input:not(#_ui1) { background: #FFFFFF; border: 1px solid var(--ui1-edge); color: #000; min-block-size: 44px; }
html body .fk-box { background: #FFFFFF; border-color: var(--ui1-edge); }
html body .search .input { background: #FFFFFF; }
html body :is(.input, .fk-box .input)::placeholder { color: #000; opacity: 1; font-style: italic; font-weight: 400; }

/* tap targets: every button, chip, link-button, select and the account button is 44 px high (hit area, not look) */
html body :is(.btn, .btn--sm, .filter, .inv-switch__btn, .sort-btn, .fk-remove, .link-button, .back-link) { min-block-size: 44px; }
html body .btn--sm, html body .filter { min-inline-size: 44px; }
html body button.cell-open { min-block-size: 44px; display: inline-flex; align-items: center; text-align: start; white-space: normal; max-inline-size: 100%; }
html body .topbar .account__btn { min-block-size: 44px; block-size: 44px; }
html body .toast__close { inline-size: 44px; block-size: 44px; margin: -12px -14px -12px 0; }

/* disabled is never faded: dashed edge, full-strength black text, same shape (operator S5) */
html body .btn:is([disabled], [aria-disabled='true']):not(.is-busy) { opacity: 1; background: transparent; color: #000; border: 1px dashed #000; cursor: not-allowed; box-shadow: none; }
html body .btn.is-busy[disabled] { opacity: .75; }

/* phone bottom bar and More: labels 12 px minimum and they follow the text-size setting (rem) */
@media (max-width: 760px) {
  html body :is(#tabbar, .tabbar) .tab .tab__label, html body :is(#tabbar, .tabbar) .tabbar__more .tab__label, html body :is(#tabbar, .tabbar) .tabbar__more {
    font-size: min(0.75rem, 3.4vw) !important; line-height: 1.15 !important; font-weight: 700 !important; }   /* VW-1: 12 px, but never wider than the cell: 'Employees' fits at 360 px with 115% text */
  html body :is(#tabbar, .tabbar) .tab { min-block-size: 56px; }
}
.sheet__item { min-block-size: 48px; }

/* the "offline / reconnecting" strip: neutral, one short block, never inside the film or form layout (investor M2, employee M4) */
#liveStatus { min-block-size: 0; margin: 0 0 8px; padding: 8px 12px; background: var(--panel, #F6F7F2); color: #000; border: 1px solid var(--ui1-edge); font-size: .875rem; line-height: 1.3; align-self: start; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  #liveStatus:not([hidden]) { position: fixed; inset-inline: 8px; inset-block-end: calc(68px + env(safe-area-inset-bottom, 0px)); z-index: 29; margin: 0; }
}
.alert { color: #000; }
.alert--error { color: #000; }
.alert__retry { margin-block-start: 8px; }
.alert:has(.alert__retry) { display: grid; gap: 4px; justify-items: start; }
.field__error { color: #000; font-weight: 700; }
.field__error:not(:empty)::before { content: '! '; font-weight: 800; color: var(--burg, #8B1538); }
.field .input[aria-invalid='true'], .fk-box:has(.input[aria-invalid='true']) { border-color: var(--burg, #8B1538); border-width: 2px; }
html body :is(.login-card__foot, .pg-hint, .card__hint, .field__hint) a:not(#_ui1) { display: inline-flex; align-items: center; min-block-size: 44px; }
html body .fk-box :is(input, select, textarea).input:not(#_ui1) { border: 0; background: transparent; min-block-size: 52px; }

/* offline page: breathing room (employee N6) - the card sits inside a page margin, the wordmark has air, paragraphs are apart */
body.offline #main { padding: 16px; }
body.offline #main > .card { padding-block-start: 16px; }
body.offline #main > .card > .card__head { padding-block-start: 12px; }
body.offline .card__body > * { margin-block: 0 14px; }
body.offline .card__body { padding-block-end: 16px; }
html body .topbar .brand { min-block-size: 44px; display: inline-flex; align-items: center; }

/* card header: the hint sits left-aligned UNDER the title, never right-aligned beside it (officer 16); empty states left-aligned; chips on one line (officer 14, 20) */
html body .card__head { flex-wrap: wrap; }
html body .card__head :is(.pg-hint, .card__hint, .card__sub) { flex: 1 1 100%; text-align: start; margin: 2px 0 0; }
html body :is(.pg-empty, .table__empty td, .table__empty) { text-align: start; }
html body .chip { white-space: nowrap; }
/* forms: fields and the primary action use the full card width (employee S7: the phone / code / method boxes were 65 % wide) */
html body .pg-form .field :is(input, select, textarea).input:not(#_ui1) { justify-self: stretch; inline-size: 100%; max-inline-size: 100%; }
@media (max-width: 640px) { html body .pg-form .btn--primary { inline-size: 100%; } }
html body .sort-btn { min-inline-size: 44px; }
html body .fk-check { min-block-size: 44px; align-items: center; }
html body .fk-check input { inline-size: 24px; block-size: 24px; margin: 0; }

/* UI-1 final: one burgundy for text (#8B1538) and full-strength white on burgundy; no deep-burgundy or half-faded text. */
.topbar .account__avatar { color: #8B1538; }
.topbar .account__caret { color: #FFFFFF; }
html body .topbar .pg-nav a[aria-current='page'], html body .topbar .seg__item[aria-current='page'] { color: #8B1538; }
.btn--danger { border-color: #8B1538; color: #8B1538; }
.btn--danger:hover { background: #8B1538; color: #FFFFFF; }
