/* Palette, typography and spacing on top of mkdocs-material (mkdocs.yml, extra_css). */

:root {
  --md-text-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --md-code-font: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

/* The header takes the page's own background and carries the navy wordmark; teal accent. */
[data-md-color-primary="custom"] {
  --md-primary-fg-color: #ffffff;
  --md-primary-fg-color--light: #f4f6f8;
  --md-primary-fg-color--dark: #e6eaef;
  --md-primary-bg-color: #0b1f44;
  --md-primary-bg-color--light: #0b1f44a6;
  --md-typeset-a-color: #0b6e75;
}

[data-md-color-accent="custom"] {
  --md-accent-fg-color: #0e8a8f;
  --md-accent-fg-color--transparent: #0e8a8f1a;
}

[data-md-color-scheme="slate"][data-md-color-primary="custom"] {
  --md-default-bg-color: #12171d;
  --md-primary-fg-color: #12171d;
  --md-primary-fg-color--light: #1b222b;
  --md-primary-fg-color--dark: #0d1116;
  --md-primary-bg-color: #e8ebef;
  --md-primary-bg-color--light: #e8ebefa6;
  --md-typeset-a-color: #5cc8c8;
}

[data-md-color-scheme="slate"][data-md-color-accent="custom"] {
  --md-accent-fg-color: #7fdada;
}

/* A measure of roughly 80 characters; tables and code still use the full column. */
.md-typeset p,
.md-typeset li,
.md-typeset blockquote {
  max-width: 44rem;
}

.md-typeset {
  font-size: 0.78rem;
  line-height: 1.65;
}

.md-typeset h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--md-default-fg-color);
}

.md-typeset h2,
.md-typeset h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.md-typeset h2 {
  margin-top: 2.2em;
}

/* Reference pages are mostly tables: keep them dense and let them scroll on a phone. */
.md-typeset table:not([class]) {
  font-size: 0.72rem;
  display: block;
  overflow-x: auto;
}

.md-typeset table:not([class]) th {
  white-space: nowrap;
}

.md-typeset table:not([class]) td {
  font-variant-numeric: tabular-nums;
}

.md-typeset pre > code {
  font-size: 0.7rem;
}

.md-typeset code {
  word-break: normal;
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  padding: 0.45em 1em;
}

/* The first paragraph of a page, under its title, is its lede. */
.md-content__inner > h1:first-child + p {
  font-size: 0.86rem;
}

/* Header: no logo, the site name alone; a hairline under the tabs instead of a band of colour. */
.md-header__button.md-logo,
.md-nav__title .md-logo {
  display: none;
}

.md-header__title {
  font-weight: 650;
}

/* With no logo before it, the site name lines up with the tabs under it. */
@media screen and (min-width: 76.25em) {
  [dir="ltr"] .md-header__title {
    margin-left: 0.6rem;
  }
}

.md-header {
  box-shadow: none;
}

.md-header--shadow,
.md-tabs {
  box-shadow: 0 1px 0 var(--md-default-fg-color--lightest);
}

.md-tabs__link {
  font-weight: 500;
}

@media screen and (min-width: 60em) {
  .md-search__form {
    background-color: var(--md-default-fg-color--lightest);
    border-radius: 0.2rem;
  }
}

.md-search__input::placeholder,
.md-search__icon {
  color: var(--md-default-fg-color--light);
}

/* The drawer's title is the site name, without the room Material keeps for a logo. */
.md-nav--primary > .md-nav__title[for="__drawer"] {
  height: auto;
  padding: 1rem 0.8rem;
  line-height: 1.5;
  box-shadow: 0 1px 0 var(--md-default-fg-color--lightest);
}

/* Home page: the logo's animation, two ways in, then the features. */
.fastmm-hero {
  padding: 1.2rem 0 0.4rem;
  text-align: center;
}

.md-typeset .fastmm-hero h1 {
  margin: 0 0 1.6rem;
}

.fastmm-hero img {
  width: 100%;
  max-width: 24rem;
  height: auto;
}

.fastmm-hero--dark,
[data-md-color-scheme="slate"] .fastmm-hero--light {
  display: none !important;
}

[data-md-color-scheme="slate"] .fastmm-hero--dark {
  display: inline !important;
}

.md-content__inner:has(.fastmm-hero) > .md-content__button {
  display: none;
}

.md-typeset .fastmm-hero .md-button {
  margin: 0 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.2rem;
  color: var(--md-default-fg-color);
  border-color: var(--md-default-fg-color--lighter);
}

.md-typeset .fastmm-hero .md-button--primary {
  background-color: #0b1f44;
  border-color: #0b1f44;
  color: #ffffff;
}

[data-md-color-scheme="slate"] .md-typeset .fastmm-hero .md-button--primary {
  background-color: #e8ebef;
  border-color: #e8ebef;
  color: #0b1f44;
}

.md-typeset .fastmm-hero .md-button:hover {
  border-color: var(--md-accent-fg-color);
}

/* The features: a grid of links, each a title and one sentence. */
.md-typeset ul.fastmm-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem 1rem;
  margin: 2rem -0.8rem 1rem;
  padding: 0;
  list-style: none;
}

@media screen and (min-width: 45em) {
  .md-typeset ul.fastmm-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 60em) {
  .md-typeset ul.fastmm-features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.md-typeset ul.fastmm-features li {
  max-width: none;
  margin: 0;
}

.md-typeset ul.fastmm-features a {
  display: block;
  height: 100%;
  padding: 0.8rem;
  border-radius: 0.3rem;
  color: var(--md-default-fg-color--light);
  transition: background-color 0.15s;
}

.md-typeset ul.fastmm-features a:hover {
  background-color: var(--md-default-fg-color--lightest);
}

.md-typeset ul.fastmm-features strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--md-default-fg-color);
  font-weight: 600;
}

.md-typeset ul.fastmm-features strong::after {
  content: " →";
  color: var(--md-default-fg-color--lighter);
  transition: color 0.15s;
}

.md-typeset ul.fastmm-features a:hover strong::after {
  color: var(--md-typeset-a-color);
}

.md-typeset ul.fastmm-features span {
  display: block;
}

.md-typeset ul.fastmm-features code {
  color: inherit;
}

/* The two films, on the home page and on How it works: a poster until played, nothing loaded before. */
.md-typeset .fastmm-video {
  display: block;
  width: 100%;
  max-width: 44rem;
  margin: 1.6rem auto 0;
  border-radius: 0.3rem;
  background: #0b1f44;
  box-shadow: 0 0 0 1px var(--md-default-fg-color--lightest);
}

/* Home page: the films, one card each (docs/README.md "Films"). */
.md-typeset .fastmm-films > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.md-typeset .fastmm-films > ul > li {
  margin: 0;
  color: var(--md-default-fg-color--light);
  font-size: 0.7rem;
  line-height: 1.5;
}
.md-typeset .fastmm-films > ul > li > p { margin: 0; }
.md-typeset .fastmm-films a {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--md-default-fg-color);
  font-size: 0.8rem;
}
.md-typeset .fastmm-films a:hover { color: var(--md-accent-fg-color); }
.md-typeset .fastmm-films img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 0.45rem;
  border-radius: 0.3rem;
  box-shadow: 0 0 0 1px var(--md-default-fg-color--lightest);
  transition: transform 0.15s ease;
}
.md-typeset .fastmm-films a:hover img { transform: translateY(-2px); }

