* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f6f8;
  color: #1f2933;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px;
}

h1 {
  margin: 0 0 24px;
}

.competition-label {
  margin: -12px 0 24px;
  color: #475467;
  font-weight: 600;
}

h2,
h3,
h4 {
  margin-top: 0;
}

.form {
  display: grid;
  gap: 16px;
  max-width: 640px;
  margin-bottom: 24px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c8d0dc;
  border-radius: 6px;
  font-size: 14px;
}

button {
  width: fit-content;
  padding: 10px 16px;
  border: 0;
  border-radius: 6px;
  background: #0f766e;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #115e59;
}

#output {
  display: grid;
  gap: 20px;
}

.result-section {
  padding: 20px;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
}

.muted {
  color: #667085;
}

.error {
  padding: 12px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 6px;
}

.team-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.team-card {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2933;
  text-align: left;
}

.team-card:hover {
  border-color: #0f766e;
  background: #f0fdfa;
}

.team-card-header {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
}

.team-avatar,
.member-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: #eef2f7;
  color: #475467;
  object-fit: cover;
}

.team-avatar {
  width: 56px;
  height: 56px;
  font-size: 18px;
  font-weight: 700;
}

.member-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
  font-weight: 700;
}

.team-card-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.team-card-title strong {
  font-size: 17px;
}

.team-card-title span {
  color: #667085;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.team-members {
  display: grid;
  gap: 10px;
}

.team-members h3 {
  margin: 0;
  font-size: 14px;
}

.member-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid #e5e9f0;
  border-radius: 6px;
  background: #ffffff;
}

.member-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analyse-button {
  justify-self: end;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  background: #ffffff;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #e5e9f0;
  text-align: left;
}

th {
  background: #eef2f7;
  font-size: 13px;
  text-transform: uppercase;
}
