
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: #111;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

/* Banner / brand */
.brand {
  --crest-h: 64px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--crest-h);
  background: #222;
  border-radius: 10px;
  padding: 18px 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.crest {
  height: var(--crest-h);
  width: auto;
  display: block;
  background: #fff;
  border-radius: 8px;
  border: 2px solid #eee;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.brand h1 {
  color: #fff;
  background: #222;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 2px;
  font-size: calc(var(--crest-h) * 0.9);
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}
.subtitle {
  font-size: 1.15rem;
  color: #eaeaea;
  background: #222;
  padding: 4px 12px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 6px;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* Espaiat entre seccions */
.mt-40 { margin-top: 40px; }

/* --- Scroll horitzontal de taules --- */
.table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px; /* Cantonades arrodonides */
  padding: 6px 0;
  background:
    linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0)) 0 0 / 2rem 100% no-repeat,
    linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0)) 100% 0 / 2rem 100% no-repeat,
    #fff;
  background-attachment: local, local, scroll;
}

/* Scroll vertical limitat només per a la secció d’edicions */
.table-wrap.editions {
  max-height: 520px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Taules */
.table-wrap table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px; /* Cantonades arrodonides */
  overflow: hidden;    /* Perquè el border-radius sigui visible */
}

/* Cel·les */
th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #efefef;
  white-space: nowrap;
  font-size: 0.95rem;
}

/* Sticky header */
.table-wrap thead tr {
  background: #222;
}
th {
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #222;
  color: #fff;
  white-space: normal; /* Permet salt de línia si cal */
}

/* Cantonades arrodonides a la capçalera i peu de taula */
.table-wrap table thead tr:first-child th:first-child {
  border-top-left-radius: 12px;
}
.table-wrap table thead tr:first-child th:last-child {
  border-top-right-radius: 12px;
}
.table-wrap table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}
.table-wrap table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

/* Alternança de colors a les files del tbody */
.table-wrap tbody tr:nth-child(odd) { background: #ffffff; }
.table-wrap tbody tr:nth-child(even) { background: #f7f7f9; }

/* Hover (opcional) */
.table-wrap tbody tr:hover { background: #eef3ff; }

/* Subtil separador entre files per destacar l’alternança (opcional) */
.table-wrap tbody tr + tr td { border-top: 1px solid #f0f0f3; }

/* Footer */
.site-footer { padding: 12px 16px; text-align: center; color: #666; font-size: 0.9rem; }

/* Responsive tweaks */
@media (max-width: 900px) {
