/* Copyright (c) 2026, Timo Pallach (timo@pallach.de). */

/* One rounding for the site: the boxes' (the features, the newest release) and every element of
   the theme's that came almost square -- half of it for the small ones (inline code, keys, the
   copy button), which would look like pills otherwise. */
:root {
  --fm-radius: 0.4rem;
  --fm-radius-small: 0.2rem;
}

.md-typeset .md-button,
.md-search__form,
.md-typeset table:not([class]),
.md-typeset pre > code,
.md-typeset .admonition,
.md-typeset details,
.md-typeset details:not([open]) > summary,
.md-typeset .tabbed-set,
.md-tooltip,
.md-tooltip2__inner,
.md-dialog,
.md-select__inner,
.md-select__list,
.md-skip {
  border-radius: var(--fm-radius);
}

.md-typeset code,
.md-typeset kbd,
.md-clipboard {
  border-radius: var(--fm-radius-small);
}

/* The search, open: the form's top corners round, the results' bottom ones -- together a box. */
[data-md-toggle="search"]:checked ~ .md-header .md-search__form {
  border-radius: var(--fm-radius) var(--fm-radius) 0 0;
}

.md-search__output {
  border-radius: 0 0 var(--fm-radius) var(--fm-radius);
  overflow: hidden;
}

/* WCAG 2.1 AA (bin/lib/check_site.js): the top tabs in full white -- the theme dims the unselected
   ones below 4.5:1 on indigo; the selected one says so by weight and an underline, not by
   brightness. Links in running text are underlined: colour alone does not tell them (1.4.1). */
.md-tabs__link {
  opacity: 1;
}

.md-tabs__item--active .md-tabs__link {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* Two of the theme's greys just below 4.5:1: the footer's copyright line, code comments (light). */
.md-copyright {
  color: hsl(0deg 0% 100% / 60%);
}

[data-md-color-scheme="default"] {
  --md-code-hl-comment-color: #5f5f5f;
}

.md-typeset p a:not(.md-button),
.md-typeset li a:not(.md-button),
.md-typeset td a:not(.md-button) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* The overview's hero (overrides/home.html). */
.fm-hero {
  background: linear-gradient(
    135deg,
    var(--md-primary-fg-color),
    var(--md-accent-fg-color)
  );
  color: var(--md-primary-bg-color);
}

.fm-hero__inner {
  padding: 3.5rem 0.8rem 3rem;
}

.md-typeset .fm-hero__title {
  margin: 0 0 0.6rem;
  color: inherit;
  font-size: 2.6rem;
  font-weight: 700;
}

.fm-hero__tagline {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  line-height: 1.4;
}

.fm-hero__text {
  max-width: 38rem;
  opacity: 0.9;
}

.md-typeset .fm-hero__actions .md-button {
  margin: 0.4rem 0.6rem 0.4rem 0;
  border-color: var(--md-primary-bg-color);
  color: var(--md-primary-bg-color);
}

.md-typeset .fm-hero__actions .md-button--primary {
  background-color: var(--md-primary-bg-color);
  color: var(--md-primary-fg-color);
}

.fm-hero__release {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  opacity: 0.85;
}

/* The features' grid (index.md). */
.md-typeset .fm-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin: 1.2rem 0 2rem;
}

.md-typeset .fm-card {
  padding: 0.8rem 1rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: var(--fm-radius);
}

.md-typeset .fm-card h3 {
  margin-top: 0;
}

/* The download page's newest release (download.md, generated). */
.md-typeset .fm-latest h2 {
  margin-top: 0;
}

.md-typeset .fm-latest {
  padding: 1rem 1.2rem;
  border: 2px solid var(--md-accent-fg-color);
  border-radius: var(--fm-radius);
}

/* Each feature's icon in a tinted tile (Octicons, inlined at build: nothing loaded). */
.md-typeset .fm-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 0.6rem;
  border: 1px solid
    color-mix(in srgb, var(--md-typeset-a-color) 28%, transparent);
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--md-typeset-a-color) 12%, transparent);
  color: var(--md-typeset-a-color);
  transition: transform 0.3s;
}
.md-typeset .fm-card__icon svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentcolor;
}
.md-typeset .fm-card:hover .fm-card__icon {
  transform: scale(1.1);
}
@media (prefers-reduced-motion: reduce) {
  .md-typeset .fm-card__icon {
    transition: none;
  }
  .md-typeset .fm-card:hover .fm-card__icon {
    transform: none;
  }
}
