/* wide tables read better at full width */
.md-typeset table:not([class]) { font-size: .72rem; }
.md-typeset .grid.cards > ul > li { border-radius: .4rem; }

/* responsive 16:9 video (YouTube / Vimeo iframe or local mp4) */
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 1em 0; }
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: .2rem; }
.md-typeset video { max-width: 100%; border-radius: .2rem; }

/* compact full-width tables: wrap text instead of horizontal scroll */
.md-grid { max-width: 76rem; }
.md-typeset__table { width: 100%; }
.md-typeset__table table:not([class]) { display: table; width: 100%; table-layout: auto; }
.md-typeset table:not([class]) th, .md-typeset table:not([class]) td {
  padding: .5em .8em; white-space: normal; overflow-wrap: anywhere; word-break: normal; vertical-align: top;
}
.md-typeset table:not([class]) td:first-child { min-width: 9em; }

/* ---- Electric cyan: neutral near-black + one cyan accent ---- */
[data-md-color-primary="custom"] {
  --md-primary-fg-color: #0e0f12;          /* header / tabs */
  --md-primary-fg-color--light: #1a1c21;
  --md-primary-fg-color--dark: #08090b;
  --md-primary-bg-color: #f2f3f0;
  --md-primary-bg-color--light: rgba(242, 243, 240, .7);
}
[data-md-color-accent="custom"] {
  --md-accent-fg-color: #00e5ff;
  --md-accent-fg-color--transparent: rgba(0, 229, 255, .12);
  --md-accent-bg-color: #0e0f12;
}

/* light: warm off-white, darker cyan for readable links */
[data-md-color-scheme="default"] {
  --md-default-bg-color: #f6f5f2;
  --md-typeset-a-color: #0e7490;
  --md-code-bg-color: #ecebe6;
}

/* dark: neutral near-black, light grey text, cyan links */
[data-md-color-scheme="slate"] {
  --md-hue: 230;
  --md-default-bg-color: #0f1013;
  --md-default-bg-color--light: #16171b;
  --md-default-fg-color: rgba(232, 234, 228, .88);
  --md-default-fg-color--light: rgba(232, 234, 228, .62);
  --md-code-bg-color: #17191d;
  --md-footer-bg-color: #0a0b0d;
  --md-footer-bg-color--dark: #060708;
  --md-typeset-a-color: #00e5ff;
}

/* header: near-black with a thin cyan line */
.md-header, .md-tabs { background: #0e0f12; }
.md-header { border-bottom: 2px solid #00e5ff; box-shadow: none; }
.md-header__title, .md-header__button { color: #f2f3f0; }

/* headings: neutral, cyan marker on h2 */
.md-typeset h1 { font-weight: 800; letter-spacing: -.01em; }
.md-typeset h2 { border-left: 3px solid #00e5ff; padding-left: .5em; }
[data-md-color-scheme="default"] .md-typeset h2 { border-left-color: #0891b2; }

/* tables: quiet header row */
.md-typeset table:not([class]) th { background: rgba(0, 0, 0, .05); }
[data-md-color-scheme="slate"] .md-typeset table:not([class]) th { background: #17191d; color: #e8eae4; }

/* nav: active item in the accent */
[data-md-color-scheme="slate"] .md-nav__link--active, [data-md-color-scheme="slate"] .md-nav__link:hover { color: #00e5ff !important; }
[data-md-color-scheme="default"] .md-nav__link--active, [data-md-color-scheme="default"] .md-nav__link:hover { color: #0e7490 !important; }

/* code / parameter names: monospace chip */
.md-typeset code { border-radius: .2rem; }
[data-md-color-scheme="slate"] .md-typeset code { color: #8ff3ff; }

/* cards and admonitions */
.md-typeset .grid.cards > ul > li:hover { border-color: #00e5ff; box-shadow: 0 0 0 1px rgba(0, 229, 255, .4); }
.md-typeset .admonition, .md-typeset details { border-left-color: #00e5ff; }

/* search button on the dark header, also in light mode */
.md-search__button { color: #f2f3f0 !important; }
.md-search__button:before { background-color: #f2f3f0 !important; }
@media screen and (min-width: 45em) {
  .md-search__button { background-color: rgba(242, 243, 240, .1) !important; }
  .md-search__button:hover, .md-search__button:focus { background-color: rgba(0, 229, 255, .18) !important; }
}
