/*
 * Copyright 2026 Seillen Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* Metis identity for Material - the one-pager's palette:
   bg #0b0f14, panel #111820, hairline #1d2833, text #e6edf3,
   muted #8b98a5, accent #7dd3e0. Dark is the brand; light is a
   soft cyan-tinted paper, never stark white-on-gray. */

:root {
  --metis-accent: #7dd3e0;
  --metis-accent-ink: #0e7c8f;
}

/* ---------- dark (slate) : the brand scheme ---------- */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #0b0f14;
  --md-default-fg-color: #e6edf3;
  --md-default-fg-color--light: #b7c2cc;
  --md-default-fg-color--lighter: #8b98a5;
  --md-default-fg-color--lightest: #1d2833;
  --md-primary-fg-color: #0b0f14;
  --md-accent-fg-color: var(--metis-accent);
  --md-typeset-a-color: var(--metis-accent);
  --md-code-bg-color: #111820;
  --md-code-fg-color: #d7e3ea;
  --md-footer-bg-color: #090c10;
  --md-footer-bg-color--dark: #06090c;
  --metis-panel: #111820;
  --metis-line: #1d2833;
  --metis-wash: rgba(125, 211, 224, 0.08);
}

/* ---------- light : tinted paper, same bones ---------- */
[data-md-color-scheme="default"] {
  --md-default-bg-color: #fbfdfe;
  --md-primary-fg-color: #0b0f14;      /* header stays the brand navy */
  --md-accent-fg-color: var(--metis-accent-ink);
  --md-typeset-a-color: var(--metis-accent-ink);
  --md-code-bg-color: #eef4f6;
  --md-footer-bg-color: #0b0f14;
  --metis-panel: #f2f6f8;
  --metis-line: #dfe7ec;
  --metis-wash: rgba(14, 124, 143, 0.08);
}

/* ---------- header: flat brand bar with a hairline, cyan logo ---------- */
.md-header {
  background-color: var(--md-primary-fg-color);
  border-bottom: 1px solid var(--metis-line);
  box-shadow: none;
}
.md-header__topic .md-ellipsis { font-weight: 700; letter-spacing: -0.01em; }
.md-search__form { background-color: rgba(230, 237, 243, 0.07); border-radius: 8px; }
.md-search__form:hover { background-color: rgba(230, 237, 243, 0.12); }

/* ---------- sidebars: panel tone + hairline, no floating gray ---------- */
@media screen and (min-width: 76.25em) {
  .md-sidebar--primary .md-sidebar__inner {
    background: var(--metis-panel);
    border: 1px solid var(--metis-line);
    border-radius: 12px;
    padding: 0.6rem 0.2rem 0.6rem 0.6rem;
    margin: 0.8rem 0.2rem 0 0;
  }
  .md-sidebar--secondary .md-sidebar__inner {
    border-left: 1px solid var(--metis-line);
    padding-left: 0.6rem;
  }
}

/* nav typography: quiet section labels, calm items, cyan active */
.md-nav { font-size: 0.66rem; }
.md-nav__title { color: var(--md-default-fg-color--lighter); }
@media screen and (min-width: 76.25em) {
  .md-nav--primary .md-nav__item--section > .md-nav__link {
    color: var(--md-default-fg-color--lighter);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.58rem;
    font-weight: 700;
  }
  [data-md-color-scheme="slate"] .md-nav--primary .md-nav__title,
  [data-md-color-scheme="slate"] .md-nav--primary .md-nav__title[for="__drawer"] {
    background: transparent;
    box-shadow: none;
  }
}
.md-nav__link--active,
.md-nav__link--active .md-ellipsis {
  color: var(--md-accent-fg-color) !important;
  font-weight: 600;
}
.md-nav__link:hover { color: var(--md-accent-fg-color); }

/* ---------- content: the one-pager's panel language ---------- */
.md-typeset h1 { font-weight: 800; letter-spacing: -0.02em; color: var(--md-default-fg-color); }
.md-typeset h2 { font-weight: 700; letter-spacing: -0.01em; }

.md-typeset code {
  background: var(--metis-panel);
  border: 1px solid var(--metis-line);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}
.md-typeset pre > code {
  border: none;
  border-radius: 0;
}
.md-typeset .highlight, .md-typeset pre {
  border-radius: 10px;
}
.md-typeset .highlight { border: 1px solid var(--metis-line); overflow: hidden; }

.md-typeset blockquote {
  border-left: 3px solid var(--metis-accent);
  background: var(--metis-wash);
  border-radius: 0 8px 8px 0;
  color: var(--md-default-fg-color--light);
}

.md-typeset table:not([class]) {
  border: 1px solid var(--metis-line);
  border-radius: 10px;
}
.md-typeset table:not([class]) th { background: var(--metis-panel); }

/* admonitions pick up the accent instead of Material blue */
.md-typeset .admonition, .md-typeset details {
  border-color: var(--metis-line);
  border-radius: 10px;
}
.md-typeset .admonition.note, .md-typeset .admonition.info {
  border-left: 3px solid var(--metis-accent);
}

/* footer quiet */
.md-footer-meta { border-top: 1px solid var(--metis-line); }
