.article-search-panel {
  width: 100%;
  max-width: 940px;
  margin: 0 auto 34px;
  padding: 28px 18px 24px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(38, 53, 84, 0.07);
  letter-spacing: 0;
}

.article-search-panel--entry {
  margin: 28px auto 32px;
}

.article-search-panel--entry .article-search-status {
  text-align: left;
}

.article-sidebar-search {
  margin-bottom: 18px;
}

.article-search-panel--compact {
  margin: 0;
  padding: 18px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(38, 53, 84, 0.06);
}

.article-search-panel--compact .article-search-form {
  grid-template-columns: 1fr 1fr;
}

.article-search-panel--compact .article-search-input {
  grid-column: 1 / -1;
}

.article-search-panel--compact .article-search-button {
  min-width: 0;
  padding-right: 12px;
  padding-left: 12px;
}

.article-search-panel--compact .article-search-toolbar {
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.article-search-panel--compact .article-search-controls,
.article-search-panel--compact .article-search-control-label,
.article-search-panel--compact .article-search-select {
  width: 100%;
  min-width: 0;
}

.article-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.article-search-input {
  min-width: 0;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #d9dde5;
  border-radius: 999px;
  color: #2f3440;
  font-size: 1rem;
  outline: none;
}

.article-search-input:focus {
  border-color: #6281c8;
  box-shadow: 0 0 0 3px rgba(98, 129, 200, 0.14);
}

.article-search-button {
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #6281c8;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.article-search-button:hover,
.article-search-button:focus-visible {
  background: #526fae;
}

.article-search-button--secondary {
  border-color: #d9dde5;
  background: #fff;
  color: #555d6b;
}

.article-search-button--secondary:hover,
.article-search-button--secondary:focus-visible {
  background: #f5f7fa;
}

.article-search-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
}

.article-search-status {
  min-height: 20px;
  margin: 0;
  color: #707784;
  font-size: 0.9rem;
  line-height: 20px;
  text-align: left;
}

.article-search-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 14px;
}

.article-search-control-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: #707784;
  font-size: 0.9rem;
  white-space: nowrap;
}

.article-search-control-label::after {
  content: "";
  position: absolute;
  right: 14px;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid #7b8491;
  border-bottom: 1.5px solid #7b8491;
  transform: rotate(45deg);
  pointer-events: none;
}

.article-search-select {
  height: 34px;
  padding: 0 34px 0 13px;
  border: 1px solid #dfe3e8;
  border-radius: 9px;
  background: #fff;
  color: #3f4652;
  font-family: inherit;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 1px 2px rgba(38, 53, 84, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.article-search-select:hover:not(:disabled) {
  border-color: #cbd2dc;
}

.article-search-select:focus-visible {
  border-color: #9aabd0;
  box-shadow: 0 0 0 3px rgba(98, 129, 200, 0.12);
}

.article-search-filter {
  width: min(220px, 24vw);
  min-width: 150px;
}

.article-search-select:disabled {
  background: #f5f6f8;
  color: #9aa0aa;
  cursor: not-allowed;
}

.article-search-control-label:has(.article-search-select:disabled)::after {
  border-color: #aeb4bd;
}

.ebook-section .article-search-panel--entry {
  margin-bottom: 82px;
}

.ebook-section .article-search-panel--entry .article-search-status {
  min-height: 20px;
  margin: 0;
  font-size: 0.9rem;
  line-height: 20px;
}

.article-intro--with-search > header {
  margin-bottom: 20px !important;
}

.article-intro--with-search > header > .g-pt-80 {
  padding-top: 60px !important;
}

.article-intro--with-search .article-search-panel--entry {
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .article-search-toolbar {
    margin-top: 24px;
  }
}

@media (min-width: 1200px) {
  .article-search-status {
    flex: 1 1 auto;
  }

  .article-search-controls {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }
}

@media (max-width: 767px) {
  .article-search-panel {
    padding: 22px 16px;
  }

  .article-search-panel--entry {
    margin: 22px auto 28px;
  }

  .article-search-form {
    grid-template-columns: 1fr 1fr;
  }

  .article-search-input {
    grid-column: 1 / -1;
  }

  .article-search-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-search-controls {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .article-search-control-label {
    justify-content: stretch;
    width: 100%;
  }

  .article-search-select {
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .article-search-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-search-controls {
    justify-content: flex-start;
    width: 100%;
  }
}
