/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright 2026 VoodooMods */

/* Colours from the logo: chip charcoal, beak orange. Link colours keep
   WCAG AA contrast (4.5:1) on both page backgrounds. */
:root,
[data-md-color-primary="custom"] {
  --md-primary-fg-color: #18181b;
  --md-primary-fg-color--light: #3f3f46;
  --md-primary-fg-color--dark: #09090b;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);
}
[data-md-color-accent="custom"] {
  --md-accent-fg-color: #ea7a0c;
  --md-accent-fg-color--transparent: rgba(234, 122, 12, 0.1);
  --md-accent-bg-color: #ffffff;
  --md-accent-bg-color--light: rgba(255, 255, 255, 0.7);
}
[data-md-color-scheme="default"] {
  --md-typeset-a-color: #b45309;
  --mg-card-border: #e4e4e7;
  --mg-muted: #52525b;
}
[data-md-color-scheme="slate"] {
  --md-typeset-a-color: #fb923c;
  --mg-card-border: #3f3f46;
  --mg-muted: #a1a1aa;
}

/* Header logo: the head crop, a little larger than the default 24 px. */
.md-header__button.md-logo img { height: 2rem; width: auto; }

/* Keep wide tables scrollable on phones instead of squeezing them. */
.md-typeset table:not([class]) { display: block; overflow-x: auto; }

/* ---------- Home page ---------- */
.mg-hero {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin: 0.5rem 0 2rem;
}
.md-typeset .mg-hero__logo {
  flex: 0 0 auto;
  width: 14rem;
  height: 14rem;
  max-width: none;
}
.md-typeset .mg-hero .headerlink { display: none; }
.mg-hero__text { flex: 1 1 auto; min-width: 0; }
.md-typeset .mg-hero h1 {
  margin: 0 0 0.6rem;
  font-weight: 800;
  font-size: 2.6em;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--md-default-fg-color);
}
.md-typeset .mg-hero__lead {
  font-size: 1.15em;
  line-height: 1.55;
  color: var(--mg-muted);
  margin: 0 0 1.2rem;
}
.md-typeset .mg-hero .md-button { margin: 0.2rem 0.4rem 0.2rem 0; }
/* Material draws outline buttons in the primary colour, which is the
   charcoal of the header: invisible on the dark scheme. */
.md-typeset .md-button:not(.md-button--primary) {
  color: var(--md-default-fg-color);
  border-color: var(--mg-card-border);
}
.md-typeset .md-button:not(.md-button--primary):hover,
.md-typeset .md-button:not(.md-button--primary):focus {
  color: var(--md-typeset-a-color);
  border-color: var(--md-typeset-a-color);
  background-color: transparent;
}
.md-typeset .md-button--primary {
  background-color: var(--md-accent-fg-color);
  border-color: var(--md-accent-fg-color);
  color: #18181b;
}
.md-typeset .md-button--primary:hover,
.md-typeset .md-button--primary:focus {
  background-color: #c2410c;
  border-color: #c2410c;
  color: #ffffff;
}

@media screen and (max-width: 44.9375em) {
  .mg-hero { flex-direction: column; text-align: center; gap: 1rem; }
  .md-typeset .mg-hero__logo { width: 9rem; height: 9rem; }
  .md-typeset .mg-hero h1 { font-size: 2em; }
}

/* Key figures strip */
.mg-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.8rem;
  margin: 1.5rem 0 2rem;
}
.mg-stat {
  border: 1px solid var(--mg-card-border);
  border-radius: 0.6rem;
  padding: 0.8rem 1rem;
}
.md-typeset .mg-stat strong {
  display: block;
  font-size: 1.6em;
  line-height: 1.2;
  color: var(--md-default-fg-color);
}
.md-typeset .mg-stat span { font-size: 0.85em; color: var(--mg-muted); }

/* Feature grid (Material's own grid cards, slightly tightened) */
.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card { border-radius: 0.6rem; }

/* ---------- Figures ---------- */

/* Charts and diagrams are inline SVG, so they follow the light/dark toggle.
   On a phone they keep a readable size and scroll sideways in their box. */
.md-typeset .mg-chart {
  /* Each SVG has 14 units of padding round an 880-unit drawing, for when it
     is shown as an image on its own background. Here the box is that much
     wider than the text column, so the drawing lines up with the text. */
  margin: 1.5rem max(-14px, -1.591%);
  max-width: 103.182%;
  overflow-x: auto;
}
.md-typeset .mg-chart svg {
  display: block;
  min-width: 660px;
  margin: 0 auto;
}

/* Screenshots: a thin frame, so a dark screenshot doesn't bleed into a dark page. */
.md-typeset .mg-shot { margin: 1.5rem 0; }
.md-typeset .mg-shot img {
  border: 1px solid var(--mg-card-border);
  border-radius: 0.6rem;
  height: auto;
}
.md-typeset .mg-shot figcaption {
  max-width: 44rem;
  color: var(--mg-muted);
}
