/* Compact disclosures on desktop; the same controls move into a native mobile dialog. */
#filter-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
#desktop-filter-slot {
  min-width: 0;
}
.filters {
  display: block;
}
.select-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.filter-group {
  position: relative;
  margin: 0;
  border: 0;
  background: none;
}
.filter-group>summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 35px;
  padding: 7px 12px;
  border: 1px solid #dfe4e0;
  border-radius: 5px;
  background: #fff;
  list-style: none;
  font-size: 11px;
}
.filter-group>summary::-webkit-details-marker {
  display: none;
}
.filter-group>summary::marker {
  content: "";
}
.filter-group-title {
  font-size: 11px;
  color: #5b6b70;
  font-weight: 450;
}
.filter-selection {
  display: none;
}
.filter-group[data-active="true"]>summary {
  border-color: #bbd0e9;
  background: #edf4fd;
}
.filter-group[data-active="true"] .filter-group-title {
  color: var(--blue-dark);
}
.filter-chevron {
  width: 8px;
  height: 8px;
}
.filter-chevron::before {
  content: "";
  display: block;
  width: 5px;
  height: 5px;
  border-right: 1px solid #819097;
  border-bottom: 1px solid #819097;
  transform: rotate(45deg);
  margin-top: -2px;
}
.filter-group[open] .filter-chevron::before {
  transform: rotate(225deg);
  margin-top: 2px;
}
.filter-section,.stage-navigation {
  position: absolute;
  z-index: 8;
  top: calc(100% + 7px);
  left: 0;
  min-width: 245px;
  max-width: 300px;
  max-height: 370px;
  overflow-y: auto;
  padding: 14px;
  margin: 0;
  border: 1px solid #dce3df;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 35px #263e501c;
}
.filter-group:last-child .stage-navigation {
  left: auto;
  right: 0;
}
.filter-help {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  margin: 0 0 10px;
  color: #7a878c;
}
.choice-grid,.stage-navigation {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.choice-grid label {
  position: relative;
  cursor: pointer;
}
.choice-grid input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.choice-grid label>span,.stage-button {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 11px;
  color: #57696e;
  background: #fff;
  width: 100%;
  text-align: left;
  font-weight: 450;
}
.choice-grid input:checked+span,.stage-button.active {
  background: #eaf2fd;
  color: var(--blue-dark);
  border-color: #dbe8f8;
}
.choice-grid input:focus-visible+span {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.choice-grid label:hover>span,.stage-button:hover:not(:disabled) {
  background: #f0f5f3;
}
.stage-button:disabled {
  opacity: .5;
  cursor: default;
}
.stage-count {
  font-size: 10px;
  color: #88968f;
}
.age-choices {
  grid-template-columns: repeat(4,1fr);
}
.age-choices label>span {
  justify-content: center;
}
.filter-note {
  font-size: 10px;
  line-height: 1.6;
  margin: 9px 0 0;
  color: #75838b;
}
.text-button {
  border: 0;
  background: none;
  color: #738085;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 10px;
  padding: 5px;
  min-height: 32px;
}
.text-button:disabled {
  color: #a0aaa6;
  text-decoration: none;
}
.active-filter-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.active-filters button {
  display: flex;
  gap: 5px;
  align-items: center;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid #dce6ee;
  border-radius: 4px;
  background: #eef4fb;
  color: var(--blue-dark);
  font-size: 10px;
}
.active-filters svg {
  width: 12px;
  height: 12px;
}
.saved-storage-note {
  color: #6d7e80;
  font-size: 11px;
  margin: 8px 0;
}
.filter-count {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #eaf2fb;
  color: var(--blue-dark);
  font-size: 10px;
}
.mobile-filter-shortcuts,#mobile-filters {
  display: none;
}
.filter-sheet {
  padding: 0;
  margin: auto;
  border: 1px solid #dfe5e1;
  border-radius: 14px;
  width: min(500px,calc(100vw - 24px));
  max-height: calc(100dvh - 30px);
  background: #fafbf8;
  color: var(--ink);
  box-shadow: 0 20px 90px #122e4540;
}
.filter-sheet[open] {
  display: flex;
  flex-direction: column;
}
.filter-sheet::backdrop {
  background: #24384170;
}
.filter-sheet-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.filter-sheet-eyebrow {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 5px;
  color: #708482;
}
.filter-sheet-heading h2 {
  margin: 0;
  font-size: 24px;
}
.filter-sheet-heading>button {
  display: grid;
  place-items: center;
  min-height: 40px;
  width: 40px;
  border: 0;
  background: none;
  border-radius: 5px;
  color: #687c7c;
}
.filter-sheet-body {
  overflow-y: auto;
  padding: 0 20px;
  overscroll-behavior: contain;
}
.filter-sheet-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.filter-sheet-footer .primary-button {
  padding: 11px 16px;
  border: 0;
  border-radius: 5px;
  font-size: 12px;
  background: var(--blue);
  color: #fff;
}
.filter-sheet-open {
  overflow: hidden;
}
@media(max-width:800px) {
  #desktop-filter-slot,#reset-filters {
    display: none;
  }
  .mobile-filter-shortcuts {
    display: flex;
    min-width: 0;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px;
  }
  .mobile-filter-shortcuts>button {
    display: flex;
    flex: none;
    align-items: center;
    gap: 5px;
    min-height: 35px;
    padding: 7px 10px;
    border: 1px solid #dfe4e0;
    border-radius: 5px;
    background: #fff;
    color: #5b6b70;
    font-size: 10px;
    white-space: nowrap;
  }
  .mobile-filter-shortcuts svg {
    width: 10px;
    height: 10px;
  }
  .mobile-filter-shortcuts>button[data-active="true"] {
    background: #eaf2fd;
    border-color: #bfd4ed;
    color: var(--blue-dark);
  }
  #mobile-filters {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 35px;
    min-width: 33px;
    padding: 4px;
    border: 1px solid #dfe4e0;
    border-radius: 5px;
    background: #fff;
    color: #718581;
  }
  #mobile-filter-count {
    font-size: 9px;
  }
  .filter-sheet .select-row {
    display: block;
  }
  .filter-sheet .filter-group {
    border-bottom: 1px solid #e1e7e1;
  }
  .filter-sheet .filter-group>summary {
    min-height: 62px;
    padding: 14px 0;
    border: 0;
    border-radius: 0;
    background: none;
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .filter-sheet .filter-group-title {
    font-size: 13px;
    font-weight: 600;
  }
  .filter-sheet .filter-selection {
    display: block;
    font-size: 11px;
    margin-left: auto;
    color: #7b8987;
    max-width: 65%;
  }
  .filter-sheet .filter-section,.filter-sheet .stage-navigation {
    position: static;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
    padding: 0 0 16px;
    max-height: none;
    min-width: 0;
    max-width: none;
    overflow: visible;
  }
  .filter-sheet .choice-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .filter-sheet .age-choices {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }
  .filter-sheet .choice-grid label>span,.filter-sheet .stage-button {
    border-color: #e1e6e1;
    min-height: 40px;
    font-size: 11px;
  }
  .filter-sheet .choice-grid input:checked+span,.filter-sheet .stage-button.active {
    border-color: #b9d1ed;
    background: #eaf2fd;
  }
}
