/* Eix · estils compartits */

:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ink: #111827;
  --ink-soft: #374151;
  --paper: #ffffff;
  --paper-soft: #f3f4f6;
  --line: #6b7280;
  --accent: #1d4ed8;
  --accent-ink: #ffffff;
  --danger: #b91c1c;
  --ok: #166534;
  --focus: #f59e0b;
  --radius: 12px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
}

[hidden] {
  display: none !important;
}

h1, h2, h3 {
  line-height: 1.2;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

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

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

/* ── Avatar: disc del color amb la icona a dins ── */
.avatar {
  --avatar-size: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  background: var(--avatar-bg, #777);
  color: var(--avatar-fg, #fff);
  box-shadow: 0 0 0 2px rgb(0 0 0 / 0.55);
}

.avatar-icon {
  width: 68%;
  height: 68%;
  fill: currentColor;
}

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