/* Case directory only: keyword search and editable suggestions, aligned with the case grid. */
html body.cases-page.case-search-refined .case-library-controls {
  --case-search-ink: #252b32;
  --case-search-muted: #69717b;
  --case-search-border: #cbd0d6;
  --case-search-surface: #ffffff;
  --case-search-hover: #edf0f3;
  --case-search-focus: #4d7caa;
  display: block;
  margin: 0 0 18px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
html body.cases-page.case-search-refined .case-library-controls::before,
html body.cases-page.case-search-refined .case-library-controls::after { display: none; }
html body.cases-page.case-search-refined .case-library-search > label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
html body.cases-page.case-search-refined .case-library-search-field {
  display: grid;
  grid-template-areas: "icon input reset";
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 56px;
  padding: 5px 12px;
  border: 1px solid var(--case-search-border);
  border-radius: 8px;
  background: var(--case-search-surface);
}
html body.cases-page.case-search-refined .case-library-search-field:focus-within {
  border-color: var(--case-search-focus);
  outline: 2px solid var(--case-search-focus);
  outline-offset: 2px;
}
html body.cases-page.case-search-refined .case-library-search-icon {
  position: static;
  grid-area: icon;
  width: 20px;
  height: 20px;
  color: var(--case-search-muted);
  transform: none;
}
html body.cases-page.case-search-refined .case-library-search-field input {
  grid-area: input;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--case-search-ink);
  font-size: 16px;
  box-shadow: none;
}
html body.cases-page.case-search-refined .case-library-search input::placeholder { color: var(--case-search-muted); }
html body.cases-page.case-search-refined .case-library-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
html body.cases-page.case-search-refined .case-library-reset {
  position: static;
  grid-area: reset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--case-search-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: none;
}
html body.cases-page.case-search-refined .case-library-reset:hover { background: var(--case-search-hover); color: var(--case-search-ink); }
html body.cases-page.case-search-refined .case-library-reset:focus-visible { outline: 2px solid var(--case-search-focus); outline-offset: 2px; }
html body.cases-page.case-search-refined .case-library-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 8px;
}
html body.cases-page.case-search-refined .case-library-keywords button {
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--case-search-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  touch-action: manipulation;
}
html body.cases-page.case-search-refined .case-library-keywords button:hover { color: var(--case-search-ink); }
html body.cases-page.case-search-refined .case-library-keywords button[aria-pressed="true"] { color: var(--case-search-ink); text-decoration: underline; text-underline-offset: 5px; }
html body.cases-page.case-search-refined .case-library-keywords button:focus-visible { outline: 2px solid var(--case-search-focus); outline-offset: 2px; }
html body.cases-page.case-search-refined .case-library-status { margin: 0 0 22px; color: #69717b; font-weight: 400; line-height: 1.7; }
html body.cases-page.case-search-refined .case-library-status.is-empty { border: 0; border-radius: 0; padding: 12px 0; background: transparent; }

@media (max-width: 760px) {
  html body.cases-page.case-search-refined .case-library-controls {
    --case-search-ink: #e8f1fc;
    --case-search-muted: #a9bbd2;
    --case-search-border: #354e6b;
    --case-search-surface: #081a32;
    --case-search-hover: #1b3450;
    --case-search-focus: #75b9db;
    margin: 0 0 16px;
  }
  html body.cases-page.case-search-refined .case-library-status { margin: 0 0 18px; color: #a9bbd2; }
}
