:root {
  --recwerty-reading-width: 72ch;
  --recwerty-focus: #ffb300;
}

body,
input {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

code,
kbd,
pre {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono",
    monospace;
}

.md-grid {
  max-width: 90rem;
}

.md-content__inner {
  max-width: var(--recwerty-reading-width);
}

.md-typeset {
  font-size: 0.82rem;
  line-height: 1.7;
}

.md-typeset h1 {
  margin-bottom: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.md-typeset h2 {
  margin-top: 2.4em;
  margin-bottom: 0.7em;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.md-typeset h3 {
  margin-top: 1.8em;
  margin-bottom: 0.55em;
  font-weight: 650;
}

.md-typeset a:not(.md-button):focus-visible,
.md-nav__link:focus-visible,
.md-search__input:focus-visible,
.md-header__button:focus-visible {
  border-radius: 0.15rem;
  outline: 0.15rem solid var(--recwerty-focus);
  outline-offset: 0.15rem;
}

.md-typeset .md-button {
  min-height: 2.75rem;
}

.md-typeset .md-button:focus-visible {
  outline: 0.15rem solid var(--recwerty-focus);
  outline-offset: 0.15rem;
}

.md-typeset .md-typeset__table,
.md-typeset__scrollwrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.md-typeset table:not([class]) {
  font-size: 0.76rem;
}

.md-typeset table:not([class]) th {
  white-space: nowrap;
}

.md-typeset code {
  overflow-wrap: anywhere;
}

.md-typeset .admonition,
.md-typeset details {
  font-size: inherit;
}

.md-typeset :target {
  scroll-margin-top: 5rem;
}

@media screen and (max-width: 44.9844em) {
  .md-typeset {
    font-size: 0.78rem;
    line-height: 1.65;
  }

  .md-typeset h1 {
    font-size: 1.8rem;
  }

  .md-typeset h2 {
    font-size: 1.35rem;
  }

  .md-typeset table:not([class]) {
    font-size: 0.72rem;
  }

  .md-nav__link {
    min-height: 2.75rem;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Floating issues button — bottom-right FAB */
.md-issues-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  border-radius: 2rem;
  background: var(--md-primary-fg-color, #1a73e8);
  color: var(--md-primary-bg-color, #fff);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.md-issues-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  color: var(--md-primary-bg-color, #fff);
}
.md-issues-fab:focus-visible {
  outline: 0.15rem solid var(--recwerty-focus);
  outline-offset: 0.15rem;
}
.md-issues-fab svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

/* Dark mode: high-contrast FAB with brighter background */
[data-md-color-scheme="slate"] .md-issues-fab {
  background: #4a9eff;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
[data-md-color-scheme="slate"] .md-issues-fab:hover {
  background: #6bb3ff;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

@media screen and (max-width: 44.9844em) {
  .md-issues-fab {
    bottom: 1rem;
    right: 1rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.72rem;
  }
}
@media print {
  .md-issues-fab {
    display: none !important;
  }
}

@media print {
  .md-header,
  .md-tabs,
  .md-sidebar,
  .md-footer,
  .md-content__button {
    display: none !important;
  }

  .md-main__inner,
  .md-content,
  .md-content__inner {
    margin: 0;
    max-width: none;
    padding: 0;
  }

  .md-typeset {
    color: #000;
    font-size: 10.5pt;
  }

  .md-typeset a {
    color: inherit;
    text-decoration: underline;
  }

  .md-typeset h2,
  .md-typeset h3,
  .md-typeset table,
  .md-typeset .admonition {
    break-inside: avoid;
  }
}
