*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--ff-color-background);
}

body {
  margin: var(--ff-page-margin-top) var(--ff-page-margin-right) var(--ff-page-margin-bottom) var(--ff-page-margin-left);
  padding: var(--ff-page-padding-top) var(--ff-page-padding-right) var(--ff-page-padding-bottom) var(--ff-page-padding-left);
  background: var(--ff-color-background);
  color: var(--ff-color-text);
  font-family: var(--ff-font-body);
  font-size: var(--ff-body-size);
  font-weight: var(--ff-body-weight);
  line-height: var(--ff-body-lh);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ff-color-link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ff-color-link-hover); }
h1, h2, h3, h4, .ff-hero-title {
  font-family: var(--ff-font-heading);
  color: var(--ff-color-heading);
  font-weight: var(--ff-h2-weight);
  letter-spacing: var(--ff-h2-ls);
  line-height: var(--ff-h2-lh);
  margin: 0 0 0.4em;
}
h1, .ff-hero-title {
  font-size: var(--ff-h1);
  font-weight: var(--ff-h1-weight);
  line-height: var(--ff-h1-lh);
  letter-spacing: var(--ff-h1-ls);
}
h2 { font-size: var(--ff-h2); }
h3 { font-size: var(--ff-h3); font-weight: var(--ff-h3-weight); line-height: var(--ff-h3-lh); letter-spacing: -0.02em; }
h4 { font-size: var(--ff-h4); font-weight: var(--ff-h4-weight); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--ff-color-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100000;
  background: var(--ff-color-surface);
  color: var(--ff-color-heading);
  padding: 10px 16px;
  border-radius: var(--ff-radius-button);
}
.skip-link:focus { top: 12px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.ff-icon { display: block; flex: 0 0 auto; }
.ff-placeholder {
  background: var(--ff-color-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 80px;
  color: var(--ff-placeholder-icon, #b5b5b5);
}
.ff-placeholder__icon {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  margin: 0;
}

.ff-prose > *:first-child { margin-top: 0; }
.ff-prose img, .ff-prose video { border-radius: var(--ff-radius-image); }
.ff-prose table { width: 100%; border-collapse: collapse; }
.ff-prose th, .ff-prose td { border-bottom: 1px solid var(--ff-color-border); text-align: left; padding: 10px 8px; }

.ff-admin-hint {
  color: var(--ff-color-muted);
  font-size: 14px;
}

body.ff-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body.ff-no-motion *, body.ff-no-motion *::before, body.ff-no-motion *::after {
  animation: none !important;
  transition: none !important;
}
