/* Haiyz header bar + switches — shared by every tool page (copied by brand-sync.sh).
   Drawn like the apps' header (Phase F, 2026-09-19): 48px, the page's canvas with a hairline under
   it, the H-mark logo (ink letters on light, white on dark), a separator, the product name as a
   sub-brand, and the language + theme switch as the kit's segmented control. Colours come from
   haiyz-tokens.css (generated from packages/ui); nothing here is a colour of its own.
   Markup (rendered by the page or mounted by haiyz-theme.js):
     <header class="haiyz-bar"><a class="haiyz-bar__brand" href=…></a><span class="haiyz-bar__sub">…</span>
       <nav class="haiyz-switch"><a data-lang="en">EN</a><a data-lang="ar">AR</a><button data-theme-toggle>…</button></nav></header> */
.haiyz-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px;
  background: color-mix(in srgb, var(--haiyz-bg) 95%, transparent); color: var(--haiyz-bar-ink);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  font-family: var(--haiyz-font); font-size: 13px;
  border-bottom: 1px solid var(--haiyz-border);
}
/* the logo: the mark is the H of "Haiyz"; an Arabic page shows "حيّز" */
.haiyz-bar__brand { display: inline-block; width: 52px; height: 18px; background: url("../img/haiyz-logo-green.png") center / contain no-repeat; text-indent: -9999px; overflow: hidden; flex: none; }
html[lang="ar"] .haiyz-bar__brand { width: 46px; background-image: url("../img/haiyz-logo-green-ar.png"); }
html[data-theme="dark"] .haiyz-bar__brand { background-image: url("../img/haiyz-logo-white.png"); }
html[data-theme="dark"][lang="ar"] .haiyz-bar__brand { background-image: url("../img/haiyz-logo-white-ar.png"); }
.haiyz-bar__sub { display: inline-flex; align-items: center; gap: 10px; color: var(--haiyz-bar-muted); font-weight: 500; }
.haiyz-bar__sub::before { content: ""; width: 1px; height: 16px; background: var(--haiyz-border); }
.haiyz-bar__links { display: flex; gap: 14px; margin-inline-start: 6px; }
.haiyz-bar__links a { color: var(--haiyz-bar-muted); text-decoration: none; }
.haiyz-bar__links a:hover { color: var(--haiyz-bar-ink); }
.haiyz-bar .haiyz-switch, .haiyz-bar [data-haiyz-switch] { margin-inline-start: auto; }
/* the switch: the kit's segmented control — a hairline box, small radius, the current item filled */
.haiyz-switch { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: var(--haiyz-radius-sm); border: 1px solid var(--haiyz-border); background: var(--haiyz-card); font-family: var(--haiyz-font); font-size: 12px; }
.haiyz-switch--floating { position: fixed; top: 10px; inset-inline-end: 16px; z-index: 50; box-shadow: var(--haiyz-shadow); }
.haiyz-switch a, .haiyz-switch button { appearance: none; border: 0; background: transparent; color: var(--haiyz-bar-muted); font: inherit; font-weight: 600; letter-spacing: .04em; min-height: 26px; padding: 0 9px; border-radius: calc(var(--haiyz-radius-sm) - 1px); cursor: pointer; text-decoration: none; line-height: 1; display: inline-flex; align-items: center; }
.haiyz-switch a:hover, .haiyz-switch button:hover { color: var(--haiyz-bar-ink); background: var(--haiyz-bar-hover); }
.haiyz-switch a[aria-current="true"] { background: var(--haiyz-primary-soft); color: var(--haiyz-primary-text); }
.haiyz-switch a:focus-visible, .haiyz-switch button:focus-visible { outline: 2px solid var(--haiyz-focus); outline-offset: 1px; }
.haiyz-switch button[data-theme-toggle] { width: 26px; padding: 0; justify-content: center; }
.haiyz-switch button[data-theme-toggle] svg { width: 14px; height: 14px; }
/* the icon shows the theme you would switch TO: a moon on light, a sun on dark */
.haiyz-switch button[data-theme-toggle] .haiyz-ico-sun { display: none; }
html[data-theme="dark"] .haiyz-switch button[data-theme-toggle] .haiyz-ico-sun { display: block; }
html[data-theme="dark"] .haiyz-switch button[data-theme-toggle] .haiyz-ico-moon { display: none; }
