/* ══ FLOATS — placement and look for site/float.js. ═════════════════════════
   Every .floatwrap / .floatband rule lives here, media queries included. Linked
   AFTER each page's inline <style>, so it wins on equal specificity; its class
   names are its own (fl-*) so index.html's TYPE B block cannot reach them.

   .floatband and .fl-item carry `display`, so neither may ever be hidden with
   the `hidden` attribute (buglog hidden-attribute-defeated-by-author-display-grid):
   the band is switched by [data-on], the items by being in the DOM or not. */

.floatwrap,.floatband{--fl-floor:rgba(0,0,0,.55); --fl-glow:rgba(242,242,239,.2)}
[data-theme="light"] .floatwrap,[data-theme="light"] .floatband{--fl-floor:rgba(14,14,16,.24)}

/* Position (centre, % of the stage), hero size, depth, band size. */
.fl-item[data-slot="0"]{--x:28%; --y:36%; --s:160px; --z:5; --b:112px}
.fl-item[data-slot="1"]{--x:72%; --y:26%; --s:112px; --z:3; --b:92px}
.fl-item[data-slot="2"]{--x:70%; --y:70%; --s:140px; --z:4; --b:104px}
.fl-item[data-slot="3"]{--x:38%; --y:80%; --s:96px;  --z:2; --b:88px}
.fl-item[data-slot="4"]{--x:52%; --y:18%; --s:90px;  --z:1; --b:100px}
.fl-item[data-slot="5"]{--x:50%; --y:50%; --s:90px;  --z:1; --b:96px}

.fl-item{position:relative; display:block; flex:0 0 auto; width:var(--s); height:var(--s);
  opacity:0; transition:opacity .28s ease; -webkit-user-select:none; user-select:none}
.fl-item.on{opacity:1}
.fl-img{position:relative; z-index:1; display:block; width:100%; height:100%; object-fit:contain;
  -webkit-user-drag:none}

/* Soft floor shadow in both themes; light glow behind the item in dark only.
   Attribute selectors, so the theme buttons change it live. */
.fl-item::after{content:""; position:absolute; z-index:0; left:16%; right:16%;
  bottom:-3%; height:12%; pointer-events:none;
  background:radial-gradient(closest-side,var(--fl-floor),transparent)}
[data-theme="dark"] [data-glow] .fl-item::before{content:""; position:absolute; z-index:0;
  inset:-12%; pointer-events:none;
  background:radial-gradient(closest-side,var(--fl-glow),transparent)}

.fl-cap{position:absolute; z-index:2; left:50%; bottom:2px; transform:translateX(-50%);
  font-family:"JetBrains Mono",ui-monospace,monospace; font-size:11px; font-weight:500;
  letter-spacing:.1em; white-space:nowrap; color:var(--ink); background:var(--bg);
  border:1px solid var(--line); padding:3px 7px; opacity:0; pointer-events:none;
  transition:opacity .15s ease}
@media (hover:hover) and (pointer:fine){
  .fl-item:hover .fl-cap{opacity:1}
  .fl-nav:hover{color:var(--ink)}
  [data-theme="light"] .fl-nav:hover{color:var(--accent)}
  .floatband .fl-item:hover{z-index:9}
  .floatband .fl-item:hover .fl-name{max-width:200px}
}

/* The small name under each float (operator, 2026-11-09): always visible from
   900px up; hidden below, where the stage is one corner float or a tight row. */
.fl-name{position:absolute; z-index:2; left:50%; top:calc(100% + 4px); transform:translateX(-50%);
  width:max-content; max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-family:"JetBrains Mono",ui-monospace,monospace; font-size:10px; letter-spacing:.06em;
  line-height:1.3; color:var(--muted); text-align:center; pointer-events:none}
.fl-name:empty{display:none}
@media (max-width:899px){ .fl-name{display:none} }

/* The hero's ‹ › (float.js makes them for one float only). Hidden unless the
   stage is data-desktop="1" from 900px up: never on the phone, never under
   ?desktop=3|4|5, never in the band. And only while a float is on screen
   (:has(.fl-item): float.js puts an .fl-item in the stage once its image has
   loaded and removes it on a clear), so an empty or failed feed shows no dead
   arrows. Never the hidden attribute: .fl-nav carries display (buglog
   hidden-attribute-defeated-by-author-display-grid). In the band two names are never
   closer than 40px (the wider band rule below); on hover a name may widen to 200px. */
.fl-nav{display:none; position:absolute; z-index:10; width:44px; height:44px; margin:0; padding:0; align-items:center; justify-content:center; border:0; background:transparent; color:var(--muted); font-family:"JetBrains Mono",ui-monospace,monospace; font-size:22px; line-height:1; cursor:pointer; touch-action:manipulation; transform:translateY(-50%)}
.floatband .fl-name{max-width:var(--s)}

/* ≥1040px: the hero's right column. By default ONE float, centred, 230px
   (operator, 2026-11-11): 230px so the float and its .fl-name line fit the
   270px stage at 1040px; --y:47% centres float + name together. The rule
   out-ranks .fl-item[data-slot="0"] (0,3,0 against 0,2,0). Three to five
   floats, scattered by the slot rules above, only via the preview query
   ?desktop=3|4|5. */
@media (min-width:1040px){
  .floatwrap{position:relative; width:100%; height:clamp(240px,26vw,360px)}
  .floatwrap .fl-item{position:absolute; left:var(--x); top:var(--y); z-index:var(--z);
    margin:calc(var(--s) / -2) 0 0 calc(var(--s) / -2)}
  .floatwrap .fl-item:hover{z-index:9}   /* its caption must clear its neighbours */
  .floatwrap[data-desktop="1"] .fl-item{--x:50%; --y:47%; --s:230px}
  .floatwrap[data-desktop="1"]:has(.fl-item) .fl-nav{display:flex; top:47%}
  .floatwrap[data-desktop="1"] .fl-prev{left:calc(50% - 171px)}
  .floatwrap[data-desktop="1"] .fl-next{left:calc(50% + 127px)}
}

/* 900–1039px: the hero is one column, so a row under its text. The fractions
   catch browser-zoom widths that fall between the whole-pixel queries. */
@media (min-width:899.01px) and (max-width:1039.99px){
  .floatwrap{position:relative; display:flex; align-items:center; justify-content:center;
    gap:clamp(16px,3vw,32px); height:200px}
  .floatwrap[data-desktop="1"]:has(.fl-item) .fl-nav{display:flex; top:50%}
  .floatwrap[data-desktop="1"] .fl-prev{left:calc(50% - 136px)}
  .floatwrap[data-desktop="1"] .fl-next{left:calc(50% + 92px)}
}

/* ≤899px: one float in the top-right corner beside the headline (the operator's
   2026-08-05 "buyers first" footprint), or a row of two or three under the CTA.
   "Not a row" rather than data-phone="1": the corner holds before float.js runs,
   so the empty stage adds no grid row that then disappears. */
@media (max-width:899px){
  .floatwrap:not([data-phone="2"]):not([data-phone="3"]){position:absolute; top:6px; right:6px; width:96px; height:96px}
  .floatwrap:not([data-phone="2"]):not([data-phone="3"]) .fl-item{--s:96px}
  .floatwrap[data-phone="2"],.floatwrap[data-phone="3"]{display:flex; align-items:center;
    justify-content:center; gap:10px; height:120px}
  .floatwrap[data-phone="2"] .fl-item,.floatwrap[data-phone="3"] .fl-item{--s:clamp(84px,27vw,112px)}
}
@media (max-width:374px){
  .floatwrap:not([data-phone="2"]):not([data-phone="3"]){right:2px; width:78px; height:78px}
  .floatwrap:not([data-phone="2"]):not([data-phone="3"]) .fl-item{--s:78px}
}

/* The Index band: one row, never wraps. float.js shows fewer floats below 900,
   720 and 480px, and the sizes below are what makes those counts fit. */
.floatband{display:none}
.floatband[data-on]{display:flex; flex-wrap:nowrap; align-items:center; justify-content:center;
  gap:clamp(14px,2.4vw,28px); height:152px; margin-top:22px}
.floatband .fl-item{--s:var(--b)}
@media (max-width:719px){
  .floatband[data-on]{gap:12px}
  .floatband .fl-item{--s:96px}
}
@media (max-width:479px){
  .floatband[data-on]{gap:10px}
  .floatband .fl-item{--s:84px}
}
/* The wider band rule (operator 2026-11-11): the band spreads wider from
   899.01px up, and two names are never closer than 40px. */
@media (min-width:899.01px){
  .floatband[data-on]{--fl-gap:clamp(56px,8vw,128px); gap:var(--fl-gap)}
  .floatband .fl-name{max-width:calc(var(--s) + var(--fl-gap) - 40px)}
}

/* float.js sets no sway, tilt or timers under reduced motion; this makes the
   remaining fades instant. Nothing here waits for a transition to end. */
@media (prefers-reduced-motion:reduce){
  .fl-item,.fl-cap,.fl-name{transition:none !important; animation:none !important}
}
