/* =================== Home "orbit" look (2026-11-26) ===================
   Every part only acts under its Look & feel switch (html.fx-<id>, src/modules/portal/look.js). Loaded after
   styles.css and login-orbit.css. Less motion on the device: nothing here moves (block at the end). */

/* ---------- appLogos: the app squares show the app's logo (Login & branding) ---------- */
.app-tile { position: relative; }
.app-tile .at-code { font-weight: inherit; }
.app-tile .at-logo, .app-tile .at-uat { display: none; }
html.fx-appLogos .app-tile.has-logo { background: var(--tb); color: #fff; }
html.fx-appLogos .app-tile.has-logo .at-code { display: none; }
html.fx-appLogos .app-tile.has-logo .at-logo { display: block; }
html.fx-appLogos .app-tile.has-logo .at-uat { display: block; position: absolute; right: -6px; bottom: -5px; padding: 0 4px; border-radius: 4px; background: var(--charcoal); color: #fff; font: 700 8px/13px var(--font, sans-serif); font-style: normal; letter-spacing: .03em; }
html.fx-appLogos .app-tile.sm.has-logo .at-uat, html.fx-appLogos .app-tile.xs.has-logo .at-uat { font-size: 6.5px; line-height: 11px; padding: 0 3px; right: -5px; bottom: -4px; }

/* ---------- homeOrbit: mini app orbit in the welcome banner ---------- */
/* With the orbit: greeting and numbers in a left column, the orbit on the right. */
.hello:has(> .hx-orbit) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; row-gap: 14px; align-items: center; }
.hello:has(> .hx-orbit) > .hx-orbit { grid-column: 2; grid-row: 1 / span 2; }
.hello:has(> .hx-orbit) > .stats { grid-column: 1; }
@media (max-width: 900px) { .hello:has(> .hx-orbit) { grid-template-columns: minmax(0, 1fr); } }
.hx-orbit { position: relative; width: 230px; height: 230px; flex: none; margin-block: -16px; z-index: 1; }
.hx-rings { position: absolute; inset: 0; width: 100%; height: 100%; }
.hx-rings circle { stroke: #9cc9ec; }
.hx-hub { position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px; }
.hx-ripple { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #38bdf8; opacity: 0; }
.hx-core { position: absolute; inset: 8px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 0 40px -6px #38bdf8; color: var(--charcoal); transition: transform .3s, box-shadow .3s; }
.hx-ring { position: absolute; inset: 22px; pointer-events: none; }
.hx-arm { position: absolute; inset: 0; transform: rotate(var(--a)); pointer-events: none; }
.hx-arm:hover, .hx-arm:focus-within { z-index: 5; }
.hx-spoke { position: absolute; left: 50%; top: 20px; bottom: calc(50% + 28px); width: 2px; margin-left: -1px; background: repeating-linear-gradient(to bottom, #9cc9ec 0 3px, transparent 3px 7px); }
.hx-spoke i { display: none; position: absolute; left: -2px; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 8px 2px #38bdf8; }
.hx-unarm { position: absolute; top: -18px; left: 50%; width: 36px; margin-left: -18px; transform: rotate(calc(-1 * var(--a))); }
.hx-chip { pointer-events: auto; }
.hx-mt { position: relative; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .5); background: var(--tb); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 18px -8px rgba(3, 105, 161, .5); transition: transform .2s; text-decoration: none; font-size: 11px; font-weight: 700; }
.hx-mt:hover, .hx-mt:focus-visible { transform: scale(1.15); }
.hx-mt:focus-visible { outline: 3px solid #0284c7; outline-offset: 2px; }
.hx-mt svg { display: block; }
.hx-st { position: absolute; right: -3px; top: -3px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: #10b981; }
.hx-st.slow { background: #f59e0b; } .hx-st.down { background: #dc2626; }
.hx-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 4px 8px; border-radius: 7px; background: #0b2540; color: #fff; font-size: 11px; font-weight: 500; opacity: 0; transition: opacity .2s; pointer-events: none; }
.hx-mt:hover .hx-tip, .hx-mt:focus-visible .hx-tip { opacity: 1; }
.hx-arm:hover .hx-spoke, .hx-arm:focus-within .hx-spoke { background: repeating-linear-gradient(to bottom, var(--yellow) 0 4px, transparent 4px 7px); }
.hx-orbit:has(.hx-arm:hover) .hx-core, .hx-orbit:has(.hx-arm:focus-within) .hx-core { transform: scale(1.08); box-shadow: 0 0 50px -2px var(--yellow); }
/* the moving parts */
html.fx-homeOrbit .hx-ring { animation: hx-spin 48s linear infinite; }
html.fx-homeOrbit .hx-chip { animation: hx-spinr 48s linear infinite; }
html.fx-homeOrbit .hx-ring:hover, html.fx-homeOrbit .hx-ring:hover .hx-chip,
html.fx-homeOrbit .hx-ring:focus-within, html.fx-homeOrbit .hx-ring:focus-within .hx-chip { animation-play-state: paused; }
html.fx-homeOrbit .hx-ripple { animation: hx-ripple 3.6s ease-out infinite; }
html.fx-homeOrbit .hx-ripple:nth-child(2) { animation-delay: 1.2s; }
html.fx-homeOrbit .hx-ripple:nth-child(3) { animation-delay: 2.4s; }
html.fx-homeOrbit .hx-dash { animation: hx-dash 2s linear infinite; }
html.fx-homeOrbit .hx-spoke i { display: block; animation: hx-flow 2.6s ease-in-out infinite; animation-delay: var(--d); }
html.fx-homeOrbit .hx-arm:hover .hx-spoke i, html.fx-homeOrbit .hx-arm:focus-within .hx-spoke i { background: var(--yellow); box-shadow: 0 0 10px 3px rgba(248, 199, 0, .8); animation: hx-inflow .8s linear infinite; }
@keyframes hx-spin { to { transform: rotate(360deg); } }
@keyframes hx-spinr { to { transform: rotate(-360deg); } }
@keyframes hx-ripple { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes hx-dash { to { stroke-dashoffset: -40; } }
@keyframes hx-flow { 0% { top: 100%; opacity: 0; } 15%, 85% { opacity: 1; } 100% { top: 0; opacity: 0; } }
@keyframes hx-inflow { 0% { top: 0; opacity: 0; } 20%, 80% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* ---------- statRings + allClear: the banner numbers ---------- */
/* The banner keeps its round decoration inside without hiding the per-app lists that open below the numbers. */
html.fx-statRings .hello, html.fx-homeOrbit .hello { overflow: visible; z-index: 3; }
html.fx-statRings .hello::after, html.fx-homeOrbit .hello::after { inset: 0; width: auto; height: auto; border-radius: inherit; right: 0; top: 0; background: radial-gradient(circle at calc(100% - 50px) 20px, var(--bg-circle) 0 110px, transparent 111px); }
html.fx-homeOrbit .hello::after { background: none; }
.stat.hx-ringed { position: relative; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; padding-right: 50px; min-width: 150px; }
.stat.hx-ringed:focus-visible { outline: 3px solid #0284c7; outline-offset: 2px; }
.hx-donut { position: absolute; right: 10px; top: 50%; width: 30px; height: 30px; margin-top: -15px; }
.hx-donut circle { fill: none; stroke-width: 5; }
.hx-donut .hx-bg { stroke: #e6eef5; }
.hx-seg { transform: rotate(-90deg); transform-origin: 50% 50%; }
.hello.hx-ring-in .hx-donut { animation: hx-ring-in .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes hx-ring-in { from { transform: rotate(-120deg) scale(.4); opacity: 0; } }
.stat.hx-urgent { animation: hx-urgent 2.4s ease-in-out infinite; }
@keyframes hx-urgent { 0%, 100% { box-shadow: 0 0 0 1px rgba(198, 40, 40, .2); } 50% { box-shadow: 0 0 0 1px rgba(198, 40, 40, .35), 0 0 22px -4px rgba(198, 40, 40, .45); } }
.hx-split { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: 240px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: 0 14px 34px -12px rgba(20, 30, 40, .35); font-size: 12.5px; color: var(--ink); text-align: left; }
.hx-split-h { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.hx-split div { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.hx-split i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); flex: none; }
.hx-split div span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-split em { margin-left: auto; font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat.hx-ringed:hover .hx-split, .stat.hx-ringed:focus-visible .hx-split { display: block; }
.stat.hx-clear { position: relative; background: #e9f7ee; box-shadow: 0 0 0 1px #b9dfc6; padding-right: 50px; min-width: 170px; }
.stat.hx-clear .hx-clear-t { font-size: 14px; font-weight: 600; color: var(--ok, #1e7a3c); line-height: 1.3; margin-top: 2px; }
.hx-tick { position: absolute; right: 10px; top: 50%; width: 30px; height: 30px; margin-top: -15px; }
.hx-tick circle { fill: #2e9d5b; transform-origin: center; animation: hx-pop .35s ease-out both; }
.hx-tick path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: hx-draw .5s .25s ease-out forwards; }
@keyframes hx-pop { from { transform: scale(.4); opacity: 0; } }
@keyframes hx-draw { to { stroke-dashoffset: 0; } }

/* ---------- recentPlaces: Continue where you left off ---------- */
.hx-recent { margin-bottom: 22px; }
.hx-recent-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.hx-rc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; min-width: 0; transition: border-color .2s, transform .2s; }
.hx-rc:hover, .hx-rc:focus-visible { border-color: var(--yellow); transform: translateY(-1px); }
.hx-rc:focus-visible { outline: 3px solid #0284c7; outline-offset: 2px; }
.hx-rc-t { min-width: 0; display: grid; gap: 1px; }
.hx-rc-t b { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-rc-t span { font-size: 11.5px; color: var(--ink-mute); }
.hx-go { margin-left: auto; color: var(--ink-mute); flex: none; }

/* ---------- tilesRise: tiles float up in a wave, status lights ping ---------- */
.apps-grid.hx-rise .app-card { animation: hx-rise .55s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.apps-grid.hx-rise .live-dot.ok { animation: hx-ping 1s ease-out backwards; animation-delay: calc(var(--i, 0) * 60ms + .35s); }
@keyframes hx-rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes hx-ping { 0% { box-shadow: 0 0 0 0 rgba(46, 157, 91, .7); } 100% { box-shadow: 0 0 0 9px rgba(46, 157, 91, 0); } }

/* ---------- tileSpotlight: a soft yellow light follows the mouse (home-fx.js sets --sx / --sy) ---------- */
.hx-spot { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; display: none; }
html.fx-tileSpotlight .hx-spot { display: block; background: radial-gradient(240px circle at var(--sx, 50%) var(--sy, 50%), rgba(248, 199, 0, .10), transparent 60%); }
html.fx-tileSpotlight .hx-spot::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; background: radial-gradient(190px circle at var(--sx, 50%) var(--sy, 50%), rgba(248, 199, 0, .95), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
html.fx-tileSpotlight .apps-grid:hover .hx-spot { opacity: 1; }

/* ---------- tileFocus: the tile under the mouse stands out ---------- */
html.fx-tileFocus .apps-grid .app-card { transition: transform .22s cubic-bezier(.34, 1.4, .64, 1), box-shadow .22s, border-color .15s, opacity .25s, filter .25s; }
html.fx-tileFocus .main:has(.apps-grid .app-card:hover) .apps-grid .app-card:not(:hover) { opacity: .5; filter: saturate(.5); transition: transform .22s, box-shadow .22s, border-color .15s, opacity .35s .45s, filter .35s .45s; }

/* ---------- menuYellow: soft yellow sweeps in under the mouse in the left menu ---------- */
html.fx-menuYellow .side a:not(.on) { background-image: linear-gradient(#fff6d0, #fff6d0); background-repeat: no-repeat; background-size: 0% 100%; transition: background-size .25s ease-out, color .2s; }
html.fx-menuYellow .side a:not(.on):hover, html.fx-menuYellow .side a:not(.on):focus-visible { background-color: transparent; background-size: 100% 100%; color: var(--ink); }
html.fx-menuYellow .side-unit a:not(.on) { background-image: linear-gradient(rgba(248, 199, 0, .18), rgba(248, 199, 0, .18)); }
html.fx-menuYellow .side-unit a:not(.on):hover, html.fx-menuYellow .side-unit a:not(.on):focus-visible { color: #fff; }
html.fx-menuYellow .side a:focus-visible { outline: 2px solid var(--yellow); outline-offset: 1px; }

/* ---------- menuCollapse: the smaller menu (logos and icons only), wide screens ---------- */
.side-size { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (min-width: 901px) {
  .layout { transition: grid-template-columns .3s ease; }
  html.fx-menuCollapse .side-size { display: grid; place-items: center; width: 30px; height: 30px; margin: 0 0 6px auto; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer; }
  html.fx-menuCollapse .side-size:hover { border-color: var(--yellow); color: var(--ink); }
  html.fx-menuCollapse .side-size:focus-visible { outline: 3px solid #0284c7; outline-offset: 2px; }
  html.fx-menuCollapse .side-size svg { transition: transform .3s; }
  html.fx-menuCollapse.menu-small .layout { grid-template-columns: 72px minmax(0, 1fr); }
  html.fx-menuCollapse.menu-small .side { padding-inline: 8px; }
  html.fx-menuCollapse.menu-small .side-size { margin-inline: auto; }
  html.fx-menuCollapse.menu-small .side-size svg { transform: rotate(180deg); }
  html.fx-menuCollapse.menu-small .side .lbl, html.fx-menuCollapse.menu-small .side .eyebrow, html.fx-menuCollapse.menu-small .side .unit-gh { display: none; }
  html.fx-menuCollapse.menu-small .side-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
  html.fx-menuCollapse.menu-small .side-unit { padding: 8px 4px; }
  html.fx-menuCollapse.menu-small .side a { position: relative; justify-content: center; padding: 9px 0; gap: 0; }
  html.fx-menuCollapse.menu-small .side a .n { position: absolute; top: 2px; right: 4px; margin: 0; padding: 0 4px; font-size: 9px; line-height: 14px; }
  html.fx-menuCollapse.menu-small .side a > svg, html.fx-menuCollapse.menu-small .side a > .app-tile { animation: hx-slidein .3s ease-out both; }
}
@keyframes hx-slidein { from { opacity: 0; transform: translateX(-8px); } }

/* ---------- searchPalette: the search opens in the middle with a yellow glow (bsa-header.js adds .pal-open) ---------- */
.pal-back { display: none; }
@media (min-width: 901px) {
  html.fx-searchPalette bsa-header.pal-open .pal-back { display: block; position: fixed; inset: 0; z-index: 300; background: rgba(20, 30, 40, .35); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: hx-fade .18s ease-out; }
  html.fx-searchPalette bsa-header.pal-open .bh-search { position: fixed; top: 14vh; left: 50%; transform: translateX(-50%); width: min(620px, 92vw); max-width: none; margin: 0; z-index: 310; animation: hx-pal .22s cubic-bezier(.2, .8, .2, 1.2); }
  html.fx-searchPalette bsa-header.pal-open .bh-search input { background: #fff; color: var(--ink); font-size: 16px; padding: 14px 16px 14px 44px; border-radius: 14px; border-color: var(--yellow); box-shadow: 0 0 0 1px rgba(248, 199, 0, .6), 0 0 60px -10px rgba(248, 199, 0, .7), 0 30px 60px -20px rgba(20, 30, 40, .45); }
  html.fx-searchPalette bsa-header.pal-open .bh-search > svg { left: 16px; color: var(--ink-soft); opacity: 1; }
  html.fx-searchPalette bsa-header.pal-open .bh-search kbd { display: none; }
  html.fx-searchPalette bsa-header.pal-open .bh-search .pop { max-height: 60vh; overflow: auto; border-radius: 14px; }
  html.fx-searchPalette bsa-header.pal-open .pop-item.sel { background: #fff4c2; }
}
@keyframes hx-fade { from { opacity: 0; } }
@keyframes hx-pal { from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.97); } }

/* ---------- phones ---------- */
@media (max-width: 900px) { .hx-orbit { display: none; } }

/* ---------- less motion on the device: nothing here moves ---------- */
@media (prefers-reduced-motion: reduce) {
  .hx-orbit *, .hello .hx-donut, .stat.hx-urgent, .hx-tick *, .apps-grid.hx-rise .app-card, .apps-grid.hx-rise .live-dot, .side a > svg, .side a > .app-tile, .pal-back, .bh-search { animation: none !important; }
  .layout, .hx-spot, .apps-grid .app-card, .side a { transition: none !important; }
  .hx-tick path { stroke-dashoffset: 0; }
  html.fx-tileSpotlight .hx-spot { display: none; }
}
