/* /compare/ mobile chart bar (Nov 13 2026, v1).
   All screen sizes (Nov 16 2026 v2, Kyle):
   1) The in-page comparison table header (.ctable thead th) no longer sticks to the top
      (it was a ~134px white sticky). It keeps its exact look; it just scrolls with the page.
   2) Once that header has fully scrolled off the top, a slim 68px #0F1530 bar (same look as
      the [data-csb] picks bar) shows the picked tools' logos + names. No buttons.
      Hidden again when the header is back in view or the table has scrolled past.
   No existing /_astro/ file is edited. */

.ccb{display:none}

@media all{
  html .band [data-ct] .ctable thead th,
  html.js .band [data-ct] .ctable thead th,
  html .band [data-ct] .ctable thead td,
  html.js .band [data-ct] .ctable thead td{
    position:static;
  }

  .ccb{
    display:flex;
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:45;
    box-sizing:border-box;
    align-items:center;
    height:calc(68px + env(safe-area-inset-top,0px));
    padding:0 12px;
    padding-top:env(safe-area-inset-top,0px);
    background:#0F1530;
    color:#fff;
    border-bottom:1px solid rgba(143,174,255,.28);
    box-shadow:0 10px 24px -14px rgba(4,8,30,.9);
    visibility:hidden;
    opacity:0;
    pointer-events:none;
    transform:translateY(-100%);
    transition:opacity .16s ease,transform .16s ease,visibility .16s;
  }
  .ccb.is-on{
    visibility:visible;
    opacity:1;
    transform:none;
  }
  .ccb-tool{
    flex:1 1 0;
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
  }
  .ccb-logo{
    box-sizing:border-box;
    width:44px;
    height:44px;
    border-radius:50%;
    background:#fff;
    display:grid;
    place-items:center;
    flex:none;
    box-shadow:0 0 0 2px var(--cat,#8455B8);
  }
  .ccb-logo img{
    width:26px;
    height:26px;
    object-fit:contain;
  }
  .ccb-txt{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:2px;
  }
  .ccb-name{
    color:#fff;
    font:700 14px/1.15 Sora,Inter,system-ui,sans-serif;
    letter-spacing:-.005em;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    overflow-wrap:break-word;
  }
  .ccb-brand{
    color:#B5B0C9;
    font:600 11.5px/1.2 Inter,system-ui,sans-serif;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .ccb-vs{
    flex:none;
    padding:0 6px;
    font:700 10px/1 Sora,sans-serif;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#B5B0C9;
  }
  /* 3+ tools: logos only so nothing truncates. */
  .ccb[data-n="3"] .ccb-txt,.ccb[data-n="4"] .ccb-txt{display:none}
}

@media (prefers-reduced-motion:reduce){
  .ccb{transition:opacity .16s ease,visibility .16s;transform:none}
}

/* v3 Nov 16 2026: above 640px the JS sets side padding to the table column edges so each logo sits over its column; vs hidden there. */
.ccb.is-al .ccb-vs{display:none}
