/* Brand palette sampled from the logo artwork. Material's stock "deep purple"
   (#673AB7) is close but is not the Track & Trace Tools purple. */
:root {
  --t3-purple-deep: #49276a;
  --t3-purple-mid: #653482;
  --t3-purple-light: #7c3e95;
  --t3-card-shadow: rgba(73, 39, 106, 0.18);
}

[data-md-color-scheme="slate"] {
  --t3-card-shadow: rgba(0, 0, 0, 0.45);
}

/* ----------------------------------------------------------------- cards */

/* The landing page holds four section cards beside the nav sidebar, so two
   columns is the widest that leaves the link lists readable. */
.md-typeset .grid.cards {
  grid-template-columns: repeat(2, 1fr);
}

@media screen and (max-width: 59.9375em) {
  .md-typeset .grid.cards {
    grid-template-columns: 1fr;
  }
}

.md-typeset .grid.cards > ul > li {
  position: relative;
  overflow: hidden;
  border-radius: 0.6rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.md-typeset .grid.cards > ul > li::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  opacity: 0;
  background: linear-gradient(90deg, var(--t3-purple-deep), var(--t3-purple-light));
  transition: opacity 0.25s;
}

.md-typeset .grid.cards > ul > li:focus-within,
.md-typeset .grid.cards > ul > li:hover {
  border-color: var(--t3-purple-light);
  box-shadow: 0 0.4rem 1.2rem var(--t3-card-shadow);
}

.md-typeset .grid.cards > ul > li:focus-within::before,
.md-typeset .grid.cards > ul > li:hover::before {
  opacity: 1;
}

.md-typeset .grid.cards > ul > li .twemoji {
  color: var(--t3-purple-light);
}

.md-typeset .grid.cards > ul > li > p:first-child .twemoji {
  --md-icon-size: 1.8rem;
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li .twemoji {
  color: #b088d4;
}

/* Link lists inside a card are navigation, not prose, so they sit tighter
   than a normal list and drop the bullets. */
.md-typeset .grid.cards > ul > li > ul {
  margin: 0.4rem 0 0.8rem;
  padding: 0;
  list-style: none;
}

.md-typeset .grid.cards > ul > li > ul > li {
  margin: 0;
  padding: 0.12rem 0;
  line-height: 1.5;
}

/* ---------------------------------------------------------- header logo */

/* The badge is dark purple and the header bar is deep purple, so without
   reversing it the mark is close to invisible. */
.md-header__button.md-logo img,
.md-nav__button.md-logo img {
  filter: brightness(0) invert(1);
}

/* ---------------------------------------------------- screenshot callouts */

/* main.py emits this class on every screenshot callout list. Nothing had ever
   styled it, so the lists rendered as a plain ordered list. */
.md-typeset ol.screenshot-callouts {
  margin: 0.6rem 0 1.2rem;
  padding: 0;
  list-style: none;
  counter-reset: t3-callout;
}

.md-typeset ol.screenshot-callouts > li {
  position: relative;
  margin: 0 0 0.5rem;
  padding-left: 2rem;
  line-height: 1.6;
  counter-increment: t3-callout;
}

.md-typeset ol.screenshot-callouts > li::before {
  content: counter(t3-callout);
  position: absolute;
  top: 0.12rem;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--t3-purple-deep), var(--t3-purple-light));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .md-typeset .grid.cards > ul > li,
  .md-typeset .grid.cards > ul > li::before {
    transition: none;
  }
}
