:root {
  /* --- Colours --- */
  --primary: #007cc2;
  --primary-hover: #005a99;
  --primary-light: rgba(0, 124, 194, 0.08);
  --primary-light-solid: #ebf5fa;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --bg-footer: #f7f9fa;
  --bg-input: #f3f4f6;
  /* --- Typography Scale (rem — respects root font size) --- */
  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1rem;
  /* 16px */
  --text-lg: 1.125rem;
  /* 18px */
  --text-xl: 1.25rem;
  /* 20px */
  --text-2xl: 1.5rem;
  /* 24px */
  --text-3xl: 1.875rem;
  /* 30px */
  --text-4xl: 2.25rem;
  /* 36px */
  /* --- Spacing Scale (rem) --- */
  --space-1: 0.25rem;
  /*  4px */
  --space-2: 0.5rem;
  /*  8px */
  --space-3: 0.75rem;
  /* 12px */
  --space-4: 1rem;
  /* 16px */
  --space-5: 1.25rem;
  /* 20px */
  --space-6: 1.5rem;
  /* 24px */
  --space-8: 2rem;
  /* 32px */
  --space-10: 2.5rem;
  /* 40px */
  --space-12: 3rem;
  /* 48px */
  --space-16: 4rem;
  /* 64px */
  --space-20: 5rem;
  /* 80px */
  --space-30: 7.5rem;
  /* 120px */
  /* --- Border Radii --- */
  --radius: 0.75rem;
  /* 12px */
  --radius-sm: 0.5rem;
  /*  8px */
  --radius-lg: 1rem;
  /* 16px */
  --radius-full: 9999px;
  /* --- Shadows (px is appropriate for shadows) --- */
  --shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --focus-ring: 0 0 0 3px rgba(0, 124, 194, 0.15);
  /* --- Transitions --- */
  --transition: all 0.2s ease;
  /* --- Layout --- */
  --container-padding: var(--space-30);
  /* 120px default; overridden on mobile */
  --header-height: 7.875rem;
  /* 126px */
  --icon-height: 34px;
  --icon-image-height: 17px;
  --button-height: 34px;
  --input-height: 34px;
  --select-height: 34px;
  --item-height: var(--button-height);
  --header-mobile-icon-size: var(--icon-height);
  /* Shared control heights; can be overridden per layout */
  --footer-height: 7.25rem;
  /* 105px */
}

/* Shared request/contact form component. */
.request-modal-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.request-modal-intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
}

.request-modal-intro h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 1.35rem;
  font-weight: 750;
  line-height: 1.2;
}

.request-modal-title {
  display: grid;
  gap: var(--space-2);
}

.request-modal-title__label,
.request-modal-form .form-label {
  color: #334155;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.25;
}

.request-modal-title__value {
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.45;
}

.request-modal-help {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.55;
}

.request-modal-form {
  display: grid;
  gap: var(--space-5);
}

.request-modal-form .form-group {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}

.request-modal-form .form-control,
.request-modal-form .form-select {
  width: 100%;
  height: var(--input-height);
  min-height: var(--input-height);
  max-height: var(--input-height);
  padding: 0 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.request-modal-form textarea.form-control {
  height: auto;
  max-height: none;
  min-height: 6.5rem;
  resize: vertical;
}

.request-modal-form .form-control:focus,
.request-modal-form .form-select:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  outline: none;
}

.request-modal-form .hold-required-by {
  grid-template-columns: minmax(0, 1fr);
}

.request-modal-format {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
}

.request-modal-form .form-group:last-child {
  display: flex;
  justify-content: flex-start;
  padding-top: var(--space-1);
}

@media (min-width: 768px) {
  .request-modal-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .request-modal-form .hold-comment,
  .request-modal-form .hold-start-date,
  .request-modal-form .hold-request-group,
  .request-modal-form .hold-proxied-users,
  .request-modal-form .form-group:last-child {
    grid-column: 1 / -1;
  }
}

/* Shared child refinements promoted from both application themes. */
.history-content {
  padding: var(--space-5) var(--container-padding);
}

.history-actions {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: var(--space-3);
}

html {
  font-size: 100%;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

body {
  background-color: var(--bg-body);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  font-size: var(--text-base);
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible) {
  outline: none !important;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--primary) !important;
  outline-offset: 2px !important;
}

.page-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#app,
body>.main {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

.main,
[role="main"],
.main-content {
  flex: 1 0 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-body);
}

.main-content,
.container,
#content {
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--space-5) 0;
  display: flex;
  flex-direction: column;
}

.template-dir-search .container,
.template-dir-record .container,
.template-dir-alphabrowse .container {
  max-width: none;
  padding: var(--space-5) 0;
}

header,
.header,
#header {
  /* Sticky so search is always reachable */
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  /* Background handled by ::before so the header itself doesn't
  create a containing block that clips child dropdowns */
  background: transparent;
  backdrop-filter: none;
  /* Mobile-first defaults */
  padding: var(--space-3);
  height: auto;
  min-height: unset;
  flex-wrap: wrap;
  gap: var(--space-4);
}

#header.header-search-dropdown-open {
  z-index: 40000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  width: 100%;
}

header::before,
.header::before,
#header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.05);
  z-index: -1;
}

.header-left,
.navbar-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo,
.navbar-brand {
  text-decoration: none !important;
  color: var(--primary) !important;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.2;
  transition: var(--transition);
}

.logo:hover,
.navbar-brand:hover {
  opacity: 0.8;
  text-decoration: none !important;
}

.logo-icon {
  width: auto;
  height: 2.8rem;
  /* increased for better visibility */
  object-fit: contain;
  flex-shrink: 0;
}

.page-title-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.125rem;
  min-width: 0;
  color: var(--text-main);
  text-decoration: none;
}

.page-title-link strong {
  color: var(--primary);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title-link span {
  color: var(--text-main);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.3;
}

.page-title-link:hover {
  color: inherit;
  text-decoration: none;
}

header .logo span,
#header .logo span {
  display: none;
}

.search-area {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}

.search-area-note {
  margin: 0;
  color: var(--text-main);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.searchForm {
  width: 100%;
  margin: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.searchForm-main {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
}

.searchForm-secondary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.search-container {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 6px 6px 6px 18px;
  border-radius: 8px;
  flex: 1;
  min-width: 0;
  max-width: 800px;
  border: 1px solid var(--primary);
  transition: var(--transition);
  position: relative;
}

.search-container:focus-within {
  box-shadow: var(--focus-ring);
}

.searchForm .search-container {
  max-width: none;
}

.search-icon {
  color: #999;
  margin-right: 10px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-icon svg,
.search-icon img {
  width: var(--icon-image-height);
  height: var(--icon-image-height);
  flex-shrink: 0;
}

.search-container .search-input,
.search-container input[type="text"],
.searchForm .search-input,
.searchForm input[type="text"],
.searchForm_lookfor {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 0.95rem;
  color: var(--text-main);
  height: var(--input-height);
  min-height: var(--input-height);
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
}

.search-container .search-input:focus,
.search-container input[type="text"]:focus,
.searchForm .search-input:focus,
.searchForm input[type="text"]:focus,
.searchForm_lookfor:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.searchForm .main-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.searchForm .main-input-wrapper .searchForm_lookfor {
  flex: 0 1 calc(100% - 2.75rem) !important;
  width: calc(100% - 2.75rem) !important;
  max-width: calc(100% - 2.75rem) !important;
}

.searchForm_lookfor::selection {
  background: var(--primary);
  color: #fff;
}

.searchForm_lookfor::-moz-selection {
  background: var(--primary);
  color: #fff;
}

.search-inline-option {
  display: flex;
  align-items: center;
  align-self: stretch;
  margin-right: 8px;
  padding-left: 8px;
  border-left: 1px solid #ddd;
  flex-shrink: 0;
  position: relative;
}

.search-container > .search-inline-option {
  border-left: 0;
  margin-left: var(--space-2);
  margin-right: var(--space-2);
  padding-left: 0;
}

.search-inline-option--mobile {
  display: none;
}

.search-inline-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border: 1px solid #d6e2ea;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  overflow: hidden;
}

.search-inline-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.search-inline-toggle.is-disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.search-inline-toggle__input {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  cursor: pointer;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  z-index: 1;
}

.search-inline-toggle.is-disabled .search-inline-toggle__input {
  cursor: not-allowed;
}

.search-inline-toggle__indicator {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #c5d2dc;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  transition: var(--transition);
  flex-shrink: 0;
}

.search-inline-toggle__text {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.search-inline-toggle__input:checked~.search-inline-toggle__indicator {
  background: var(--primary);
  box-shadow: var(--focus-ring);
}

.search-inline-toggle__input:focus-visible {
  outline: none;
}

.search-inline-toggle:has(.search-inline-toggle__input:focus-visible) {
  box-shadow: var(--focus-ring);
}

.searchForm-reset {
  position: absolute;
  top: 50%;
  right: 0.375rem;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  transition: var(--transition);
}

.searchForm-reset::before,
.searchForm-reset::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.875rem;
  height: 2px;
  border-radius: 9999px;
  background: currentColor;
}

.searchForm-reset::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.searchForm-reset::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.searchForm-reset:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.searchForm-reset:focus-visible {
  background: var(--primary-light);
  color: var(--primary);
  outline: none;
}

.search-type-select {
  flex-shrink: 0;
  min-width: 12rem;
  max-width: 16rem;
  padding-left: var(--space-2);
  border-left: 1px solid #ddd;
}

.search-type-select .searchForm_type {
  height: 100%;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 1.75rem 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.search-type-select .searchForm_type:focus {
  box-shadow: none !important;
}

#headerSearchTypeDropdown {
  border-left: 1px solid #ddd;
  margin-right: 8px;
  padding-left: 0;
  margin-left: 0;
  max-width: 50%;
  min-width: 0;
  flex-shrink: 1;
  position: relative;
  z-index: 30000;
}

#headerSearchTypeDropdown .dropdown-menu {
  left: 0;
  right: auto;
  top: calc(100% + 4px);
  width: max-content;
  min-width: 100%;
  max-width: min(18rem, calc(100vw - 1rem));
  transform: translateY(-8px);
  z-index: 30000;
}

#headerSearchTypeDropdown.open .dropdown-menu {
  transform: translateY(0);
}

#headerSearchTypeDropdown .dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: transparent;
  border: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  gap: 8px;
  border-radius: 0;
  overflow: hidden;
}

#headerSearchTypeDropdown .trigger-content {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
}

#headerSearchTypeDropdown .dropdown-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: left;
}

#headerSearchTypeDropdown .dropdown-trigger:hover .dropdown-text {
  color: var(--primary);
}

#headerSearchTypeDropdown .dropdown-trigger:hover {
  background: transparent;
}

#headerSearchTypeDropdown .dropdown-trigger:focus,
#headerSearchTypeDropdown .dropdown-trigger:focus-visible {
  outline: none;
  box-shadow: none;
}

.dropdown-mobile-icon,
.limit-mobile-icon-text {
  display: none;
  color: var(--text-muted);
}

.search-button-group {
  display: flex;
  gap: 4px;
  margin-left: 0;
  flex-shrink: 0;
}

.search-btn-text {
  display: none;
}

.search-btn-icon {
  display: inline-block;
  width: var(--icon-image-height);
  height: var(--icon-image-height);
  flex-shrink: 0;
}

.search-button {
  width: var(--button-height);
  height: var(--button-height);
  min-width: var(--button-height);
  max-width: var(--button-height);
  padding: 0;
  flex-shrink: 0;
  justify-content: center;
}

.search-button,
.searchForm button[type="submit"] {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: none;
}

.searchForm button[type="submit"] {
  padding: 10px 22px;
}

.searchForm .search-button {
  min-width: var(--button-height);
  max-width: none;
  width: auto;
  margin-left: var(--space-2);
}

.search-button svg,
.search-button img,
.searchForm button[type="submit"] svg,
.searchForm button[type="submit"] img {
  width: var(--icon-image-height);
  height: var(--icon-image-height);
  min-width: var(--icon-image-height);
  min-height: var(--icon-image-height);
  flex-shrink: 0;
}

.search-button:hover,
.searchForm button[type="submit"]:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: none;
}

.adv-search-btn {
  width: var(--item-height);
  height: var(--item-height);
  min-width: var(--item-height);
  max-width: var(--item-height);
  min-height: var(--item-height);
  max-height: var(--item-height);
  align-self: center;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
  padding: 0;
  line-height: 0;
}

.adv-search-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

.adv-search-btn svg {
  display: block;
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  min-height: 16px;
  max-height: 16px;
  flex-shrink: 0;
}

.adv-search-btn__text {
  display: none;
}

.adv-search-btn__label {
  display: none;
}

.search-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  padding: 0 var(--space-1);
}

.search-checkboxes .checkbox {
  margin: 0;
  position: relative;
}

.search-checkboxes label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.search-checkboxes input {
  margin: 0;
}

.search-checkboxes #checkbox_keepfilters {
  display: inline-flex;
}

.search-area .search-checkboxes:not(:has(.checkbox)) {
  display: none;
}

.search-form-summary {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
}

.search-form-summary .adv_search_terms {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-main);
}

.search-form-summary .adv_search_links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0;
}

.search-form-summary .adv_search_links a {
  color: var(--primary);
  font-size: var(--text-sm);
  text-decoration: none;
}

.search-form-summary .adv_search_links a:hover,
.search-form-summary .adv_search_links a:focus {
  text-decoration: underline;
}

.header-actions {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.info-btn,
.lang-trigger,
.status-indicator {
  width: var(--item-height);
  height: var(--item-height);
  background: #f3f4f6;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.info-btn:hover,
.lang-trigger:hover {
  background: #e8e8e8;
}

.lang-trigger svg {
  border-radius: 50%;
}

.status-indicator {
  background: var(--primary-light);
}

.status-indicator:hover,
.status-indicator.active {
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.header-code-trigger {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-main);
}

.custom-dropdown.min-dropdown .header-code {
  display: none;
}

.header-code {
  display: inline-block;
  min-width: 1.75rem;
  text-align: center;
}

.compact-trigger {
  min-width: 0;
  width: auto;
  gap: var(--space-2);
  padding: 0 var(--space-3);
}

.header-actions .action-btn,
.header-actions .info-btn,
.header-actions .lang-trigger,
.header-actions .status-indicator,
.header-actions .custom-dropdown>.dropdown-trigger {
  height: var(--item-height);
  min-height: var(--item-height);
}

.header-actions .custom-dropdown {
  --custom-dropdown-row-height: var(--item-height);
}

.header-actions .action-btn,
.header-actions .info-btn,
.header-actions .lang-trigger,
.header-actions .status-indicator {
  width: var(--item-height);
  min-width: var(--item-height);
  padding: 0;
}

.account-action__avatar {
  align-items: center;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  height: 100%;
  justify-content: center;
  line-height: 1;
  width: 100%;
}

#header .account-action .account-action__avatar {
  border-radius: 8px;
  font-size: 14px !important;
  height: 100% !important;
  width: 100% !important;
}

#header .account-action .action-btn__icon,
#header .account-action svg {
  height: var(--icon-image-height) !important;
  width: var(--icon-image-height) !important;
}

.header-actions .custom-dropdown>.dropdown-trigger {
  padding-top: 0;
  padding-bottom: 0;
}

.header-actions>.account-action {
  order: 2;
}

.dropdown-item-note {
  margin-left: auto;
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
}

.action-btn-badge {
  position: relative;
}

.action-btn-badge__count {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.header-notices {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--container-padding) var(--space-3);
  background: var(--bg-body);
}

.header-shortcut {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-full);
  background: #fff;
  border: 1px solid var(--border-color);
  color: var(--primary);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.header-shortcut:hover {
  border-color: var(--primary);
  color: var(--primary-hover);
  text-decoration: none;
}

.header-actions .btn-ghost.help-link {
  padding: 0;
  width: var(--item-height);
  height: var(--item-height);
  background: #f3f4f6;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: var(--text-muted);
}

.header-actions .btn-ghost.help-link .btn-text {
  display: none;
}

@media (min-width: 1440px) {
  .header-actions .btn-ghost.help-link {
    width: auto;
    height: auto;
    padding: 0.5em 1em;
    background: transparent;
    border: 1px solid var(--border-color);
  }

  .header-actions .btn-ghost.help-link .btn-text {
    display: inline;
  }
}

@media (min-width: 1017px) and (max-width: 1439px) {
  .template-dir-search.template-name-results .meta-row {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--space-3) !important;
    justify-content: space-between !important;
    position: static !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .meta-left,
.template-dir-search.template-name-results .meta-right,
.template-dir-search.template-name-results .results-count,
.template-dir-search.template-name-results .meta-controls,
.template-dir-search.template-name-results .meta-actions {
    align-items: center !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: var(--space-3) !important;
    position: static !important;
  }

  .template-dir-search.template-name-results .meta-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    order: 1 !important;
  }

  .template-dir-search.template-name-results .meta-right {
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    order: 2 !important;
  }

  .template-dir-search.template-name-results .mobile-facet-btn {
    display: none !important;
  }

  .template-dir-search.template-name-results .facet-toggle {
    align-items: center !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    gap: var(--space-2) !important;
    margin: 0 !important;
    order: initial !important;
    position: static !important;
    transform: none !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .facet-toggle .facet-label-text {
    display: inline !important;
    white-space: nowrap !important;
  }

  .template-dir-search.template-name-results .results-count-text--mobile {
    display: none !important;
  }

  .template-dir-search.template-name-results .results-count > .results-count-text {
    display: inline !important;
    flex: 0 0 auto !important;
    margin-left: var(--space-2) !important;
    order: 4 !important;
    white-space: nowrap !important;
    width: auto !important;
  }
}

@media (min-width: 1017px) and (max-width: 1439px) {
  .template-dir-search.template-name-results .meta-row {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--space-3) !important;
    justify-content: space-between !important;
    position: static !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .meta-left,
.template-dir-search.template-name-results .meta-right,
.template-dir-search.template-name-results .results-count,
.template-dir-search.template-name-results .meta-controls,
.template-dir-search.template-name-results .meta-actions {
    align-items: center !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: var(--space-3) !important;
    position: static !important;
  }

  .template-dir-search.template-name-results .meta-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    order: 1 !important;
  }

  .template-dir-search.template-name-results .meta-right {
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    order: 2 !important;
  }

  .template-dir-search.template-name-results .mobile-facet-btn {
    display: none !important;
  }

  .template-dir-search.template-name-results .facet-toggle {
    align-items: center !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    gap: var(--space-2) !important;
    margin: 0 !important;
    order: initial !important;
    position: static !important;
    transform: none !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .facet-toggle .facet-label-text {
    display: inline !important;
    white-space: nowrap !important;
  }

  .template-dir-search.template-name-results .results-count-text--mobile {
    display: none !important;
  }
}

@media (min-width: 1017px) and (max-width: 1439px) {
  .template-dir-search.template-name-results .results-count > .results-count-text {
    display: none !important;
  }

  .template-dir-search.template-name-results .results-count-text--mobile {
    display: block !important;
    flex: 0 0 100% !important;
    margin: var(--space-3) 0 0 !important;
    order: 3 !important;
    text-align: left !important;
    white-space: normal !important;
    width: 100% !important;
  }
}

@media (min-width: 1017px) and (max-width: 1439px) {
  .template-dir-search.template-name-results .results-count > .results-count-text {
    display: inline !important;
    flex: 0 0 auto !important;
    margin-left: var(--space-2) !important;
    order: 4 !important;
    white-space: nowrap !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .results-count-text--mobile {
    display: none !important;
  }
}

@media (min-width: 1017px) {
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 20%) minmax(0, 55%) minmax(0, 25%);
    padding: 0;
    width: min(calc(100% - (var(--space-5) * 2)), 1450px);
    max-width: 1450px;
    margin: 0 auto;
    height: auto;
    min-height: var(--header-height);
    align-items: center;
    gap: var(--space-5);
  }

  .header-left {
    display: contents;
  }

  .header-right {
    display: contents;
  }

  .logo-icon {
    width: auto;
    height: 4rem;
    /* larger logo on desktop */
  }

  .search-btn-text {
    display: inline;
  }

  .search-btn-icon {
    display: none;
  }

  .search-button {
    width: auto;
    height: auto;
    min-width: auto;
    max-width: none;
    padding: 10px 22px;
  }

  .search-container {
    min-width: 400px;
    flex: 1 1 auto;
    max-width: 700px;
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1016px) {
  .result-item--cover-opposite-tablet .result-selection {
    order: 1;
  }

  .result-item--cover-opposite-tablet .result-content {
    order: 2;
  }

  .result-item--cover-opposite-tablet .result-image-box {
    order: 3;
  }
}

.template-dir-search.template-name-results .results-count > .results-count-text {
  display: none !important;
}

.template-dir-search.template-name-results .meta-left {
  order: 1;
}

.template-dir-search.template-name-results .meta-right {
  order: 2;
}

.template-dir-search.template-name-results .results-count-text--mobile {
  display: block !important;
  flex: 0 0 100% !important;
  margin: 0 !important;
  min-width: 0 !important;
  order: 3 !important;
  text-align: left !important;
  white-space: normal !important;
  width: 100% !important;
}

@media (max-width: 1016px) {
  .template-dir-search.template-name-results .meta-row {
    --results-mobile-control-size: 32px;
    --results-mobile-checkbox-size: 18px;
    --results-mobile-gap: 6px;
    align-items: center !important;
    column-gap: var(--results-mobile-gap) !important;
    display: grid !important;
    grid-template-columns:
    var(--results-mobile-checkbox-size)
    var(--results-mobile-control-size)
    var(--results-mobile-control-size)
    minmax(0, 1fr)
    var(--results-mobile-control-size)
    var(--results-mobile-control-size)
    var(--results-mobile-control-size)
    var(--results-mobile-control-size)
    var(--results-mobile-control-size) !important;
    grid-template-rows: var(--results-mobile-control-size) auto !important;
    justify-items: center !important;
    row-gap: 8px !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .meta-left,
.template-dir-search.template-name-results .meta-right,
.template-dir-search.template-name-results .results-count,
.template-dir-search.template-name-results .meta-controls,
.template-dir-search.template-name-results .meta-actions {
    display: contents !important;
  }

  .template-dir-search.template-name-results .results-count #selectAllCheckbox {
    grid-column: 1 !important;
    grid-row: 1 !important;
    height: var(--results-mobile-checkbox-size) !important;
    justify-self: start !important;
    margin: 0 !important;
    max-height: var(--results-mobile-checkbox-size) !important;
    max-width: var(--results-mobile-checkbox-size) !important;
    min-height: var(--results-mobile-checkbox-size) !important;
    min-width: var(--results-mobile-checkbox-size) !important;
    width: var(--results-mobile-checkbox-size) !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-prev {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-next {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .sort-group {
    grid-column: 5 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .limit-group {
    grid-column: 6 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .results-options-menu {
    grid-column: 7 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .meta-actions>.action-btn {
    grid-column: 8 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .mobile-facet-btn {
    grid-column: 9 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .sort-group,
.template-dir-search.template-name-results .limit-group,
.template-dir-search.template-name-results .sort-group .custom-dropdown,
.template-dir-search.template-name-results .limit-group .custom-dropdown,
.template-dir-search.template-name-results .results-options-menu,
.template-dir-search.template-name-results .results-count>.arrow-btn,
.template-dir-search.template-name-results .results-count>span.arrow-btn,
.template-dir-search.template-name-results .results-count>a.arrow-btn,
.template-dir-search.template-name-results .meta-actions>.action-btn,
.template-dir-search.template-name-results .mobile-facet-btn,
.template-dir-search.template-name-results .mobile-facet-badge {
    align-items: center !important;
    display: inline-flex !important;
    flex: none !important;
    height: var(--results-mobile-control-size) !important;
    justify-content: center !important;
    margin: 0 !important;
    max-height: var(--results-mobile-control-size) !important;
    max-width: var(--results-mobile-control-size) !important;
    min-height: var(--results-mobile-control-size) !important;
    min-width: var(--results-mobile-control-size) !important;
    padding: 0 !important;
    width: var(--results-mobile-control-size) !important;
  }

  .template-dir-search.template-name-results .meta-row .dropdown-trigger,
.template-dir-search.template-name-results .results-options-trigger {
    align-items: center !important;
    display: inline-flex !important;
    height: var(--results-mobile-control-size) !important;
    justify-content: center !important;
    margin: 0 !important;
    max-height: var(--results-mobile-control-size) !important;
    max-width: var(--results-mobile-control-size) !important;
    min-height: var(--results-mobile-control-size) !important;
    min-width: var(--results-mobile-control-size) !important;
    padding: 0 !important;
    width: var(--results-mobile-control-size) !important;
  }

  .template-dir-search.template-name-results .meta-row .trigger-content,
.template-dir-search.template-name-results .mobile-facet-badge {
    align-items: center !important;
    display: inline-flex !important;
    gap: 0 !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-text {
    display: none !important;
  }

  .template-dir-search.template-name-results .results-count-text--mobile {
    display: block !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    margin: 0 !important;
    min-width: 0 !important;
    text-align: left !important;
    white-space: normal !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .control-group>label,
.template-dir-search.template-name-results .sort-group .dropdown-text,
.template-dir-search.template-name-results .limit-group .dropdown-text,
.template-dir-search.template-name-results .limit-group .limit-mobile-icon,
.template-dir-search.template-name-results .results-options-text,
.template-dir-search.template-name-results .mobile-facet-badge .facet-text,
.template-dir-search.template-name-results .mobile-facet-badge .facet-arrow,
.template-dir-search.template-name-results .meta-row .chevron {
    display: none !important;
  }

  .template-dir-search.template-name-results .sort-group .dropdown-mobile-icon,
.template-dir-search.template-name-results .limit-group .limit-mobile-icon-text,
.template-dir-search.template-name-results .results-options-icon,
.template-dir-search.template-name-results .facet-filter-icon,
.template-dir-search.template-name-results .meta-actions>.action-btn svg,
.template-dir-search.template-name-results .results-count .arrow-btn svg {
    align-items: center !important;
    display: inline-flex !important;
    height: 16px !important;
    justify-content: center !important;
    width: 16px !important;
  }

  .template-dir-search.template-name-results .limit-group .limit-mobile-icon-text {
    color: var(--text-muted) !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }
}

.template-dir-search.template-name-results .results-count > .results-count-text {
  display: none !important;
}

.template-dir-search.template-name-results .meta-left {
  order: 1;
}

.template-dir-search.template-name-results .meta-right {
  order: 2;
}

.template-dir-search.template-name-results .results-count-text--mobile {
  display: block !important;
  flex: 0 0 100% !important;
  margin: 0 !important;
  min-width: 0 !important;
  order: 3 !important;
  text-align: left !important;
  white-space: normal !important;
  width: 100% !important;
}

.template-dir-search.template-name-results .results-count > .results-count-text {
  display: none !important;
}

.template-dir-search.template-name-results .meta-left {
  order: 1;
}

.template-dir-search.template-name-results .meta-right {
  order: 2;
}

.template-dir-search.template-name-results .results-count-text--mobile {
  display: block !important;
  flex: 0 0 100% !important;
  margin: 0 !important;
  min-width: 0 !important;
  order: 3 !important;
  text-align: left !important;
  white-space: normal !important;
  width: 100% !important;
}

@media (max-width: 767px) {
  .template-dir-search.template-name-results .meta-row {
    --results-mobile-control-size: 32px;
    --results-mobile-checkbox-size: 18px;
    --results-mobile-gap: 6px;
    align-items: center !important;
    column-gap: var(--results-mobile-gap) !important;
    display: grid !important;
    grid-template-columns:
    var(--results-mobile-checkbox-size)
    var(--results-mobile-control-size)
    var(--results-mobile-control-size)
    minmax(0, 1fr)
    var(--results-mobile-control-size)
    var(--results-mobile-control-size)
    var(--results-mobile-control-size)
    var(--results-mobile-control-size)
    var(--results-mobile-control-size) !important;
    grid-template-rows: var(--results-mobile-control-size) auto !important;
    justify-items: center !important;
    row-gap: 8px !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .meta-left,
.template-dir-search.template-name-results .meta-right,
.template-dir-search.template-name-results .results-count,
.template-dir-search.template-name-results .meta-controls,
.template-dir-search.template-name-results .meta-actions {
    display: contents !important;
  }

  .template-dir-search.template-name-results .results-count #selectAllCheckbox {
    grid-column: 1 !important;
    grid-row: 1 !important;
    height: var(--results-mobile-checkbox-size) !important;
    justify-self: start !important;
    margin: 0 !important;
    max-height: var(--results-mobile-checkbox-size) !important;
    max-width: var(--results-mobile-checkbox-size) !important;
    min-height: var(--results-mobile-checkbox-size) !important;
    min-width: var(--results-mobile-checkbox-size) !important;
    width: var(--results-mobile-checkbox-size) !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-prev {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-next {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .sort-group {
    grid-column: 5 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .limit-group {
    grid-column: 6 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .results-options-menu {
    grid-column: 7 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .meta-actions>.action-btn {
    grid-column: 8 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .mobile-facet-btn {
    grid-column: 9 !important;
    grid-row: 1 !important;
  }

  .template-dir-search.template-name-results .sort-group,
.template-dir-search.template-name-results .limit-group,
.template-dir-search.template-name-results .sort-group .custom-dropdown,
.template-dir-search.template-name-results .limit-group .custom-dropdown,
.template-dir-search.template-name-results .results-options-menu,
.template-dir-search.template-name-results .results-count>.arrow-btn,
.template-dir-search.template-name-results .results-count>span.arrow-btn,
.template-dir-search.template-name-results .results-count>a.arrow-btn,
.template-dir-search.template-name-results .meta-actions>.action-btn,
.template-dir-search.template-name-results .mobile-facet-btn,
.template-dir-search.template-name-results .mobile-facet-badge {
    align-items: center !important;
    display: inline-flex !important;
    flex: none !important;
    height: var(--results-mobile-control-size) !important;
    justify-content: center !important;
    margin: 0 !important;
    max-height: var(--results-mobile-control-size) !important;
    max-width: var(--results-mobile-control-size) !important;
    min-height: var(--results-mobile-control-size) !important;
    min-width: var(--results-mobile-control-size) !important;
    padding: 0 !important;
    width: var(--results-mobile-control-size) !important;
  }

  .template-dir-search.template-name-results .meta-row .dropdown-trigger,
.template-dir-search.template-name-results .results-options-trigger {
    align-items: center !important;
    display: inline-flex !important;
    height: var(--results-mobile-control-size) !important;
    justify-content: center !important;
    margin: 0 !important;
    max-height: var(--results-mobile-control-size) !important;
    max-width: var(--results-mobile-control-size) !important;
    min-height: var(--results-mobile-control-size) !important;
    min-width: var(--results-mobile-control-size) !important;
    padding: 0 !important;
    width: var(--results-mobile-control-size) !important;
  }

  .template-dir-search.template-name-results .meta-row .trigger-content,
.template-dir-search.template-name-results .mobile-facet-badge {
    align-items: center !important;
    display: inline-flex !important;
    gap: 0 !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-text {
    display: none !important;
  }

  .template-dir-search.template-name-results .results-count-text--mobile {
    display: block !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    margin: 0 !important;
    min-width: 0 !important;
    text-align: left !important;
    white-space: normal !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .control-group>label,
.template-dir-search.template-name-results .sort-group .dropdown-text,
.template-dir-search.template-name-results .limit-group .dropdown-text,
.template-dir-search.template-name-results .limit-group .limit-mobile-icon,
.template-dir-search.template-name-results .results-options-text,
.template-dir-search.template-name-results .mobile-facet-badge .facet-text,
.template-dir-search.template-name-results .mobile-facet-badge .facet-arrow,
.template-dir-search.template-name-results .meta-row .chevron {
    display: none !important;
  }

  .template-dir-search.template-name-results .sort-group .dropdown-mobile-icon,
.template-dir-search.template-name-results .limit-group .limit-mobile-icon-text,
.template-dir-search.template-name-results .results-options-icon,
.template-dir-search.template-name-results .facet-filter-icon,
.template-dir-search.template-name-results .meta-actions>.action-btn svg,
.template-dir-search.template-name-results .results-count .arrow-btn svg {
    align-items: center !important;
    display: inline-flex !important;
    height: 16px !important;
    justify-content: center !important;
    width: 16px !important;
  }

  .template-dir-search.template-name-results .limit-group .limit-mobile-icon-text {
    color: var(--text-muted) !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }
}

@media (max-width: 767px) {
  .template-dir-search.template-name-results .meta-row {
    --results-mobile-control-size: 32px;
    --results-mobile-gap: 6px;
    align-items: center !important;
    column-gap: var(--results-mobile-gap) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    row-gap: 4px !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .meta-left,
.template-dir-search.template-name-results .meta-right,
.template-dir-search.template-name-results .results-count,
.template-dir-search.template-name-results .meta-controls,
.template-dir-search.template-name-results .meta-actions {
    display: contents !important;
  }

  .template-dir-search.template-name-results .results-count #selectAllCheckbox {
    flex: 0 0 18px !important;
    height: 18px !important;
    margin: 0 !important;
    order: 1 !important;
    width: 18px !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-prev {
    order: 2 !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-next {
    order: 3 !important;
  }

  .template-dir-search.template-name-results .sort-group {
    margin-left: auto !important;
    order: 4 !important;
  }

  .template-dir-search.template-name-results .limit-group {
    order: 5 !important;
  }

  .template-dir-search.template-name-results .results-options-menu {
    order: 6 !important;
  }

  .template-dir-search.template-name-results .meta-actions>.action-btn {
    order: 7 !important;
  }

  .template-dir-search.template-name-results .mobile-facet-btn {
    display: inline-flex !important;
    margin: 0 !important;
    order: 8 !important;
    padding: 0 !important;
  }

  .template-dir-search.template-name-results .sort-group,
.template-dir-search.template-name-results .limit-group,
.template-dir-search.template-name-results .sort-group .custom-dropdown,
.template-dir-search.template-name-results .limit-group .custom-dropdown,
.template-dir-search.template-name-results .results-options-menu,
.template-dir-search.template-name-results .results-count>.arrow-btn,
.template-dir-search.template-name-results .results-count>span.arrow-btn,
.template-dir-search.template-name-results .results-count>a.arrow-btn,
.template-dir-search.template-name-results .meta-actions>.action-btn,
.template-dir-search.template-name-results .mobile-facet-btn,
.template-dir-search.template-name-results .mobile-facet-badge {
    flex: 0 0 var(--results-mobile-control-size) !important;
    height: var(--results-mobile-control-size) !important;
    max-height: var(--results-mobile-control-size) !important;
    max-width: var(--results-mobile-control-size) !important;
    min-height: var(--results-mobile-control-size) !important;
    min-width: var(--results-mobile-control-size) !important;
    width: var(--results-mobile-control-size) !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-text {
    display: none !important;
  }

  .template-dir-search.template-name-results .results-count-text--mobile {
    display: block !important;
    flex: 0 0 100% !important;
    margin: 0 !important;
    min-width: 0 !important;
    order: 20 !important;
    text-align: left !important;
    white-space: normal !important;
    width: 100% !important;
  }
}

@media (max-width: 767px) {
  .template-dir-search.template-name-results .meta-row {
    --results-mobile-control-size: 32px;
    --results-mobile-gap: 6px;
    align-items: center !important;
    column-gap: var(--results-mobile-gap) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    row-gap: 4px !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .meta-left,
.template-dir-search.template-name-results .meta-right,
.template-dir-search.template-name-results .results-count,
.template-dir-search.template-name-results .meta-controls,
.template-dir-search.template-name-results .meta-actions {
    display: contents !important;
  }

  .template-dir-search.template-name-results .results-count #selectAllCheckbox {
    flex: 0 0 18px !important;
    height: 18px !important;
    margin: 0 !important;
    order: 1 !important;
    width: 18px !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-prev {
    order: 2 !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-next {
    order: 3 !important;
  }

  .template-dir-search.template-name-results .sort-group {
    margin-left: auto !important;
    order: 4 !important;
  }

  .template-dir-search.template-name-results .limit-group {
    order: 5 !important;
  }

  .template-dir-search.template-name-results .results-options-menu {
    order: 6 !important;
  }

  .template-dir-search.template-name-results .meta-actions>.action-btn {
    order: 7 !important;
  }

  .template-dir-search.template-name-results .mobile-facet-btn {
    display: inline-flex !important;
    margin: 0 !important;
    order: 8 !important;
    padding: 0 !important;
  }

  .template-dir-search.template-name-results .sort-group,
.template-dir-search.template-name-results .limit-group,
.template-dir-search.template-name-results .sort-group .custom-dropdown,
.template-dir-search.template-name-results .limit-group .custom-dropdown,
.template-dir-search.template-name-results .results-options-menu,
.template-dir-search.template-name-results .results-count>.arrow-btn,
.template-dir-search.template-name-results .results-count>span.arrow-btn,
.template-dir-search.template-name-results .results-count>a.arrow-btn,
.template-dir-search.template-name-results .meta-actions>.action-btn,
.template-dir-search.template-name-results .mobile-facet-btn,
.template-dir-search.template-name-results .mobile-facet-badge {
    flex: 0 0 var(--results-mobile-control-size) !important;
    height: var(--results-mobile-control-size) !important;
    max-height: var(--results-mobile-control-size) !important;
    max-width: var(--results-mobile-control-size) !important;
    min-height: var(--results-mobile-control-size) !important;
    min-width: var(--results-mobile-control-size) !important;
    width: var(--results-mobile-control-size) !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-text {
    display: none !important;
  }

  .template-dir-search.template-name-results .results-count-text--mobile {
    display: block !important;
    flex: 0 0 100% !important;
    margin: 0 !important;
    min-width: 0 !important;
    order: 20 !important;
    text-align: left !important;
    white-space: normal !important;
    width: 100% !important;
  }
}

@media (min-width: 1017px) and (max-width: 1439px) {
  .result-item--cover-opposite-laptop .result-selection {
    order: 1;
  }

  .result-item--cover-opposite-laptop .result-content {
    order: 2;
  }

  .result-item--cover-opposite-laptop .result-image-box {
    order: 3;
  }
}

@media (min-width: 1440px) {
  .result-item--cover-opposite-desktop .result-selection {
    order: 1;
  }

  .result-item--cover-opposite-desktop .result-content {
    order: 2;
  }

  .result-item--cover-opposite-desktop .result-image-box {
    order: 3;
  }
}

@media (min-width: 1440px) {
  header,
.header,
#header {
    padding: 0;
  }
}

footer,
.footer,
#footer {
  background: #ffffff !important;
  padding: 0;
  height: auto;
  min-height: var(--footer-height);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 -4px 5px 0 rgba(0, 0, 0, 0.05);
  z-index: 100;
  position: relative;
  flex-shrink: 0;
}

.footer-inner {
  padding: var(--space-5) var(--container-padding) var(--space-8);
  width: 100%;
  min-height: var(--footer-height);
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.footer-logo-section {
  flex: 1 1 auto;
  min-width: 0;
  order: 4;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
}

.footer-logo {
  display: block;
  width: auto;
  max-width: min(220px, 100%);
  max-height: 5rem;
  object-fit: contain;
}

footer .logo {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--primary);
}

footer .logo:hover {
  text-decoration: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
  width: 100%;
  order: 1;
}

.footer-column {
  min-width: 0;
}

.footer-title {
  margin: 0 0 var(--space-3);
  color: var(--text-main);
  font-size: var(--text-sm);
  font-weight: 700;
}

.footer-title--secondary {
  margin-top: var(--space-5);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-list a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-list a:hover {
  color: var(--primary);
}

.footer-column--meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-column--meta .footer-title {
  margin-bottom: 0;
}

.footer-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.footer-copy a {
  color: var(--primary);
  text-decoration: none;
  font-size: inherit;
}

.footer-copy a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-powered {
  width: 100%;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
  order: 3;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.footer-links a {
  text-decoration: none;
  color: var(--text-main);
  font-size: var(--text-sm);
  font-weight: 700;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.footer-links a:hover {
  color: #000;
  border-bottom-color: var(--primary);
  text-decoration: none;
}

.card,
.panel,
.history-card,
.browse-card,
.advanced-card,
.results-meta-card {
  background: #fff;
  padding: var(--space-6);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.panel-default>.panel-heading {
  background: #f9fafb;
  border-color: var(--border-color);
  border-radius: var(--radius) var(--radius) 0 0;
}

.btn,
button {
  cursor: pointer;
  min-height: var(--button-height);
  transition: var(--transition);
}

.btn,
.btn-primary,
.btn-primary-large,
.btn-ghost,
.btn-dashed,
.btn-primary-inline,
.back-btn,
.copy-to-clipboard-button,
.action-btn,
.arrow-btn,
.search-button,
.adv-search-btn,
.remove-btn,
button[type="submit"] {
  box-sizing: border-box;
  height: var(--button-height);
  max-height: var(--button-height);
  min-height: var(--button-height);
}

button svg,
button img,
.btn svg,
.btn img,
.action-btn svg,
.action-btn img,
.arrow-btn svg,
.arrow-btn img,
.back-btn svg,
.back-btn img,
.dropdown-trigger svg,
.dropdown-trigger img,
.search-button svg,
.search-button img {
  height: var(--icon-image-height);
  width: var(--icon-image-height);
  max-height: var(--icon-image-height);
  max-width: var(--icon-image-height);
}

button .fa[class*="fa-"],
.btn .fa[class*="fa-"],
.action-btn .fa[class*="fa-"],
.dropdown-trigger .fa[class*="fa-"] {
  font-size: var(--icon-image-height);
  line-height: 1;
}

.btn-primary,
.btn-primary-large,
.remove-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-decoration: none !important;
}

.btn-primary:hover,
.btn-primary-large:hover,
.remove-btn:hover {
  background: var(--primary-hover);
  color: #fff;
  text-decoration: none !important;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.btn-ghost:hover {
  color: var(--primary);
  border-color: var(--primary);
  text-decoration: none;
}

.btn-dashed {
  background: transparent;
  color: var(--text-muted);
  border: 2px dashed var(--border-color);
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
}

.btn-dashed:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.btn-primary-inline {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-size: var(--text-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.btn-primary-inline:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.arrow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--button-height);
  height: var(--button-height);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px !important;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.arrow-btn:hover {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
}

.arrow-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--button-height);
  height: var(--button-height);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.action-btn__icon,
.action-btn svg {
  width: var(--icon-image-height);
  height: var(--icon-image-height);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.record-home-btn {
  gap: var(--space-2);
  width: auto;
  padding: 0 var(--space-3);
}

.record-home-btn__text {
  display: none;
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
}

.record-options-menu {
  min-width: 0;
}

.record-options-menu .dropdown-menu {
  left: auto;
  right: 0;
  min-width: 13rem;
  width: max-content;
}

.record-options-menu .dropdown-item {
  gap: var(--space-3);
  min-height: var(--select-height);
  text-decoration: none;
  white-space: nowrap;
}

.record-options-menu .dropdown-item svg,
.record-options-menu .dropdown-item .icon {
  width: var(--icon-image-height);
  height: var(--icon-image-height);
  flex: 0 0 var(--icon-image-height);
}

.action-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.action-btn.loading svg {
  animation: spin 1s linear infinite !important;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.center-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.record-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-left: var(--space-2);
}

.record-counter-mobile .counter-text {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.record-counter strong {
  color: var(--primary);
  font-weight: 600;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.top-nav h1 {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  font-weight: 700;
  color: #111;
  margin: 0;
}

@media (min-width: 1017px) {
  body.template-dir-search.template-name-history .top-nav h1,
body.template-dir-alphabrowse.template-name-home .top-nav h1,
body.template-dir-search.template-name-advanced .top-nav h1 {
    font-size: var(--text-2xl);
  }
}

.back-btn,
.copy-to-clipboard-button {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 350;
  font-size: var(--text-sm);
  padding: 0 var(--space-4);
  height: var(--button-height);
  max-height: var(--button-height);
  min-height: var(--button-height);
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.back-btn .btn-text,
.action-btn span,
.dropdown-trigger span,
.record-home-btn .record-home-btn__text,
.results-options-text {
  color: inherit;
  font-weight: 500 !important;
}

.back-btn svg,
.action-btn svg,
.arrow-btn svg,
.dropdown-trigger svg,
.record-home-btn svg {
  display: block;
  stroke-width: 2 !important;
}

.search-button .search-btn-text {
  font-weight: 500 !important;
}

.back-btn:hover,
.copy-to-clipboard-button:hover {
  color: var(--primary);
  border-color: var(--primary);
  text-decoration: none;
  background: #fff;
}

.copy-to-clipboard-button .icon,
.copy-to-clipboard-button .fa {
  display: none !important;
}

.copy-to-clipboard-button {
  border-radius: var(--radius-sm) !important;
}

.modern-input,
input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  min-height: var(--input-height);
  padding: 0.625em 0.875em;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text-main);
  background: #fff;
  transition: var(--transition);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.modern-input {
  height: var(--input-height);
}

textarea {
  min-height: calc(var(--input-height) * 2);
}

.modern-input:focus,
input[type="text"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.modern-input.small {
  width: 6.25rem;
}

.modern-input-small {
  width: 100%;
  height: var(--input-height);
  padding: 0 8px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
  transition: all 0.2s;
  background: var(--bg-input);
}

.modern-input-small:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  background: #fff;
}

.modern-select {
  width: 20rem;
  max-width: 100%;
  min-height: var(--select-height);
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  background: #fff;
  transition: var(--transition);
  overflow-y: auto;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 10px 6px;
}

.modern-select:not([multiple]) {
  height: var(--select-height);
}

.modern-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.modern-select[multiple] {
  background-image: none;
  border-radius: 8px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --modern-option-block-padding: 8px;
  height: calc(((var(--select-height) + (var(--modern-option-block-padding) * 2)) * 10) + 2px);
  padding: 0;
}

.modern-select option {
  height: var(--select-height);
  min-height: var(--select-height);
  line-height: var(--select-height);
  padding: var(--modern-option-block-padding, 8px) 16px;
  border-bottom: 1px solid #edf0f4;
  cursor: pointer;
  color: var(--text-main);
  font-size: 0.9rem;
  text-transform: capitalize;
}

.modern-select option:last-child {
  border-bottom: none;
}

.modern-select option:hover {
  background-color: var(--primary-light);
}

.modern-select option:checked,
.modern-select option:checked:hover,
.modern-select option:checked:focus,
.modern-select option:checked:active {
  background-color: var(--primary-light-solid) !important;
  background-image: linear-gradient(var(--primary-light-solid), var(--primary-light-solid)) !important;
  color: var(--primary) !important;
  -webkit-text-fill-color: var(--primary) !important;
  box-shadow: 0 0 0 100px var(--primary-light-solid) inset !important;
  font-weight: 600;
  text-shadow: none !important;
}

.modern-select option:not(:checked),
.modern-select option:not(:checked):focus,
.modern-select option:not(:checked):active {
  background-color: #fff !important;
  background: #fff linear-gradient(0deg, #fff 0%, #fff 100%) !important;
  box-shadow: 0 0 0 100px #fff inset !important;
  color: var(--text-main) !important;
  -webkit-text-fill-color: var(--text-main) !important;
  text-shadow: none !important;
  font-weight: 400 !important;
}

.modern-select::-webkit-scrollbar {
  width: 8px;
}

.modern-select::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.modern-select::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
  border: 2px solid #f1f1f1;
}

.modern-select::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.custom-dropdown {
  position: relative;
  user-select: none;
  min-width: 220px;
  --custom-dropdown-row-height: var(--select-height);
  --custom-dropdown-menu-width: max-content;
  --custom-dropdown-menu-min-width: 100%;
  --custom-dropdown-menu-max-width: min(24rem, calc(100vw - 2rem));
}

#langDropdown.custom-dropdown,
#citationDropdown.custom-dropdown,
#exportDropdown.custom-dropdown {
  min-width: 0;
}

#langDropdown .dropdown-menu,
#themeDropdown .dropdown-menu {
  width: max-content;
  min-width: 8rem;
  left: auto;
  right: 0;
}

.dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--select-height);
  min-height: var(--select-height);
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.2s;
}

.dropdown-trigger:hover {
  border-color: #bbb;
}

.custom-dropdown.open .dropdown-trigger {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.trigger-content {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.chevron {
  color: #9ca3af;
  transition: transform 0.2s;
}

.custom-dropdown.open .chevron {
  transform: rotate(180deg);
}

.custom-dropdown .dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: var(--custom-dropdown-menu-width);
  min-width: var(--custom-dropdown-menu-min-width);
  max-width: var(--custom-dropdown-menu-max-width);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  overflow: visible;
  /* Ensures child items don't overflow the rounded corners */
  padding: 0;
  /* Overrides default bootstrap padding */
  margin: 0;
}

.custom-dropdown .dropdown-menu.is-viewport-positioned {
  position: fixed;
  width: var(--knav-dropdown-width) !important;
  min-width: 0 !important;
  max-width: calc(100vw - 16px) !important;
  transform: none !important;
  z-index: 20000;
  overflow-x: hidden;
  overflow-y: auto;
  transition: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.custom-dropdown .dropdown-menu.is-viewport-positioned .dropdown-item {
  min-width: 0 !important;
  max-width: none !important;
  width: auto !important;
}

.custom-dropdown.open .dropdown-menu.is-viewport-positioned {
  transform: none !important;
}

.custom-dropdown[data-dropdown-direction="left"] .dropdown-menu {
  left: auto;
  right: 0;
}

.custom-dropdown[data-dropdown-direction="right"] .dropdown-menu {
  left: 0;
  right: auto;
}

.custom-dropdown[data-dropdown-direction="center"] .dropdown-menu {
  left: 50%;
  right: auto;
  transform: translate(-50%, -8px);
}

.custom-dropdown[data-dropdown-placement="below"] .dropdown-menu {
  top: calc(100% + 4px);
  bottom: auto;
}

.custom-dropdown[data-dropdown-placement="above"] .dropdown-menu {
  top: auto;
  bottom: calc(100% + 4px);
  transform: translateY(8px);
}

.custom-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-dropdown[data-dropdown-direction="center"].open .dropdown-menu {
  transform: translate(-50%, 0);
}

.custom-dropdown[data-dropdown-placement="above"].open .dropdown-menu {
  transform: translateY(0);
}

.custom-dropdown[data-dropdown-direction="center"][data-dropdown-placement="above"] .dropdown-menu {
  transform: translate(-50%, 8px);
}

.custom-dropdown[data-dropdown-direction="center"][data-dropdown-placement="above"].open .dropdown-menu {
  transform: translate(-50%, 0);
}

.custom-dropdown .dropdown-menu.scroll-menu,
.custom-dropdown .dropdown-menu.modern-scrollbar--y {
  overflow-x: hidden;
  overflow-y: auto;
}

.custom-dropdown .dropdown-item {
  min-height: var(--select-height);
  padding: 0 16px;
  line-height: var(--select-height);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  color: #1f2937;
  transition: background 0.15s;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: transparent;
  width: auto;
  min-width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-dropdown .dropdown-item:last-child {
  border-bottom: 0;
}

.custom-dropdown .dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.custom-dropdown .dropdown-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

@media (min-width: 768px) {
  .template-dir-search.template-name-advanced .custom-dropdown .dropdown-menu:not(.is-viewport-positioned) {
    width: max-content !important;
    min-width: 100% !important;
    max-width: min(22rem, calc(100vw - 2rem));
  }

  .template-dir-search.template-name-advanced .custom-dropdown .dropdown-item {
    width: auto !important;
    min-width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .template-dir-search.template-name-advanced #groupJoinDropdown {
    width: max-content;
    min-width: 0;
  }

  .template-dir-search.template-name-advanced #groupJoinDropdown .dropdown-menu {
    left: 0 !important;
    right: auto !important;
    transform: translateY(-8px) !important;
    width: 14rem !important;
    min-width: 14rem !important;
    max-width: 14rem !important;
  }

  .template-dir-search.template-name-advanced #groupJoinDropdown.open .dropdown-menu {
    transform: translateY(0) !important;
  }

  .template-dir-search.template-name-advanced .match-dropdown .dropdown-menu {
    left: 0 !important;
    right: auto !important;
    transform: translateY(-8px) !important;
    width: 11rem !important;
    min-width: 11rem !important;
    max-width: 11rem !important;
  }

  .template-dir-search.template-name-advanced .match-dropdown.open .dropdown-menu {
    transform: translateY(0) !important;
  }

  .template-dir-search.template-name-advanced .group-header-label .match-dropdown {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
  }

  .template-dir-search.template-name-advanced .type-dropdown .dropdown-menu {
    left: 0 !important;
    right: auto !important;
    transform: translateY(-8px) !important;
    width: 16rem !important;
    min-width: 16rem !important;
    max-width: min(22rem, calc(100vw - 2rem)) !important;
  }

  .template-dir-search.template-name-advanced .type-dropdown.open .dropdown-menu {
    transform: translateY(0) !important;
  }
}

.min-dropdown {
  min-width: 80px !important;
}

.min-dropdown .dropdown-menu {
  min-width: min-content;
  width: max-content;
  max-width: 100%;
}

.history-table-wrapper,
.table-wrapper {
  margin-bottom: var(--space-6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  overflow-x: auto;
}

.history-table,
.marc21-table,
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.search-history-table {
  table-layout: fixed;
}

.search-history-table__time {
  width: 21%;
}

.search-history-table__search {
  width: 36.5%;
}

.search-history-table__limits {
  width: 16.5%;
}

.search-history-table__results {
  width: 13.5%;
}

.search-history-table__action {
  width: 12.5%;
}

.search-history-table--scheduled .search-history-table__time {
  width: 17%;
}

.search-history-table--scheduled .search-history-table__search {
  width: 30%;
}

.search-history-table--scheduled .search-history-table__limits {
  width: 18%;
}

.search-history-table--scheduled .search-history-table__results {
  width: 11%;
}

.search-history-table--scheduled .search-history-table__schedule,
.search-history-table--scheduled .search-history-table__action {
  width: 12%;
}

.history-table thead,
.marc21-table thead,
.table thead {
  background: #f9fafb;
}

.history-table th,
.marc21-table th,
.table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 700;
  font-size: var(--text-sm);
  color: #4b5563;
  border-bottom: 1px solid var(--border-color);
}

.history-table td,
.marc21-table td,
.table td {
  padding: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
}

.history-table tbody tr:hover,
.marc21-table tbody tr:hover,
.table tbody tr:hover {
  background: #f9fafb;
}

.history-table tbody tr:last-child td,
.table tbody tr:last-child td {
  border-bottom: none;
}

.pagination-container {
  display: flex;
  justify-content: center;
  padding: var(--space-6) 0;
}

.pagination {
  display: flex;
  gap: var(--space-1);
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination>li {
  display: flex;
  float: none;
}

.pagination>li>a,
.pagination>li>span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 6px !important;
  background: #fff;
  line-height: inherit;
}

.page-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  font-size: var(--text-sm);
  cursor: pointer;
}

.page-item a,
.page-item span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border-color);
  border-radius: 6px !important;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  float: none;
  position: static;
  padding: 0;
  margin: 0;
  line-height: inherit;
}

.pagination-container > .pagination {
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-container > .pagination > li > a,
.pagination-container > .pagination > li > span {
  box-sizing: border-box;
  width: auto;
  min-width: 2.25rem;
  padding: 0.25rem 0.5rem;
  line-height: 1.2;
}

.page-item a:hover,
.pagination>li>a:hover,
.pagination>li>span:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: var(--primary-light) !important;
  text-decoration: none;
}

.page-item.active span,
.pagination>.active>a,
.pagination>.active>span,
.pagination>.active>a:hover,
.pagination>.active>span:hover,
.pagination>.active>a:focus,
.pagination>.active>span:focus {
  background: var(--primary);
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

.page-item.disabled a,
.page-item.disabled span,
.pagination>.disabled>a,
.pagination>.disabled>span,
.pagination>.disabled>a:hover,
.pagination>.disabled>span:hover {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f9fafb;
  background-color: #f9fafb;
  border-color: #e5e7eb;
  color: #9ca3af;
}

.holdings-pagination {
  gap: var(--space-2);
}

.holdings-pagination>li>a,
.holdings-pagination>li>span,
.holdings-pagination__button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px !important;
  box-shadow: none;
  box-sizing: border-box;
  color: var(--text-muted);
  display: inline-flex;
  font-size: var(--text-sm);
  font-weight: 600;
  gap: var(--space-2);
  height: var(--button-height);
  justify-content: center;
  line-height: 1;
  min-height: var(--button-height);
  min-width: 6.25rem;
  padding: 0 var(--space-4);
  text-decoration: none;
  transition: var(--transition);
}

.holdings-pagination>li>a:hover,
.holdings-pagination__button:hover {
  background: var(--primary-light) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  text-decoration: none;
}

.holdings-pagination>.disabled>.holdings-pagination__button,
.holdings-pagination>.disabled>.holdings-pagination__button:hover {
  background: #f9fafb !important;
  border-color: #e5e7eb !important;
  color: #9ca3af !important;
  cursor: not-allowed;
  opacity: 0.62;
}

.holdings-pagination__icon {
  flex: 0 0 var(--icon-image-height);
  height: var(--icon-image-height);
  width: var(--icon-image-height);
}

.switch-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.switch-container input {
  display: none;
}

.switch-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: #ccc;
  border-radius: 12px;
  transition: background-color 0.2s;
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch-container input:checked+.switch-slider {
  background-color: var(--primary);
}

.switch-container input:checked+.switch-slider::before {
  transform: translateX(20px);
}

.badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin: 0 0 var(--space-4) 0;
  color: var(--text-main);
}

.empty-message {
  color: var(--text-muted);
  font-size: var(--text-sm);
  padding: var(--space-4) 0;
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.action-link:hover {
  color: var(--primary);
  text-decoration: none;
}

.action-link.delete-link:hover {
  color: #dc2626;
}

.action-link.save-link:hover {
  color: var(--primary);
}

.hero-section {
  background: transparent;
  padding: 0 var(--container-padding);
  text-align: center;
  min-height: calc(100vh - 17.5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin: 0 auto;
  width: 100%;
}

.hero-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title-card {
  background: #fff;
  padding: var(--space-10) var(--space-8);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.hero-top-title {
  font-size: var(--text-lg);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: var(--space-2);
  letter-spacing: 0.0625em;
}

.hero-subtitle {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  color: var(--text-main);
  margin: 0 auto;
  font-weight: 800;
  line-height: 1.2;
  max-width: 56.25rem;
}

.hero-description-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 1100px;
  margin: 0 auto var(--space-8);
  width: 100%;
}

@media (min-width: 768px) {
  .hero-description-grid {
    flex-direction: row;
    gap: var(--space-6);
  }
}

.hero-description-card {
  flex: 1;
  text-align: justify;
  color: var(--text-main);
  background: #fff;
  padding: var(--space-6) var(--space-8);
  border-radius: var(--radius);
  line-height: 1.7;
  font-size: var(--text-base);
  font-weight: 400;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* Align content to the top */
}

.hero-description-card h3 {
  margin-top: 0;
  margin-bottom: var(--space-3);
  font-size: var(--text-lg);
  font-weight: 700;
  /* Ensure paragraphs start at the same level even if heading wraps */
  min-height: 3.5rem;
  display: flex;
  align-items: center;
}

.hero-description-card p {
  margin-bottom: 0;
}

.hero-stats-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  background: var(--bg-input);
  padding: 10px 24px;
  border-radius: 100px;
  margin: 0 auto 30px;
  text-align: center;
  border: 1px solid var(--border-color);
  max-width: 1100px;
  width: 100%;
}

.stats-label {
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-number {
  font-weight: 800;
  color: var(--text-main);
  font-size: 1.1rem;
}

.stat-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.stat-divider {
  width: 1px;
  height: 20px;
  background: var(--border-color);
}

.hero-links-card {
  background: #fff;
  padding: var(--space-6);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 1100px;
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
}

.hero-footer-link {
  display: flex;
  gap: var(--space-6);
  margin: 0;
}

.hero-footer-link a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.hero-footer-link a:hover {
  opacity: 1;
  text-decoration: underline;
}

.hero-footer-link a.hero-link-red {
  color: var(--primary);
}

.hero-footer-link a.hero-link-red:hover {
  color: var(--primary-hover);
}

.city-scroller-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto var(--space-8);
  overflow: hidden;
  position: relative;
  /* Fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.city-scroller {
  display: flex;
  white-space: nowrap;
}

.city-scroller-track {
  display: flex;
  gap: var(--space-4);
  animation: scroll 60s linear infinite;
  padding: var(--space-3) 0;
}

.city-scroller-container:hover .city-scroller-track {
  animation-play-state: paused;
}

.city-item {
  background: var(--bg-input);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.flag-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.results-layout {
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.results-main {
  width: 100%;
}

.results-header-container {
  padding: var(--space-5) var(--container-padding) 0 var(--container-padding);
}

.results-body {
  display: flex;
  gap: var(--space-8);
  align-items: flex-start;
  margin-top: var(--space-6);
  padding: 0 var(--container-padding);
}

.results-meta-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 16px;
}

.meta-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.meta-right {
  display: flex;
  align-items: center;
  margin-left: auto;
  justify-content: flex-end;
  flex-grow: 1;
}

.meta-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-group label {
  font-weight: 700;
  color: #111;
  white-space: nowrap;
}

.right-side-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.meta-actions {
  display: flex;
  gap: 8px;
}

.results-options-menu {
  min-width: 0;
}

.results-options-trigger {
  min-width: var(--button-height);
  width: auto;
  height: var(--button-height);
  padding: 0 0.75rem;
  gap: var(--space-2);
}

.results-options-trigger .trigger-content {
  gap: var(--space-2);
}

.results-options-icon {
  flex-shrink: 0;
}

.results-options-text {
  display: none;
  font-weight: 600;
  white-space: nowrap;
}

.results-options-menu .dropdown-menu {
  min-width: 18rem;
  width: 18rem;
  max-width: min(22rem, calc(100vw - 2rem));
}

.results-options-menu .dropdown-item {
  align-items: center;
  gap: var(--space-3);
  min-height: var(--select-height);
  max-width: 100%;
  padding-bottom: 0.5rem;
  padding-top: 0.5rem;
  line-height: 1.25;
  overflow: visible;
  text-decoration: none;
  text-overflow: clip;
  white-space: nowrap;
}

.results-options-menu .dropdown-item svg,
.results-options-menu .dropdown-item .icon {
  width: var(--icon-image-height);
  height: var(--icon-image-height);
  flex: 0 0 var(--icon-image-height);
}

.results-options-menu .dropdown-item>span:not(.icon):not(.icon--font) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facet-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 12px;
}

.facet-label-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111;
}

.results-count {
  font-size: 1.05rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.results-list {
  display: flex;
  flex-direction: column;
  flex: 3.5;
  min-width: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  width: 100%;
}

.main-results {
  border-bottom: 1px solid #000;
  min-width: 0;
}

.result-item {
  display: flex;
  align-items: stretch;
  gap: 13px;
  padding: 9px 0;
  border-top: 1px solid #000;
  min-width: 0;
  position: relative;
}

.result-item+.result-item {
  margin-top: 0;
}

.result-item:hover {
  background-color: transparent;
}

.result-item .result-actions .savedLists {
  display: none !important;
}

.result-item-body {
  display: contents;
}

.select-all-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--button-height);
  height: var(--button-height);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0;
  flex-shrink: 0;
}

.select-all-checkbox:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.select-all-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

.record-checkbox {
  display: inline-flex !important;
  align-items: center;
  cursor: pointer;
  padding: 0 !important;
  margin: 0;
  position: relative;
  user-select: none;
}

.checkbox-select-item {
  visibility: visible !important;
  position: static !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-icon {
  display: none !important;
}

.record-checkbox:hover .checkbox-icon {
  border-color: var(--primary);
  background: var(--primary-light);
}

.checkbox-icon::after {
  content: "" !important;
  display: none !important;
  width: 5px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
}

.checkbox-select-item:checked~.checkbox-icon {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

.checkbox-select-item:checked~.checkbox-icon::after {
  display: block !important;
}

.result-selection {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 55px;
  padding-top: 3px;
  align-self: flex-start;
}

.result-number {
  font-weight: 700;
  font-size: 1rem;
  color: #111;
}

.result-cover-container {
  --result-cover-fill-scale: 1.08;
  width: 5.75rem;
  height: 7.5rem;
  min-height: 0;
  align-self: flex-start;
  flex-shrink: 0;
  margin-bottom: 0.875rem;
  position: relative;
}

.result-cover-container--fill {
  overflow: hidden;
}

.result-cover-container--fill .result-image-box,
.result-cover-container--fill .result-image-box a {
  overflow: hidden;
}

.result-cover-container--fill .result-image,
.result-cover-container--fill .result-image-box img,
.result-cover-container--fill .result-image-box .recordcover,
.result-cover-container--fill .result-image-box .recordcover_obalky {
  transform: translateY(0) scale(var(--result-cover-fill-scale));
  transform-origin: top center;
}

.result-image-box {
  width: 5.75rem;
  height: 7.5rem;
  min-height: 0;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  align-self: flex-start;
  flex-shrink: 0;
  overflow: visible;
  position: relative;
  margin-bottom: 0;
  isolation: isolate;
}

/* Keep a missing-cover icon centered within the complete cover slot. */
.template-dir-search.template-name-results
  .result-image-box[id^="obalka_format_"]:has(> svg) {
  align-items: center;
}

.result-image-box:empty {
  display: none;
}

.result-image-box[id^="obalka_cover_"]:not(:has(img)):not(:has(a)) {
  display: none;
}

.result-image-box a {
  display: block;
  width: 100%;
  height: 100%;
}

.result-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  border-radius: var(--radius-sm);
}

.result-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  border-radius: var(--radius-sm);
}

.result-image-box .recordcover,
.result-image-box .recordcover_obalky {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  padding-top: 0 !important;
  object-fit: cover;
  object-position: top;
  display: block;
  border-radius: var(--radius-sm);
}

.result-content {
  flex: 1;
  min-width: 0;
  align-self: flex-start;
  padding-right: 0;
}

.result-badge-stack {
  --result-inline-badge-height: calc(1rem + 0.5rem + 2px);
  position: static;
  transform: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  width: auto;
  margin-top: calc(var(--space-2) / 2);
}

.result-badge-stack>* {
  align-self: center;
}

.result-format-badge {
  align-items: center;
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  min-height: var(--result-inline-badge-height, calc(1rem + 0.5rem + 2px));
  width: auto;
}

.result-format-badge .label {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  background: var(--primary-light) !important;
  border: 1px solid var(--primary-light);
  color: var(--primary);
  box-shadow: 0 0 0 999px var(--primary-light) inset;
  opacity: 1 !important;
  font-size: var(--text-xs);
  font-weight: 700;
  height: var(--result-inline-badge-height, calc(1rem + 0.5rem + 2px));
  line-height: 1.2;
  min-height: var(--result-inline-badge-height, calc(1rem + 0.5rem + 2px));
  width: auto;
  text-align: center;
  white-space: nowrap;
}

.result-format-badge__icon {
  display: block;
  width: 1rem;
  height: 1rem;
  object-fit: contain;
  flex: 0 0 1rem;
}

.result-format-badge--availability .status {
  display: inline-flex;
  align-items: center;
}

.result-format-badge--availability .status .label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  border: 1px solid currentColor;
  box-shadow: none;
  opacity: 1 !important;
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.2;
  width: max-content;
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
}

.result-format-badge--availability .status .label-success {
  background: #e8f7f0 !important;
  border-color: #e8f7f0 !important;
  color: #1FA971 !important;
}

.result-format-badge--availability .status .label-danger,
.result-format-badge--availability .status .label-warning {
  background: #fbecec !important;
  border-color: #fbecec !important;
  color: #D94141 !important;
}

.result-format-badge--availability .status .label-info,
.result-format-badge--availability .status .label-default {
  background: #f3f4f6 !important;
  border-color: #f3f4f6 !important;
  color: #374151 !important;
}

.result-format-badge--carrier .label {
  background: #f7f9fa !important;
  border-color: #f7f9fa;
  color: var(--text-main);
  box-shadow: 0 0 0 999px #f7f9fa inset;
}

.result-format-badge--electronic .label,
.result-format-badge--probably-electronic .label {
  background: var(--primary-light) !important;
  border-color: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 0 0 999px var(--primary-light) inset;
}

.result-format-badge--physical .label {
  background: #f3f4f6 !important;
  border-color: #f3f4f6;
  color: #374151;
  box-shadow: 0 0 0 999px #f3f4f6 inset;
}

.result-document-type-text {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.25;
}

.result-document-type-text--selection {
  display: none;
}

.result-document-type-text--content {
  display: block;
  margin-bottom: calc(var(--space-3) / 2);
}

.result-title-row {
  margin-bottom: calc(var(--space-3) / 2);
}

.result-title-link {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  text-decoration-color: var(--primary);
}

.result-title-link:hover {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.result-info-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.result-row {
  display: flex;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

@media (max-width: 1016px) {
  .template-dir-search.template-name-results .limit-group .limit-mobile-icon {
    display: none !important;
  }

  .template-dir-search.template-name-results .limit-group .limit-mobile-icon-text {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: var(--text-muted) !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
  }
}

.result-label {
  color: var(--text-muted);
  flex-shrink: 0;
}

.result-value {
  color: var(--text-main);
}

.result-row--external-link .result-value {
  display: inline-flex;
  min-width: 0;
  max-width: 20ch;
}

.result-row--external-link .result-author-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 20ch;
}

.account-book-list {
  border-bottom: 1px solid #000;
}

.account-book-item .result-title-link {
  display: inline;
}

.account-book-item .result-selection:empty {
  display: none;
}

.account-list-page .account-list-header {
  display: block;
  position: static;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  padding: 0;
  margin: 0 0 var(--space-4) 0;
  height: auto;
  min-height: unset;
  z-index: auto;
  border-bottom: 0;
}

.account-list-page .account-list-header::before {
  display: none;
}

.account-list-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

@media (min-width: 1017px) {
  .account-list-title-row {
    margin-top: 19px;
  }
}

.account-list-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.account-list-title__icon {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--button-height);
  height: var(--button-height);
  flex: 0 0 var(--button-height);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  background: #fef3c7;
  color: #92400e;
}

.account-list-title__icon .fa {
  font-size: var(--icon-image-height);
  line-height: 1;
}

.account-list-title h1 {
  margin: var(--space-1) 0 0;
  color: var(--text-main);
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  line-height: 1.15;
  font-weight: normal;
  overflow-wrap: anywhere;
}

.account-list-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.account-list-title-actions .btn-group {
  display: inline-flex;
}

.account-list-title-actions .account-list-icon-action {
  padding: 0 var(--space-3);
}

.account-list-title-actions .account-list-icon-action,
.account-list-title-actions .delete-list-btn {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: var(--space-2);
  line-height: 1;
  white-space: nowrap;
}

.account-list-title-actions .delete-list-btn:hover,
.account-list-title-actions .delete-list-btn:hover .btn-text {
  color: var(--danger, #c0392b) !important;
  text-decoration: none !important;
  text-decoration-color: transparent !important;
}

.account-list-title-actions .delete-list-btn:hover {
  border-color: var(--danger, #c0392b) !important;
  background: #fff !important;
}

.account-list-title-actions .icon-link__label,
.account-list-title-actions .btn-text {
  display: none;
}

.account-list-title-actions .account-list-icon-action::after {
  display: none;
}

.account-list-title-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-1);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.account-list-title-meta p {
  margin: 0;
}

.account-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  min-height: var(--button-height);
}

.account-list-toolbar__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.account-list-title-actions > .custom-dropdown,
.account-list-title-actions > .sort-group,
.account-list-title-actions > .limit-group,
.account-list-title-actions > .min-dropdown {
  flex: 0 0 auto;
}

.account-list-title-actions > .min-dropdown {
  --custom-dropdown-menu-width: max-content;
}

@media (min-width: 1017px) {
  .account-list-title-actions .account-list-icon-action,
.account-list-title-actions .delete-list-btn {
    width: auto !important;
    min-width: var(--button-height);
    gap: var(--space-2);
    padding-left: var(--space-3) !important;
    padding-right: var(--space-3) !important;
    justify-content: center;
  }

  .account-list-title-actions .icon-link__label,
.account-list-title-actions .btn-text {
    display: inline;
  }
}

@media (max-width: 1016px) {
  .account-list-title-row {
    align-items: flex-start !important;
    flex-wrap: wrap;
    row-gap: var(--space-2) !important;
  }

  .account-list-title {
    flex: 0 0 100%;
    width: 100%;
  }

  .account-list-title-actions {
    width: 100%;
    justify-content: flex-start !important;
    margin-left: 0 !important;
  }

  .account-list-title-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-2);
  }

  .account-list-title-actions .account-list-icon-action,
.account-list-title-actions .delete-list-btn {
    width: var(--button-height) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: center;
  }
}

.account-list-title-actions .delete-list-btn .btn-text {
  min-width: 0;
  white-space: nowrap;
}

.account-list-records {
  display: block;
  margin: var(--space-3) 0 var(--space-5);
  padding: 0;
  border-bottom: 1px solid #000;
  list-style: none;
}

.account-list-result .result-item-body {
  flex-wrap: wrap;
}

.account-list-result .result-content {
  min-width: 0;
}

.account-list-entry-meta {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.account-list-entry-meta strong {
  color: var(--text-main);
}

.account-list-entry-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.account-list-entry-action {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--button-height);
  padding: 0 var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  text-decoration: none !important;
  transition: var(--transition);
}

.account-list-entry-action:hover,
.account-list-entry-action:focus {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none !important;
}

.account-list-entry-action--delete,
.account-list-entry-action--delete .icon-link__label {
  color: var(--danger, #c0392b) !important;
}

.account-list-entry-action--delete {
  background: #fff !important;
  border-color: var(--border-color);
  color: var(--danger, #c0392b) !important;
}

.account-list-entry-action--delete:hover,
.account-list-entry-action--delete:focus,
.account-list-entry-action--delete:hover .icon-link__label,
.account-list-entry-action--delete:focus .icon-link__label {
  background: #fff !important;
  border-color: var(--danger, #c0392b) !important;
  color: var(--danger, #c0392b) !important;
  text-decoration: none !important;
}

.account-list-entry-action--delete *,
.account-list-entry-action--delete:hover *,
.account-list-entry-action--delete:focus *,
.account-list-entry-action--delete:active *,
.account-list-entry-action--delete .icon-link__label,
.account-list-entry-action--delete:hover .icon-link__label,
.account-list-entry-action--delete:focus .icon-link__label,
.account-list-entry-action--delete:active .icon-link__label {
  background: transparent !important;
  color: inherit !important;
  text-decoration: none !important;
  text-decoration-color: transparent !important;
}

.account-list-entry-action .icon-link__icon {
  flex: 0 0 var(--icon-image-height);
  height: var(--icon-image-height);
  width: var(--icon-image-height);
}

@media (max-width: 1016px) {
  .account-list-result.result-item--cover-opposite-mobile .account-list-entry-meta {
    grid-column: 1 / -1;
  }

  .account-list-result .result-item-body {
    display: grid;
    grid-template-columns: 5.25rem minmax(0, 1fr);
    grid-template-areas:
    "cover content"
    "meta meta";
    column-gap: var(--space-3);
    row-gap: 0;
    width: 100%;
  }

  .account-list-result .result-image-box {
    grid-area: cover;
  }

  .account-list-result .result-content {
    grid-area: content;
  }

  .account-list-result .account-list-entry-meta {
    grid-area: meta;
  }

  .account-list-result.result-item--cover-opposite-tablet .result-item-body {
    grid-template-columns: minmax(0, 1fr) 5.25rem;
    grid-template-areas:
    "content cover"
    "meta meta";
  }
}

.account-list-page .bulkActionButtons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
}

.account-list-page .bulkActionButtons ul {
  margin: 0;
}

.account-personal-data-overview-card .account-section-card__description {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.account-personal-data-overview-card .account-section-card__description p {
  margin: 0;
}

.account-edit-list-card {
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.account-edit-list-card__header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-color);
}

.account-edit-list-card__header h1 {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  line-height: 1.15;
}

.account-edit-list-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin: 0;
  padding: var(--space-6);
}

.account-edit-list-form .form-group {
  margin: 0;
}

.account-edit-list-form .form-label {
  display: block;
  margin: 0 0 var(--space-2);
  color: var(--text-main);
  font-size: var(--text-base);
  font-weight: 600;
}

.account-edit-list-form .form-control {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
}

.account-edit-list-form textarea.form-control {
  min-height: 8rem;
  resize: vertical;
}

.account-edit-list-form .help-block {
  display: block;
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.account-edit-list-access {
  padding: 0;
  border: 0;
}

.account-edit-list-access .radio {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 var(--space-4) 0 0;
  font-weight: 400;
}

.account-edit-list-form__actions {
  padding-top: var(--space-1);
}

.account-edit-record-title {
  margin: var(--space-2) 0 0;
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.5;
}

.account-edit-record-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.account-edit-record-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
  padding: var(--space-5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.account-edit-record-group legend {
  float: none;
  width: auto;
  margin: 0;
  padding: 0 var(--space-2);
  color: var(--text-main);
  font-size: var(--text-lg);
  font-weight: 700;
}

.account-edit-record-remove {
  align-self: flex-start;
}

.account-edit-list-form .form-select {
  width: 100%;
  max-width: none;
}

@media (max-width: 767px) {
  .account-list-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-list-toolbar__controls {
    width: 100%;
    justify-content: flex-start;
  }

  .account-edit-list-card__header,
.account-edit-list-form {
    padding: var(--space-4);
  }
}

.account-request-actions {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  max-width: 100%;
  min-width: 0;
}

.account-request-actions--cancel {
  align-items: center;
  gap: var(--space-3);
}

.account-request-actions__history,
.account-request-actions__history form,
.account-request-actions__group {
  margin: 0;
  max-width: 100%;
  min-width: 0;
}

.account-request-actions__primary,
.account-request-actions__secondary {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: var(--item-height);
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
  line-height: 1;
  white-space: normal;
}

.account-request-actions__primary {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.account-request-actions__primary:hover,
.account-request-actions__primary:focus {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--primary-hover);
}

.account-request-actions__secondary {
  background: #fff;
  color: var(--text-main);
  font-weight: 400;
}

.account-request-actions__secondary:hover,
.account-request-actions__secondary:focus {
  color: var(--primary);
  border-color: var(--primary);
}

.account-request-actions__secondary:disabled {
  background: #f3f4f6;
  border-color: var(--border-color);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.65;
}

.account-request-actions+.account-request-actions--cancel {
  margin-top: 0;
}

.account-dashboard-page .holds_toolbar.account-request-actions {
  margin-bottom: 0;
}

.account-dashboard-page .holds_toolbar.account-request-actions+.account-request-actions--cancel {
  margin-top: calc(var(--space-3) - var(--space-5));
}

.account-request-actions--cancel+.account-book-list {
  margin-top: var(--space-2);
}

.account-dashboard-page .account-fines-table>tbody>tr>th,
.account-dashboard-page .account-fines-table>tbody>tr>td,
.account-dashboard-page .account-fines-table>tr>th,
.account-dashboard-page .account-fines-table>tr>td {
  padding-left: var(--space-2);
  padding-right: var(--space-2);
}

.account-dashboard-page .account-fines-table>tbody>tr>th,
.account-dashboard-page .account-fines-table>tr>th {
  width: auto;
}

.account-dashboard-page .account-fines-table>tbody>tr.record-description-table-title>th,
.account-dashboard-page .account-fines-table>tr.record-description-table-title>th {
  width: auto;
}

.account-dashboard-page .account-fines-table .pay {
  margin: 0;
}

.account-dashboard-page .account-fines-table .account-request-actions__primary {
  min-height: var(--button-height);
}

.account-dashboard-page .account-fines-table .gpe_submit {
  border-radius: var(--radius-sm);
}

.account-dashboard-page .fines_toolbar {
  width: 100%;
}

.account-dashboard-page .account-fines-table-wrapper {
  box-sizing: border-box;
  contain: inline-size;
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.account-dashboard-page .account-fines-table-wrapper .account-fines-table {
  width: max-content;
  min-width: 100%;
  max-width: none;
}

.result-author-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.result-author-link:hover,
.result-author-link:focus-visible {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.result-author-values a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  text-decoration-color: var(--primary);
}

.result-author-values a:hover,
.result-author-values a:focus {
  color: var(--primary-hover);
  text-decoration: none;
}

.result-full-record-link:hover,
.result-full-record-link:focus {
  text-decoration: none;
}

.facet-sidebar {
  width: 20rem;
  flex-shrink: 0;
  background: var(--bg-card, #fff);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  height: fit-content;
  max-height: calc(100vh - var(--header-height, 7.875rem) - 2rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.facet-sidebar::-webkit-scrollbar {
  width: 5px;
}

.facet-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.facet-sidebar::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 10px;
}

.sidebar-wrapper {
  display: block;
  flex: 0 0 20rem;
  width: 20rem;
  position: sticky;
  top: calc(var(--header-height, 7.875rem) + 0.5rem);
}

.sidebar-wrapper.desktop-hidden {
  display: none;
}

.sidebar,
.side-facets-container {
  width: 20rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.mobile-facet-btn {
  display: none;
  align-items: center;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

.mobile-facet-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  transition: all 0.2s;
}

.mobile-facet-badge:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.active-filters-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--primary-light);
}

.active-filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.active-filters-title {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.clear-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.clear-all-btn:hover {
  background: var(--primary);
  color: #fff;
}

.active-filters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: #fff;
  border: 1px solid var(--primary);
  border-radius: 14px;
  font-size: 0.78rem;
  color: var(--primary);
  max-width: 100%;
  word-break: normal;
}

.active-filter-tag__text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
}

.filter-operator {
  overflow-wrap: normal;
  white-space: nowrap;
}

.filter-label {
  font-weight: 500;
  flex: 1;
}

.remove-filter-btn {
  display: flex;
  align-items: center;
  color: var(--primary);
  opacity: 0.6;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.remove-filter-btn:hover {
  opacity: 1;
}

.sidebar-header {
  padding: 14px 12px 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.facet-sidebar h2 {
  font-size: 1rem;
  color: var(--text-main);
  margin: 0;
  font-weight: 700;
}

.toggle-all-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.toggle-all-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.sf-hidden {
  display: none !important;
}

.sf-chevron {
  transition: transform 0.2s;
}

.sf-rotated {
  transform: rotate(180deg);
}

.facet-section {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
}

.facet-section:last-child {
  border-bottom: none;
}

.facet-header {
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.15s;
}

.facet-header:hover {
  background: var(--primary-hover);
}

.facet-content {
  padding: 0;
  display: block;
}

.facet-list {
  display: block;
  padding: 0;
  margin: 0;
  list-style: none;
}

.facet-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 7px 16px;
  font-size: 0.82rem;
}

.facet-item:hover {
  background: var(--primary-light);
}

.facet-item-active {
  background: var(--primary-light);
}

.facet-item-active .item-link {
  font-weight: 600;
  color: var(--primary);
}

.facet-item .facet-checkbox {
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--border-color);
  border-radius: 0.1875rem;
  box-sizing: border-box;
  flex: 0 0 0.7875rem;
  height: 0.7875rem;
  margin: 0.18rem 0 0;
  min-height: 0.7875rem;
  min-width: 0.7875rem;
  padding: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  width: 0.7875rem;
}

.facet-item .facet-checkbox:checked {
  background-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.2 4.8 8.5 9.8 3.5' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 80% 80%;
  border-color: var(--primary);
}

.facet-item .facet-checkbox:focus-visible {
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.facet-item .item-main {
  align-items: start;
  column-gap: 9.2px;
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 0.7875rem minmax(0, 1fr);
  min-width: 0;
}

.facet-item .item-main .facet-checkbox {
  grid-column: 1;
}

.facet-item .item-main .item-link {
  display: block;
  grid-column: 2;
  min-width: 0;
}

.item-link {
  color: var(--text-main);
  text-decoration: none;
  line-height: 1.4;
  flex: 1;
}

.item-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.item-count,
.facet-count {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  padding-top: 2px;
  margin-left: auto;
}

.record-content {
  padding: var(--space-5) var(--container-padding);
}

.metadata-section-container {
  margin-top: var(--space-6);
  position: relative;
}

.template-dir-record .record-title-navigation {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
}

.similar-items-fullwidth {
  margin-top: var(--space-8);
  width: 100%;
}

.similar-items-title {
  margin: 0 0 var(--space-3) 0;
  font-size: var(--text-lg);
  font-weight: 600;
}

.similar-items-list {
  margin: 0;
  padding-left: 1.25rem;
}

.similar-items-list li {
  margin-bottom: var(--space-2);
}

.similar-items-list li:last-child {
  margin-bottom: 0;
}

.main-metadata {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

.record-detail-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.record-detail-header-main {
  flex: 1;
  min-width: 0;
}

.record-detail-thumbnail {
  flex-shrink: 0;
}

.record-detail-thumbnail-link {
  display: block;
}

.record-detail-thumbnail-image {
  width: 8.5rem;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.record-detail-title-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.record-detail-title {
  margin: 0;
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  line-height: 1.2;
  font-weight: 700;
  color: #111;
}

.template-dir-record .record-main-title {
  margin: 0 0 var(--space-4);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.25;
  font-weight: 600;
  color: #111;
}

.record-detail-report-btn {
  flex-shrink: 0;
}

.record-detail-source-row {
  display: flex;
  align-items: center;
}

.record-detail-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.database-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: 9999px;
  color: var(--primary);
  font-size: 0.8505rem;
  font-weight: 600;
  line-height: 1.2;
}

.database-source-badge-icon {
  flex-shrink: 0;
}

.record-detail-document-link {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
}

.record-detail-document-link:hover {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.keyword-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.keyword-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--primary);
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.keyword-badge:hover {
  color: var(--primary-hover);
  text-decoration: underline;
  text-decoration-color: var(--primary-hover);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

@media (min-width: 0) {
  .record-detail-header {
    flex-direction: column;
  }

  .record-detail-thumbnail-image {
    width: 7rem;
  }
}

.metadata-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.metadata-row {
  display: grid;
  grid-template-columns: 12.5rem 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-3);
}

.metadata-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.metadata-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.metadata-value {
  color: var(--text-main);
  font-size: var(--text-sm);
}

.metadata-value.highlight {
  color: var(--primary);
  font-weight: 600;
}

.metadata-link {
  color: var(--primary);
  text-decoration: none;
}

.metadata-link:hover {
  text-decoration: underline;
}

.external-link {
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.external-link:hover {
  text-decoration: none;
}

.image-grid-section {
  background: #fff;
  padding: var(--space-5);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.section-header-small {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.section-header-small h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.gallery-item .image-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.icon-box {
  color: #fff;
}

.marc21-data {
  margin-top: var(--space-8);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  background: #f9fafb;
  border: none;
  cursor: pointer;
}

.template-dir-record .marc21-data {
  margin: 1.5rem 0;
  border-color: var(--border-color);
  box-shadow: none;
}

.template-dir-record .marc-toggle-btn {
  padding: var(--space-3) var(--space-4) !important;
  background: #f9fafb !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border-color) !important;
  color: var(--text-main);
}

.template-dir-record .marc-toggle-btn .marc-label {
  color: var(--text-main);
  font-size: var(--text-lg);
  font-weight: 700;
}

.template-dir-record .marc-toggle-btn .chevron-icon {
  color: var(--text-main);
}

.template-dir-record .marc21-data .marc-content,
.template-dir-record .marc21-data .record-tabs,
.template-dir-record .marc21-data .tab-content,
.template-dir-record .marc21-data .tab-pane {
  padding: 0;
  background: #fff;
}

.template-dir-record .marc21-data .marc-content {
  overflow-x: auto;
}

.template-dir-record .staff-view--marc {
  margin: 0;
  min-width: 920px;
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  color: var(--text-main);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.template-dir-record .staff-view--marc>tbody>tr>th,
.template-dir-record .staff-view--marc>tbody>tr>td,
.template-dir-record .staff-view--marc>tr>th,
.template-dir-record .staff-view--marc>tr>td {
  padding: var(--space-2) var(--space-3);
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border-color) !important;
  color: var(--text-main);
  font-size: var(--text-sm);
  line-height: 1.45;
  vertical-align: top;
}

.template-dir-record .staff-view--marc .pace-car>th,
.template-dir-record .staff-view--marc .pace-car>td {
  padding: 0;
  height: 0;
  border-bottom: 0 !important;
}

.template-dir-record .staff-view--marc .marc__tag,
.template-dir-record .staff-view--marc>tbody>tr>th {
  width: 6rem;
  color: var(--primary);
  font-weight: 800;
  white-space: nowrap;
}

.template-dir-record .staff-view--marc .marc__ind {
  width: 2.5rem;
  color: #4b5563;
  text-align: center;
}

.template-dir-record .staff-view--marc .marc__field {
  width: auto;
  word-break: break-word;
}

.template-dir-record .staff-view--marc .marc__field strong {
  color: var(--primary);
  font-weight: 800;
}

.template-dir-record .staff-view--marc>tbody>tr:hover>th,
.template-dir-record .staff-view--marc>tbody>tr:hover>td {
  background: var(--primary-light) !important;
}

.template-dir-record .staff-view--marc>tbody>tr:last-child>th,
.template-dir-record .staff-view--marc>tbody>tr:last-child>td {
  border-bottom: 0 !important;
}

.accordion-trigger h2 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0;
}

.chevron-icon {
  transition: transform 0.2s;
}

.chevron-icon.rotated {
  transform: rotate(180deg);
}

.advanced-search-content {
  padding: var(--space-5) var(--container-padding);
}

#advSearchForm {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.advanced-card label,
.advanced-card fieldset legend {
  font-weight: 700;
  color: var(--text-main);
  font-size: var(--text-base);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin: 0;
}

.match-selector {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.match-selector label {
  font-weight: 700;
  color: var(--text-main);
}

.search-groups-wrapper {
  display: flex;
  flex-direction: column;
}

.group-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--space-8) 0;
}

.section-divider {
  border: none;
  border-top: 1px solid #000;
  margin: var(--space-8) 0;
}

.field-group-container {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: var(--space-8);
  position: relative;
}

.group-header-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: var(--space-5);
}

.group-header-label .dropdown-trigger,
.group-header-label .dropdown-text,
.group-header-label .dropdown-item {
  font-weight: 400;
}

.group-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.group-fields .search_place_holder {
  display: none;
}

.search-row {
  display: grid;
  grid-template-columns: 15rem 30rem;
  gap: var(--space-4);
  align-items: center;
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
}

.add-search-row {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: var(--space-4);
}

.add-search-btn {
  width: 100%;
  box-sizing: border-box;
  display: inline-grid !important;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-2) var(--space-3);
  margin: 0;
  background: #fff;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s;
  gap: var(--space-2);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.show-all {
  margin: 6px 16px !important;
}

.add-search-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary) !important;
}

.add-search-btn svg {
  display: block;
  flex: 0 0 var(--icon-image-height);
  height: var(--icon-image-height);
  width: var(--icon-image-height);
}

#groupPlaceHolder .btn-dashed {
  display: inline-grid !important;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: var(--space-2);
  line-height: 1.2;
  white-space: nowrap;
}

#groupPlaceHolder .btn-dashed svg {
  display: block;
  flex: 0 0 var(--icon-image-height);
  height: var(--icon-image-height);
  width: var(--icon-image-height);
}

.group-actions {
  margin-top: var(--space-4);
}

.global-actions {
  margin-top: var(--space-6);
}

.filters-grid {
  margin-top: var(--space-8);
}

.advanced-limits-card .filters-grid {
  margin-top: 0;
}

.advanced-limits-card .filter-divider {
  display: none;
}

.advanced-limit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  align-items: start;
}

.advanced-limit-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

.advanced-limit-column .modern-select {
  width: 100%;
}

.advanced-limit-column--controls {
  gap: var(--space-5);
}

.advanced-limit-column--controls fieldset {
  float: none;
  width: 100%;
  min-width: 0;
  padding: 0;
}

.advanced-limit-column--controls fieldset legend {
  border-bottom: 0 !important;
  margin-bottom: var(--space-3);
  padding-bottom: 0;
}

.advanced-limit-column--controls .year-range {
  max-width: none;
  padding: 0;
}

.advanced-limit-column:not(.advanced-limit-column--controls) .modern-select[multiple] {
  height: var(--advanced-limit-controls-height, auto);
}

/* EDS advanced search uses the same controls and spacing as /Search/Advanced. */
.template-dir-eds.template-name-advanced .eds-field-group {
  margin-bottom: 0;
}

.template-dir-eds.template-name-advanced .eds-search-row {
  grid-template-columns: 8rem 15rem minmax(18rem, 30rem);
}

.template-dir-eds.template-name-advanced .eds-search-row--first {
  grid-template-columns: 15rem minmax(18rem, 30rem);
}

.template-dir-eds.template-name-advanced .eds-operator-slot--first {
  display: none;
}

.template-dir-eds.template-name-advanced .eds-operator-slot,
.template-dir-eds.template-name-advanced .eds-operator-slot .custom-dropdown {
  min-width: 0;
  width: 100%;
}

.template-dir-eds.template-name-advanced .eds-add-search-row {
  grid-template-columns: 8rem 15rem minmax(18rem, 30rem);
}

.template-dir-eds.template-name-advanced .eds-add-search-row .add-search-btn {
  grid-column: 3;
}

.eds-advanced-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.eds-control-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.eds-control-section + .eds-control-section {
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-color);
}

.advanced-card .eds-section-title {
  width: 100%;
  margin: 0 0 var(--space-5);
  padding: 0;
  border: 0;
  font-size: var(--text-lg);
  font-weight: 700;
}

.eds-modes-grid {
  display: grid;
  grid-template-columns: minmax(14rem, 32rem);
  gap: var(--space-4);
  align-items: start;
}

.eds-control-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

.eds-control-card .custom-dropdown {
  width: 100%;
  min-width: 0;
}

.eds-expander-card .eds-checkbox-options {
  grid-template-columns: 1fr;
}

.eds-control-label,
.eds-refine-column > .eds-control-label {
  font-weight: 700;
  color: var(--text-main);
  font-size: var(--text-base);
}

.eds-checkbox-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-5);
}

.eds-checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin: 0;
  cursor: pointer;
  line-height: 1.4;
}

.advanced-card .eds-checkbox-option {
  font-weight: 400;
}

.eds-checkbox-option input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0.12rem 0 0;
}

.eds-refine-options {
  grid-template-columns: 1fr;
}

.eds-limit-grid .advanced-limit-column {
  overflow: visible;
}

.eds-date-column fieldset,
.eds-date-column .year-range {
  width: 100%;
}

.eds-date-column .slider-wrapper {
  margin-top: var(--space-2);
}

@media (max-width: 1016px) {
  .template-dir-eds.template-name-advanced .eds-search-row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .template-dir-eds.template-name-advanced .eds-add-search-row {
    grid-template-columns: 1fr;
  }

  .template-dir-eds.template-name-advanced .eds-add-search-row .add-search-btn {
    grid-column: auto;
  }

  .eds-modes-grid,
  .eds-checkbox-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1016px) {
  .advanced-limit-column:not(.advanced-limit-column--controls) .modern-select[multiple] {
    max-height: calc(((var(--select-height) + (var(--modern-option-block-padding, 8px) * 2)) * 8) + 2px);
  }
}

@media (min-width: 1017px) {
  .advanced-limit-column:not(.advanced-limit-column--controls) {
    height: var(--advanced-limit-controls-height, auto);
    min-height: 0;
    overflow: hidden;
  }

  .advanced-limit-column:not(.advanced-limit-column--controls) .modern-select[multiple] {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
  }

  .advanced-limit-column--controls {
    height: auto;
  }
}

.filter-divider {
  border: none;
  border-top: 1px solid #000;
  margin: var(--space-6) 0;
}

.filter-card {
  margin-bottom: var(--space-6);
}

.filter-card h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 var(--space-4) 0;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.input-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.facet-range-form .input-group label {
  text-transform: uppercase;
}

.year-range {
  width: 100%;
  max-width: 28rem;
  padding: 12px 16px;
  box-sizing: border-box;
}

.btn-setup {
  width: calc(100% - 2 * var(--space-3));
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-2) var(--space-3);
  margin: var(--space-2) var(--space-3) 0;
  background: #fff;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s;
  gap: var(--space-2);
  font-weight: 500;
  appearance: none;
}

.btn-setup:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.range-inputs {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.slider-wrapper {
  position: relative;
  width: 100%;
  height: 2.5rem;
  display: flex;
  align-items: center;
}

.slider-track {
  position: absolute;
  width: 100%;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  z-index: 1;
}

.slider-range {
  position: absolute;
  height: 6px;
  background: var(--primary);
  border-radius: 3px;
  z-index: 2;
}

.range-thumb {
  position: absolute;
  width: 100%;
  height: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
  z-index: 3;
}

.range-thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  cursor: grab;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s;
}

.range-thumb::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.range-thumb::-webkit-slider-thumb:active {
  cursor: grabbing;
}

.range-thumb::-moz-range-thumb {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  cursor: grab;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.range-thumb::-moz-range-thumb:hover {
  transform: scale(1.1);
}

.range-thumb::-moz-range-thumb:active {
  cursor: grabbing;
}

.submit-section {
  margin-top: var(--space-8);
  display: flex;
  justify-content: center;
}

.browse-content {
  padding: var(--space-5) var(--container-padding);
}

.browse-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: nowrap;
  width: 100%;
}

.browse-label,
.browse-suffix {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.browse-input {
  width: 12.5rem;
  flex: 1;
}

.browse-row .custom-dropdown {
  min-width: 15rem;
}

#browseTypeDropdown[data-dropdown-placement="below"] .dropdown-menu {
  left: 0 !important;
  right: auto !important;
  top: calc(100% + 4px);
  transform: translateY(-8px);
}

#browseTypeDropdown[data-dropdown-placement="below"].open .dropdown-menu {
  transform: translateY(0);
}

@media (max-width: 767px) {
  :root {
    --icon-height: 34px;
    --icon-image-height: 17px;
    --button-height: 34px;
    --input-height: 34px;
    --select-height: 34px;
    --item-height: var(--button-height);
    --header-mobile-icon-size: var(--icon-height);
  }

  .advanced-limit-grid {
    grid-template-columns: 1fr;
  }

  .advanced-search-content .card .help-link {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    align-items: center;
  }

  .browse-label,
.browse-suffix {
    font-size: 0.95rem;
    font-weight: 400;
  }

  .browse-label {
    font-size: 0;
  }

  .browse-label::after {
    content: attr(data-mobile-label);
    font-size: 0.95rem;
    font-weight: 400;
  }

  .template-dir-alphabrowse.template-name-home .browse-row .btn-primary-large {
    font-size: 0.95rem;
  }

  .template-dir-alphabrowse.template-name-home .pagination-container .arrow-btn {
    height: var(--item-height) !important;
    min-height: var(--item-height) !important;
    min-width: var(--item-height) !important;
    width: var(--item-height) !important;
  }

  .template-dir-alphabrowse.template-name-home .pagination-container .arrow-btn svg {
    height: var(--icon-image-height) !important;
    min-height: var(--icon-image-height) !important;
    min-width: var(--icon-image-height) !important;
    width: var(--icon-image-height) !important;
  }
}

.gallery-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.gallery-container .card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.gallery .swipebox,
.gallery .image-link {
  width: 90%;
  display: block;
}

.recordcover {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.gallery .recordcover {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.modal-open {
  overflow: hidden !important;
}

.modal {
  text-align: center;
  padding: 0 !important;
  overflow-y: hidden !important;
}

.modal:before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
  margin-right: -4px;
}

.modal-dialog {
  display: inline-block;
  text-align: left;
  vertical-align: middle;
  max-width: 800px;
  /* Increased for better help readability */
  width: 90%;
  margin: 0 auto;
}

.modal-content {
  background: #fff;
  border-radius: 12px !important;
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  /* Ensure it stays within viewport height */
  width: 100%;
}

.modal-loading-overlay {
  display: none !important;
}

.modal-content .modal-body,
#modal .modal-body {
  padding: var(--space-6) var(--space-8);
  overflow-y: auto;
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.modal-content .modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-content .modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content .modal-body::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 10px;
}

.modal-content #lightbox-title,
.modal-content h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 var(--space-6) 0;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.modal-content .form-group {
  margin-bottom: var(--space-5);
}

.modal-content .form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: var(--space-2);
}

.modal-content .form-control-static,
.modal-content .form-control {
  font-size: var(--text-base);
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.modal-content .form-control-static {
  background: var(--bg-body);
  max-height: 120px;
  overflow-y: auto;
}

.modal-content textarea.form-control {
  min-height: 100px;
}

.modal-content .form-select,
.modal-content select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--text-main);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  /* Custom chevron */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.modal-content .form-select:hover,
.modal-content select:hover {
  border-color: #bbb;
}

.modal-content .form-select:focus,
.modal-content select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.modal-content .btn-primary,
.modal-content .export.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.modal-content .btn-primary:hover,
.modal-content .export.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.modal-content .btn-default,
.modal .btn-default {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.modal-content .btn-default:hover,
.modal .btn-default:hover {
  background: var(--primary-light);
}

.modal-content .btn-default:active,
.modal .btn-default:active {
  transform: scale(0.98);
}

.modal-content .close,
.modal .close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  opacity: 1;
}

.modal-content .close:hover,
.modal .close:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

#modal .modal-content {
  position: relative;
}

.facet-lightbox-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 85vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.facet-lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.facet-lightbox-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: 0.025em;
}

.facet-lightbox-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-radius: 6px;
}

.facet-lightbox-close:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.facet-lightbox-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6) var(--space-8);
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.facet-lightbox-content::-webkit-scrollbar {
  width: 8px;
}

.facet-lightbox-content::-webkit-scrollbar-track {
  background: transparent;
}

.facet-lightbox-content::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 10px;
}

.facet-lightbox-content::-webkit-scrollbar-thumb:hover {
  background-color: #bbb;
}

.facet-lightbox-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: #fff;
  display: flex;
  justify-content: flex-end;
}

.btn-close-modal {
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  background: var(--primary-hover);
}

.modal-body {
  padding: 0;
}

.facet-lightbox-content .modal-body h1,
.facet-lightbox-content h1 {
  display: none;
}

.facet-lightbox-content ul,
.facet-lightbox-content ol,
.modal-body .full-facet-list,
.modal-body ul,
.full-facet-list {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
}

.facet-lightbox-content li,
.modal-body .full-facet-list li,
.full-facet-list li {
  list-style: none !important;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.facet-lightbox-content li:last-child,
.full-facet-list li:last-child {
  border-bottom: none;
}

.facet-lightbox-content li a,
.full-facet-list li a {
  color: var(--text-main);
  text-decoration: none;
  flex: 1;
}

.facet-lightbox-content li a:hover,
.full-facet-list li a:hover {
  color: var(--primary);
}

.facet-lightbox-content li .badge,
.facet-lightbox-content li .facet-count,
.full-facet-list .badge,
.modal-body li .badge,
.modal-body li span.badge {
  background: var(--bg-body);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-left: auto;
  flex-shrink: 0;
}

.modal-body .card,
.facet-lightbox-content .card {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.modal-body .card+.card,
.facet-lightbox-content .card+.card {
  margin-top: var(--space-6);
}

.facet-lightbox-content h2,
.facet-lightbox-content #lightbox-title,
.modal-body h2#lightbox-title {
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin-bottom: var(--space-3) !important;
}

.facet-lightbox-content .sort-options,
.modal-body .sort-options,
.full-facet-sort,
.js-facet-sort {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.facet-lightbox-content .sort-options a,
.modal-body .sort-options a,
.full-facet-sort a,
.js-facet-sort a,
.modal-body a[data-sort],
a.js-facet-sort-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: #fff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.facet-lightbox-content .sort-options a:hover,
.full-facet-sort a:hover,
a.js-facet-sort-option:hover {
  background: var(--bg-body);
  border-color: #bbb;
  text-decoration: none !important;
}

.facet-lightbox-content .sort-options a.active,
.full-facet-sort a.active,
a.js-facet-sort-option.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.facet-lightbox-content .sort-options a.active:hover,
a.js-facet-sort-option.active:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.citation-dropdown-card {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 500px;
  max-width: 90vw;
  max-height: 80vh;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2000;
  /* Closed state */
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: all 0.2s ease-out;
}

#citationDropdown.open .citation-dropdown-card {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.citation-dropdown-card .card-header {
  padding: 16px 24px;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
}

.citation-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin: 0;
}

.citation-content {
  padding: 12px 24px;
  overflow-y: auto;
  color: #333;
  line-height: 1.6;
  font-size: 0.9rem;
  text-align: left;
}

.citation-group {
  margin-top: 20px;
}

.citation-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #111;
}

.citation-box {
  background: #f9fafb;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  font-family: 'Inter', sans-serif;
  margin-bottom: 8px;
  word-break: break-word;
  font-size: 0.85rem;
  color: #4b5563;
}

.citation-note {
  font-size: 0.85rem;
  color: #666;
  margin-top: 6px;
}

.citation-dropdown-card .card-footer {
  padding: 16px 24px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: flex-end;
  background: #fff;
}

.btn-agree {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-agree:hover {
  background: var(--primary-hover);
}

.modal-body h1 {
  display: block;
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--border-color);
}

ul.HelpMenu {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-8) 0;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

ul.HelpMenu>li {
  border-bottom: 1px solid var(--border-color);
}

ul.HelpMenu>li:last-child {
  border-bottom: none;
}

ul.HelpMenu>li>a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-5);
  color: var(--text-main);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

ul.HelpMenu>li>a:hover {
  background: var(--bg-body);
  color: var(--primary);
  padding-left: var(--space-6);
  /* slide-indent effect */
}

ul.HelpMenu ul {
  list-style: none;
  padding: 0;
  background: var(--bg-body);
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-color);
}

ul.HelpMenu ul li {
  flex: 1;
  border-right: 1px solid var(--border-color);
}

ul.HelpMenu ul li:last-child {
  border-right: none;
}

ul.HelpMenu ul li a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

ul.HelpMenu ul li a:hover {
  color: var(--primary);
  background: #fff;
}

dl.Content {
  border-left: none;
  padding: 0;
  margin: 0;
}

dl.Content dt {
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  position: relative;
  display: block;
  width: fit-content;
}

dl.Content dt a {
  position: absolute;
  top: -80px;
  visibility: hidden;
  pointer-events: none;
}

dl.Content dd {
  margin: 0 0 var(--space-6) 0;
  padding-left: var(--space-2);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-main);
}

pre.code {
  background: #f9fafb;
  color: var(--text-main);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  line-height: 1.5;
  margin: var(--space-3) 0 var(--space-4) 0;
  border: 1px solid var(--border-color);
  overflow-x: auto;
}

dl.Content strong {
  color: var(--primary);
  font-weight: 700;
}

dl.Content dl {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-4);
}

dl.Content dl dt {
  margin-top: var(--space-4);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-2);
}

dl.Content dl dt:first-child {
  margin-top: 0;
}

dl.Content dl dt a {
  background: none;
  padding: 0;
  font-size: var(--text-base);
  color: var(--text-main);
}

dl.Content dl dd {
  margin-bottom: var(--space-4);
  padding-left: 0;
  font-size: var(--text-sm);
}

.navbar {
  background: var(--bg-header) !important;
  border: none !important;
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.05) !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.navbar-default {
  background-color: var(--bg-header) !important;
}

.container-head,
.container-breadcrumbs {
  max-width: none;
  padding: 0 var(--container-padding);
}

.breadcrumb {
  display: none;
}

.panel {
  border-radius: var(--radius);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.form-control {
  border-radius: var(--radius-sm);
  border-color: var(--border-color);
  min-height: var(--input-height);
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.alert {
  border-radius: var(--radius-sm);
}

.alert-info {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

@media (min-width: 0) {
  :root {
    --container-padding: 0.3rem;
  }

  .home {
    padding-left: var(--container-padding) !important;
    padding-right: var(--container-padding) !important;
    overflow-x: hidden;
  }

  .main-content,
.container,
#content,
.results-header-container,
.results-body,
.record-content,
.advanced-search-content,
.browse-content,
.history-content {
    padding: calc(var(--space-5) / 2) var(--container-padding);
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
  }

  .account-dashboard-shell {
    flex-direction: column;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
    width: 100%;
  }

  .account-dashboard-sidebar {
    order: 1;
    position: static;
    width: 100%;
    z-index: 10;
  }

  .account-dashboard-main {
    order: 2;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .account-dashboard-sidebar .account-nav-card {
    gap: 0;
  }

  .account-dashboard-sidebar .account-nav-card__header {
    gap: var(--space-2);
  }

  .account-dashboard-sidebar .account-nav-card__eyebrow {
    font-size: var(--text-sm);
  }

  .account-dashboard-sidebar .account-nav-card h2 {
    font-size: var(--text-lg);
  }

  .account-dashboard-sidebar .account-nav-group {
    display: none;
  }

  .account-mobile-nav-select {
    display: block;
    margin-bottom: var(--space-3);
    z-index: 20100;
  }

  .account-mobile-nav-actions {
    display: flex;
  }

  .account-request-actions {
    align-items: stretch;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .account-request-actions__history,
.account-request-actions__history form,
.account-request-actions__group {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .account-request-actions__primary,
.account-request-actions__secondary {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .account-dashboard-page .account-fines-table-wrapper {
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
  }

  .account-dashboard-page .fines_toolbar {
    max-width: 100% !important;
    width: 100% !important;
  }

  .account-dashboard-page .account-fines-table-wrapper {
    overflow-x: visible !important;
  }

  .account-dashboard-page .account-fines-table-wrapper .account-fines-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .account-dashboard-page .account-fines-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .account-dashboard-page .account-fines-table .record-description-table-title {
    display: block;
  }

  .account-dashboard-page .account-fines-table .record-description-table-title th {
    display: block;
    width: 100%;
    border: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    border-radius: var(--radius-sm);
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    padding-left: var(--space-3) !important;
    padding-right: var(--space-3) !important;
  }

  .account-dashboard-page .account-fines-table .account-fines-column-row {
    display: none;
  }

  .account-dashboard-page .account-fines-table .account-fine-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2) var(--space-3);
    padding: var(--space-3);
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    background: transparent;
  }

  .account-dashboard-page .account-fines-table .account-fine-item>td {
    display: block;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .account-dashboard-page .account-fines-table .account-fine-title {
    grid-column: 1;
    min-width: 0;
    color: var(--text-main);
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1.35;
  }

  .account-dashboard-page .account-fines-table .account-fine-title a {
    color: var(--primary);
    font-weight: 700;
  }

  .account-dashboard-page .account-fines-table .account-fine-date {
    grid-column: 2;
    justify-self: end;
    color: #64748b;
    font-size: var(--text-xs);
    font-weight: 700;
    white-space: nowrap;
  }

  .account-dashboard-page .account-fines-table .account-fine-paid-date {
    grid-column: 1 / -1;
    color: #64748b;
    font-size: var(--text-xs);
    line-height: 1.35;
  }

  .account-dashboard-page .account-fines-table .account-fine-paid-date:empty {
    display: none;
  }

  .account-dashboard-page .account-fines-table .account-fine-description {
    grid-column: 1;
    color: #4b5563;
    font-size: var(--text-sm);
    line-height: 1.45;
  }

  .account-dashboard-page .account-fines-table .account-fine-description:empty::before {
    content: "\00a0";
  }

  .account-dashboard-page .account-fines-table .account-fine-amount {
    grid-column: 2;
    justify-self: end;
    align-self: start;
    padding: 0.25rem 0.5rem !important;
    border-radius: var(--radius-sm);
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    font-size: var(--text-xs);
    font-weight: 800;
    white-space: nowrap;
  }

  .account-dashboard-page .account-fines-table .account-fines-total-row,
.account-dashboard-page .account-fines-table .account-fines-payment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-3);
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    background: transparent;
  }

  .account-dashboard-page .account-fines-table .account-fines-total-row>td,
.account-dashboard-page .account-fines-table .account-fines-payment-row>td {
    display: block;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .account-dashboard-page .account-fines-table .account-fines-total-row>td:first-child,
.account-dashboard-page .account-fines-table .account-fines-payment-row>td:first-child {
    grid-column: 1;
  }

  .account-dashboard-page .account-fines-table .account-fines-total-row>td:last-child,
.account-dashboard-page .account-fines-table .account-fines-payment-row>td:last-child {
    grid-column: 2;
    justify-self: end;
  }

  .account-request-actions__primary,
.account-request-actions__secondary {
    justify-content: center;
    min-height: var(--button-height);
    text-align: center;
  }

  .account-highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-section-grid,
.account-proxy-groups {
    grid-template-columns: 1fr;
  }

  .hero-section {
    margin: 0 var(--container-padding);
    padding: 0 var(--container-padding);
    width: auto;
    min-width: 0;
  }

  .results-body {
    gap: var(--space-4);
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
  }

  .container-head,
.container-breadcrumbs {
    padding: 0 var(--container-padding);
  }

  header,
.header,
#header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .header-left {
    display: contents;
  }

  .header-right {
    display: contents;
  }

  .logo {
    order: -2;
    flex-shrink: 0;
  }

  .page-title-link {
    order: -1;
    display: flex;
    flex-direction: column;
    font-size: var(--text-base);
    text-align: left;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    gap: var(--space-1);
    font-weight: 700;
    color: var(--text-main);
  }

  .page-title-link span {
    font-size: var(--text-sm);
    white-space: normal;
    word-wrap: break-word;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .modal {
    padding: 0 !important;
  }

  .modal.in,
.modal.show {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
  }

  .modal:before {
    display: none !important;
  }

  .modal-dialog {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 1050;
    position: relative !important;
  }

  .modal.in .modal-dialog,
.modal.show .modal-dialog {
    transform: translateY(0) !important;
  }

  .modal-content {
    border-radius: 20px 20px 0 0 !important;
    max-height: 75vh !important;
    height: auto !important;
    border: none !important;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.1) !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .modal-backdrop.in,
.modal-backdrop.show {
    opacity: 0.5 !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
  }

  .database-label {
    font-size: var(--text-base);
    width: 100%;
  }

  .header-actions {
    order: 0;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .search-area {
    order: 1;
    width: 100%;
    flex-basis: 100%;
  }

  .searchForm-main {
    width: 100%;
  }

  .search-container {
    background: #fff !important;
    padding: 4px 4px 4px 12px !important;
    border: 1px solid var(--primary) !important;
    border-radius: 8px;
    display: flex;
    gap: 0;
  }

  .search-container:focus-within {
    box-shadow: var(--focus-ring) !important;
  }

  .search-icon {
    display: flex;
    margin: 0 8px 0 0;
    padding: 0;
    color: #999;
  }

  .search-container .search-input,
.search-container input[type="text"] {
    padding: 8px 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0;
  }

  .search-container .search-input:focus,
.search-container input[type="text"]:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
  }

  .search-type-select {
    min-width: 8rem;
    max-width: 40%;
  }

  .search-type-select .searchForm_type {
    padding-left: 0.5rem;
    padding-right: 1.5rem;
    font-size: 0.85rem;
  }

  #headerSearchTypeDropdown {
    border-left: 0;
    margin: 0 8px 0 6px;
    padding-left: 10px;
    max-width: 33%;
    min-width: 0;
    flex-shrink: 1;
  }

  #headerSearchTypeDropdown::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: #ddd;
  }

  .search-inline-option {
    margin-right: 6px;
    padding-left: 6px;
  }

  .search-inline-toggle {
    padding: 0.45rem 0.65rem;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  #headerSearchTypeDropdown .dropdown-trigger {
    padding: 8px 8px 8px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    width: 100%;
    overflow: hidden;
  }

  #headerSearchTypeDropdown .trigger-content {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  #headerSearchTypeDropdown .dropdown-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    text-align: left;
  }

  .search-container .search-button,
.search-container button[type="submit"] {
    padding: 8px;
    border-radius: 6px;
    min-width: auto;
  }

  .searchForm .search-button {
    margin-left: var(--space-1);
  }

  .search-checkboxes {
    padding-top: var(--space-2);
  }

  .header-notices {
    flex-direction: column;
    align-items: stretch;
    padding: 0 var(--space-5) var(--space-4);
  }

  .header-shortcut {
    width: 100%;
    justify-content: center;
  }

  .result-item {
    flex-direction: column;
    align-items: stretch;
  }

  .result-item-body {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    min-width: 0;
    width: 100%;
  }

  .result-selection {
    flex-direction: row;
    justify-content: flex-start;
    width: 100%;
  }

  .result-document-type-text--selection {
    display: inline-flex;
    margin-left: auto;
    text-align: right;
  }

  .result-document-type-text--content {
    display: none;
  }

  .result-image-box {
    width: 5.25rem;
    height: 7rem;
    flex: 0 0 5.25rem;
    margin-bottom: 0.875rem;
  }

  .result-content {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0;
  }

  .back-btn .btn-text {
    display: none;
  }

  .back-btn {
    width: var(--button-height);
    height: var(--button-height);
    padding: 0 !important;
    justify-content: center;
    flex-shrink: 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    min-height: unset;
    gap: var(--space-6);
    padding: var(--space-8) var(--space-3) var(--space-10);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-4);
  }

  .browse-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }

  .browse-row .custom-dropdown {
    min-width: 100%;
  }

  .browse-input {
    max-width: 100% !important;
  }

  .match-selector {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .match-selector .custom-dropdown {
    width: 100%;
    min-width: 0;
  }

  .group-header-label {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .group-header-label .custom-dropdown {
    width: 100%;
    min-width: 0;
  }

  .search-row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .search-row .custom-dropdown {
    width: 100%;
    min-width: 0;
  }

  .add-search-row {
    grid-template-columns: 1fr;
  }

  .hero-stats-card {
    flex-direction: column !important;
    align-items: center !important;
    padding: 24px 20px !important;
    gap: 12px !important;
    border-radius: 20px;
  }

  .stat-item {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  .stat-number {
    font-size: 1.25rem !important;
    text-align: center !important;
  }

  .stat-text {
    text-align: center !important;
  }

  .stats-label {
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 8px !important;
  }

  .stat-divider {
    display: none !important;
  }

  #citationDropdown .citation-dropdown-card {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    min-width: 100vw;
    max-width: 100vw;
    height: auto;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    border: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    /* Slide-up animation */
    transform: translateY(100%);
    opacity: 1;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    z-index: 10000;
  }

  #citationDropdown.open .citation-dropdown-card {
    transform: translateY(0);
    visibility: visible;
  }

  #citationDropdown.open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
  }
}

@media (min-width: 0) {
  .record .table>tbody>tr>th,
.record .table>tbody>tr>td {
    border-bottom: none !important;
    border-top: none !important;
  }

  .account-highlight-grid {
    grid-template-columns: 1fr;
  }

  .account-data-list__row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .account-overview-actions,
.account-section-card__actions,
.account-inline-actions {
    width: 100%;
  }

  .account-inline-actions--email-empty {
    margin-left: 0 !important;
    width: auto;
  }

  .account-overview-actions .btn,
.account-section-card__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .account-link-list a {
    align-items: flex-start;
  }

  #account-export-data .account-link-list a {
    align-items: center;
  }

  .results-meta-card {
    padding: 16px;
  }

  .results-body {
    flex-direction: column;
    gap: 0;
  }

  .results-list {
    order: 2;
    width: 100%;
  }

  .sidebar-wrapper {
    position: static;
    max-height: none;
    overflow-y: visible;
    order: 1;
    width: 100%;
    display: none;
    padding-bottom: 20px;
  }

  .sidebar-wrapper.mobile-visible {
    display: flex;
    justify-content: center;
    align-items: stretch;
  }

  .sidebar-wrapper .sidebar {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
  }

  .sidebar-wrapper .facet-group,
.sidebar-wrapper .sidebar>div {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 600px !important;
    border-radius: 0;
  }

  .sidebar-wrapper .facet-sidebar {
    height: auto;
    max-height: none;
    overflow: visible;
    width: 100%;
  }

  .meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .meta-left {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .results-count {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 0.9rem;
  }

  .results-count>.arrow-btn:first-child,
.results-count>span.arrow-btn:first-child {
    order: 1;
  }

  .results-count>.arrow-btn:last-child,
.results-count>span.arrow-btn:last-child {
    order: 2;
    margin-left: 8px;
  }

  .results-count-text {
    order: 3;
    flex-grow: 1;
    text-align: left;
    margin-left: 12px;
  }

  .meta-controls {
    width: 100%;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .control-group {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .control-group select {
    max-width: 60%;
    text-overflow: ellipsis;
  }

  .meta-right {
    width: 100%;
    margin-left: 0;
    flex-direction: row;
    align-items: center;
  }

  .meta-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-facet-btn {
    display: block;
    margin-left: auto;
  }

  .desktop-only {
    display: none !important;
  }

  .select-all-checkbox {
    display: none !important;
  }
}

@media (min-width: 0) {
  .top-nav {
    flex-wrap: wrap;
    gap: var(--space-3);
  }

  .top-nav .top-nav-spacer {
    display: none;
  }

  .top-nav .center-controls {
    flex: 1 1 auto;
  }

  .top-nav .top-actions {
    width: 100%;
    justify-content: flex-start;
    order: 3;
    flex-wrap: wrap;
  }
}

.record-counter-mobile {
  display: none;
}

@media (min-width: 0) {
  .center-controls {
    display: none !important;
  }

  .top-nav .top-actions {
    order: 0;
  }

  .record-counter-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: var(--space-2) var(--space-4);
    margin-bottom: var(--space-6);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    width: 100%;
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-top: calc(var(--space-6) * -0.5);
    gap: var(--space-3);
  }

  .record-counter-mobile strong {
    color: var(--primary);
    font-weight: 600;
    margin-right: var(--space-1);
  }

  .record-counter-mobile .arrow-btn {
    background: transparent;
    border: none;
    box-shadow: none;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
  }

  .record-counter-mobile .arrow-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
  }

  .template-dir-record .top-nav {
    align-items: center !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: var(--space-2);
    justify-content: flex-start;
  }

  .template-dir-record .top-nav .top-nav-spacer {
    display: none;
  }

  .template-dir-record .record-title-navigation {
    align-items: center !important;
    display: flex !important;
    flex: 0 0 auto;
    height: var(--button-height);
    margin-bottom: 0 !important;
    min-width: 0;
    order: 0;
    white-space: nowrap;
    width: auto;
  }

  .template-dir-record .record-title-navigation .arrow-btn,
.template-dir-record .top-actions .dropdown-trigger,
.template-dir-record .top-actions .action-btn,
.template-dir-record .top-actions .back-btn {
    height: var(--button-height);
    min-height: var(--button-height);
    max-height: var(--button-height);
  }

  .template-dir-record .record-title-navigation .record-counter {
    display: inline-flex;
    margin-left: var(--space-2);
    white-space: nowrap;
  }

  .template-dir-record .top-actions {
    align-items: center !important;
    display: flex !important;
    flex: 0 1 auto;
    flex-wrap: nowrap !important;
    gap: var(--space-2);
    justify-content: flex-start;
    margin-left: auto !important;
    min-width: 0;
    order: 0;
    width: auto;
  }

  .template-dir-record .top-actions .dropdown-trigger,
.template-dir-record .top-actions .action-btn,
.template-dir-record .top-actions .back-btn {
    justify-content: center;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: var(--button-height);
    min-width: var(--button-height);
    max-width: var(--button-height);
  }

  .template-dir-record .top-actions .results-options-text,
.template-dir-record .top-actions .record-home-btn__text,
.template-dir-record .top-actions .back-btn .btn-text {
    display: none !important;
  }

  .template-dir-record .record-counter-mobile {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .top-nav h1 {
    font-size: clamp(calc(var(--text-2xl) * 0.6667), 2vw, calc(var(--text-3xl) * 0.6667));
  }
}

@media (min-width: 768px) {
  .template-dir-record .record-main-title {
    font-size: 1.782rem;
  }

  .template-dir-record .record-title-navigation {
    position: static;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-2);
    flex: 0 0 auto;
    margin-bottom: 0;
    width: auto;
  }

  .template-dir-record .top-nav {
    justify-content: flex-start;
    gap: var(--space-3);
  }

  .template-dir-record .top-nav .top-nav-spacer {
    display: none;
  }

  .template-dir-record .top-nav .top-actions {
    margin-left: auto;
  }

  .template-dir-record .record-title-navigation .arrow-btn {
    width: var(--button-height);
    height: var(--button-height);
    min-width: var(--button-height);
    min-height: var(--button-height);
    max-width: var(--button-height);
    max-height: var(--button-height);
  }

  .template-dir-record .record-title-navigation .record-counter {
    display: inline-flex;
    align-items: center;
    height: var(--button-height);
    margin-left: var(--space-2);
  }

  .template-dir-record .top-actions .dropdown-trigger,
.template-dir-record .top-actions .action-btn,
.template-dir-record .top-actions .back-btn {
    color: var(--text-muted);
    height: var(--button-height);
    min-height: var(--button-height);
    max-height: var(--button-height);
  }

  .template-dir-record .top-actions .dropdown-trigger svg,
.template-dir-record .top-actions .action-btn svg,
.template-dir-record .top-actions .back-btn svg {
    color: inherit;
    stroke: currentColor;
  }

  .template-dir-record .top-actions .results-options-text {
    color: inherit;
  }

  .template-dir-record .top-actions .dropdown-trigger:hover,
.template-dir-record .top-actions .action-btn:hover,
.template-dir-record .top-actions .back-btn:hover {
    color: var(--primary);
  }

  .template-dir-record .top-actions .action-btn {
    width: var(--button-height);
    min-width: var(--button-height);
    max-width: var(--button-height);
  }

  .template-dir-record .top-actions .record-home-btn,
.template-dir-record .top-actions .back-btn {
    width: auto;
    max-width: none;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .record-detail-header {
    flex-direction: row;
  }

  .record-detail-thumbnail-image {
    width: 8.5rem;
  }

  .record .table>tbody>tr>th,
.record .table>tbody>tr>td {
    border-bottom: inherit !important;
    border-top: inherit !important;
  }

  .account-highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-data-list__row {
    grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
    gap: var(--space-3);
  }

  .account-overview-actions,
.account-section-card__actions,
.account-inline-actions {
    width: auto;
  }

  .account-email-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(var(--space-1) / 2);
  }

  .account-inline-actions--email {
    margin-left: 0;
  }

  .account-overview-actions .btn,
.account-section-card__actions .btn {
    width: auto;
  }

  .account-link-list a {
    align-items: center;
  }

  .results-meta-card {
    padding: 0;
  }

  .results-body {
    flex-direction: row;
  }

  .results-list {
    order: 0;
    width: 100%;
  }

  .sidebar-wrapper {
    position: sticky;
    top: calc(var(--header-height, 7.875rem) + 0.5rem);
    max-height: none;
    overflow-y: visible;
    order: 0;
    width: 20rem;
    display: block;
    padding-bottom: 0;
    flex: 0 0 20rem;
  }

  .sidebar-wrapper.mobile-visible {
    display: block;
  }

  .sidebar-wrapper .sidebar {
    width: 20rem;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .sidebar-wrapper .facet-group,
.sidebar-wrapper .sidebar>div {
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: var(--radius);
  }

  .meta-row {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .meta-left {
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }

  .results-count {
    width: auto;
    font-size: 1.05rem;
  }

  .results-count>.arrow-btn:first-child,
.results-count>span.arrow-btn:first-child,
.results-count>.arrow-btn:last-child,
.results-count>span.arrow-btn:last-child,
.results-count-text {
    order: 0;
  }

  .results-count>.arrow-btn:last-child,
.results-count>span.arrow-btn:last-child,
.results-count-text {
    margin-left: 0;
  }

  .results-count-text {
    flex-grow: 0;
    text-align: inherit;
  }

  .meta-controls {
    width: auto;
    flex-direction: row;
    gap: 24px;
    align-items: center;
  }

  .control-group {
    width: auto;
    justify-content: flex-start;
  }

  .control-group select {
    max-width: none;
  }

  .meta-right {
    width: auto;
    margin-left: auto;
    flex-direction: row;
    align-items: center;
  }

  .meta-actions {
    width: auto;
    justify-content: flex-start;
  }

  .mobile-facet-btn {
    display: none;
  }

  .desktop-only {
    display: revert !important;
  }

  .select-all-checkbox {
    display: flex !important;
  }

  .top-nav {
    flex-wrap: nowrap;
    gap: 0;
    justify-content: space-between;
  }

  .top-nav .top-nav-spacer {
    display: block;
    flex: 0 0 25%;
  }

  .top-nav .center-controls {
    flex: 0 1 auto;
    justify-content: flex-start;
  }

  .top-nav .top-actions {
    width: auto;
    justify-content: flex-end;
    margin-left: auto;
    order: 0;
    flex-wrap: nowrap;
  }

  .center-controls {
    display: flex !important;
  }

  .record-counter-mobile {
    display: none !important;
  }
}

@media (min-width: 1200px) {
  .template-dir-record .record-main-title {
    font-size: 1.56rem;
  }
}

@media (min-width: 1017px) {
  :root {
    --container-padding: var(--space-30);
  }

  .footer-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    height: auto;
    min-height: var(--footer-height);
    gap: var(--space-10);
    padding: var(--space-6) 0 var(--space-8) !important;
    width: min(calc(100% - (var(--space-5) * 2)), 1450px);
    max-width: 1450px;
    margin: 0 auto;
  }

  .footer-logo-section {
    order: 1;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    align-self: center;
    justify-content: flex-start;
    align-items: center;
    margin-top: 0;
  }

  .footer-logo {
    width: 100%;
    max-width: 220px;
  }

  .footer-grid {
    grid-template-columns: repeat(3, max-content);
    justify-content: end;
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
    order: 2;
  }

  .footer-powered {
    order: 3;
  }

  .home {
    padding-left: initial !important;
    padding-right: initial !important;
    overflow-x: visible;
  }

  .main-content {
    padding: var(--space-5) 0;
    max-width: none;
  }

  #content {
    width: min(calc(100% - (var(--space-5) * 2)), 1450px);
    max-width: 1450px;
    margin: 0 auto;
    padding: var(--space-5) 0;
  }

  .container {
    padding: var(--space-5) 0;
    max-width: none;
  }

  .results-header-container {
    padding: var(--space-5) 0 0;
  }

  .results-body {
    gap: var(--space-8);
    padding: 0;
  }

  .record-content,
.advanced-search-content,
.browse-content,
.history-content {
    padding: var(--space-5) 0;
    max-width: none;
  }

  .container-head,
.container-breadcrumbs {
    padding: 0;
  }

  .account-dashboard-shell {
    flex-direction: row;
  }

  .account-dashboard-sidebar {
    position: static;
    width: min(21rem, 100%);
  }

  .account-dashboard-sidebar .account-nav-card {
    gap: var(--space-4);
  }

  .account-dashboard-sidebar .account-nav-group {
    display: flex;
  }

  .account-mobile-nav-select {
    display: none;
  }

  .account-highlight-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .account-section-grid,
.account-proxy-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-section {
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
  }

  .modal {
    text-align: center;
    padding: 0 !important;
    overflow-y: hidden !important;
  }

  .modal.in,
.modal.show {
    display: block !important;
  }

  .modal:before {
    display: inline-block !important;
  }

  .modal-dialog {
    display: inline-block !important;
    margin: 0 auto !important;
    width: 90% !important;
    min-width: 0 !important;
    max-width: 800px !important;
    transform: none !important;
    vertical-align: middle;
  }

  .modal-content {
    border-radius: 12px !important;
    max-height: 90vh !important;
    height: auto !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .header-left,
.header-right {
    display: flex;
  }

  header,
.header,
#header {
    padding: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    min-height: var(--header-height);
  }

  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 20%) minmax(0, 55%) minmax(0, 25%);
    padding: 0;
    width: min(calc(100% - (var(--space-5) * 2)), 1450px);
    max-width: 1450px;
    margin: 0 auto;
    height: auto;
    min-height: var(--header-height);
    align-items: center;
    gap: var(--space-5);
  }

  .header-left {
    display: contents;
  }

  .header-right {
    display: contents;
  }

  .logo {
    order: 0;
    flex: 0 0 auto;
    max-width: none;
  }

  .logo-icon {
    width: auto;
    height: 4rem;
    max-width: none;
  }

  .page-title-link {
    order: 0;
    grid-column: 1;
    justify-self: start;
    flex-direction: column;
    align-items: initial;
    flex: 0 1 auto;
    margin-bottom: 0;
    min-width: 0;
    max-width: 100%;
  }

  .header-actions {
    order: 0;
    grid-column: 3;
    justify-self: stretch;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
    width: 100%;
    min-width: 0;
  }

  .header-actions--two-row {
    transform: translateY(calc((1.5rem + var(--space-2)) / 2));
  }

  .header-actions .lang-toggle-form,
.header-actions #langDropdown {
    order: 1;
    align-self: center;
  }

  .header-actions>.account-action {
    order: 2;
    align-self: center;
  }

  .search-area {
    order: 0;
    grid-column: 2;
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }

  .searchForm-main {
    width: 100%;
    gap: var(--space-3);
  }

  .search-container {
    padding: 6px 6px 6px 18px !important;
    min-width: 0;
    max-width: none;
  }

  .search-container .search-input,
.search-container input[type="text"] {
    padding: 0 !important;
  }

  .search-container .search-button,
.search-container button[type="submit"] {
    padding: 10px 22px !important;
  }

  .search-type-select {
    min-width: 12rem;
    max-width: 16rem;
  }

  .search-type-select .searchForm_type {
    padding-left: 0.75rem;
    padding-right: 1.75rem;
    font-size: 0.9rem;
  }

  #headerSearchTypeDropdown {
    margin-right: 8px;
    padding-left: 0;
    margin-left: 0;
    max-width: 50%;
  }

  #headerSearchTypeDropdown .dropdown-trigger {
    padding: 8px 12px;
  }

  #headerSearchTypeDropdown .trigger-content {
    gap: 8px;
  }

  .search-inline-option {
    margin-right: 8px;
    padding-left: 8px;
  }

  .search-inline-toggle {
    padding: 0.45rem 0.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .search-checkboxes {
    padding: 0 var(--space-1);
  }

  .searchForm .search-button {
    margin-left: var(--space-2);
  }

  .header-notices {
    flex-direction: row;
    align-items: center;
    padding: 0 var(--container-padding) var(--space-3);
  }

  .header-shortcut {
    width: auto;
    justify-content: flex-start;
  }

  .result-item {
    flex-direction: row;
    align-items: stretch;
  }

  .result-item-body {
    display: contents;
  }

  .result-selection {
    justify-content: flex-start;
    width: auto;
  }

  .result-document-type-text--selection {
    display: none;
  }

  .result-document-type-text--content {
    display: block;
  }

  .result-image-box {
    width: 5.75rem;
    height: 7.5rem;
    flex-basis: 5.75rem;
    margin-bottom: 0.875rem;
  }

  .back-btn .btn-text {
    display: inline;
  }

  .back-btn {
    width: auto;
    height: var(--button-height);
    max-height: var(--button-height);
    min-height: var(--button-height);
    padding: 0 var(--space-4) !important;
  }

  .footer-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    height: auto;
    min-height: var(--footer-height);
    gap: var(--space-16);
    padding: var(--space-6) 0 var(--space-8) !important;
    width: min(calc(100% - (var(--space-5) * 2)), 1450px);
    max-width: 1450px;
    margin: 0 auto;
  }

  .footer-grid {
    grid-template-columns: repeat(3, max-content);
    justify-content: end;
    gap: var(--space-10);
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
    order: 2;
  }

  .footer-links {
    flex-direction: row;
    gap: var(--space-6);
  }

  .browse-row,
.match-selector,
.group-header-label {
    flex-direction: row;
    align-items: center;
  }

  .browse-row .custom-dropdown {
    min-width: 15rem;
  }

  .browse-input {
    max-width: 100%;
  }

  .match-selector .custom-dropdown,
.group-header-label .custom-dropdown,
.search-row .custom-dropdown {
    width: auto;
    min-width: revert;
  }

  .search-row {
    grid-template-columns: 15rem 30rem;
  }

  .add-search-row {
    grid-template-columns: 15rem 1fr;
  }

  .hero-stats-card {
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px 24px !important;
    gap: 20px !important;
    border-radius: 100px;
  }

  .stat-item {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  .stat-number {
    font-size: 1.1rem !important;
  }

  .stat-text {
    text-align: left !important;
  }

  .stats-label {
    width: auto !important;
    margin-bottom: 0 !important;
  }

  .stat-divider {
    display: block !important;
  }

  #citationDropdown .citation-dropdown-card {
    position: absolute;
    top: calc(100% + 0.5rem);
    bottom: auto;
    left: auto;
    right: 0;
    width: auto;
    min-width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: scale(0.95);
  }

  #citationDropdown.open .citation-dropdown-card {
    transform: scale(1);
  }

  #citationDropdown.open::before {
    content: none;
    display: none;
  }
}

@media (min-width: 1017px) and (max-width: 1439px) {
  .template-dir-search.template-name-results .results-meta-card {
    gap: 0;
  }

  .template-dir-search.template-name-results .results-body {
    gap: var(--space-5);
  }

  .template-dir-search.template-name-results .sidebar-wrapper,
.template-dir-search.template-name-results .sidebar,
.template-dir-search.template-name-results .side-facets-container {
    flex-basis: 16rem;
    width: 16rem;
  }

  .template-dir-search.template-name-results .facet-sidebar {
    width: 16rem;
  }

  .template-dir-search.template-name-results .meta-row,
.template-dir-search.template-name-results .meta-left,
.template-dir-search.template-name-results .meta-controls,
.template-dir-search.template-name-results .meta-right,
.template-dir-search.template-name-results .meta-actions,
.template-dir-search.template-name-results .facet-toggle {
    flex-wrap: nowrap;
  }

  .template-dir-search.template-name-results .meta-row {
    gap: 0.85rem;
  }

  .template-dir-search.template-name-results .meta-left {
    gap: 1.0625rem;
    min-width: 0;
  }

  .template-dir-search.template-name-results .results-count {
    width: auto;
    flex: 0 0 auto;
  }

  .template-dir-search.template-name-results .meta-controls {
    gap: 1.0625rem;
  }

  .template-dir-search.template-name-results .control-group {
    gap: 0.6375rem;
  }

  .template-dir-search.template-name-results .meta-right {
    flex: 0 0 auto;
    gap: 0.6375rem;
  }

  .template-dir-search.template-name-results .meta-actions {
    gap: 0.425rem;
  }

  .template-dir-search.template-name-results .facet-toggle {
    gap: 0.6375rem;
    margin-left: 0.425rem;
  }

  .template-dir-search.template-name-results .results-count,
.template-dir-search.template-name-results .control-group label,
.template-dir-search.template-name-results .meta-row .dropdown-trigger,
.template-dir-search.template-name-results .facet-label-text {
    font-size: 0.85rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .template-dir-search.template-name-results .results-total-count,
.template-dir-search.template-name-results .meta-row .dropdown-text {
    white-space: nowrap;
  }

  .template-dir-search.template-name-results .results-count .arrow-btn,
.template-dir-search.template-name-results .meta-actions>.action-btn {
    width: 2.125rem;
    height: 2.125rem;
    min-width: 2.125rem;
    border-radius: 0.425rem !important;
  }

  .template-dir-search.template-name-results .results-count .arrow-btn svg,
.template-dir-search.template-name-results .meta-actions>.action-btn svg,
.template-dir-search.template-name-results .meta-actions>.action-btn .icon {
    width: 1.0625rem;
    height: 1.0625rem;
    font-size: 1.0625rem;
  }

  .template-dir-search.template-name-results .meta-row .dropdown-trigger {
    min-height: 2.125rem;
    padding: 0.425rem 0.6375rem;
    border-radius: 0.425rem;
  }

  .template-dir-search.template-name-results .meta-row .custom-dropdown.min-dropdown {
    min-width: 4.25rem !important;
  }

  .template-dir-search.template-name-results .sort-group .custom-dropdown.min-dropdown {
    min-width: 8.925rem !important;
  }

  .template-dir-search.template-name-results #selectAllCheckbox {
    width: 0.95625rem !important;
    height: 0.95625rem !important;
    margin-right: 0.425rem !important;
  }

  .template-dir-search.template-name-results .switch-container {
    transform: scale(0.85);
    transform-origin: left center;
  }

  .template-dir-search.template-name-results .result-row {
    font-size: 0.825rem !important;
  }

  .template-dir-search.template-name-results .result-info-grid {
    gap: calc(var(--space-2) / 2);
  }

  .template-dir-search.template-name-results .result-title-link {
    font-size: 0.9rem;
  }

  .template-dir-search.template-name-results .sidebar-wrapper {
    transition: top 0.22s linear;
  }

  .template-dir-search.template-name-results .facet-sidebar {
    transition: max-height 0.22s linear;
  }
}

@media (min-width: 1440px) {
  header,
.header,
#header {
    padding: 0;
  }

  .header-actions .btn-ghost.help-link {
    width: auto;
    height: auto;
    padding: 0.5em 1em;
    background: transparent;
    border: 1px solid var(--border-color);
  }

  .header-actions .btn-ghost.help-link .btn-text {
    display: inline;
  }
}

.search-area {
  padding-left: max(0px, calc((100vw - 1820px) / 2));
}

@media print {
  html,
body {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    overflow-x: visible !important;
  }

  .page-layout,
#app,
body>.main,
.main,
[role="main"],
.main-content,
.container,
#content {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    flex: none !important;
  }

  header,
footer,
.hidden-print,
.results-header-container,
.results-meta-card,
.right-side-controls,
.facet-toggle,
.results-count,
.control-group,
.arrow-btn,
.action-btn,
.alert,
#search-cart-form,
.pagination,
.pagination-container,
.bulk-action-buttons {
    display: none !important;
  }

  .results-body>*:not(.results-list) {
    display: none !important;
  }

  .main-content,
.container,
#content {
    padding: 0 !important;
    margin: 0 !important;
  }

  .result-item,
.card {
    break-inside: avoid;
    box-shadow: none !important;
    border: none !important;
  }

  .results-layout,
.results-main,
.results-body,
.results-list {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    max-width: none !important;
  }

  @page {
    margin: 12mm;
  }

  .template-dir-search.template-name-results {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt !important;
    line-height: 1.25 !important;
  }

  .template-dir-search.template-name-results .main-results {
    border: 0 !important;
  }

  .template-dir-search.template-name-results .results-list {
    box-sizing: border-box !important;
    padding: 0 0.45cm !important;
  }

  .template-dir-search.template-name-results .result-item {
    display: grid !important;
    grid-template-columns: 1.6rem 5.8rem minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
    min-height: 2.75cm;
    padding: 0.28cm 0 0.32cm !important;
    margin: 0 !important;
    border-top: 1px solid #000 !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .template-dir-search.template-name-results .result-item:first-child {
    border-top: 0 !important;
  }

  .template-dir-search.template-name-results .result-selection.hidden-print,
.template-dir-search.template-name-results .result-selection {
    display: block !important;
    grid-column: 1;
    min-width: 0 !important;
    padding: 0 !important;
    visibility: visible !important;
  }

  .template-dir-search.template-name-results .record-checkbox,
.template-dir-search.template-name-results .checkbox-select-item {
    display: none !important;
    visibility: hidden !important;
  }

  .template-dir-search.template-name-results .result-number {
    display: block !important;
    color: #000 !important;
    font-size: 11pt !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    visibility: visible !important;
  }

  .template-dir-search.template-name-results .result-item-body {
    display: contents !important;
  }

  .template-dir-search.template-name-results .result-image-box {
    grid-column: 2;
    display: block !important;
    width: 2.4cm !important;
    height: 3.2cm !important;
    margin: 0 !important;
    overflow: hidden !important;
    break-inside: avoid !important;
  }

  .template-dir-search.template-name-results .result-image-box:empty,
.template-dir-search.template-name-results .result-image-box[id^="obalka_cover_"]:not(:has(img)):not(:has(a)) {
    display: none !important;
  }

  .template-dir-search.template-name-results .result-image-box img,
.template-dir-search.template-name-results .result-image,
.template-dir-search.template-name-results .result-image-box .recordcover,
.template-dir-search.template-name-results .result-image-box .recordcover_obalky {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: top left !important;
    border-radius: 0 !important;
  }

  .template-dir-search.template-name-results .result-badge-stack,
.template-dir-search.template-name-results .result-format-badge,
.template-dir-search.template-name-results .result-actions,
.template-dir-search.template-name-results .icon-link,
.template-dir-search.template-name-results .hierarchyTreeLink,
.template-dir-search.template-name-results .result-document-type-text--selection,
.template-dir-search.template-name-results .result-image-box svg {
    display: none !important;
  }

  .template-dir-search.template-name-results .result-content {
    grid-column: 3;
    align-self: start !important;
    padding: 0 !important;
    min-width: 0 !important;
  }

  .template-dir-search.template-name-results .result-title-row {
    margin: 0 0 0.12cm !important;
  }

  .template-dir-search.template-name-results .result-title-link {
    color: #000 !important;
    font-size: 13pt !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
  }

  .template-dir-search.template-name-results .result-info-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.06cm !important;
  }

  .template-dir-search.template-name-results .result-document-type-text,
.template-dir-search.template-name-results .result-row,
.template-dir-search.template-name-results .status,
.template-dir-search.template-name-results .ajax-availability {
    color: #1f2937 !important;
    display: flex !important;
    font-size: 10pt !important;
    line-height: 1.22 !important;
    visibility: visible !important;
  }

  .template-dir-search.template-name-results .result-label {
    color: #4b5563 !important;
    font-weight: 400 !important;
  }

  .template-dir-search.template-name-results a,
.template-dir-search.template-name-results .result-author-link {
    color: var(--primary) !important;
    text-decoration: none !important;
  }

  .template-dir-search.template-name-results .result-author-link:hover,
  .template-dir-search.template-name-results .result-author-link:focus-visible {
    text-decoration: underline !important;
    text-decoration-color: currentColor !important;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
  }

  .template-dir-search.template-name-results .status .label,
.template-dir-search.template-name-results .ajax-availability .label,
.template-dir-search.template-name-results .label-success {
    background: transparent !important;
    border: 0 !important;
    color: #1FA971 !important;
    display: inline !important;
    font-size: 10pt !important;
    font-weight: 700 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .template-dir-record .record-content {
    padding: 0 !important;
    margin: 0.45cm !important;
    page-break-before: auto !important;
    break-before: auto !important;
    overflow: visible !important;
    height: auto !important;
  }

  .template-dir-record .record-options-menu,
.template-dir-record .back-btn,
.template-dir-record .record-counter-mobile,
.template-dir-record .record-title-navigation,
.template-dir-record .top-nav-spacer {
    display: none !important;
  }

  .template-dir-record .top-nav,
.template-dir-record .top-actions {
    display: block !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .template-dir-record .metadata-section-container {
    page-break-before: auto !important;
    break-before: auto !important;
    page-break-inside: avoid !important;
    break-inside: avoid-page !important;
  }

  .template-dir-record .record-holdings-block {
    page-break-before: always !important;
    break-before: page !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
    margin-top: 0 !important;
  }

  .template-dir-record .record-holdings-block + .similar-items-wrapper,
.template-dir-record .record-holdings-block + .record-description-block,
.template-dir-record .record-holdings-block + .record-summary-grid,
.template-dir-record .similar-items-wrapper + .record-description-block {
    page-break-before: auto !important;
    break-before: auto !important;
  }

  .template-dir-record .metadata-section-container + .similar-items-wrapper,
.template-dir-record .metadata-section-container + .record-description-block,
.template-dir-record .metadata-section-container + .record-summary-grid {
    page-break-before: always !important;
    break-before: page !important;
  }

  .template-dir-record .record-summary-grid {
    display: block !important;
    margin: 0 !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  .template-dir-record .similar-items-wrapper,
.template-dir-record .record-description-block {
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  .template-dir-record .record-content .row[resource="#record"] {
    display: block !important;
    margin-top: 0 !important;
    page-break-before: auto !important;
    break-before: auto !important;
    page-break-inside: auto;
  }

  .template-dir-record .record-content .row[resource="#record"]>[class*="col-"] {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
  }

  .template-dir-record .record-content .gallery-container {
    margin-top: 1rem !important;
    page-break-inside: avoid;
  }

  .template-dir-record .metadata-section-container,
.template-dir-record .main-metadata,
.template-dir-record .metadata-grid {
    margin-top: 0 !important;
    page-break-before: auto !important;
    break-before: auto !important;
  }

  .template-dir-record .marc21-data .accordion-trigger,
.template-dir-record .marc21-data .nav-tabs {
    display: none !important;
  }

  .template-dir-record .marc-content,
.template-dir-record .marc21-data .tab-content,
.template-dir-record .marc21-data .tab-pane {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .template-dir-record .marc21-data,
.template-dir-record .record,
.template-dir-record .card,
.template-dir-record .bibliographic-details {
    page-break-before: auto !important;
    break-before: auto !important;
  }

  .template-dir-record .marc21-data {
    page-break-before: always !important;
    break-before: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid-page !important;
    max-height: 257mm !important;
    overflow: hidden !important;
    margin-top: 0 !important;
  }

  .template-dir-record .marc-content {
    max-height: 250mm !important;
    overflow: hidden !important;
    font-size: 0.9rem !important;
    line-height: 1.25 !important;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.record-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5);
  margin: 1.5rem 0;
  align-items: stretch;
}

.record-summary-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.record-summary-grid .similar-items-wrapper,
.record-summary-grid .record-description-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
}

@media (min-width: 992px) {
  .record-summary-grid {
    grid-auto-rows: 1fr;
  }

  .record-summary-grid .similar-items-wrapper,
.record-summary-grid .record-description-block {
    align-self: stretch;
    height: 100%;
  }

  .record-summary-grid .similar-items-section,
.record-summary-grid .record-description-table-wrapper {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    margin-bottom: 0;
  }

  .record-summary-grid .similar-items-table,
.record-summary-grid .record-description-table {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: 100%;
  }

  .record-summary-grid .similar-items-table>tbody,
.record-summary-grid .record-description-table>tbody {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
  }

  .record-summary-grid .similar-items-table>tbody>tr,
.record-summary-grid .record-description-table>tbody>tr {
    display: flex;
    flex: 0 0 auto;
  }

  .record-summary-grid .similar-items-table>tbody>tr:last-child {
    flex: 1 1 auto;
  }

  .record-summary-grid .record-description-table>tbody>tr:last-child {
    flex: 0 0 auto;
  }

  .record-summary-grid .similar-items-table>tbody>tr>th,
.record-summary-grid .similar-items-table>tbody>tr>td,
.record-summary-grid .similar-items-table>tbody>tr:last-child>td,
.record-summary-grid .record-description-table>tbody>tr.record-description-table-title>th {
    width: 100%;
  }

  .record-summary-grid .record-description-table>tbody>tr:last-child>th,
.record-summary-grid .record-description-table>tbody>tr:last-child>td {
    vertical-align: top;
  }

  .record-summary-grid .record-description-table>tbody>tr:not(.record-description-table-title)>th {
    flex: 0 0 18rem;
  }

  .record-summary-grid .record-description-table>tbody>tr:not(.record-description-table-title)>td {
    flex: 1 1 auto;
    min-width: 0;
  }
}

.similar-items-wrapper {
  margin: 1.5rem 0;
}

.similar-items-section {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.similar-items-table {
  margin: 0;
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  color: var(--text-main);
}

.similar-items-table>tbody>tr>th,
.similar-items-table>tbody>tr>td,
.similar-items-table>tr>th,
.similar-items-table>tr>td {
  padding: var(--space-3) var(--space-4);
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border-color) !important;
  color: var(--text-main);
  font-size: var(--text-sm);
  vertical-align: top;
}

.similar-items-table>tbody>tr.similar-items-table-title>th,
.similar-items-table>tr.similar-items-table-title>th {
  background: #f9fafb !important;
  color: var(--text-main);
  font-size: var(--text-lg);
  font-weight: 700;
}

.similar-items-table>tbody>tr:last-child>td,
.similar-items-table>tr:last-child>td {
  border-bottom: 0 !important;
}

.similar-items-table>tbody>tr:hover>th,
.similar-items-table>tbody>tr:hover>td {
  background: #fff !important;
}

.similar-items-table>tbody>tr.similar-items-table-title:hover>th {
  background: #f9fafb !important;
}

.similar-item-title {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.similar-item-title:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.similar-item-author {
  color: #6b7280;
  font-size: 0.82rem;
  margin-left: var(--space-2);
}

.similar-item-date {
  color: #9ca3af;
  font-size: 0.8rem;
  margin-left: var(--space-2);
}

.record-detail-card {
  margin-top: var(--space-6);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.record-detail-card-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-color);
  background: #fff;
}

.record-detail-card-header h2 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-main);
}

.record-detail-card-body {
  padding: var(--space-5) var(--space-6);
}

.record-detail-card-body> :first-child {
  margin-top: 0;
}

.record-detail-card-body> :last-child {
  margin-bottom: 0;
}

.record-holdings-block {
  margin: 1.5rem 0;
}

.template-dir-record .noitems {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-main);
  margin: var(--space-4) 0;
  padding: var(--space-5) var(--space-6);
}

.template-dir-record .noitems strong {
  display: block;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.45;
}

.template-dir-record .noitems .alert {
  margin: 0;
}

.record-description-block {
  margin: 1.5rem 0;
}

@media (max-width: 991.98px) {
  .record-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.template-dir-record .record-holds-table-wrapper {
  margin-bottom: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  background: #fff;
}

.template-dir-record .record-holds-table-wrapper:last-child {
  margin-bottom: 0;
}

.template-dir-record .record-detail-card-body .table-holds,
.template-dir-record .record-holdings-block .table-holds {
  margin: 0;
  min-width: 920px;
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  color: var(--text-main);
}

.template-dir-record .record-detail-card-body .table-holds>tbody>tr:first-child>th,
.template-dir-record .record-detail-card-body .table-holds>tr:first-child>th,
.template-dir-record .record-holdings-block .table-holds>tbody>tr:first-child>th,
.template-dir-record .record-holdings-block .table-holds>tr:first-child>th {
  padding: var(--space-3) var(--space-4);
  background: #f9fafb !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--border-color) !important;
  color: #4b5563;
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
}

.template-dir-record .record-detail-card-body .table-holds>tbody>tr:not(:first-child)>td,
.template-dir-record .record-detail-card-body .table-holds>tr:not(:first-child)>td,
.template-dir-record .record-holdings-block .table-holds>tbody>tr:not(:first-child)>td,
.template-dir-record .record-holdings-block .table-holds>tr:not(:first-child)>td {
  padding: var(--space-4);
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border-color) !important;
  color: var(--text-main);
  font-size: var(--text-sm);
  vertical-align: top;
}

.template-dir-record .record-detail-card-body .table-holds>tbody>tr.even>td,
.template-dir-record .record-detail-card-body .table-holds>tbody>tr.odd>td,
.template-dir-record .record-detail-card-body .table-holds>tr.even>td,
.template-dir-record .record-detail-card-body .table-holds>tr.odd>td,
.template-dir-record .record-holdings-block .table-holds>tbody>tr.even>td,
.template-dir-record .record-holdings-block .table-holds>tbody>tr.odd>td,
.template-dir-record .record-holdings-block .table-holds>tr.even>td,
.template-dir-record .record-holdings-block .table-holds>tr.odd>td {
  background: #fff !important;
}

.template-dir-record .record-detail-card-body .table-holds .text-success,
.template-dir-record .record-holdings-block .table-holds .text-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 0;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: #e8f7f0;
  color: #1FA971;
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.template-dir-record .record-detail-card-body .table-holds .text-danger,
.template-dir-record .record-holdings-block .table-holds .text-danger,
.template-dir-record .record-detail-card-body .table-holds .text-requested-reserved,
.template-dir-record .record-holdings-block .table-holds .text-requested-reserved {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 0;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: #fbecec;
  color: #D94141;
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.template-dir-record .record-detail-card-body .table-holds .text-requested-reserved,
.template-dir-record .record-holdings-block .table-holds .text-requested-reserved {
  background: #fef3c7;
  color: #92400e;
}

.template-dir-record .record-detail-card-body .table-holds .holding-status-badges,
.template-dir-record .record-holdings-block .table-holds .holding-status-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.template-dir-record .record-detail-card-body .table-holds .holding-status-badges+.placehold,
.template-dir-record .record-holdings-block .table-holds .holding-status-badges+.placehold,
.template-dir-record .record-detail-card-body .table-holds .holding-status-badges+br+.placehold,
.template-dir-record .record-holdings-block .table-holds .holding-status-badges+br+.placehold,
.template-dir-record .record-detail-card-body .table-holds .holding-status-badges+br+div,
.template-dir-record .record-holdings-block .table-holds .holding-status-badges+br+div {
  margin-left: 0.5rem;
}

.template-dir-record .record-detail-card-body .table-holds .text-danger~.small,
.template-dir-record .record-holdings-block .table-holds .text-danger~.small {
  color: #D94141;
  font-weight: 700;
}

.template-dir-record .record-detail-card-body .table-holds .holdnotes>td,
.template-dir-record .record-holdings-block .table-holds .holdnotes>td {
  padding-top: 0 !important;
  border-top: 0 !important;
  background: #fff !important;
  border-bottom: 0 !important;
  color: #374151;
}

.template-dir-record .record-detail-card-body .table-holds>tbody>tr:has(+ .holdnotes)>td,
.template-dir-record .record-detail-card-body .table-holds>tr:has(+ .holdnotes)>td,
.template-dir-record .record-holdings-block .table-holds>tbody>tr:has(+ .holdnotes)>td,
.template-dir-record .record-holdings-block .table-holds>tr:has(+ .holdnotes)>td {
  border-bottom: 0 !important;
}

.template-dir-record .record-detail-card-body .table-holds .holdnotes strong,
.template-dir-record .record-holdings-block .table-holds .holdnotes strong {
  color: var(--text-main);
}

.template-dir-record .record-detail-card-body .table-holds a,
.template-dir-record .record-holdings-block .table-holds a {
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.2;
}

.template-dir-record .record-main-details>tbody>tr:hover,
.template-dir-record .record-detail-card-body .table>tbody>tr:hover,
.template-dir-record .record-detail-card-body .table>tbody>tr:hover>td,
.template-dir-record .record-detail-card-body .table>tbody>tr:hover>th {
  background: transparent !important;
}

.template-dir-record .record-detail-card-body .table-holds>tbody>tr:hover>td,
.template-dir-record .record-detail-card-body .table-holds>tbody>tr:hover>th,
.template-dir-record .record-holdings-block .table-holds>tbody>tr:hover>td,
.template-dir-record .record-holdings-block .table-holds>tbody>tr:hover>th {
  background: #fff !important;
}

.template-dir-record .record-detail-card-body .table-holds>tbody>tr:first-child:hover>th,
.template-dir-record .record-holdings-block .table-holds>tbody>tr:first-child:hover>th {
  background: #f9fafb !important;
}

.template-dir-record .record-description-table-wrapper,
.account-dashboard-page .record-description-table-wrapper {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  background: #fff;
  margin-bottom: var(--space-5);
  max-width: 100%;
}

.template-dir-record .record-description-table,
.account-dashboard-page .record-description-table {
  margin: 0;
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  color: var(--text-main);
}

.account-dashboard-page .account-fines-table {
  min-width: 48rem;
}

.template-dir-record .record-description-table>tbody>tr>th,
.template-dir-record .record-description-table>tbody>tr>td,
.template-dir-record .record-description-table>tr>th,
.template-dir-record .record-description-table>tr>td,
.account-dashboard-page .record-description-table>tbody>tr>th,
.account-dashboard-page .record-description-table>tbody>tr>td,
.account-dashboard-page .record-description-table>tr>th,
.account-dashboard-page .record-description-table>tr>td {
  padding: var(--space-3) var(--space-4);
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border-color) !important;
  color: var(--text-main);
  font-size: var(--text-sm);
  vertical-align: middle;
}

.template-dir-record .record-description-table>tbody>tr>th,
.template-dir-record .record-description-table>tr>th,
.account-dashboard-page .record-description-table>tbody>tr>th,
.account-dashboard-page .record-description-table>tr>th {
  width: 18rem;
  color: #4b5563;
  font-weight: 700;
}

.template-dir-record .record-description-table__value {
  max-inline-size: 75ch;
  overflow-wrap: break-word;
}

.template-dir-record .record-description-table>tbody>tr.record-description-table-title>th,
.template-dir-record .record-description-table>tr.record-description-table-title>th,
.account-dashboard-page .record-description-table>tbody>tr.record-description-table-title>th,
.account-dashboard-page .record-description-table>tr.record-description-table-title>th {
  width: auto;
  background: #f9fafb !important;
  color: var(--text-main);
  font-size: var(--text-lg);
}

@media (min-width: 992px) {
  .template-dir-record .record-summary-grid .record-description-table>tbody>tr.record-description-table-title,
.template-dir-record .record-summary-grid .record-description-table>tr.record-description-table-title {
    width: 100%;
  }

  .template-dir-record .record-summary-grid .record-description-table>tbody>tr.record-description-table-title>th,
.template-dir-record .record-summary-grid .record-description-table>tr.record-description-table-title>th {
    flex: 1 1 100%;
    width: 100%;
  }
}

.account-dashboard-page .account-fines-table>tbody>tr>th,
.account-dashboard-page .account-fines-table>tbody>tr>td,
.account-dashboard-page .account-fines-table>tr>th,
.account-dashboard-page .account-fines-table>tr>td {
  padding-left: var(--space-2);
  padding-right: var(--space-2);
}

.account-dashboard-page .account-fines-table>tbody>tr>th,
.account-dashboard-page .account-fines-table>tr>th {
  width: auto;
}

.account-dashboard-page .account-fines-table .account-fines-total-row>td:last-child {
  color: var(--primary) !important;
}

.template-dir-record .record-description-table>tbody>tr:last-child>th,
.template-dir-record .record-description-table>tbody>tr:last-child>td,
.template-dir-record .record-description-table>tr:last-child>th,
.template-dir-record .record-description-table>tr:last-child>td {
  border-bottom: 1px solid var(--border-color) !important;
}

.account-dashboard-page .record-description-table>tbody>tr:last-child>th,
.account-dashboard-page .record-description-table>tbody>tr:last-child>td,
.account-dashboard-page .record-description-table>tr:last-child>th,
.account-dashboard-page .record-description-table>tr:last-child>td {
  border-bottom: 0 !important;
}

.template-dir-record .record-description-table>tbody>tr:hover>th,
.template-dir-record .record-description-table>tbody>tr:hover>td,
.account-dashboard-page .record-description-table>tbody>tr:hover>th,
.account-dashboard-page .record-description-table>tbody>tr:hover>td {
  background: #fff !important;
}

.template-dir-record .record-description-table>tbody>tr.record-description-table-title:hover>th,
.account-dashboard-page .record-description-table>tbody>tr.record-description-table-title:hover>th {
  background: #f9fafb !important;
}

@media (max-width: 767.98px) {
  .template-dir-record .record-description-table-wrapper {
    overflow-x: visible;
  }

  .template-dir-record .record-description-table,
.template-dir-record .record-description-table>tbody,
.template-dir-record .record-description-table>tbody>tr,
.template-dir-record .record-description-table>tr,
.template-dir-record .record-description-table>tbody>tr>th,
.template-dir-record .record-description-table>tbody>tr>td,
.template-dir-record .record-description-table>tr>th,
.template-dir-record .record-description-table>tr>td {
    display: block;
    width: 100%;
  }

  .template-dir-record .record-description-table {
    border-collapse: separate;
  }

  .template-dir-record .record-description-table>tbody>tr,
.template-dir-record .record-description-table>tr {
    border-bottom: 1px solid var(--border-color);
  }

  .template-dir-record .record-description-table>tbody>tr:last-child,
.template-dir-record .record-description-table>tr:last-child {
    border-bottom: 0;
  }

  .template-dir-record .record-description-table>tbody>tr>th,
.template-dir-record .record-description-table>tr>th {
    padding: var(--space-3) var(--space-4) var(--space-1);
    border-bottom: 0 !important;
    color: #6b7280;
    font-size: var(--text-xs);
  }

  .template-dir-record .record-description-table>tbody>tr>td,
.template-dir-record .record-description-table>tr>td {
    padding: 0 var(--space-4) var(--space-3);
    border-bottom: 0 !important;
  }

  .template-dir-record .record-description-table__value {
    max-inline-size: 100%;
  }

  .template-dir-record .record-description-table>tbody>tr.record-description-table-title,
.template-dir-record .record-description-table>tr.record-description-table-title {
    border-bottom: 1px solid var(--border-color);
  }

  .template-dir-record .record-description-table>tbody>tr.record-description-table-title>th,
.template-dir-record .record-description-table>tr.record-description-table-title>th {
    padding: var(--space-3) var(--space-4);
    color: var(--text-main);
    font-size: var(--text-base);
  }
}

.result-info-grid {
  gap: calc(var(--space-2) / 2);
}

.result-row {
  line-height: 1.25;
}

@media (min-width: 1017px) and (max-width: 1439px) {
  .top-nav h1 {
    font-size: clamp(calc(var(--text-2xl) * 0.9), 2.7vw, calc(var(--text-3xl) * 0.9));
  }

  .header-inner,
#content,
.footer-inner {
    width: min(calc(100% - (var(--space-5) * 2)), 1020px);
    max-width: 1020px;
  }

  .header-inner {
    display: grid;
    grid-template-columns: minmax(8rem, 16%) minmax(0, 1fr) max-content;
    grid-template-rows: auto;
    gap: var(--space-3);
  }

  .page-title-link {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .header-actions {
    grid-column: 3;
    grid-row: 1;
    justify-self: stretch;
    align-self: center;
    width: 100%;
  }

  .search-area {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
  }

  .header-actions {
    gap: calc(var(--space-2) * 0.75);
  }

  .searchForm-main {
    gap: var(--space-2);
  }
}

@media (min-width: 1017px) {
  :root {
    --icon-height: 34px;
    --icon-image-height: 17px;
    --button-height: 34px;
    --input-height: 34px;
    --select-height: 34px;
    --item-height: var(--button-height);
    --header-mobile-icon-size: var(--icon-height);
  }

  .results-options-text {
    display: inline;
  }

  .record-home-btn__text {
    display: inline;
  }

  .template-dir-search.template-name-results .sidebar-wrapper .facet-sidebar {
    height: fit-content;
    max-height: calc(100vh - var(--header-height, 7.875rem) - 2rem);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .header-actions>.account-action {
    order: 2;
    align-self: center;
  }
}

@media (max-width: 1016px) {
  .template-dir-search.template-name-results .control-group>label,
.template-dir-search.template-name-results .sort-group .dropdown-text,
.template-dir-search.template-name-results .results-options-text,
.template-dir-search.template-name-results .limit-group .dropdown-text {
    display: none !important;
  }

  .template-dir-search.template-name-results .meta-controls .dropdown-trigger,
.template-dir-search.template-name-results .meta-actions .dropdown-trigger {
    width: var(--button-height) !important;
    min-width: var(--button-height) !important;
    max-width: var(--button-height) !important;
    height: var(--button-height) !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  .template-dir-search.template-name-results .meta-controls .dropdown-trigger .trigger-content {
    gap: 0 !important;
  }

  .template-dir-search.template-name-results .sort-group .chevron,
.template-dir-search.template-name-results .limit-group .chevron,
.template-dir-search.template-name-results .meta-controls .chevron,
.template-dir-search.template-name-results .meta-actions .chevron {
    display: none !important;
  }

  .template-dir-search.template-name-results .sort-group .dropdown-mobile-icon,
.template-dir-search.template-name-results .limit-group .dropdown-mobile-icon,
.template-dir-search.template-name-results .limit-group .limit-mobile-icon-text {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .template-dir-search.template-name-results .limit-group .limit-mobile-icon-text {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
  }

  :root {
    --icon-height: 34px;
    --icon-image-height: 17px;
    --button-height: 34px;
    --input-height: 34px;
    --select-height: 34px;
    --item-height: var(--button-height);
    --header-mobile-icon-size: var(--icon-height);
  }

  html,
body {
    height: auto;
    min-height: 100%;
  }

  .page-layout {
    min-height: 100dvh;
  }

  @supports not (min-height: 100dvh) {
    .page-layout {
      min-height: 100svh;
    }
  }

  #header {
    --icon-height: 34px;
    --icon-image-height: 17px;
    --button-height: 34px;
    --input-height: 34px;
    --select-height: 34px;
    --item-height: var(--button-height);
    --header-mobile-icon-size: var(--icon-height);
    gap: calc(var(--space-4) / 2);
    padding-top: calc(var(--space-3) / 2);
    padding-bottom: calc(var(--space-3) / 2);
  }

  .header-actions {
    display: grid;
    grid-template-columns: var(--item-height) var(--item-height) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-2);
    width: 100%;
  }

  .header-actions .lang-toggle-form,
.header-actions #langDropdown {
    grid-column: 1;
    justify-self: start;
  }

  #header .header-actions .lang-trigger,
#header .header-actions>.account-action,
#header .header-actions .account-action {
    box-sizing: border-box !important;
    flex-basis: var(--item-height) !important;
    height: var(--item-height) !important;
    max-height: var(--item-height) !important;
    max-width: var(--item-height) !important;
    min-height: var(--item-height) !important;
    min-width: var(--item-height) !important;
    padding: 0 !important;
    width: var(--item-height) !important;
  }

  #header .header-actions .action-btn__icon,
#header .header-actions .action-btn svg,
#header .header-actions .lang-trigger svg,
#header .header-actions .account-action__avatar {
    height: var(--header-mobile-icon-size) !important;
    width: var(--header-mobile-icon-size) !important;
  }

  #header .header-actions .account-action__avatar {
    border-radius: 8px !important;
    font-size: 14px !important;
    height: 100% !important;
    min-height: 100% !important;
    min-width: 100% !important;
    width: 100% !important;
  }

  .header-actions>.account-action {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .compact-trigger,
.dropdown-trigger,
.info-btn,
.lang-trigger,
.status-indicator,
.action-btn,
.search-button,
.adv-search-btn,
.back-btn {
    min-height: var(--button-height);
  }

  .compact-trigger,
.dropdown-trigger {
    height: var(--select-height);
    padding-top: 0;
    padding-bottom: 0;
  }

  .search-container {
    min-height: var(--select-height);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .search-container .search-input,
.search-container input[type="text"] {
    min-height: var(--input-height);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .search-container .search-button,
.search-container button[type="submit"],
.searchForm .search-button,
.searchForm button[type="submit"] {
    height: var(--button-height);
    min-height: var(--button-height);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-radius: 6px;
    font-size: 0.85rem;
  }

  #headerSearchTypeDropdown {
    margin-right: 4px;
    max-width: 28%;
  }

  #headerSearchTypeDropdown .dropdown-trigger {
    gap: 4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  #headerSearchTypeDropdown .chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1em;
    width: 1em;
    margin: 0;
    font-size: 1.667rem;
    font-weight: 400;
    line-height: 1;
    opacity: 0.5;
    transform-origin: center;
  }

  #headerSearchTypeDropdown.open .chevron {
    transform: rotate(180deg);
  }

  .search-icon {
    margin-right: 5px;
  }

  .results-header-container {
    padding-top: calc(var(--space-5) / 8) !important;
    padding-bottom: 0 !important;
  }

  .results-body {
    margin-top: calc(var(--space-6) / 4) !important;
    padding-top: 0 !important;
  }

  .results-meta-card {
    padding-top: 4px;
    padding-bottom: 4px;
  }
}

@media (max-width: 767px) {
  .history-page .action-btn,
.template-name-history .action-btn,
.template-dir-search.template-name-history .action-btn {
    border-width: 1px;
    height: var(--item-height) !important;
    min-height: var(--item-height) !important;
    min-width: var(--item-height) !important;
    width: var(--item-height) !important;
  }

  .history-page .history-top-actions .back-btn,
.template-name-history .history-top-actions .back-btn,
.template-dir-search.template-name-history .history-top-actions .back-btn {
    height: var(--item-height) !important;
    max-height: var(--item-height) !important;
    max-width: var(--item-height) !important;
    min-height: var(--item-height) !important;
    min-width: var(--item-height) !important;
    padding: 0 !important;
    width: var(--item-height) !important;
  }

  .history-page .history-top-actions .back-btn .btn-text,
.template-name-history .history-top-actions .back-btn .btn-text,
.template-dir-search.template-name-history .history-top-actions .back-btn .btn-text {
    display: none !important;
  }

  .history-page .history-top-actions .history-purge-btn,
.template-name-history .history-top-actions .history-purge-btn,
.template-dir-search.template-name-history .history-top-actions .history-purge-btn {
    height: var(--item-height) !important;
    min-height: var(--item-height) !important;
    min-width: var(--item-height) !important;
    padding: 0 !important;
    width: var(--item-height) !important;
  }

  .history-page .action-btn .fa,
.template-name-history .action-btn .fa,
.template-dir-search.template-name-history .action-btn .fa {
    font-size: var(--icon-height) !important;
  }

  .history-page .history-top-actions .back-btn svg,
.template-name-history .history-top-actions .back-btn svg,
.template-dir-search.template-name-history .history-top-actions .back-btn svg,
.history-page .action-link svg,
.template-name-history .action-link svg,
.template-dir-search.template-name-history .action-link svg {
    height: var(--icon-image-height) !important;
    min-height: var(--icon-image-height) !important;
    min-width: var(--icon-image-height) !important;
    width: var(--icon-image-height) !important;
  }

  .result-item--cover-opposite-mobile .result-item-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.25rem;
    align-items: flex-start;
    column-gap: var(--space-3);
  }

  .result-item--cover-opposite-mobile .result-content {
    grid-column: 1;
    grid-row: 1;
  }

  .result-item--cover-opposite-mobile .result-image-box {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .account-list-result.result-item--cover-opposite-mobile .result-item-body {
    grid-template-columns: minmax(0, 1fr) 5.25rem;
    grid-template-areas:
    "content cover"
    "meta meta";
  }

  .account-list-result.result-item--cover-opposite-mobile .result-content {
    grid-area: content;
  }

  .account-list-result.result-item--cover-opposite-mobile .result-image-box {
    grid-area: cover;
  }

  .header-right {
    flex: 0 0 100%;
    width: 100%;
  }

  .header-actions {
    grid-template-columns: var(--item-height) var(--item-height) minmax(12rem, 1fr);
    justify-content: stretch;
    width: 100%;
  }

  .template-dir-search.template-name-results .results-meta-card {
    padding: 10px 0 6px;
  }

  .template-dir-search.template-name-results .meta-row {
    align-items: center;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 4px;
    justify-content: flex-start;
    overflow: visible;
  }

  .template-dir-search.template-name-results .meta-left,
.template-dir-search.template-name-results .meta-right,
.template-dir-search.template-name-results .meta-controls,
.template-dir-search.template-name-results .meta-actions {
    align-items: center;
    display: flex !important;
    flex: 0 0 auto;
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 2px;
    justify-content: flex-start;
    margin: 0 !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .meta-left,
.template-dir-search.template-name-results .meta-right {
    display: contents !important;
  }

  .template-dir-search.template-name-results .results-count {
    align-items: center;
    display: contents;
    flex: 0 0 auto;
    gap: 4px;
    justify-content: flex-start;
    order: 1;
    width: auto;
  }

  .template-dir-search.template-name-results #selectAllCheckbox {
    flex: 0 0 auto;
    height: 16px !important;
    margin: 0 6px 0 0 !important;
    order: 1;
    width: 16px !important;
  }

  .template-dir-search.template-name-results .results-count>.arrow-btn {
    flex: 0 0 32px;
    height: 32px;
    margin: 0 !important;
    min-width: 32px;
    order: 2;
    width: 32px;
  }

  .template-dir-search.template-name-results .results-count-text {
    display: inline;
    flex: 0 0 100%;
    font-size: 0.9rem;
    line-height: 1.25;
    margin-left: 0;
    min-width: 0;
    order: 4;
    white-space: normal;
    width: 100%;
  }

  .template-dir-search.template-name-results .meta-controls {
    order: 2;
    margin-left: auto !important;
  }

  .template-dir-search.template-name-results .meta-actions {
    order: 3;
  }

  .template-dir-search.template-name-results .sort-group {
    order: 1;
  }

  .template-dir-search.template-name-results .limit-group {
    order: 2;
  }

  .template-dir-search.template-name-results .results-options-menu {
    order: 1;
  }

  .template-dir-search.template-name-results .meta-actions>.action-btn {
    order: 2;
  }

  .template-dir-search.template-name-results .mobile-facet-btn {
    margin-left: 0;
    order: 3;
  }

  .template-dir-search.template-name-results .control-group {
    display: inline-flex;
    flex: 0 0 auto;
    margin: 0 !important;
    width: auto;
  }

  .template-dir-search.template-name-results .results-options-menu .dropdown-menu,
.template-dir-search.template-name-results .sort-group .dropdown-menu,
.template-dir-search.template-name-results .limit-group .dropdown-menu {
    min-width: 12rem;
    width: max-content;
  }

  .template-dir-search.template-name-results .results-options-menu .dropdown-menu {
    min-width: 18rem;
    width: 18rem;
    max-width: min(22rem, calc(100vw - 2rem));
  }

  .template-dir-search.template-name-results .result-title-link {
    font-size: calc(var(--text-lg) * 0.9);
  }
}

@media (min-width: 768px) and (max-width: 1016px) {
  #header {
    align-items: center;
    padding-left: 0;
    padding-right: 0;
  }

  .header-inner,
#content,
.footer-inner {
    width: min(calc(100% - (var(--space-5) * 2)), 1020px);
    max-width: 1020px;
    margin-left: auto;
    margin-right: auto;
  }

  .page-title-link {
    order: -1;
    flex: 1 1 12rem;
    max-width: none;
  }

  .search-area {
    order: 1;
    flex: 0 0 100%;
    width: 100%;
  }

  .header-actions {
    order: -1;
    flex: 0 1 auto;
    width: auto;
    margin-left: auto;
    grid-template-columns: var(--item-height) var(--item-height) minmax(0, 300px);
    justify-content: end;
  }

  .header-actions>.account-action {
    grid-column: 2;
    grid-row: 1;
  }

  .search-btn-text {
    display: inline;
  }

  .search-btn-icon {
    display: none;
  }

  .search-button {
    width: auto;
    max-width: none;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
  }

  .back-btn .btn-text {
    display: inline;
  }

  .back-btn {
    width: auto;
    padding-left: var(--space-4) !important;
    padding-right: var(--space-4) !important;
  }

  .results-options-text {
    display: inline;
  }

  .footer-inner {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: var(--space-8);
    padding: var(--space-6) 0 var(--space-8) !important;
  }

  .footer-logo-section {
    order: 1;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    align-self: center;
    justify-content: flex-start;
    align-items: center;
    margin-top: 0;
  }

  .footer-logo {
    width: 100%;
    max-width: 220px;
  }

  .footer-grid {
    order: 2;
    grid-template-columns: repeat(3, max-content);
    gap: var(--space-8);
    justify-content: end;
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .footer-links {
    flex-direction: row;
  }

  .template-dir-search.template-name-results .results-body {
    gap: 30px;
  }

  .template-dir-search.template-name-results .sidebar-wrapper,
.template-dir-search.template-name-results .sidebar,
.template-dir-search.template-name-results .side-facets-container {
    flex-basis: 18rem;
    width: 18rem;
  }

  .template-dir-search.template-name-results .facet-sidebar {
    width: 18rem;
  }

  .template-dir-search.template-name-advanced .field-group-container.group,
.template-dir-search.template-name-advanced .search-row {
    background: #fff;
    border-radius: var(--radius);
  }

  .template-dir-alphabrowse.template-name-home .browse-card {
    padding: var(--space-6);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }

  .template-dir-search.template-name-results .arrow-btn,
.template-dir-search.template-name-results .meta-actions>.action-btn,
.template-dir-search.template-name-results .mobile-facet-badge {
    height: var(--button-height);
    min-height: var(--button-height);
    max-height: var(--button-height);
    width: var(--button-height);
    min-width: var(--button-height);
    max-width: var(--button-height);
    padding-top: 0;
    padding-bottom: 0;
  }

  .template-dir-search.template-name-results .meta-controls {
    margin-left: auto;
  }

  .template-dir-search.template-name-results .facet-sidebar {
    transition: max-height 0.22s linear;
  }
}

.result-title-link,
.template-dir-record .record-main-title {
  display: inline-block;
  max-width: 45ch;
}

.result-title-link {
  max-width: 45ch;
}

.template-dir-record .record-main-summary {
  width: 75ch;
  max-width: 100%;
}

.template-dir-record .record-main-details {
  margin-top: 0 !important;
  background: transparent;
  border-collapse: collapse;
  font-size: 0.9em;
}

.template-dir-record .record-main-details>tbody>tr {
  border-bottom: 1px solid var(--border-color);
}

.template-dir-record .record-main-details>tbody>tr:last-child {
  border-bottom: 0;
}

.template-dir-record .record-main-details>tbody>tr>th,
.template-dir-record .record-main-details>tbody>tr>td {
  background: transparent !important;
  border: 0 !important;
  padding: var(--space-2) 0;
  vertical-align: top;
}

.template-dir-record .record-main-details>tbody>tr:nth-of-type(odd)>th,
.template-dir-record .record-main-details>tbody>tr:nth-of-type(odd)>td,
.template-dir-record .record-main-details>tbody>tr:hover>th,
.template-dir-record .record-main-details>tbody>tr:hover>td {
  background: transparent !important;
}

.template-dir-record .record-main-details>tbody>tr>th {
  width: 18ch;
  padding-right: var(--space-5);
  color: var(--text-muted);
  font-weight: 500;
}

.template-dir-record .record-language-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  margin: 0 0.375rem 0.375rem 0;
  padding: 0.1875rem 0.625rem;
  border: 1px solid #9ca3af;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.875em;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.sfx-badge,
a.sfx-badge,
.custom-links a.sfx-badge,
.openUrlControls a.sfx-badge {
  --result-inline-badge-height: calc(1rem + 0.5rem + 2px);
  align-self: center;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: var(--result-inline-badge-height);
  min-height: var(--result-inline-badge-height);
  width: fit-content;
  padding: 0.25rem 0.5rem 0.25rem 0.35rem;
  border: 1px solid #76231D;
  border-radius: var(--radius-sm);
  background: #fff;
  color: #76231D;
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.sfx-badge:hover,
.sfx-badge:focus {
  background: #fff7f6;
  color: #76231D;
  text-decoration: none;
}

.sfx-badge__logo {
  display: block;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  object-fit: cover;
}

.sfx-badge__text {
  color: inherit;
}

.result-badge-stack {
  align-items: center !important;
  line-height: 0;
}

.result-badge-stack .result-format-badge,
.result-badge-stack .sfx-badge,
.result-badge-stack a.sfx-badge {
  align-items: center !important;
  align-self: center !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  height: var(--result-inline-badge-height) !important;
  justify-content: center !important;
  margin: 0 !important;
  max-height: var(--result-inline-badge-height) !important;
  min-height: var(--result-inline-badge-height) !important;
  position: static !important;
  top: auto !important;
  transform: none !important;
}

.result-badge-stack .result-format-badge .label,
.result-badge-stack .sfx-badge,
.result-badge-stack a.sfx-badge {
  align-items: center !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  height: var(--result-inline-badge-height) !important;
  justify-content: center !important;
  line-height: 1 !important;
  margin: 0 !important;
  max-height: var(--result-inline-badge-height) !important;
  min-height: var(--result-inline-badge-height) !important;
  position: static !important;
  top: auto !important;
  transform: none !important;
  vertical-align: middle !important;
}

.result-badge-stack .result-format-badge .label {
  background-image: none !important;
}

.result-badge-stack .sfx-badge__logo,
.result-badge-stack .sfx-badge__text {
  align-self: center !important;
  line-height: 1 !important;
}

@media (max-width: 1016px) {
  .template-dir-record .record-main-title {
    font-size: 1.333rem;
    line-height: 1.25;
  }

  .template-dir-record .record-main-details {
    font-size: 0.9em;
    line-height: 1.4;
  }
}

.adv-search-btn svg {
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  min-height: 16px;
  max-height: 16px;
}

@media (max-width: 1016px) {
  #header {
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
    row-gap: var(--space-2);
  }

  .adv-search-btn {
    width: var(--item-height);
    height: var(--item-height);
    min-width: var(--item-height);
    max-width: var(--item-height);
    min-height: var(--item-height);
    max-height: var(--item-height);
  }

  .header-inner {
    row-gap: var(--space-2);
  }
}

@media (min-width: 1017px) {
  :root {
    --header-height: 5.625rem;
  }
}

@media (max-width: 767px) {
  .template-dir-search.template-name-results .meta-controls .custom-dropdown,
.template-dir-search.template-name-results .meta-actions .custom-dropdown {
    --custom-dropdown-row-height: 32px;
  }

  .header-actions {
    grid-template-columns: var(--item-height) var(--item-height) minmax(8rem, 1fr);
  }

  .template-dir-search.template-name-results #header .header-actions {
    grid-template-columns: var(--item-height) var(--item-height) minmax(8rem, 1fr);
  }

  .top-nav .back-btn,
.history-top-actions .back-btn {
    height: var(--item-height) !important;
    max-height: var(--item-height) !important;
    max-width: var(--item-height) !important;
    min-height: var(--item-height) !important;
    min-width: var(--item-height) !important;
    padding: 0 !important;
    width: var(--item-height) !important;
  }

  .top-nav .back-btn .btn-text,
.history-top-actions .back-btn .btn-text {
    display: none !important;
  }

  .top-nav .back-btn svg,
.history-top-actions .back-btn svg {
    height: var(--icon-image-height) !important;
    min-height: var(--icon-image-height) !important;
    min-width: var(--icon-image-height) !important;
    width: var(--icon-image-height) !important;
  }
}

@media (min-width: 768px) and (max-width: 1016px) {
  .template-dir-record .top-nav {
    align-items: center !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: var(--space-2);
  }

  .template-dir-record .record-title-navigation {
    align-items: center !important;
    display: flex !important;
    flex: 0 0 auto;
    height: var(--button-height);
    margin-bottom: 0 !important;
    min-width: 0;
    white-space: nowrap;
  }

  .template-dir-record .record-title-navigation .record-counter {
    white-space: nowrap;
  }

  .template-dir-record .top-actions {
    align-items: center !important;
    display: flex !important;
    flex: 0 1 auto;
    flex-wrap: nowrap !important;
    gap: var(--space-2);
    margin-left: auto !important;
    min-width: 0;
  }

  .template-dir-record .top-actions .dropdown-trigger,
.template-dir-record .top-actions .record-home-btn,
.template-dir-record .top-actions .back-btn {
    height: var(--button-height);
    min-height: var(--button-height);
    padding-left: var(--space-3) !important;
    padding-right: var(--space-3) !important;
    white-space: nowrap;
  }

  .template-dir-search.template-name-results .meta-controls .custom-dropdown,
.template-dir-search.template-name-results .meta-actions .custom-dropdown {
    --custom-dropdown-row-height: var(--select-height);
  }

  .search-inline-option,
#headerSearchTypeDropdown {
    border-left: none;
    position: relative;
  }

  .search-inline-option::before,
#headerSearchTypeDropdown::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 22px;
    background: #ddd;
    transform: translateY(-50%);
  }

  .search-container > .search-inline-option::before {
    display: none;
  }

  .footer-logo-section {
    order: 1;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    align-self: center;
    justify-content: flex-start;
    margin-top: 0;
  }

  .footer-grid {
    order: 2;
    grid-template-columns: repeat(3, max-content);
    justify-content: end;
    column-gap: var(--space-8);
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .template-dir-search.template-name-results #header .header-actions {
    grid-template-columns: var(--item-height) var(--item-height) minmax(12rem, 1fr);
    width: min(100%, 28rem);
  }

  .template-dir-search.template-name-results .sidebar-wrapper {
    position: sticky;
    top: calc(var(--header-height, 7.875rem) + 0.5rem);
    align-self: flex-start;
    max-height: calc(100vh - var(--header-height, 7.875rem) - 2rem);
    overflow: visible;
  }

  .template-dir-search.template-name-results .sidebar-wrapper .facet-sidebar {
    height: fit-content;
    max-height: calc(100vh - var(--header-height, 7.875rem) - 2rem);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .template-dir-search.template-name-results .results-options-menu .dropdown-menu,
.template-dir-search.template-name-results .sort-group .dropdown-menu,
.template-dir-search.template-name-results .limit-group .dropdown-menu {
    min-width: 12rem;
    width: max-content;
  }

  .template-dir-search.template-name-results .results-options-menu .dropdown-menu {
    min-width: 18rem;
    width: 18rem;
    max-width: min(22rem, calc(100vw - 2rem));
  }

  .record-home-btn__text {
    display: inline;
  }

  .template-dir-record .record-title-navigation {
    position: static;
    justify-content: flex-start;
    margin-bottom: var(--space-3);
  }

  .template-dir-record .metadata-section-container {
    margin-top: var(--space-4);
  }
}

@media (min-width: 1017px) {
  .template-dir-search.template-name-results .meta-controls .custom-dropdown,
.template-dir-search.template-name-results .meta-actions .custom-dropdown {
    --custom-dropdown-row-height: var(--select-height);
  }

  .template-dir-search.template-name-results .results-count {
    gap: 6px;
  }

  .template-dir-search.template-name-results .results-count-text {
    order: 4;
    margin-left: var(--space-2);
    margin-right: 0;
  }

  .template-dir-search.template-name-results #selectAllCheckbox {
    order: 1;
    margin-left: 0 !important;
    margin-right: var(--space-2) !important;
  }

  .template-dir-search.template-name-results .results-count>.arrow-btn,
.template-dir-search.template-name-results .results-count>span.arrow-btn,
.template-dir-search.template-name-results .meta-controls .dropdown-trigger,
.template-dir-search.template-name-results .meta-actions .dropdown-trigger,
.template-dir-search.template-name-results .meta-actions>.action-btn,
.template-dir-search.template-name-results .mobile-facet-badge {
    height: var(--button-height);
    min-height: var(--button-height);
    max-height: var(--button-height);
  }

  .template-dir-search.template-name-results .results-count>.arrow-btn,
.template-dir-search.template-name-results .results-count>span.arrow-btn,
.template-dir-search.template-name-results .meta-actions>.action-btn,
.template-dir-search.template-name-results .mobile-facet-badge {
    width: var(--button-height);
    min-width: var(--button-height);
    max-width: var(--button-height);
    padding-top: 0;
    padding-bottom: 0;
  }

  .template-dir-search.template-name-results .results-count>.arrow-btn:nth-child(2),
.template-dir-search.template-name-results .results-count>span.arrow-btn:nth-child(2) {
    order: 2;
  }

  .template-dir-search.template-name-results .results-count>.arrow-btn:nth-child(3),
.template-dir-search.template-name-results .results-count>span.arrow-btn:nth-child(3) {
    order: 3;
  }
}

.template-dir-record .top-nav {
  align-items: center !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: var(--space-2);
  justify-content: flex-start;
}

.template-dir-record .top-nav .top-nav-spacer {
  display: none !important;
}

.template-dir-record .record-title-navigation {
  align-items: center !important;
  display: flex !important;
  flex: 0 0 auto;
  height: var(--button-height);
  margin-bottom: 0 !important;
  min-width: 0;
  position: static !important;
  white-space: nowrap;
  width: auto;
}

.template-dir-record .record-title-navigation .arrow-btn,
.template-dir-record .top-actions .dropdown-trigger,
.template-dir-record .top-actions .action-btn,
.template-dir-record .top-actions .back-btn {
  height: var(--button-height);
  min-height: var(--button-height);
  max-height: var(--button-height);
}

.template-dir-record .record-title-navigation .arrow-btn {
  width: var(--button-height);
  min-width: var(--button-height);
  max-width: var(--button-height);
}

.template-dir-record .record-title-navigation .record-counter {
  display: inline-flex;
  margin-left: var(--space-2);
  white-space: nowrap;
}

.template-dir-record .top-actions {
  align-items: center !important;
  display: flex !important;
  flex: 0 1 auto;
  flex-wrap: nowrap !important;
  gap: var(--space-2);
  justify-content: flex-start;
  margin-left: auto !important;
  min-width: 0;
  width: auto;
}

.template-dir-record .top-actions .dropdown-trigger,
.template-dir-record .top-actions .action-btn,
.template-dir-record .top-actions .back-btn {
  justify-content: center;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: var(--button-height);
  min-width: var(--button-height);
  max-width: var(--button-height);
}

.template-dir-record .top-actions .results-options-text,
.template-dir-record .top-actions .record-home-btn__text,
.template-dir-record .top-actions .back-btn .btn-text {
  display: none !important;
}

.template-dir-record .record-counter-mobile {
  display: none !important;
}

@media (min-width: 768px) {
  .template-dir-record .top-actions .dropdown-trigger,
.template-dir-record .top-actions .record-home-btn,
.template-dir-record .top-actions .back-btn {
    width: auto;
    min-width: var(--button-height);
    max-width: none;
    padding-left: var(--space-3) !important;
    padding-right: var(--space-3) !important;
    white-space: nowrap;
  }

  .template-dir-record .top-actions .results-options-text,
.template-dir-record .top-actions .record-home-btn__text,
.template-dir-record .top-actions .back-btn .btn-text {
    display: inline !important;
  }
}

@media (max-width: 767px) {
  .template-dir-record .record [resource="#record"] {
    display: flex;
    flex-direction: column;
  }

  .template-dir-record .record-main-col {
    display: contents;
  }

  .template-dir-record .record-main-col>* {
    order: 3;
  }

  .template-dir-record .record-main-title {
    order: 1;
    margin-left: var(--space-4);
    margin-right: var(--space-4);
    margin-bottom: calc(var(--space-4) / 2);
  }

  .template-dir-record .record-media-col {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    justify-content: flex-start;
    margin-bottom: calc(var(--space-4) / 2);
    order: 2;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .template-dir-record .record-media-col::-webkit-scrollbar {
    display: none;
  }

  .template-dir-record .record-media-col .obalka_cover,
.template-dir-record .record-media-col .obalka_toc {
    flex: 0 0 auto;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    max-width: none;
    text-align: left;
  }

  .template-dir-record .record-media-col .obalka_cover>a {
    display: block;
  }

  .template-dir-record .record-media-col img,
.template-dir-record .record-media-col .toc-pdf {
    height: 180px;
    width: auto;
    object-fit: contain;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .template-dir-record .record-main-details {
    margin-left: var(--space-4);
    margin-right: var(--space-4);
    width: calc(100% - (var(--space-4) * 2));
  }

  .template-dir-record .record-main-details,
.template-dir-record .record-main-details>tbody,
.template-dir-record .record-main-details>tbody>tr,
.template-dir-record .record-main-details>tbody>tr>th,
.template-dir-record .record-main-details>tbody>tr>td {
    display: block;
  }

  .template-dir-record .record-main-details>tbody>tr {
    padding: 0 !important;
  }

  .template-dir-record .record-main-details>tbody>tr>th,
.template-dir-record .record-main-details>tbody>tr>td {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100%;
  }

  .template-dir-record .record-main-details>tbody>tr>th {
    padding-bottom: var(--space-1) !important;
    color: var(--text-muted);
    font-size: inherit !important;
  }

  .template-dir-record .record-main-details>tbody>tr>td {
    padding-top: 0 !important;
    font-size: inherit !important;
  }
}

.template-dir-search.template-name-results .meta-row {
  --results-meta-control-size: var(--button-height);
  --results-meta-icon-size: var(--icon-image-height);
}

.template-dir-search.template-name-results .results-count>.arrow-btn,
.template-dir-search.template-name-results .results-count>span.arrow-btn,
.template-dir-search.template-name-results .meta-controls .dropdown-trigger,
.template-dir-search.template-name-results .meta-actions .dropdown-trigger,
.template-dir-search.template-name-results .meta-actions>.action-btn,
.template-dir-search.template-name-results .mobile-facet-badge {
  box-sizing: border-box !important;
  height: var(--results-meta-control-size) !important;
  max-height: var(--results-meta-control-size) !important;
  min-height: var(--results-meta-control-size) !important;
}

.template-dir-search.template-name-results .results-count>.arrow-btn,
.template-dir-search.template-name-results .results-count>span.arrow-btn,
.template-dir-search.template-name-results .meta-actions>.action-btn,
.template-dir-search.template-name-results .mobile-facet-badge {
  width: var(--results-meta-control-size) !important;
  max-width: var(--results-meta-control-size) !important;
  min-width: var(--results-meta-control-size) !important;
  padding: 0 !important;
}

.template-dir-search.template-name-results .meta-controls .custom-dropdown,
.template-dir-search.template-name-results .meta-actions .custom-dropdown {
  --custom-dropdown-row-height: var(--select-height);
}

.template-dir-search.template-name-results .meta-controls .custom-dropdown.min-dropdown {
  min-width: max-content !important;
  width: auto !important;
  max-width: none !important;
}

.template-dir-search.template-name-results .meta-controls .dropdown-trigger {
  justify-content: space-between !important;
  min-width: var(--results-meta-control-size) !important;
  padding: 0 var(--space-3) !important;
  width: auto !important;
}

.template-dir-search.template-name-results .results-options-trigger {
  justify-content: center !important;
}

.template-dir-search.template-name-results .results-count .arrow-btn svg,
.template-dir-search.template-name-results .meta-controls .dropdown-trigger svg,
.template-dir-search.template-name-results .meta-actions .dropdown-trigger svg,
.template-dir-search.template-name-results .meta-actions>.action-btn svg,
.template-dir-search.template-name-results .mobile-facet-badge svg,
.template-dir-search.template-name-results .results-options-icon,
.template-dir-search.template-name-results .dropdown-mobile-icon {
  height: var(--results-meta-icon-size) !important;
  max-height: var(--results-meta-icon-size) !important;
  max-width: var(--results-meta-icon-size) !important;
  min-height: var(--results-meta-icon-size) !important;
  min-width: var(--results-meta-icon-size) !important;
  width: var(--results-meta-icon-size) !important;
}

.template-dir-search.template-name-results #selectAllCheckbox {
  accent-color: var(--primary);
  cursor: pointer;
  flex: 0 0 18px;
  height: 18px !important;
  margin: 0 var(--space-2) 0 0 !important;
  width: 18px !important;
}

.template-dir-search.template-name-results .results-count #selectAllCheckbox {
  order: 1 !important;
}

.template-dir-search.template-name-results .results-count>.results-count-prev {
  order: 2 !important;
}

.template-dir-search.template-name-results .results-count>.results-count-next {
  order: 3 !important;
}

.template-dir-search.template-name-results .results-count>.arrow-btn:nth-child(2),
.template-dir-search.template-name-results .results-count>span.arrow-btn:nth-child(2) {
  order: 2 !important;
}

.template-dir-search.template-name-results .results-count>.arrow-btn:nth-child(3),
.template-dir-search.template-name-results .results-count>span.arrow-btn:nth-child(3) {
  order: 3 !important;
}

.template-dir-search.template-name-results .results-count>.results-count-text {
  order: 4 !important;
}

.template-dir-search.template-name-results .meta-controls .chevron {
  display: block;
}

@media (min-width: 1017px) and (max-width: 1439px) {
  .template-dir-search.template-name-results .sort-group .dropdown-text,
.template-dir-search.template-name-results .limit-group .dropdown-text,
.template-dir-search.template-name-results .meta-controls .chevron {
    display: inline !important;
  }
}

@media (max-width: 767px) {
  .template-dir-search.template-name-results .result-row--authors {
    flex-direction: row !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
    gap: var(--space-2) !important;
  }

  .template-dir-search.template-name-results .result-row--authors .result-label {
    flex: 0 0 auto;
  }

  .template-dir-search.template-name-results .result-author-values {
    min-width: 0;
  }

  .template-dir-search.template-name-results .result-row--authors-measuring {
    white-space: nowrap !important;
  }

  .template-dir-search.template-name-results .result-row--authors-stacked {
    flex-direction: column !important;
    gap: calc(var(--space-2) / 3) !important;
  }

  .template-dir-search.template-name-results .result-row--authors-stacked .result-author-values {
    width: 100%;
  }

  .template-dir-search.template-name-results .control-group>label,
.template-dir-search.template-name-results .sort-group .dropdown-text,
.template-dir-search.template-name-results .results-options-text,
.template-dir-search.template-name-results .mobile-facet-badge .facet-text,
.template-dir-search.template-name-results .mobile-facet-badge .facet-arrow {
    display: none !important;
  }

  .template-dir-search.template-name-results .meta-row .custom-dropdown.min-dropdown,
.template-dir-search.template-name-results .results-options-menu {
    flex: 0 0 32px;
    max-width: 32px;
    min-width: 32px !important;
    width: 32px;
  }

  .template-dir-search.template-name-results .limit-group .custom-dropdown.min-dropdown {
    flex-basis: 32px;
    max-width: 32px;
    min-width: 32px !important;
    width: 32px;
  }

  .template-dir-search.template-name-results .meta-row .dropdown-trigger,
.template-dir-search.template-name-results .results-options-trigger,
.template-dir-search.template-name-results .meta-actions>.action-btn,
.template-dir-search.template-name-results .mobile-facet-badge {
    align-items: center;
    border-radius: 8px;
    color: var(--text-muted);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    min-height: 0;
    padding: 0;
    min-width: 32px;
    width: 32px;
  }

  .template-dir-search.template-name-results .limit-group .dropdown-trigger {
    max-width: 32px;
    min-width: 32px;
    width: 32px;
  }

  .template-dir-search.template-name-results .meta-row .dropdown-trigger .trigger-content,
.template-dir-search.template-name-results .results-options-trigger .trigger-content,
.template-dir-search.template-name-results .mobile-facet-badge {
    gap: 0;
  }

  .template-dir-search.template-name-results .sort-group .dropdown-mobile-icon,
.template-dir-search.template-name-results .limit-group .dropdown-mobile-icon,
.template-dir-search.template-name-results .facet-filter-icon,
.template-dir-search.template-name-results .results-options-icon,
.template-dir-search.template-name-results .meta-actions>.action-btn svg,
.template-dir-search.template-name-results .results-count .arrow-btn svg {
    display: block;
    height: 16px;
    width: 16px;
  }

  .template-dir-search.template-name-results .meta-row .dropdown-trigger:hover,
.template-dir-search.template-name-results .results-options-trigger:hover,
.template-dir-search.template-name-results .meta-actions>.action-btn:hover,
.template-dir-search.template-name-results .mobile-facet-badge:hover {
    color: var(--primary);
  }

  .template-dir-search.template-name-results .sort-group .chevron,
.template-dir-search.template-name-results .limit-group .chevron {
    display: none;
  }

  .template-dir-search.template-name-results .limit-group .dropdown-text {
    display: none !important;
  }

  .template-dir-search.template-name-results .limit-group .limit-mobile-icon {
    display: none !important;
  }

  .template-dir-search.template-name-results .limit-group .limit-mobile-icon-text {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: var(--text-muted) !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
  }

  .template-dir-search.template-name-results .meta-controls .custom-dropdown.min-dropdown,
.template-dir-search.template-name-results .meta-actions .custom-dropdown,
.template-dir-search.template-name-results .results-options-menu {
    flex: 0 0 var(--button-height) !important;
    max-width: var(--button-height) !important;
    min-width: var(--button-height) !important;
    width: var(--button-height) !important;
  }

  .template-dir-search.template-name-results .meta-controls .dropdown-trigger,
.template-dir-search.template-name-results .meta-actions .dropdown-trigger,
.template-dir-search.template-name-results .results-options-trigger {
    align-items: center !important;
    justify-content: center !important;
    max-width: var(--button-height) !important;
    min-width: var(--button-height) !important;
    padding: 0 !important;
    width: var(--button-height) !important;
  }

  .template-dir-search.template-name-results .meta-controls .dropdown-trigger .trigger-content,
.template-dir-search.template-name-results .meta-actions .dropdown-trigger .trigger-content,
.template-dir-search.template-name-results .results-options-trigger .trigger-content {
    align-items: center !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    justify-content: center !important;
    gap: 0 !important;
    width: 100%;
  }

  .template-dir-search.template-name-results .meta-controls .chevron {
    display: none !important;
  }
}

.custom-dropdown .chevron,
.dropdown-trigger .chevron {
  --dropdown-chevron-size: 0.6rem;
  color: #9ca3af;
  flex: 0 0 var(--dropdown-chevron-size) !important;
  font-size: var(--dropdown-chevron-size) !important;
  font-weight: 400 !important;
  height: var(--dropdown-chevron-size) !important;
  line-height: 1 !important;
  margin: 0 !important;
  min-height: var(--dropdown-chevron-size) !important;
  min-width: var(--dropdown-chevron-size) !important;
  opacity: 0.72;
  transform-origin: center;
  width: var(--dropdown-chevron-size) !important;
}

.custom-dropdown svg.chevron,
.dropdown-trigger svg.chevron {
  stroke-width: 1 !important;
}

#header .account-action:has(.account-action__avatar) {
  --account-avatar-bg: #e8f1fb;
  background-color: var(--account-avatar-bg) !important;
  border-color: var(--account-avatar-bg) !important;
}

#header .account-action:has(.account-action__avatar):hover,
#header .account-action:has(.account-action__avatar):focus,
#header .account-action:has(.account-action__avatar):active {
  border-color: var(--account-avatar-bg) !important;
}

@media (max-width: 767px) {
  .search-container .search-button,
.search-container button[type="submit"],
.searchForm .search-button,
.searchForm button[type="submit"] {
    height: 28px !important;
    max-height: 28px !important;
    max-width: 28px !important;
    min-height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    width: 28px !important;
  }

  .search-container .search-button svg,
.search-container .search-button img,
.search-container button[type="submit"] svg,
.search-container button[type="submit"] img,
.searchForm .search-button svg,
.searchForm .search-button img,
.searchForm button[type="submit"] svg,
.searchForm button[type="submit"] img {
    height: 14px !important;
    max-height: 14px !important;
    max-width: 14px !important;
    min-height: 14px !important;
    min-width: 14px !important;
    width: 14px !important;
  }
}

@media (min-width: 768px) {
  #header .header-actions {
    width: max-content !important;
  }
}

@media (min-width: 768px) and (max-width: 1016px) {
  #header .header-actions {
    grid-template-columns: var(--item-height) var(--item-height) 220px !important;
    justify-self: end !important;
  }
}

@media (min-width: 1017px) and (max-width: 1439px) {
  #header .searchForm .search-container {
    max-width: none !important;
  }
}

@media (min-width: 1017px) {
  #header .searchForm .search-button {
    margin-left: 0 !important;
  }
}

@media (min-width: 1017px) and (max-width: 1439px) {
  #footer .footer-inner {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
  }

  #footer .footer-logo-section {
    order: 1;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    align-self: center;
    justify-content: flex-start;
    margin-top: 0;
  }

  #footer .footer-logo {
    width: 100%;
    max-width: 220px;
  }

  #footer .footer-grid {
    order: 2;
    grid-template-columns: repeat(3, max-content);
    justify-content: end;
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
  }
}

@media (min-width: 768px) and (max-width: 1016px) {
  #footer .footer-inner {
    width: min(calc(100% - (var(--space-5) * 2)), 1020px);
    max-width: 1020px;
    margin-left: auto;
    margin-right: auto;
  }

  #footer .footer-grid {
    justify-content: end !important;
    column-gap: var(--space-8);
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
  }
}

.template-dir-search.template-name-results .results-count-text--mobile {
  display: none;
}

@media (max-width: 767px) {
  .template-dir-search.template-name-results .meta-row {
    --results-mobile-control-size: 32px;
    --results-mobile-gap: 6px;
    align-items: center !important;
    column-gap: var(--results-mobile-gap) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    row-gap: 4px !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .meta-left {
    align-items: center !important;
    display: flex !important;
    flex: 1 1 0 !important;
    gap: var(--results-mobile-gap) !important;
    min-width: 0 !important;
    order: 1 !important;
  }

  .template-dir-search.template-name-results .meta-right {
    align-items: center !important;
    display: flex !important;
    flex: 0 0 auto !important;
    gap: var(--results-mobile-gap) !important;
    min-width: 0 !important;
    order: 2 !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .results-count,
.template-dir-search.template-name-results .meta-controls,
.template-dir-search.template-name-results .meta-actions {
    align-items: center !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: var(--results-mobile-gap) !important;
    margin: 0 !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .results-count {
    flex: 0 0 auto !important;
  }

  .template-dir-search.template-name-results .meta-controls {
    flex: 1 1 auto !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
  }

  .template-dir-search.template-name-results .meta-actions {
    flex: 0 0 auto !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-text {
    display: none !important;
  }

  .template-dir-search.template-name-results .facet-toggle {
    display: none !important;
  }

  .template-dir-search.template-name-results .control-group {
    align-items: center !important;
    display: inline-flex !important;
    flex: 0 0 var(--results-mobile-control-size) !important;
    margin: 0 !important;
    width: var(--results-mobile-control-size) !important;
  }

  .template-dir-search.template-name-results .results-count #selectAllCheckbox {
    flex: 0 0 18px !important;
    height: 18px !important;
    margin: 0 !important;
    width: 18px !important;
  }

  .template-dir-search.template-name-results .sort-group .custom-dropdown,
.template-dir-search.template-name-results .limit-group .custom-dropdown,
.template-dir-search.template-name-results .results-options-menu,
.template-dir-search.template-name-results .results-count>.arrow-btn,
.template-dir-search.template-name-results .results-count>span.arrow-btn,
.template-dir-search.template-name-results .results-count>a.arrow-btn,
.template-dir-search.template-name-results .meta-actions>.action-btn,
.template-dir-search.template-name-results .mobile-facet-btn,
.template-dir-search.template-name-results .mobile-facet-badge {
    flex: 0 0 var(--results-mobile-control-size) !important;
    height: var(--results-mobile-control-size) !important;
    max-height: var(--results-mobile-control-size) !important;
    max-width: var(--results-mobile-control-size) !important;
    min-height: var(--results-mobile-control-size) !important;
    min-width: var(--results-mobile-control-size) !important;
    width: var(--results-mobile-control-size) !important;
  }

  .template-dir-search.template-name-results .meta-row .dropdown-trigger,
.template-dir-search.template-name-results .results-options-trigger,
.template-dir-search.template-name-results .meta-actions>.action-btn,
.template-dir-search.template-name-results .mobile-facet-btn,
.template-dir-search.template-name-results .mobile-facet-badge {
    align-items: center !important;
    display: inline-flex !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .template-dir-search.template-name-results .meta-row .dropdown-trigger .trigger-content,
.template-dir-search.template-name-results .results-options-trigger .trigger-content,
.template-dir-search.template-name-results .mobile-facet-badge {
    gap: 0 !important;
    justify-content: center !important;
  }

  .template-dir-search.template-name-results .control-group>label,
.template-dir-search.template-name-results .sort-group .dropdown-text,
.template-dir-search.template-name-results .limit-group .dropdown-text,
.template-dir-search.template-name-results .limit-group .limit-mobile-icon,
.template-dir-search.template-name-results .results-options-text,
.template-dir-search.template-name-results .mobile-facet-badge .facet-text,
.template-dir-search.template-name-results .mobile-facet-badge .facet-arrow,
.template-dir-search.template-name-results .meta-controls .chevron,
.template-dir-search.template-name-results .meta-actions .chevron {
    display: none !important;
  }

  .template-dir-search.template-name-results .sort-group .dropdown-mobile-icon,
.template-dir-search.template-name-results .results-options-icon,
.template-dir-search.template-name-results .facet-filter-icon,
.template-dir-search.template-name-results .meta-actions>.action-btn svg,
.template-dir-search.template-name-results .results-count .arrow-btn svg {
    display: block !important;
    height: 16px !important;
    width: 16px !important;
  }

  .template-dir-search.template-name-results .limit-group .limit-mobile-icon-text {
    align-items: center !important;
    color: var(--text-muted) !important;
    display: inline-flex !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    height: auto !important;
    justify-content: center !important;
    line-height: 1 !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .results-count-text--mobile {
    display: block !important;
    flex: 0 0 100% !important;
    margin: 0 !important;
    min-width: 0 !important;
    order: 3 !important;
    text-align: left !important;
    white-space: normal !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .meta-left,
.template-dir-search.template-name-results .meta-right,
.template-dir-search.template-name-results .results-count,
.template-dir-search.template-name-results .meta-controls,
.template-dir-search.template-name-results .meta-actions {
    display: contents !important;
  }

  .template-dir-search.template-name-results .results-count #selectAllCheckbox {
    order: 1 !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-prev {
    order: 2 !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-next {
    order: 3 !important;
  }

  .template-dir-search.template-name-results .sort-group {
    margin-left: auto !important;
    order: 4 !important;
  }

  .template-dir-search.template-name-results .limit-group {
    order: 5 !important;
  }

  .template-dir-search.template-name-results .results-options-menu {
    order: 6 !important;
  }

  .template-dir-search.template-name-results .meta-actions>.action-btn {
    order: 7 !important;
  }

  .template-dir-search.template-name-results .mobile-facet-btn {
    order: 8 !important;
  }

  .template-dir-search.template-name-results .results-count-text--mobile {
    order: 20 !important;
  }
}

@media (min-width: 768px) and (max-width: 1016px) {
  .template-dir-search.template-name-results .meta-row {
    align-items: center !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.425rem !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .meta-left,
.template-dir-search.template-name-results .meta-right {
    align-items: center !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .meta-left {
    flex: 1 1 auto !important;
    gap: 0.425rem !important;
  }

  .template-dir-search.template-name-results .meta-right {
    flex: 0 0 auto !important;
    gap: 0.425rem !important;
    justify-content: flex-end !important;
    margin-left: 0 !important;
  }

  .template-dir-search.template-name-results .results-count,
.template-dir-search.template-name-results .meta-controls,
.template-dir-search.template-name-results .meta-actions,
.template-dir-search.template-name-results .facet-toggle {
    align-items: center !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .results-count {
    flex: 0 0 auto !important;
    gap: 6px !important;
    margin-right: 0 !important;
  }

  .template-dir-search.template-name-results .meta-controls {
    flex: 0 0 auto !important;
    gap: 0.425rem !important;
    margin-left: auto !important;
  }

  .template-dir-search.template-name-results .meta-actions {
    flex: 0 0 auto !important;
    gap: 0.425rem !important;
  }

  .template-dir-search.template-name-results .facet-toggle {
    gap: 0.6375rem !important;
    margin-left: 0.425rem !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-text {
    display: inline !important;
    flex: 0 0 auto !important;
    margin-left: var(--space-2) !important;
    margin-right: 0 !important;
    order: 4 !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .results-count-text--mobile {
    display: none !important;
  }

  .template-dir-search.template-name-results .results-options-text,
.template-dir-search.template-name-results .meta-actions .chevron {
    display: inline !important;
  }

  .template-dir-search.template-name-results .control-group>label,
.template-dir-search.template-name-results .sort-group .dropdown-text,
.template-dir-search.template-name-results .limit-group .dropdown-text,
.template-dir-search.template-name-results .limit-group .dropdown-mobile-icon,
.template-dir-search.template-name-results .meta-controls .chevron {
    display: none !important;
  }

  .template-dir-search.template-name-results .sort-group .dropdown-mobile-icon {
    display: block !important;
  }

  .template-dir-search.template-name-results .limit-group .limit-mobile-icon-text {
    align-items: center !important;
    color: var(--text-muted) !important;
    display: inline-flex !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    justify-content: center !important;
    line-height: 1 !important;
  }

  .template-dir-search.template-name-results .meta-controls .custom-dropdown.min-dropdown,
.template-dir-search.template-name-results .meta-controls .custom-dropdown,
.template-dir-search.template-name-results .meta-actions .custom-dropdown,
.template-dir-search.template-name-results .results-options-menu {
    flex: 0 0 auto !important;
    max-width: none !important;
    min-width: max-content !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .meta-controls .dropdown-trigger,
.template-dir-search.template-name-results .meta-actions .dropdown-trigger,
.template-dir-search.template-name-results .results-options-trigger {
    height: var(--button-height) !important;
    justify-content: space-between !important;
    max-width: none !important;
    min-width: var(--button-height) !important;
    padding: 0 var(--space-3) !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .results-options-trigger {
    justify-content: center !important;
  }

  .template-dir-search.template-name-results .meta-controls .dropdown-trigger .trigger-content,
.template-dir-search.template-name-results .meta-actions .dropdown-trigger .trigger-content,
.template-dir-search.template-name-results .results-options-trigger .trigger-content {
    gap: var(--space-2) !important;
    justify-content: flex-start !important;
    width: auto !important;
  }

  .template-dir-search.template-name-results .sort-group .custom-dropdown.min-dropdown,
.template-dir-search.template-name-results .limit-group .custom-dropdown.min-dropdown {
    flex: 0 0 var(--button-height) !important;
    max-width: var(--button-height) !important;
    min-width: var(--button-height) !important;
    width: var(--button-height) !important;
  }

  .template-dir-search.template-name-results .sort-group .dropdown-trigger,
.template-dir-search.template-name-results .limit-group .dropdown-trigger {
    justify-content: center !important;
    max-width: var(--button-height) !important;
    min-width: var(--button-height) !important;
    padding: 0 !important;
    width: var(--button-height) !important;
  }

  .template-dir-search.template-name-results .sort-group .dropdown-trigger .trigger-content,
.template-dir-search.template-name-results .limit-group .dropdown-trigger .trigger-content {
    gap: 0 !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .template-dir-search.template-name-results .meta-left,
.template-dir-search.template-name-results .meta-right,
.template-dir-search.template-name-results .results-count,
.template-dir-search.template-name-results .meta-controls,
.template-dir-search.template-name-results .meta-actions {
    display: contents !important;
  }

  .template-dir-search.template-name-results .results-count #selectAllCheckbox {
    order: 1 !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-prev {
    order: 2 !important;
  }

  .template-dir-search.template-name-results .results-count>.results-count-next {
    order: 3 !important;
  }

  .template-dir-search.template-name-results .sort-group {
    margin-left: auto !important;
    order: 4 !important;
  }

  .template-dir-search.template-name-results .limit-group {
    order: 5 !important;
  }

  .template-dir-search.template-name-results .results-options-menu {
    order: 6 !important;
  }

  .template-dir-search.template-name-results .meta-actions>.action-btn {
    order: 7 !important;
  }

  .template-dir-search.template-name-results .mobile-facet-btn {
    order: 8 !important;
  }

  .template-dir-search.template-name-results .results-count-text--mobile {
    order: 20 !important;
  }
}

/* Keep the selection label's default bottom margin off result-row alignment. */
.result-selection > .checkbox-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.result-selection > .checkbox-select > .checkbox-select-item {
  display: block;
  margin: 0 !important;
}
