.mpp-manuals {
  --mpp-border: #e7edf5;
  --mpp-card: #ffffff;
  --mpp-ink: #0f172a;
  --mpp-muted: #64748b;
  --mpp-soft: #f6f9fc;
  --mpp-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  color: var(--mpp-ink);
  font-family: inherit;
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 16px;
}

.mpp-heading {
  margin: 0 0 22px;
}

.mpp-heading h2 {
  color: var(--mpp-ink);
  font-family: inherit;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
}

.mpp-heading p {
  color: var(--mpp-accent);
  font-size: 15px;
  font-weight: 700;
  margin: 8px 0 0;
}

.mpp-toolbar {
  align-items: center;
  background: var(--mpp-soft);
  border: 1px solid var(--mpp-border);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 14px;
}

.mpp-search {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: min(100%, 380px);
}

.mpp-search input {
  background: #fff;
  border: 1px solid var(--mpp-border);
  border-radius: 6px;
  color: var(--mpp-ink);
  flex: 1;
  font: inherit;
  min-height: 44px;
  min-width: 0;
  padding: 10px 12px;
}

.mpp-search input:focus {
  border-color: var(--mpp-accent);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.16);
  outline: 0;
}

.mpp-search button,
.mpp-view-button,
.mpp-download-button,
.mpp-modal-download {
  align-items: center;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  line-height: 1.2;
  min-height: 42px;
  padding: 10px 16px;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.mpp-search button,
.mpp-view-button {
  background: var(--mpp-accent);
  border: 1px solid var(--mpp-accent);
  color: #fff;
}

.mpp-download-button,
.mpp-modal-download {
  background: #fff;
  border: 1px solid var(--mpp-border);
  color: #9c9c9c;
}

.mpp-search button:hover,
.mpp-view-button:hover,
.mpp-download-button:hover,
.mpp-modal-download:hover {
  transform: translateY(-1px);
}

.mpp-download-button:hover,
.mpp-modal-download:hover {
  border-color: var(--mpp-accent);
  color: #9c9c9c;
}

.mpp-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mpp-categories a,
.mpp-term-list a {
  background: #fff;
  border: 1px solid var(--mpp-border);
  border-radius: 999px;
  color: #9c9c9c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 11px;
  text-decoration: none;
}

.mpp-categories a.is-active,
.mpp-categories a:hover,
.mpp-term-list a:hover {
  border-color: var(--mpp-accent);
  color: #9c9c9c;
}

.mpp-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}

.mpp-card {
  align-items: flex-start;
  background: var(--mpp-card);
  border: 1px solid var(--mpp-border);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 15px;
  grid-template-columns: 68px 1fr;
  min-width: 0;
  padding: 18px;
}

.mpp-card:hover {
  box-shadow: var(--mpp-shadow);
}

.mpp-card-icon {
  align-items: center;
  background: var(--mpp-soft);
  border: 1px solid var(--mpp-border);
  border-radius: 8px;
  display: flex;
  height: 68px;
  justify-content: center;
  width: 68px;
}

.mpp-card-icon img {
  display: block;
  height: 48px;
  width: 48px;
}

.mpp-card-body {
  min-width: 0;
}

.mpp-card h2 {
  color: var(--mpp-ink);
  font-family: inherit;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.mpp-card p {
  color: var(--mpp-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.mpp-term-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.mpp-term-list a {
  background: var(--mpp-soft);
  font-size: 12px;
  padding: 7px 9px;
}

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

.mpp-missing {
  color: #b45309;
  font-weight: 800;
}

.mpp-empty {
  background: var(--mpp-soft);
  border: 1px solid var(--mpp-border);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 22px;
}

.mpp-empty span {
  color: var(--mpp-muted);
}

.mpp-pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 24px;
}

.mpp-page-count {
  color: var(--mpp-muted);
  font-size: 14px;
  font-weight: 700;
}

.mpp-pagination div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mpp-pagination a,
.mpp-pagination span.page-numbers {
  background: #fff;
  border: 1px solid var(--mpp-border);
  border-radius: 6px;
  color: #9c9c9c;
  font-size: 14px;
  font-weight: 800;
  min-width: 40px;
  padding: 9px 11px;
  text-align: center;
  text-decoration: none;
}

.mpp-pagination .current,
.mpp-pagination a:hover {
  border-color: var(--mpp-accent);
  color: #9c9c9c;
}

.mpp-modal[aria-hidden="true"] {
  display: none;
}

.mpp-modal {
  inset: 0;
  position: fixed;
  z-index: 999999;
}

.mpp-modal-backdrop {
  background: rgba(2, 8, 23, 0.72);
  inset: 0;
  position: absolute;
}

.mpp-modal-panel {
  background: #fff;
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto 1fr;
  height: min(92vh, 980px);
  inset: 4vh 3vw;
  overflow: hidden;
  position: absolute;
}

.mpp-modal-header {
  align-items: center;
  border-bottom: 1px solid var(--mpp-border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 13px 15px;
}

.mpp-modal-header h2 {
  color: var(--mpp-ink);
  font-family: inherit;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere;
}

.mpp-modal-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.mpp-modal-close {
  align-items: center;
  background: var(--mpp-ink);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  line-height: 1;
  width: 38px;
}

.mpp-modal iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.mpp-modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .mpp-manuals {
    padding: 22px 14px;
  }

  .mpp-card {
    grid-template-columns: 54px 1fr;
    padding: 14px;
  }

  .mpp-card-icon {
    height: 54px;
    width: 54px;
  }

  .mpp-card-icon img {
    height: 39px;
    width: 39px;
  }

  .mpp-search,
  .mpp-search button,
  .mpp-actions > * {
    width: 100%;
  }

  .mpp-modal-panel {
    border-radius: 0;
    height: 100vh;
    inset: 0;
  }

  .mpp-modal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .mpp-modal-actions {
    width: 100%;
  }

  .mpp-modal-download {
    flex: 1;
  }
}
