* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #151515;
  background: #f5f7fb;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 56px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 22px;
}

.brand {
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 18px;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.header p {
  margin: 10px 0 0;
  color: #657185;
  font-size: 18px;
}

.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 4px;
}

.nav-link {
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfd7e3;
  border-radius: 7px;
  background: white;
  color: #0d2f9f;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.primary-link {
  border-color: #0d2f9f;
  background: #0d2f9f;
  color: white;
}

.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.filter {
  height: 38px;
  padding: 0 16px;
  border: 1px solid #d3dbe7;
  border-radius: 999px;
  background: white;
  color: #243247;
  font-size: 15px;
  cursor: pointer;
}

.filter.is-active {
  background: #0d2f9f;
  border-color: #0d2f9f;
  color: white;
}

.loading,
.error {
  background: white;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  padding: 24px;
}

.error {
  color: #9d2222;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  background: white;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
}

.card-image-wrap {
  position: relative;
}

.card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #dde5f0;
}

.audio-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(13, 47, 159, 0.92);
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
}

.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #667386;
  font-size: 14px;
}

.level {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eaf0ff;
  color: #0d2f9f;
  font-weight: 700;
}

.title {
  margin: 0;
  font-size: 19px;
  line-height: 1.28;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.date {
  color: #7b8797;
  font-size: 14px;
}

.start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 7px;
  background: #0d2f9f;
  color: white;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.empty {
  grid-column: 1 / -1;
  background: white;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  padding: 24px;
  color: #697589;
}

@media (max-width: 940px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .page {
    width: min(100% - 24px, 1180px);
    padding-top: 22px;
  }

  .header {
    flex-direction: column;
  }

  .brand {
    font-size: 30px;
  }

  h1 {
    font-size: 28px;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-link {
    flex: 1;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    overflow-x: auto;
    padding-bottom: 4px;
  }
}
