/* ---------------------------------------------------------------------------
   NAF — colours taken from the logo: teal #109a86, charcoal #262c31.

   This extends Material's own "default" and "slate" schemes rather than
   replacing them. Inventing a scheme name means every variable you forget
   falls back to Material's light-theme defaults, which is how the admonition
   body ended up as near-black text on a dark ground.
   --------------------------------------------------------------------------- */

[data-md-color-scheme="default"] {
  --naf-teal:      #0e8874;
  --naf-hairline:  #e2e6e9;
  --naf-surface:   #f7f9fa;
  --naf-nav-section: #10151a;   /* deutlich dunkler als die Links darunter */

  --md-primary-fg-color:        #262c31;
  --md-primary-fg-color--light: #39434a;
  --md-primary-fg-color--dark:  #1b2024;
  --md-primary-bg-color:        #ffffff;
  --md-accent-fg-color:         var(--naf-teal);
  --md-typeset-a-color:         var(--naf-teal);
}

[data-md-color-scheme="slate"] {
  --md-hue: 210;                /* Materials Slate ist blaustichig; das neutralisiert es */
  --naf-teal:      #2fc3a8;
  --naf-hairline:  #2b333a;
  --naf-surface:   hsla(var(--md-hue), 12%, 14%, 1);
  --naf-nav-section: hsla(var(--md-hue), 20%, 98%, 1);  /* heller als die Links darunter */

  --md-primary-fg-color:        #14181c;
  --md-primary-fg-color--light: #232a30;
  --md-primary-fg-color--dark:  #0d1114;
  --md-primary-bg-color:        #e6eaed;
  --md-accent-fg-color:         var(--naf-teal);
  --md-typeset-a-color:         var(--naf-teal);
}

/* --- Header: quiet, one teal edge as the only signal --- */
.md-header { box-shadow: none; border-bottom: 1px solid var(--naf-hairline); }
.md-header--shadow { box-shadow: none; }
.md-header__title { font-weight: 600; letter-spacing: -.01em; }
.md-header .md-logo img, .md-header .md-logo svg { height: 1.6rem; width: auto; }

/* --- Navigation: no boxes, just type and a teal active state --- */
.md-nav { font-size: .72rem; }
.md-nav__title { font-size: .66rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--md-default-fg-color--lighter); }
.md-nav__link { padding: .24rem 0; }

/* Section headings carry the hierarchy: same family, a clear step up in size,
   weight and contrast, with air above so the group reads as a group. */
.md-nav--primary .md-nav__item--section > .md-nav__link,
.md-nav--primary .md-nav__item--section > label.md-nav__link {
  color: var(--naf-nav-section);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: -.005em;
  margin-top: 1rem;
  cursor: default;
}
.md-nav--primary .md-nav__item--section:first-of-type > .md-nav__link { margin-top: 0; }
.md-nav__link--active, .md-nav__link--active:focus {
  color: var(--naf-teal); font-weight: 600; }

/* --- Prose --- */
.md-typeset { font-size: .78rem; line-height: 1.72; }
.md-typeset h1 { font-weight: 600; letter-spacing: -.02em;
  color: var(--md-default-fg-color); margin: 0 0 1.2rem; }
.md-typeset h2 { font-weight: 600; letter-spacing: -.01em;
  margin: 2.4rem 0 .8rem; padding-bottom: .4rem;
  border-bottom: 1px solid var(--naf-hairline); }
.md-typeset h3 { font-weight: 600; margin: 1.8rem 0 .5rem; }

/* --- Code --- */
.md-typeset code { border-radius: 3px; padding: .1em .34em; }
.md-typeset pre > code { border: 0; }
.md-typeset .highlight > pre { border: 1px solid var(--naf-hairline); border-radius: 3px; }

/* --- Tables: hairlines, no shadow --- */
.md-typeset table:not([class]) {
  border: 1px solid var(--naf-hairline); border-radius: 3px;
  font-size: .72rem; box-shadow: none; }
.md-typeset table:not([class]) th {
  background: var(--naf-surface); font-weight: 600; font-size: .64rem;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--md-default-fg-color--light); }
.md-typeset table:not([class]) td { border-top: 1px solid var(--naf-hairline); }

/* --- The requires box: the one element that gets colour --- */
.md-typeset .admonition.info {
  border: 1px solid var(--naf-hairline);
  border-left: 3px solid var(--naf-teal);
  border-radius: 0 3px 3px 0;
  box-shadow: none;
  font-size: .74rem;
  --md-admonition-bg-color: var(--naf-surface);
  --md-admonition-fg-color: var(--md-default-fg-color);
}
.md-typeset .info > .admonition-title {
  background: transparent;
  color: var(--naf-teal);
  font-weight: 600; font-size: .68rem; letter-spacing: .04em; }
.md-typeset .info > .admonition-title::before { background-color: var(--naf-teal); }

/* --- Search, footer --- */
.md-search__form { border-radius: 3px; }
.md-footer-meta { border-top: 1px solid var(--naf-hairline); }

@media (prefers-reduced-motion: no-preference) {
  .md-nav__link, .md-typeset a { transition: color 120ms ease; }
}

/* --- Package names in tables must not break mid-word --- */
.md-typeset table:not([class]) code { white-space: nowrap; }
.md-typeset table:not([class]) td:first-child { white-space: normal; }
.md-typeset__table { overflow-x: auto; }

/* --- The mark's left half is charcoal and disappears on a dark ground, so the
       dark theme gets the light artwork instead. --- */
[data-md-color-scheme="slate"] .md-header .md-logo img,
[data-md-color-scheme="slate"] .md-nav__title .md-logo img {
  content: url("naf-logo-small-square-light.png");
}

/* Keep namespaces visible beside long reflected signatures. */
.md-typeset .function-reference td:first-child code {
  white-space: normal;
  overflow-wrap: anywhere;
}
