/* Shared interaction and reading defaults for every Web feature. */
html {
  scroll-padding-top: 5rem;
}

body {
  line-height: 1.55;
}

.layout-main :where(h1, h2, h3, h4, [id]) {
  scroll-margin-top: 5rem;
}

.layout-main :where(p, li, dd) {
  line-height: 1.65;
}

:where(a[href], button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: 3px;
}

.layout-main :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  max-width: 100%;
  color-scheme: dark;
}

.layout-main :where(input, select, textarea):disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.layout-main :where(input, select, textarea)[aria-invalid="true"],
.layout-main :where(input, select, textarea).input-validation-error {
  border-color: var(--ui-danger);
}

.layout-main :where(table) {
  font-variant-numeric: tabular-nums;
}

@media (pointer: coarse) {
  :where(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], a[href]) {
    -webkit-tap-highlight-color: rgba(70, 205, 189, 0.18);
    touch-action: manipulation;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  :where(a[href], button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid Highlight;
  }
}
