/* ============================================================================
   AgudaOS · os.css — chrome, desktop, dock, panels, lock, phone (BRAND.md "Pulse"; tokens in os/tokens.css).

   RTL chrome decision (AgudaOS · BRAND.md §10.1). The OS is Hebrew-first, so "start" = right.
   - Menu bar: RIGHT (start) = system: AgudaOS mark, then the active app and its menus.
     LEFT (end) = status: tenant badge, desk switcher, search, control centre, notifications, date + time.
   - Window title bar: app tile, poster title and record crumb at the RIGHT. Caption buttons at the LEFT edge, like Windows
     in Hebrew: from the left edge close · maximize/restore · minimize (DOM order min, max, close as the last flex children).
   - Banners, notification centre and control centre open from the LEFT (the status side).
   - Snap layouts are mirrored: wide/tall zones on the right, zones numbered right to left.
   - Phone: back button at the right with a right-pointing arrow; back swipe from the right edge.

   Blur budget (BRAND §5.3): menu bar, dock and ONE focused surface (search OR control centre OR notification centre).
   Windows, flyouts, menus and widgets are always solid. Only transform/opacity animate.
   Everything classic (views inside windows, dialogs, toasts) is re-coloured by os/bridge.css.
   ========================================================================== */

/* ============================== base ============================== */
html, body { height: 100%; }
body.os-body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.55 var(--font-ui); overflow: hidden; font-synthesis: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
#os { position: fixed; inset: 0; overflow: hidden; overflow: clip; isolation: isolate; font-family: var(--font-ui); color: var(--text);
  letter-spacing: 0; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#os input, #os textarea, #os select, #os [contenteditable], #os .win-body, #os .os-papp-body { -webkit-user-select: text; user-select: text; }

/* chrome-only resets (never inside windows: views keep the classic styles) */
:where(.os-menubar, .os-dock-wrap, .os-panel, .os-menu, .os-snap, .os-pal-wrap, .os-sw-wrap, .os-sb, .os-papp-h, .os-lock, .os-banners,
  .win-head, .os-widgets, .os-ov, .os-sys-body, .os-boot) :where(button) {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
:where(.os-menubar, .os-dock-wrap, .os-panel, .os-menu, .os-snap, .os-pal-wrap, .os-sw-wrap, .os-sb, .os-papp-h, .os-lock, .os-banners,
  .win-head, .os-widgets, .os-ov, .os-sys-body) :where(h1, h2, h3, h4, p, ul, ol) { margin: 0; padding: 0; color: inherit; }
:where(.os-menubar, .os-dock-wrap, .os-panel, .os-menu, .os-pal-wrap, .os-sw-wrap, .os-sb, .os-papp-h, .os-lock, .os-banners, .win-head,
  .os-widgets, .os-ov, .os-sys-body, .os-snap, .os-tip, .os-full-pill) :where(button, [role="option"], [tabindex]):focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
#os svg.i { width: 1em; height: 1em; }
.os-code { font-family: var(--font-mono); font-stretch: 80%; font-weight: 500; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.poster { font-family: var(--font-display); font-weight: 400; line-height: 1; letter-spacing: 0; }
#os kbd { font: 500 11px/1 var(--font-mono); font-stretch: 80%; direction: ltr; unicode-bidi: isolate; display: inline-flex; align-items: center; gap: 2px;
  padding: 3px 6px; border-radius: var(--r-xs); background: var(--surface-3); color: var(--text-2); box-shadow: inset 0 -1px 0 var(--line-strong); }
.os-scroll { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
#os ::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

/* ============================== wallpaper ============================== */
.os-wp { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: linear-gradient(200deg, var(--wp-1), var(--wp-2)); }
.os-wp canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ============================== mark · wordmark · ביט ============================== */
.os-mark { display: block; width: 100%; height: 100%; }
.os-wmark { display: inline-flex; align-items: center; gap: .14em; font-family: var(--font-display); line-height: 1; white-space: nowrap; direction: rtl; }
.os-wmark .os { font-size: .5em; background: var(--volt); color: var(--ink); border-radius: 999px; padding: .08em .38em .14em; direction: ltr; line-height: 1; }
.os-bit { display: block; width: 100%; height: 100%; overflow: visible; }
.os-bitbox { display: inline-block; flex: none; width: 44px; height: 44px; }
.os-bitbox.sm { width: 28px; height: 28px; }
.bit-idle .bit-b, .bit-quiet .bit-b { transform-origin: 48px 48px; animation: os-breathe 4s ease-in-out infinite; }
@keyframes os-breathe { 50% { transform: scale(1.02); } }
.bit-listen .lv, .bit-quiet .lv { transform-box: fill-box; transform-origin: center; animation: os-meter 1s ease-in-out infinite alternate; }
.bit-listen .lv2, .bit-quiet .lv2 { animation-delay: -.33s; } .bit-listen .lv3, .bit-quiet .lv3 { animation-delay: -.66s; }
@keyframes os-meter { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
.bit-think .bit-b { transform-origin: 48px 48px; animation: os-halfturn 1.1s var(--spring-pop) infinite; }
@keyframes os-halfturn { from { transform: rotate(0); } to { transform: rotate(180deg); } }
.bit-dnd { opacity: .8; }

/* ============================== app tiles (squircle · domain colour · pulse spot) ============================== */
.os-tile { --tile-bg: #4D38EF; --tile-fg: #F9FAFE; --tile-spot: #D0FF48; --tile-ring: transparent; width: 44px; height: 44px; flex: none; display: block; overflow: visible; color: var(--tile-fg); }
.os-tile .tb { fill: var(--tile-bg); transition: fill .2s ease; }
.os-tile .tr { fill: none; stroke: var(--tile-ring); stroke-width: 2; }
.os-tile .tg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.os-tile .tg .s { fill: var(--tile-spot); stroke: none; }
.t-ultra { --tile-bg: #4D38EF; --tile-fg: #F9FAFE; --tile-spot: #D0FF48; }
.t-ink { --tile-bg: #0E0D1E; --tile-fg: #F9FAFE; --tile-spot: #D0FF48; --tile-ring: rgba(249,250,254,.16); }
.t-volt { --tile-bg: #D0FF48; --tile-fg: #0E0D1E; --tile-spot: #4D38EF; --tile-ring: rgba(14,13,30,.12); }
.t-paper { --tile-bg: #F9FAFE; --tile-fg: #0E0D1E; --tile-spot: #4D38EF; --tile-ring: rgba(14,13,30,.12); }
.t-soon { --tile-bg: var(--surface-3); --tile-fg: var(--text-3); --tile-ring: var(--line); }
.t-soon .tg .s { fill: none; stroke: var(--text-3); stroke-width: 1.2; }
.os-tile.xs { width: 20px; height: 20px; } .os-tile.sm { width: 28px; height: 28px; } .os-tile.md { width: 36px; height: 36px; }
.os-tile.lg { width: 48px; height: 48px; } .os-tile.xl { width: 60px; height: 60px; }
.os-tile-mark { display: block; flex: none; }
/* quiet mode (Studio graft): neutral container, Ink icon, the spot keeps the domain colour */
:root[data-quiet] .os-tile:not(.t-soon) { --tile-bg: var(--surface); --tile-fg: var(--text); --tile-ring: var(--line-strong); }
:root[data-quiet] .t-ultra, :root[data-quiet] .t-paper { --tile-spot: var(--accent); }
:root[data-quiet] .t-volt { --tile-spot: var(--pulse-ink); }
:root[data-quiet] .t-ink { --tile-spot: var(--text-2); }
.os-soon-tag { position: absolute; top: -6px; inset-inline-end: -8px; height: 17px; padding: 0 6px; border-radius: 999px; background: var(--surface); color: var(--text-2);
  font: 600 9.5px/17px var(--font-ui); box-shadow: 0 0 0 1px var(--line-strong); white-space: nowrap; pointer-events: none; }
.os-badge { position: absolute; top: 4px; left: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--pulse); color: var(--on-pulse);
  font: 800 11px/20px var(--font-ui); text-align: center; box-shadow: 0 0 0 1.5px var(--ink-ring), 0 0 0 3px var(--gap); direction: ltr; font-variant-numeric: tabular-nums; pointer-events: none; }
.os-badge:empty { display: none; }

/* ============================== menu bar (34 px) ============================== */
.os-menubar { position: absolute; z-index: 9700; top: 0; left: 0; right: 0; height: calc(var(--menubar-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  padding-inline: calc(8px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-left)); display: flex; align-items: center; gap: 2px; color: var(--text);
  font: 500 13.5px/1 var(--font-ui); background: var(--menubar); -webkit-backdrop-filter: var(--blur-bar); backdrop-filter: var(--blur-bar);
  box-shadow: 0 1px 0 var(--bar-stroke); transition: transform .32s var(--ease-out); }
.mb-item { height: 26px; padding: 0 9px; border-radius: 8px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--text-2);
  transition: background-color var(--dur-1) ease, color var(--dur-1) ease; }
@media (hover: hover) and (pointer: fine) { .mb-item:hover { background: var(--hover); color: var(--text); } }
.mb-item[aria-expanded="true"] { background: var(--press); color: var(--text); }
.mb-sys { width: 34px; padding: 0; justify-content: center; }
.mb-sys .os-mark { width: 20px; height: 20px; transition: transform var(--dur-3) var(--spring-pop); }
.mb-sys.turn .os-mark { transform: rotate(180deg); }
.mb-menus { display: flex; align-items: center; gap: 1px; min-width: 0; }
.mb-app { font-weight: 800; color: var(--text); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.mb-app-menus { display: flex; align-items: center; gap: 1px; }
.mb-spacer { flex: 1; min-width: 8px; }
.mb-status { display: flex; align-items: center; gap: 2px; min-width: 0; }
.mb-ic { width: 32px; padding: 0; justify-content: center; position: relative; }
.mb-ic svg.i { width: 17px; height: 17px; }
.mb-tenant { height: 26px; padding: 0 10px 0 12px; border-radius: 999px; background: var(--hover); display: inline-flex; align-items: center; gap: 8px;
  font: 600 12.5px/1 var(--font-ui); color: var(--text); white-space: nowrap; min-width: 0; max-width: 280px; flex: 0 1 auto;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tenant-ink-cur) 22%, transparent); }
@media (hover: hover) and (pointer: fine) { .mb-tenant:hover { background: var(--press); } }
.mb-tenant .nm { overflow: hidden; text-overflow: ellipsis; }
.mb-tenant .nm-short { display: none; }
.os-tlogo { display: block; flex: none; object-fit: contain; }
.mb-tenant .os-tlogo { width: 16px; height: 16px; }
.mb-desk { font-weight: 600; color: var(--text); gap: 6px; padding: 0 8px 0 10px; }
.mb-desk .os-tile { width: 18px; height: 18px; }
.mb-desk svg.i { width: 13px; height: 13px; color: var(--text-3); }
.mb-div { width: 1px; height: 16px; background: var(--line-strong); margin: 0 6px; flex: none; }
.os-cnt { position: absolute; top: 1px; left: 2px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px; background: var(--pulse); color: var(--on-pulse);
  font: 800 9.5px/15px var(--font-ui); text-align: center; box-shadow: 0 0 0 1.5px var(--ink-ring); direction: ltr; }
.mb-clock { gap: 8px; color: var(--text); }
.mb-clock .dt { color: var(--text-2); }
.mb-clock .os-code { font-size: 12.5px; font-weight: 600; }

/* dropdown + context menus (solid, e4) */
.os-menu { position: fixed; z-index: 9820; min-width: 236px; max-width: min(360px, calc(100vw - 12px)); max-height: calc(100vh - 48px); overflow: auto; padding: 6px; border-radius: 14px;
  background: var(--flyout); color: var(--text); box-shadow: var(--flyout-shadow), 0 0 0 1px var(--win-stroke); font: 500 13.5px/1 var(--font-ui); }
.os-menu[hidden] { display: none; }
.os-menu [role^="menuitem"] { width: 100%; min-height: 32px; padding: 0 10px; border-radius: 8px; display: flex; align-items: center; gap: 10px; text-align: start; color: var(--text); }
.os-menu [role^="menuitem"]:hover, .os-menu [role^="menuitem"]:focus-visible { background: var(--accent-tint); outline: none; }
.os-menu [role^="menuitem"][aria-disabled="true"] { color: var(--text-3); pointer-events: none; }
.os-mi-ico { width: 18px; color: var(--text-2); display: grid; place-items: center; flex: none; }
.os-mi-ico svg { width: 16px; height: 16px; }
.os-mi-ico .os-tile { width: 18px; height: 18px; }
.os-menu [aria-checked="true"] .os-mi-ico { color: var(--accent); }
.os-mi-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-menu .os-mi-key { background: none; box-shadow: none; padding: 0; color: var(--text-3); }
.os-mi-chk { color: var(--accent); display: grid; place-items: center; }
.os-mi-chk svg { width: 15px; height: 15px; }
.os-menu hr { border: 0; height: 1px; background: var(--line); margin: 5px 8px; }
.os-mi-h { font: 700 11.5px/1 var(--font-ui); color: var(--text-3); padding: 9px 10px 6px; }

/* ============================== dock (floating pill, 76 px) ============================== */
.os-dock-wrap { position: absolute; z-index: 9600; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; justify-content: center; pointer-events: none;
  transition: transform .32s var(--ease-out); }
.os-dock { pointer-events: auto; position: relative; height: var(--dock-h); border-radius: 999px; padding: 0 12px; display: flex; align-items: stretch; gap: 2px;
  background: var(--dock); -webkit-backdrop-filter: var(--blur-bar); backdrop-filter: var(--blur-bar); box-shadow: var(--bar-shadow), 0 0 0 1px var(--bar-stroke), inset 0 1px 0 var(--bar-hi); max-width: calc(100vw - 24px); overflow: visible; }
.dk, .dk-sys, .dk-sep { flex-shrink: 0; }
.dk { position: relative; width: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 18px; color: var(--text-2); }
.dk .os-tile { width: 44px; height: 44px; transition: transform var(--dur-1) var(--ease-out); }
.dk-l { font: 500 11px/1.1 var(--font-ui); white-space: nowrap; max-width: 62px; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) and (pointer: fine) { .dk:hover .os-tile { transform: translateY(-2px); } }
.dk:active .os-tile { transform: scale(.93); }
.dk::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 99px; background: var(--text-3); opacity: 0;
  transition: opacity .2s ease, width .24s var(--spring-win), margin .24s var(--spring-win), background-color .2s ease; }
.dk.running::after { opacity: 1; }
.dk.on::after { opacity: 1; width: 18px; margin-left: -9px; background: var(--accent); }
.dk.on .dk-l { color: var(--text); font-weight: 700; }
.dk.minimized::after { background: transparent; box-shadow: inset 0 0 0 1px var(--text-3); }
.dk .os-soon-tag { top: 2px; inset-inline-end: 0; }
.dk-run { display: contents; }
.dk-sep { width: 1px; margin: 14px 6px 20px; background: var(--line-strong); flex: none; }
.dk-sys { width: 80px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 9px; gap: 6px; position: relative; color: var(--text); }
.os-sysbtn { width: 60px; height: 60px; margin-top: -26px; display: block; filter: drop-shadow(0 10px 16px rgba(77,56,239,.42)) drop-shadow(0 2px 3px rgba(14,13,30,.22));
  transition: transform var(--dur-1) var(--ease-out); }
.os-sysbtn .os-mark { transition: transform var(--dur-3) var(--spring-pop); }
.dk-sys.on .os-sysbtn .os-mark { transform: rotate(180deg); }
.dk-sys .halo { position: absolute; top: -32px; left: 50%; width: 72px; height: 72px; margin-left: -36px; border-radius: 30%; box-shadow: 0 0 0 2px color-mix(in srgb, var(--pulse) 72%, transparent);
  opacity: .7; pointer-events: none; }
:root[data-quiet] .dk-sys .halo { opacity: 0; }
.dk-sys .dk-l { font-weight: 700; color: var(--text); }
@media (hover: hover) and (pointer: fine) { .dk-sys:hover .os-sysbtn { transform: translateY(-2px); } }
.dk-sys:active .os-sysbtn { transform: scale(.93); }
.os-dock .dk:focus-visible, .os-dock .dk-sys:focus-visible { outline-offset: -3px; border-radius: 16px; }
.os-dock.compact .dk { width: 52px; } .os-dock.compact .dk .os-tile { width: 36px; height: 36px; } .os-dock.compact .dk-l { font-size: 10px; max-width: 50px; } .os-dock.compact .dk-sys { width: 66px; }
.dk-bounce .os-tile { animation: os-bounce .52s var(--ease-out); }
@keyframes os-bounce { 35% { transform: translateY(-14px); } }

/* ============================== desktop: widgets ============================== */
.os-desk { position: absolute; inset: 0; z-index: 1; }
.os-desk:focus { outline: none; }
.os-widgets { position: absolute; z-index: 2; top: calc(var(--menubar-h) + 16px); inset-inline-start: 22px; width: 322px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  align-content: start; max-height: calc(100% - var(--menubar-h) - var(--dock-h) - 60px); overflow: hidden; transition: opacity .24s var(--ease-out), transform .24s var(--ease-out); }
.os-widgets.swap { opacity: 0; transform: translateY(8px); }
.os-wg { position: relative; border-radius: var(--r-xl); padding: 16px 18px; background: var(--widget); box-shadow: 0 0 0 1px var(--widget-stroke), 0 10px 30px -18px rgba(40,24,140,.35);
  color: var(--text); overflow: hidden; text-align: start; display: block; min-height: 0; min-width: 0; }
button.os-wg { cursor: pointer; transition: transform var(--dur-1) var(--ease-out); width: 100%; }
button.os-wg:active { transform: scale(.985); }
.os-wg.wide { grid-column: span 2; }
.wg-h { display: flex; align-items: center; gap: 8px; font: 600 13px/1.2 var(--font-ui); color: var(--text-2); }
.wg-h svg.i { width: 16px; height: 16px; color: var(--accent); }
.wg-big { display: block; font: 400 40px/1 var(--font-display); margin-top: 12px; direction: ltr; unicode-bidi: isolate; text-align: end; font-variant-numeric: tabular-nums; }
:root[dir="rtl"] .wg-big, #os .wg-big { text-align: right; }
.wg-sub { font: 400 12.5px/1.4 var(--font-ui); color: var(--text-3); margin-top: 6px; }
.wg-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.wg-row .wg-sub { margin-bottom: 4px; text-align: start; }
.os-hello { background: var(--ultra); color: #F9FAFE; box-shadow: 0 18px 40px -18px rgba(77,56,239,.7); padding: 18px 18px 14px; }
.os-hello .gh { display: flex; align-items: flex-start; gap: 12px; }
.os-hello .gh .os-bitbox { width: 48px; height: 48px; margin-top: 2px; }
.os-hello h3 { font: 400 40px/1.05 var(--font-display); color: #F9FAFE; }
.os-hello h3 .vcap { background: var(--volt); color: var(--ink); border-radius: 999px; padding: 0 .2em; display: inline-block; line-height: 1.08; }
.os-hello .today { margin-top: 12px; display: grid; gap: 4px; }
.os-hello .today button { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border-radius: 12px; text-align: start; font: 500 13px/1.3 var(--font-ui);
  color: #F9FAFE; background: rgba(249,250,254,.1); flex-direction: row-reverse; justify-content: flex-end; }
.os-hello .today button:hover { background: rgba(249,250,254,.18); }
.os-hello .today button span { flex: 1; }
.os-hello .today .go { width: 15px; height: 15px; opacity: .8; }
.os-hello .quiet-line { font: 400 13px/1.45 var(--font-ui); color: rgba(249,250,254,.86); padding: 4px 2px; }
.os-hello .ask { margin-top: 10px; height: 32px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; background: #F9FAFE; color: #3422BF; font: 700 12.5px/1 var(--font-ui); }
.os-hello .ask svg.i { width: 15px; height: 15px; }
#os .os-hello .ask kbd { background: rgba(52,34,191,.1); color: #3422BF; box-shadow: none; }
:root[data-quiet] .os-hello { background: var(--widget); color: var(--text); box-shadow: 0 0 0 1px var(--widget-stroke), 0 10px 30px -18px rgba(40,24,140,.35); }
:root[data-quiet] .os-hello h3 { color: var(--text); }
:root[data-quiet] .os-hello .today button { color: var(--text); background: var(--surface-2); }
:root[data-quiet] .os-hello .quiet-line { color: var(--text-2); }
:root[data-quiet] .os-hello .ask { background: var(--accent); color: var(--on-accent); }
:root[data-quiet] .os-hello h3 .vcap { background: none; color: inherit; padding: 0; }
.os-att { display: flex; flex-direction: column; margin-top: 8px; }
.os-att button { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-radius: 10px; text-align: start; font: 500 13px/1.35 var(--font-ui); }
.os-att button:hover { background: var(--hover); }
.os-att button + button { box-shadow: inset 0 1px 0 var(--line); }
.os-att .x { flex: 1; }
.os-att .go { width: 14px; height: 14px; color: var(--text-3); }
.os-att-n { min-width: 26px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--pulse); color: var(--on-pulse); font: 800 12px/22px var(--font-ui); text-align: center;
  box-shadow: 0 0 0 1.5px var(--ink-ring); direction: ltr; }
.os-top { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.os-top button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: 10px; text-align: start; }
.os-top button:hover { background: var(--hover); }
.os-top .x { flex: 1; min-width: 0; font: 600 13px/1.3 var(--font-ui); }
.os-top small { display: block; font: 400 12px/1.3 var(--font-ui); color: var(--text-3); }
.os-top .n { font: 500 12px/1 var(--font-ui); color: var(--text-2); white-space: nowrap; }
.os-wg-event b { display: block; font: 400 24px/1.1 var(--font-display); margin-top: 10px; }
.os-wg-event span { display: block; font: 400 12.5px/1.4 var(--font-ui); color: var(--text-3); margin-top: 6px; }

/* ============================== windows ============================== */
.os-wins { position: absolute; inset: 0; z-index: 5; pointer-events: none; transition: opacity .22s var(--ease-out), transform .26s var(--ease-out); }
.os-wins.desk-out { opacity: 0; transform: translateX(40px); }
.os-wins.desk-in { opacity: 0; transform: translateX(-40px); transition: none; }
.win { position: absolute; top: 0; left: 0; pointer-events: auto; transform-origin: 0 0; contain: layout style; display: flex; flex-direction: column; border-radius: var(--r-win);
  background: var(--win); color: var(--text); box-shadow: var(--win-shadow), 0 0 0 1px var(--win-stroke); transition: box-shadow .2s ease, border-radius .2s ease; }
.win.is-drag, .win.is-resize, .win.is-anim { will-change: transform; }
.win.off { box-shadow: var(--win-shadow-off), 0 0 0 1px var(--win-stroke-off); }
.win:focus, .win:focus-visible { outline: none; }
.win-clip { position: absolute; inset: 0; display: flex; flex-direction: column; border-radius: inherit; overflow: hidden; overflow: clip; contain: strict; background: var(--win); }
.win-clip::after { content: ""; position: absolute; inset: var(--titlebar-h) 0 0; background: var(--win-veil); opacity: 0; pointer-events: none; transition: opacity .18s ease; z-index: 8; }
.win.off .win-clip::after { opacity: 1; }
.ov-on .win .win-clip::after { opacity: 0; }
.win.is-min, .win.is-parked { visibility: hidden; pointer-events: none; }
.win-head { flex: none; height: var(--titlebar-h); display: flex; align-items: stretch; gap: 0; padding-inline-start: 12px; background: var(--win-bar); box-shadow: inset 0 -1px 0 var(--line);
  touch-action: none; cursor: default; position: relative; z-index: 9; }
.win-back { width: 34px; display: grid; place-items: center; color: var(--text-2); border-radius: 10px; margin: 5px 0 5px 4px; flex: none; }
.win-back[hidden] { display: none; }
.win-back:hover { background: var(--hover); color: var(--text); }
.win-back svg { width: 16px; height: 16px; }
.win-id { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto; }
.win-id .os-tile { width: 24px; height: 24px; transition: filter .2s ease, opacity .2s ease; }
.win-title { font: 400 22px/1 var(--font-display); white-space: nowrap; padding-top: 2px; color: var(--text); transition: color .2s ease; }
.win-sub { font: 700 13px/1.2 var(--font-ui); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.win-sub:not(:empty)::before { content: "· "; font-weight: 400; }
.win-sp { flex: 1; min-width: 8px; }
.win-tools { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; justify-content: flex-end; overflow: hidden; padding-inline: 6px 8px; }
.win-tools:empty { display: none; }
.win.w-narrow .win-sub { display: none; }
.win.w-tiny .win-tools { display: none; }
.win.off .win-title, .win.off .win-sub { color: var(--text-3); }
.win.off .win-id .os-tile { filter: grayscale(1); opacity: .7; }
/* caption buttons (Fluent graft, BRAND §10.3): 46×44, from the LEFT edge: close · maximize · minimize */
.os-caps { display: flex; align-self: stretch; flex: none; }
.os-cap { width: var(--cap-w); display: grid; place-items: center; color: var(--cap-ink); position: relative; transition: background-color var(--dur-1) ease, color var(--dur-1) ease; }
.os-cap svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) {
  .os-cap:hover { background: var(--cap-hover); color: var(--text); }
  .os-cap-close:hover { background: var(--cap-close); color: var(--on-cap-close); }
}
.os-cap:active { background: var(--cap-press); color: var(--text); }
.os-cap-close:active { background: var(--cap-close-press); color: var(--on-cap-close); }
.os-cap:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; border-radius: 6px; }
.win:not(.is-max):not(.is-full) .os-cap-close { border-top-left-radius: var(--r-win); }
@media (pointer: coarse) { .os-cap { width: 48px; } .win-head { height: 48px; } .win-clip::after { top: 48px; } }
.win-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; position: relative; background: var(--win); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.win-body:focus { outline: none; }
.win.is-resize .win-body { pointer-events: none; }
.rz { position: absolute; z-index: 12; touch-action: none; }
.rz-n { top: -4px; left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.rz-s { bottom: -4px; left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.rz-e { right: -4px; top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.rz-w { left: -4px; top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.rz-ne { right: -5px; top: -5px; width: 16px; height: 16px; cursor: nesw-resize; }
.rz-nw { left: -5px; top: -5px; width: 16px; height: 16px; cursor: nwse-resize; }
.rz-se { right: -5px; bottom: -5px; width: 16px; height: 16px; cursor: nwse-resize; }
.rz-sw { left: -5px; bottom: -5px; width: 16px; height: 16px; cursor: nesw-resize; }
@media (pointer: coarse) { .rz-n, .rz-s { height: 16px; } .rz-n { top: -8px; } .rz-s { bottom: -8px; } .rz-e, .rz-w { width: 16px; } .rz-e { right: -8px; } .rz-w { left: -8px; }
  .rz-ne, .rz-nw, .rz-se, .rz-sw { width: 26px; height: 26px; } }
/* maximized: the whole work area above the dock, square corners, no shadow, a bottom line only */
.win.is-max, .win.is-full { border-radius: 0; }
.win.is-max { box-shadow: 0 1px 0 var(--line); }
.win.is-full { box-shadow: none; }
.win.is-max .rz, .win.is-full .rz { display: none; }
.win.is-drag, .win.is-drag .win-head { cursor: grabbing; }
.os-ghost { position: absolute; left: 0; top: 0; border-radius: var(--r-win); pointer-events: none; opacity: 0; background: var(--snap-ghost);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent), 0 18px 40px -18px rgba(40,24,140,.35); transition: opacity var(--dur-1) ease; }
.os-ghost.on { opacity: 1; }
.os-ghost.max { border-radius: 0; }
/* the scanner is dark content: dim by darkening, not by a milky veil */
.win[data-app="scan"] .win-clip::after, .win[data-app="booth"] .win-clip::after { background: rgba(11,10,26,.3); }

/* snap layouts flyout */
.os-snap { position: fixed; z-index: 9790; padding: 12px; border-radius: var(--r-lg); background: var(--flyout); box-shadow: var(--flyout-shadow), 0 0 0 1px var(--win-stroke);
  display: grid; grid-template-columns: repeat(3, auto); gap: 10px; opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top left; pointer-events: none;
  transition: opacity .14s ease, transform .18s var(--ease-out); }
.os-snap[hidden] { display: none; }
.os-snap.on { opacity: 1; transform: none; pointer-events: auto; }
.os-fh { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font: 600 12px/1 var(--font-ui); color: var(--text-3); padding: 0 2px 2px; }
.os-snap-lay { position: relative; width: 96px; height: 62px; border-radius: 9px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.os-snap-z { position: absolute; border-radius: 5px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background-color .1s ease; }
.os-snap-z:hover, .os-snap-z:focus-visible { background: var(--accent); box-shadow: none; outline: none; }

/* tooltip (500 ms) */
.os-tip { position: fixed; z-index: 9870; pointer-events: none; background: var(--tooltip); color: var(--on-tooltip); border-radius: 9px; padding: 7px 10px; font: 500 12.5px/1 var(--font-ui);
  display: flex; gap: 8px; align-items: center; white-space: nowrap; box-shadow: 0 8px 20px -8px rgba(14,13,30,.45); opacity: 0; transform: translateY(-2px);
  transition: opacity var(--dur-2) ease, transform var(--dur-2) var(--ease-out); }
.os-tip[hidden] { display: none; }
.os-tip.on { opacity: 1; transform: none; }
#os .os-tip kbd { background: color-mix(in srgb, var(--on-tooltip) 16%, transparent); color: var(--on-tooltip); box-shadow: none; }

/* full screen / focus mode */
#os.full-mode .os-menubar { transform: translateY(-100%); }
#os.full-mode .os-dock-wrap { transform: translateY(calc(100% + 64px)); }
#os.full-mode.full-reveal .os-menubar { transform: none; box-shadow: 0 1px 0 var(--bar-stroke), 0 12px 30px -12px rgba(14,13,30,.3); }
.os-full-hot { position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 9710; display: none; }
#os.full-mode:not(.kiosk-mode) .os-full-hot { display: block; }
.os-full-pill { position: absolute; z-index: 9720; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); height: 34px; padding: 0 16px; border-radius: 999px;
  background: var(--tooltip); color: var(--on-tooltip); font: 600 13px/34px var(--font-ui); display: flex; gap: 8px; align-items: center; box-shadow: 0 12px 30px -10px rgba(14,13,30,.5); pointer-events: none; }
.os-full-pill[hidden] { display: none; }
#os .os-full-pill kbd { background: color-mix(in srgb, var(--on-tooltip) 16%, transparent); color: var(--on-tooltip); box-shadow: none; }
.kiosk-mode .os-widgets { visibility: hidden; }

/* overview (מבט־על) */
.os-ov { position: absolute; inset: 0; z-index: 4; background: var(--overview-dim); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease-out); }
.ov-on .os-ov { opacity: 1; pointer-events: auto; }
.os-ov-head { position: absolute; top: calc(var(--menubar-h) + 18px); left: 0; right: 0; text-align: center; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.os-ov-head .poster { font-size: 44px; }
.os-ov-head p { font: 500 13px/1.4 var(--font-ui); color: var(--text-2); }
.os-ov-desks { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.os-ov-desks[hidden] { display: none; }
.os-ov-desks button { height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font: 600 12.5px/1 var(--font-ui); display: inline-flex;
  align-items: center; gap: 7px; color: var(--text-2); }
.os-ov-desks button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.os-ov-desks .n { font: 500 11px/1 var(--font-mono); font-stretch: 80%; opacity: .8; }
.os-ov-label { position: absolute; z-index: 9650; height: 28px; padding: 0 12px 0 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; background: var(--flyout); color: var(--text);
  font: 600 12.5px/1 var(--font-ui); box-shadow: var(--flyout-shadow), 0 0 0 1px var(--win-stroke); transform: translateX(-50%); opacity: 0; transition: opacity .2s ease; pointer-events: none; white-space: nowrap; }
.os-ov-label .os-tile { width: 20px; height: 20px; }
.ov-on .os-ov-label { opacity: 1; }
.ov-on .win { cursor: pointer; }
.ov-on .win .win-clip { pointer-events: none; }
.ov-on .win .rz { display: none; }
.ov-on .win.ov-hot { box-shadow: var(--win-shadow), 0 0 0 3px var(--accent); }
.ov-on .win.is-min { visibility: visible; pointer-events: auto; }
.os-ov-empty { position: absolute; inset: 0; display: grid; place-items: center; font: 500 15px/1.5 var(--font-ui); color: var(--text-2); pointer-events: none; }

/* ============================== panels: notification + control centre (the one blurred surface) ============================== */
.os-panel { position: absolute; z-index: 9800; border-radius: var(--r-lg); background: var(--panel); -webkit-backdrop-filter: var(--blur-panel); backdrop-filter: var(--blur-panel); color: var(--text);
  box-shadow: var(--panel-shadow), 0 0 0 1px var(--panel-stroke); }
.os-panel[hidden] { display: none; }
.os-nc { top: calc(var(--menubar-h) + 8px); left: 10px; width: 380px; max-height: calc(100% - var(--menubar-h) - 110px); display: flex; flex-direction: column; overflow: hidden; transform-origin: top left; }
.os-nc-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 8px; }
.os-nc-h .poster { font-size: 30px; flex: 1; }
.os-nc-bit { margin: 0 12px 10px; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); display: flex; gap: 12px; align-items: flex-start;
  font: 400 13px/1.45 var(--font-ui); color: var(--text-2); }
.os-nc-bit .os-bitbox { width: 38px; height: 38px; }
.os-nc-bit-x { flex: 1; min-width: 0; }
.os-nc-bit b { color: var(--text); font-weight: 700; }
.os-acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.os-nc-list { flex: 1; padding: 0 10px 12px; }
.os-nc-g { font: 700 12px/1 var(--font-ui); color: var(--text-3); padding: 12px 8px 8px; }
.os-ncard { width: 100%; display: flex; gap: 11px; align-items: flex-start; text-align: start; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line);
  margin-bottom: 8px; position: relative; }
.os-ncard:hover { background: color-mix(in srgb, var(--surface) 94%, var(--accent)); }
.os-ncard.tone-att { box-shadow: 0 0 0 1px var(--line), inset 3px 0 0 var(--warning); }
.os-nc-x { flex: 1; min-width: 0; }
.os-nc-t { font: 700 13.5px/1.3 var(--font-ui); display: block; }
.os-nc-b { font: 400 12.5px/1.45 var(--font-ui); color: var(--text-2); margin-top: 2px; display: block; }
.os-nc-m { font: 500 11.5px/1.2 var(--font-ui); color: var(--text-3); display: block; margin-bottom: 5px; }
.os-nc-m b { color: var(--text-2); font-weight: 600; }
.os-ncard.unread::before { content: ""; position: absolute; top: 14px; left: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--pulse); box-shadow: 0 0 0 1.5px var(--ink-ring); }
.os-nc-empty { padding: 26px 20px; text-align: center; color: var(--text-3); font: 500 13px/1.5 var(--font-ui); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.os-nc-empty .os-bitbox { width: 56px; height: 56px; }
.os-cc { top: calc(var(--menubar-h) + 8px); left: 120px; width: 356px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; transform-origin: top left; }
.os-cc-tile { border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 12px; display: flex; align-items: center; gap: 10px; text-align: start; min-height: 64px; }
.os-cc-tile:disabled { opacity: .6; cursor: not-allowed; }
.os-cc-tile.wide { grid-column: span 2; }
.os-cc-tile.col { flex-direction: column; align-items: stretch; gap: 10px; }
.os-cc-ic { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; transition: background-color .16s ease, color .16s ease; }
.os-cc-ic svg.i { width: 18px; height: 18px; }
.os-cc-tile[aria-pressed="true"] .os-cc-ic { background: var(--accent); color: var(--on-accent); }
.os-cc-x b { display: block; font: 600 13px/1.25 var(--font-ui); }
.os-cc-x small { display: block; font: 400 11.5px/1.3 var(--font-ui); color: var(--text-3); margin-top: 2px; }
.os-cc-lbl { display: flex; align-items: center; gap: 8px; font: 600 13px/1 var(--font-ui); }
.os-cc-lbl svg.i { color: var(--accent); width: 17px; height: 17px; }
.os-cc-lbl .end { margin-inline-start: auto; font: 400 11.5px/1 var(--font-ui); color: var(--text-3); }
.os-cc-foot { grid-column: span 2; display: flex; gap: 8px; }
.os-cc-foot button { flex: 1; height: 38px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font: 600 12.5px/1 var(--font-ui); display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; }
.os-cc-foot button[hidden] { display: none; }
.os-cc-foot button:hover { background: var(--surface-2); }
.os-cc-foot svg.i { width: 15px; height: 15px; }
.os-seg { position: relative; display: inline-flex; height: 34px; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface-3); }
.os-seg.full { display: flex; width: 100%; }
.os-seg button { position: relative; flex: 1; padding: 0 13px; border-radius: 999px; font: 600 12.5px/1 var(--font-ui); color: var(--text-2); display: inline-flex; align-items: center;
  justify-content: center; gap: 6px; white-space: nowrap; transition: color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.os-seg button[aria-checked="true"] { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(14,13,30,.16), 0 0 0 1px var(--line); }

/* banners: from the top-LEFT (status side) */
.os-banners { position: absolute; z-index: 9850; top: calc(var(--menubar-h) + 10px); left: 12px; width: 370px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.os-banner { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px 12px 12px; border-radius: 18px; background: var(--flyout); text-align: start; width: 100%;
  box-shadow: var(--flyout-shadow), 0 0 0 1px var(--win-stroke); position: relative; cursor: pointer; }
.os-b-c { flex: 1; min-width: 0; }
.os-b-m { font: 500 11.5px/1 var(--font-ui); color: var(--text-3); display: flex; gap: 6px; margin-bottom: 5px; }
.os-b-m b { color: var(--text-2); font-weight: 600; }
.os-b-t { font: 700 13.5px/1.3 var(--font-ui); display: block; }
.os-b-b { font: 400 12.5px/1.45 var(--font-ui); color: var(--text-2); margin-top: 2px; display: block; }
.os-b-close { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 11px; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(14,13,30,.2); opacity: 0; transition: opacity var(--dur-1) ease; }
.os-b-close svg.i { width: 12px; height: 12px; }
.os-banner:hover .os-b-close, .os-banner:focus-within .os-b-close { opacity: 1; }

/* buttons of the chrome */
.os-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 999px; font: 600 13.5px/1 var(--font-ui); white-space: nowrap;
  transition: transform var(--dur-1) var(--ease-out), background-color .16s ease, color .16s ease, box-shadow .16s ease; }
.os-btn:active:not(:disabled) { transform: scale(.97); }
.os-btn-p { background: var(--accent); color: var(--on-accent); }
.os-btn-p:hover { background: var(--accent-hover); }
.os-btn-s { background: var(--surface-3); color: var(--text); }
.os-btn-g { color: var(--accent); padding: 0 12px; }
.os-btn-g:hover { background: var(--accent-tint); }
.os-btn:disabled { background: var(--surface-3); color: var(--text-3); cursor: not-allowed; }
.os-btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.os-btn.lg { height: 46px; padding: 0 22px; font-size: 15px; }
.os-btn.is-busy { opacity: .7; pointer-events: none; }
.os-ibtn { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); flex: none; transition: background-color var(--dur-1) ease, color var(--dur-1) ease; position: relative; }
.os-ibtn:hover { background: var(--hover); color: var(--text); }
.os-ibtn svg.i { width: 18px; height: 18px; }

/* ============================== search palette + switcher ============================== */
.os-pal-wrap { position: absolute; inset: 0; z-index: 9900; display: flex; justify-content: center; align-items: flex-start; padding-top: max(11vh, 60px); background: color-mix(in srgb, var(--scrim) 36%, transparent); }
.os-pal-wrap[hidden] { display: none; }
.os-pal { width: min(680px, calc(100% - 32px)); max-height: min(640px, calc(100% - 120px)); display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden;
  background: color-mix(in srgb, var(--panel-solid) 95%, transparent); -webkit-backdrop-filter: var(--blur-panel); backdrop-filter: var(--blur-panel); box-shadow: var(--panel-shadow), 0 0 0 1px var(--panel-stroke); }
.os-pal-in { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 62px; box-shadow: inset 0 -1px 0 var(--line); flex: none; }
.os-pal-ic { width: 22px; height: 22px; color: var(--accent); display: grid; place-items: center; flex: none; }
.os-pal-ic svg.i { width: 20px; height: 20px; }
.os-pal-in input { flex: 1; height: 100%; border: 0; background: none; font: 500 18px/1 var(--font-ui); color: var(--text); outline: none; min-width: 0; }
.os-pal-in input::placeholder { color: var(--text-3); font-weight: 400; }
.os-pal-res { flex: 1; min-height: 0; padding: 8px 10px 12px; }
.os-pal-g { font: 700 12px/1 var(--font-ui); color: var(--text-3); padding: 12px 10px 8px; }
.os-pal-sub { font: 600 11.5px/1 var(--font-ui); color: var(--text-3); padding: 8px 12px 4px; }
.os-pal-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; padding: 0 2px; }
.os-pal-app { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 4px 9px; border-radius: 14px; font: 600 12px/1.2 var(--font-ui); text-align: center; color: var(--text);
  cursor: pointer; position: relative; }
.os-pal-app .os-soon-tag { top: 4px; inset-inline-end: 6px; }
.os-pal-app[aria-selected="true"], .os-pal-app:hover { background: var(--accent-tint); }
.os-pal-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 10px; border-radius: 14px; cursor: pointer; }
.os-pal-row[aria-selected="true"] { background: var(--accent-tint); }
.os-pal-row:hover { background: var(--hover); }
.os-pal-row[aria-selected="true"]:hover { background: var(--accent-tint); }
.os-pr-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.os-pr-ic svg.i { width: 17px; height: 17px; }
.os-pr-t { font: 600 14px/1.3 var(--font-ui); display: block; }
.os-pr-s { font: 400 12.5px/1.3 var(--font-ui); color: var(--text-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-pr-x { flex: 1; min-width: 0; }
.os-pr-k { font: 500 12px/1 var(--font-ui); color: var(--text-3); opacity: 0; display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.os-pal-row[aria-selected="true"] .os-pr-k { opacity: 1; }
.os-pal-none, .os-pal-wait { padding: 20px 16px; text-align: center; color: var(--text-2); font: 500 14px/1.5 var(--font-ui); }
.os-pal-wait { padding: 8px 12px; text-align: start; color: var(--text-3); font-size: 13px; }
.os-pal-foot { display: flex; gap: 16px; align-items: center; padding: 10px 18px; font: 500 12px/1 var(--font-ui); color: var(--text-3); box-shadow: inset 0 1px 0 var(--line); flex: none; flex-wrap: wrap; }
.os-pal-foot span { display: inline-flex; gap: 6px; align-items: center; }
.os-sw-wrap { position: absolute; inset: 0; z-index: 9950; display: grid; place-items: center; pointer-events: none; }
.os-sw-wrap[hidden] { display: none; }
.os-sw { display: flex; gap: 8px; padding: 14px; border-radius: 26px; background: var(--flyout); box-shadow: var(--flyout-shadow), 0 0 0 1px var(--win-stroke); max-width: calc(100% - 40px);
  overflow: hidden; pointer-events: auto; }
.os-sw-item { width: 116px; padding: 14px 8px 10px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; gap: 9px; font: 600 12.5px/1.2 var(--font-ui); text-align: center; cursor: pointer; }
.os-sw-item.on { background: var(--accent-tint); box-shadow: inset 0 0 0 2px var(--accent); }
.os-sw-item small { font: 400 11px/1.2 var(--font-ui); color: var(--text-3); }

/* ============================== system windows: soon · about · keys ============================== */
.os-sys-body { padding: 20px 22px 26px; }
.os-soon { display: flex; flex-direction: column; gap: 16px; }
.os-soon-hero { border-radius: 22px; padding: 20px 22px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); display: flex; gap: 16px; align-items: flex-start; }
.os-soon-hero .poster { font-size: 32px; margin-top: 8px; color: var(--text); }
.os-soon-hero h1:focus { outline: none; }
.os-soon-hero p { font: 400 13.5px/1.6 var(--font-ui); color: var(--text-2); max-width: 52ch; margin-top: 8px; }
.os-chip-soon { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--pulse); color: var(--on-pulse); font: 700 11.5px/1 var(--font-ui);
  box-shadow: 0 0 0 1px var(--ink-ring); }
.os-soon-foot { display: flex; align-items: center; gap: 10px; font: 500 12.5px/1.4 var(--font-ui); color: var(--text-3); }
.os-sys-body .muted, .os-soon .muted { color: var(--text-3); }
.os-about { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px 8px; text-align: center; }
.os-about-mk { width: 84px; height: 84px; display: block; }
.os-about-wm { font-size: 44px; margin-top: 4px; }
.os-about p { font: 400 13px/1.55 var(--font-ui); color: var(--text-2); }
.os-about-lic { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font: 600 12.5px/1 var(--font-ui); margin-top: 6px; }
.os-about-lic .os-tlogo { width: 18px; height: 18px; }
.os-about-fine { font-size: 11.5px !important; color: var(--text-3) !important; margin-top: 8px; }
.os-keys { display: grid; gap: 12px; }
.os-keys .muted { font: 400 12.5px/1.5 var(--font-ui); display: flex; align-items: center; gap: 6px; }
.os-kb { list-style: none; margin: 0; padding: 0; }
.os-kb li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 2px; font: 500 13.5px/1.3 var(--font-ui); }
.os-kb li + li { box-shadow: inset 0 1px 0 var(--line); }
.os-kb .k { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* ============================== boot + lock (BRAND §9.3) ============================== */
.os-boot { position: absolute; inset: 0; z-index: 10010; display: grid; place-items: center; align-content: center; gap: 26px;
  background: radial-gradient(70% 60% at 50% 40%, rgba(77,56,239,.34), transparent 70%), #0B0A1A; color: #F3F3F9; cursor: pointer; }
.os-boot[hidden] { display: none; }
.os-boot-mark { width: 132px; height: 132px; filter: drop-shadow(0 26px 50px rgba(77,56,239,.55)); }
.os-boot-mark .mk-f { transform-origin: 48px 48px; animation: os-fieldin .42s var(--spring-pop) .18s both; }
@keyframes os-fieldin { from { transform: scale(.6); opacity: 0; } }
.os-boot-mark .mk-d { stroke-dasharray: 60; stroke-dashoffset: 60; animation: os-draw .3s var(--ease-out) forwards; }
.os-boot-mark .mk-a, .os-boot-mark .mk-b { stroke-dasharray: 44; stroke-dashoffset: 44; animation: os-draw .34s var(--ease-out) .2s forwards; }
@keyframes os-draw { to { stroke-dashoffset: 0; } }
.os-boot-wm .os-wmark { font-size: 74px; color: #F3F3F9; animation: os-rise .28s var(--ease-out) .48s both; }
@keyframes os-rise { from { opacity: 0; transform: translateY(10px); } }
.os-loader { display: flex; gap: 8px; align-items: center; height: 44px; }
.os-loader i { width: 9px; border-radius: 99px; background: #A09CFF; transform-origin: center; animation: os-meter .5s ease-in-out infinite alternate; }
.os-loader i:nth-child(2) { animation-delay: -.1s; } .os-loader i:nth-child(3) { animation-delay: -.2s; } .os-loader i:nth-child(4) { background: #D0FF48; animation-delay: -.3s; }
.os-loader i:nth-child(5) { animation-delay: -.4s; } .os-loader i:nth-child(6) { animation-delay: -.2s; } .os-loader i:nth-child(7) { animation-delay: -.1s; }
.os-boot-hint { position: absolute; bottom: calc(40px + env(safe-area-inset-bottom)); font: 500 14px/1 var(--font-ui); color: #999AAB; display: flex; gap: 6px; align-items: center; }
#os .os-boot-hint kbd { background: rgba(243,243,249,.1); color: #D9D8EA; box-shadow: none; }
.os-boot.rm .os-boot-mark *, .os-boot.rm .os-boot-wm *, .os-boot.rm .os-loader i { animation: none !important; stroke-dashoffset: 0 !important; }

.os-lock { position: absolute; inset: 0; z-index: 10000; display: flex; flex-direction: column; align-items: center; cursor: default; overflow: auto; color: var(--text); background: var(--wp-1); }
.os-lock[hidden] { display: none; }
.os-lock-wp { position: fixed; inset: 0; width: 100%; height: 100%; }
.os-l-clock { position: relative; margin-top: max(7vh, 40px); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.os-l-bit { width: 40px; height: 40px; margin-bottom: 4px; }
.os-l-time { font-size: clamp(64px, 10vw, 96px); font-weight: 600; line-height: 1; }
.os-l-date { font: 500 17px/1.4 var(--font-ui); color: var(--text-2); padding: 0 16px; }
.os-signin { position: relative; margin: max(4vh, 24px) 0 90px; width: min(520px, calc(100% - 32px)); border-radius: 26px; background: var(--surface); box-shadow: var(--win-shadow), 0 0 0 1px var(--win-stroke);
  padding: 22px 24px; display: grid; gap: 14px; }
.os-tslot { border-radius: 16px; padding: 14px; display: flex; align-items: center; gap: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.os-tslot .os-tlogo { width: 56px; height: 56px; }
.os-tslot b { display: block; font: 700 18px/1.3 var(--font-ui); }
.os-tslot small { display: block; font: 400 13px/1.4 var(--font-ui); color: var(--text-3); margin-top: 2px; }
.os-staff { display: flex; align-items: center; gap: 12px; }
.os-staff b { display: block; font: 700 15px/1.3 var(--font-ui); }
.os-staff small { display: block; font: 400 12.5px/1.4 var(--font-ui); color: var(--text-3); }
.os-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 15px/1 var(--font-ui); flex: none; background: var(--accent-tint); color: var(--accent); }
.os-login { display: grid; gap: 12px; }
.os-lock.no-form .os-login { display: none; }
.os-l-resume { display: none; font: 500 13px/1.4 var(--font-ui); color: var(--text-3); text-align: center; }
.os-lock.no-form .os-l-resume { display: block; }
.os-fld { display: flex; flex-direction: column; gap: 6px; }
.os-fld label { font: 600 12.5px/1.2 var(--font-ui); color: var(--text-2); }
.os-inp { height: 42px; border-radius: var(--r-sm); padding: 0 12px; background: var(--surface); border: 0; box-shadow: inset 0 0 0 1.5px var(--control); color: var(--text); font: 400 15px/1 var(--font-ui);
  width: 100%; transition: box-shadow .14s ease; }
:root[data-theme="dark"] .os-inp { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .os-inp { background: var(--surface-2); } }
.os-inp:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px var(--accent-tint); }
.os-inp-row { display: flex; gap: 8px; align-items: center; }
.os-inp-row .os-ibtn { width: 42px; height: 42px; background: var(--surface-3); }
.os-alert { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--danger-tint); color: var(--text); font: 500 13px/1.5 var(--font-ui); }
.os-alert[hidden] { display: none; }
.os-alert svg.i { width: 18px; height: 18px; color: var(--danger); flex: none; margin-top: 1px; }
.os-l-go { width: 100%; }
#os .os-l-go kbd { background: rgba(255,255,255,.18); color: inherit; box-shadow: none; }
.os-l-fine { font: 400 12px/1.5 var(--font-ui); color: var(--text-3); text-align: center; }
.os-powered { position: fixed; bottom: calc(22px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; font: 500 13px/1 var(--font-ui); color: var(--text-2); padding: 8px 14px;
  border-radius: 999px; background: color-mix(in srgb, var(--surface) 76%, transparent); }
.os-powered .os-mark { width: 20px; height: 20px; }
@media (max-height: 700px) { .os-l-clock { margin-top: 22px; } .os-l-bit { display: none; } .os-l-time { font-size: 64px; } .os-signin { margin-top: 16px; padding: 16px 18px; gap: 10px; } }

/* ============================== phone: springboard + full-screen app (< 700 px) ============================== */
.os-sb { position: absolute; inset: 0; z-index: 3; display: none; flex-direction: column; padding: calc(env(safe-area-inset-top) + 6px) 16px calc(env(safe-area-inset-bottom) + 122px); }
.phone-mode .os-sb { display: flex; }
.phone-mode .os-menubar, .phone-mode .os-dock-wrap, .phone-mode .os-widgets, .phone-mode .os-wins, .phone-mode .os-ov { display: none; }
.os-sb-status { height: 40px; display: flex; align-items: center; justify-content: space-between; color: var(--text); flex: none; }
.os-sb-status .os-code { font-size: 15px; font-weight: 600; }
.os-sb-tools { display: flex; gap: 4px; }
.os-sb-tools .os-ibtn { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.os-sb-scroll { flex: 1; min-height: 0; overflow: auto; margin: 0 -16px; padding: 6px 16px 22px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent); }
.os-sb-scroll::-webkit-scrollbar { display: none; }
.os-sb-w { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.os-sb-w .os-wg { padding: 13px 15px; }
.os-sb-w .wg-big { font-size: 30px; margin-top: 8px; }
.os-sb-w .os-hello { grid-column: span 2; }
.os-sb-w .os-hello h3 { font-size: 34px; }
.os-sb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 6px; margin-top: 20px; }
.os-sb-app { display: flex; flex-direction: column; align-items: center; gap: 7px; font: 500 12px/1.2 var(--font-ui); color: var(--text); text-align: center; position: relative; }
.os-sb-app .l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-sb-app .os-badge { top: -4px; left: calc(50% - 38px); }
.os-sb-app .os-soon-tag { top: -4px; inset-inline-end: 2px; }
.os-sb-dock { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 14px); transform: translateX(-50%); width: min(calc(100% - 24px), 390px); }
.os-sbd { height: 80px; border-radius: 999px; padding: 0 6px; display: flex; align-items: center; justify-content: space-between; background: var(--dock); -webkit-backdrop-filter: var(--blur-bar);
  backdrop-filter: var(--blur-bar); box-shadow: var(--bar-shadow), 0 0 0 1px var(--bar-stroke), inset 0 1px 0 var(--bar-hi); }
.os-sbd .dk { flex: 1; width: auto; }
.os-sbd .dk .os-tile { width: 48px; height: 48px; }
.os-sbd .dk-sys { flex: 1.1; width: auto; padding-bottom: 10px; }
.os-sbd .os-sysbtn { width: 64px; height: 64px; margin-top: -30px; }
.os-sbd .dk-sys .halo { top: -36px; width: 76px; height: 76px; margin-left: -38px; }
.os-papp { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; overflow: clip; background: var(--win); transform-origin: 0 0; touch-action: pan-y; }
.os-papp[hidden] { display: none; }
.os-papp:focus { outline: none; }
.os-papp-h { flex: none; min-height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0 12px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px;
  background: var(--win-bar); box-shadow: inset 0 -1px 0 var(--line); }
.os-papp-h .sp { flex: 1; }
.os-papp-back { height: 44px; padding: 0 6px 0 12px; border-radius: 22px; display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font: 600 15px/1 var(--font-ui); flex: none; }
.os-papp-back svg { width: 20px; height: 20px; }
.os-papp-tile .os-tile { width: 26px; height: 26px; }
.os-papp-title { font: 400 22px/1 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--text); }
.os-papp-tools { display: flex; gap: 6px; align-items: center; min-width: 0; order: 9; flex-basis: 100%; padding: 0 2px 10px; overflow-x: auto; scrollbar-width: none; }
.os-papp-tools:empty { display: none; }
.os-papp-h > .os-papp-back, .os-papp-h > .os-papp-tile, .os-papp-h > .os-papp-title { height: 52px; display: flex; align-items: center; }
.os-papp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; background: var(--win); }
.os-papp-body > .win-body { flex: 1; min-height: 0; }
.os-papp-home { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 6px); left: 50%; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 3px; background: var(--text);
  opacity: .5; z-index: 30; touch-action: none; }
.os-papp-home::before { content: ""; position: absolute; inset: -14px -20px; }
.os-papp-edge { position: absolute; top: 0; bottom: 0; right: 0; width: 18px; z-index: 31; touch-action: none; }
.phone-mode .os-banners { left: 10px; right: 10px; width: auto; top: calc(env(safe-area-inset-top) + 8px); }
.phone-mode.app-open .os-banners { top: calc(var(--papp-h, 52px) + 8px); }
.phone-mode .os-nc, .phone-mode .os-cc { left: 8px; right: 8px; width: auto; top: calc(env(safe-area-inset-top) + 8px); }
.phone-mode .os-cc { grid-template-columns: 1fr 1fr; }
.phone-mode .os-pal-wrap { padding-top: calc(env(safe-area-inset-top) + 12px); }
.phone-mode .os-pal-foot { display: none; }

/* ============================== reduced motion / transparency ============================== */
#os.rm *, #os.rm *::before, #os.rm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
#os.rm .os-menubar, #os.rm .os-dock-wrap, #os.rm .dk::after, #os.rm .os-wins { transition-duration: .12s !important; transition-timing-function: linear !important; }
@media (prefers-reduced-motion: reduce) {
  #os *, #os *::before, #os *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .os-menubar, .os-dock-wrap, .os-wins { transition-duration: .12s !important; }
}
@media (prefers-reduced-transparency: reduce) { .os-panel, .os-pal { background: var(--panel-solid); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .os-panel, .os-pal { background: var(--panel-solid); } }

/* ============================== responsive ============================== */
@media (max-width: 1280px) { .mb-tenant .nm-full { display: none; } .mb-tenant .nm-short { display: inline; } }
@media (max-width: 1100px) { .os-widgets { width: 290px; } }
@media (max-width: 960px) { .os-widgets { display: none; } }
@media (max-width: 900px) { .mb-app-menus, .mb-clock .dt { display: none; } }
@media (max-width: 760px) { .mb-desk .dl { display: none; } }

/* toasts from the admin kit sit above the dock */
body.os-body .toasts { inset-block-end: calc(12px + var(--dock-h) + 18px + env(safe-area-inset-bottom)); z-index: 9860; }
body.os-body:has(#os.phone-mode) .toasts { inset-block-end: calc(110px + env(safe-area-inset-bottom)); }
