/* AFT Trading Bots: the one top bar of the section (row E804). The bots page, the Strategy Library, the Calculator and
   the Setup pages all carry the same header markup and load this file, so the bar never changes between them.
   Every rule is scoped under .tbn and sets its own fonts, colours and sizes, so neither /style.css, bots.css, a page
   stylesheet nor a guide page's own styles can restyle it. From 1040 px the seven links (the last, Discord, opens the invite in a new tab; Collin 2026-11-23) sit in the bar; below that a
   Menu button opens the same six links in a panel under the bar (nav.js). The bar is 64 px plus its 1 px line at
   every width, open or closed. */

/* the scrollbar's room is kept whether or not a page scrolls, so the bar never moves sideways between pages */
html{scrollbar-gutter:stable}

.tbn{position:sticky;top:0;z-index:20;display:block;width:100%;margin:0;padding:0;
  background:rgba(14,15,22,.9);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid #23263a;
  font-family:"IBM Plex Sans","Helvetica Neue",Arial,sans-serif;font-size:15px;font-weight:500;font-style:normal;
  line-height:1.4;letter-spacing:0;text-align:left;text-transform:none;color:#9a9fb3;-webkit-font-smoothing:antialiased}
.tbn,.tbn *,.tbn *::before,.tbn *::after{box-sizing:border-box}
.tbn .tbn-in{display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:1160px;height:64px;margin:0 auto;padding:0 20px}
.tbn .tbn-brand{display:flex;align-items:center;flex:none;min-height:44px;margin:0;padding:0;border:0;background:none;text-decoration:none}
.tbn .tbn-brand img{display:block;width:auto;max-width:none;height:34px;margin:0}
.tbn .tbn-links{display:flex;align-items:center;gap:26px;margin:0;padding:0}
.tbn .tbn-links a{display:inline-block;margin:0;padding:10px 0;border:0;background:none;color:#9a9fb3;font:inherit;line-height:1.4;
  white-space:nowrap;text-decoration:none}
.tbn .tbn-links a:hover{color:#fff;text-decoration:none}
/* the page you are on */
.tbn .tbn-links a[aria-current]{color:#fff}
.tbn .tbn-btn{display:none}
.tbn a:focus-visible,.tbn button:focus-visible{outline:2px solid #fff;outline-offset:2px;border-radius:6px}

/* under 1040 px (phones and tablets): the logo and one Menu button; the button opens the seven links in a panel that
   lies over the page under the bar, so the bar's height never changes */
@media(max-width:1039.98px){
  .tbn .tbn-btn{display:inline-flex;align-items:center;gap:10px;flex:none;height:44px;margin:0;padding:0 14px;
    border:1px solid #2f3349;border-radius:8px;background:transparent;color:#fff;font:inherit;line-height:1;cursor:pointer;
    -webkit-tap-highlight-color:transparent}
  .tbn .tbn-btn:hover{border-color:#9a9fb3}
  .tbn .tbn-ico{position:relative;display:block;width:16px;height:2px;border-radius:1px;background:currentColor}
  .tbn .tbn-ico::before,.tbn .tbn-ico::after{content:"";position:absolute;left:0;width:16px;height:2px;border-radius:1px;background:currentColor}
  .tbn .tbn-ico::before{top:-5px}
  .tbn .tbn-ico::after{top:5px}
  .tbn .tbn-btn[aria-expanded="true"] .tbn-ico{background:transparent}
  .tbn .tbn-btn[aria-expanded="true"] .tbn-ico::before{top:0;transform:rotate(45deg)}
  .tbn .tbn-btn[aria-expanded="true"] .tbn-ico::after{top:0;transform:rotate(-45deg)}
  .tbn .tbn-links{display:none;position:absolute;top:100%;left:0;right:0;flex-direction:column;align-items:stretch;gap:0;
    max-height:calc(100vh - 65px);overflow-y:auto;padding:4px 20px 12px;background:#0e0f16;
    border-top:1px solid #23263a;border-bottom:1px solid #23263a;box-shadow:0 18px 40px rgba(0,0,0,.45)}
  .tbn .tbn-btn[aria-expanded="true"] + .tbn-links{display:flex}
  .tbn .tbn-links a{display:flex;align-items:center;min-height:48px;padding:12px 0;border-top:1px solid #23263a;font-size:16px}
  .tbn .tbn-links a:first-child{border-top:0}
}
@media(max-width:420px){.tbn .tbn-brand img{height:28px}}

/* wide screens: the bar's column follows the bots pages' wider column, and from 2300 px it is scaled as the bots
   pages scale their whole page, so it is the same size on the Setup pages too */
@media(min-width:1800px){.tbn .tbn-in{max-width:1320px}}
@media(min-width:2300px){body:not(.bots) .tbn{zoom:1.3}}
@media(min-width:3200px){body:not(.bots) .tbn{zoom:1.9}}
