/* The site header (templates/_topbar.html), on every page. Calm and light,
   after artificialanalysis.ai: white, a hairline below, pill and round
   controls, one colour for the one thing to buy. One row on every screen. */
.site-hdr{--hdr-ink:#0f172a;--hdr-sub:#64748b;--hdr-line:#e5e7eb;--hdr-soft:#f1f5f9;--hdr-soft2:#e2e8f0;--hdr-pro:#6d28d9;
  position:sticky;top:0;z-index:100;display:flex;align-items:center;gap:10px;height:60px;padding:0 20px;
  background:rgba(255,255,255,.92);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px);
  border-bottom:1px solid var(--hdr-line);color:var(--hdr-ink);box-sizing:border-box;
  font:14px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif}
.site-hdr *,.site-hdr *::before,.site-hdr *::after{box-sizing:border-box}
.site-hdr a{text-decoration:none;color:inherit}
.site-hdr .ico{flex:none;display:block}
.site-hdr .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Brand: the anchor in a dark pill, the wordmark beside it. */
.site-hdr .hdr-brand{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 14px 0 10px;border-radius:999px;
  background:#0f2044;color:#fff;flex:none;font-weight:700;letter-spacing:.2px}
.site-hdr .hdr-brand img{display:block}
.site-hdr .hdr-word{font-size:14px;white-space:nowrap}
.site-hdr .hdr-word b{color:#93c5fd;font-weight:700}
.site-hdr .hdr-brand:hover{background:#16295a}

/* Search: one rounded field; Enter or the arrow opens the Deep Dive. */
.site-hdr .hdr-search{position:relative;display:flex;align-items:center;flex:0 1 340px;min-width:0;height:40px;margin:0 0 0 6px;
  padding:0 4px 0 12px;border-radius:999px;background:var(--hdr-soft);border:1px solid transparent;transition:border-color .15s,background .15s}
.site-hdr .hdr-search:focus-within{background:#fff;border-color:#94a3b8;box-shadow:0 0 0 3px rgba(148,163,184,.25)}
.site-hdr .hdr-search > .ico{color:var(--hdr-sub)}
.site-hdr .hdr-search input{flex:1;min-width:0;height:100%;border:0;background:transparent;outline:none;padding:0 8px;
  font:inherit;font-size:14px;color:var(--hdr-ink);text-transform:uppercase}
.site-hdr .hdr-search input::placeholder{text-transform:none;color:#94a3b8}
.site-hdr .hdr-go{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:999px;border:0;cursor:pointer;
  background:var(--hdr-ink);color:#fff;transition:background .15s,transform .1s}
.site-hdr .hdr-go:hover{background:#334155}.hdr-go:active{transform:scale(.94)}
.site-hdr .hdr-go.busy{background:#94a3b8;cursor:progress}
.site-hdr .hdr-go.busy .ico{animation:hdr-spin .9s linear infinite}
@keyframes hdr-spin{to{transform:rotate(360deg)}}

/* Screener: a quiet link with its icon. */
.site-hdr .hdr-link{display:inline-flex;align-items:center;gap:7px;height:40px;padding:0 14px;border-radius:999px;font-weight:600;
  color:var(--hdr-ink);flex:none;transition:background .15s}
.site-hdr .hdr-link:hover{background:var(--hdr-soft)}
.site-hdr .hdr-link .ico{color:#0e7490}

/* Account side. */
.site-hdr .hdr-right{margin-left:auto;display:flex;align-items:center;gap:8px;flex:none}
.site-hdr .hdr-chip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 11px;border-radius:999px;background:var(--hdr-soft);
  color:var(--hdr-ink);font-weight:600;font-size:13px;font-variant-numeric:tabular-nums}
.site-hdr .hdr-chip[hidden]{display:none}
.site-hdr .hdr-chip:hover{background:var(--hdr-soft2)}
.site-hdr .hdr-chip.low{background:#fef3c7;color:#92400e}
.site-hdr .hdr-pro{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 15px;border-radius:999px;background:var(--hdr-pro);
  color:#fff!important;font-weight:700;font-size:13px}
.site-hdr .hdr-pro:hover{background:#5b21b6}
.site-hdr .hdr-pro-badge{display:inline-flex;align-items:center;height:26px;padding:0 10px;border-radius:999px;background:#ede9fe;color:var(--hdr-pro);
  font-weight:800;font-size:12px;letter-spacing:.4px}
.site-hdr .hdr-login{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 15px;border-radius:999px;background:var(--hdr-ink);
  color:#fff!important;font-weight:700;font-size:13px}
.site-hdr .hdr-login:hover{background:#334155}

/* The account menu. */
.site-hdr .hdr-menu{position:relative}
.site-hdr .hdr-avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:999px;border:0;cursor:pointer;
  background:var(--hdr-soft2);color:var(--hdr-ink);font:700 15px system-ui,-apple-system,sans-serif}
.site-hdr .hdr-avatar:hover,.site-hdr .hdr-avatar[aria-expanded="true"]{background:#cbd5e1}
.site-hdr .hdr-pop{position:absolute;right:0;top:calc(100% + 8px);width:260px;padding:6px;border-radius:14px;background:#fff;
  border:1px solid var(--hdr-line);box-shadow:0 12px 32px rgba(15,23,42,.14);z-index:210}
.site-hdr .hdr-pop[hidden]{display:none}
.site-hdr .hdr-pop-head{padding:10px 10px 12px;border-bottom:1px solid var(--hdr-line);margin-bottom:6px}
.site-hdr .hdr-pop-who{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.site-hdr .hdr-pop-plan{margin-top:3px;color:var(--hdr-sub);font-size:13px}
.site-hdr .hdr-pop form{margin:0}
.site-hdr .hdr-pop-item{display:flex;align-items:center;gap:10px;width:100%;min-height:42px;padding:0 10px;border:0;border-radius:9px;
  background:none;color:var(--hdr-ink);font:inherit;font-size:14px;text-align:left;cursor:pointer}
.site-hdr .hdr-pop-item:hover,.site-hdr .hdr-pop-item:focus-visible{background:var(--hdr-soft);outline:none}
.site-hdr .hdr-pop-item .ico{color:var(--hdr-sub)}
.site-hdr .hdr-pop-pro{color:var(--hdr-pro)!important;font-weight:700}.hdr-pop-pro .ico{color:var(--hdr-pro)}

/* Tips (static/tip.js): the one bubble, and the marker on what has one. */
#tip-bubble{position:fixed;z-index:500;max-width:min(300px,calc(100vw - 16px));padding:8px 11px;border-radius:9px;background:#0f172a;color:#fff;
  font:12.5px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;font-weight:400;font-style:normal;white-space:pre-line;text-align:left;
  box-shadow:0 8px 22px rgba(15,23,42,.28);pointer-events:none}
#tip-bubble[hidden]{display:none}
[data-tip]{cursor:help}
a[data-tip],button[data-tip],label[data-tip]{cursor:pointer}
[data-tip]:focus-visible{outline:2px solid #94a3b8;outline-offset:2px;border-radius:4px}

/* The ticker list under the search field (static/ticker-ac.js). */
.site-hdr .ticker-ac{font-size:13px}

/* Tablet: the wordmark and the Screener label go; their icons stay. */
@media (max-width:900px){
  .site-hdr .hdr-word{display:none}
  .site-hdr .hdr-brand{width:40px;height:40px;padding:0;justify-content:center}
  .site-hdr .hdr-link span{display:none}
  .site-hdr .hdr-link{width:40px;padding:0;justify-content:center}
}
/* Phone: one row -- brand, search, Screener, the allowance gauge, account.
   Go Pro lives in the account menu (and the plan banner). The gauge stays:
   hidden here at first, it was missed at once (production #13). */
@media (max-width:640px){
  .site-hdr{height:56px;padding:0 12px;gap:6px}
  .site-hdr .hdr-search{flex:1 1 auto;margin:0;height:40px}
  .site-hdr .hdr-search > .ico{display:none}
  .site-hdr .hdr-search input{padding:0 6px 0 2px}
  .site-hdr .hdr-pro,.site-hdr .hdr-pro-badge{display:none!important}
  .site-hdr .hdr-right{gap:6px}
  .site-hdr .hdr-chip{height:34px;padding:0 9px;gap:5px;font-size:13px}
  .site-hdr .hdr-login span{display:none}
  .site-hdr .hdr-login{width:40px;padding:0;justify-content:center}
  .site-hdr .hdr-pop{position:fixed;left:12px;right:12px;top:62px;width:auto}
}
@media (pointer:coarse){.hdr-search input{font-size:16px}}
@media (prefers-reduced-motion:reduce){.hdr-go.busy .ico{animation:none}}
