/* Header article search */
.article-search {
  position: relative;
  width: clamp(210px, 24vw, 340px);
  flex: 0 1 340px;
  min-width: 190px;
  font-family: "Manrope", system-ui, sans-serif;
}

.article-search__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.article-search__field {
  position: relative;
  display: flex;
  align-items: center;
}

.article-search__input {
  width: 100%;
  height: 40px;
  padding: 0 68px 0 16px;
  border: 1px solid var(--line, #e5dfd2);
  border-radius: 999px;
  outline: none;
  background: #fff;
  color: var(--ink, #16213a);
  font: 500 13px "Manrope", system-ui, sans-serif;
  box-shadow: 0 1px 2px rgba(22, 33, 58, .04);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

.article-search__input::-webkit-search-cancel-button { display: none; }

.article-search__input:focus {
  border-color: rgba(255, 122, 57, .72);
  box-shadow: 0 0 0 3px rgba(255, 122, 57, .14);
}

.article-search__icon {
  position: absolute;
  right: 14px;
  display: grid;
  place-items: center;
  color: var(--accent, #ff7a39);
  pointer-events: none;
}

.article-search__clear {
  position: absolute;
  right: 39px;
  z-index: 1;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eee9e0;
  color: #5f5b55;
  font: 20px/24px Arial, sans-serif;
  cursor: pointer;
}

.article-search__clear:hover,
.article-search__clear:focus-visible { background: #e1d9cc; outline: 2px solid rgba(43, 141, 240, .3); }

.article-search__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  width: min(520px, calc(100vw - 32px));
  max-height: min(570px, calc(100vh - 96px));
  overflow: hidden;
  border: 1px solid rgba(22, 33, 58, .12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(22, 33, 58, .18), 0 3px 10px rgba(22, 33, 58, .08);
}

.article-search__heading {
  padding: 13px 16px 9px;
  color: #837b70;
  font: 700 11px "Manrope", system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-search__results {
  max-height: min(490px, calc(100vh - 145px));
  margin: 0;
  padding: 0 8px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #aaa49b transparent;
}

.article-search__option { margin: 0; padding: 0; }

.article-search__result {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 13px;
  width: 100%;
  padding: 11px 9px;
  border: 0;
  border-bottom: 1px solid #eee9e1;
  border-radius: 10px;
  background: transparent;
  color: var(--ink, #16213a);
  text-align: left;
  cursor: pointer;
  font-family: "Manrope", system-ui, sans-serif;
}

.article-search__option:last-child .article-search__result { border-bottom-color: transparent; }
.article-search__result:hover,
.article-search__option[aria-selected="true"] .article-search__result,
.article-search__result:focus-visible { background: #fff4ed; outline: none; }

.article-search__thumb {
  width: 76px;
  height: 68px;
  border-radius: 9px;
  object-fit: cover;
  background: #eee9e1;
}

.article-search__copy { min-width: 0; align-self: center; }
.article-search__category {
  display: block;
  color: #c97b5c !important;
  -webkit-text-fill-color: #c97b5c;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.article-search__result-title {
  display: block;
  margin-top: 5px;
  color: var(--ink, #16213a);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.28;
}
.article-search__description {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: #716b63;
  font-size: 11.5px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-search__message { padding: 27px 20px 31px; color: #716b63; font: 500 13px/1.55 "Manrope", system-ui, sans-serif; text-align: center; }
.article-search__message strong { display: block; margin-bottom: 4px; color: var(--ink, #16213a); font-size: 14px; }

.article-search-mobile-trigger {
  display: none;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line, #e5dfd2);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-2, #2a3553);
  cursor: pointer;
}

.article-search-mobile-trigger:hover,
.article-search-mobile-trigger:focus-visible { color: var(--accent, #ff7a39); outline: 2px solid rgba(255, 122, 57, .22); }

.nav.article-search-open { z-index: 9100; }
.article-search-mobile { position: fixed; inset: 0; z-index: 9500; background: rgba(14, 23, 48, .42); font-family: "Manrope", system-ui, sans-serif; }
.article-search-mobile__dialog { width: 100%; max-height: 100dvh; min-height: min(640px, 100dvh); overflow: hidden; background: #faf8f4; box-shadow: 0 16px 50px rgba(14, 23, 48, .22); }
.article-search-mobile__header { display: flex; align-items: center; justify-content: space-between; padding: max(18px, env(safe-area-inset-top)) 18px 12px; }
.article-search-mobile__header h2 { margin: 0; color: var(--ink, #16213a); font-size: 19px; line-height: 1.3; }
.article-search-mobile__close { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: #eee8de; color: var(--ink-2, #2a3553); font: 26px/36px Arial, sans-serif; cursor: pointer; }
.article-search-mobile__close:focus-visible { outline: 2px solid rgba(43, 141, 240, .35); }
.article-search-mobile__field { margin: 0 18px 13px; }
.article-search-mobile__field .article-search__input { height: 48px; padding-left: 18px; font-size: 15px; }
.article-search-mobile__content { height: calc(100dvh - 130px); overflow: hidden; border-top: 1px solid #e7e0d5; background: #fff; }
.article-search-mobile__content .article-search__results { max-height: calc(100dvh - 174px); padding: 0 10px max(16px, env(safe-area-inset-bottom)); }
.article-search-mobile__content .article-search__heading { padding: 15px 18px 9px; }

@media (max-width: 1100px) {
  .article-search { width: clamp(190px, 22vw, 260px); flex-basis: 260px; }
}

@media (max-width: 900px) {
  .article-search { width: 190px; flex-basis: 190px; }
}

@media (max-width: 768px) {
  .article-search { display: none; }
  .article-search-mobile-trigger { display: grid; }
}

@media (min-width: 769px) {
  .article-search-mobile { display: none !important; }
}

@media (max-width: 480px) {
  .nav .brand { width: 44px; }
  .nav .brand .s-8 { display: none; }
  .article-search-mobile-trigger { display: grid !important; }
  .article-search__result { grid-template-columns: 70px minmax(0, 1fr); gap: 11px; padding: 10px 8px; }
  .article-search__thumb { width: 70px; height: 64px; }
  .article-search__description { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .article-search__input,
  .article-search-mobile { scroll-behavior: auto; transition: none; }
}
