/* Nexo brand palette -- copper -> teal, sampled from the logo gradient on charcoal. */

[data-md-color-scheme="default"] {
  --md-primary-fg-color:        #a85f33;   /* copper, readable on white */
  --md-primary-fg-color--light: #c17f52;
  --md-primary-fg-color--dark:  #834825;
  --md-accent-fg-color:         #0f8a6f;   /* teal darkened for contrast on white */
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color:        #d08a5c;   /* brighter copper pops on charcoal */
  --md-primary-fg-color--light: #dda079;
  --md-primary-fg-color--dark:  #b06e40;
  --md-accent-fg-color:         #57c99a;   /* teal-green from the logo */
  --md-default-bg-color:        #23272e;   /* charcoal, matches the logo backdrop */
  --md-default-fg-color:        #d6dae0;
}

/* Charcoal header in both schemes: keeps white header text readable and lets the
   dark-backed logo blend in, while coral stays the accent for active nav + links. */
.md-header {
  background-color: #1f2329;
}
.md-header--shadow {
  box-shadow: 0 0 0.2rem #0006;
}

/* --- Sidebar: wider so long entries don't wrap, nav items as "slot" pills --- */
@media screen and (min-width: 76.25em) {
  .md-sidebar--primary {
    width: 17rem;
  }
}
/* The pill "row" is .md-nav__link for leaves/toggles, or the .md-nav__container
   (index link + dropdown chevron) for a page that also has subpages. Style the
   container as ONE pill so it reads as a single button + dropdown, not two. */
.md-sidebar--primary .md-nav__link,
.md-sidebar--primary .md-nav__container {
  border-radius: 0.4rem;
  margin: 0.05rem 0.2rem 0.05rem 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.md-sidebar--primary .md-nav__link {
  align-items: center;   /* Material uses flex-start -> makes chevron toggles taller than leaves */
  padding: 0.3rem 0.45rem;
}
/* Inside a container, the label + chevron must share the one pill, not each get one */
.md-sidebar--primary .md-nav__container {
  padding: 0;
}
.md-sidebar--primary .md-nav__container > .md-nav__link {
  margin: 0;
  border-radius: 0;
}

/* Keep nested (has-children) items the same height + rhythm as leaf items */
.md-sidebar--primary .md-nav__item--section {
  margin: 0.8em 0 0.15em;     /* Material default is a loud 1.25em 0 */
}
.md-sidebar--primary .md-nav__item--nested > .md-nav {
  margin-top: 0.05rem;        /* child list sits directly under its parent */
}

/* Hover: one highlight for the whole row */
.md-sidebar--primary .md-nav__link:hover,
.md-sidebar--primary .md-nav__container:hover {
  background-color: var(--md-default-fg-color--lightest);
}
.md-sidebar--primary .md-nav__container:hover > .md-nav__link {
  background-color: transparent;
  color: var(--md-accent-fg-color);
}

/* Active: a single copper pill on the whole row (leaf link OR the container) */
.md-sidebar--primary .md-nav__link--active,
.md-sidebar--primary .md-nav__item--active > .md-nav__container {
  background-color: color-mix(in srgb, var(--md-primary-fg-color) 14%, transparent);
  box-shadow: inset 0.15rem 0 0 var(--md-primary-fg-color);   /* left accent bar */
}
.md-sidebar--primary .md-nav__link--active,
.md-sidebar--primary .md-nav__item--active > .md-nav__container > .md-nav__link {
  color: var(--md-primary-fg-color) !important;
  font-weight: 600;
}
/* ...but don't let the inner link paint a second pill inside an active container */
.md-sidebar--primary .md-nav__container > .md-nav__link--active {
  background-color: transparent;
  box-shadow: none;
}

/* --- Heading hierarchy: weight + spacing, not just size (Material ships light) --- */
.md-typeset h1 {
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--md-default-fg-color);
}
.md-typeset h2 {
  font-weight: 700;
  margin-top: 1.8em;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}
.md-typeset h3 {
  font-weight: 700;
}
.md-typeset h4 {
  font-weight: 600;
}
.md-typeset h5 {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--md-default-fg-color--light);
}
.md-typeset h6 {
  font-weight: 600;
  color: var(--md-default-fg-color--light);
}

/* --- GitBook colored text (<mark style="color:..."> in the source) ---------- */
.gb-yellow { color: #b58900; }
.gb-red    { color: #d33f49; }
.gb-green  { color: #2e9e5b; }
.gb-info   { color: #3b82f6; }
[data-md-color-scheme="slate"] .gb-yellow { color: #f5c542; }
[data-md-color-scheme="slate"] .gb-red    { color: #ff6b6b; }
[data-md-color-scheme="slate"] .gb-green  { color: #5fd38d; }
[data-md-color-scheme="slate"] .gb-info   { color: #7aa7ff; }

/* --- Responsive video embeds (YouTube 16:9 + local mp4) ------------------- */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 0.3rem;
  margin: 1em 0;
}
.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
video {
  border-radius: 0.3rem;
}
