.sort-wrap { position: relative; flex: none; }
.sort-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 196px;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #d8e5d9;
  border-radius: 12px;
  background: #f1f6ef;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 750;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.sort-trigger:hover { background: #eaf3e7; border-color: #a3c5ab; }
.sort-trigger[aria-expanded="true"] { background: #e9f3e8; border-color: #6bad91; box-shadow: 0 0 0 3px #daf1e4; }
.sort-symbol { width: 18px; height: 18px; flex: none; color: #3b7b60; }
.sort-caption { font-weight: 500; color: #63796b; }
#sort-label { flex: 1; text-align: left; white-space: nowrap; }
.sort-chevron { width: 14px; height: 14px; flex: none; color: #4d785f; transition: transform 140ms ease; }
.sort-trigger[aria-expanded="true"] .sort-chevron { transform: rotate(180deg); }
.sort-menu[hidden] { display: none; }
.sort-menu {
  position: absolute;
  z-index: 2;
  top: calc(100% + 9px);
  left: 0;
  width: 288px;
  max-width: calc(100vw - 56px);
  padding: 8px;
  border: 1px solid #d9e7d9;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(20, 54, 34, 0.15), 0 3px 9px rgba(20, 54, 34, 0.04);
  transform-origin: top left;
  animation: sort-menu-enter 130ms ease-out;
  outline: 0;
}
.sort-menu-heading { padding: 6px 10px 9px; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: #78897b; }
.sort-menu[data-placement="top"] { top: auto; bottom: calc(100% + 9px); transform-origin: bottom left; }
.sort-option {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 57px;
  padding: 9px 10px;
  margin: 2px 0;
  border: 0;
  border-radius: 10px;
  text-align: left;
  background: transparent;
  color: var(--ink);
  transition: background 100ms ease;
}
.sort-option:hover, .sort-option[data-active="true"] { background: #f0f5ed; }
.sort-option[aria-selected="true"] { color: #176a55; background: #e9f4e5; }
.sort-option[data-active="true"] { box-shadow: inset 0 0 0 1px #b4d0b5; }
.sort-option-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #f1f4ef; color: #627767; }
.sort-option-icon svg { width: 18px; height: 18px; }
.sort-option[aria-selected="true"] .sort-option-icon { background: #d9ebd2; color: #297650; }
.sort-option-copy strong { display: block; font-size: 12px; font-weight: 750; line-height: 1.5; }
.sort-option-copy small { display: block; margin-top: 2px; font-size: 10px; line-height: 1.5; color: #718071; }
.sort-check { width: 17px; height: 17px; color: #287957; visibility: hidden; }
.sort-option[aria-selected="true"] .sort-check { visibility: visible; }
@keyframes sort-menu-enter { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 600px) {
  .browser-controls { position: relative; top: 0; }
  .sort-trigger { width: 148px; padding: 0 10px; gap: 7px; }
  .sort-caption { display: none; }
  .sort-symbol { width: 17px; height: 17px; }
  .sort-option { min-height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .sort-menu { animation: none; }
  .sort-trigger, .sort-option, .sort-chevron { transition: none; }
}
