/* Use the same locally served font files as the standalone API reference. */
:root {
  --md-text-font: var(--font-sans);
  --md-code-font: var(--font-mono);
}

/* The artwork's transparent framing needs a larger box than a solid icon. */
.md-header__inner {
  min-height: 2.8rem;
}

.md-header__button.md-logo {
  display: flex;
  align-items: center;
  padding: 0;
}

.md-header__button.md-logo picture {
  display: block;
}

.md-header__button.md-logo img {
  width: 48px;
  height: 48px;
}

.md-header .md-header__title {
  min-width: 0;
  margin-left: 0.2rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.md-header__button[for="__drawer"] {
  order: -1;
}

@media (max-width: 76.234375em) {
  .md-header__button.md-logo img {
    width: 40px;
    height: 40px;
  }

  .md-header .md-header__title {
    margin-left: 0.1rem;
  }
}

.md-typeset .home-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  color: var(--md-default-fg-color);
}

.home-title picture {
  display: block;
  flex: 0 0 auto;
}

.md-typeset .home-title img {
  display: block;
  width: clamp(80px, 12vw, 128px);
  height: auto;
  object-fit: contain;
}

/* Feature cards on the home page. */
.md-typeset .grid.cards > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  padding: 0;
  margin: 1em 0;
  list-style: none;
}

.md-typeset .grid.cards > ul > li {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.5rem;
  padding: 1rem 1.2rem;
  margin: 0;
  transition: border-color 125ms, box-shadow 125ms;
}

.md-typeset .grid.cards > ul > li:hover {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 0 0.4rem rgba(0, 0, 0, 0.07);
}

.md-typeset .grid.cards > ul > li > p:first-child {
  margin-top: 0;
  font-weight: 600;
}

/* Keep wide tables and diagrams inside their own scroll area. */
.md-typeset table:not([class]) {
  display: block;
  overflow-x: auto;
}

/* Commands and device identifiers read better slightly tighter. */
.md-typeset code {
  font-size: 0.85em;
  font-variant-numeric: tabular-nums slashed-zero;
  font-variant-ligatures: none;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.md-typeset pre code {
  font-variant-ligatures: common-ligatures contextual;
}

/* Documentation version chip in the footer. */
.docs-version {
  padding: 0.4rem 0.8rem 0.8rem;
  font-size: 0.7rem;
}

.docs-version__chip {
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 1rem;
  color: var(--md-default-fg-color--light);
}

/* The GameshowPro house palette, as the web page uses it: the neutrals are GspHouseTheme's (GameshowPro.Common.Blazor)
   and the accent is TriggerGateAccent's logo yellow (src/GameshowPro.TriggerGate.WebApp/TriggerGateAccent.cs). Keep the
   values in step with those two files. mkdocs.yml sets primary and accent to "custom" so that these apply. */
:root {
  --tg-accent-fill: #ffe600;
  --tg-accent-on-fill: #16191d;
}

[data-md-color-scheme="default"] {
  --tg-line: #e2e6ea;
  --md-default-bg-color: #f5f6f8;
  --md-default-fg-color: #16191d;
  --md-default-fg-color--light: #667085;
  --md-default-fg-color--lightest: #e2e6ea;
  --md-typeset-color: #16191d;
  --md-code-bg-color: #f0f2f5;
  --md-code-fg-color: #16191d;
  --md-primary-fg-color: #ffffff;
  --md-primary-fg-color--light: #ffffff;
  --md-primary-fg-color--dark: #f0f2f5;
  --md-primary-bg-color: #16191d;
  --md-primary-bg-color--light: #667085;
  --md-accent-fg-color: #7b6f00;
  --md-accent-fg-color--transparent: rgba(123, 111, 0, 0.1);
  --md-typeset-a-color: #7b6f00;
  --md-footer-bg-color: #16191d;
  --md-footer-bg-color--dark: #0c0d10;
}

[data-md-color-scheme="slate"] {
  --tg-line: #2a2f38;
  --tg-accent-on-fill: #13151a;
  --md-default-bg-color: #13151a;
  --md-default-fg-color: #e8eaed;
  --md-default-fg-color--light: #98a2b3;
  --md-default-fg-color--lightest: #2a2f38;
  --md-typeset-color: #e8eaed;
  --md-code-bg-color: #1b1e24;
  --md-code-fg-color: #e8eaed;
  --md-primary-fg-color: #1b1e24;
  --md-primary-fg-color--light: #1b1e24;
  --md-primary-fg-color--dark: #15171c;
  --md-primary-bg-color: #e8eaed;
  --md-primary-bg-color--light: #98a2b3;
  --md-accent-fg-color: #ffe600;
  --md-accent-fg-color--transparent: rgba(255, 230, 0, 0.1);
  --md-typeset-a-color: #ffe600;
  --md-footer-bg-color: #1b1e24;
  --md-footer-bg-color--dark: #15171c;
}

/* The header is a panel, as in the web page: a line under it in place of a shadow. */
.md-header {
  border-bottom: 1px solid var(--tg-line);
  box-shadow: none;
}

/* The pre-release notice and primary buttons use the accent as a fill. */
.md-banner {
  background-color: var(--tg-accent-fill);
  color: var(--tg-accent-on-fill);
}

.md-banner a {
  color: inherit;
  text-decoration: underline;
}

.md-typeset .md-button {
  color: var(--md-typeset-a-color);
  border-color: currentcolor;
}

.md-typeset .md-button--primary,
.md-typeset .md-button:is(:focus, :hover) {
  background-color: var(--tg-accent-fill);
  border-color: var(--tg-accent-fill);
  color: var(--tg-accent-on-fill);
}

/* Home page: the button-separation chart. Rows of name, bar on a linear track (0 to 150 ms, a
   gridline every 50 ms) and value. The shortest bars keep a 2px sliver so they stay visible. A bar's length is its --p custom property. Platform bars use the logo blue
   (TriggerGateAccent.Secondary); reference durations are hatched gray, so the two kinds differ by more than color. */
.sep-chart {
  --sep-bar: #2e6fb7;
  --sep-ref: #98a2b3;
  --sep-name-width: 11.5rem;
  --sep-value-width: 4.8rem;
  margin: 1.5em 0;
  font-size: 0.72rem;
}

[data-md-color-scheme="slate"] .sep-chart {
  --sep-bar: #5c96d6;
  --sep-ref: #566074;
}

.sep-row,
.sep-axis {
  display: grid;
  grid-template-columns: var(--sep-name-width) minmax(0, 1fr) var(--sep-value-width);
  align-items: center;
  column-gap: 0.6rem;
}

.sep-row {
  padding: 0.22rem 0;
}

.sep-row:hover {
  background-color: var(--md-accent-fg-color--transparent);
}

.sep-name {
  line-height: 1.25;
}

.sep-row--ref .sep-name,
.sep-row--ref .sep-value {
  color: var(--md-default-fg-color--light);
  font-style: italic;
}

.sep-value {
  font-family: var(--md-code-font);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sep-track {
  display: block;
  align-self: stretch;
  min-height: 1.1rem;
  background-image: linear-gradient(to right, var(--tg-line) 1px, transparent 1px);
  background-size: 33.3333% 100%;
  border-right: 1px solid var(--tg-line);
}

.sep-bar {
  display: block;
  position: relative;
  top: 50%;
  width: var(--p);
  min-width: 2px;
  height: 0.6rem;
  transform: translateY(-50%);
  border-radius: 0 4px 4px 0;
  background-color: var(--sep-bar);
}

.sep-row--ref .sep-bar,
.sep-swatch.sep-swatch--ref {
  background-color: transparent;
  background-image: repeating-linear-gradient(135deg, var(--sep-ref) 0 2px, transparent 2px 5px);
  box-shadow: inset 0 0 0 1px var(--sep-ref);
}

.sep-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
  margin: 0 0 0.5rem;
  color: var(--md-default-fg-color--light);
}

.sep-swatch {
  display: inline-block;
  width: 1.4rem;
  height: 0.6rem;
  margin-right: 0.4rem;
  border-radius: 0 4px 4px 0;
  background-color: var(--sep-bar);
  vertical-align: baseline;
}

.sep-ticks {
  display: flex;
  justify-content: space-between;
  padding-top: 0.25rem;
  color: var(--md-default-fg-color--light);
  font-family: var(--md-code-font);
  font-size: 0.58rem;
}

.sep-ticks b {
  width: 0;
  font-weight: 400;
  white-space: nowrap;
  display: flex;
  justify-content: center;
}

.sep-ticks b:first-child {
  justify-content: flex-start;
}

.sep-ticks b:last-child {
  justify-content: flex-end;
}

.md-typeset .sep-note {
  margin: 0.6rem 0 0;
  color: var(--md-default-fg-color--light);
  font-size: 0.66rem;
}

/* Narrow screens: the name moves above its bar. */
@media (max-width: 44.984375em) {
  .sep-row,
  .sep-axis {
    grid-template-columns: minmax(0, 1fr) var(--sep-value-width);
  }

  .sep-name {
    grid-column: 1 / -1;
  }

  .sep-axis > span:first-child {
    display: none;
  }
}
