.hmp-plm-host {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 8, 18, .78);
  backdrop-filter: blur(8px);
}

.hmp-project-overview-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hmp-project-overview-title h3 {
  margin: 0;
}

.hmp-project-link-button {
  padding: 9px 12px;
  color: var(--text, #f8fafc);
  background: rgba(46, 204, 113, .14);
  border: 1px solid var(--accent, #2ecc71);
  border-radius: 10px;
  font-weight: 800;
}

.hmp-plm-host.is-open {
  display: flex;
}

.hmp-plm-panel {
  width: min(100%, 780px);
  max-height: 90dvh;
  overflow: auto;
  color: var(--text, #f8fafc);
  background: var(--panel, #111e30);
  border: 1px solid var(--border, rgba(255, 255, 255, .1));
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .42);
}

.hmp-plm-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: rgba(17, 30, 48, .96);
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, .1));
  backdrop-filter: blur(10px);
}

.hmp-plm-header small,
.hmp-plm-header p {
  color: var(--muted, #94a3b8);
}

.hmp-plm-header h2 {
  margin: 3px 0;
  font-size: 21px;
}

.hmp-plm-header p {
  margin: 0;
  font-size: 13px;
}

.hmp-plm-header > button {
  min-width: 40px;
  min-height: 40px;
  color: var(--text, #f8fafc);
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--border, rgba(255, 255, 255, .1));
  border-radius: 12px;
}

.hmp-plm-content {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.hmp-plm-section {
  padding: 15px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--border, rgba(255, 255, 255, .1));
  border-radius: 16px;
}

.hmp-plm-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.hmp-plm-section-title h3 {
  margin: 0;
  font-size: 15px;
}

.hmp-plm-section-title span {
  min-width: 26px;
  padding: 4px 7px;
  color: var(--muted, #94a3b8);
  text-align: center;
  background: rgba(255, 255, 255, .07);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.hmp-plm-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  margin-top: 9px;
  background: rgba(7, 17, 31, .58);
  border: 1px solid var(--border, rgba(255, 255, 255, .1));
  border-radius: 13px;
}

.hmp-plm-card-copy {
  min-width: 0;
  flex: 1;
}

.hmp-plm-card h4 {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.hmp-plm-card p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 5px 0;
  font-size: 12px;
}

.hmp-plm-card p span {
  color: var(--muted, #94a3b8);
}

.hmp-plm-card p b {
  text-align: right;
}

.hmp-plm-scope-note,
.hmp-plm-help {
  display: block;
  margin-top: 9px;
  color: #f8d97a;
  font-size: 11px;
  line-height: 1.45;
}

.hmp-plm-scope-note code {
  color: inherit;
}

.hmp-plm-card-actions {
  display: flex;
  max-width: 210px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.hmp-plm-action,
.hmp-plm-primary,
.hmp-plm-form button {
  min-height: 38px;
  padding: 8px 11px;
  color: var(--text, #f8fafc);
  background: rgba(52, 152, 219, .18);
  border: 1px solid rgba(52, 152, 219, .42);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
}

.hmp-plm-action.is-danger {
  background: rgba(231, 76, 60, .14);
  border-color: rgba(231, 76, 60, .42);
}

.hmp-plm-primary {
  color: #fff;
  background: var(--accent, #2ecc71);
  border-color: transparent;
}

.hmp-plm-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.hmp-plm-form h3,
.hmp-plm-form > p,
.hmp-plm-help,
.hmp-plm-modal-actions {
  grid-column: 1 / -1;
}

.hmp-plm-form label {
  margin: 0;
}

.hmp-plm-form select {
  width: 100%;
  margin-top: 5px;
}

.hmp-plm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.hmp-plm-empty {
  margin: 10px 0 2px;
  color: var(--muted, #94a3b8);
  font-size: 12px;
}

.hmp-plm-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 18px 0;
  padding: 12px;
  background: rgba(52, 152, 219, .12);
  border: 1px solid rgba(52, 152, 219, .28);
  border-radius: 12px;
  font-size: 12px;
}

.hmp-plm-notice span {
  min-width: 0;
  flex: 1;
  color: var(--muted, #94a3b8);
}

.hmp-plm-notice button {
  padding: 7px 10px;
  color: var(--text, #f8fafc);
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 9px;
}

.hmp-plm-notice.is-error {
  background: rgba(231, 76, 60, .11);
  border-color: rgba(231, 76, 60, .3);
}

@media (max-width: 680px) {
  .hmp-project-overview-title {
    align-items: stretch;
    flex-direction: column;
  }

  .hmp-project-link-button {
    width: 100%;
  }

  .hmp-plm-host {
    align-items: flex-end;
    padding: 0;
  }

  .hmp-plm-panel {
    width: 100%;
    max-height: 94dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
  }

  .hmp-plm-card {
    display: block;
  }

  .hmp-plm-card-actions {
    max-width: none;
    justify-content: stretch;
    margin-top: 11px;
  }

  .hmp-plm-card-actions button {
    flex: 1;
  }

  .hmp-plm-form {
    grid-template-columns: 1fr;
  }

  .hmp-plm-form > * {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hmp-plm-host,
  .hmp-plm-panel {
    scroll-behavior: auto;
    transition: none;
  }
}
