/*
 * Base styles. Load after tokens.css and before components.css.
 * Element defaults only. Anything with a class lives in components.css.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--fb-space-100);
}

body {
  margin: 0;
  background: var(--fb-surface-page);
  color: var(--fb-color-text);
  font-family: var(--fb-font-sans);
  font-size: var(--fb-text-md);
  line-height: var(--fb-leading);
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

/* Headings: page titles and section headings are serif, the rest are bold sans. */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  line-height: var(--fb-leading-tight);
}

h1,
h2 {
  font-family: var(--fb-font-serif);
  font-weight: 400;
}

h1 {
  font-size: var(--fb-text-2xl);
}

h2 {
  font-size: var(--fb-text-xl);
}

h3 {
  font-size: var(--fb-text-lg);
  font-weight: 700;
}

h4,
h5,
h6 {
  font-size: var(--fb-text-md);
  font-weight: 700;
}

p {
  margin: 0.5em 0;
}

ul,
ol {
  margin: 0.3em 0 0;
  padding: 0 0 0 1.6em;
}

dl {
  margin: 0.5em 0;
}

dt {
  font-weight: 700;
}

dd {
  margin: 0 0 0 1.6em;
}

/* Links: blue, no underline until hover, purple once visited. */
a {
  color: var(--fb-color-link);
  text-decoration: none;
}

a:visited {
  color: var(--fb-color-link-visited);
}

a:hover {
  color: var(--fb-color-link-hover);
  text-decoration: underline;
}

a:visited:hover {
  color: var(--fb-color-link-visited);
}

:focus-visible {
  outline: 2px solid var(--fb-color-focus);
  outline-offset: 1px;
}

img,
svg,
video {
  max-width: 100%;
}

img {
  height: auto;
  border: 0;
}

table {
  border-collapse: collapse;
}

th {
  text-align: left;
}

hr {
  height: 0;
  margin: 1em 0;
  border: 0;
  border-top: var(--fb-border-width) solid var(--fb-border);
}

small {
  font-size: var(--fb-text-sm);
}

code,
kbd,
samp,
pre {
  font-family: var(--fb-font-mono);
  font-size: 0.875em;
}

code {
  padding: 1px 4px;
  border: var(--fb-border-width) solid var(--fb-border-muted);
  border-radius: var(--fb-radius);
  background: var(--fb-surface-subtle);
}

pre {
  margin: 1em 0;
  padding: var(--fb-space-75) var(--fb-space-100);
  overflow-x: auto;
  border: var(--fb-border-width) solid var(--fb-border-muted);
  border-radius: var(--fb-radius);
  background: var(--fb-surface-subtle);
  line-height: 1.4;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

summary {
  cursor: pointer;
}

/* Skip link: the first focusable thing on a page. */
.fb-skip {
  position: absolute;
  top: var(--fb-space-50);
  left: -9999px;
  z-index: 100;
  padding: var(--fb-space-50) var(--fb-space-75);
  border: var(--fb-border-width) solid var(--fb-border);
  border-radius: var(--fb-radius);
  background: var(--fb-surface-page);
}

.fb-skip:focus {
  left: var(--fb-space-50);
}

/* Text for screen readers only. */
.fb-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  a,
  a:visited {
    color: #000000;
    text-decoration: underline;
  }
}
