:root {
  --farinha-primary: #F8B010; /* amber */
  --farinha-accent: #886040; /* brown */
}

/* Light */
[data-md-color-scheme="default"] {
  /* Use brown as header/nav background so it contrasts with the logo */
  --md-primary-fg-color: var(--farinha-accent);
  --md-primary-bg-color: #ffffff;

  /* Use amber as the highlight color */
  --md-accent-fg-color: var(--farinha-primary);
  --md-typeset-a-color: var(--farinha-accent);
}

/* Dark */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: var(--farinha-accent);
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: var(--farinha-primary);
  --md-typeset-a-color: var(--farinha-primary);
}

/* Keep the horizontal logo from overpowering the header */
.md-header__button.md-logo img {
  height: 2.2rem;
  width: auto;
}

@media screen and (max-width: 30em) {
  .md-header__button.md-logo img {
    height: 2rem;
  }
}

/* Hide duplicated site name next to the logo (logo already contains text)
   The image keeps alt text from site_name ("Farinha"). */
.md-header__title .md-header__topic,
.md-header__title .md-header__ellipsis {
  display: none;
}

/* Slightly larger in the sidebar */
.md-nav__title .md-logo img {
  height: 2.6rem;
  width: auto;
}

/* Improve code block readability a bit */
.md-typeset pre > code {
  border-radius: 10px;
}

/* Make lightbox-enabled documentation images visibly clickable. */
.md-typeset a.glightbox img {
  cursor: zoom-in;
}

.md-typeset a.glightbox:focus-visible img {
  outline: 0.12rem solid var(--md-accent-fg-color);
  outline-offset: 0.12rem;
}

/* Global language notice: accessible, brand-aligned contrast in light and dark modes.
   Links are bold and underlined, so the cue does not rely on color alone. */
.md-banner {
  color: #2b1b12;
  background:
    linear-gradient(90deg, rgba(248, 176, 16, 0.18), rgba(255, 248, 230, 0.98) 22%, #fffdf7 100%);
  border-bottom: 0.05rem solid rgba(136, 96, 64, 0.28);
  box-shadow: 0 0.05rem 0 rgba(43, 27, 18, 0.04);
}

.md-banner .md-banner__inner {
  font-size: 0.72rem;
  line-height: 1.55;
  letter-spacing: 0.005em;
}

.md-banner strong {
  color: #3a2517;
}

.md-banner a,
.md-banner a:visited {
  color: #5a2e0d;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(248, 176, 16, 0.78);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  border-radius: 0.2rem;
  padding: 0 0.08rem;
}

.md-banner a:hover,
.md-banner a:focus {
  color: #3f1f08;
  background-color: rgba(248, 176, 16, 0.18);
  text-decoration-color: currentColor;
}

.md-banner a:focus-visible {
  outline: 0.1rem solid #5a2e0d;
  outline-offset: 0.1rem;
}
