/* ==========================================================================
   Beauty Tracker — Reset e stili base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}

h1 { font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); }
h2 { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); }
h3 { font-size: var(--font-size-md); font-weight: var(--font-weight-medium); }

ul, ol {
  list-style: none;
  padding: 0;
}

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

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

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: 16px; /* evita zoom automatico iOS al focus */
  color: inherit;
}

/* Focus visibile per accessibilità/navigazione da tastiera */
:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
}

/* Nasconde elementi mantenendoli accessibili agli screen reader se serve */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
}
