/* Formal clinical theme — white BG, dark text, navy accents.
   Ben visual preference: NO dark themes. */

:root,
[data-md-color-scheme="default"] {
  /* Navy primary */
  --md-primary-fg-color:        #0b1f3a;
  --md-primary-fg-color--light: #1a3a5c;
  --md-primary-fg-color--dark:  #061224;
  --md-primary-bg-color:        #ffffff;
  --md-primary-bg-color--light: #f7f9fc;

  /* Navy-leaning accent */
  --md-accent-fg-color:         #1e4d7b;
  --md-accent-fg-color--transparent: rgba(30, 77, 123, 0.12);
  --md-accent-bg-color:         #ffffff;

  /* Body */
  --md-default-fg-color:             #1a1a1a;
  --md-default-fg-color--light:      #3a3a3a;
  --md-default-fg-color--lighter:    #6a6a6a;
  --md-default-fg-color--lightest:   #b0b0b0;
  --md-default-bg-color:             #ffffff;
  --md-default-bg-color--light:      #f7f9fc;
  --md-default-bg-color--lighter:    #eef2f7;
  --md-default-bg-color--lightest:   #e4eaf2;

  --md-typeset-a-color: #1e4d7b;
  --md-footer-bg-color: #0b1f3a;
  --md-footer-bg-color--dark: #061224;
  --md-footer-fg-color: #ffffff;
  --md-footer-fg-color--light: rgba(255, 255, 255, 0.78);
  --md-footer-fg-color--lighter: rgba(255, 255, 255, 0.55);
}

/* Force light scheme even if OS prefers dark */
html {
  color-scheme: light;
}

body {
  background: #ffffff;
  color: #1a1a1a;
}

/* Footer layout */
.tev-footer {
  background: var(--md-footer-bg-color);
  color: var(--md-footer-fg-color);
  padding: 1.25rem 0 1.75rem;
  margin-top: 2rem;
}

.tev-footer a {
  color: #c5d8ef;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tev-footer a:hover {
  color: #ffffff;
}

.tev-footer__disclaimer {
  max-width: 56rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--md-footer-fg-color--light);
  margin-bottom: 1rem;
}

.tev-footer__legal {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--md-footer-fg-color--lighter);
}

.tev-footer__links {
  margin-top: 0.35rem;
}

/* Placeholder / scaffold callouts */
.tev-scaffold-note {
  border-left: 4px solid #1e4d7b;
  background: #f0f4f9;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

/* Tables: readable clinical style */
.md-typeset table:not([class]) {
  font-size: 0.85rem;
}

/* --- WCAG 2.1 AA accessibility fixes --- */

/* 1. Links distinguishable without relying on color (1.4.1): underline in-body
      links. The Material theme only underlines on hover; always underline so
      colorblind / low-vision users can identify links. */
.md-typeset a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
/* Remove underline from images that are links / nav chrome where not needed. */
.md-header a,
.md-nav__link,
.md-footer a {
  text-decoration: none;
}
.md-typeset a:not([class]) {
  text-decoration: underline;
}
.md-typeset a:hover,
.md-typeset a:focus {
  text-decoration-thickness: 2px;
}

/* 2. Scrollable regions must have keyboard access (2.1.1): Material wide-table
      scroll wraps and code blocks need to be focusable so keyboard users can
      scroll them. */
.md-typeset__scrollwrap,
.md-typeset .highlight,
.md-typeset__table {
  overflow-x: auto;
}
.md-typeset__scrollwrap:focus,
.md-typeset .highlight:focus,
.md-typeset__table:focus {
  outline: 2px solid var(--md-accent-fg-color, #1e4d7b);
  outline-offset: 2px;
}

/* 3. Visible keyboard focus indicator (2.4.7) on all interactive elements. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--md-accent-fg-color, #1e4d7b);
  outline-offset: 2px;
}

.md-typeset table:not([class]) th {
  background: #0b1f3a;
  color: #ffffff;
  font-weight: 600;
}

.md-typeset table:not([class]) tr:nth-child(even) {
  background: #f7f9fc;
}

/* Admonitions keep navy tone */
.md-typeset .admonition.note,
.md-typeset details.note {
  border-color: #1e4d7b;
}

.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
  background-color: rgba(30, 77, 123, 0.12);
}

.md-typeset .note > .admonition-title::before,
.md-typeset .note > summary::before {
  background-color: #1e4d7b;
}
