/* ===========================================================================
   TENEX brand styling
   Brand mark: lime-green "TX" icon (#76B900).
   =========================================================================== */

:root {
  --tenex-green: #76b900;
  --tenex-green-dark: #5e9400;
  --tenex-green-soft: rgba(118, 185, 0, 0.10);

  /* Dark header (FastAPI-style): the header bar and the navigation-tabs row
     share this dark slate, so they read as one integrated bar. The green TX
     logo stands out on it; text and icons are white via --md-primary-bg-color. */
  --md-primary-fg-color:        #1f2229;
  --md-primary-fg-color--light: #2b2f38;
  --md-primary-fg-color--dark:  #16181d;
  --md-primary-bg-color:        #ffffff;
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);
  --md-accent-fg-color:         var(--tenex-green);
}

/* Brand green for content links and hover/active states. The header itself is
   the dark slate defined above (integrated header + tabs, FastAPI-style). */
[data-md-color-scheme="default"] {
  --md-accent-fg-color: var(--tenex-green-dark);
  --md-typeset-a-color: var(--tenex-green-dark);
}
[data-md-color-scheme="slate"] {
  --md-accent-fg-color: var(--tenex-green);
  --md-typeset-a-color: var(--tenex-green);
}

/* ---- Header logo (TENEX wordmark, white text on the dark header) ---------- */
.md-header__button.md-logo img {
  height: 1.4rem;
  width: auto;
}

/* Keep only the logo on the left and push the palette toggle, search, and repo
   link to the far right. Material's title element is a flex spacer (flex-grow)
   that normally does this; we keep the spacer but hide its text. */
.md-header__ellipsis {
  display: none;
}

/* Integrated dark header + tabs: a thin brand-green line under the tabs row,
   and a green underline on the active top-level tab. */
.md-tabs {
  border-bottom: 0.12rem solid var(--tenex-green);
}
.md-tabs__link--active {
  box-shadow: inset 0 -0.15rem 0 var(--tenex-green);
  opacity: 1;
}

/* ---- Headings -------------------------------------------------------------- */
.md-typeset h1 {
  font-weight: 700;
  letter-spacing: -0.01em;
}
.md-typeset h2 {
  font-weight: 600;
  border-bottom: 2px solid var(--tenex-green-soft);
  padding-bottom: 0.25rem;
}

/* Keep inline code in table cells on a single line (e.g. kernel names like
   `scatter_add` must not break mid-token across rows in a narrow column). */
.md-typeset table:not([class]) td code,
.md-typeset table:not([class]) th code {
  white-space: nowrap;
}

/* ---- Tables: branded header row + soft zebra striping --------------------- */
.md-typeset table:not([class]) th {
  background-color: var(--tenex-green);
  color: #ffffff;
  font-weight: 600;
}
.md-typeset table:not([class]) tr:nth-child(even) {
  background-color: var(--tenex-green-soft);
}

/* ---- Navigation: brand-coloured active / hover items ---------------------- */
.md-nav__link--active,
.md-nav__link:hover,
.md-nav__link:focus {
  color: var(--tenex-green-dark);
}
[data-md-color-scheme="slate"] .md-nav__link--active,
[data-md-color-scheme="slate"] .md-nav__link:hover,
[data-md-color-scheme="slate"] .md-nav__link:focus {
  color: var(--tenex-green);
}

/* ---- Inline code + admonition accent -------------------------------------- */
.md-typeset code {
  border-radius: 0.2rem;
}
.md-typeset .admonition.note,
.md-typeset details.note {
  border-left-color: var(--tenex-green);
}
