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

html {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
}

body, td, th, input, textarea, select, button, a {
  font-size: var(--font-size-base);
  font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin: 0 0 var(--space-4) 0;
}

h1, .welcome {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-6);
}

h2 { font-size: var(--font-size-xl); margin-bottom: var(--space-3); }
h3 { font-size: var(--font-size-lg); margin-bottom: var(--space-2); }
h4 { font-size: var(--font-size-md); margin-bottom: var(--space-2); }

p {
  margin: 0 0 var(--space-4) 0;
}

a, a:visited {
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

a img {
  border: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

form {
  margin: 0;
  padding: 0;
  display: inline;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-5) 0;
}

table {
  border-collapse: collapse;
}

::selection {
  background: var(--color-primary-light);
  color: #fff;
}

/* Skip-to-content for accessibility; harmless if unused */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
