/* Scoreline's colours, taken from the logo: the dark panel for the header, the leader's green for links and accents.
   Every text colour here has a contrast of at least 4.5:1 to its background (WCAG AA). */

[data-md-color-primary="custom"] {
  --md-primary-fg-color: #232a35;        /* the logo's panel */
  --md-primary-fg-color--light: #46505f; /* its light edge */
  --md-primary-fg-color--dark: #141920;  /* its dark edge */
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: #ffffffb3;
}

/* Light mode: a darker green, since the logo's green is too light on white (5.0:1) */
[data-md-color-scheme="default"][data-md-color-accent="custom"] {
  --md-accent-fg-color: #1a7f45;
  --md-accent-fg-color--transparent: #1a7f451a;
  --md-typeset-a-color: #1a7f45;
}

/* Dark mode: the logo's green on a background close to its panel (9.9:1) */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #1a1f27;
  --md-code-bg-color: #232a35;
  --md-footer-bg-color: #141920;
  --md-footer-bg-color--dark: #0b0e13;
}

[data-md-color-scheme="slate"][data-md-color-accent="custom"] {
  --md-accent-fg-color: #5fe08a;
  --md-accent-fg-color--transparent: #5fe08a1a;
  --md-typeset-a-color: #5fe08a;
}

/* Tiles: square corners like the logo's panel, and the accent colour on hover */
.md-typeset .grid.cards > ul > li {
  border-radius: 0;
}

.md-typeset .grid.cards > ul > li:hover {
  border-color: var(--md-accent-fg-color);
}

/* The whole tile is clickable: its one link covers it ("stretched link") */
.md-typeset .grid.cards > ul > li {
  position: relative;
}

.md-typeset .grid.cards > ul > li a::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* The logo in the header as tall as the search field (1.8rem) instead of Material's 1.2rem */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.8rem;
}

.md-header__button.md-logo {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}
