/* Base rules: reset, page background, typography. Component-specific styles do not live here. */

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

/* The hidden attribute always hides, whatever display a class sets (.form is flex, .field grid…). */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-canvas);
  color: var(--color-text-body);
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  line-height: var(--leading-body-md);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-heading-xl); line-height: var(--leading-heading-xl); font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: var(--text-heading-lg); line-height: var(--leading-heading-lg); }
h3 { font-size: var(--text-heading-md); line-height: var(--leading-heading-md); letter-spacing: 0; }
h4 { font-size: var(--text-heading-sm); line-height: var(--leading-heading-sm); letter-spacing: 0; }

p {
  margin: 0;
}

a {
  color: var(--color-cobalt);
  text-decoration: none;
}

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

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

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

/* Available to screen readers, visually hidden */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
