/* qmcr-chrome.css — shared site header + sidebar, extracted verbatim from index.html
   so every Straddle Lab page wears the exact same top nav + palette.
   Pair with /js/qmcr-nav.js (injects the markup). Uses ABSOLUTE asset paths so it
   works from / and /lab/ alike. Palette: white header, navy #1e3a5f, teal #4a9fae. */

/* ── Ticker Bar ── (verbatim from index.html so Straddle Lab pages match the marketing site) */
.ticker-bar { background: #1e3a5f; height: 38px; overflow: hidden; position: relative; width: 100%; }
.ticker-loading { display: flex; align-items: center; justify-content: center; height: 100%; color: rgba(255,255,255,0.35); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ticker-track { display: flex; align-items: center; height: 100%; width: max-content; animation: ticker-scroll 55s linear infinite; }
.ticker-track:empty { display: none; }
.ticker-item { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0 1.6rem; white-space: nowrap; border-right: 1px solid rgba(255,255,255,0.1); }
.tick-label { font-size: 0.7rem; font-weight: 700; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.07em; }
.tick-price { font-size: 0.8rem; font-weight: 600; color: #fff; }
.tick-change { font-size: 0.72rem; font-weight: 500; }
.tick-change.up   { color: #4ade80; }
.tick-change.down { color: #f87171; }
.tick-change.flat { color: rgba(255,255,255,0.4); }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── Header ── */
.header {
  background: #fff;
  padding: 0.5rem 2rem;
  box-shadow: 0 1px 0 #e9ecef, 0 2px 12px rgba(0,0,0,0.04);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 100;
}
.logo-container { max-width: 250px; }
/* the logo PNG (250x106) has ~24px of baked-in vertical whitespace top & bottom; crop it (cover, not scale)
   so the nav is shorter but the logo stays the SAME size */
.logo-container img { width: 250px; max-width: 100%; height: 68px; object-fit: cover; object-position: center; display: block; }
.logo-container a { display: block; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  color: #4a5568; text-decoration: none; font-weight: 500; font-size: 0.9rem;
  letter-spacing: 0.01em; transition: color 0.2s;
}
.nav a:hover, .nav a.active { color: #4a9fae; }
.nav .nav-cta {
  background: #1e3a5f; color: #fff; padding: 0.5rem 1.25rem; border-radius: 6px;
  font-weight: 600; font-size: 0.875rem; letter-spacing: 0.02em; transition: background 0.2s;
}
.nav .nav-cta:hover { background: #4a9fae; color: #fff; }
/* "New" badge on a nav link (Straddle Lab launch highlight). Teal brand pill; reads on white nav + navy drawer. */
.nav-badge {
  display: inline-block; margin-left: 0.4rem; padding: 0.05em 0.42em; border-radius: 999px;
  background: #4a9fae; color: #fff; font-size: 0.6rem; font-weight: 700; line-height: 1.5;
  letter-spacing: 0.06em; text-transform: uppercase; vertical-align: middle; white-space: nowrap;
}
.nav a:hover .nav-badge, .nav a.active .nav-badge { color: #fff; }        /* keep white text even as link recolors */
.sidebar-nav a .nav-badge { margin-left: 0; }                              /* flex gap already spaces it in the drawer */
/* secondary (outline) action e.g. Sign in next to the primary CTA */
.nav .nav-ghost {
  border: 1.5px solid #1e3a5f; color: #1e3a5f; padding: 0.42rem 1.1rem; border-radius: 6px;
  font-weight: 600; font-size: 0.875rem;
}
.nav .nav-ghost:hover { background: #1e3a5f; color: #fff; }

/* ── Mobile controls + hamburger ── */
.mobile-controls { display: none; }
.hamburger {
  background: none; border: none; cursor: pointer; padding: 6px;
  display: flex; flex-direction: column; justify-content: center; gap: 5px; border-radius: 4px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: #1e3a5f; border-radius: 2px; transition: all 0.25s ease; }

/* ── Sidebar drawer ── */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 900;
  opacity: 0; pointer-events: none; transition: opacity 0.28s ease;
}
.sidebar-overlay.open { opacity: 1; pointer-events: all; }
.sidebar {
  position: fixed; top: 0; left: 0; width: 68%; max-width: 300px; height: 100vh;
  background: #1e3a5f; z-index: 1000; transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; box-shadow: 4px 0 24px rgba(0,0,0,0.18);
}
.sidebar.open { transform: translateX(0); }
.sidebar-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.1);
}
/* White rounded-square badge so the transparent notched Q mark reads against the navy drawer
   (mirrors the floating "Q" button in the mobile Lab). */
.sidebar-logo {
  width: 40px; height: 40px; border-radius: 10px; background: #fff; padding: 3px;
  object-fit: contain; border: 1px solid rgba(20,40,70,0.10); box-shadow: 0 2px 8px rgba(10,20,40,0.22);
}
.sidebar-close {
  background: none; border: none; color: rgba(255,255,255,0.7); font-size: 1.5rem;
  line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: color 0.2s;
}
.sidebar-close:hover { color: #fff; }
.sidebar-nav { padding: 0.5rem 0; flex: 1; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 0.75rem; color: rgba(255,255,255,0.8);
  text-decoration: none; font-size: 0.975rem; font-weight: 500; padding: 0.95rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06); transition: background 0.15s, color 0.15s;
}
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(255,255,255,0.07); color: #4a9fae; }
.sidebar-nav a .nav-icon { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; opacity: 0.95; }
.sidebar-nav a .nav-icon img { display: block; width: 26px; height: 26px; object-fit: contain; }
.sidebar-nav a .nav-icon svg { display: block; width: 28px; height: 28px; stroke: #d8e3ef; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-auth { margin-top: 0.4rem; border-top: 1px solid rgba(255,255,255,0.10); }
.sidebar-auth a#qmcrLogout { color: rgba(255,255,255,0.62); }
.sidebar-auth a#qmcrLogout:hover { color: #e08a8a; }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.7rem; color: rgba(255,255,255,0.3); letter-spacing: 0.05em; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .header { padding: 0.4rem 1rem; gap: 0; }
  .logo-container { width: 170px; flex-shrink: 0; flex-grow: 0; }
  .logo-container img { width: 170px; height: 52px; }   /* crop more whitespace at the smaller mobile logo size */
  .nav { display: none; }
  .mobile-controls { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; margin-left: auto; }
  .mobile-controls .nav-cta { display: inline-block; background: #1e3a5f; color: #fff; padding: 0.35rem 0.85rem; border-radius: 6px; font-weight: 600; font-size: 0.85rem; text-decoration: none; }
}
