:root {
  --s50-reading-width: 72ch;
}

.md-grid {
  max-width: 90rem;
}

.md-content__inner {
  max-width: var(--s50-reading-width);
  margin-inline: auto;
}

.md-typeset {
  font-size: 0.82rem;
  line-height: 1.7;
}

.md-typeset h1 {
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.md-typeset h2 {
  margin-top: 2.4em;
  margin-bottom: 0.8em;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.md-typeset h3 {
  margin-top: 1.8em;
}

.md-typeset p,
.md-typeset li {
  text-wrap: pretty;
}

.md-typeset code {
  overflow-wrap: anywhere;
}

.md-typeset .highlight,
.md-typeset table:not([class]) {
  margin-block: 1.25rem;
}

.md-typeset table:not([class]) {
  display: table;
  width: 100%;
}

.md-typeset .admonition,
.md-typeset details {
  font-size: inherit;
}

.md-typeset .md-button {
  margin-top: 0.5rem;
  margin-right: 0.5rem;
}

.md-typeset .md-button--bug {
  background-color: var(--md-accent-fg-color);
  border-color: var(--md-accent-fg-color);
  color: var(--md-primary-bg-color);
}

.md-typeset .md-button--bug:hover {
  background-color: #d32f2f;
  border-color: #d32f2f;
  color: var(--md-primary-bg-color);
}

.md-typeset .md-button--bug:active {
  background-color: #b71c1c;
  border-color: #b71c1c;
  color: var(--md-primary-bg-color);
}

:focus-visible {
  outline: 3px solid var(--md-accent-fg-color);
  outline-offset: 3px;
}

@media (max-width: 44.984375em) {
  .md-typeset {
    font-size: 0.78rem;
    line-height: 1.65;
  }

  .md-typeset h1 {
    font-size: 1.85rem;
  }

  .md-typeset table:not([class]) {
    display: block;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .md-typeset .md-button {
    display: block;
    width: 100%;
    margin-right: 0;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Floating action button — Enviar incidencia */
.s50-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  background-color: #1976d2;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

.s50-fab:hover {
  background-color: #d32f2f;
  color: #fff !important;
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.s50-fab:active {
  transform: scale(0.95);
}

.s50-fab svg {
  fill: #fff !important;
}

.s50-fab__text {
  white-space: nowrap;
  color: #fff !important;
}

@media (max-width: 44.984375em) {
  .s50-fab {
    bottom: 1.25rem;
    right: 1.25rem;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .s50-fab__text {
    display: none;
  }
}
