*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  line-height: 1.2;
  font-weight: var(--fw-semibold);
}

h1 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
}

h2 {
  font-size: var(--fs-xl);
}

h3 {
  font-size: var(--fs-lg);
}

h4 {
  font-size: var(--fs-md);
}

h5 {
  font-size: var(--fs-sm);
}

h6 {
  font-size: var(--fs-xs);
}

body.grid-container {
  margin: 0;
  background: var(--ui-shell-bg);
  color: var(--ui-text);
}

body.density-compact:not(.page-facturar) {
  font-size: var(--ui-font-base);
}

body.density-compact:not(.page-facturar) h1 {
  font-size: 1.25rem;
}

body.density-compact:not(.page-facturar) h2 {
  font-size: 1.0625rem;
}

body.density-compact:not(.page-facturar) h3 {
  font-size: 0.9375rem;
}

.link,
a.link {
  color: var(--ui-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition-fast) var(--ease-standard), border-color var(--transition-fast) var(--ease-standard);
}

.link:hover,
a.link:hover {
  color: var(--ui-accent-strong);
  border-bottom-color: color-mix(in srgb, var(--ui-accent-strong) 55%, transparent);
}

.link-muted,
a.link-muted {
  color: var(--ui-muted);
  text-decoration: none;
}

.link:focus-visible,
.link-muted:focus-visible,
a.link:focus-visible,
a.link-muted:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ui-accent) 60%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
