/* The library and tool directory share one compact mobile lookup pattern. */
.library-shortcuts,
.collection-small-label {
  display: none;
}

.resource-hub-page details.directory-facets,
.pv-tools details.directory-tool-search {
  background: transparent;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

.resource-hub-page .directory-facets > summary,
.pv-tools .directory-tool-search > summary {
  display: none;
}

.pv-tools .directory-tool-search {
  width: min(335px, 100%);
}

@media (max-width: 700px) {
  .resource-hub-page .pv-dir-title .library-intro,
  .resource-hub-page .collection-wide-label,
  .resource-hub-page .pv-collections-toggle > summary small {
    display: none;
  }
  .resource-hub-page .collection-small-label {
    display: block;
  }
  .library-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
    border-top: 1px solid var(--lp-line);
  }
  .library-shortcuts a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-height: 44px;
    padding-block: 8px;
    border-bottom: 1px solid var(--lp-line);
    color: var(--lp-ink);
    font: 600 15px/1.35 var(--lp-sans);
  }
  .library-shortcuts a::after {
    content: "→";
    color: var(--lp-wine);
  }
  .library-shortcuts a:is(:hover, :focus-visible) {
    color: var(--lp-wine);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .resource-hub-page .pv-dir-title,
  .pv-tools .pv-dir-title {
    gap: 4px;
  }
  .resource-hub-page .pv-dir-hero {
    padding-bottom: 5px;
  }
  .resource-hub-page .pv-collections-toggle > summary {
    min-height: 44px;
  }
  .resource-hub-page .hub-search-row > .hub-clear {
    justify-self: start;
  }
  .resource-hub-page .hub-toolbar:not(:has(input:not(:placeholder-shown), option:checked:not([value="all"]), [data-resource-topic]:not([data-resource-topic="all"])[aria-pressed="true"])) .hub-clear {
    display: none;
  }
  .resource-hub-page .directory-facets > summary,
  .pv-tools .directory-tool-search > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 44px;
    padding: 6px 0;
    color: var(--lp-wine);
    font: 600 14px/1.4 var(--lp-sans);
    list-style: none;
    cursor: pointer;
  }
  .directory-facets > summary::-webkit-details-marker,
  .directory-tool-search > summary::-webkit-details-marker {
    display: none;
  }
  .resource-hub-page .directory-facets > summary::after,
  .pv-tools .directory-tool-search > summary::after {
    content: "+";
    color: inherit;
    font: 500 18px/1 var(--lp-sans);
  }
  .resource-hub-page .directory-facets[open] > summary::after,
  .pv-tools .directory-tool-search[open] > summary::after {
    content: "−";
  }
  .resource-hub-page .directory-facets .hub-filter-row {
    margin-top: 1px;
  }
  .pv-tools .pv-tool-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
    padding: 3px 14px;
  }
  .pv-tools .directory-tool-search {
    width: auto;
    margin-left: auto;
  }
  .pv-tools .directory-tool-search[open] {
    width: 100%;
    padding-bottom: 8px;
  }
  .pv-tools .pv-tool-row {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 13px 14px 15px;
  }
  .pv-tools .pv-tool-row h3 {
    padding-right: 24px;
    font-size: 18px;
  }
  .pv-tools .pv-tool-name small {
    display: none;
  }
  .pv-tools .pv-tool-info {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: baseline;
    gap: 5px;
  }
  .pv-tools .pv-tool-info p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
  }
  .pv-tools .pv-tool-open {
    position: absolute;
    top: 15px;
    right: 14px;
    margin: 0;
    font-size: 0;
  }
  .pv-tools .pv-tool-open span {
    font-size: 16px;
  }
}
