* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--color-background);
  text-rendering: optimizeLegibility;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, var(--color-background), var(--color-background-elevated));
  color: var(--color-text);
  font-family: var(--fuente-base);
  font-size: 16px;
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

body.drawer-abierto,
body.modal-abierto {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

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

a:hover {
  color: var(--color-primary-hover);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

table {
  font-variant-numeric: tabular-nums;
}

::selection {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-accent) 68%, white 32%);
  outline-offset: 3px;
}

.sin-javascript {
  width: min(100% - 2rem, 34rem);
  margin: 4rem auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  background: var(--color-surface);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
