.calendar-board {
  display: grid;
  gap: 18px;
  padding-top: var(--section-space);
}

.category-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-surface);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}

.category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  transition:
    background var(--transition-base),
    border-color var(--transition-base);
}

.category-title:hover {
  background: rgba(255, 255, 255, 0.04);
  border-bottom-color: var(--line-soft);
}

.category-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.category-right {
  display: flex;
  align-items: center;
}

.category-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.category-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition:
    max-height 320ms ease,
    opacity 180ms ease,
    transform 240ms ease;
}

.category-block.is-open .category-panel {
  max-height: 2600px;
  opacity: 1;
  transform: translateY(0);
}

.category-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--faint);
  transition:
    color var(--transition-base),
    border-color var(--transition-base),
    background var(--transition-base);
}

.category-title:hover .category-chevron {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.category-name {
  overflow: hidden;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.category-count {
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.category-header-logo,
.event-category-logo {
  flex: 0 0 auto;
}

.event-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 190px;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 18px 24px;
  border-top: 1px solid var(--line-soft);
  color: inherit;
  text-decoration: none;
}

.event-row:first-child {
  border-top: 0;
}

.event-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.event-main {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
}

.event-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.date-range {
  color: #dce5ef;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.45;
  text-transform: uppercase;
}

.event-name {
  overflow: hidden;
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-main .winner-line {
  margin-top: 1px;
}

.circuit {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

@media (max-width: 720px) {
  .summary {
    grid-template-columns: 1fr;
  }

  .api-state {
    text-align: left;
  }

  .event-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .category-title {
    align-items: flex-start;
  }

  .country {
    text-align: left;
  }

  .event-name,
  .circuit,
  .category-name {
    white-space: normal;
  }

  .event-line {
    align-items: flex-start;
  }
}
