/* The app's blue, --cat-blue in frontend/src/style.css. */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #1e66f5;
  --md-primary-fg-color--light: #4a85f7;
  --md-primary-fg-color--dark: #1a56cf;
  --md-accent-fg-color: #1e66f5;
  --md-accent-fg-color--transparent: #1e66f51a;
  --md-typeset-a-color: #1e66f5;
}

/* Light enough here that the header's text has to be dark. */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #89b4fa;
  --md-primary-fg-color--light: #a6c8fb;
  --md-primary-fg-color--dark: #6d9ff0;
  --md-primary-bg-color: #1e1e2e;
  --md-primary-bg-color--light: #1e1e2eb3;
  --md-accent-fg-color: #89b4fa;
  --md-accent-fg-color--transparent: #89b4fa1a;
  --md-typeset-a-color: #89b4fa;
}

.md-content__button.copied {
  color: var(--md-accent-fg-color);
}

.md-header__topic .changelog-link {
  margin-left: 0.8rem;
  font-size: 0.65rem;
  color: var(--md-primary-bg-color--light);
}

.md-header__topic .changelog-link:hover {
  color: var(--md-primary-bg-color);
}

/* One screen for the index of every annotation. */
.md-typeset .annotation-index table:not([class]) th,
.md-typeset .annotation-index table:not([class]) td {
  padding: 0.05em 0.8em;
  line-height: 1.4;
}

/* Small enough that the three cards start on the first screen. */
.md-typeset img.hero {
  max-width: min(34rem, 100%);
}

/* Not display on the image, or it would beat the rule that hides the other theme's copy. */
.md-typeset p:has(> img.hero) {
  text-align: center;
}

.md-typeset h1.landing-title {
  color: var(--md-typeset-a-color);
  font-size: 2.8em;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25em;
}

/* An example page's code cell: its name is a header on its code, as in the editor, so
   it reads apart from the notebook's prose headings. */
.md-typeset h2.nb-cell {
  margin: 1.8em 0 0;
  padding: 0.4em 1.2em;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.6;
  color: var(--md-default-fg-color--light);
  background: var(--md-code-bg-color);
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.2rem 0.2rem 0 0;
}

/* Its worker, loop or variant, on the header. */
.md-typeset h2.nb-cell + p:has(> sub:only-child) {
  margin: 0;
  padding: 0 1.2em 0.3em;
  background: var(--md-code-bg-color);
}

.md-typeset h2.nb-cell + .highlight pre,
.md-typeset h2.nb-cell + p:has(> sub:only-child) + .highlight pre {
  margin-top: 0;
}

.md-typeset h2.nb-cell + .highlight pre > code,
.md-typeset h2.nb-cell + p:has(> sub:only-child) + .highlight pre > code {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
