* {
  box-sizing: border-box;
}

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

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

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

.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;
  justify-content: flex-end;
  flex-wrap: wrap;
  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;
}

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

.error {
  color: #9d2222;
}

.grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 86px;
  padding: 18px 20px;
  background: white;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(22, 36, 72, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: #bfd0f1;
  box-shadow: 0 12px 28px rgba(22, 36, 72, 0.08);
  transform: translateY(-1px);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  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: 21px;
  line-height: 1.25;
}

.card-footer {
  margin: 0;
  padding: 0;
}

.open {
  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;
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 28px, 1220px);
  }

  .header {
    flex-direction: column;
  }

  .brand {
    font-size: 30px;
  }

  h1 {
    font-size: 28px;
  }

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

  .nav-link {
    flex: 1;
  }

  .card {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    min-height: 0;
  }
}
