/* Shared Agent Lab tab component.
 *
 * One prominent tab bar - sizable labels, an amber active underline - used by
 * both the Agent Evaluation and the Forecasting Agent pages. It replaces the
 * invisible bespoke `.agent-tab` strip and the separate `.research-tabs` header
 * so the two pages read as one system. Colours come from ml3t-theme.css tokens;
 * this file adds only the small derived values the component needs.
 */
:root {
  /* The fixed site navbar is 72px at every width; the tab bar's own height
     differs on phones. Content that sticks or scrolls below both (the inline
     paper's contents sidebar and its heading anchors) uses --al-sticky-offset. */
  --al-nav-h: 72px;
  --al-tabbar-h: 66px;
  --al-sticky-offset: calc(var(--al-nav-h) + var(--al-tabbar-h));
  --al-line: var(--ml3t-silver-muted, #e8e8e6);
  --al-line-strong: #dcdcd9;
  --al-amber-tint: rgba(212, 168, 75, 0.12);
}

/* Sticky under the fixed 72px site navbar. */
.al-tabbar-shell {
  background: #fff;
  border-bottom: 1px solid var(--al-line-strong);
  position: sticky;
  top: var(--al-nav-h);
  z-index: 40;
  box-shadow: 0 6px 16px -14px rgba(10, 22, 40, 0.5);
}

.al-tabbar {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.al-tabbar::-webkit-scrollbar { display: none; }

.al-tab {
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--ml3t-font-sans);
  white-space: nowrap;
  font-size: clamp(15px, 1.5vw, 17px);
  font-weight: 600;
  color: var(--ml3t-text-light, #64748b);
  padding: 19px 20px 15px;
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.14s, border-color 0.14s;
}
.al-tab .al-tnum {
  font-family: var(--ml3t-font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ml3t-text-light, #64748b);
  border: 1px solid var(--al-line-strong);
  border-radius: 999px;
  padding: 1px 8px;
}
.al-tab:hover { color: var(--ml3t-text-dark, #1e293b); border-color: var(--al-line-strong); }
.al-tab[aria-selected="true"] { color: var(--ml3t-text-dark, #1e293b); border-color: var(--ml3t-amber, #D4A84B); }
.al-tab[aria-selected="true"] .al-tnum {
  color: var(--ml3t-copper, #C87533);
  border-color: var(--ml3t-amber, #D4A84B);
  background: var(--al-amber-tint);
}

/* Panels: one visible at a time. Without JS a <noscript> style in each page
   shows every panel, so no tab's content is unreachable. */
.al-panel { display: none; scroll-margin-top: var(--al-sticky-offset); }
.al-panel.active { display: block; }

@media (max-width: 600px) {
  :root { --al-tabbar-h: 62px; }
  .al-tabbar { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  .al-tab { transition: none; }
}
