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

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  background: var(--brand-canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--brand-canvas);
  color: var(--brand-white);
  font-family: var(--brand-font);
  font-size: var(--font-size-base);
  font-weight: var(--brand-weight-regular);
  line-height: var(--brand-leading-copy);
  text-rendering: optimizeLegibility;
}

body,
button,
input,
textarea,
select {
  font-family: var(--brand-font);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--brand-white);
  font-weight: var(--brand-weight-light);
  line-height: var(--brand-leading-tight);
  text-wrap: balance;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }
h5 { font-size: var(--font-size-h5); }
h6 { font-size: var(--font-size-h6); }

p,
ul,
ol {
  margin-top: 0;
}

strong,
b,
.fw-bold,
.fw-semibold,
.fw-medium {
  font-weight: var(--brand-weight-regular) !important;
}

.fw-light {
  font-weight: var(--brand-weight-light) !important;
}

a {
  color: var(--brand-light-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--brand-motion-fast) var(--brand-ease), opacity var(--brand-motion-fast) var(--brand-ease), transform var(--brand-motion-fast) var(--brand-ease), border-color var(--brand-motion-fast) var(--brand-ease), background-color var(--brand-motion-fast) var(--brand-ease);
}

a:hover {
  color: var(--brand-white);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--brand-white);
  outline-offset: 4px;
}

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

main {
  min-height: 60vh;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  transform: translateY(-180%);
  border-radius: var(--brand-radius-small);
  background: var(--brand-light-blue);
  color: var(--brand-canvas);
}

.skip-link:focus {
  transform: translateY(0);
}

.text-accent {
  color: var(--brand-light-blue) !important;
}

.text-secondary,
.text-muted {
  color: var(--brand-muted) !important;
}

.card {
  border: 1px solid var(--brand-hairline);
  border-radius: var(--brand-radius-medium);
  background: var(--brand-surface);
  color: var(--brand-white);
}

.btn,
.btn-primary,
.btn-outline-primary,
.btn-outline-accent {
  border-radius: var(--brand-radius-small);
  font-weight: var(--brand-weight-regular);
}

.btn-primary {
  border-color: var(--brand-light-blue);
  background: var(--brand-light-blue);
  color: var(--brand-canvas);
}

.btn-primary:hover {
  border-color: var(--brand-white);
  background: var(--brand-white);
  color: var(--brand-canvas);
}

.form-control,
.form-select {
  border-color: var(--brand-hairline);
  background: var(--brand-surface);
  color: var(--brand-white);
  font-weight: var(--brand-weight-regular);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-light-blue);
  background: var(--brand-surface);
  color: var(--brand-white);
  box-shadow: 0 0 0 0.2rem rgba(142, 173, 207, 0.24);
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-block;
}

@media (max-width: 768px) {
  body {
    font-size: var(--font-size-base-mobile);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
