/* ---------- light mode: blue ---------- */
article h1, article h2, article h3, article h4 {
  color: #1d4ed8 !important;
  font-weight: 700;
  letter-spacing: -0.02em;
}
article h1 {
  padding-bottom: 0.4em;
  border-bottom: 3px solid #1d4ed8;
}

body {
  --sd-color-primary: #1d4ed8;
  --sd-color-primary-highlight: #1e3a8a;
  --sd-color-primary-text: #ffffff;
  --sd-color-secondary: #1d4ed8;
  --sd-color-secondary-highlight: #1e3a8a;
  --sd-color-secondary-text: #ffffff;
}

.sd-card { border-radius: 10px; border: 1px solid #d5dbe8; }
.sd-card:hover { border-color: #1d4ed8; }

table.docutils thead th {
  background: #1d4ed8;
  color: #fff;
}

/* ---------- dark mode: red and black ---------- */
body[data-theme="dark"] article h1,
body[data-theme="dark"] article h2,
body[data-theme="dark"] article h3,
body[data-theme="dark"] article h4 { color: #ff3b4e !important; }
body[data-theme="dark"] article h1 { border-bottom-color: #ff3b4e; }

body[data-theme="dark"] {
  --sd-color-primary: #ff3b4e;
  --sd-color-primary-highlight: #ff6572;
  --sd-color-primary-text: #0a0a0b;
  --sd-color-secondary: #ff3b4e;
  --sd-color-secondary-highlight: #ff6572;
  --sd-color-secondary-text: #0a0a0b;
}
body[data-theme="dark"] .sd-card { border-color: #2a2a2e; }
body[data-theme="dark"] .sd-card:hover { border-color: #ff3b4e; }
body[data-theme="dark"] table.docutils thead th { background: #d90429; }

@media (prefers-color-scheme: dark) {
  body:not([data-theme="light"]) article h1,
  body:not([data-theme="light"]) article h2,
  body:not([data-theme="light"]) article h3,
  body:not([data-theme="light"]) article h4 { color: #ff3b4e !important; }
  body:not([data-theme="light"]) article h1 { border-bottom-color: #ff3b4e; }

  body:not([data-theme="light"]) {
    --sd-color-primary: #ff3b4e;
    --sd-color-primary-highlight: #ff6572;
    --sd-color-primary-text: #0a0a0b;
    --sd-color-secondary: #ff3b4e;
    --sd-color-secondary-highlight: #ff6572;
    --sd-color-secondary-text: #0a0a0b;
  }
  body:not([data-theme="light"]) .sd-card { border-color: #2a2a2e; }
  body:not([data-theme="light"]) .sd-card:hover { border-color: #ff3b4e; }
  body:not([data-theme="light"]) table.docutils thead th { background: #d90429; }
}

/* card titles */
.sd-card-title { color: #1d4ed8 !important; }

body[data-theme="dark"] .sd-card-title { color: #ff3b4e !important; }

@media (prefers-color-scheme: dark) {
  body:not([data-theme="light"]) .sd-card-title { color: #ff3b4e !important; }
}